@roxyapi/ui 0.53.0 → 0.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,19 +1,19 @@
1
- "use strict";var Gs=Object.defineProperty;var Ei=Object.getOwnPropertyDescriptor;var rp=Object.getOwnPropertyNames;var ap=Object.prototype.hasOwnProperty;var sp=(n,r)=>{for(var e in r)Gs(n,e,{get:r[e],enumerable:!0})},np=(n,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of rp(r))!ap.call(n,a)&&a!==e&&Gs(n,a,{get:()=>r[a],enumerable:!(t=Ei(r,a))||t.enumerable});return n};var op=n=>np(Gs({},"__esModule",{value:!0}),n),m=(n,r,e,t)=>{for(var a=t>1?void 0:t?Ei(r,e):r,s=n.length-1,o;s>=0;s--)(o=n[s])&&(a=(t?o(r,e,a):o(a))||a);return t&&a&&Gs(r,e,a),a};var Xg={};sp(Xg,{ROXY_COMPONENTS:()=>wo,ROXY_UI_COMPONENTS:()=>Wg,ROXY_UI_VERSION:()=>On,RoxyAlmanacDay:()=>yr,RoxyAngelNumberCard:()=>aa,RoxyAngelNumberLookup:()=>sa,RoxyArudhaPadas:()=>na,RoxyAshtakavargaGrid:()=>xr,RoxyAspectsTable:()=>oa,RoxyAstrocartographyMap:()=>da,RoxyBaziChart:()=>ca,RoxyBhavChalitTable:()=>pa,RoxyBhavaBalaTable:()=>ma,RoxyBiorhythmChart:()=>vr,RoxyBodygraph:()=>$r,RoxyCharaKarakas:()=>ua,RoxyChoghadiyaGrid:()=>ya,RoxyCompatibilityCard:()=>wr,RoxyCompoundNumber:()=>fa,RoxyCrystalCard:()=>xa,RoxyCrystalGrid:()=>kr,RoxyDashaTimeline:()=>dr,RoxyData:()=>Rr,RoxyDivisionalChart:()=>Cr,RoxyDoshaCard:()=>Dr,RoxyDoshaConstitution:()=>La,RoxyDreamCard:()=>$a,RoxyDreamSearch:()=>wa,RoxyEndpointForm:()=>Re,RoxyEphemerisTable:()=>Ar,RoxyFixedStars:()=>Sa,RoxyFlyingStarChart:()=>zr,RoxyForecastDigest:()=>Ca,RoxyForecastTimeline:()=>Da,RoxyGematria:()=>Ta,RoxyGocharaTable:()=>Aa,RoxyGunaMilan:()=>za,RoxyHdConnection:()=>Ma,RoxyHdPenta:()=>Ea,RoxyHdTypeCard:()=>Pa,RoxyHdVariables:()=>_a,RoxyHeliacalTable:()=>Na,RoxyHexagram:()=>Ia,RoxyHoraTable:()=>Ga,RoxyHoroscopeCard:()=>cr,RoxyKpChart:()=>Er,RoxyKpFinanceCard:()=>Oa,RoxyKpPlanetsTable:()=>Ba,RoxyKpRulingPlanets:()=>Fa,RoxyKuaCard:()=>Pr,RoxyLocalSpaceCompass:()=>Ha,RoxyLocationSearch:()=>at,RoxyLuckPillars:()=>ja,RoxyMayanDaySign:()=>_r,RoxyMoonPhase:()=>Nr,RoxyNakshatraCard:()=>Ka,RoxyNatalChart:()=>hr,RoxyNumerologyCard:()=>Gr,RoxyPanchangTable:()=>Or,RoxyPositionsTable:()=>Br,RoxyProfectionCard:()=>qa,RoxyReferenceCard:()=>Ya,RoxyRelocationWheel:()=>Ua,RoxyShadbalaTable:()=>Za,RoxySynastryChart:()=>Wa,RoxyTarotCard:()=>Fr,RoxyTarotCatalog:()=>Hr,RoxyTarotSpread:()=>jr,RoxyTransitWheel:()=>rr,RoxyTransitsTable:()=>Kr,RoxyUpagrahaTable:()=>Ja,RoxyVastuMandala:()=>Vr,RoxyVedicAspects:()=>Qa,RoxyVedicDaily:()=>es,RoxyVedicKundli:()=>ar,RoxyVedicPlanetsTable:()=>ts,RoxyWesternPlanetsTable:()=>Va,RoxyYogaList:()=>qr,RoxyZodiacCard:()=>Yr,componentForTool:()=>Ai,expandCompact:()=>Ls,roxyDataScript:()=>Zi,serializeRoxyData:()=>Mo});module.exports=op(Xg);var _=require("lit"),Js=require("lit/decorators.js");var Ae=require("lit"),De=require("lit/decorators.js"),Qr=require("lit/directives/if-defined.js");var Pi=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function So(n){if(n.lang)return n.lang;if(typeof document>"u")return;let r=n.closest?.("[lang]")?.getAttribute("lang");return r||document.documentElement.lang||void 0}var ip={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ko(n){let r=n.toLowerCase();return Pi.find(e=>e.toLowerCase()===r)}function Os(n){let r=So(n);if(!r)return;let e=ko(r);if(e)return e;let t=r.toLowerCase().split("-"),a=t[0];if(a==="zh"){let s=t.find(o=>o==="hans"||o==="hant")??ip[t[1]??""];return s?ko(`zh-${s}`):void 0}return ko(a)}var Fi=require("lit");function Ft(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function H(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function D(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,r=>r.toUpperCase())}var _i="__ROXY_UI_I18N__";function Ro(){let n=globalThis,r=n[_i];if(r)return r;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[_i]=e,e}function Co(n,r){return r?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in r?String(r[t]??""):e):n}function Ni(n,r,e){return Co(Ii(n,r)??r,e)}function Ii(n,r){if(!n)return;let{catalogs:e}=Ro(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[Ft(r)]}function Gi(n){if(!n)return;let{fieldLabels:r}=Ro(),e=n.toLowerCase();return r[e]??r[e.split("-")[0]]}function Do(n,r){return Gi(n)?.fields[r]}function Oi(n,r,e){return Gi(n)?.enums[`${r}.${e}`]}function Bi(n){let{listeners:r}=Ro();return r.add(n),()=>{r.delete(n)}}var Bs=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){this.unsubscribe=Bi(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var ur=class extends Fi.LitElement{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Bs(this)}t(e,t){return Ni(this.effectiveLang(),e,t)}effectiveLang(){return So(this)}};var Hi=require("lit"),u=Hi.css`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;var lp="__cols",dp="__rows";function cp(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Fs(n){if(Array.isArray(n)){let s=!1,o=n.map(i=>{let l=Fs(i);return l!==i&&(s=!0),l});return s?o:n}if(!cp(n))return n;let r=n[lp],e=n[dp];if(Array.isArray(r)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let o={};return r.forEach((i,l)=>{o[i]=Fs(s[l])}),o});let t=!1,a={};for(let[s,o]of Object.entries(n)){let i=Fs(o);i!==o&&(t=!0),a[s]=i}return t?a:n}function Ls(n){return Fs(n)}var pp="pk_live_YOUR_KEY",ji={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function Xr(n){if(n)return n===pp?ji.sample:n.startsWith("pk_")?void 0:ji.secret}function rs(n,r,e={}){e.warn&&console.warn(r.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:r.reason,message:r.message},bubbles:!0,composed:!0}))}var js="https://roxyapi.com/api/v2";async function Ki(n){return(await Vi(n)).message}async function Vi(n){try{let r=await n.json();if(r?.error){let e=r.code==="validation_error"&&Array.isArray(r.issues)?r.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:r.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var as=class extends Error{constructor(e,t=null,a=!0){super(e);this.issues=t;this.worded=a}};function To(n){return n.submitUrl?void 0:Xr(n.publishableKey)}function Ao(n){return!!(n.submitUrl||n.publishableKey&&!To(n))}async function ss(n,r,e){let t=To(n);if(t)throw new as(t.message);let a=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:mp(r,n.submitContext),signal:e}):await hp(n,r,e);if(!a.ok){let s=await Vi(a);throw new as(s.message,s.issues,s.worded)}return await a.json()}function mp(n,r){return JSON.stringify(r?{...n,context:r}:n)}function hp(n,r,e){let t=new URL(`${n.baseUrl??js}${r.path}`,document.baseURI);for(let[s,o]of Object.entries(r.query??{}))o!=null&&t.searchParams.set(s,String(o));let a={Accept:"application/json"};return n.publishableKey&&(a["X-API-Key"]=n.publishableKey),r.body!=null&&(a["Content-Type"]="application/json"),fetch(t,{method:r.method??"GET",headers:a,body:r.body!=null?JSON.stringify(r.body):void 0,signal:e})}var Hs=class{constructor(r){this.baseUrl=js;this.worded=!0;this.host=r,r.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(r){this.worded=!0;let e=To(this);if(e){this.host.error=e.message,rs(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let a=await ss(this,r,t.signal);if(t.signal.aborted)return;this.host.data=a}catch(a){if(t.signal.aborted||a?.name==="AbortError")return;a instanceof as&&(this.host.issues=a.issues),this.worded=a instanceof as&&a.worded,this.host.error=a instanceof Error?a.message:String(a)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}};function qi(n,r,e,t=[]){let a={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,p)=>{let d=a[p];return delete a[p],encodeURIComponent(String(d??""))}),o=new Set(t),i={},l={};for(let[c,p]of Object.entries(a))p===void 0||p===""||(r==="GET"||o.has(c)?i[c]=p:l[c]=p);return{path:s,method:r,query:i,body:r==="POST"?l:void 0}}var Ye=require("lit");var Ks=require("lit");function pe(){return Ks.html`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var q=Ks.css`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var zo=Ye.css`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,me=Ye.css`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${zo}`;function Jr(n){return n?.length?Ye.html`<div class="interp-keywords">${n.map(r=>Ye.html`<span class="kw">${r}</span>`)}</div>`:Ye.nothing}function $s(n,r){if(!n)return Ye.nothing;let e=(t,a)=>a?Ye.html`<p><strong>${r(t)}</strong> ${a}</p>`:Ye.nothing;return Ye.html`${n.summary?Ye.html`<p>${n.summary}</p>`:Ye.nothing} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Jr(n.keywords)}`}function Yi(n,r,e){let t=n.filter(a=>!!a.body);return t.length===0?Ye.nothing:Ye.html`<section class="block" part="section readings"><h3>${e}</h3>${t.map((a,s)=>Ye.html`<details class="interp-card" part="reading" name="${r}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${pe()} ${a.aside?Ye.html`<span class="interp-aside"><small>${a.aside}</small></span>`:Ye.nothing}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??Ye.nothing}</div></details>`)}</section>`}var Ui="roxy-data";function Mo(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Zi(n){return`<script type="application/json" class="${Ui}">${Mo(n)}</script>`}function gp(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var Vs=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){if(this.host.data!=null)return;let r=this.read();r!==void 0&&(this.host.data=r,this.host.requestUpdate())}read(){let r=this.findInlineScript();return r?this.parse(r.textContent):void 0}findInlineScript(){for(let r of Array.from(this.host.children))if(gp(r)&&r.classList.contains(Ui))return r;return null}parse(r){if(r?.trim())try{return JSON.parse(r)}catch{return}}};var up={fromAttribute:n=>{if(n!=null){try{let r=JSON.parse(n);if(r&&typeof r=="object"&&!Array.isArray(r))return r}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},g=class extends ur{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,a=this.listRows();if(!(!e||!t||!a)){this.moreLoading=!0,this.moreError=null;try{let s=await ss(this.fetcher,{...e,query:{...e.query,offset:a.length}});if(this.lastRequest!==e)return;let o=s[t];this.data={...this.data,...s,[t]:[...a,...Array.isArray(o)?o:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let t=e.detail;this.lastValues=t.values,this.sticky=!!t.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(t.values),this.fetchFresh(qi(this.endpoint,this.method,t.values,t.queryKeys??[]))};new Vs(this),this.fetcher=new Hs(this)}static{this.styles=[u]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=Ls(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}render(){return Ae.html`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:!0,composed:!0})),customElements.get("roxy-data")?Ae.html`<roxy-data .data="${e}" lang="${(0,Qr.ifDefined)(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(a=>a.trim().toLowerCase()).filter(a=>/^[a-z][a-z0-9-]*$/.test(a));if(e.length===0)return Ae.nothing;let t=e.map(a=>`[part~="${a}"],roxy-endpoint-form::part(${a}){display:none!important}`).join("");return Ae.html`<style>${t}</style>`}renderState(){return this.endpoint&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?Ae.html`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,a){return this.hideReadings?Ae.nothing:Yi(e,t,this.t(a??"Reading"))}renderResult(e){let t=Ae.html`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?Ae.html`${t}${this.renderAttribution()}`:t}renderWithForm(e){return Ae.html`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Ae.nothing:this.renderErrorBanner(this.error):this.data==null?Ae.nothing:this.showAttribution()?Ae.html`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Ae.nothing:e.length>=t?Ae.nothing:Ae.html`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?Ae.html`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Ae.nothing}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let a=this.effectiveLang();a&&t.setAttribute("lang",a),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Os(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return Ae.html`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderWithForm(Ae.nothing):this.renderEmpty()}renderForm(){return Ae.html`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${(0,Qr.ifDefined)(this.specUrl)}" publishable-key="${(0,Qr.ifDefined)(this.publishableKey)}" location-url="${(0,Qr.ifDefined)(this.locationUrl)}" submit-label="${(0,Qr.ifDefined)(this.submitLabel)}" lang="${(0,Qr.ifDefined)(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return Ae.html`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return Ae.html`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){if(this.endpoint&&this.issues)return this.renderForm();let t=this.renderErrorBanner(e);return this.endpoint?Ae.html`${t}${this.renderForm()}`:t}renderErrorBanner(e){return Ae.html`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([(0,De.property)({attribute:!1})],g.prototype,"data",2),m([(0,De.property)({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([(0,De.property)({type:String})],g.prototype,"method",2),m([(0,De.property)({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([(0,De.property)({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([(0,De.property)({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([(0,De.property)({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([(0,De.property)({attribute:"submit-context",converter:up})],g.prototype,"submitContext",2),m([(0,De.property)({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([(0,De.property)({type:Boolean})],g.prototype,"remember",2),m([(0,De.property)({type:Boolean,attribute:"hide-readings",reflect:!0})],g.prototype,"hideReadings",2),m([(0,De.property)({type:String,attribute:"hide-sections",reflect:!0})],g.prototype,"hideSections",2),m([(0,De.property)({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([(0,De.property)({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([(0,De.property)({type:String})],g.prototype,"attribution",2),m([(0,De.state)()],g.prototype,"loading",2),m([(0,De.state)()],g.prototype,"error",2),m([(0,De.state)()],g.prototype,"issues",2),m([(0,De.state)()],g.prototype,"selfFetched",2),m([(0,De.state)()],g.prototype,"editing",2),m([(0,De.state)()],g.prototype,"sticky",2),m([(0,De.state)()],g.prototype,"openedRow",2),m([(0,De.state)()],g.prototype,"openedRowId",2),m([(0,De.state)()],g.prototype,"moreLoading",2),m([(0,De.state)()],g.prototype,"moreError",2);var qs=/^\d{4}-\d{2}-\d{2}$/,yp=/^\d{4}-\d{2}$/,Ji=/^\d{2}:\d{2}(:\d{2})?$/,fp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Wi=new Map;function Lt(n){if(!n)return["en"];let r=Wi.get(n);if(r)return[r,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Wi.set(n,e),[e,"en"]}var Xi=new Map;function Ys(n){let r=n??"",e=Xi.get(r);if(e)return e;let a={hour:new Intl.DateTimeFormat(Lt(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Xi.set(r,a),a}function Eo(n,r){return n&&r?`${n} - ${r}`:n||r}function ea(n){let r=Ji.test(n)?`1970-01-01T${n}`:qs.test(n)?`${n}T00:00:00`:yp.test(n)?`${n}-01T00:00:00`:fp.test(n)?n.replace(" ","T"):null;return r?{d:new Date(`${r}Z`),timeZone:"UTC"}:{d:new Date(n)}}function yt(n,r){if(typeof r!="string"||r.length===0||qs.test(r))return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleTimeString(Lt(n),{...Ys(n),timeZone:t})}function A(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function Wt(n,r){return r?Eo(yt(n,r.start),yt(n,r.end)):""}function _t(n,r,e){return Eo(A(n,r),A(n,e))}function sr(n,r,e){if(typeof r!="string"||r.length===0)return"";if(e==="year")return r.match(/^(\d{4})/)?.[1]??r;let{d:t,timeZone:a}=ea(r);return Number.isNaN(t.getTime())?r:t.toLocaleString(Lt(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?Ys(n):{},timeZone:a})}function ta(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{month:"short",day:"numeric",timeZone:t})}function Qi(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{weekday:"short",day:"numeric",timeZone:t})}function ns(n,r,e){return typeof r!="number"||!Number.isFinite(r)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(r,e-1,1,12)).toLocaleDateString(Lt(n),{month:"long",year:"numeric",timeZone:"UTC"})}function Us(n,r){return typeof r!="number"||!Number.isInteger(r)||r<1||r>12?"":new Date(Date.UTC(2e3,r-1,1,12)).toLocaleDateString(Lt(n),{month:"long",timeZone:"UTC"})}function j(n,r){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(Lt(n),{maximumFractionDigits:0})}function tt(n,r){let e=r.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Lt(n),{style:"long",type:"conjunction"}).format(e)}function f(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(Lt(n),{maximumFractionDigits:e})}function _e(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":(r/100).toLocaleString(Lt(n),{style:"percent",maximumFractionDigits:e})}var Ht={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function $t(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Ke(n){return H($t(n))}var xp={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function ra(n,r,e){let t=typeof r=="string"?xp[r]??D(r):"",a=typeof e=="number"?`${f(n,e,2)}°`:"";return t&&a?`${t} (${a})`:t||a}function he(n,r,e,t=!1){let a=typeof r=="string"&&qs.test(r)&&typeof e=="string"&&Ji.test(e)?`${r}T${e}`:r;if(typeof a!="string"||a.length===0)return"";if(qs.test(a))return A(n,a);let{d:s,timeZone:o}=ea(a);return Number.isNaN(s.getTime())?a:s.toLocaleString(Lt(n),{month:"short",day:"numeric",year:"numeric",...Ys(n),...t?{second:"2-digit"}:{},timeZone:o})}function Zs(n,r,e){return Eo(he(n,r),he(n,e))}function el(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleString(Lt(n),{month:"short",day:"numeric",year:"numeric",...Ys(n),timeZone:"UTC",timeZoneName:"short"})}function Po(n,r){if(!(typeof r!="string"||!r))return r===n?void 0:r}function ws(n,r){let e=typeof n=="string"?n:"",t=Po(e,r);return e?t?`${e} (${t})`:e:t??""}function Pe(n,r,e){return Do(n,r)??e??D(r)}function ge(n,r,e,t){return Oi(n,r,e)??t??D(e)}var Ws="Localized";function y(n,r,e){let t=n,a=t?.[`${r}${Ws}`];if(typeof a=="string"&&a!=="")return a;if(e!==void 0)return e;let s=t?.[r];return typeof s=="string"?s:""}function Xs(n,r){let e=n,t=e?.[r];if(!Array.isArray(t))return[];let a=e?.[`${r}${Ws}`],s=Array.isArray(a)?a:[];return t.map((o,i)=>{let l=s[i];return{value:String(o),label:typeof l=="string"&&l!==""?l:String(o)}})}function os(n){let r;for(let e of Object.keys(n)){if(!e.endsWith(Ws))continue;let t=e.slice(0,-Ws.length);if(t===""||!(t in n))continue;r??={...n};let a=n[e];a!=null&&a!==""&&(r[t]=a),delete r[e]}return r??n}function tl(n){return!("days"in n)}var yr=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&tl(e)?_.html`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:tl(e)?_.nothing:_.html`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?_.html`<span class="lunar">${_t(t,e.startDate,e.endDate)}</span>`:_.nothing} ${"year"in e&&typeof e.year=="number"?_.html`<span class="lunar">${ns(t,e.year,e.month)||e.year}</span>`:_.nothing} ${typeof e.total=="number"?_.html`<span class="lunar">${this.t("{{count}} days",{count:j(t,e.total)})}</span>`:_.nothing}</header>${"avoidAnimal"in e&&e.avoidAnimal?_.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Avoiding")}</span><b>${D(y(e,"avoidAnimal"))}</b></span></div>`:_.nothing} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(a=>this.renderDayRow(a,t))}</ul></section></article>`}renderDayCard(e,t){let a=e.dayOfficer;return _.html`<header class="head" part="header"><h2 class="title" id="almanac-title">${A(t,e.date)}</h2>${e.lunar?_.html`<span class="lunar">${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:_.nothing} ${a?.name?_.html`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")} <span lang="zh">${a.chinese??""}</span></span>`:_.nothing}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${a?.meaning&&!this.hideReadings?_.html`<p class="meaning" part="reading">${a.meaning}</p>`:_.nothing} ${this.renderMansion(e)}`}renderPillars(e){let a=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return a.length===0&&!e.clashAnimal?_.nothing:_.html`<div class="facts" part="details">${a.map(([s,o])=>_.html`<span><span class="lbl">${this.t(s)}</span> <b lang="zh">${o?.chinese??""}</b> ${o?.naYin??""}</span>`)} ${e.clashAnimal?_.html`<span><span class="lbl">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:_.nothing}</div>`}renderLists(e,t){let a=e.favours??[],s=e.avoids??[];return a.length===0&&s.length===0?_.nothing:_.html`<div class="lists" part="section activities">${a.length?_.html`<div class="list"><h3>${this.t("Favours")}</h3><div class="chips chips-favour">${a.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</div></div>`:_.nothing} ${s.length?_.html`<div class="list"><h3>${this.t("Avoids")}</h3><div class="chips chips-avoid">${s.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</div></div>`:_.nothing}</div>`}renderMansion(e){let t=e.mansion;return t?.name?_.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Mansion")}</span><b>${y(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?_.html`<span>${D(t.palace)}</span>`:_.nothing} ${t.planet?_.html`<span>${t.planet}</span>`:_.nothing} ${t.animal?_.html`<span>${y(t,"animal")}</span>`:_.nothing}</div>`:_.nothing}renderSolarTerms(e,t){let a="solarTerms"in e?e.solarTerms??[]:[];return a.length===0?_.nothing:_.html`<div class="terms" part="details">${a.map(s=>_.html`<span>${ta(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let a=e.dayOfficer,s=e.favours??[];return _.html`<li class="day" part="label-track"><span class="day-date">${ta(t,e.date)}</span><div class="day-body"><span lang="zh">${e.dayPillar?.chinese??""}</span> ${a?.name?_.html`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")}</span>`:_.nothing} ${s.length?_.html`<span class="chips chips-favour">${s.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</span>`:_.nothing} ${e.clashAnimal?_.html`<span class="lbl">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:_.nothing}</div></li>`}};yr.styles=[u,_.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.lunar{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px}.tag-auspicious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.tag-inauspicious{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.tag-neutral{background:color-mix(in srgb, var(--roxy-info,#2563eb) 16%, transparent);color:var(--_info-fg)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.list h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.chips-favour span{background:color-mix(in srgb, var(--roxy-success,#16a34a) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.chips-avoid span{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.meaning{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.days{margin:0;padding:0;list-style:none;display:grid}.day{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline;display:grid}.day:first-child{border-top:0;padding-top:0}.day-date{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.day-body{gap:.2rem var(--roxy-space-sm,.5rem);flex-wrap:wrap;align-items:baseline;display:flex}.terms{gap:var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}`],m([(0,Js.property)({type:String,reflect:!0})],yr.prototype,"mode",2),yr=m([(0,Js.customElement)("roxy-almanac-day")],yr);var ze=require("lit"),rl=require("lit/decorators.js");var bp=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Qs(n,r,e,t){let a=[];if(r)for(let s of bp){let o=r[s.key];o&&a.push({label:n(s.source),body:o})}return e&&a.push({label:n("Biblical"),body:e}),t&&a.push({label:n("Shadow"),body:t}),a}var aa=class extends g{renderData(r){let e=(r.energy??"").toLowerCase(),t=e==="positive"||e==="cautionary"||e==="neutral"?e:"",a=r.keywords??[],s=r.actionSteps??[];return ze.html`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${r.number??""}`}"><div class="hero" part="header">${r.number?ze.html`<div class="numeral">${r.number}</div>`:ze.nothing}<div><p class="label">${this.t("Angel number")}</p>${r.title?ze.html`<h2 class="title">${r.title}</h2>`:ze.nothing}</div></div>${r.coreMessage&&!this.hideReadings?ze.html`<p class="core">${r.coreMessage}</p>`:ze.nothing}<div class="badges" part="details">${r.type?ze.html`<span class="badge">${r.type}</span>`:ze.nothing} ${typeof r.digitRoot=="number"?ze.html`<span class="badge">${this.t("Digit root")} ${r.digitRoot}</span>`:ze.nothing} ${r.energy?ze.html`<span class="${`badge ${t}`}">${r.energy}</span>`:ze.nothing}</div>${a.length>0&&!this.hideReadings?ze.html`<div class="chips">${a.map(o=>ze.html`<span>${o}</span>`)}</div>`:ze.nothing} ${this.renderSections(r)} ${r.affirmation&&!this.hideReadings?ze.html`<p class="affirmation">${r.affirmation}</p>`:ze.nothing} ${s.length>0&&!this.hideReadings?ze.html`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${s.map(o=>ze.html`<li>${o}</li>`)}</ul></div>`:ze.nothing}</article>`}renderSections(r){return this.renderInterpretation(Qs(this.translator,r.meaning,r.biblical,r.shadow),"angel-meaning","Reading")}};aa.styles=[u,me,ze.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{flex-shrink:0}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.core{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.6}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{align-items:center;gap:var(--roxy-space-xs,.25rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:3px 10px;display:inline-flex}.badge.positive{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.cautionary{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.badge.neutral{background:color-mix(in srgb, var(--roxy-info,#0284c7) 16%, transparent);color:var(--_info-fg)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.affirmation{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);border-left:3px solid var(--roxy-accent,#f59e0b);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,4px);color:var(--roxy-fg,#0a0a0a);margin:0;font-style:italic}.steps h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.steps ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);gap:2px;margin:0;display:grid}`],aa=m([(0,rl.customElement)("roxy-angel-number-card")],aa);var K=require("lit"),al=require("lit/decorators.js");var vp={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},sa=class extends g{renderData(r){let e=r.knownMeaning,t=r.digitRootMeaning,a=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return K.html`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:r.number??""})}"><div class="hero" part="header">${r.number?K.html`<div class="numeral">${r.number}</div>`:K.nothing}<div>${e?.title?K.html`<p class="label">${this.t("Number analysis")}</p>`:K.nothing}<h2 class="title">${a}</h2></div></div><div class="badges" part="details">${r.type?K.html`<span class="badge">${r.type}</span>`:K.nothing} ${typeof r.digits=="number"?K.html`<span class="badge">${this.t("{{count}} digits",{count:r.digits})}</span>`:K.nothing} ${typeof r.uniqueDigits=="number"?K.html`<span class="badge">${this.t("{{count}} unique",{count:r.uniqueDigits})}</span>`:K.nothing} ${typeof r.digitRoot=="number"?K.html`<span class="badge">${this.t("Digit root {{n}}",{n:r.digitRoot})}</span>`:K.nothing} ${r.isPalindrome?K.html`<span class="badge flag">${this.t("Palindrome")}</span>`:K.nothing} ${r.isRepeating?K.html`<span class="badge flag">${this.t("Repeating")}</span>`:K.nothing} ${e?.energy?K.html`<span class="${`badge energy-${e.energy}`}">${this.t(vp[e.energy]??"Neutral energy")}</span>`:K.nothing}</div>${r.contextNote?K.html`<div class="context" part="section context"><p class="label">${this.t("Where you saw it")}</p><p>${r.contextNote}</p></div>`:K.nothing} ${e&&!this.hideReadings?K.html`<div class="section" part="section known-meaning"><p class="label">${this.t("Known angel number")}</p>${e.coreMessage?K.html`<p>${e.coreMessage}</p>`:K.nothing} ${e.keywords&&e.keywords.length>0?K.html`<div class="chips">${e.keywords.map(o=>K.html`<span>${o}</span>`)}</div>`:K.nothing} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?K.html`<p><em>${e.affirmation}</em></p>`:K.nothing} ${s.length>0?K.html`<p class="label">${this.t("What to do next")}</p><ol class="steps">${s.map(o=>K.html`<li>${o}</li>`)}</ol>`:K.nothing}</div>`:K.nothing} ${t&&!this.hideReadings?K.html`<div class="section" part="section digit-root"><p class="label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?K.html`<h3>${t.title}</h3>`:K.nothing} ${t.coreMessage?K.html`<p>${t.coreMessage}</p>`:K.nothing} ${e?K.nothing:this.renderRootMeaning(t)}</div>`:K.nothing}</article>`}renderMeaning(r,e,t,a){return this.renderInterpretation(Qs(this.translator,r,t,a),e,"Reading")}renderRootMeaning(r){return K.html`${r.keywords&&r.keywords.length>0?K.html`<div class="chips">${r.keywords.map(e=>K.html`<span>${e}</span>`)}</div>`:K.nothing}${this.renderMeaning(r.meaning,"lookup-root")}${r.affirmation?K.html`<p><em>${r.affirmation}</em></p>`:K.nothing}`}};sa.styles=[u,q,me,K.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{flex-shrink:0}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;align-items:center;padding:3px 10px;display:inline-flex}.badge.flag{background:color-mix(in srgb, var(--roxy-info,#0284c7) 16%, transparent);color:var(--_info-fg)}.badge.energy-positive{background:color-mix(in srgb, var(--roxy-success,#16a34a) 18%, transparent)}.badge.energy-cautionary{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 18%, transparent)}.context{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;display:grid}.steps{gap:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;padding-left:1.1rem;line-height:1.6;display:grid}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);display:grid}.section>.label{margin:0}.section>h3{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.section p{color:var(--roxy-fg,#0a0a0a);line-height:1.6;font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}`],sa=m([(0,al.customElement)("roxy-angel-number-lookup")],sa);var dt=require("lit"),ll=require("lit/decorators.js");var is=(n,r)=>r?n[Ft(r)]:void 0,Lp={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},R=n=>is(Lp,n),$p={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},nl=n=>is($p,n),wp={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Z=n=>is(wp,n),kp={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},en=n=>is(kp,n),Oe=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Sp={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},ls=n=>is(Sp,n),Rp={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},_o=n=>is(Rp,n),sl={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},ol=n=>{if(!n)return;let r=Ft(n),e=r.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return sl[r]??sl[t]};var Tt=require("lit");var ee=Tt.css`.roxy-frame{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function be(n,r,e){if(!r?.ayanamsa)return Tt.nothing;let t=ra(n,r.ayanamsa);if(!t)return Tt.nothing;let a=typeof r.ayanamsaDegrees=="number"?f(n,r.ayanamsaDegrees,4):void 0;return Tt.html`<p class="roxy-frame">${a===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:t,degrees:a})}</p>`}function fr(n,r,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?Tt.nothing:Tt.html`<p class="roxy-frame">${t.map(([a,s,o],i)=>Tt.html`${i>0?" · ":""}${r(a)}: <span class="roxy-frame-deg" title="${o}">${ge(e,s,o)}</span>`)}</p>`}function il(n,r,e){let t=Object.values(r??{}).filter(a=>!!a?.ayanamsa);return t.length===0?Tt.nothing:Tt.html`<div class="roxy-frame">${t.map(a=>{let s=ra(n,a.ayanamsa),o=typeof a.ayanamsaDegrees=="number"?f(n,a.ayanamsaDegrees,4):void 0,i=a.governs?.length?a.governs.join(", "):"";return Tt.html`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:s,degrees:o})}${i?e(", governs {{sections}}",{sections:i}):""}</p>`})}</div>`}var Cp=new Set(["a1","a12"]),na=class extends g{renderData(r){let e=r.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(a=>a.exceptionApplied).length;return dt.html`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2 class="title">${this.t("Arudha padas")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="leads" part="details"><div class="lead"><span>${this.t("Lagna")}</span><strong>${r.lagnaRashi??""}</strong></div><div class="lead"><span>${this.t("Arudha Lagna")}</span><strong>${r.arudhaLagna??""}</strong></div><div class="lead"><span>${this.t("Upapada")}</span><strong>${r.upapada??""}</strong></div></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(a=>this.renderRow(a))}</tbody></table></div>${t>0?dt.html`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:dt.nothing}</div>`}renderRow(r){let e=a=>Z(a)??"",t=a=>{let s=e(a);return dt.html`${s?dt.html`<span class="glyph">${s}</span>`:dt.nothing}${a??""}`};return dt.html`<tr class="${Cp.has(r.id)?"lead-row":""}"><td class="pada">${r.name??""}${r.abbreviation?dt.html`<span class="abbr">${r.abbreviation}</span>`:dt.nothing}</td><td class="num">${r.house??""}</td><td>${t(r.bhavaRashi)}</td><td>${r.lord??""}</td><td>${t(r.lordRashi)}</td><td>${t(r.rashi)} ${r.exceptionApplied?dt.html`<span class="exception">${this.t("Moved")}</span>`:dt.nothing}</td><td class="num">${r.houseFromLagna??""}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?dt.html`<p>${r.significations}</p>`:dt.nothing}</td></tr>`}};na.styles=[u,ee,dt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.leads{gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.lead span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.lead strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:700px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.lead-row{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}td.pada{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.abbr{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-normal,400);margin-left:.4em}tbody tr.lead-row .abbr,tbody tr.lead-row .glyph{color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.num{font-variant-numeric:tabular-nums}.exception{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--_warning-fg)}.meaning{white-space:normal;min-width:12rem}.meaning strong{font-weight:var(--roxy-weight-bold,600);display:block}.meaning p{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.note{padding:0 var(--roxy-space-md,1rem) var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],na=m([(0,ll.customElement)("roxy-arudha-padas")],na);var Te=require("lit"),tn=require("lit/decorators.js");var nr=require("lit"),ot=nr.css`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function pt(n){let{items:r,active:e,onSelect:t,label:a,idPrefix:s,controls:o=!1}=n;return nr.html`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${a}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=r.findIndex(b=>b.id===e);if(c===-1)return;let p=l.key==="ArrowRight"?1:-1,d=r[(c+p+r.length)%r.length];if(!d)return;t(d.id);let h=l.currentTarget.getRootNode();requestAnimationFrame(()=>{h.querySelector(`#${s}-tab-${d.id}`)?.focus()})}}">${r.map(l=>nr.html`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${o?`${s}-panel-${l.id}`:nr.nothing}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${o?r.filter(l=>l.id!==e).map(l=>nr.html`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):nr.nothing}`}var Dp=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],xr=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Te.html`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?Te.html`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Te.nothing} ${be(this.effectiveLang(),e.frame,this.translator)}</div>${pt({items:Dp.map(({id:a,source:s})=>({id:a,label:this.t(s)})),active:this.activeTab,onSelect:a=>{this.activeTab=a},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:!0})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return Te.html`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>Te.html`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?Te.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((a,s)=>{let o=t.bindus[s]??0;return Te.html`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${Z(a)??""}</span> ${a}</div></td><td class="${`bindu-cell ${this.sarvaTier(o)}`}">${o}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:Te.html`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Te.html`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:Te.html`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,a=this.data?.reducedSarvashtakavarga;return!t?.length&&!a?Te.html`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Te.html`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.",a)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,a,s){return t.length?Te.html`<div class="overflow-scroll" part="table"><table class="bhinna-table"><caption class="roxy-sr-only">${a}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>Te.html`<th scope="col" title="${o}">${Z(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Te.html`<tr><td>${o.planet}</td>${o.bindus.map(i=>Te.html`<td class="${`bindu-cell ${this.bhinnaTier(i)}`}">${i}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${s?Te.html`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,i)=>Te.html`<td>${s.bindus[i]??0}</td>`)}<td>${s.total}</td></tr></tfoot>`:Te.nothing}</table></div>`:Te.html`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Te.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>Te.html`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Te.html`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};xr.styles=[u,ee,ot,Te.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:center}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td:first-child,th:first-child{text-align:left}.glyph{margin-right:3px;font-size:1.1em;line-height:1}.planet-cell{white-space:nowrap;align-items:center;gap:4px;display:flex}.total-row td{font-weight:var(--roxy-weight-bold,600);border-top:2px solid var(--roxy-border,#e4e4e7);border-bottom:none}.bindu-cell{border-radius:var(--roxy-radius-sm,4px);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;min-width:2rem;color:var(--roxy-fg,currentColor)}.tier-1{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success,#16a34a) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success,#16a34a) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-scale{gap:2px;display:flex}.legend-swatch{border-radius:2px;width:16px;height:10px}.legend-note{flex:12rem}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:5rem}@container (width<=480px){.bhinna-table th,.bhinna-table td{font-size:var(--roxy-text-xs,.75rem);padding:.3rem .35rem}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:3.5rem}.bindu-cell{min-width:1.5rem}}.overflow-scroll{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%)}`],m([(0,tn.state)()],xr.prototype,"activeTab",2),xr=m([(0,tn.customElement)("roxy-ashtakavarga-grid")],xr);var O=require("lit"),pl=require("lit/decorators.js");var dl=require("lit"),ds=dl.css`.roxy-facts{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dt{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem)}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;function Tp(n,r,e){if(n.include?.length){let t={bodies:tt(r,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var cl={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},oa=class extends g{renderData(r){let e="aspects"in r?r.aspects??[]:[],t="patterns"in r?r.patterns??[]:[],a="summary"in r?r.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=he(this.effectiveLang(),"transitDate"in r?r.transitDate:"date"in r?r.date:"","time"in r?r.time:void 0,!0),o="timezone"in r?r.timezone:void 0,i="options"in r?r.options:void 0;return O.html`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2 class="title">${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?O.html`<p class="subtitle">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:O.nothing} ${typeof o=="number"&&Number.isFinite(o)?O.html`<dl class="roxy-facts" part="details"><div><dt>${Pe(this.effectiveLang(),"timezone")}</dt><dd>${f(this.effectiveLang(),o,5)}</dd></div></dl>`:O.nothing}</div>${a?this.renderSummary(a):O.nothing} ${a&&"strongest"in a&&a.strongest?this.renderStrongest(a.strongest):O.nothing} ${e.length>0?O.html`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>O.html`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:O.nothing} ${t.length>0?O.html`<div part="section patterns"><p class="section-label">${this.t("Chart patterns")}</p>${[...t].sort((l,c)=>(cl[l.kind]??9)-(cl[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</div>`:O.nothing} ${i?O.html`<p class="provenance">${Tp(i,this.effectiveLang(),this.translator)}</p>`:O.nothing}</div>`}renderSummary(r){let e="totalAspects"in r?r.totalAspects:r.total,t=Object.entries(r.byType??{}).sort((a,s)=>s[1]-a[1]);return O.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?O.html`<span class="pill pill--muted">${this.t("Total")}: ${e}</span>`:O.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:r.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:r.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:r.neutral})}</span> ${t.map(([a,s])=>O.html`<span class="pill pill--muted">${Ke({type:a})}: ${s}</span>`)}</div>`}renderStrongest(r){let e=R(r.planet1)??"",t=R(r.planet2)??"",a=(r.interpretation??"neutral").toLowerCase();return O.html`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${y(r,"planet1")} <span class="nature-badge ${a}">${y(r,"type",Ke(r))}</span> <span aria-hidden="true" class="glyph">${t}</span>${y(r,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:r.isApplying?this.t("Applying"):this.t("Separating"),orb:f(this.effectiveLang(),r.orb,2),strength:f(this.effectiveLang(),r.strength,0)})}</span></div>`}renderAspect(r,e){let t=R(r.planet1)??"",a=R(r.planet2)??"",s=(r.interpretation??"neutral").toLowerCase(),o=Ke(r),i=r.isApplying?this.t("Applying"):this.t("Separating"),l="meaning"in r?r.meaning:void 0,c="transitInterpretation"in r?r.transitInterpretation:void 0,p="aspectInterpretation"in r?r.aspectInterpretation:void 0,d=!!(l||c||p),h=O.html`<span aria-hidden="true" class="glyph">${t}</span>${y(r,"planet1")} <span class="nature-badge ${s}">${y(r,"type",o)}</span> <span aria-hidden="true" class="glyph">${a}</span>${y(r,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:f(this.effectiveLang(),r.orb,2),strength:f(this.effectiveLang(),r.strength,0)})}</span>`;return!d||this.hideReadings?O.html`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:O.html`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${pe()}</summary><div class="interp-body" part="readings">${l?this.renderMeaning(l):O.nothing} ${c?this.renderTransit(c):O.nothing} ${p?$s(p,this.translator):O.nothing}</div></details>`}renderMeaning(r){return O.html`${r.description?.short?O.html`<p>${r.description.short}</p>`:O.nothing} ${r.description?.long&&r.description.long!==r.description.short?O.html`<p>${r.description.long}</p>`:O.nothing} ${Jr(r.keywords)}`}renderTransit(r){return $s(r,this.translator)}renderPattern(r){let e=r.planets??[],t=r.apex?[...e].sort((a,s)=>+(s===r.apex)-+(a===r.apex)):e;return O.html`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${r.name??r.kind??this.t("Pattern")}</span> ${r.element?O.html`<span class="pattern-tag">${r.element}</span>`:O.nothing} ${r.modality?O.html`<span class="pattern-tag">${r.modality}</span>`:O.nothing} ${r.dissociate?O.html`<span class="pattern-tag" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:O.nothing} ${typeof r.tightness=="number"?O.html`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:_e(this.effectiveLang(),r.tightness,0)})}</span>`:O.nothing}</div>${t.length?O.html`<div class="pattern-planets">${t.map(a=>{let s=R(a),o=!!r.apex&&a===r.apex;return O.html`<span class="${o?"planet-chip apex":"planet-chip"}">${s?O.html`<span aria-hidden="true">${s}</span>`:O.nothing}${a}${o?O.html`<span class="apex-tag">${this.t("apex")}</span>`:O.nothing}</span>`})}</div>`:O.nothing} ${r.interpretation&&!this.hideReadings?O.html`<p class="pattern-interp">${r.interpretation}</p>`:O.nothing}</div>`}};oa.styles=[u,ds,q,me,O.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.summary-pills{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.interp-card summary{flex-wrap:wrap;gap:.5em}.interp-card summary .meta{color:var(--roxy-muted,#71717a);font-weight:400;font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.static-head{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:center;gap:.5em;font-weight:500;display:flex}.glyph{font-size:1.1em;line-height:1}.nature-badge{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.pattern{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem);gap:.35rem;display:grid}.pattern-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold,600)}.pattern-tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:1px 8px}.pattern-planets{flex-wrap:wrap;gap:.25rem;display:flex}.planet-chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.3rem;padding:1px 8px;display:inline-flex}.planet-chip.apex{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 20%, transparent);font-weight:var(--roxy-weight-bold,600)}.planet-chip .apex-tag{text-transform:uppercase;letter-spacing:.04em;font-size:.85em;font-weight:400}.pattern-tight{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.pattern-interp{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.45}.strongest{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4rem;display:flex}.strongest .label{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.strongest .meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.provenance{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}`],oa=m([(0,pl.customElement)("roxy-aspects-table")],oa);var ue=require("lit"),Ll=require("lit/decorators.js");var ia=require("lit"),Be=class{constructor(r){this.host=r;this.state="closed";this.zoom=1;r.addController(this)}hostUpdated(){let r=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!r)this.reset();else if(r.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",r.open||r.showModal());let e=r.querySelector(".roxy-chart-scroll");r.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(r){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=r===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=r===0?1:Math.min(3,Math.max(1,this.zoom+r)),this.host.requestUpdate()}renderChartViewport(r,e,t){return ia.html`<div class="roxy-chart-view">${r}<div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>{this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?ia.html`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${r}</div></div>`:ia.nothing}</dialog></div>`}},Ue=ia.css`.roxy-chart-view{min-width:0}.roxy-chart-tools{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);cursor:pointer;min-width:2.5rem;min-height:2.5rem;padding:.35rem .7rem}.roxy-chart-tools button:disabled{opacity:.45;cursor:default}.roxy-chart-tools button:focus-visible,.roxy-chart-scroll:focus-visible{outline:2px solid var(--roxy-ring,#b45309);outline-offset:2px}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg,#fff);width:calc(100vw - 2rem);max-width:72rem;max-height:calc(100dvh - 2rem);padding:var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:#0000008c}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-md,1rem);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(60rem * var(--chart-zoom,1)));padding:var(--roxy-space-sm,.5rem)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function At(n){let r=n%360;return r<0?r+360:r}function Nt(n){let r=At(n),e=Math.floor(r/30)%12,t=r%30,a=Math.floor(t),s=(t-a)*60,o=Math.floor(s),i=Math.round((s-o)*60);return{sign:Oe[e]??"Aries",signIndex:e,degree:a,minute:o,second:i}}function it(n,r){let{sign:e,degree:t,minute:a}=Nt(n);return`${t}° ${r||e} ${String(a).padStart(2,"0")}'`}function jt(n){return Kt(At(n)%30)}function No(n){let r=Math.floor(n);return{degree:r,minute:Math.floor((n-r)*60)}}function Kt(n){let{degree:r,minute:e}=No(n);return`${r}°${String(e).padStart(2,"0")}'`}function ks(n){return At(n+180)}function rn(n,r){let e=At(n),t=At(r)-e;return t<0&&(t+=360),At(e+t/2)}function It(n,r,e){let t=n.filter(c=>Number.isFinite(r(c))).map(c=>{let p=At(r(c));return{item:c,longitude:p,displayLongitude:p}}).sort((c,p)=>c.longitude-p.longitude),a=t.length;if(a<2)return t;let s=0,o=-1;for(let c=0;c<a;c++){let p=t[(c+a-1)%a],h=(t[c].longitude-p.longitude+360)%360;h>o&&(o=h,s=c)}let i=t[s],l=i.longitude;for(let c=1;c<a;c++){let p=t[(s+c)%a],d=typeof e=="function"?e(i.item,p.item):e,h=p.longitude+(s+c>=a?360:0);l=Math.max(h,l+d),p.displayLongitude=At(l),i=p}return t}var Xt=2;function ml(n,r){let e=n*Math.PI/180;return r.width/2*Math.abs(Math.cos(e))+r.height/2*Math.abs(Math.sin(e))}function or(n,r,e,t){let a=n*Math.PI/180,s=(o,i)=>i>1e-9?(o+t)/i:Number.POSITIVE_INFINITY;return Math.min(s((r.width+e.width)/2,Math.abs(Math.cos(a))),s((r.height+e.height)/2,Math.abs(Math.sin(a))))}var Ap=(n,r)=>Math.abs(n.x-r.x)<(n.width+r.width)/2&&Math.abs(n.y-r.y)<(n.height+r.height)/2;function hl(n,r){let e=[],t=a=>e.reduce((s,o)=>Ap(a,o)?Math.max(s,Math.min((a.width+o.width)/2-Math.abs(a.x-o.x),(a.height+o.height)/2-Math.abs(a.y-o.y))):s,0);return[...n].map((a,s)=>({point:a,index:s})).sort((a,s)=>a.point.displayLongitude-s.point.displayLongitude).reduce((a,{point:s,index:o})=>{let i=r(s,0),l=r(s,1),c=t(i)===0||t(i)<=t(l)?0:1;return e.push(c===0?i:l),a[o]=c,a},[])}function zt(n,r){return r>0?n/r*(180/Math.PI):0}function B(n,r,e,t){let a=t*Math.PI/180;return{x:n+e*Math.cos(a),y:r+e*Math.sin(a)}}var zp={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},gl=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function la(n,r=0){return zp[H(n)]??gl[r%gl.length]??"var(--roxy-accent)"}var ul="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var an=360,cs=180,ps=n=>n+180,ms=n=>90-n,Mp=9,yl=23.44,fl=66.56,xl=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,bl=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function Ep(n){let r=[],e=[],t=null;for(let a of n)t!==null&&Math.abs(a.longitude-t)>180&&(e.length&&r.push(e),e=[]),e.push(`${ps(a.longitude)},${ms(a.latitude)}`),t=a.longitude;return e.length&&r.push(e),r.filter(a=>a.length>1).map(a=>a.join(" "))}var vl={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},da=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}updated(){for(let e of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof e.getBBox!="function")continue;let{x:t,y:a,width:s,height:o}=e.getBBox();e.setAttribute("viewBox",[t-1,a-1,s+2,o+2].join(" "))}}renderData(e){let t=e.lines??[],a=e.birthDetails;return ue.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Astrocartography")}</h2>${a?ue.html`<div class="meta">${he(this.effectiveLang(),a.date,a.time)} · ${bl(Math.round(a.latitude))} ${xl(Math.round(a.longitude))}</div>`:ue.nothing}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,a),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?ue.html`<p class="summary">${e.summary}</p>`:ue.nothing} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return ue.html`<svg viewBox="0 0 ${an} ${cs}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${an}" height="${cs}"/><path class="land" d="${ul}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?ue.svg`<text class="birthplace" x=${ps(t.longitude)} y=${ms(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:ue.nothing}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let o=ps(s),i=s===0;e.push(ue.svg`<line class=${i?"grat-axis":"grat"} x1=${o} y1="0" x2=${o} y2=${cs} />`),e.push(ue.svg`<text class="axis-label" x=${o} y=${cs-2} text-anchor="middle">${xl(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let o=ms(s),i=s===0;t.push(ue.svg`<line class=${i?"grat-axis":"grat"} x1="0" y1=${o} x2=${an} y2=${o} />`),t.push(ue.svg`<text class="axis-label" x="2" y=${o-1}>${bl(s)}</text>`)}let a=[yl,-yl,fl,-fl].map(s=>ue.svg`<line class="grat-ref" x1="0" y1=${ms(s)} x2=${an} y2=${ms(s)} />`);return ue.svg`${e}${t}${a}`}renderBodyLines(e){let t=e.map((p,d)=>({line:p,color:la(p.planet,d),glyph:p.symbol||R(p.planet)||p.planet})),a=p=>p.reduce((d,h)=>Math.abs(h.latitude)<Math.abs(d.latitude)?h:d,p[0]??{latitude:0,longitude:0}),s=p=>new Map(It(t,d=>p(d)+180,Mp).map(({item:d,displayLongitude:h})=>[d,h-180])),o=s(p=>p.line.mc.longitude),i=s(p=>p.line.ic.longitude),l=s(p=>a(p.line.ascendant.points??[]).longitude),c=s(p=>a(p.line.descendant.points??[]).longitude);return t.map(p=>{let{line:d,color:h,glyph:b}=p,L=v=>v.get(p)??0;return ue.svg`${[this.renderMeridian(d.mc.longitude,L(o),h,b,d.planet,"mc",!1),this.renderMeridian(d.ic.longitude,L(i),h,b,d.planet,"ic",!0),this.renderCurve(d.ascendant.points,{longitude:L(l),latitude:a(d.ascendant.points??[]).latitude},h,b,d.planet,"ascendant",!1),this.renderCurve(d.descendant.points,{longitude:L(c),latitude:a(d.descendant.points??[]).latitude},h,b,d.planet,"descendant",!0)]}`})}renderMeridian(e,t,a,s,o,i,l){let c=ps(e),p=i==="ic"?cs-16:9;return ue.svg`<g>
2
- <line class=${`acg-line${l?" dashed":""}`} stroke=${a} x1=${c} y1="0" x2=${c} y2=${cs}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(vl[i]??"MC")})}</title></line>
1
+ "use strict";var Gs=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var ap=Object.getOwnPropertyNames;var sp=Object.prototype.hasOwnProperty;var np=(n,r)=>{for(var e in r)Gs(n,e,{get:r[e],enumerable:!0})},op=(n,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ap(r))!sp.call(n,a)&&a!==e&&Gs(n,a,{get:()=>r[a],enumerable:!(t=Pi(r,a))||t.enumerable});return n};var ip=n=>op(Gs({},"__esModule",{value:!0}),n),m=(n,r,e,t)=>{for(var a=t>1?void 0:t?Pi(r,e):r,s=n.length-1,o;s>=0;s--)(o=n[s])&&(a=(t?o(r,e,a):o(a))||a);return t&&a&&Gs(r,e,a),a};var Jg={};np(Jg,{ROXY_COMPONENTS:()=>wo,ROXY_UI_COMPONENTS:()=>Xg,ROXY_UI_VERSION:()=>On,RoxyAlmanacDay:()=>yr,RoxyAngelNumberCard:()=>aa,RoxyAngelNumberLookup:()=>sa,RoxyArudhaPadas:()=>na,RoxyAshtakavargaGrid:()=>xr,RoxyAspectsTable:()=>oa,RoxyAstrocartographyMap:()=>da,RoxyBaziChart:()=>ca,RoxyBhavChalitTable:()=>pa,RoxyBhavaBalaTable:()=>ma,RoxyBiorhythmChart:()=>vr,RoxyBodygraph:()=>$r,RoxyCharaKarakas:()=>ua,RoxyChoghadiyaGrid:()=>ya,RoxyCompatibilityCard:()=>wr,RoxyCompoundNumber:()=>fa,RoxyCrystalCard:()=>xa,RoxyCrystalGrid:()=>kr,RoxyDashaTimeline:()=>dr,RoxyData:()=>Rr,RoxyDivisionalChart:()=>Cr,RoxyDoshaCard:()=>Dr,RoxyDoshaConstitution:()=>La,RoxyDreamCard:()=>$a,RoxyDreamSearch:()=>wa,RoxyEndpointForm:()=>Re,RoxyEphemerisTable:()=>Ar,RoxyFixedStars:()=>Sa,RoxyFlyingStarChart:()=>zr,RoxyForecastDigest:()=>Ca,RoxyForecastTimeline:()=>Da,RoxyGematria:()=>Ta,RoxyGocharaTable:()=>Aa,RoxyGunaMilan:()=>za,RoxyHdConnection:()=>Ma,RoxyHdPenta:()=>Ea,RoxyHdTypeCard:()=>Pa,RoxyHdVariables:()=>_a,RoxyHeliacalTable:()=>Na,RoxyHexagram:()=>Ia,RoxyHoraTable:()=>Ga,RoxyHoroscopeCard:()=>cr,RoxyKpChart:()=>Er,RoxyKpFinanceCard:()=>Oa,RoxyKpPlanetsTable:()=>Ba,RoxyKpRulingPlanets:()=>Fa,RoxyKuaCard:()=>Pr,RoxyLocalSpaceCompass:()=>Ha,RoxyLocationSearch:()=>at,RoxyLuckPillars:()=>ja,RoxyMayanDaySign:()=>_r,RoxyMoonPhase:()=>Nr,RoxyNakshatraCard:()=>Ka,RoxyNatalChart:()=>hr,RoxyNumerologyCard:()=>Gr,RoxyPanchangTable:()=>Or,RoxyPositionsTable:()=>Br,RoxyProfectionCard:()=>qa,RoxyReferenceCard:()=>Ya,RoxyRelocationWheel:()=>Ua,RoxyShadbalaTable:()=>Za,RoxySynastryChart:()=>Wa,RoxyTarotCard:()=>Fr,RoxyTarotCatalog:()=>Hr,RoxyTarotSpread:()=>jr,RoxyTransitWheel:()=>rr,RoxyTransitsTable:()=>Kr,RoxyUpagrahaTable:()=>Ja,RoxyVastuMandala:()=>Vr,RoxyVedicAspects:()=>Qa,RoxyVedicDaily:()=>es,RoxyVedicKundli:()=>ar,RoxyVedicPlanetsTable:()=>ts,RoxyWesternPlanetsTable:()=>Va,RoxyYogaList:()=>qr,RoxyZodiacCard:()=>Yr,componentForTool:()=>zi,expandCompact:()=>Ls,roxyDataScript:()=>Wi,serializeRoxyData:()=>Mo});module.exports=ip(Jg);var _=require("lit"),Js=require("lit/decorators.js");var Ae=require("lit"),De=require("lit/decorators.js"),Qr=require("lit/directives/if-defined.js");var _i=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function So(n){if(n.lang)return n.lang;if(typeof document>"u")return;let r=n.closest?.("[lang]")?.getAttribute("lang");return r||document.documentElement.lang||void 0}var lp={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ko(n){let r=n.toLowerCase();return _i.find(e=>e.toLowerCase()===r)}function Os(n){let r=So(n);if(!r)return;let e=ko(r);if(e)return e;let t=r.toLowerCase().split("-"),a=t[0];if(a==="zh"){let s=t.find(o=>o==="hans"||o==="hant")??lp[t[1]??""];return s?ko(`zh-${s}`):void 0}return ko(a)}var Hi=require("lit");function Ft(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function H(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function D(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,r=>r.toUpperCase())}var Ni="__ROXY_UI_I18N__";function Ro(){let n=globalThis,r=n[Ni];if(r)return r;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[Ni]=e,e}function Co(n,r){return r?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in r?String(r[t]??""):e):n}function Ii(n,r,e){return Co(Gi(n,r)??r,e)}function Gi(n,r){if(!n)return;let{catalogs:e}=Ro(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[Ft(r)]}function Oi(n){if(!n)return;let{fieldLabels:r}=Ro(),e=n.toLowerCase();return r[e]??r[e.split("-")[0]]}function Do(n,r){return Oi(n)?.fields[r]}function Bi(n,r,e){return Oi(n)?.enums[`${r}.${e}`]}function Fi(n){let{listeners:r}=Ro();return r.add(n),()=>{r.delete(n)}}var Bs=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){this.unsubscribe=Fi(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var ur=class extends Hi.LitElement{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Bs(this)}t(e,t){return Ii(this.effectiveLang(),e,t)}effectiveLang(){return So(this)}};var ji=require("lit"),u=ji.css`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;var dp="__cols",cp="__rows";function pp(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Fs(n){if(Array.isArray(n)){let s=!1,o=n.map(i=>{let l=Fs(i);return l!==i&&(s=!0),l});return s?o:n}if(!pp(n))return n;let r=n[dp],e=n[cp];if(Array.isArray(r)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let o={};return r.forEach((i,l)=>{o[i]=Fs(s[l])}),o});let t=!1,a={};for(let[s,o]of Object.entries(n)){let i=Fs(o);i!==o&&(t=!0),a[s]=i}return t?a:n}function Ls(n){return Fs(n)}var mp="pk_live_YOUR_KEY",Ki={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function Xr(n){if(n)return n===mp?Ki.sample:n.startsWith("pk_")?void 0:Ki.secret}function rs(n,r,e={}){e.warn&&console.warn(r.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:r.reason,message:r.message},bubbles:!0,composed:!0}))}var js="https://roxyapi.com/api/v2";async function Vi(n){return(await qi(n)).message}async function qi(n){try{let r=await n.json();if(r?.error){let e=r.code==="validation_error"&&Array.isArray(r.issues)?r.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:r.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var as=class extends Error{constructor(e,t=null,a=!0){super(e);this.issues=t;this.worded=a}};function To(n){return n.submitUrl?void 0:Xr(n.publishableKey)}function Ao(n){return!!(n.submitUrl||n.publishableKey&&!To(n))}async function ss(n,r,e){let t=To(n);if(t)throw new as(t.message);let a=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:hp(r,n.submitContext),signal:e}):await gp(n,r,e);if(!a.ok){let s=await qi(a);throw new as(s.message,s.issues,s.worded)}return await a.json()}function hp(n,r){return JSON.stringify(r?{...n,context:r}:n)}function gp(n,r,e){let t=new URL(`${n.baseUrl??js}${r.path}`,document.baseURI);for(let[s,o]of Object.entries(r.query??{}))o!=null&&t.searchParams.set(s,String(o));let a={Accept:"application/json"};return n.publishableKey&&(a["X-API-Key"]=n.publishableKey),r.body!=null&&(a["Content-Type"]="application/json"),fetch(t,{method:r.method??"GET",headers:a,body:r.body!=null?JSON.stringify(r.body):void 0,signal:e})}var Hs=class{constructor(r){this.baseUrl=js;this.worded=!0;this.host=r,r.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(r){this.worded=!0;let e=To(this);if(e){this.host.error=e.message,rs(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let a=await ss(this,r,t.signal);if(t.signal.aborted)return;this.host.data=a}catch(a){if(t.signal.aborted||a?.name==="AbortError")return;a instanceof as&&(this.host.issues=a.issues),this.worded=a instanceof as&&a.worded,this.host.error=a instanceof Error?a.message:String(a)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}};function Yi(n,r,e,t=[]){let a={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,p)=>{let d=a[p];return delete a[p],encodeURIComponent(String(d??""))}),o=new Set(t),i={},l={};for(let[c,p]of Object.entries(a))p===void 0||p===""||(r==="GET"||o.has(c)?i[c]=p:l[c]=p);return{path:s,method:r,query:i,body:r==="POST"?l:void 0}}var Ye=require("lit");var Ks=require("lit");function pe(){return Ks.html`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var q=Ks.css`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var zo=Ye.css`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,me=Ye.css`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${zo}`;function Jr(n){return n?.length?Ye.html`<div class="interp-keywords">${n.map(r=>Ye.html`<span class="kw">${r}</span>`)}</div>`:Ye.nothing}function $s(n,r){if(!n)return Ye.nothing;let e=(t,a)=>a?Ye.html`<p><strong>${r(t)}</strong> ${a}</p>`:Ye.nothing;return Ye.html`${n.summary?Ye.html`<p>${n.summary}</p>`:Ye.nothing} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Jr(n.keywords)}`}function Ui(n,r,e){let t=n.filter(a=>!!a.body);return t.length===0?Ye.nothing:Ye.html`<section class="block" part="section readings"><h3>${e}</h3>${t.map((a,s)=>Ye.html`<details class="interp-card" part="reading" name="${r}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${pe()} ${a.aside?Ye.html`<span class="interp-aside"><small>${a.aside}</small></span>`:Ye.nothing}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??Ye.nothing}</div></details>`)}</section>`}var Zi="roxy-data";function Mo(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Wi(n){return`<script type="application/json" class="${Zi}">${Mo(n)}</script>`}function up(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var Vs=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){if(this.host.data!=null)return;let r=this.read();r!==void 0&&(this.host.data=r,this.host.requestUpdate())}read(){let r=this.findInlineScript();return r?this.parse(r.textContent):void 0}findInlineScript(){for(let r of Array.from(this.host.children))if(up(r)&&r.classList.contains(Zi))return r;return null}parse(r){if(r?.trim())try{return JSON.parse(r)}catch{return}}};var yp={fromAttribute:n=>{if(n!=null){try{let r=JSON.parse(n);if(r&&typeof r=="object"&&!Array.isArray(r))return r}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},g=class extends ur{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,a=this.listRows();if(!(!e||!t||!a)){this.moreLoading=!0,this.moreError=null;try{let s=await ss(this.fetcher,{...e,query:{...e.query,offset:a.length}});if(this.lastRequest!==e)return;let o=s[t];this.data={...this.data,...s,[t]:[...a,...Array.isArray(o)?o:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let t=e.detail;this.lastValues=t.values,this.sticky=!!t.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(t.values),this.fetchFresh(Yi(this.endpoint,this.method,t.values,t.queryKeys??[]))};new Vs(this),this.fetcher=new Hs(this)}static{this.styles=[u]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=Ls(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}render(){return Ae.html`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:!0,composed:!0})),customElements.get("roxy-data")?Ae.html`<roxy-data .data="${e}" lang="${(0,Qr.ifDefined)(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(a=>a.trim().toLowerCase()).filter(a=>/^[a-z][a-z0-9-]*$/.test(a));if(e.length===0)return Ae.nothing;let t=e.map(a=>`[part~="${a}"],roxy-endpoint-form::part(${a}){display:none!important}`).join("");return Ae.html`<style>${t}</style>`}renderState(){return this.endpoint&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?Ae.html`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,a){return this.hideReadings?Ae.nothing:Ui(e,t,this.t(a??"Reading"))}renderResult(e){let t=Ae.html`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?Ae.html`${t}${this.renderAttribution()}`:t}renderWithForm(e){return Ae.html`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Ae.nothing:this.renderErrorBanner(this.error):this.data==null?Ae.nothing:this.showAttribution()?Ae.html`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Ae.nothing:e.length>=t?Ae.nothing:Ae.html`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?Ae.html`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Ae.nothing}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let a=this.effectiveLang();a&&t.setAttribute("lang",a),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Os(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return Ae.html`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderWithForm(Ae.nothing):this.renderEmpty()}renderForm(){return Ae.html`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${(0,Qr.ifDefined)(this.specUrl)}" publishable-key="${(0,Qr.ifDefined)(this.publishableKey)}" location-url="${(0,Qr.ifDefined)(this.locationUrl)}" submit-label="${(0,Qr.ifDefined)(this.submitLabel)}" lang="${(0,Qr.ifDefined)(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return Ae.html`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return Ae.html`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){if(this.endpoint&&this.issues)return this.renderForm();let t=this.renderErrorBanner(e);return this.endpoint?Ae.html`${t}${this.renderForm()}`:t}renderErrorBanner(e){return Ae.html`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([(0,De.property)({attribute:!1})],g.prototype,"data",2),m([(0,De.property)({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([(0,De.property)({type:String})],g.prototype,"method",2),m([(0,De.property)({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([(0,De.property)({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([(0,De.property)({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([(0,De.property)({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([(0,De.property)({attribute:"submit-context",converter:yp})],g.prototype,"submitContext",2),m([(0,De.property)({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([(0,De.property)({type:Boolean})],g.prototype,"remember",2),m([(0,De.property)({type:Boolean,attribute:"hide-readings",reflect:!0})],g.prototype,"hideReadings",2),m([(0,De.property)({type:String,attribute:"hide-sections",reflect:!0})],g.prototype,"hideSections",2),m([(0,De.property)({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([(0,De.property)({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([(0,De.property)({type:String})],g.prototype,"attribution",2),m([(0,De.state)()],g.prototype,"loading",2),m([(0,De.state)()],g.prototype,"error",2),m([(0,De.state)()],g.prototype,"issues",2),m([(0,De.state)()],g.prototype,"selfFetched",2),m([(0,De.state)()],g.prototype,"editing",2),m([(0,De.state)()],g.prototype,"sticky",2),m([(0,De.state)()],g.prototype,"openedRow",2),m([(0,De.state)()],g.prototype,"openedRowId",2),m([(0,De.state)()],g.prototype,"moreLoading",2),m([(0,De.state)()],g.prototype,"moreError",2);var qs=/^\d{4}-\d{2}-\d{2}$/,fp=/^\d{4}-\d{2}$/,Qi=/^\d{2}:\d{2}(:\d{2})?$/,xp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Xi=new Map;function Lt(n){if(!n)return["en"];let r=Xi.get(n);if(r)return[r,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Xi.set(n,e),[e,"en"]}var Ji=new Map;function Ys(n){let r=n??"",e=Ji.get(r);if(e)return e;let a={hour:new Intl.DateTimeFormat(Lt(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Ji.set(r,a),a}function Eo(n,r){return n&&r?`${n} - ${r}`:n||r}function ea(n){let r=Qi.test(n)?`1970-01-01T${n}`:qs.test(n)?`${n}T00:00:00`:fp.test(n)?`${n}-01T00:00:00`:xp.test(n)?n.replace(" ","T"):null;return r?{d:new Date(`${r}Z`),timeZone:"UTC"}:{d:new Date(n)}}function yt(n,r){if(typeof r!="string"||r.length===0||qs.test(r))return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleTimeString(Lt(n),{...Ys(n),timeZone:t})}function A(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function Wt(n,r){return r?Eo(yt(n,r.start),yt(n,r.end)):""}function _t(n,r,e){return Eo(A(n,r),A(n,e))}function sr(n,r,e){if(typeof r!="string"||r.length===0)return"";if(e==="year")return r.match(/^(\d{4})/)?.[1]??r;let{d:t,timeZone:a}=ea(r);return Number.isNaN(t.getTime())?r:t.toLocaleString(Lt(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?Ys(n):{},timeZone:a})}function ta(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{month:"short",day:"numeric",timeZone:t})}function el(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleDateString(Lt(n),{weekday:"short",day:"numeric",timeZone:t})}function ns(n,r,e){return typeof r!="number"||!Number.isFinite(r)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(r,e-1,1,12)).toLocaleDateString(Lt(n),{month:"long",year:"numeric",timeZone:"UTC"})}function Us(n,r){return typeof r!="number"||!Number.isInteger(r)||r<1||r>12?"":new Date(Date.UTC(2e3,r-1,1,12)).toLocaleDateString(Lt(n),{month:"long",timeZone:"UTC"})}function j(n,r){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(Lt(n),{maximumFractionDigits:0})}function tt(n,r){let e=r.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Lt(n),{style:"long",type:"conjunction"}).format(e)}function f(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(Lt(n),{maximumFractionDigits:e})}function _e(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":(r/100).toLocaleString(Lt(n),{style:"percent",maximumFractionDigits:e})}var Ht={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function $t(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Ke(n){return H($t(n))}var bp={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function ra(n,r,e){let t=typeof r=="string"?bp[r]??D(r):"",a=typeof e=="number"?`${f(n,e,2)}°`:"";return t&&a?`${t} (${a})`:t||a}function he(n,r,e,t=!1){let a=typeof r=="string"&&qs.test(r)&&typeof e=="string"&&Qi.test(e)?`${r}T${e}`:r;if(typeof a!="string"||a.length===0)return"";if(qs.test(a))return A(n,a);let{d:s,timeZone:o}=ea(a);return Number.isNaN(s.getTime())?a:s.toLocaleString(Lt(n),{month:"short",day:"numeric",year:"numeric",...Ys(n),...t?{second:"2-digit"}:{},timeZone:o})}function Zs(n,r,e){return Eo(he(n,r),he(n,e))}function tl(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleString(Lt(n),{month:"short",day:"numeric",year:"numeric",...Ys(n),timeZone:"UTC",timeZoneName:"short"})}function Po(n,r){if(!(typeof r!="string"||!r))return r===n?void 0:r}function ws(n,r){let e=typeof n=="string"?n:"",t=Po(e,r);return e?t?`${e} (${t})`:e:t??""}function Pe(n,r,e){return Do(n,r)??e??D(r)}function ge(n,r,e,t){return Bi(n,r,e)??t??D(e)}var Ws="Localized";function y(n,r,e){let t=n,a=t?.[`${r}${Ws}`];if(typeof a=="string"&&a!=="")return a;if(e!==void 0)return e;let s=t?.[r];return typeof s=="string"?s:""}function Xs(n,r){let e=n,t=e?.[r];if(!Array.isArray(t))return[];let a=e?.[`${r}${Ws}`],s=Array.isArray(a)?a:[];return t.map((o,i)=>{let l=s[i];return{value:String(o),label:typeof l=="string"&&l!==""?l:String(o)}})}function os(n){let r;for(let e of Object.keys(n)){if(!e.endsWith(Ws))continue;let t=e.slice(0,-Ws.length);if(t===""||!(t in n))continue;r??={...n};let a=n[e];a!=null&&a!==""&&(r[t]=a),delete r[e]}return r??n}function rl(n){return!("days"in n)}var yr=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&rl(e)?_.html`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:rl(e)?_.nothing:_.html`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?_.html`<span class="lunar">${_t(t,e.startDate,e.endDate)}</span>`:_.nothing} ${"year"in e&&typeof e.year=="number"?_.html`<span class="lunar">${ns(t,e.year,e.month)||e.year}</span>`:_.nothing} ${typeof e.total=="number"?_.html`<span class="lunar">${this.t("{{count}} days",{count:j(t,e.total)})}</span>`:_.nothing}</header>${"avoidAnimal"in e&&e.avoidAnimal?_.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Avoiding")}</span><b>${D(y(e,"avoidAnimal"))}</b></span></div>`:_.nothing} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(a=>this.renderDayRow(a,t))}</ul></section></article>`}renderDayCard(e,t){let a=e.dayOfficer;return _.html`<header class="head" part="header"><h2 class="title" id="almanac-title">${A(t,e.date)}</h2>${e.lunar?_.html`<span class="lunar">${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:_.nothing} ${a?.name?_.html`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")} <span lang="zh">${a.chinese??""}</span></span>`:_.nothing}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${a?.meaning&&!this.hideReadings?_.html`<p class="meaning" part="reading">${a.meaning}</p>`:_.nothing} ${this.renderMansion(e)}`}renderPillars(e){let a=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return a.length===0&&!e.clashAnimal?_.nothing:_.html`<div class="facts" part="details">${a.map(([s,o])=>_.html`<span><span class="lbl">${this.t(s)}</span> <b lang="zh">${o?.chinese??""}</b> ${o?.naYin??""}</span>`)} ${e.clashAnimal?_.html`<span><span class="lbl">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:_.nothing}</div>`}renderLists(e,t){let a=e.favours??[],s=e.avoids??[];return a.length===0&&s.length===0?_.nothing:_.html`<div class="lists" part="section activities">${a.length?_.html`<div class="list"><h3>${this.t("Favours")}</h3><div class="chips chips-favour">${a.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</div></div>`:_.nothing} ${s.length?_.html`<div class="list"><h3>${this.t("Avoids")}</h3><div class="chips chips-avoid">${s.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</div></div>`:_.nothing}</div>`}renderMansion(e){let t=e.mansion;return t?.name?_.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Mansion")}</span><b>${y(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?_.html`<span>${D(t.palace)}</span>`:_.nothing} ${t.planet?_.html`<span>${t.planet}</span>`:_.nothing} ${t.animal?_.html`<span>${y(t,"animal")}</span>`:_.nothing}</div>`:_.nothing}renderSolarTerms(e,t){let a="solarTerms"in e?e.solarTerms??[]:[];return a.length===0?_.nothing:_.html`<div class="terms" part="details">${a.map(s=>_.html`<span>${ta(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let a=e.dayOfficer,s=e.favours??[];return _.html`<li class="day" part="label-track"><span class="day-date">${ta(t,e.date)}</span><div class="day-body"><span lang="zh">${e.dayPillar?.chinese??""}</span> ${a?.name?_.html`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")}</span>`:_.nothing} ${s.length?_.html`<span class="chips chips-favour">${s.map(o=>_.html`<span>${ge(t,"activity",o)}</span>`)}</span>`:_.nothing} ${e.clashAnimal?_.html`<span class="lbl">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:_.nothing}</div></li>`}};yr.styles=[u,_.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.lunar{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px}.tag-auspicious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.tag-inauspicious{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.tag-neutral{background:color-mix(in srgb, var(--roxy-info,#2563eb) 16%, transparent);color:var(--_info-fg)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.list h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.chips-favour span{background:color-mix(in srgb, var(--roxy-success,#16a34a) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.chips-avoid span{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.meaning{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.days{margin:0;padding:0;list-style:none;display:grid}.day{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline;display:grid}.day:first-child{border-top:0;padding-top:0}.day-date{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.day-body{gap:.2rem var(--roxy-space-sm,.5rem);flex-wrap:wrap;align-items:baseline;display:flex}.terms{gap:var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}`],m([(0,Js.property)({type:String,reflect:!0})],yr.prototype,"mode",2),yr=m([(0,Js.customElement)("roxy-almanac-day")],yr);var ze=require("lit"),al=require("lit/decorators.js");var vp=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Qs(n,r,e,t){let a=[];if(r)for(let s of vp){let o=r[s.key];o&&a.push({label:n(s.source),body:o})}return e&&a.push({label:n("Biblical"),body:e}),t&&a.push({label:n("Shadow"),body:t}),a}var aa=class extends g{renderData(r){let e=(r.energy??"").toLowerCase(),t=e==="positive"||e==="cautionary"||e==="neutral"?e:"",a=r.keywords??[],s=r.actionSteps??[];return ze.html`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${r.number??""}`}"><div class="hero" part="header">${r.number?ze.html`<div class="numeral">${r.number}</div>`:ze.nothing}<div><p class="label">${this.t("Angel number")}</p>${r.title?ze.html`<h2 class="title">${r.title}</h2>`:ze.nothing}</div></div>${r.coreMessage&&!this.hideReadings?ze.html`<p class="core">${r.coreMessage}</p>`:ze.nothing}<div class="badges" part="details">${r.type?ze.html`<span class="badge">${r.type}</span>`:ze.nothing} ${typeof r.digitRoot=="number"?ze.html`<span class="badge">${this.t("Digit root")} ${r.digitRoot}</span>`:ze.nothing} ${r.energy?ze.html`<span class="${`badge ${t}`}">${r.energy}</span>`:ze.nothing}</div>${a.length>0&&!this.hideReadings?ze.html`<div class="chips">${a.map(o=>ze.html`<span>${o}</span>`)}</div>`:ze.nothing} ${this.renderSections(r)} ${r.affirmation&&!this.hideReadings?ze.html`<p class="affirmation">${r.affirmation}</p>`:ze.nothing} ${s.length>0&&!this.hideReadings?ze.html`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${s.map(o=>ze.html`<li>${o}</li>`)}</ul></div>`:ze.nothing}</article>`}renderSections(r){return this.renderInterpretation(Qs(this.translator,r.meaning,r.biblical,r.shadow),"angel-meaning","Reading")}};aa.styles=[u,me,ze.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{flex-shrink:0}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.core{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.6}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{align-items:center;gap:var(--roxy-space-xs,.25rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:3px 10px;display:inline-flex}.badge.positive{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.cautionary{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.badge.neutral{background:color-mix(in srgb, var(--roxy-info,#0284c7) 16%, transparent);color:var(--_info-fg)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.affirmation{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);border-left:3px solid var(--roxy-accent,#f59e0b);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,4px);color:var(--roxy-fg,#0a0a0a);margin:0;font-style:italic}.steps h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.steps ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);gap:2px;margin:0;display:grid}`],aa=m([(0,al.customElement)("roxy-angel-number-card")],aa);var K=require("lit"),sl=require("lit/decorators.js");var Lp={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},sa=class extends g{renderData(r){let e=r.knownMeaning,t=r.digitRootMeaning,a=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return K.html`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:r.number??""})}"><div class="hero" part="header">${r.number?K.html`<div class="numeral">${r.number}</div>`:K.nothing}<div>${e?.title?K.html`<p class="label">${this.t("Number analysis")}</p>`:K.nothing}<h2 class="title">${a}</h2></div></div><div class="badges" part="details">${r.type?K.html`<span class="badge">${r.type}</span>`:K.nothing} ${typeof r.digits=="number"?K.html`<span class="badge">${this.t("{{count}} digits",{count:r.digits})}</span>`:K.nothing} ${typeof r.uniqueDigits=="number"?K.html`<span class="badge">${this.t("{{count}} unique",{count:r.uniqueDigits})}</span>`:K.nothing} ${typeof r.digitRoot=="number"?K.html`<span class="badge">${this.t("Digit root {{n}}",{n:r.digitRoot})}</span>`:K.nothing} ${r.isPalindrome?K.html`<span class="badge flag">${this.t("Palindrome")}</span>`:K.nothing} ${r.isRepeating?K.html`<span class="badge flag">${this.t("Repeating")}</span>`:K.nothing} ${e?.energy?K.html`<span class="${`badge energy-${e.energy}`}">${this.t(Lp[e.energy]??"Neutral energy")}</span>`:K.nothing}</div>${r.contextNote?K.html`<div class="context" part="section context"><p class="label">${this.t("Where you saw it")}</p><p>${r.contextNote}</p></div>`:K.nothing} ${e&&!this.hideReadings?K.html`<div class="section" part="section known-meaning"><p class="label">${this.t("Known angel number")}</p>${e.coreMessage?K.html`<p>${e.coreMessage}</p>`:K.nothing} ${e.keywords&&e.keywords.length>0?K.html`<div class="chips">${e.keywords.map(o=>K.html`<span>${o}</span>`)}</div>`:K.nothing} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?K.html`<p><em>${e.affirmation}</em></p>`:K.nothing} ${s.length>0?K.html`<p class="label">${this.t("What to do next")}</p><ol class="steps">${s.map(o=>K.html`<li>${o}</li>`)}</ol>`:K.nothing}</div>`:K.nothing} ${t&&!this.hideReadings?K.html`<div class="section" part="section digit-root"><p class="label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?K.html`<h3>${t.title}</h3>`:K.nothing} ${t.coreMessage?K.html`<p>${t.coreMessage}</p>`:K.nothing} ${e?K.nothing:this.renderRootMeaning(t)}</div>`:K.nothing}</article>`}renderMeaning(r,e,t,a){return this.renderInterpretation(Qs(this.translator,r,t,a),e,"Reading")}renderRootMeaning(r){return K.html`${r.keywords&&r.keywords.length>0?K.html`<div class="chips">${r.keywords.map(e=>K.html`<span>${e}</span>`)}</div>`:K.nothing}${this.renderMeaning(r.meaning,"lookup-root")}${r.affirmation?K.html`<p><em>${r.affirmation}</em></p>`:K.nothing}`}};sa.styles=[u,q,me,K.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{flex-shrink:0}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;align-items:center;padding:3px 10px;display:inline-flex}.badge.flag{background:color-mix(in srgb, var(--roxy-info,#0284c7) 16%, transparent);color:var(--_info-fg)}.badge.energy-positive{background:color-mix(in srgb, var(--roxy-success,#16a34a) 18%, transparent)}.badge.energy-cautionary{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 18%, transparent)}.context{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;display:grid}.steps{gap:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;padding-left:1.1rem;line-height:1.6;display:grid}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);display:grid}.section>.label{margin:0}.section>h3{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.section p{color:var(--roxy-fg,#0a0a0a);line-height:1.6;font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}`],sa=m([(0,sl.customElement)("roxy-angel-number-lookup")],sa);var dt=require("lit"),dl=require("lit/decorators.js");var is=(n,r)=>r?n[Ft(r)]:void 0,$p={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},R=n=>is($p,n),wp={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},ol=n=>is(wp,n),kp={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Z=n=>is(kp,n),Sp={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},en=n=>is(Sp,n),Oe=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Rp={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},ls=n=>is(Rp,n),Cp={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},_o=n=>is(Cp,n),nl={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},il=n=>{if(!n)return;let r=Ft(n),e=r.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return nl[r]??nl[t]};var Tt=require("lit");var ee=Tt.css`.roxy-frame{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function be(n,r,e){if(!r?.ayanamsa)return Tt.nothing;let t=ra(n,r.ayanamsa);if(!t)return Tt.nothing;let a=typeof r.ayanamsaDegrees=="number"?f(n,r.ayanamsaDegrees,4):void 0;return Tt.html`<p class="roxy-frame">${a===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:t,degrees:a})}</p>`}function fr(n,r,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?Tt.nothing:Tt.html`<p class="roxy-frame">${t.map(([a,s,o],i)=>Tt.html`${i>0?" · ":""}${r(a)}: <span class="roxy-frame-deg" title="${o}">${ge(e,s,o)}</span>`)}</p>`}function ll(n,r,e){let t=Object.values(r??{}).filter(a=>!!a?.ayanamsa);return t.length===0?Tt.nothing:Tt.html`<div class="roxy-frame">${t.map(a=>{let s=ra(n,a.ayanamsa),o=typeof a.ayanamsaDegrees=="number"?f(n,a.ayanamsaDegrees,4):void 0,i=a.governs?.length?a.governs.join(", "):"";return Tt.html`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:s,degrees:o})}${i?e(", governs {{sections}}",{sections:i}):""}</p>`})}</div>`}var Dp=new Set(["a1","a12"]),na=class extends g{renderData(r){let e=r.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(a=>a.exceptionApplied).length;return dt.html`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2 class="title">${this.t("Arudha padas")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="leads" part="details"><div class="lead"><span>${this.t("Lagna")}</span><strong>${r.lagnaRashi??""}</strong></div><div class="lead"><span>${this.t("Arudha Lagna")}</span><strong>${r.arudhaLagna??""}</strong></div><div class="lead"><span>${this.t("Upapada")}</span><strong>${r.upapada??""}</strong></div></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(a=>this.renderRow(a))}</tbody></table></div>${t>0?dt.html`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:dt.nothing}</div>`}renderRow(r){let e=a=>Z(a)??"",t=a=>{let s=e(a);return dt.html`${s?dt.html`<span class="glyph">${s}</span>`:dt.nothing}${a??""}`};return dt.html`<tr class="${Dp.has(r.id)?"lead-row":""}"><td class="pada">${r.name??""}${r.abbreviation?dt.html`<span class="abbr">${r.abbreviation}</span>`:dt.nothing}</td><td class="num">${r.house??""}</td><td>${t(r.bhavaRashi)}</td><td>${r.lord??""}</td><td>${t(r.lordRashi)}</td><td>${t(r.rashi)} ${r.exceptionApplied?dt.html`<span class="exception">${this.t("Moved")}</span>`:dt.nothing}</td><td class="num">${r.houseFromLagna??""}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?dt.html`<p>${r.significations}</p>`:dt.nothing}</td></tr>`}};na.styles=[u,ee,dt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.leads{gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.lead span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.lead strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:700px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.lead-row{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}td.pada{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.abbr{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-normal,400);margin-left:.4em}tbody tr.lead-row .abbr,tbody tr.lead-row .glyph{color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.num{font-variant-numeric:tabular-nums}.exception{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--_warning-fg)}.meaning{white-space:normal;min-width:12rem}.meaning strong{font-weight:var(--roxy-weight-bold,600);display:block}.meaning p{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.note{padding:0 var(--roxy-space-md,1rem) var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],na=m([(0,dl.customElement)("roxy-arudha-padas")],na);var Te=require("lit"),tn=require("lit/decorators.js");var nr=require("lit"),ot=nr.css`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function pt(n){let{items:r,active:e,onSelect:t,label:a,idPrefix:s,controls:o=!1}=n;return nr.html`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${a}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=r.findIndex(b=>b.id===e);if(c===-1)return;let p=l.key==="ArrowRight"?1:-1,d=r[(c+p+r.length)%r.length];if(!d)return;t(d.id);let h=l.currentTarget.getRootNode();requestAnimationFrame(()=>{h.querySelector(`#${s}-tab-${d.id}`)?.focus()})}}">${r.map(l=>nr.html`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${o?`${s}-panel-${l.id}`:nr.nothing}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${o?r.filter(l=>l.id!==e).map(l=>nr.html`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):nr.nothing}`}var Tp=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],xr=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Te.html`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?Te.html`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Te.nothing} ${be(this.effectiveLang(),e.frame,this.translator)}</div>${pt({items:Tp.map(({id:a,source:s})=>({id:a,label:this.t(s)})),active:this.activeTab,onSelect:a=>{this.activeTab=a},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:!0})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return Te.html`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>Te.html`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?Te.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((a,s)=>{let o=t.bindus[s]??0;return Te.html`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${Z(a)??""}</span> ${a}</div></td><td class="${`bindu-cell ${this.sarvaTier(o)}`}">${o}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:Te.html`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Te.html`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:Te.html`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,a=this.data?.reducedSarvashtakavarga;return!t?.length&&!a?Te.html`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Te.html`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.",a)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,a,s){return t.length?Te.html`<div class="overflow-scroll" part="table"><table class="bhinna-table"><caption class="roxy-sr-only">${a}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>Te.html`<th scope="col" title="${o}">${Z(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Te.html`<tr><td>${o.planet}</td>${o.bindus.map(i=>Te.html`<td class="${`bindu-cell ${this.bhinnaTier(i)}`}">${i}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${s?Te.html`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,i)=>Te.html`<td>${s.bindus[i]??0}</td>`)}<td>${s.total}</td></tr></tfoot>`:Te.nothing}</table></div>`:Te.html`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Te.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>Te.html`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Te.html`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};xr.styles=[u,ee,ot,Te.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:center}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td:first-child,th:first-child{text-align:left}.glyph{margin-right:3px;font-size:1.1em;line-height:1}.planet-cell{white-space:nowrap;align-items:center;gap:4px;display:flex}.total-row td{font-weight:var(--roxy-weight-bold,600);border-top:2px solid var(--roxy-border,#e4e4e7);border-bottom:none}.bindu-cell{border-radius:var(--roxy-radius-sm,4px);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;min-width:2rem;color:var(--roxy-fg,currentColor)}.tier-1{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success,#16a34a) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success,#16a34a) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-scale{gap:2px;display:flex}.legend-swatch{border-radius:2px;width:16px;height:10px}.legend-note{flex:12rem}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:5rem}@container (width<=480px){.bhinna-table th,.bhinna-table td{font-size:var(--roxy-text-xs,.75rem);padding:.3rem .35rem}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:3.5rem}.bindu-cell{min-width:1.5rem}}.overflow-scroll{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%)}`],m([(0,tn.state)()],xr.prototype,"activeTab",2),xr=m([(0,tn.customElement)("roxy-ashtakavarga-grid")],xr);var O=require("lit"),ml=require("lit/decorators.js");var cl=require("lit"),ds=cl.css`.roxy-facts{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dt{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem)}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;function Ap(n,r,e){if(n.include?.length){let t={bodies:tt(r,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var pl={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},oa=class extends g{renderData(r){let e="aspects"in r?r.aspects??[]:[],t="patterns"in r?r.patterns??[]:[],a="summary"in r?r.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=he(this.effectiveLang(),"transitDate"in r?r.transitDate:"date"in r?r.date:"","time"in r?r.time:void 0,!0),o="timezone"in r?r.timezone:void 0,i="options"in r?r.options:void 0;return O.html`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2 class="title">${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?O.html`<p class="subtitle">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:O.nothing} ${typeof o=="number"&&Number.isFinite(o)?O.html`<dl class="roxy-facts" part="details"><div><dt>${Pe(this.effectiveLang(),"timezone")}</dt><dd>${f(this.effectiveLang(),o,5)}</dd></div></dl>`:O.nothing}</div>${a?this.renderSummary(a):O.nothing} ${a&&"strongest"in a&&a.strongest?this.renderStrongest(a.strongest):O.nothing} ${e.length>0?O.html`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>O.html`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:O.nothing} ${t.length>0?O.html`<div part="section patterns"><p class="section-label">${this.t("Chart patterns")}</p>${[...t].sort((l,c)=>(pl[l.kind]??9)-(pl[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</div>`:O.nothing} ${i?O.html`<p class="provenance">${Ap(i,this.effectiveLang(),this.translator)}</p>`:O.nothing}</div>`}renderSummary(r){let e="totalAspects"in r?r.totalAspects:r.total,t=Object.entries(r.byType??{}).sort((a,s)=>s[1]-a[1]);return O.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?O.html`<span class="pill pill--muted">${this.t("Total")}: ${e}</span>`:O.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:r.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:r.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:r.neutral})}</span> ${t.map(([a,s])=>O.html`<span class="pill pill--muted">${Ke({type:a})}: ${s}</span>`)}</div>`}renderStrongest(r){let e=R(r.planet1)??"",t=R(r.planet2)??"",a=(r.interpretation??"neutral").toLowerCase();return O.html`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${y(r,"planet1")} <span class="nature-badge ${a}">${y(r,"type",Ke(r))}</span> <span aria-hidden="true" class="glyph">${t}</span>${y(r,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:r.isApplying?this.t("Applying"):this.t("Separating"),orb:f(this.effectiveLang(),r.orb,2),strength:f(this.effectiveLang(),r.strength,0)})}</span></div>`}renderAspect(r,e){let t=R(r.planet1)??"",a=R(r.planet2)??"",s=(r.interpretation??"neutral").toLowerCase(),o=Ke(r),i=r.isApplying?this.t("Applying"):this.t("Separating"),l="meaning"in r?r.meaning:void 0,c="transitInterpretation"in r?r.transitInterpretation:void 0,p="aspectInterpretation"in r?r.aspectInterpretation:void 0,d=!!(l||c||p),h=O.html`<span aria-hidden="true" class="glyph">${t}</span>${y(r,"planet1")} <span class="nature-badge ${s}">${y(r,"type",o)}</span> <span aria-hidden="true" class="glyph">${a}</span>${y(r,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:f(this.effectiveLang(),r.orb,2),strength:f(this.effectiveLang(),r.strength,0)})}</span>`;return!d||this.hideReadings?O.html`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:O.html`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${pe()}</summary><div class="interp-body" part="readings">${l?this.renderMeaning(l):O.nothing} ${c?this.renderTransit(c):O.nothing} ${p?$s(p,this.translator):O.nothing}</div></details>`}renderMeaning(r){return O.html`${r.description?.short?O.html`<p>${r.description.short}</p>`:O.nothing} ${r.description?.long&&r.description.long!==r.description.short?O.html`<p>${r.description.long}</p>`:O.nothing} ${Jr(r.keywords)}`}renderTransit(r){return $s(r,this.translator)}renderPattern(r){let e=r.planets??[],t=r.apex?[...e].sort((a,s)=>+(s===r.apex)-+(a===r.apex)):e;return O.html`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${r.name??r.kind??this.t("Pattern")}</span> ${r.element?O.html`<span class="pattern-tag">${r.element}</span>`:O.nothing} ${r.modality?O.html`<span class="pattern-tag">${r.modality}</span>`:O.nothing} ${r.dissociate?O.html`<span class="pattern-tag" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:O.nothing} ${typeof r.tightness=="number"?O.html`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:_e(this.effectiveLang(),r.tightness,0)})}</span>`:O.nothing}</div>${t.length?O.html`<div class="pattern-planets">${t.map(a=>{let s=R(a),o=!!r.apex&&a===r.apex;return O.html`<span class="${o?"planet-chip apex":"planet-chip"}">${s?O.html`<span aria-hidden="true">${s}</span>`:O.nothing}${a}${o?O.html`<span class="apex-tag">${this.t("apex")}</span>`:O.nothing}</span>`})}</div>`:O.nothing} ${r.interpretation&&!this.hideReadings?O.html`<p class="pattern-interp">${r.interpretation}</p>`:O.nothing}</div>`}};oa.styles=[u,ds,q,me,O.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.summary-pills{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.interp-card summary{flex-wrap:wrap;gap:.5em}.interp-card summary .meta{color:var(--roxy-muted,#71717a);font-weight:400;font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.static-head{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:center;gap:.5em;font-weight:500;display:flex}.glyph{font-size:1.1em;line-height:1}.nature-badge{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.pattern{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem);gap:.35rem;display:grid}.pattern-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold,600)}.pattern-tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:1px 8px}.pattern-planets{flex-wrap:wrap;gap:.25rem;display:flex}.planet-chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.3rem;padding:1px 8px;display:inline-flex}.planet-chip.apex{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 20%, transparent);font-weight:var(--roxy-weight-bold,600)}.planet-chip .apex-tag{text-transform:uppercase;letter-spacing:.04em;font-size:.85em;font-weight:400}.pattern-tight{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.pattern-interp{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.45}.strongest{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4rem;display:flex}.strongest .label{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.strongest .meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.provenance{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}`],oa=m([(0,ml.customElement)("roxy-aspects-table")],oa);var ue=require("lit"),$l=require("lit/decorators.js");var ia=require("lit"),Be=class{constructor(r){this.host=r;this.state="closed";this.zoom=1;r.addController(this)}hostUpdated(){let r=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!r)this.reset();else if(r.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",r.open||r.showModal());let e=r.querySelector(".roxy-chart-scroll");r.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(r){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=r===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=r===0?1:Math.min(3,Math.max(1,this.zoom+r)),this.host.requestUpdate()}renderChartViewport(r,e,t){return ia.html`<div class="roxy-chart-view">${r}<div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>{this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?ia.html`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${r}</div></div>`:ia.nothing}</dialog></div>`}},Ue=ia.css`.roxy-chart-view{min-width:0}.roxy-chart-tools{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);cursor:pointer;min-width:2.5rem;min-height:2.5rem;padding:.35rem .7rem}.roxy-chart-tools button:disabled{opacity:.45;cursor:default}.roxy-chart-tools button:focus-visible,.roxy-chart-scroll:focus-visible{outline:2px solid var(--roxy-ring,#b45309);outline-offset:2px}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg,#fff);width:calc(100vw - 2rem);max-width:72rem;max-height:calc(100dvh - 2rem);padding:var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:#0000008c}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-md,1rem);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(60rem * var(--chart-zoom,1)));padding:var(--roxy-space-sm,.5rem)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function At(n){let r=n%360;return r<0?r+360:r}function Nt(n){let r=At(n),e=Math.floor(r/30)%12,t=r%30,a=Math.floor(t),s=(t-a)*60,o=Math.floor(s),i=Math.round((s-o)*60);return{sign:Oe[e]??"Aries",signIndex:e,degree:a,minute:o,second:i}}function it(n,r){let{sign:e,degree:t,minute:a}=Nt(n);return`${t}° ${r||e} ${String(a).padStart(2,"0")}'`}function jt(n){return Kt(At(n)%30)}function No(n){let r=Math.floor(n);return{degree:r,minute:Math.floor((n-r)*60)}}function Kt(n){let{degree:r,minute:e}=No(n);return`${r}°${String(e).padStart(2,"0")}'`}function ks(n){return At(n+180)}function rn(n,r){let e=At(n),t=At(r)-e;return t<0&&(t+=360),At(e+t/2)}function It(n,r,e){let t=n.filter(c=>Number.isFinite(r(c))).map(c=>{let p=At(r(c));return{item:c,longitude:p,displayLongitude:p}}).sort((c,p)=>c.longitude-p.longitude),a=t.length;if(a<2)return t;let s=0,o=-1;for(let c=0;c<a;c++){let p=t[(c+a-1)%a],h=(t[c].longitude-p.longitude+360)%360;h>o&&(o=h,s=c)}let i=t[s],l=i.longitude;for(let c=1;c<a;c++){let p=t[(s+c)%a],d=typeof e=="function"?e(i.item,p.item):e,h=p.longitude+(s+c>=a?360:0);l=Math.max(h,l+d),p.displayLongitude=At(l),i=p}return t}var Xt=2;function hl(n,r){let e=n*Math.PI/180;return r.width/2*Math.abs(Math.cos(e))+r.height/2*Math.abs(Math.sin(e))}function or(n,r,e,t){let a=n*Math.PI/180,s=(o,i)=>i>1e-9?(o+t)/i:Number.POSITIVE_INFINITY;return Math.min(s((r.width+e.width)/2,Math.abs(Math.cos(a))),s((r.height+e.height)/2,Math.abs(Math.sin(a))))}var zp=(n,r)=>Math.abs(n.x-r.x)<(n.width+r.width)/2&&Math.abs(n.y-r.y)<(n.height+r.height)/2;function gl(n,r){let e=[],t=a=>e.reduce((s,o)=>zp(a,o)?Math.max(s,Math.min((a.width+o.width)/2-Math.abs(a.x-o.x),(a.height+o.height)/2-Math.abs(a.y-o.y))):s,0);return[...n].map((a,s)=>({point:a,index:s})).sort((a,s)=>a.point.displayLongitude-s.point.displayLongitude).reduce((a,{point:s,index:o})=>{let i=r(s,0),l=r(s,1),c=t(i)===0||t(i)<=t(l)?0:1;return e.push(c===0?i:l),a[o]=c,a},[])}function zt(n,r){return r>0?n/r*(180/Math.PI):0}function B(n,r,e,t){let a=t*Math.PI/180;return{x:n+e*Math.cos(a),y:r+e*Math.sin(a)}}var Mp={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},ul=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function la(n,r=0){return Mp[H(n)]??ul[r%ul.length]??"var(--roxy-accent)"}var yl="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var an=360,cs=180,ps=n=>n+180,ms=n=>90-n,Ep=9,fl=23.44,xl=66.56,bl=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,vl=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function Pp(n){let r=[],e=[],t=null;for(let a of n)t!==null&&Math.abs(a.longitude-t)>180&&(e.length&&r.push(e),e=[]),e.push(`${ps(a.longitude)},${ms(a.latitude)}`),t=a.longitude;return e.length&&r.push(e),r.filter(a=>a.length>1).map(a=>a.join(" "))}var Ll={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},da=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}updated(){for(let e of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof e.getBBox!="function")continue;let{x:t,y:a,width:s,height:o}=e.getBBox();e.setAttribute("viewBox",[t-1,a-1,s+2,o+2].join(" "))}}renderData(e){let t=e.lines??[],a=e.birthDetails;return ue.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Astrocartography")}</h2>${a?ue.html`<div class="meta">${he(this.effectiveLang(),a.date,a.time)} · ${vl(Math.round(a.latitude))} ${bl(Math.round(a.longitude))}</div>`:ue.nothing}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,a),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?ue.html`<p class="summary">${e.summary}</p>`:ue.nothing} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return ue.html`<svg viewBox="0 0 ${an} ${cs}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${an}" height="${cs}"/><path class="land" d="${yl}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?ue.svg`<text class="birthplace" x=${ps(t.longitude)} y=${ms(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:ue.nothing}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let o=ps(s),i=s===0;e.push(ue.svg`<line class=${i?"grat-axis":"grat"} x1=${o} y1="0" x2=${o} y2=${cs} />`),e.push(ue.svg`<text class="axis-label" x=${o} y=${cs-2} text-anchor="middle">${bl(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let o=ms(s),i=s===0;t.push(ue.svg`<line class=${i?"grat-axis":"grat"} x1="0" y1=${o} x2=${an} y2=${o} />`),t.push(ue.svg`<text class="axis-label" x="2" y=${o-1}>${vl(s)}</text>`)}let a=[fl,-fl,xl,-xl].map(s=>ue.svg`<line class="grat-ref" x1="0" y1=${ms(s)} x2=${an} y2=${ms(s)} />`);return ue.svg`${e}${t}${a}`}renderBodyLines(e){let t=e.map((p,d)=>({line:p,color:la(p.planet,d),glyph:p.symbol||R(p.planet)||p.planet})),a=p=>p.reduce((d,h)=>Math.abs(h.latitude)<Math.abs(d.latitude)?h:d,p[0]??{latitude:0,longitude:0}),s=p=>new Map(It(t,d=>p(d)+180,Ep).map(({item:d,displayLongitude:h})=>[d,h-180])),o=s(p=>p.line.mc.longitude),i=s(p=>p.line.ic.longitude),l=s(p=>a(p.line.ascendant.points??[]).longitude),c=s(p=>a(p.line.descendant.points??[]).longitude);return t.map(p=>{let{line:d,color:h,glyph:b}=p,L=v=>v.get(p)??0;return ue.svg`${[this.renderMeridian(d.mc.longitude,L(o),h,b,d.planet,"mc",!1),this.renderMeridian(d.ic.longitude,L(i),h,b,d.planet,"ic",!0),this.renderCurve(d.ascendant.points,{longitude:L(l),latitude:a(d.ascendant.points??[]).latitude},h,b,d.planet,"ascendant",!1),this.renderCurve(d.descendant.points,{longitude:L(c),latitude:a(d.descendant.points??[]).latitude},h,b,d.planet,"descendant",!0)]}`})}renderMeridian(e,t,a,s,o,i,l){let c=ps(e),p=i==="ic"?cs-16:9;return ue.svg`<g>
2
+ <line class=${`acg-line${l?" dashed":""}`} stroke=${a} x1=${c} y1="0" x2=${c} y2=${cs}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(Ll[i]??"MC")})}</title></line>
3
3
  <text class="acg-glyph" fill=${a} x=${ps(t)} y=${p} text-anchor="middle" dominant-baseline="central">${s}</text>
4
- </g>`}renderCurve(e,t,a,s,o,i,l){let c=Ep(e??[]);return c.length===0?ue.nothing:ue.svg`<g>
5
- ${c.map(p=>ue.svg`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${a} points=${p}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(vl[i]??"MC")})}</title></polyline>`)}
4
+ </g>`}renderCurve(e,t,a,s,o,i,l){let c=Pp(e??[]);return c.length===0?ue.nothing:ue.svg`<g>
5
+ ${c.map(p=>ue.svg`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${a} points=${p}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(Ll[i]??"MC")})}</title></polyline>`)}
6
6
  <text class="acg-glyph" fill=${a} x=${ps(t.longitude)} y=${ms(t.latitude)} text-anchor="middle" dominant-baseline="central">${s}</text>
7
- </g>`}renderLegend(e){return e.length===0?ue.nothing:ue.html`<div class="legend" part="legend">${e.map((t,a)=>{let s=la(t.planet,a);return ue.html`<span class="legend-item"><span class="legend-swatch" style="${`border-top-color: ${s}`}"></span> ${t.symbol?ue.html`${t.symbol}`:ue.nothing}${t.planet}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?ue.nothing:ue.html`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,a)=>{let s=la(t.planet,a),o=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return ue.html`<details class="interp-card" part="reading" name="acg-lines" ?open="${a===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${t.symbol?ue.html`${t.symbol}`:ue.nothing}${t.planet} </span>${pe()}</summary><div class="interp-body">${o.filter(([,i])=>i).map(([i,l])=>ue.html`<p class="interp-line"><span class="code">${i}</span>${l}</p>`)}</div></details>`})}</section>`}};da.styles=[u,Ue,q,me,ue.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{border-radius:var(--roxy-radius-sm,4px);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border,#e4e4e7) 12%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:.8px}.land{fill:var(--roxy-secondary,#475569);opacity:.13}.grat{stroke:var(--roxy-border,#e4e4e7);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted,#71717a);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary,#475569);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted,#71717a);font-size:5px;font-family:var(--roxy-font-sans)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:8px;font-family:var(--roxy-font-sans);font-weight:600}.birthplace{fill:var(--roxy-fg,#0a0a0a);font-size:9px}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:.3rem;display:inline-flex}.legend-swatch{border-top-style:solid;border-top-width:2px;width:14px;height:0}.legend-note{width:100%;color:var(--roxy-muted,#71717a)}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.interp-dot{border-radius:50%;flex-shrink:0;align-self:center;width:10px;height:10px}.interp-line{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.interp-line .code{color:var(--roxy-accent-ink,#b45309);margin-right:.4rem;font-weight:600}`],da=m([(0,Ll.customElement)("roxy-astrocartography-map")],da);var ie=require("lit"),Sl=require("lit/decorators.js");var Pp={year:"Year",month:"Month",day:"Day",hour:"Hour"},$l={harmonious:"Harmonious",challenging:"Challenging"},wl={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},kl={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},ca=class extends g{renderData(r){let e=this.effectiveLang(),t=he(e,r.birthData?.date,r.birthData?.time);return ie.html`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?ie.html`<span class="born">${t}</span>`:ie.nothing} ${r.zodiacAnimal?ie.html`<span class="animal">${y(r,"zodiacAnimal")}</span>`:ie.nothing}</header><div class="pillars-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(r.pillars??[]).map(a=>this.renderPillar(a))}</div></div>${this.renderDayMaster(r)} ${this.renderElements(r)} ${this.renderInteractions(r)} ${r.summary&&!this.hideReadings?ie.html`<p class="summary" part="section summary">${r.summary}</p>`:ie.nothing} ${fr(r.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(r){let e=Pp[r.position],t=r.position==="day";return ie.html`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos">${e?this.t(e):D(r.position)}</span> <span class="god">${y(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} ${y(r.stem,"element")}</span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${y(r.branch,"animal")}</span> ${r.hiddenStems?.length?ie.html`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${r.hiddenStems.map(a=>ie.html`<li><span lang="zh">${a.stem?.chinese??""}</span> <span class="role">${a.role}</span> ${y(a.tenGod,"name")}</li>`)}</ul>`:ie.nothing} ${r.naYin?ie.html`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${r.naYin}</span>`:ie.nothing}</div>`}renderDayMaster(r){let e=r.dayMaster;return e?ie.html`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b>${y(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?ie.html`<p part="reading">${e.nature}</p>`:ie.nothing}</div></section>`:ie.nothing}renderElements(r){let e=r.fiveElements??[];if(e.length===0)return ie.nothing;let t=this.effectiveLang(),a=e.reduce((s,o)=>s+(o.count??0),0)||1;return ie.html`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>ie.html`<div class="element" part="label-track"><span>${y(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/a*100}%"></span></span> <span class="element-count">${j(t,s.count??0)} ${s.level&&kl[s.level]?this.t(kl[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?ie.html`<p class="element-reading" part="reading">${s.reading}</p>`:ie.nothing}</div>`)}</div></section>`}renderInteractions(r){let e=r.interactions??[];return e.length===0?ie.nothing:ie.html`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>ie.html`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&wl[t.type]?this.t(wl[t.type]):D(t.type??"")}</b> ${t.quality?ie.html`<span class="tag tag-${t.quality}">${t.quality&&$l[t.quality]?this.t($l[t.quality]):t.quality}</span>`:ie.nothing} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?ie.html`<span>${t.transformsTo}</span>`:ie.nothing} ${t.variety?ie.html`<span>${t.variety}</span>`:ie.nothing} ${t.type==="punishment"&&typeof t.complete=="boolean"?ie.html`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ie.nothing}</div>${t.meaning&&!this.hideReadings?ie.html`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ie.nothing}</li>`)}</ul></section>`}};ca.styles=[u,ee,ie.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.born{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.animal{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-left:auto;padding:2px 10px}.pillars-wrap{overflow-x:auto}.pillars{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(4,minmax(6.5rem,1fr));min-width:27rem;display:grid}.pillar{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;align-content:start;gap:.35rem;display:grid}.pillar-self{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 7%, transparent)}.pos{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.god{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);min-height:1.2em}.hanzi{color:var(--roxy-fg,#0a0a0a);font-size:2rem;line-height:1.15}.hanzi-branch{color:var(--roxy-accent-ink,#b45309)}.romanised{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.rule{border:0;border-top:1px solid var(--roxy-border,#e4e4e7);width:100%;margin:.15rem 0}.hidden{text-align:start;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);gap:.15rem;margin:0;padding:0;list-style:none;display:grid}.hidden .role{color:var(--roxy-muted,#71717a)}.nayin{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:start}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.master{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.master .hanzi{font-size:1.5rem}.master b{font-weight:var(--roxy-weight-bold,600)}.master p{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);flex-basis:100%;margin:0}.elements{gap:.35rem;display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:.15rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);display:grid}.element-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:6px;overflow:hidden}.element-fill{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.element-count{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.element-reading{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);grid-column:1/-1;margin:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem;display:grid}.interaction:first-child{border-top:0;padding-top:0}.interaction-line{align-items:baseline;gap:.35rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px}.tag-harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.tag-challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.interaction-meaning{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);margin:0}.summary{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}`],ca=m([(0,Sl.customElement)("roxy-bazi-chart")],ca);var ft=require("lit"),Rl=require("lit/decorators.js");function Jt(n,r){return!r||!n?.length?"":n.map(e=>r[String(e)]?.[0]).filter(Boolean).join(", ")}function Io(n,r){return!r||typeof n!="number"?"":(r[String(n)]??[]).join(", ")}var pa=class extends g{renderData(r){let e=r.grahas??[],t=r.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let a=e.filter(o=>o.moved),s=r.movedCount??a.length;return ft.html`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header>${a.length?ft.html`<div class="moved-list" part="table moved">${a.map(o=>this.renderMoved(o,r.houseThemes))}</div>`:ft.nothing} ${t.length?ft.html`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(o=>this.renderBhavaRow(o))}</tbody></table></div></details>`:ft.nothing}</div>`}renderMoved(r,e){let t=R(r.graha)??"",a=typeof r.bhava=="number"?Jt([r.bhava],e):"";return ft.html`<div class="moved-row"><span class="graha">${t?ft.html`<span class="glyph">${t}</span>`:ft.nothing}${r.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:r.rashiHouse??"",to:r.bhava??""})} </span>${a?ft.html`<span class="themes">${a}</span>`:ft.nothing}</div>`}renderBhavaRow(r){let e=(r.grahas??[]).join(", ");return ft.html`<tr><td class="num">${r.house}</td><td>${r.rashi}</td><td class="num">${f(this.effectiveLang(),r.start,2)}°</td><td class="num">${f(this.effectiveLang(),r.madhya,2)}°</td><td class="num">${f(this.effectiveLang(),r.end,2)}°</td><td class="num">${f(this.effectiveLang(),r.span,2)}°</td><td class="occupants">${e}</td></tr>`}};pa.styles=[u,ee,ft.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.lede{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.moved-list{gap:var(--roxy-space-xs,.25rem);display:grid}.moved-row{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);padding:var(--roxy-space-sm,.5rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 8%, transparent);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.shift{font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a)}.themes{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary,#475569)}summary{cursor:pointer;color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:500}`],pa=m([(0,Rl.customElement)("roxy-bhav-chalit-table")],pa);var xt=require("lit"),Dl=require("lit/decorators.js");var Cl=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent, #f59e0b)"},{key:"digBala",source:"Dig",color:"var(--roxy-info, #0284c7)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success, #16a34a)"}],ma=class extends g{renderData(r){let e=r.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(a=>a.totalVirupas??0),1);return xt.html`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${r.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:r.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(a=>this.renderBhava(a,t,r.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${Cl.map(a=>xt.html`<div class="legend-row"><span class="swatch" style="background:${a.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(a.source)})}</div>`)}</div></div>`}renderBhava(r,e,t){let a=typeof r.house=="number"?Jt([r.house],t):"";return xt.html`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:r.house})}</span> <span class="rashi">${r.rashi}</span> ${r.lord?xt.html`<span class="lord">${this.t("lord {{graha}}",{graha:r.lord})}</span>`:xt.nothing} <span class="total">${this.t("{{value}} rupas",{value:f(this.effectiveLang(),r.totalRupas,2)})} ${typeof r.rank=="number"?xt.html`<span class="rank">#${r.rank}</span>`:xt.nothing}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:f(this.effectiveLang(),r.totalVirupas,1)})}">${Cl.map(s=>{let o=Math.max(0,r[s.key]??0);return o>0?xt.html`<span class="seg" style="width:${o/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:f(this.effectiveLang(),o,1)})}"></span>`:xt.nothing})}</div>${a?xt.html`<p class="themes">${a}</p>`:xt.nothing}</article>`}};ma.styles=[u,ee,xt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.rows{gap:var(--roxy-space-sm,.5rem);display:grid}.row{grid-template-columns:minmax(0,1fr);gap:2px;display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.house{font-weight:var(--roxy-weight-bold,600);min-width:4.5rem}.rashi{color:var(--roxy-secondary,#475569)}.lord{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);margin-left:auto}.rank{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);font-variant-numeric:tabular-nums;padding:.05rem .4rem}.bar{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);height:10px;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:4px;display:flex}.swatch{border-radius:2px;width:14px;height:9px}`],ma=m([(0,Dl.customElement)("roxy-bhava-bala-table")],ma);var W=require("lit"),on=require("lit/decorators.js");var Ss=["physical","emotional","intellectual","intuitive"],sn={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function br(n,r){let e=sn[n];return e?r(e):D(n)}var nn={physical:"#dc2626",emotional:"#0284c7",intellectual:"#16a34a",intuitive:"#a855f7",aesthetic:"#f59e0b",awareness:"#ec4899",spiritual:"#14b8a6",passion:"#ef4444",mastery:"#6366f1",wisdom:"#475569"},_p={ascending:"ascending through zero",descending:"descending through zero"},Np={double:"Double day",triple:"Triple day"},vr=class extends g{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},a=Object.entries(t).map(([o,i])=>{let l=typeof i=="number"?i:0,c=Math.abs(l)>1?l/100:l;return[o,c]}),s=e.spotlight;return W.html`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2 class="title">${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?W.html`<span class="phase">${D(e.overallPhase)}</span>`:W.nothing} ${typeof e.energyRating=="number"?W.html`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:W.nothing}</div></header>${s?W.html`<div class="spotlight" part="details spotlight" style="${`border-left-color: ${nn[s.cycle]??"var(--roxy-accent, #f59e0b)"}`}"><p class="label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${br(s.cycle,o=>this.t(o))}</strong> ${typeof s.value=="number"?W.html`<span class="energy">${_e(this.effectiveLang(),s.value,0)}</span>`:W.nothing} ${s.phase?W.html`<span class="phase">${D(s.phase)}</span>`:W.nothing}</div>${s.message&&!this.hideReadings?W.html`<p>${s.message}</p>`:W.nothing}</div>`:W.nothing}<div class="bars" part="chart bars" role="list">${a.map(([o,i])=>{let l=Math.abs(i)*50,c=nn[o]??"var(--roxy-accent, #f59e0b)";return W.html`<div class="bar" role="listitem"><span>${br(o,p=>this.t(p))}</span> <span class="track"><span class="fill ${i<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${_e(this.effectiveLang(),i*100,0)}</span></div>`})}</div>${this.hideReadings?W.nothing:W.html`${e.dailyMessage?W.html`<p class="advice">${e.dailyMessage}</p>`:W.nothing} ${e.advice?W.html`<p class="advice">${e.advice}</p>`:W.nothing}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return W.html`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let a=600,s=160,o=a/Math.max(t.length-1,1),i=e.summary;return W.html`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2 class="title">${this.t("Forecast")}</h2><span class="energy">${_t(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${a} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${a}" y2="${s/2}" stroke="var(--roxy-border, #e4e4e7)" stroke-width="1"/>${Ss.map(l=>{let c=t.map((d,h)=>{let b=d[l]??0,L=h*o,v=s/2-b/100*(s/2-8);return`${L.toFixed(2)},${v.toFixed(2)}`}).join(" "),p=nn[l]??"#475569";return W.svg`<polyline points=${c} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?W.svg`<circle cx=${(c*o).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger, #dc2626)"><title>${[A(this.effectiveLang(),l.date),tt(this.effectiveLang(),(l.criticalCycles??[]).map(p=>br(p,d=>this.t(d)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" · ")}</title></circle>`:W.nothing)}</svg><div class="forecast-axis" part="legend"><span>${A(this.effectiveLang(),t[0]?.date)}</span><span>${A(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${Ss.map(l=>W.html`<span class="key"><span class="dot" style="${`background: ${nn[l]}`}"></span>${this.t(sn[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${i?W.html`<dl class="stats" part="details">${this.stat(this.t("Best day"),A(this.effectiveLang(),i.bestDay))} ${this.stat(this.t("Worst day"),A(this.effectiveLang(),i.worstDay))} ${this.stat(this.t("Average energy"),typeof i.averageEnergy=="number"?`${i.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof i.criticalDayCount=="number"?`${i.criticalDayCount}`:"")}</dl>`:W.nothing} ${this.renderForecastData(e)} ${i?.periodAdvice&&!this.hideReadings?W.html`<p class="advice">${i.periodAdvice}</p>`:W.nothing}</section>`}renderForecastData(e){let t=this.effectiveLang();return W.html`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${pe()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${Ss.map(a=>W.html`<th scope="col">${this.t(sn[a])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(a=>W.html`<tr><th scope="row"><time datetime="${a.date}">${A(t,a.date)}</time></th>${Ss.map(s=>W.html`<td>${_e(t,a[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:a.energyRating})}</td><td>${f(t,a.daysSinceBirth,0)}</td><td>${a.isCritical?tt(t,a.criticalCycles.map(s=>br(s,o=>this.t(o))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],a=e.doubleCriticalDays??[],s=t.map(o=>({label:A(this.effectiveLang(),o.date)||o.date,aside:[o.cycle?br(o.cycle,i=>this.t(i)):"",this.severityName(o.severity)].filter(Boolean).join(" · "),body:o.advisory??"",extra:W.html`<p class="crit-meta">${[o.direction?this.t(_p[o.direction]):"",typeof o.period=="number"?this.t("{{period}}-day cycle",{period:o.period}):""].filter(Boolean).join(" · ")}</p>`}));return W.html`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2 class="title">${this.t("Critical days")}</h2><span class="energy">${_t(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="stats" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),a.length?`${a.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?A(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${a.length>0?W.html`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:tt(this.effectiveLang(),a.map(o=>A(this.effectiveLang(),o)||o))})}</p>`:W.nothing} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=Np[e];return t?this.t(t):""}stat(e,t){return t?W.html`<div class="stat"><dt>${e}</dt><dd>${t}</dd></div>`:W.nothing}};vr.styles=[u,q,me,W.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.head-meta{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.energy{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.phase{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:2px 10px}.spotlight{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 22%, transparent);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;display:grid}.spotlight .label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.bars{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:8rem 1fr 3.5rem;align-items:center;display:grid}.track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface,#fff);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{font-variant-numeric:tabular-nums;text-align:right;color:var(--roxy-muted,#71717a)}.advice{color:var(--roxy-fg,#0a0a0a);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,600px);height:auto;display:block}.legend{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;display:flex}.key{text-transform:capitalize;align-items:center;gap:.35rem;display:inline-flex}.dot{border-radius:var(--roxy-radius-full,9999px);width:.6rem;height:.6rem}.dot.critical{background:var(--roxy-danger,#dc2626)}.stats{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));margin:0;display:grid}.stat{gap:2px;display:grid}.stat dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.stat dd{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;margin:0}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}.forecast-scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.forecast-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.forecast-table th,.forecast-table td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:right;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:left}.forecast-axis{width:100%;max-width:var(--roxy-chart-max-width,600px);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);display:flex}.crit-note{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);border-radius:var(--roxy-radius-sm,4px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin:0}.crit-meta{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}`],m([(0,on.property)({type:String,reflect:!0})],vr.prototype,"mode",2),vr=m([(0,on.customElement)("roxy-biorhythm-chart")],vr);var C=require("lit"),fn=require("lit/decorators.js");var mt=require("lit"),_l=14,Ip=86,Nl=0,Gp=102,ir=6,Il=(Ip-_l)*ir,Op=(Gp-Nl)*ir;function ga(n,r){return{x:(n-_l)*ir,y:(r-Nl)*ir}}var F=50,cn=n=>2*F-n,Rs=1.02*ir,Gl=1.35*ir,jo=1.15*ir,Ze=2.87,wt=4.4,Tl=5.65,Go={head:{64:[F-Ze,11.2],61:[F,11.2],63:[F+Ze,11.2]},ajna:{47:[F-Ze,18],24:[F,18],4:[F+Ze,18],17:[F-Ze,20.6],11:[F+Ze,20.6],43:[F,25.3]},throat:{62:[F-Ze,32.4],23:[F,32.4],56:[F+Ze,32.4],16:[F-wt,34.7],35:[F+wt,34.7],20:[F-wt,37.3],12:[F+wt,37.3],45:[F+wt,39.6],31:[F-Ze,41.9],8:[F,41.9],33:[F+Ze,41.9]},g:{1:[F,47.7],7:[F-Ze,50.3],13:[F+Ze,50.3],10:[F-Tl,53.4],25:[F+Tl,53.4],15:[F-Ze,56.8],46:[F+Ze,56.8],2:[F,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[F-Ze,72.7],14:[F,72.7],29:[F+Ze,72.7],34:[F-wt,75.4],27:[F-wt,79],59:[F+wt,79],42:[F-Ze,81.7],3:[F,81.7],9:[F+Ze,81.7]},"solar-plexus":{},root:{53:[F-Ze,90.2],60:[F,90.2],52:[F+Ze,90.2],54:[F-wt,92.6],19:[F+wt,92.6],38:[F-wt,95.3],39:[F+wt,95.3],58:[F-wt,98.1],41:[F+wt,98.1]}},Bp={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function Fp(){let n={},r={};for(let[e,[t,a]]of Object.entries(Go.spleen))Go["solar-plexus"][Bp[Number(e)]]=[cn(t),a];for(let[e,t]of Object.entries(Go))for(let[a,[s,o]]of Object.entries(t))n[Number(a)]=ga(s,o),r[Number(a)]=e;return{points:n,centerOf:r}}var{points:Ho,centerOf:Cs}=Fp(),zf=Il/2;function ha(n){return n.map(([r,e])=>ga(r,e))}function Oo(n,r,e){return ha([[F-n,r],[F+n,r],[F+n,e],[F-n,e]])}var Bo=5.9,Al=[[18.3,68.3],[18.3,82],[30.3,75.15]],Fo=[20,84.4],zl=12*ir,Hp=[63.2,67.9],jp=13.1*ir,Ko=[{id:"head",label:"Head",color:"gold",points:ha([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:ha([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Oo(Bo,31,43.3)},{id:"g",label:"G",color:"gold",points:ha([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:ha([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:ga(...Hp),room:jp}},{id:"spleen",label:"Spleen",color:"brown",points:ha(Al),caption:{at:ga(...Fo),room:zl}},{id:"sacral",label:"Sacral",color:"red",points:Oo(Bo,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:ha(Al.map(([n,r])=>[cn(n),r])),caption:{at:ga(cn(Fo[0]),Fo[1]),room:zl}},{id:"root",label:"Root",color:"brown",points:Oo(Bo,88.5,99.8)}],Kp=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],Vp=qp();function qp(){let n=cn,r=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${ln(r[0])}`];for(let t=1;t+2<r.length;t+=3)e.push(`C ${ln(r[t])} ${ln(r[t+1])} ${ln(r[t+2])}`);e.push(`L ${dn(r[r.length-1],n)}`);for(let t=r.length-3;t>=1;t-=3)e.push(`C ${dn(r[t+1],n)} ${dn(r[t],n)} ${dn(r[t-1],n)}`);return e.push("Z"),e.join(" ")}function ln([n,r]){let e=ga(n,r);return`${e.x} ${e.y}`}function dn([n,r],e){let t=ga(e(n),r);return`${t.x} ${t.y}`}function Yp(n){return n.map(r=>`${r.x},${r.y}`).join(" ")}function Ol(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function Up(){return mt.svg`<path class="bg-body" d=${Vp} />`}function Zp(n){let r=[];for(let[e,t]of Kp){let a=Ho[e],s=Ho[t];if(!a||!s)continue;r.push(mt.svg`<line class="bg-channel" x1=${a.x} y1=${a.y} x2=${s.x} y2=${s.y} />`);let o={x:(a.x+s.x)/2,y:(a.y+s.y)/2};for(let[i,l]of[[e,a],[t,s]]){let c=n.get(i);if(!c)continue;let p=Ol(c);r.push(mt.svg`<line class="bg-half ${p==="both"?"src-left":p}" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`),p==="both"&&r.push(mt.svg`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`)}}return r}function Wp(n,r,e){return Ko.flatMap(t=>{let a=n.has(t.id),s=`bg-center bg-${t.color}${a?" defined":""}`,o=r?.get(t.id)||t.label;return[mt.svg`<polygon class=${s} points=${Yp(t.points)}><title>${o}: ${a?e.defined:e.open}</title></polygon>`,t.caption?Ml(o,t.caption.at,"bg-caption",t.caption.room):Ml(o,El(t.points),a?`defined bg-${t.color}`:"",Jp(t.points,El(t.points).y)*.86)]})}function Ml(n,r,e,t){let a=n.split(/\s+/).filter(Boolean),s=a.reduce((c,p)=>Math.max(c,p.length),0),o=Math.min(jo,t/Math.max(1,s*Xp)),i=o*1.05,l=r.y-i*(a.length-1)/2;return mt.svg`<text class="bg-center-name ${e}" style=${`font-size:${o}px`} x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${a.map((c,p)=>mt.svg`<tspan x=${r.x} y=${l+p*i}>${c}</tspan>`)}</text>`}var Xp=.66;function Jp(n,r){let e=[];for(let t=0;t<n.length;t++){let a=n[t],s=n[(t+1)%n.length];if(a.y===s.y)continue;let o=Math.min(a.y,s.y),i=Math.max(a.y,s.y);r<o||r>i||e.push(a.x+(r-a.y)/(s.y-a.y)*(s.x-a.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function El(n){let r=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/r,y:n.reduce((e,t)=>e+t.y,0)/r}}function Pl(n,r){return`M ${n.x} ${n.y-Rs} A ${Rs} ${Rs} 0 0 ${r} ${n.x} ${n.y+Rs} Z`}function Qp(n,r){let e=[];for(let[t,a]of Object.entries(Ho)){let s=Number(t),o=n.get(s),i=o?Ol(o):"",l=r.get(s);e.push(mt.svg`<g class="bg-gate-node">
8
- ${i==="both"?[mt.svg`<path class="bg-gate-dot on src-left" d=${Pl(a,0)} />`,mt.svg`<path class="bg-gate-dot on src-right" d=${Pl(a,1)} />`]:mt.svg`<circle class="bg-gate-dot ${i&&`on ${i}`}" cx=${a.x} cy=${a.y} r=${Rs} />`}
7
+ </g>`}renderLegend(e){return e.length===0?ue.nothing:ue.html`<div class="legend" part="legend">${e.map((t,a)=>{let s=la(t.planet,a);return ue.html`<span class="legend-item"><span class="legend-swatch" style="${`border-top-color: ${s}`}"></span> ${t.symbol?ue.html`${t.symbol}`:ue.nothing}${t.planet}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?ue.nothing:ue.html`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,a)=>{let s=la(t.planet,a),o=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return ue.html`<details class="interp-card" part="reading" name="acg-lines" ?open="${a===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${t.symbol?ue.html`${t.symbol}`:ue.nothing}${t.planet} </span>${pe()}</summary><div class="interp-body">${o.filter(([,i])=>i).map(([i,l])=>ue.html`<p class="interp-line"><span class="code">${i}</span>${l}</p>`)}</div></details>`})}</section>`}};da.styles=[u,Ue,q,me,ue.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{border-radius:var(--roxy-radius-sm,4px);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border,#e4e4e7) 12%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:.8px}.land{fill:var(--roxy-secondary,#475569);opacity:.13}.grat{stroke:var(--roxy-border,#e4e4e7);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted,#71717a);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary,#475569);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted,#71717a);font-size:5px;font-family:var(--roxy-font-sans)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:8px;font-family:var(--roxy-font-sans);font-weight:600}.birthplace{fill:var(--roxy-fg,#0a0a0a);font-size:9px}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:.3rem;display:inline-flex}.legend-swatch{border-top-style:solid;border-top-width:2px;width:14px;height:0}.legend-note{width:100%;color:var(--roxy-muted,#71717a)}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.interp-dot{border-radius:50%;flex-shrink:0;align-self:center;width:10px;height:10px}.interp-line{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.interp-line .code{color:var(--roxy-accent-ink,#b45309);margin-right:.4rem;font-weight:600}`],da=m([(0,$l.customElement)("roxy-astrocartography-map")],da);var ie=require("lit"),Rl=require("lit/decorators.js");var _p={year:"Year",month:"Month",day:"Day",hour:"Hour"},wl={harmonious:"Harmonious",challenging:"Challenging"},kl={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},Sl={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},ca=class extends g{renderData(r){let e=this.effectiveLang(),t=he(e,r.birthData?.date,r.birthData?.time);return ie.html`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?ie.html`<span class="born">${t}</span>`:ie.nothing} ${r.zodiacAnimal?ie.html`<span class="animal">${y(r,"zodiacAnimal")}</span>`:ie.nothing}</header><div class="pillars-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(r.pillars??[]).map(a=>this.renderPillar(a))}</div></div>${this.renderDayMaster(r)} ${this.renderElements(r)} ${this.renderInteractions(r)} ${r.summary&&!this.hideReadings?ie.html`<p class="summary" part="section summary">${r.summary}</p>`:ie.nothing} ${fr(r.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(r){let e=_p[r.position],t=r.position==="day";return ie.html`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos">${e?this.t(e):D(r.position)}</span> <span class="god">${y(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} ${y(r.stem,"element")}</span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${y(r.branch,"animal")}</span> ${r.hiddenStems?.length?ie.html`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${r.hiddenStems.map(a=>ie.html`<li><span lang="zh">${a.stem?.chinese??""}</span> <span class="role">${a.role}</span> ${y(a.tenGod,"name")}</li>`)}</ul>`:ie.nothing} ${r.naYin?ie.html`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${r.naYin}</span>`:ie.nothing}</div>`}renderDayMaster(r){let e=r.dayMaster;return e?ie.html`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b>${y(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?ie.html`<p part="reading">${e.nature}</p>`:ie.nothing}</div></section>`:ie.nothing}renderElements(r){let e=r.fiveElements??[];if(e.length===0)return ie.nothing;let t=this.effectiveLang(),a=e.reduce((s,o)=>s+(o.count??0),0)||1;return ie.html`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>ie.html`<div class="element" part="label-track"><span>${y(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/a*100}%"></span></span> <span class="element-count">${j(t,s.count??0)} ${s.level&&Sl[s.level]?this.t(Sl[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?ie.html`<p class="element-reading" part="reading">${s.reading}</p>`:ie.nothing}</div>`)}</div></section>`}renderInteractions(r){let e=r.interactions??[];return e.length===0?ie.nothing:ie.html`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>ie.html`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&kl[t.type]?this.t(kl[t.type]):D(t.type??"")}</b> ${t.quality?ie.html`<span class="tag tag-${t.quality}">${t.quality&&wl[t.quality]?this.t(wl[t.quality]):t.quality}</span>`:ie.nothing} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?ie.html`<span>${t.transformsTo}</span>`:ie.nothing} ${t.variety?ie.html`<span>${t.variety}</span>`:ie.nothing} ${t.type==="punishment"&&typeof t.complete=="boolean"?ie.html`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ie.nothing}</div>${t.meaning&&!this.hideReadings?ie.html`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ie.nothing}</li>`)}</ul></section>`}};ca.styles=[u,ee,ie.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.born{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.animal{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-left:auto;padding:2px 10px}.pillars-wrap{overflow-x:auto}.pillars{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(4,minmax(6.5rem,1fr));min-width:27rem;display:grid}.pillar{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;align-content:start;gap:.35rem;display:grid}.pillar-self{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 7%, transparent)}.pos{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.god{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);min-height:1.2em}.hanzi{color:var(--roxy-fg,#0a0a0a);font-size:2rem;line-height:1.15}.hanzi-branch{color:var(--roxy-accent-ink,#b45309)}.romanised{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.rule{border:0;border-top:1px solid var(--roxy-border,#e4e4e7);width:100%;margin:.15rem 0}.hidden{text-align:start;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);gap:.15rem;margin:0;padding:0;list-style:none;display:grid}.hidden .role{color:var(--roxy-muted,#71717a)}.nayin{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:start}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.master{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.master .hanzi{font-size:1.5rem}.master b{font-weight:var(--roxy-weight-bold,600)}.master p{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);flex-basis:100%;margin:0}.elements{gap:.35rem;display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:.15rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);display:grid}.element-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:6px;overflow:hidden}.element-fill{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.element-count{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.element-reading{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);grid-column:1/-1;margin:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem;display:grid}.interaction:first-child{border-top:0;padding-top:0}.interaction-line{align-items:baseline;gap:.35rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px}.tag-harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.tag-challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.interaction-meaning{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);margin:0}.summary{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}`],ca=m([(0,Rl.customElement)("roxy-bazi-chart")],ca);var ft=require("lit"),Cl=require("lit/decorators.js");function Jt(n,r){return!r||!n?.length?"":n.map(e=>r[String(e)]?.[0]).filter(Boolean).join(", ")}function Io(n,r){return!r||typeof n!="number"?"":(r[String(n)]??[]).join(", ")}var pa=class extends g{renderData(r){let e=r.grahas??[],t=r.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let a=e.filter(o=>o.moved),s=r.movedCount??a.length;return ft.html`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header>${a.length?ft.html`<div class="moved-list" part="table moved">${a.map(o=>this.renderMoved(o,r.houseThemes))}</div>`:ft.nothing} ${t.length?ft.html`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(o=>this.renderBhavaRow(o))}</tbody></table></div></details>`:ft.nothing}</div>`}renderMoved(r,e){let t=R(r.graha)??"",a=typeof r.bhava=="number"?Jt([r.bhava],e):"";return ft.html`<div class="moved-row"><span class="graha">${t?ft.html`<span class="glyph">${t}</span>`:ft.nothing}${r.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:r.rashiHouse??"",to:r.bhava??""})} </span>${a?ft.html`<span class="themes">${a}</span>`:ft.nothing}</div>`}renderBhavaRow(r){let e=(r.grahas??[]).join(", ");return ft.html`<tr><td class="num">${r.house}</td><td>${r.rashi}</td><td class="num">${f(this.effectiveLang(),r.start,2)}°</td><td class="num">${f(this.effectiveLang(),r.madhya,2)}°</td><td class="num">${f(this.effectiveLang(),r.end,2)}°</td><td class="num">${f(this.effectiveLang(),r.span,2)}°</td><td class="occupants">${e}</td></tr>`}};pa.styles=[u,ee,ft.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.lede{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.moved-list{gap:var(--roxy-space-xs,.25rem);display:grid}.moved-row{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);padding:var(--roxy-space-sm,.5rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 8%, transparent);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.shift{font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a)}.themes{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary,#475569)}summary{cursor:pointer;color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:500}`],pa=m([(0,Cl.customElement)("roxy-bhav-chalit-table")],pa);var xt=require("lit"),Tl=require("lit/decorators.js");var Dl=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent, #f59e0b)"},{key:"digBala",source:"Dig",color:"var(--roxy-info, #0284c7)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success, #16a34a)"}],ma=class extends g{renderData(r){let e=r.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(a=>a.totalVirupas??0),1);return xt.html`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${r.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:r.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(a=>this.renderBhava(a,t,r.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${Dl.map(a=>xt.html`<div class="legend-row"><span class="swatch" style="background:${a.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(a.source)})}</div>`)}</div></div>`}renderBhava(r,e,t){let a=typeof r.house=="number"?Jt([r.house],t):"";return xt.html`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:r.house})}</span> <span class="rashi">${r.rashi}</span> ${r.lord?xt.html`<span class="lord">${this.t("lord {{graha}}",{graha:r.lord})}</span>`:xt.nothing} <span class="total">${this.t("{{value}} rupas",{value:f(this.effectiveLang(),r.totalRupas,2)})} ${typeof r.rank=="number"?xt.html`<span class="rank">#${r.rank}</span>`:xt.nothing}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:f(this.effectiveLang(),r.totalVirupas,1)})}">${Dl.map(s=>{let o=Math.max(0,r[s.key]??0);return o>0?xt.html`<span class="seg" style="width:${o/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:f(this.effectiveLang(),o,1)})}"></span>`:xt.nothing})}</div>${a?xt.html`<p class="themes">${a}</p>`:xt.nothing}</article>`}};ma.styles=[u,ee,xt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.rows{gap:var(--roxy-space-sm,.5rem);display:grid}.row{grid-template-columns:minmax(0,1fr);gap:2px;display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.house{font-weight:var(--roxy-weight-bold,600);min-width:4.5rem}.rashi{color:var(--roxy-secondary,#475569)}.lord{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);margin-left:auto}.rank{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);font-variant-numeric:tabular-nums;padding:.05rem .4rem}.bar{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);height:10px;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:4px;display:flex}.swatch{border-radius:2px;width:14px;height:9px}`],ma=m([(0,Tl.customElement)("roxy-bhava-bala-table")],ma);var W=require("lit"),on=require("lit/decorators.js");var Ss=["physical","emotional","intellectual","intuitive"],sn={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function br(n,r){let e=sn[n];return e?r(e):D(n)}var nn={physical:"#dc2626",emotional:"#0284c7",intellectual:"#16a34a",intuitive:"#a855f7",aesthetic:"#f59e0b",awareness:"#ec4899",spiritual:"#14b8a6",passion:"#ef4444",mastery:"#6366f1",wisdom:"#475569"},Np={ascending:"ascending through zero",descending:"descending through zero"},Ip={double:"Double day",triple:"Triple day"},vr=class extends g{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},a=Object.entries(t).map(([o,i])=>{let l=typeof i=="number"?i:0,c=Math.abs(l)>1?l/100:l;return[o,c]}),s=e.spotlight;return W.html`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2 class="title">${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?W.html`<span class="phase">${D(e.overallPhase)}</span>`:W.nothing} ${typeof e.energyRating=="number"?W.html`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:W.nothing}</div></header>${s?W.html`<div class="spotlight" part="details spotlight" style="${`border-left-color: ${nn[s.cycle]??"var(--roxy-accent, #f59e0b)"}`}"><p class="label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${br(s.cycle,o=>this.t(o))}</strong> ${typeof s.value=="number"?W.html`<span class="energy">${_e(this.effectiveLang(),s.value,0)}</span>`:W.nothing} ${s.phase?W.html`<span class="phase">${D(s.phase)}</span>`:W.nothing}</div>${s.message&&!this.hideReadings?W.html`<p>${s.message}</p>`:W.nothing}</div>`:W.nothing}<div class="bars" part="chart bars" role="list">${a.map(([o,i])=>{let l=Math.abs(i)*50,c=nn[o]??"var(--roxy-accent, #f59e0b)";return W.html`<div class="bar" role="listitem"><span>${br(o,p=>this.t(p))}</span> <span class="track"><span class="fill ${i<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${_e(this.effectiveLang(),i*100,0)}</span></div>`})}</div>${this.hideReadings?W.nothing:W.html`${e.dailyMessage?W.html`<p class="advice">${e.dailyMessage}</p>`:W.nothing} ${e.advice?W.html`<p class="advice">${e.advice}</p>`:W.nothing}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return W.html`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let a=600,s=160,o=a/Math.max(t.length-1,1),i=e.summary;return W.html`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2 class="title">${this.t("Forecast")}</h2><span class="energy">${_t(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${a} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${a}" y2="${s/2}" stroke="var(--roxy-border, #e4e4e7)" stroke-width="1"/>${Ss.map(l=>{let c=t.map((d,h)=>{let b=d[l]??0,L=h*o,v=s/2-b/100*(s/2-8);return`${L.toFixed(2)},${v.toFixed(2)}`}).join(" "),p=nn[l]??"#475569";return W.svg`<polyline points=${c} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?W.svg`<circle cx=${(c*o).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger, #dc2626)"><title>${[A(this.effectiveLang(),l.date),tt(this.effectiveLang(),(l.criticalCycles??[]).map(p=>br(p,d=>this.t(d)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" · ")}</title></circle>`:W.nothing)}</svg><div class="forecast-axis" part="legend"><span>${A(this.effectiveLang(),t[0]?.date)}</span><span>${A(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${Ss.map(l=>W.html`<span class="key"><span class="dot" style="${`background: ${nn[l]}`}"></span>${this.t(sn[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${i?W.html`<dl class="stats" part="details">${this.stat(this.t("Best day"),A(this.effectiveLang(),i.bestDay))} ${this.stat(this.t("Worst day"),A(this.effectiveLang(),i.worstDay))} ${this.stat(this.t("Average energy"),typeof i.averageEnergy=="number"?`${i.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof i.criticalDayCount=="number"?`${i.criticalDayCount}`:"")}</dl>`:W.nothing} ${this.renderForecastData(e)} ${i?.periodAdvice&&!this.hideReadings?W.html`<p class="advice">${i.periodAdvice}</p>`:W.nothing}</section>`}renderForecastData(e){let t=this.effectiveLang();return W.html`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${pe()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${Ss.map(a=>W.html`<th scope="col">${this.t(sn[a])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(a=>W.html`<tr><th scope="row"><time datetime="${a.date}">${A(t,a.date)}</time></th>${Ss.map(s=>W.html`<td>${_e(t,a[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:a.energyRating})}</td><td>${f(t,a.daysSinceBirth,0)}</td><td>${a.isCritical?tt(t,a.criticalCycles.map(s=>br(s,o=>this.t(o))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],a=e.doubleCriticalDays??[],s=t.map(o=>({label:A(this.effectiveLang(),o.date)||o.date,aside:[o.cycle?br(o.cycle,i=>this.t(i)):"",this.severityName(o.severity)].filter(Boolean).join(" · "),body:o.advisory??"",extra:W.html`<p class="crit-meta">${[o.direction?this.t(Np[o.direction]):"",typeof o.period=="number"?this.t("{{period}}-day cycle",{period:o.period}):""].filter(Boolean).join(" · ")}</p>`}));return W.html`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2 class="title">${this.t("Critical days")}</h2><span class="energy">${_t(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="stats" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),a.length?`${a.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?A(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${a.length>0?W.html`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:tt(this.effectiveLang(),a.map(o=>A(this.effectiveLang(),o)||o))})}</p>`:W.nothing} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=Ip[e];return t?this.t(t):""}stat(e,t){return t?W.html`<div class="stat"><dt>${e}</dt><dd>${t}</dd></div>`:W.nothing}};vr.styles=[u,q,me,W.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.head-meta{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.energy{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.phase{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:2px 10px}.spotlight{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 22%, transparent);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;display:grid}.spotlight .label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.bars{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:8rem 1fr 3.5rem;align-items:center;display:grid}.track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface,#fff);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{font-variant-numeric:tabular-nums;text-align:right;color:var(--roxy-muted,#71717a)}.advice{color:var(--roxy-fg,#0a0a0a);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,600px);height:auto;display:block}.legend{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;display:flex}.key{text-transform:capitalize;align-items:center;gap:.35rem;display:inline-flex}.dot{border-radius:var(--roxy-radius-full,9999px);width:.6rem;height:.6rem}.dot.critical{background:var(--roxy-danger,#dc2626)}.stats{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));margin:0;display:grid}.stat{gap:2px;display:grid}.stat dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.stat dd{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;margin:0}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}.forecast-scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.forecast-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.forecast-table th,.forecast-table td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:right;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:left}.forecast-axis{width:100%;max-width:var(--roxy-chart-max-width,600px);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);display:flex}.crit-note{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);border-radius:var(--roxy-radius-sm,4px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin:0}.crit-meta{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}`],m([(0,on.property)({type:String,reflect:!0})],vr.prototype,"mode",2),vr=m([(0,on.customElement)("roxy-biorhythm-chart")],vr);var C=require("lit"),fn=require("lit/decorators.js");var mt=require("lit"),Nl=14,Gp=86,Il=0,Op=102,ir=6,Gl=(Gp-Nl)*ir,Bp=(Op-Il)*ir;function ga(n,r){return{x:(n-Nl)*ir,y:(r-Il)*ir}}var F=50,cn=n=>2*F-n,Rs=1.02*ir,Ol=1.35*ir,jo=1.15*ir,Ze=2.87,wt=4.4,Al=5.65,Go={head:{64:[F-Ze,11.2],61:[F,11.2],63:[F+Ze,11.2]},ajna:{47:[F-Ze,18],24:[F,18],4:[F+Ze,18],17:[F-Ze,20.6],11:[F+Ze,20.6],43:[F,25.3]},throat:{62:[F-Ze,32.4],23:[F,32.4],56:[F+Ze,32.4],16:[F-wt,34.7],35:[F+wt,34.7],20:[F-wt,37.3],12:[F+wt,37.3],45:[F+wt,39.6],31:[F-Ze,41.9],8:[F,41.9],33:[F+Ze,41.9]},g:{1:[F,47.7],7:[F-Ze,50.3],13:[F+Ze,50.3],10:[F-Al,53.4],25:[F+Al,53.4],15:[F-Ze,56.8],46:[F+Ze,56.8],2:[F,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[F-Ze,72.7],14:[F,72.7],29:[F+Ze,72.7],34:[F-wt,75.4],27:[F-wt,79],59:[F+wt,79],42:[F-Ze,81.7],3:[F,81.7],9:[F+Ze,81.7]},"solar-plexus":{},root:{53:[F-Ze,90.2],60:[F,90.2],52:[F+Ze,90.2],54:[F-wt,92.6],19:[F+wt,92.6],38:[F-wt,95.3],39:[F+wt,95.3],58:[F-wt,98.1],41:[F+wt,98.1]}},Fp={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function Hp(){let n={},r={};for(let[e,[t,a]]of Object.entries(Go.spleen))Go["solar-plexus"][Fp[Number(e)]]=[cn(t),a];for(let[e,t]of Object.entries(Go))for(let[a,[s,o]]of Object.entries(t))n[Number(a)]=ga(s,o),r[Number(a)]=e;return{points:n,centerOf:r}}var{points:Ho,centerOf:Cs}=Hp(),Mf=Gl/2;function ha(n){return n.map(([r,e])=>ga(r,e))}function Oo(n,r,e){return ha([[F-n,r],[F+n,r],[F+n,e],[F-n,e]])}var Bo=5.9,zl=[[18.3,68.3],[18.3,82],[30.3,75.15]],Fo=[20,84.4],Ml=12*ir,jp=[63.2,67.9],Kp=13.1*ir,Ko=[{id:"head",label:"Head",color:"gold",points:ha([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:ha([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Oo(Bo,31,43.3)},{id:"g",label:"G",color:"gold",points:ha([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:ha([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:ga(...jp),room:Kp}},{id:"spleen",label:"Spleen",color:"brown",points:ha(zl),caption:{at:ga(...Fo),room:Ml}},{id:"sacral",label:"Sacral",color:"red",points:Oo(Bo,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:ha(zl.map(([n,r])=>[cn(n),r])),caption:{at:ga(cn(Fo[0]),Fo[1]),room:Ml}},{id:"root",label:"Root",color:"brown",points:Oo(Bo,88.5,99.8)}],Vp=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],qp=Yp();function Yp(){let n=cn,r=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${ln(r[0])}`];for(let t=1;t+2<r.length;t+=3)e.push(`C ${ln(r[t])} ${ln(r[t+1])} ${ln(r[t+2])}`);e.push(`L ${dn(r[r.length-1],n)}`);for(let t=r.length-3;t>=1;t-=3)e.push(`C ${dn(r[t+1],n)} ${dn(r[t],n)} ${dn(r[t-1],n)}`);return e.push("Z"),e.join(" ")}function ln([n,r]){let e=ga(n,r);return`${e.x} ${e.y}`}function dn([n,r],e){let t=ga(e(n),r);return`${t.x} ${t.y}`}function Up(n){return n.map(r=>`${r.x},${r.y}`).join(" ")}function Bl(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function Zp(){return mt.svg`<path class="bg-body" d=${qp} />`}function Wp(n){let r=[];for(let[e,t]of Vp){let a=Ho[e],s=Ho[t];if(!a||!s)continue;r.push(mt.svg`<line class="bg-channel" x1=${a.x} y1=${a.y} x2=${s.x} y2=${s.y} />`);let o={x:(a.x+s.x)/2,y:(a.y+s.y)/2};for(let[i,l]of[[e,a],[t,s]]){let c=n.get(i);if(!c)continue;let p=Bl(c);r.push(mt.svg`<line class="bg-half ${p==="both"?"src-left":p}" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`),p==="both"&&r.push(mt.svg`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`)}}return r}function Xp(n,r,e){return Ko.flatMap(t=>{let a=n.has(t.id),s=`bg-center bg-${t.color}${a?" defined":""}`,o=r?.get(t.id)||t.label;return[mt.svg`<polygon class=${s} points=${Up(t.points)}><title>${o}: ${a?e.defined:e.open}</title></polygon>`,t.caption?El(o,t.caption.at,"bg-caption",t.caption.room):El(o,Pl(t.points),a?`defined bg-${t.color}`:"",Qp(t.points,Pl(t.points).y)*.86)]})}function El(n,r,e,t){let a=n.split(/\s+/).filter(Boolean),s=a.reduce((c,p)=>Math.max(c,p.length),0),o=Math.min(jo,t/Math.max(1,s*Jp)),i=o*1.05,l=r.y-i*(a.length-1)/2;return mt.svg`<text class="bg-center-name ${e}" style=${`font-size:${o}px`} x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${a.map((c,p)=>mt.svg`<tspan x=${r.x} y=${l+p*i}>${c}</tspan>`)}</text>`}var Jp=.66;function Qp(n,r){let e=[];for(let t=0;t<n.length;t++){let a=n[t],s=n[(t+1)%n.length];if(a.y===s.y)continue;let o=Math.min(a.y,s.y),i=Math.max(a.y,s.y);r<o||r>i||e.push(a.x+(r-a.y)/(s.y-a.y)*(s.x-a.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function Pl(n){let r=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/r,y:n.reduce((e,t)=>e+t.y,0)/r}}function _l(n,r){return`M ${n.x} ${n.y-Rs} A ${Rs} ${Rs} 0 0 ${r} ${n.x} ${n.y+Rs} Z`}function em(n,r){let e=[];for(let[t,a]of Object.entries(Ho)){let s=Number(t),o=n.get(s),i=o?Bl(o):"",l=r.get(s);e.push(mt.svg`<g class="bg-gate-node">
8
+ ${i==="both"?[mt.svg`<path class="bg-gate-dot on src-left" d=${_l(a,0)} />`,mt.svg`<path class="bg-gate-dot on src-right" d=${_l(a,1)} />`]:mt.svg`<circle class="bg-gate-dot ${i&&`on ${i}`}" cx=${a.x} cy=${a.y} r=${Rs} />`}
9
9
  <text class="bg-gate ${o?"on":""}" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${s}</text>
10
10
  ${l?mt.svg`<title>${l}</title>`:mt.nothing}
11
- </g>`)}return e}var pn=`0 0 ${Il} ${Op}`;function mn(n){return mt.svg`
12
- ${Up()}
13
- ${Zp(n.gateSources)}
14
- ${Wp(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
- ${Qp(n.gateSources,n.gateTitles)}
16
- `}var Bl=require("lit");var hn=Bl.css`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-center-name{color:var(--roxy-muted,#71717a);fill:currentColor;font-size:${jo}px;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;font-weight:600}.bg-center-name.defined{color:#fff}.bg-center-name.bg-gold.defined,.bg-center-name.bg-green.defined{color:#0a0a0a}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${Gl}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var rt=require("lit"),Lr=rt.css`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);hyphens:auto;overflow-wrap:anywhere}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function gn(n,r){return n==="design"?r("Design"):n==="personality"?r("Personality"):n??""}function lr(n){let r=n.filter(e=>!!e.value);return r.length===0?rt.nothing:rt.html`<div class="facts" part="facts">${r.map(e=>rt.html`<div class="fact" part="fact"><span>${e.label}</span> <strong>${e.value}</strong></div>`)}</div>`}function un(n,r,e){return!n&&!r?rt.nothing:rt.html`<div class="themes" part="themes">${n?rt.html`<span class="pill pill--good">${e("Signature: {{value}}",{value:n})}</span>`:rt.nothing} ${r?rt.html`<span class="pill pill--shadow">${e("Not-self: {{value}}",{value:r})}</span>`:rt.nothing}</div>`}function yn(n,r){return!n?.personality&&!n?.design?rt.nothing:rt.html`<dl class="keynotes" part="keynotes">${n.personality?rt.html`<dt>${r("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:rt.nothing} ${n.design?rt.html`<dt>${r("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:rt.nothing}</dl>`}var em=["gold","green","brown","red"];function tm(n){let r=new Map;for(let e of n){if(e.gate==null)continue;let t=r.get(e.gate);t?t.push(e):r.set(e.gate,[e])}return r}var $r=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.side="personality"}renderData(e){let t=e.centers??[],a=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=tm(e.gates??[]),o=new Map([...s].map(([c,p])=>[c,{left:p.some(d=>d.side==="design"),right:p.some(d=>d.side==="personality")}])),i=this.buildGateTitles(s),l=new Map(t.map(c=>[c.id,y(c,"name")]));return C.html`<div class="wrap" part="card"><header class="head" part="header"><div><h2 class="title">${this.t("Bodygraph")}</h2>${e.designInstantUtc?C.html`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${el(this.effectiveLang(),e.designInstantUtc)}</time></div>`:C.nothing}</div>${e.type||e.profile?C.html`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:C.nothing}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(C.html`<svg class="chart" part="chart" viewBox="${pn}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${mn({definedCenters:a,gateSources:o,gateTitles:i,centerNames:l,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg>`,this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,l)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],l)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}buildGateTitles(e){let t=new Map;for(let[a,s]of e){let o=s.map(i=>[this.gateGlyph(i),`${a}${i.line!=null?`.${i.line}`:""}`,gn(i.side,this.translator)].filter(Boolean).join(" "));t.set(a,[this.t("Gate {{gate}}",{gate:a}),y(s[0],"gateName"),...o].filter(Boolean).join(" · "))}return t}gateGlyph(e){return e.planet?R(e.planet)??y(e,"planet"):""}renderSummary(e,t){let a=e.incarnationCross;return C.html`<div class="summary" part="details">${lr([{label:this.t("Type"),value:y(e,"type")},{label:this.t("Strategy"),value:y(e,"strategy")},{label:this.t("Authority"),value:y(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:y(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?C.html`<p class="lead">${e.typeDescription}</p>`:C.nothing} ${a?.name?C.html`<p class="cross">${a.name} ${a.gates?.length?C.html`<span class="gates">(${a.gates.join(", ")})</span>`:C.nothing}</p>`:C.nothing} ${un(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=em.map(a=>[a,Ko.filter(s=>s.color===a).map(s=>e.get(s.id)||s.label).join(", ")]);return C.html`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-right"></span>${this.t("Personality")} <span class="swatch source src-left"></span>${this.t("Design")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([a,s])=>C.html`<span><span class="swatch bg-${a} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,a=[{label:this.t("Strategy"),aside:y(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:y(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:yn(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:y(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?y(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(a,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return C.nothing;let a=new Map;for(let o of e){let i=o.circuit??"",l=a.get(i);l?l.push(o):a.set(i,[o])}let s=0;return C.html`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...a].map(([o,i])=>C.html`<div class="group">${o?C.html`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(i[0],"circuit")})}</p>`:C.nothing} ${i[0]?.circuitDescription?C.html`<p class="group-note">${i[0].circuitDescription}</p>`:C.nothing} ${i.map(l=>C.html`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${y(l,"name")}</span> </span>${pe()} <span class="interp-aside"><span class="chips">${(l.centers??[]).map(c=>C.html`<span class="chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?C.html`<p>${l.description}</p>`:C.nothing}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return C.nothing;let t=e.filter(a=>a.defined).length;return C.html`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((a,s)=>C.html`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(a,"name")}</span> ${pe()} <span class="interp-aside"><span class="chips"><span class="chip ${a.defined?"chip--on":""}">${a.defined?this.t("Defined"):this.t("Open")}</span> ${a.motor?C.html`<span class="chip">${this.t("Motor")}</span>`:C.nothing} ${a.awareness?C.html`<span class="chip">${this.t("Awareness")}</span>`:C.nothing}</span></span></summary><div class="interp-body">${a.theme?C.html`<p>${a.theme}</p>`:C.nothing} ${!a.defined&&a.notSelfQuestion?C.html`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${a.notSelfQuestion}</dd></dl>`:C.nothing} ${a.biology?C.html`<p class="footnote">${this.t("Biology")}. ${a.biology}</p>`:C.nothing} ${a.gates?.length?C.html`<p class="footnote">${this.t("Gates {{gates}}",{gates:a.gates.join(", ")})}</p>`:C.nothing}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return C.nothing;let a=t.filter(p=>p.side==="personality"),s=t.filter(p=>p.side==="design"),o=a.length>0&&s.length>0,i=this.side,l=o?i==="design"?s:a:t,c=o?e.sides?.[i]:void 0;return C.html`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${o?pt({items:[{id:"personality",label:`${this.t("Personality")} (${a.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:i,onSelect:p=>{this.side=p},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):C.nothing}<div id="${o?`hd-panel-${i}`:C.nothing}" part="panel" role="${o?"tabpanel":C.nothing}" aria-labelledby="${o?`hd-tab-${i}`:C.nothing}">${c?C.html`<p class="side-note">${c}</p>`:C.nothing} ${l.map((p,d)=>this.renderGate(p,d===0))}</div></section>`}renderGate(e,t){let a=this.gateGlyph(e),s=y(e,"planet"),o=e.ichingHexagram;return C.html`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${a?C.html`<span class="glyph" aria-hidden="true">${a}</span>`:C.nothing} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${pe()} ${s?C.html`<span class="interp-aside"><small>${s}</small></span>`:C.nothing}</summary><div class="interp-body">${e.gateDescription?C.html`<p>${e.gateDescription}</p>`:C.nothing} ${e.lineMeaning?C.html`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:C.nothing} ${e.planetDescription?C.html`<p class="footnote">${s}. ${e.planetDescription}</p>`:C.nothing} ${o?.number?C.html`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:o.number})}${o.english?`, ${o.english}`:""}</p>`:C.nothing}</div></details>`}};$r.styles=[u,Ue,ot,q,me,Lr,hn,C.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line,.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.layout{gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);align-items:start;display:grid}.wrap{--src-left:var(--roxy-danger,#dc2626);--src-right:var(--roxy-fg,#0a0a0a)}.summary{gap:var(--roxy-space-md,1rem);display:grid}.cross{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);border-left:2px solid var(--roxy-accent,#f59e0b);padding-left:var(--roxy-space-sm,.5rem);margin:0}.cross .gates{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.legend-row{color:var(--roxy-muted,#71717a);flex-basis:100%}.legend-row .swatch:not(:first-child){margin-left:var(--roxy-space-md,1rem)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-child{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.chip--on{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.chips{flex-wrap:wrap;gap:.25rem;display:inline-flex}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-accent-ink,#b45309)}.side-note{margin:0 0 var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}`],m([(0,fn.state)()],$r.prototype,"side",2),$r=m([(0,fn.customElement)("roxy-bodygraph")],$r);var ht=require("lit"),Fl=require("lit/decorators.js");var rm={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},ua=class extends g{renderData(r){let e=r.karakas??[];return e.length?ht.html`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2 class="title">${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip">${r.scheme??""}</span> ${r.scheme?rm[r.scheme]??"":""}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="leads" part="details"><div class="lead"><span>${this.t("Atmakaraka")}</span><strong>${r.atmakaraka??""}</strong></div><div class="lead"><span>${this.t("Darakaraka")}</span><strong>${r.darakaraka??""}</strong></div></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,a)=>this.renderRow(t,a===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(r,e){let t=R(r.graha)??"",a=Z(r.rashi)??"";return ht.html`<tr class="${e?"ak":""}"><td class="office">${r.name??""}${r.abbreviation?ht.html`<span class="abbr">${r.abbreviation}</span>`:ht.nothing}</td><td>${t?ht.html`<span class="glyph">${t}</span>`:ht.nothing}${r.graha??""}</td><td>${a?ht.html`<span class="glyph">${a}</span>`:ht.nothing}${r.rashi??""}</td><td class="num">${f(this.effectiveLang(),r.degreeInRashi,2)}</td><td class="num">${f(this.effectiveLang(),r.rankingDegree,2)} ${r.isReversed?ht.html`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:ht.nothing}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?ht.html`<p>${r.significations}</p>`:ht.nothing}</td></tr>`}};ua.styles=[u,ee,ht.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);flex-wrap:wrap;display:flex}.scheme-chip{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.05em;background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309);border-radius:999px;padding:.15em .6em}.leads{gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.lead span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.lead strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:640px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.ak{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}td.office{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.abbr{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-normal,400);margin-left:.4em}tbody tr.ak .abbr{color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}tbody tr.ak .glyph{color:var(--roxy-accent-ink,#b45309)}.num{font-variant-numeric:tabular-nums}.reversed{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.meaning{white-space:normal;min-width:12rem}.meaning strong{font-weight:var(--roxy-weight-bold,600);display:block}.meaning p{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],ua=m([(0,Fl.customElement)("roxy-chara-karakas")],ua);var kt=require("lit"),Hl=require("lit/decorators.js");var ya=class extends g{isCurrent(r){let e=Date.now(),t=Date.parse(r.start),a=Date.parse(r.end);return Number.isNaN(t)||Number.isNaN(a)?!1:e>=t&&e<a}renderTile(r){let e=r.effect==="Good"?"good":r.effect==="Bad"?"bad":"neutral",t=this.isCurrent(r),a=R(r.lord)??"",s=Wt(this.effectiveLang(),r);return kt.html`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${r.name}${t?kt.html`<span class="now-badge">${this.t("Now")}</span>`:kt.nothing} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${a?kt.html`<span aria-hidden="true">${a}</span>`:kt.nothing} ${r.lord}</span></div>`}renderData(r){let{date:e,dayChoghadiya:t,nightChoghadiya:a}=r;return kt.html`<div class="wrap" part="card"><div class="header" part="header"><h2 class="title">${this.t("Choghadiya")}</h2>${e?kt.html`<p class="subtitle">${A(this.effectiveLang(),e)}</p>`:kt.nothing}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):kt.html`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${a&&a.length>0?a.map(s=>this.renderTile(s)):kt.html`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};ya.styles=[u,kt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}.cho-grid{gap:var(--roxy-space-md,1rem);grid-template-columns:1fr;display:grid}@media (width>=720px){.cho-grid{grid-template-columns:1fr 1fr}}.period-col{gap:var(--roxy-space-xs,.25rem);display:grid}.period-heading{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a)}.cho-tile{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.25em .75em;padding:.55em .85em;display:grid}.cho-tile.good{background:color-mix(in srgb, var(--roxy-success,#22c55e) 18%, transparent);border-color:color-mix(in srgb, var(--roxy-success,#22c55e) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.cho-tile.bad{background:color-mix(in srgb, var(--roxy-danger,#ef4444) 18%, transparent);border-color:color-mix(in srgb, var(--roxy-danger,#ef4444) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.cho-tile.neutral{color:var(--roxy-fg,#0a0a0a);background:0 0}.cho-tile.now{outline:2px solid var(--roxy-accent,#f59e0b);outline-offset:1px;box-shadow:0 0 0 4px color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.tile-name{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);overflow-wrap:anywhere;grid-column:1;min-width:0}.tile-time{font-size:var(--roxy-text-xs,.75rem);opacity:.8;white-space:nowrap;text-align:right;grid-area:1/2/3;align-self:center}.tile-lord{font-size:var(--roxy-text-sm,.875rem);opacity:.85;grid-column:1;align-items:center;gap:.25em;display:flex}`],ya=m([(0,Hl.customElement)("roxy-choghadiya-grid")],ya);var J=require("lit"),xn=require("lit/decorators.js");var am=["sun","moon","venus","mars"],jl=["fire","earth","air","water"],Kl={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},sm={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},wr=class extends g{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[a,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[a]=s);return t}return{}}renderData(e){let t=e.overallScore,a=this.getBreakdown(),s="rating"in e?e.rating:void 0,o="archetype"in e?e.archetype:void 0,i="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,p="strengths"in e?e.strengths:void 0,d="challenges"in e?e.challenges:void 0,h="keyAspects"in e?e.keyAspects:void 0,b=!this.hideReadings,L=this.t(Kl[this.mode]??Kl.astrology);return J.html`<article class="card" part="card" aria-label="${L}"><div class="head" part="header"><h2>${L}</h2><div>${typeof t=="number"?J.html`<div class="score">${Math.round(t)}</div>`:J.nothing} ${s?J.html`<div class="rating">${s}</div>`:J.nothing}</div></div>${Object.keys(a).length>0?J.html`<div role="list" part="details breakdown">${Object.entries(a).map(([v,E])=>J.html`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${v}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,E))}%"></span></span> <span>${Math.round(E)}</span></div>`)}</div>`:J.nothing} ${o?J.html`<p><span class="archetype">${o.label}</span> ${o.description&&b?J.html`· ${o.description}`:J.nothing}</p>`:J.nothing} ${l&&b?J.html`<p class="lead">${l}</p>`:J.nothing} ${c&&b?J.html`<p class="body">${c}</p>`:J.nothing} ${i&&b?J.html`<p class="body">${i}</p>`:J.nothing} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${b&&((p?.length??0)>0||(d?.length??0)>0)?J.html`<div class="lists" part="section strengths-challenges">${p?.length?J.html`<div><h3>${this.t("Strengths")}</h3><ul>${p.map(v=>J.html`<li>${v}</li>`)}</ul></div>`:J.nothing} ${d?.length?J.html`<div><h3>${this.t("Challenges")}</h3><ul>${d.map(v=>J.html`<li>${v}</li>`)}</ul></div>`:J.nothing}</div>`:J.nothing} ${h?.length?J.html`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul class="key-aspects">${h.slice(0,6).map(v=>J.html`<li>${nm(this.effectiveLang(),v,b)}</li>`)}</ul></div></div>`:J.nothing}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?J.html`<div class="pills" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?J.html`<span class="pill">${this.t("Total")}: ${e.total}</span>`:J.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill">${this.t("Neutral: {{count}}",{count:e.neutral})}</span></div>`:J.nothing}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return J.nothing;let a=e?.persons,s=am.map(o=>{let i=t[o];if(!i)return null;let l=c=>{let p=H((c==="person1"?i.person1Sign:i.person2Sign)??""),d=a?.[c]?.[o]?.degree,h=Z(p)??"",b=typeof d=="number"?` ${Math.round(d)}°`:"";return`${h} ${p}${b}`.trim()};return{label:`${R(o)??""} ${H(o)}`.trim(),aside:tt(this.effectiveLang(),[l("person1"),l("person2")]),body:i.description??""}}).filter(o=>o!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return J.nothing;let t=e.person1,a=e.person2,s=Math.max(1,...jl.map(i=>Math.max(t?.[i]??0,a?.[i]??0))),o=e.sharedElement?.toLowerCase();return J.html`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row head"><span></span> <span>${this.t("Person 1")}</span> <span>${this.t("Person 2")}</span></div>${jl.map(i=>{let l=t?.[i]??0,c=a?.[i]??0;return J.html`<div class="${i===o?"el-row shared":"el-row"}"><span class="el-name">${i}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?J.html`<p class="shared-note">${e.description}</p>`:J.nothing}</section>`}renderSubScores(){let e=this.data;if(!e)return J.nothing;let t=[];if("lifePath"in e){let a=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,o]of a)o&&t.push({label:this.t(s),aside:[tt(this.effectiveLang(),[String(o.person1),String(o.person2)]),_e(this.effectiveLang(),o.compatibility,0)].filter(Boolean).join(" · "),body:o.description??""})}if("cycles"in e&&e.cycles)for(let[a,s]of Object.entries(e.cycles))s&&t.push({label:br(a,o=>this.t(o)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:_e(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(sm[s.phase]):""].filter(Boolean).join(" · "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};wr.styles=[u,q,me,J.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);grid-template-columns:1fr auto;display:grid}.head h2{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.score{font-variant-numeric:tabular-nums;font-size:2rem;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);line-height:1}.rating{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem)}.bar-row{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:8rem 1fr 3.5rem;align-items:center;display:grid}.bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:8px;overflow:hidden}.bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-row>span:last-child{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);text-align:right}.archetype{color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{padding-left:var(--roxy-space-md,1rem);margin:0}.lead{color:var(--roxy-fg,#0a0a0a);margin:0;font-weight:500}p.body{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.pills{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.elements{gap:var(--roxy-space-sm,.5rem);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:4rem 1fr 1fr;display:grid}.el-row .el-name{text-transform:capitalize;color:var(--roxy-fg,#0a0a0a)}.el-row.head span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.el-row.head span:nth-child(2){text-align:right}.el-bar{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:.4rem;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:auto;height:8px;display:flex;overflow:hidden}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-info,#0284c7)}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold,600)}.shared-note{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.key-aspects{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}`],m([(0,xn.property)({type:String,reflect:!0})],wr.prototype,"mode",2),wr=m([(0,xn.customElement)("roxy-compatibility-card")],wr);function nm(n,r,e){let t=$t(r),a=typeof r.orb=="number"?` (orb ${f(n,r.orb,1)}°)`:"",s=[r.planet1,t,r.planet2].filter(Boolean).join(" ");return r.description&&e?`${s}${a} · ${r.description}`:`${s}${a}`}var Vt=require("lit"),ql=require("lit/decorators.js");var Vl={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},om={fortunate:"success",unfortunate:"danger",mixed:"warning"},fa=class extends g{renderData(r){let e=j(this.effectiveLang(),r.number);return Vt.html`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="label">${this.t("Compound number")}</p>${r.name?Vt.html`<h2 class="name">${r.name}</h2>`:Vt.nothing}</div></header><div class="badges" part="details"><span class="badge">${this.t("Root number {{n}}",{n:j(this.effectiveLang(),r.root)})}</span> <span class="${`badge ${om[r.nature]??""}`}">${Vl[r.nature]?this.t(Vl[r.nature]):D(r.nature)}</span> ${typeof r.sameAs=="number"?Vt.html`<span class="badge">${this.t("Same meaning as {{n}}",{n:j(this.effectiveLang(),r.sameAs)})}</span>`:Vt.nothing}</div>${r.meaning&&!this.hideReadings?Vt.html`<p class="meaning" part="section readings">${r.meaning}</p>`:Vt.nothing}</article>`}};fa.styles=[u,Vt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.hero>div{min-width:0}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;flex-shrink:0}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;padding:3px 10px}.badge.success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.badge.warning{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 16%, transparent);color:var(--_warning-fg)}.meaning{margin:0;line-height:1.6}`],fa=m([(0,ql.customElement)("roxy-compound-number")],fa);var ke=require("lit"),Yl=require("lit/decorators.js");var im={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},lm=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),dm={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function bn(n){let r=[],e=[];for(let o of n.toLowerCase().split(/[\s-]+/)){let i=dm[o];if(i){e.push(i);continue}let l=im[o]??(lm.has(o)?o:"");l&&r.push(l)}let[t,a]=r;if(!t)return"var(--roxy-border, #e4e4e7)";let s=a?`color-mix(in srgb, ${t}, ${a})`:t;for(let[o,i]of e)s=`color-mix(in srgb, ${s} ${i}%, ${o})`;return s}var xa=class extends g{renderData(r){let e=r.colors??[],t=r.keywords??[],a=r.pairsWith??[],s=Us(this.effectiveLang(),r.birthMonth)||void 0,o=r.name??this.t("Crystal");return ke.html`<article class="wrap" part="card" aria-label="${o}"><div class="hero" part="header">${r.imageUrl?ke.html`<img class="photo" part="chart" src="${r.imageUrl}" alt="${o}" loading="lazy">`:ke.nothing}<div><h2 class="title">${r.name}</h2>${r.description&&!this.hideReadings?ke.html`<p class="desc">${r.description}</p>`:ke.nothing}</div></div><dl class="attrs" part="details">${this.attr(this.t("Planet"),r.planet)} ${this.attr(this.t("Hardness"),typeof r.hardness=="number"?this.t("{{value}} Mohs",{value:f(this.effectiveLang(),r.hardness)}):void 0)} ${this.attr(this.t("Vibration"),r.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),r.chakras)} ${this.list(this.t("Zodiac"),r.zodiacSigns)} ${this.list(this.t("Elements"),r.elements)} ${e.length?ke.html`<div class="attr"><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(i=>ke.html`<span class="color"><span class="dot" style="${`background:${bn(i)}`}"></span>${i}</span>`)}</div></dd></div>`:ke.nothing}</dl>${this.renderMeaning(r.meaning)} ${t.length&&!this.hideReadings?ke.html`<div part="section keywords"><p class="section-label">${this.t("Keywords")}</p><div class="chips">${t.map(i=>ke.html`<span class="chip">${i}</span>`)}</div></div>`:ke.nothing} ${r.affirmation&&!this.hideReadings?ke.html`<p class="affirmation">${r.affirmation}</p>`:ke.nothing} ${a.length?ke.html`<div part="section pairs-with"><p class="section-label">${this.t("Pairs with")}</p><div class="chips">${a.map(i=>ke.html`<span class="chip">${String(i).replace(/-/g," ")}</span>`)}</div></div>`:ke.nothing}</article>`}attr(r,e){return e==null||e===""?ke.nothing:ke.html`<div class="attr"><dt>${r}</dt><dd>${e}</dd></div>`}list(r,e){return e?.length?ke.html`<div class="attr"><dt>${r}</dt><dd>${e.join(", ")}</dd></div>`:ke.nothing}renderMeaning(r){if(!r||this.hideReadings)return ke.nothing;let t=[[this.t("Spiritual"),r.spiritual],[this.t("Emotional"),r.emotional],[this.t("Physical"),r.physical]].filter(([,a])=>!!a);return t.length===0?ke.nothing:ke.html`<div class="meaning" part="section meaning">${t.map(([a,s])=>ke.html`<h3>${a}</h3><p>${s}</p>`)}</div>`}};xa.styles=[u,ke.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{gap:var(--roxy-space-md,1rem);align-items:flex-start;display:flex}.photo{border-radius:var(--roxy-radius-md,8px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);flex:none;width:96px;height:96px}.title{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600)}.desc{line-height:1.55;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.attrs{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));display:grid}.attr{gap:2px;display:grid}.attr dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.attr dd{font-size:var(--roxy-text-sm,.875rem);margin:0;font-weight:500}.colors{flex-wrap:wrap;gap:.4rem;display:flex}.color{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;align-items:center;gap:.3rem;display:inline-flex}.dot{border-radius:var(--roxy-radius-full,9999px);border:1px solid color-mix(in srgb, var(--roxy-fg,#0a0a0a) 18%, transparent);width:.7rem;height:.7rem}.meaning h3{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.meaning p{margin:0 0 var(--roxy-space-sm,.5rem) 0;font-size:var(--roxy-text-sm,.875rem);line-height:1.55}.chips{flex-wrap:wrap;gap:.3rem;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;padding:1px 8px}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.affirmation{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);font-style:italic;font-size:var(--roxy-text-sm,.875rem);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;margin:0}`],xa=m([(0,Yl.customElement)("roxy-crystal-card")],xa);var Mt=require("lit"),vn=require("lit/decorators.js");var kr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let a=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return Mt.html`<section class="wrap" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(o=>Mt.html`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?Mt.html`<img class="photo" src="${o.imageUrl}" alt="${o.name??this.t("Crystal")}" loading="lazy">`:Mt.html`<div class="photo" aria-hidden="true"></div>`}<p class="name">${o.name}</p>${o.colors&&o.colors.length>0?Mt.html`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:tt(this.effectiveLang(),o.colors)})}">${o.colors.map(i=>Mt.html`<span class="swatch" style="${`background:${bn(i)}`}" title="${i}"></span>`)}</div>`:Mt.nothing}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Mt.html`<div class="detail" part="detail">${this.openedRow}</div>`:Mt.nothing}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:Us(this.effectiveLang(),e.month)}):this.t("Crystals")}};kr.styles=[u,Mt.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs,.25rem);text-align:left;width:100%;font:inherit;color:inherit;background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);box-shadow:var(--roxy-shadow-sm);cursor:pointer;transition:border-color .12s;display:grid}.tile[aria-pressed=true],.tile:hover,.tile:focus-visible{border-color:var(--roxy-accent,#f59e0b);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm,4px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);width:100%}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.colors{flex-wrap:wrap;gap:4px;display:flex}.swatch{border-radius:var(--roxy-radius-full,9999px);border:1px solid color-mix(in srgb, var(--roxy-fg,#0a0a0a) 18%, transparent);width:10px;height:10px}`],m([(0,vn.property)({type:String,reflect:!0})],kr.prototype,"heading",2),kr=m([(0,vn.customElement)("roxy-crystal-grid")],kr);var le=require("lit"),hs=require("lit/decorators.js");function Ul(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function Vo(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function qo(n){if(!n)return"";let r=[];return n.years&&r.push(`${n.years}y`),n.months&&r.push(`${n.months}m`),n.days&&r.push(`${n.days}d`),r.length?r.join(" "):"0d"}function Zl(n,r){return Jt(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,r)}function Ln(n,r){let e=r.startDate?A(n,r.startDate):"",t=r.endDate?A(n,r.endDate):"";return e&&e===t?`${he(n,r.startDate)} to ${he(n,r.endDate)}`:e&&t?`${e} to ${t}`:e||t}var dr=class extends g{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),a=t.length?Math.max(...t.map(p=>p.durationYears)):0,s=pm(t.length?Math.min(...t.map(p=>p.durationYears)):0),o=this.hideReadings?[]:this.readings(e,t),i=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...o.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:o.length})}]:[],...i.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(p=>p.id===this.view)?this.view:"timeline";return le.html`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?pt({items:l,active:c,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):le.nothing}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:le.nothing}">${c==="timeline"?le.html`${this.period==="current"?this.renderCurrent(e):le.nothing} ${t.length>0?le.html`<div class="timeline" part="chart timeline" role="list">${t.map(p=>this.renderBar(p,a,s,e.houseThemes))}</div>`:le.nothing}`:le.nothing} ${c==="readings"?this.renderReadings(o):le.nothing} ${c==="frame"?this.renderFrame(i):le.nothing}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?le.html`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?le.html`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:le.nothing}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let a="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${a}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${f(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",ra(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let a="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${qo(e.birthDashaBalance)} of the opening ${a}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return le.html`<dl class="frame" part="details frame">${e.map(([t,a])=>le.html`<div><dt>${t}</dt><dd>${a}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=Vo(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ul(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=Vo(e);if(!t)return le.nothing;let a=t.period,s=Ln(this.effectiveLang(),a),o=a.nominalStartDate?A(this.effectiveLang(),a.nominalStartDate):"";return le.html`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:a.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof a.durationYears=="number"?` (${cm(this.effectiveLang(),a.durationYears)})`:""})} ${o?le.html`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:o})}`:le.nothing}</p>`}readings(e,t){let a=[],s=Vo(e);if(s?.period.interpretation&&a.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Ln(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let i=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,p]of i){if(!c?.interpretation)continue;let d=qo(p);a.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:d?this.t("{{balance}} left",{balance:d}):Ln(this.effectiveLang(),c),body:c.interpretation})}}let o=t.find(i=>this.isCurrent(i));return o?.interpretation&&a.push({label:`${o.planet} ${Ul(e)}`,aside:Ln(this.effectiveLang(),o),body:o.interpretation}),a}renderCurrent(e){if(!("mahadasha"in e))return le.nothing;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return le.html`<div class="current" part="details current">${t.map(([a,s,o])=>{if(!s)return le.nothing;let i=qo(o),l=Zl(s.significators,e.houseThemes);return le.html`<div><span>${this.t(a)}</span> <strong>${s.planet}</strong> ${i?le.html`<small>${this.t("{{balance}} left",{balance:i})}</small>`:le.nothing} ${l?le.html`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:le.nothing}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let t=Date.now(),a=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(a)||Number.isNaN(s)?!1:t>=a&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),a=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(a)||s<t||s>=a||a<=t?-1:(s-t)/(a-t)}renderBar(e,t,a,s){let o=e.durationYears,i=t>0?o/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,p=l?"bar-track bar-now":"bar-track",d=Zl(e.significators,s),h=["bar",l?"now":"",a==="time"?"fine":""].filter(Boolean).join(" ");return le.html`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?le.html`<span class="now-badge">${this.t("Now")}</span>`:le.nothing} </span><span class="${p}"><span class="bar-fill" style="width:${i}%"></span> ${c>=0?le.html`<span class="bar-progress" style="left:${c*i}%" aria-hidden="true"></span>`:le.nothing} </span><span class="dates">${e.startDate?sr(this.effectiveLang(),e.startDate,a):""} ${e.endDate?le.html`- ${sr(this.effectiveLang(),e.endDate,a)}`:""} </span>${d?le.html`<span class="houses">${this.t("Signifies {{houses}}",{houses:d})}</span>`:le.nothing}</div>`}};dr.styles=[u,q,me,ot,le.css`.wrap{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.nakshatra{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.current{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));display:grid}.current div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.current div strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.current div small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.parent{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.timeline{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{grid-template-columns:var(--roxy-label-col) 1fr 8rem;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);align-items:center;row-gap:.15rem;display:grid}.bar.now strong{color:var(--roxy-accent-ink,#b45309)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.bar-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent,#f59e0b);opacity:.45;height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-now .bar-fill{opacity:1}.bar-progress{background:var(--roxy-accent-ink,#b45309);width:2px;box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 35%, transparent);border-radius:2px;position:absolute;top:-2px;bottom:-2px}.dates{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right}.bar.fine{grid-template-columns:var(--roxy-label-col) 1fr}.bar.fine .dates{text-align:left;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md,1rem)}.frame{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));margin:0;display:grid}.frame dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}.frame dd{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;margin:0}.block{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem)}`],m([(0,hs.property)({type:String,reflect:!0})],dr.prototype,"period",2),m([(0,hs.state)()],dr.prototype,"view",2),dr=m([(0,hs.customElement)("roxy-dasha-timeline")],dr);var Yo=365.25;function cm(n,r){if(r>=1)return`${f(n,r,1)} years`;let e=r*Yo;if(e>=1)return`${f(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${f(n,t,1)} hours`:`${f(n,t*60,0)} minutes`}function pm(n){return n>=2?"year":n>=60/Yo?"month":n>=1/Yo?"day":"time"}var X=require("lit"),$n=require("lit/decorators.js"),Zo=require("lit/directives/if-defined.js");var Wl=require("lit"),Sr=Wl.css`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem)}table.stacked tr:last-child{border-bottom:0}table.stacked td{white-space:normal;border:0;padding:.1rem 0}table.stacked td:empty{display:none}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}}`;var Xl=["title","name","label","heading","overview","summary"],mm=80,hm=80,gm=3,um=["imageUrl","image","icon","symbol"],ym=["imageUrl","image"],fm=["affirmation","mantra","motto","quote"],xm=new Set(["seed"]),bm=new Set(["id","slug","key"]),vm=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),Lm=8,Jl=1,$m=12,wm=n=>n.toLowerCase().replace(/[_-]/g,""),Ql=n=>/^(has|is)([A-Z_]|$)/.test(n),km=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,Sm=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,Rm=/^https?:\/\//,Cm=6;function Dm(n,r){if(!Number.isInteger(r))return!1;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function ba(n){return n===null||["string","number","boolean"].includes(typeof n)}function Uo(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(ba))}function ed(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let r=Object.values(n);return r.length===0||r.every(ed)}var Rr=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=Cm?X.html`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:X.html`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?X.nothing:ba(e)?X.html`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?X.html`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(ba)?this.renderChips(e):e.every(a=>a!==null&&typeof a=="object"&&!Array.isArray(a))?this.renderObjectArray(e):X.html`<ol>${e.map(a=>X.html`<li>${this.renderValue(a)}</li>`)}</ol>`}renderChips(e){return X.html`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>X.html`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(h=>this.suppress(h)),a=this.collectKeys(t),s=new Set(a.filter(h=>t.some(b=>typeof b[h]=="string"&&Array.from(b[h]).length>hm))),o=new Set(a.filter(h=>s.has(h)||t.some(b=>Uo(b[h]??null)))),i=s.size>0||o.size>0&&o.size<a.length,l=h=>i?o.has(h)?"col-wide":"col-tight":"",c=o.size>0&&a.length>gm,p=t.length>$m;return X.html`<div class="${c?"roxy-collection":p&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?X.nothing:"0"}">${c?X.html`${p?X.html`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:X.nothing} ${t.map(h=>X.html`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:X.html`<table class="${s.size?"roxy-table stacked prose":o.size?"roxy-table stacked":"roxy-table"}" role="table">${p?X.html`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:X.nothing}<thead><tr>${a.map(h=>X.html`<th class="${l(h)}">${Pe(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>X.html`<tr>${a.map(b=>X.html`<td class="${l(b)}" data-label="${Pe(this.effectiveLang(),b)}">${this.renderCell(h[b],b)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=os(e),a=Xl.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let o=wm(s);return xm.has(o)||a&&bm.has(o)?!1:!vm.has(o)}))}renderObject(e){let t=this.suppress(e),a=Xl.find(d=>typeof t[d]=="string"&&t[d].length<=mm),s=um.find(d=>typeof t[d]=="string"&&t[d].startsWith("http")),o=a!=="summary"&&typeof t.summary=="string"?"summary":null,i=fm.find(d=>typeof t[d]=="string"),l=Object.entries(t).filter(([d,h])=>d!==a&&d!==o&&d!==i&&!ym.includes(d)&&!ed(h)),c=l.filter(([,d])=>!Uo(d)),p=l.filter(([,d])=>Uo(d));return X.html`${s?X.html`<img class="roxy-image" src="${String(t[s])}" alt="${a?String(t[a]):this.t("illustration")}" loading="lazy">`:X.nothing} ${a?X.html`<h3 class="roxy-title" part="header">${t[a]}</h3>`:X.nothing} ${o?X.html`<p class="roxy-summary">${t[o]}</p>`:X.nothing} ${i?X.html`<blockquote class="roxy-quote">${t[i]}</blockquote>`:X.nothing} ${c.length>0?X.html`<dl class="roxy-rows" part="details label-track">${c.map(([d,h])=>X.html`<dt>${Pe(this.effectiveLang(),d)}</dt><dd>${this.renderField(h,d)}</dd>`)}</dl>`:X.nothing} ${p.map(([d,h])=>this.renderSection(d,h))}`}renderSection(e,t){let a=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),o=Pe(this.effectiveLang(),e);return a>Lm||this.depth>=Jl?X.html`<details class="roxy-section" ?open="${this.depth<Jl}"><summary>${o}</summary>${s}</details>`:X.html`<div class="roxy-section"><h4>${o}</h4>${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&Ql(t)?X.html`<span class="roxy-badge">${this.t("Yes")}</span>`:ba(e)?X.html`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(ba)?this.renderChips(e):X.html`<roxy-data bare lang="${(0,Zo.ifDefined)(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&Ql(t)?X.html`<span class="roxy-badge">${this.t("Yes")}</span>`:ba(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(ba)?e.filter(a=>a!==null).map(a=>this.formatScalar(a)).join(", "):X.html`<roxy-data bare lang="${(0,Zo.ifDefined)(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return typeof e=="string"&&Rm.test(e)?X.html`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&Dm(t,e)?String(e):f(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):km.test(e)?he(this.effectiveLang(),e):Sm.test(e)?D(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let a of e)for(let s of Object.keys(a))t.add(s);return Array.from(t)}};Rr.styles=[u,X.css`.roxy-card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm)}.roxy-card a{color:var(--roxy-accent-ink,#b45309)}.roxy-title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-sm,.5rem) 0;color:var(--roxy-primary,#0f172a);letter-spacing:var(--roxy-tracking-tight)}.roxy-summary{color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-md,1rem) 0;font-size:var(--roxy-text-sm,.875rem)}dl.roxy-rows{grid-template-columns:minmax(8ch, min(25%, max-content)) minmax(0, 1fr);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);margin:0;display:grid}dl.roxy-rows dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:capitalize}dl.roxy-rows dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);word-break:break-word;margin:0}ul.roxy-chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}ul.roxy-chips li{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:32rem}.roxy-collection:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm,.5rem)}table.roxy-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}table.roxy-table caption{text-align:start}table.roxy-table th,table.roxy-table td{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem);text-align:left;vertical-align:top;text-transform:none;word-break:normal;overflow-wrap:normal}table.roxy-table th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em;white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table) :is(th,td).col-wide{width:auto}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{border-radius:var(--roxy-radius-md,8px);max-width:100%;height:auto;margin-bottom:var(--roxy-space-md,1rem)}.roxy-section{margin-top:var(--roxy-space-md,1rem)}.roxy-section h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-xs,.25rem) 0;text-transform:capitalize}blockquote.roxy-quote{margin:var(--roxy-space-md,1rem) 0;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.roxy-badge{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-block}details.roxy-section{margin-top:var(--roxy-space-md,1rem)}details.roxy-section>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);text-transform:capitalize}details.roxy-section>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:4px}`,Sr],m([(0,$n.property)({attribute:!1})],Rr.prototype,"depth",2),Rr=m([(0,$n.customElement)("roxy-data")],Rr);var Et=require("lit"),Tn=require("lit/decorators.js");var Y=require("lit");var qt=400,Se=20,gt=qt-2*Se,Ve=qt/2,td=Object.fromEntries(Oe.map(n=>[n.toLowerCase(),n])),Tm=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],sd="ʳ",nd="ᶜ",od="ʷ";function Wo(n){return Oe.indexOf(n)}function Am(n){let r=nl(n.graha)??n.graha,e=`${n.isRetrograde?sd:""}${n.combust?nd:""}${n.war?od:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${r}${e}`;let{degree:t}=Nt(n.longitude);return`${r} ${t}°${e}`}function zm(n,r,e){let t=[H(n.graha)],a=n.natalReference===!0;if(a&&t.push(e("in {{sign}}",{sign:r})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Nt(n.longitude),o=String(s.minute).padStart(2,"0");t.push(a?`D1: ${s.degree}°${o}' ${s.sign}`:`${s.degree}°${o}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${a?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" · ")}function Xo(n,r,e,t,a,s){let o=t-(n.length-1)*a/2;return n.map((i,l)=>{let c=o+l*a;return Y.svg`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${Am(i)}<title>${zm(i,r,s)}</title></text>`})}function kn(n,r={}){let{divisionLabel:e,lagnaOverride:t,states:a,natalReference:s}=r,o=new Set((a?.combustion??[]).map(d=>(d.planet??"").toLowerCase())),i=new Map;for(let d of a?.planetaryWar??[])!d.planet1||!d.planet2||(i.set(d.planet1.toLowerCase(),{opponent:d.planet2,winner:d.winner}),i.set(d.planet2.toLowerCase(),{opponent:d.planet1,winner:d.winner}));let l={};for(let d of Oe)l[d.toLowerCase()]=[];let c=t?td[t.toLowerCase()]??"":"",p=c;for(let[d,h]of Object.entries(n??{})){let b=(h?.rashi??"").toLowerCase();if(d==="Lagna"||h?.graha==="Lagna"){c||(p=td[b]??"");continue}if(!b||!(b in l))continue;let L=h.graha??d,v=L.toLowerCase();l[b]?.push({graha:L,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:o.has(v)||void 0,war:i.get(v)})}return{lagnaSign:p,placements:l,divisionLabel:e}}var va=gt/4,Mm={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function Em(n){let r=Mm[n]??{col:0,row:0};return{x:Se+r.col*va,y:Se+r.row*va,w:va,h:va}}function Pm(n){let r=Se,e=Se+va,t=Se+2*va,a=Se+3*va,s=qt-Se;return Y.svg`
11
+ </g>`)}return e}var pn=`0 0 ${Gl} ${Bp}`;function mn(n){return mt.svg`
12
+ ${Zp()}
13
+ ${Wp(n.gateSources)}
14
+ ${Xp(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
+ ${em(n.gateSources,n.gateTitles)}
16
+ `}var Fl=require("lit");var hn=Fl.css`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-center-name{color:var(--roxy-muted,#71717a);fill:currentColor;font-size:${jo}px;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;font-weight:600}.bg-center-name.defined{color:#fff}.bg-center-name.bg-gold.defined,.bg-center-name.bg-green.defined{color:#0a0a0a}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${Ol}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var rt=require("lit"),Lr=rt.css`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);hyphens:auto;overflow-wrap:anywhere}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function gn(n,r){return n==="design"?r("Design"):n==="personality"?r("Personality"):n??""}function lr(n){let r=n.filter(e=>!!e.value);return r.length===0?rt.nothing:rt.html`<div class="facts" part="facts">${r.map(e=>rt.html`<div class="fact" part="fact"><span>${e.label}</span> <strong>${e.value}</strong></div>`)}</div>`}function un(n,r,e){return!n&&!r?rt.nothing:rt.html`<div class="themes" part="themes">${n?rt.html`<span class="pill pill--good">${e("Signature: {{value}}",{value:n})}</span>`:rt.nothing} ${r?rt.html`<span class="pill pill--shadow">${e("Not-self: {{value}}",{value:r})}</span>`:rt.nothing}</div>`}function yn(n,r){return!n?.personality&&!n?.design?rt.nothing:rt.html`<dl class="keynotes" part="keynotes">${n.personality?rt.html`<dt>${r("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:rt.nothing} ${n.design?rt.html`<dt>${r("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:rt.nothing}</dl>`}var tm=["gold","green","brown","red"];function rm(n){let r=new Map;for(let e of n){if(e.gate==null)continue;let t=r.get(e.gate);t?t.push(e):r.set(e.gate,[e])}return r}var $r=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.side="personality"}renderData(e){let t=e.centers??[],a=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=rm(e.gates??[]),o=new Map([...s].map(([c,p])=>[c,{left:p.some(d=>d.side==="design"),right:p.some(d=>d.side==="personality")}])),i=this.buildGateTitles(s),l=new Map(t.map(c=>[c.id,y(c,"name")]));return C.html`<div class="wrap" part="card"><header class="head" part="header"><div><h2 class="title">${this.t("Bodygraph")}</h2>${e.designInstantUtc?C.html`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${tl(this.effectiveLang(),e.designInstantUtc)}</time></div>`:C.nothing}</div>${e.type||e.profile?C.html`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:C.nothing}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(C.html`<svg class="chart" part="chart" viewBox="${pn}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${mn({definedCenters:a,gateSources:o,gateTitles:i,centerNames:l,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg>`,this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,l)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],l)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}buildGateTitles(e){let t=new Map;for(let[a,s]of e){let o=s.map(i=>[this.gateGlyph(i),`${a}${i.line!=null?`.${i.line}`:""}`,gn(i.side,this.translator)].filter(Boolean).join(" "));t.set(a,[this.t("Gate {{gate}}",{gate:a}),y(s[0],"gateName"),...o].filter(Boolean).join(" · "))}return t}gateGlyph(e){return e.planet?R(e.planet)??y(e,"planet"):""}renderSummary(e,t){let a=e.incarnationCross;return C.html`<div class="summary" part="details">${lr([{label:this.t("Type"),value:y(e,"type")},{label:this.t("Strategy"),value:y(e,"strategy")},{label:this.t("Authority"),value:y(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:y(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?C.html`<p class="lead">${e.typeDescription}</p>`:C.nothing} ${a?.name?C.html`<p class="cross">${a.name} ${a.gates?.length?C.html`<span class="gates">(${a.gates.join(", ")})</span>`:C.nothing}</p>`:C.nothing} ${un(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=tm.map(a=>[a,Ko.filter(s=>s.color===a).map(s=>e.get(s.id)||s.label).join(", ")]);return C.html`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-right"></span>${this.t("Personality")} <span class="swatch source src-left"></span>${this.t("Design")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([a,s])=>C.html`<span><span class="swatch bg-${a} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,a=[{label:this.t("Strategy"),aside:y(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:y(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:yn(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:y(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?y(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(a,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return C.nothing;let a=new Map;for(let o of e){let i=o.circuit??"",l=a.get(i);l?l.push(o):a.set(i,[o])}let s=0;return C.html`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...a].map(([o,i])=>C.html`<div class="group">${o?C.html`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(i[0],"circuit")})}</p>`:C.nothing} ${i[0]?.circuitDescription?C.html`<p class="group-note">${i[0].circuitDescription}</p>`:C.nothing} ${i.map(l=>C.html`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${y(l,"name")}</span> </span>${pe()} <span class="interp-aside"><span class="chips">${(l.centers??[]).map(c=>C.html`<span class="chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?C.html`<p>${l.description}</p>`:C.nothing}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return C.nothing;let t=e.filter(a=>a.defined).length;return C.html`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((a,s)=>C.html`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(a,"name")}</span> ${pe()} <span class="interp-aside"><span class="chips"><span class="chip ${a.defined?"chip--on":""}">${a.defined?this.t("Defined"):this.t("Open")}</span> ${a.motor?C.html`<span class="chip">${this.t("Motor")}</span>`:C.nothing} ${a.awareness?C.html`<span class="chip">${this.t("Awareness")}</span>`:C.nothing}</span></span></summary><div class="interp-body">${a.theme?C.html`<p>${a.theme}</p>`:C.nothing} ${!a.defined&&a.notSelfQuestion?C.html`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${a.notSelfQuestion}</dd></dl>`:C.nothing} ${a.biology?C.html`<p class="footnote">${this.t("Biology")}. ${a.biology}</p>`:C.nothing} ${a.gates?.length?C.html`<p class="footnote">${this.t("Gates {{gates}}",{gates:a.gates.join(", ")})}</p>`:C.nothing}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return C.nothing;let a=t.filter(p=>p.side==="personality"),s=t.filter(p=>p.side==="design"),o=a.length>0&&s.length>0,i=this.side,l=o?i==="design"?s:a:t,c=o?e.sides?.[i]:void 0;return C.html`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${o?pt({items:[{id:"personality",label:`${this.t("Personality")} (${a.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:i,onSelect:p=>{this.side=p},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):C.nothing}<div id="${o?`hd-panel-${i}`:C.nothing}" part="panel" role="${o?"tabpanel":C.nothing}" aria-labelledby="${o?`hd-tab-${i}`:C.nothing}">${c?C.html`<p class="side-note">${c}</p>`:C.nothing} ${l.map((p,d)=>this.renderGate(p,d===0))}</div></section>`}renderGate(e,t){let a=this.gateGlyph(e),s=y(e,"planet"),o=e.ichingHexagram;return C.html`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${a?C.html`<span class="glyph" aria-hidden="true">${a}</span>`:C.nothing} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${pe()} ${s?C.html`<span class="interp-aside"><small>${s}</small></span>`:C.nothing}</summary><div class="interp-body">${e.gateDescription?C.html`<p>${e.gateDescription}</p>`:C.nothing} ${e.lineMeaning?C.html`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:C.nothing} ${e.planetDescription?C.html`<p class="footnote">${s}. ${e.planetDescription}</p>`:C.nothing} ${o?.number?C.html`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:o.number})}${o.english?`, ${o.english}`:""}</p>`:C.nothing}</div></details>`}};$r.styles=[u,Ue,ot,q,me,Lr,hn,C.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line,.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.layout{gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);align-items:start;display:grid}.wrap{--src-left:var(--roxy-danger,#dc2626);--src-right:var(--roxy-fg,#0a0a0a)}.summary{gap:var(--roxy-space-md,1rem);display:grid}.cross{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);border-left:2px solid var(--roxy-accent,#f59e0b);padding-left:var(--roxy-space-sm,.5rem);margin:0}.cross .gates{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.legend-row{color:var(--roxy-muted,#71717a);flex-basis:100%}.legend-row .swatch:not(:first-child){margin-left:var(--roxy-space-md,1rem)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-child{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.chip--on{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.chips{flex-wrap:wrap;gap:.25rem;display:inline-flex}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-accent-ink,#b45309)}.side-note{margin:0 0 var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}`],m([(0,fn.state)()],$r.prototype,"side",2),$r=m([(0,fn.customElement)("roxy-bodygraph")],$r);var ht=require("lit"),Hl=require("lit/decorators.js");var am={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},ua=class extends g{renderData(r){let e=r.karakas??[];return e.length?ht.html`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2 class="title">${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip">${r.scheme??""}</span> ${r.scheme?am[r.scheme]??"":""}</p>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="leads" part="details"><div class="lead"><span>${this.t("Atmakaraka")}</span><strong>${r.atmakaraka??""}</strong></div><div class="lead"><span>${this.t("Darakaraka")}</span><strong>${r.darakaraka??""}</strong></div></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,a)=>this.renderRow(t,a===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(r,e){let t=R(r.graha)??"",a=Z(r.rashi)??"";return ht.html`<tr class="${e?"ak":""}"><td class="office">${r.name??""}${r.abbreviation?ht.html`<span class="abbr">${r.abbreviation}</span>`:ht.nothing}</td><td>${t?ht.html`<span class="glyph">${t}</span>`:ht.nothing}${r.graha??""}</td><td>${a?ht.html`<span class="glyph">${a}</span>`:ht.nothing}${r.rashi??""}</td><td class="num">${f(this.effectiveLang(),r.degreeInRashi,2)}</td><td class="num">${f(this.effectiveLang(),r.rankingDegree,2)} ${r.isReversed?ht.html`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:ht.nothing}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?ht.html`<p>${r.significations}</p>`:ht.nothing}</td></tr>`}};ua.styles=[u,ee,ht.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);flex-wrap:wrap;display:flex}.scheme-chip{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.05em;background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309);border-radius:999px;padding:.15em .6em}.leads{gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.lead span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.lead strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:640px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.ak{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}td.office{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.abbr{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-normal,400);margin-left:.4em}tbody tr.ak .abbr{color:var(--roxy-accent-ink,#b45309)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}tbody tr.ak .glyph{color:var(--roxy-accent-ink,#b45309)}.num{font-variant-numeric:tabular-nums}.reversed{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.meaning{white-space:normal;min-width:12rem}.meaning strong{font-weight:var(--roxy-weight-bold,600);display:block}.meaning p{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],ua=m([(0,Hl.customElement)("roxy-chara-karakas")],ua);var kt=require("lit"),jl=require("lit/decorators.js");var ya=class extends g{isCurrent(r){let e=Date.now(),t=Date.parse(r.start),a=Date.parse(r.end);return Number.isNaN(t)||Number.isNaN(a)?!1:e>=t&&e<a}renderTile(r){let e=r.effect==="Good"?"good":r.effect==="Bad"?"bad":"neutral",t=this.isCurrent(r),a=R(r.lord)??"",s=Wt(this.effectiveLang(),r);return kt.html`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${r.name}${t?kt.html`<span class="now-badge">${this.t("Now")}</span>`:kt.nothing} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${a?kt.html`<span aria-hidden="true">${a}</span>`:kt.nothing} ${r.lord}</span></div>`}renderData(r){let{date:e,dayChoghadiya:t,nightChoghadiya:a}=r;return kt.html`<div class="wrap" part="card"><div class="header" part="header"><h2 class="title">${this.t("Choghadiya")}</h2>${e?kt.html`<p class="subtitle">${A(this.effectiveLang(),e)}</p>`:kt.nothing}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):kt.html`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${a&&a.length>0?a.map(s=>this.renderTile(s)):kt.html`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};ya.styles=[u,kt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}.cho-grid{gap:var(--roxy-space-md,1rem);grid-template-columns:1fr;display:grid}@media (width>=720px){.cho-grid{grid-template-columns:1fr 1fr}}.period-col{gap:var(--roxy-space-xs,.25rem);display:grid}.period-heading{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a)}.cho-tile{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.25em .75em;padding:.55em .85em;display:grid}.cho-tile.good{background:color-mix(in srgb, var(--roxy-success,#22c55e) 18%, transparent);border-color:color-mix(in srgb, var(--roxy-success,#22c55e) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.cho-tile.bad{background:color-mix(in srgb, var(--roxy-danger,#ef4444) 18%, transparent);border-color:color-mix(in srgb, var(--roxy-danger,#ef4444) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.cho-tile.neutral{color:var(--roxy-fg,#0a0a0a);background:0 0}.cho-tile.now{outline:2px solid var(--roxy-accent,#f59e0b);outline-offset:1px;box-shadow:0 0 0 4px color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.tile-name{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);overflow-wrap:anywhere;grid-column:1;min-width:0}.tile-time{font-size:var(--roxy-text-xs,.75rem);opacity:.8;white-space:nowrap;text-align:right;grid-area:1/2/3;align-self:center}.tile-lord{font-size:var(--roxy-text-sm,.875rem);opacity:.85;grid-column:1;align-items:center;gap:.25em;display:flex}`],ya=m([(0,jl.customElement)("roxy-choghadiya-grid")],ya);var J=require("lit"),xn=require("lit/decorators.js");var sm=["sun","moon","venus","mars"],Kl=["fire","earth","air","water"],Vl={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},nm={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},wr=class extends g{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[a,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[a]=s);return t}return{}}renderData(e){let t=e.overallScore,a=this.getBreakdown(),s="rating"in e?e.rating:void 0,o="archetype"in e?e.archetype:void 0,i="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,p="strengths"in e?e.strengths:void 0,d="challenges"in e?e.challenges:void 0,h="keyAspects"in e?e.keyAspects:void 0,b=!this.hideReadings,L=this.t(Vl[this.mode]??Vl.astrology);return J.html`<article class="card" part="card" aria-label="${L}"><div class="head" part="header"><h2>${L}</h2><div>${typeof t=="number"?J.html`<div class="score">${Math.round(t)}</div>`:J.nothing} ${s?J.html`<div class="rating">${s}</div>`:J.nothing}</div></div>${Object.keys(a).length>0?J.html`<div role="list" part="details breakdown">${Object.entries(a).map(([v,E])=>J.html`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${v}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,E))}%"></span></span> <span>${Math.round(E)}</span></div>`)}</div>`:J.nothing} ${o?J.html`<p><span class="archetype">${o.label}</span> ${o.description&&b?J.html`· ${o.description}`:J.nothing}</p>`:J.nothing} ${l&&b?J.html`<p class="lead">${l}</p>`:J.nothing} ${c&&b?J.html`<p class="body">${c}</p>`:J.nothing} ${i&&b?J.html`<p class="body">${i}</p>`:J.nothing} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${b&&((p?.length??0)>0||(d?.length??0)>0)?J.html`<div class="lists" part="section strengths-challenges">${p?.length?J.html`<div><h3>${this.t("Strengths")}</h3><ul>${p.map(v=>J.html`<li>${v}</li>`)}</ul></div>`:J.nothing} ${d?.length?J.html`<div><h3>${this.t("Challenges")}</h3><ul>${d.map(v=>J.html`<li>${v}</li>`)}</ul></div>`:J.nothing}</div>`:J.nothing} ${h?.length?J.html`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul class="key-aspects">${h.slice(0,6).map(v=>J.html`<li>${om(this.effectiveLang(),v,b)}</li>`)}</ul></div></div>`:J.nothing}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?J.html`<div class="pills" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?J.html`<span class="pill">${this.t("Total")}: ${e.total}</span>`:J.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill">${this.t("Neutral: {{count}}",{count:e.neutral})}</span></div>`:J.nothing}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return J.nothing;let a=e?.persons,s=sm.map(o=>{let i=t[o];if(!i)return null;let l=c=>{let p=H((c==="person1"?i.person1Sign:i.person2Sign)??""),d=a?.[c]?.[o]?.degree,h=Z(p)??"",b=typeof d=="number"?` ${Math.round(d)}°`:"";return`${h} ${p}${b}`.trim()};return{label:`${R(o)??""} ${H(o)}`.trim(),aside:tt(this.effectiveLang(),[l("person1"),l("person2")]),body:i.description??""}}).filter(o=>o!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return J.nothing;let t=e.person1,a=e.person2,s=Math.max(1,...Kl.map(i=>Math.max(t?.[i]??0,a?.[i]??0))),o=e.sharedElement?.toLowerCase();return J.html`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row head"><span></span> <span>${this.t("Person 1")}</span> <span>${this.t("Person 2")}</span></div>${Kl.map(i=>{let l=t?.[i]??0,c=a?.[i]??0;return J.html`<div class="${i===o?"el-row shared":"el-row"}"><span class="el-name">${i}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?J.html`<p class="shared-note">${e.description}</p>`:J.nothing}</section>`}renderSubScores(){let e=this.data;if(!e)return J.nothing;let t=[];if("lifePath"in e){let a=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,o]of a)o&&t.push({label:this.t(s),aside:[tt(this.effectiveLang(),[String(o.person1),String(o.person2)]),_e(this.effectiveLang(),o.compatibility,0)].filter(Boolean).join(" · "),body:o.description??""})}if("cycles"in e&&e.cycles)for(let[a,s]of Object.entries(e.cycles))s&&t.push({label:br(a,o=>this.t(o)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:_e(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(nm[s.phase]):""].filter(Boolean).join(" · "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};wr.styles=[u,q,me,J.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);grid-template-columns:1fr auto;display:grid}.head h2{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.score{font-variant-numeric:tabular-nums;font-size:2rem;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);line-height:1}.rating{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem)}.bar-row{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:8rem 1fr 3.5rem;align-items:center;display:grid}.bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:8px;overflow:hidden}.bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-row>span:last-child{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);text-align:right}.archetype{color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{padding-left:var(--roxy-space-md,1rem);margin:0}.lead{color:var(--roxy-fg,#0a0a0a);margin:0;font-weight:500}p.body{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.pills{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.elements{gap:var(--roxy-space-sm,.5rem);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:4rem 1fr 1fr;display:grid}.el-row .el-name{text-transform:capitalize;color:var(--roxy-fg,#0a0a0a)}.el-row.head span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.el-row.head span:nth-child(2){text-align:right}.el-bar{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:.4rem;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:auto;height:8px;display:flex;overflow:hidden}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-info,#0284c7)}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold,600)}.shared-note{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.key-aspects{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}`],m([(0,xn.property)({type:String,reflect:!0})],wr.prototype,"mode",2),wr=m([(0,xn.customElement)("roxy-compatibility-card")],wr);function om(n,r,e){let t=$t(r),a=typeof r.orb=="number"?` (orb ${f(n,r.orb,1)}°)`:"",s=[r.planet1,t,r.planet2].filter(Boolean).join(" ");return r.description&&e?`${s}${a} · ${r.description}`:`${s}${a}`}var Vt=require("lit"),Yl=require("lit/decorators.js");var ql={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},im={fortunate:"success",unfortunate:"danger",mixed:"warning"},fa=class extends g{renderData(r){let e=j(this.effectiveLang(),r.number);return Vt.html`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="label">${this.t("Compound number")}</p>${r.name?Vt.html`<h2 class="name">${r.name}</h2>`:Vt.nothing}</div></header><div class="badges" part="details"><span class="badge">${this.t("Root number {{n}}",{n:j(this.effectiveLang(),r.root)})}</span> <span class="${`badge ${im[r.nature]??""}`}">${ql[r.nature]?this.t(ql[r.nature]):D(r.nature)}</span> ${typeof r.sameAs=="number"?Vt.html`<span class="badge">${this.t("Same meaning as {{n}}",{n:j(this.effectiveLang(),r.sameAs)})}</span>`:Vt.nothing}</div>${r.meaning&&!this.hideReadings?Vt.html`<p class="meaning" part="section readings">${r.meaning}</p>`:Vt.nothing}</article>`}};fa.styles=[u,Vt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.hero>div{min-width:0}.numeral{font-size:3rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;flex-shrink:0}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;padding:3px 10px}.badge.success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.badge.warning{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 16%, transparent);color:var(--_warning-fg)}.meaning{margin:0;line-height:1.6}`],fa=m([(0,Yl.customElement)("roxy-compound-number")],fa);var ke=require("lit"),Ul=require("lit/decorators.js");var lm={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},dm=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),cm={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function bn(n){let r=[],e=[];for(let o of n.toLowerCase().split(/[\s-]+/)){let i=cm[o];if(i){e.push(i);continue}let l=lm[o]??(dm.has(o)?o:"");l&&r.push(l)}let[t,a]=r;if(!t)return"var(--roxy-border, #e4e4e7)";let s=a?`color-mix(in srgb, ${t}, ${a})`:t;for(let[o,i]of e)s=`color-mix(in srgb, ${s} ${i}%, ${o})`;return s}var xa=class extends g{renderData(r){let e=r.colors??[],t=r.keywords??[],a=r.pairsWith??[],s=Us(this.effectiveLang(),r.birthMonth)||void 0,o=r.name??this.t("Crystal");return ke.html`<article class="wrap" part="card" aria-label="${o}"><div class="hero" part="header">${r.imageUrl?ke.html`<img class="photo" part="chart" src="${r.imageUrl}" alt="${o}" loading="lazy">`:ke.nothing}<div><h2 class="title">${r.name}</h2>${r.description&&!this.hideReadings?ke.html`<p class="desc">${r.description}</p>`:ke.nothing}</div></div><dl class="attrs" part="details">${this.attr(this.t("Planet"),r.planet)} ${this.attr(this.t("Hardness"),typeof r.hardness=="number"?this.t("{{value}} Mohs",{value:f(this.effectiveLang(),r.hardness)}):void 0)} ${this.attr(this.t("Vibration"),r.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),r.chakras)} ${this.list(this.t("Zodiac"),r.zodiacSigns)} ${this.list(this.t("Elements"),r.elements)} ${e.length?ke.html`<div class="attr"><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(i=>ke.html`<span class="color"><span class="dot" style="${`background:${bn(i)}`}"></span>${i}</span>`)}</div></dd></div>`:ke.nothing}</dl>${this.renderMeaning(r.meaning)} ${t.length&&!this.hideReadings?ke.html`<div part="section keywords"><p class="section-label">${this.t("Keywords")}</p><div class="chips">${t.map(i=>ke.html`<span class="chip">${i}</span>`)}</div></div>`:ke.nothing} ${r.affirmation&&!this.hideReadings?ke.html`<p class="affirmation">${r.affirmation}</p>`:ke.nothing} ${a.length?ke.html`<div part="section pairs-with"><p class="section-label">${this.t("Pairs with")}</p><div class="chips">${a.map(i=>ke.html`<span class="chip">${String(i).replace(/-/g," ")}</span>`)}</div></div>`:ke.nothing}</article>`}attr(r,e){return e==null||e===""?ke.nothing:ke.html`<div class="attr"><dt>${r}</dt><dd>${e}</dd></div>`}list(r,e){return e?.length?ke.html`<div class="attr"><dt>${r}</dt><dd>${e.join(", ")}</dd></div>`:ke.nothing}renderMeaning(r){if(!r||this.hideReadings)return ke.nothing;let t=[[this.t("Spiritual"),r.spiritual],[this.t("Emotional"),r.emotional],[this.t("Physical"),r.physical]].filter(([,a])=>!!a);return t.length===0?ke.nothing:ke.html`<div class="meaning" part="section meaning">${t.map(([a,s])=>ke.html`<h3>${a}</h3><p>${s}</p>`)}</div>`}};xa.styles=[u,ke.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{gap:var(--roxy-space-md,1rem);align-items:flex-start;display:flex}.photo{border-radius:var(--roxy-radius-md,8px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);flex:none;width:96px;height:96px}.title{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600)}.desc{line-height:1.55;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.attrs{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));display:grid}.attr{gap:2px;display:grid}.attr dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.attr dd{font-size:var(--roxy-text-sm,.875rem);margin:0;font-weight:500}.colors{flex-wrap:wrap;gap:.4rem;display:flex}.color{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;align-items:center;gap:.3rem;display:inline-flex}.dot{border-radius:var(--roxy-radius-full,9999px);border:1px solid color-mix(in srgb, var(--roxy-fg,#0a0a0a) 18%, transparent);width:.7rem;height:.7rem}.meaning h3{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.meaning p{margin:0 0 var(--roxy-space-sm,.5rem) 0;font-size:var(--roxy-text-sm,.875rem);line-height:1.55}.chips{flex-wrap:wrap;gap:.3rem;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;padding:1px 8px}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.affirmation{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);font-style:italic;font-size:var(--roxy-text-sm,.875rem);border-radius:0 var(--roxy-radius-sm,4px) var(--roxy-radius-sm,4px) 0;margin:0}`],xa=m([(0,Ul.customElement)("roxy-crystal-card")],xa);var Mt=require("lit"),vn=require("lit/decorators.js");var kr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let a=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return Mt.html`<section class="wrap" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(o=>Mt.html`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?Mt.html`<img class="photo" src="${o.imageUrl}" alt="${o.name??this.t("Crystal")}" loading="lazy">`:Mt.html`<div class="photo" aria-hidden="true"></div>`}<p class="name">${o.name}</p>${o.colors&&o.colors.length>0?Mt.html`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:tt(this.effectiveLang(),o.colors)})}">${o.colors.map(i=>Mt.html`<span class="swatch" style="${`background:${bn(i)}`}" title="${i}"></span>`)}</div>`:Mt.nothing}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Mt.html`<div class="detail" part="detail">${this.openedRow}</div>`:Mt.nothing}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:Us(this.effectiveLang(),e.month)}):this.t("Crystals")}};kr.styles=[u,Mt.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs,.25rem);text-align:left;width:100%;font:inherit;color:inherit;background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);box-shadow:var(--roxy-shadow-sm);cursor:pointer;transition:border-color .12s;display:grid}.tile[aria-pressed=true],.tile:hover,.tile:focus-visible{border-color:var(--roxy-accent,#f59e0b);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm,4px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);width:100%}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.colors{flex-wrap:wrap;gap:4px;display:flex}.swatch{border-radius:var(--roxy-radius-full,9999px);border:1px solid color-mix(in srgb, var(--roxy-fg,#0a0a0a) 18%, transparent);width:10px;height:10px}`],m([(0,vn.property)({type:String,reflect:!0})],kr.prototype,"heading",2),kr=m([(0,vn.customElement)("roxy-crystal-grid")],kr);var le=require("lit"),hs=require("lit/decorators.js");function Zl(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function Vo(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function qo(n){if(!n)return"";let r=[];return n.years&&r.push(`${n.years}y`),n.months&&r.push(`${n.months}m`),n.days&&r.push(`${n.days}d`),r.length?r.join(" "):"0d"}function Wl(n,r){return Jt(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,r)}function Ln(n,r){let e=r.startDate?A(n,r.startDate):"",t=r.endDate?A(n,r.endDate):"";return e&&e===t?`${he(n,r.startDate)} to ${he(n,r.endDate)}`:e&&t?`${e} to ${t}`:e||t}var dr=class extends g{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),a=t.length?Math.max(...t.map(p=>p.durationYears)):0,s=mm(t.length?Math.min(...t.map(p=>p.durationYears)):0),o=this.hideReadings?[]:this.readings(e,t),i=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...o.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:o.length})}]:[],...i.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(p=>p.id===this.view)?this.view:"timeline";return le.html`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?pt({items:l,active:c,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):le.nothing}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:le.nothing}">${c==="timeline"?le.html`${this.period==="current"?this.renderCurrent(e):le.nothing} ${t.length>0?le.html`<div class="timeline" part="chart timeline" role="list">${t.map(p=>this.renderBar(p,a,s,e.houseThemes))}</div>`:le.nothing}`:le.nothing} ${c==="readings"?this.renderReadings(o):le.nothing} ${c==="frame"?this.renderFrame(i):le.nothing}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?le.html`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?le.html`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:le.nothing}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let a="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${a}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${f(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",ra(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let a="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${qo(e.birthDashaBalance)} of the opening ${a}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return le.html`<dl class="frame" part="details frame">${e.map(([t,a])=>le.html`<div><dt>${t}</dt><dd>${a}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=Vo(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Zl(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=Vo(e);if(!t)return le.nothing;let a=t.period,s=Ln(this.effectiveLang(),a),o=a.nominalStartDate?A(this.effectiveLang(),a.nominalStartDate):"";return le.html`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:a.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof a.durationYears=="number"?` (${pm(this.effectiveLang(),a.durationYears)})`:""})} ${o?le.html`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:o})}`:le.nothing}</p>`}readings(e,t){let a=[],s=Vo(e);if(s?.period.interpretation&&a.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Ln(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let i=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,p]of i){if(!c?.interpretation)continue;let d=qo(p);a.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:d?this.t("{{balance}} left",{balance:d}):Ln(this.effectiveLang(),c),body:c.interpretation})}}let o=t.find(i=>this.isCurrent(i));return o?.interpretation&&a.push({label:`${o.planet} ${Zl(e)}`,aside:Ln(this.effectiveLang(),o),body:o.interpretation}),a}renderCurrent(e){if(!("mahadasha"in e))return le.nothing;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return le.html`<div class="current" part="details current">${t.map(([a,s,o])=>{if(!s)return le.nothing;let i=qo(o),l=Wl(s.significators,e.houseThemes);return le.html`<div><span>${this.t(a)}</span> <strong>${s.planet}</strong> ${i?le.html`<small>${this.t("{{balance}} left",{balance:i})}</small>`:le.nothing} ${l?le.html`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:le.nothing}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let t=Date.now(),a=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(a)||Number.isNaN(s)?!1:t>=a&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),a=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(a)||s<t||s>=a||a<=t?-1:(s-t)/(a-t)}renderBar(e,t,a,s){let o=e.durationYears,i=t>0?o/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,p=l?"bar-track bar-now":"bar-track",d=Wl(e.significators,s),h=["bar",l?"now":"",a==="time"?"fine":""].filter(Boolean).join(" ");return le.html`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?le.html`<span class="now-badge">${this.t("Now")}</span>`:le.nothing} </span><span class="${p}"><span class="bar-fill" style="width:${i}%"></span> ${c>=0?le.html`<span class="bar-progress" style="left:${c*i}%" aria-hidden="true"></span>`:le.nothing} </span><span class="dates">${e.startDate?sr(this.effectiveLang(),e.startDate,a):""} ${e.endDate?le.html`- ${sr(this.effectiveLang(),e.endDate,a)}`:""} </span>${d?le.html`<span class="houses">${this.t("Signifies {{houses}}",{houses:d})}</span>`:le.nothing}</div>`}};dr.styles=[u,q,me,ot,le.css`.wrap{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.nakshatra{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.current{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));display:grid}.current div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.current div strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.current div small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.parent{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.timeline{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{grid-template-columns:var(--roxy-label-col) 1fr 8rem;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);align-items:center;row-gap:.15rem;display:grid}.bar.now strong{color:var(--roxy-accent-ink,#b45309)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.bar-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent,#f59e0b);opacity:.45;height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-now .bar-fill{opacity:1}.bar-progress{background:var(--roxy-accent-ink,#b45309);width:2px;box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 35%, transparent);border-radius:2px;position:absolute;top:-2px;bottom:-2px}.dates{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right}.bar.fine{grid-template-columns:var(--roxy-label-col) 1fr}.bar.fine .dates{text-align:left;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md,1rem)}.frame{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));margin:0;display:grid}.frame dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}.frame dd{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;margin:0}.block{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem)}`],m([(0,hs.property)({type:String,reflect:!0})],dr.prototype,"period",2),m([(0,hs.state)()],dr.prototype,"view",2),dr=m([(0,hs.customElement)("roxy-dasha-timeline")],dr);var Yo=365.25;function pm(n,r){if(r>=1)return`${f(n,r,1)} years`;let e=r*Yo;if(e>=1)return`${f(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${f(n,t,1)} hours`:`${f(n,t*60,0)} minutes`}function mm(n){return n>=2?"year":n>=60/Yo?"month":n>=1/Yo?"day":"time"}var X=require("lit"),$n=require("lit/decorators.js"),Zo=require("lit/directives/if-defined.js");var Xl=require("lit"),Sr=Xl.css`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem)}table.stacked tr:last-child{border-bottom:0}table.stacked td{white-space:normal;border:0;padding:.1rem 0}table.stacked td:empty{display:none}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}}`;var Jl=["title","name","label","heading","overview","summary"],hm=80,gm=80,um=3,ym=["imageUrl","image","icon","symbol"],fm=["imageUrl","image"],xm=["affirmation","mantra","motto","quote"],bm=new Set(["seed"]),vm=new Set(["id","slug","key"]),Lm=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),$m=8,Ql=1,wm=12,km=n=>n.toLowerCase().replace(/[_-]/g,""),ed=n=>/^(has|is)([A-Z_]|$)/.test(n),Sm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,Rm=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,Cm=/^https?:\/\//,Dm=6;function Tm(n,r){if(!Number.isInteger(r))return!1;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function ba(n){return n===null||["string","number","boolean"].includes(typeof n)}function Uo(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(ba))}function td(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let r=Object.values(n);return r.length===0||r.every(td)}var Rr=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=Dm?X.html`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:X.html`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?X.nothing:ba(e)?X.html`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?X.html`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(ba)?this.renderChips(e):e.every(a=>a!==null&&typeof a=="object"&&!Array.isArray(a))?this.renderObjectArray(e):X.html`<ol>${e.map(a=>X.html`<li>${this.renderValue(a)}</li>`)}</ol>`}renderChips(e){return X.html`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>X.html`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(h=>this.suppress(h)),a=this.collectKeys(t),s=new Set(a.filter(h=>t.some(b=>typeof b[h]=="string"&&Array.from(b[h]).length>gm))),o=new Set(a.filter(h=>s.has(h)||t.some(b=>Uo(b[h]??null)))),i=s.size>0||o.size>0&&o.size<a.length,l=h=>i?o.has(h)?"col-wide":"col-tight":"",c=o.size>0&&a.length>um,p=t.length>wm;return X.html`<div class="${c?"roxy-collection":p&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?X.nothing:"0"}">${c?X.html`${p?X.html`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:X.nothing} ${t.map(h=>X.html`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:X.html`<table class="${s.size?"roxy-table stacked prose":o.size?"roxy-table stacked":"roxy-table"}" role="table">${p?X.html`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:X.nothing}<thead><tr>${a.map(h=>X.html`<th class="${l(h)}">${Pe(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>X.html`<tr>${a.map(b=>X.html`<td class="${l(b)}" data-label="${Pe(this.effectiveLang(),b)}">${this.renderCell(h[b],b)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=os(e),a=Jl.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let o=km(s);return bm.has(o)||a&&vm.has(o)?!1:!Lm.has(o)}))}renderObject(e){let t=this.suppress(e),a=Jl.find(d=>typeof t[d]=="string"&&t[d].length<=hm),s=ym.find(d=>typeof t[d]=="string"&&t[d].startsWith("http")),o=a!=="summary"&&typeof t.summary=="string"?"summary":null,i=xm.find(d=>typeof t[d]=="string"),l=Object.entries(t).filter(([d,h])=>d!==a&&d!==o&&d!==i&&!fm.includes(d)&&!td(h)),c=l.filter(([,d])=>!Uo(d)),p=l.filter(([,d])=>Uo(d));return X.html`${s?X.html`<img class="roxy-image" src="${String(t[s])}" alt="${a?String(t[a]):this.t("illustration")}" loading="lazy">`:X.nothing} ${a?X.html`<h3 class="roxy-title" part="header">${t[a]}</h3>`:X.nothing} ${o?X.html`<p class="roxy-summary">${t[o]}</p>`:X.nothing} ${i?X.html`<blockquote class="roxy-quote">${t[i]}</blockquote>`:X.nothing} ${c.length>0?X.html`<dl class="roxy-rows" part="details label-track">${c.map(([d,h])=>X.html`<dt>${Pe(this.effectiveLang(),d)}</dt><dd>${this.renderField(h,d)}</dd>`)}</dl>`:X.nothing} ${p.map(([d,h])=>this.renderSection(d,h))}`}renderSection(e,t){let a=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),o=Pe(this.effectiveLang(),e);return a>$m||this.depth>=Ql?X.html`<details class="roxy-section" ?open="${this.depth<Ql}"><summary>${o}</summary>${s}</details>`:X.html`<div class="roxy-section"><h4>${o}</h4>${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&ed(t)?X.html`<span class="roxy-badge">${this.t("Yes")}</span>`:ba(e)?X.html`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(ba)?this.renderChips(e):X.html`<roxy-data bare lang="${(0,Zo.ifDefined)(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&ed(t)?X.html`<span class="roxy-badge">${this.t("Yes")}</span>`:ba(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(ba)?e.filter(a=>a!==null).map(a=>this.formatScalar(a)).join(", "):X.html`<roxy-data bare lang="${(0,Zo.ifDefined)(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return typeof e=="string"&&Cm.test(e)?X.html`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&Tm(t,e)?String(e):f(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):Sm.test(e)?he(this.effectiveLang(),e):Rm.test(e)?D(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let a of e)for(let s of Object.keys(a))t.add(s);return Array.from(t)}};Rr.styles=[u,X.css`.roxy-card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm)}.roxy-card a{color:var(--roxy-accent-ink,#b45309)}.roxy-title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-sm,.5rem) 0;color:var(--roxy-primary,#0f172a);letter-spacing:var(--roxy-tracking-tight)}.roxy-summary{color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-md,1rem) 0;font-size:var(--roxy-text-sm,.875rem)}dl.roxy-rows{grid-template-columns:minmax(8ch, min(25%, max-content)) minmax(0, 1fr);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);margin:0;display:grid}dl.roxy-rows dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:capitalize}dl.roxy-rows dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);word-break:break-word;margin:0}ul.roxy-chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}ul.roxy-chips li{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:32rem}.roxy-collection:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm,.5rem)}table.roxy-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}table.roxy-table caption{text-align:start}table.roxy-table th,table.roxy-table td{border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem);text-align:left;vertical-align:top;text-transform:none;word-break:normal;overflow-wrap:normal}table.roxy-table th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em;white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table) :is(th,td).col-wide{width:auto}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{border-radius:var(--roxy-radius-md,8px);max-width:100%;height:auto;margin-bottom:var(--roxy-space-md,1rem)}.roxy-section{margin-top:var(--roxy-space-md,1rem)}.roxy-section h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);margin:0 0 var(--roxy-space-xs,.25rem) 0;text-transform:capitalize}blockquote.roxy-quote{margin:var(--roxy-space-md,1rem) 0;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.roxy-badge{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-block}details.roxy-section{margin-top:var(--roxy-space-md,1rem)}details.roxy-section>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569);text-transform:capitalize}details.roxy-section>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:4px}`,Sr],m([(0,$n.property)({attribute:!1})],Rr.prototype,"depth",2),Rr=m([(0,$n.customElement)("roxy-data")],Rr);var Et=require("lit"),Tn=require("lit/decorators.js");var Y=require("lit");var qt=400,Se=20,gt=qt-2*Se,Ve=qt/2,rd=Object.fromEntries(Oe.map(n=>[n.toLowerCase(),n])),Am=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],nd="ʳ",od="ᶜ",id="ʷ";function Wo(n){return Oe.indexOf(n)}function zm(n){let r=ol(n.graha)??n.graha,e=`${n.isRetrograde?nd:""}${n.combust?od:""}${n.war?id:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${r}${e}`;let{degree:t}=Nt(n.longitude);return`${r} ${t}°${e}`}function Mm(n,r,e){let t=[H(n.graha)],a=n.natalReference===!0;if(a&&t.push(e("in {{sign}}",{sign:r})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Nt(n.longitude),o=String(s.minute).padStart(2,"0");t.push(a?`D1: ${s.degree}°${o}' ${s.sign}`:`${s.degree}°${o}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${a?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" · ")}function Xo(n,r,e,t,a,s){let o=t-(n.length-1)*a/2;return n.map((i,l)=>{let c=o+l*a;return Y.svg`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${zm(i)}<title>${Mm(i,r,s)}</title></text>`})}function kn(n,r={}){let{divisionLabel:e,lagnaOverride:t,states:a,natalReference:s}=r,o=new Set((a?.combustion??[]).map(d=>(d.planet??"").toLowerCase())),i=new Map;for(let d of a?.planetaryWar??[])!d.planet1||!d.planet2||(i.set(d.planet1.toLowerCase(),{opponent:d.planet2,winner:d.winner}),i.set(d.planet2.toLowerCase(),{opponent:d.planet1,winner:d.winner}));let l={};for(let d of Oe)l[d.toLowerCase()]=[];let c=t?rd[t.toLowerCase()]??"":"",p=c;for(let[d,h]of Object.entries(n??{})){let b=(h?.rashi??"").toLowerCase();if(d==="Lagna"||h?.graha==="Lagna"){c||(p=rd[b]??"");continue}if(!b||!(b in l))continue;let L=h.graha??d,v=L.toLowerCase();l[b]?.push({graha:L,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:o.has(v)||void 0,war:i.get(v)})}return{lagnaSign:p,placements:l,divisionLabel:e}}var va=gt/4,Em={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function Pm(n){let r=Em[n]??{col:0,row:0};return{x:Se+r.col*va,y:Se+r.row*va,w:va,h:va}}function _m(n){let r=Se,e=Se+va,t=Se+2*va,a=Se+3*va,s=qt-Se;return Y.svg`
17
17
  <rect class="line" x=${r} y=${r} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
18
18
  <line class="line" x1=${r} y1=${e} x2=${s} y2=${e} stroke-width="1" />
19
19
  <line class="line" x1=${r} y1=${a} x2=${s} y2=${a} stroke-width="1" />
@@ -24,7 +24,7 @@
24
24
  <line class="line" x1=${t} y1=${r} x2=${t} y2=${e} stroke-width="1" />
25
25
  <line class="line" x1=${t} y1=${a} x2=${t} y2=${s} stroke-width="1" />
26
26
  ${n?Y.svg`<text class="centre-label" x=${Ve} y=${Ve} text-anchor="middle" dominant-baseline="central">${n}</text>`:Y.nothing}
27
- `}function Jo(n,r){let e=Wo(r),t=Wo(n);return e===-1||t===-1?0:(t-e+12)%12+1}function _m(n,r,e,t,a){let s=Em(n),o=s.x+s.w/2,i=s.y+s.h/2,l=en(n)??n,c=14;return Y.svg`
27
+ `}function Jo(n,r){let e=Wo(r),t=Wo(n);return e===-1||t===-1?0:(t-e+12)%12+1}function Nm(n,r,e,t,a){let s=Pm(n),o=s.x+s.w/2,i=s.y+s.h/2,l=en(n)??n,c=14;return Y.svg`
28
28
  <g class=${e?"cell lagna":"cell"}>
29
29
  ${e?Y.svg`
30
30
  <rect class="lagna-bg" x=${s.x} y=${s.y} width=${s.w} height=${s.h} />
@@ -35,25 +35,25 @@
35
35
  ${e?Y.svg`<text class="lagna-marker" x=${o} y=${s.y+26} text-anchor="middle" dominant-baseline="central">${a("ASC")}</text>`:Y.nothing}
36
36
  ${r.length?Xo(r,n,o,i+4,14,a):Y.nothing}
37
37
  </g>
38
- `}function rd(n,r){let e=n.lagnaSign.toLowerCase();return Y.svg`
39
- ${Pm(n.divisionLabel)}
40
- ${Oe.map(t=>_m(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Jo(t,n.lagnaSign),r))}
41
- `}var id={tl:{x:Se,y:Se},tr:{x:qt-Se,y:Se},br:{x:qt-Se,y:qt-Se},bl:{x:Se,y:qt-Se},top:{x:Ve,y:Se},right:{x:qt-Se,y:Ve},bottom:{x:Ve,y:qt-Se},left:{x:Se,y:Ve},tlMid:{x:Ve-gt/4,y:Ve-gt/4},trMid:{x:Ve+gt/4,y:Ve-gt/4},brMid:{x:Ve+gt/4,y:Ve+gt/4},blMid:{x:Ve-gt/4,y:Ve+gt/4}};function ld(n){let r=n.reduce((t,a)=>t+a.x,0)/n.length,e=n.reduce((t,a)=>t+a.y,0)/n.length;return{x:r,y:e}}var Nm=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,r])=>{let e=r.map(t=>t==="centre"?{x:Ve,y:Ve}:id[t]);return[n,{centre:ld(e),floor:Math.max(...e.map(t=>t.y))}]})),ad=12,Im=16,Gm=8;function Om(n){let{tl:r,tr:e,br:t,bl:a,top:s,right:o,bottom:i,left:l}=id;return Y.svg`
38
+ `}function ad(n,r){let e=n.lagnaSign.toLowerCase();return Y.svg`
39
+ ${_m(n.divisionLabel)}
40
+ ${Oe.map(t=>Nm(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Jo(t,n.lagnaSign),r))}
41
+ `}var ld={tl:{x:Se,y:Se},tr:{x:qt-Se,y:Se},br:{x:qt-Se,y:qt-Se},bl:{x:Se,y:qt-Se},top:{x:Ve,y:Se},right:{x:qt-Se,y:Ve},bottom:{x:Ve,y:qt-Se},left:{x:Se,y:Ve},tlMid:{x:Ve-gt/4,y:Ve-gt/4},trMid:{x:Ve+gt/4,y:Ve-gt/4},brMid:{x:Ve+gt/4,y:Ve+gt/4},blMid:{x:Ve-gt/4,y:Ve+gt/4}};function dd(n){let r=n.reduce((t,a)=>t+a.x,0)/n.length,e=n.reduce((t,a)=>t+a.y,0)/n.length;return{x:r,y:e}}var Im=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,r])=>{let e=r.map(t=>t==="centre"?{x:Ve,y:Ve}:ld[t]);return[n,{centre:dd(e),floor:Math.max(...e.map(t=>t.y))}]})),sd=12,Gm=16,Om=8;function Bm(n){let{tl:r,tr:e,br:t,bl:a,top:s,right:o,bottom:i,left:l}=ld;return Y.svg`
42
42
  <rect class="line" x=${r.x} y=${r.y} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
43
43
  <polygon class="line" points="${s.x},${s.y} ${o.x},${o.y} ${i.x},${i.y} ${l.x},${l.y}" stroke-width="1" fill="none" />
44
44
  <line class="line" x1=${r.x} y1=${r.y} x2=${t.x} y2=${t.y} stroke-width="1" />
45
45
  <line class="line" x1=${e.x} y1=${e.y} x2=${a.x} y2=${a.y} stroke-width="1" />
46
46
  ${n?Y.svg`<text class="centre-label" x=${Ve} y=${Ve} text-anchor="middle" dominant-baseline="central">${n}</text>`:Y.nothing}
47
- `}function Bm(n,r,e,t,a,s){let o=Nm[n];if(!o)return Y.svg``;let i=o.centre,l=Math.min(14,Math.abs(i.y-Ve)*.45+6),c=(t.length-1)*ad,p=Math.max(i.y+8-c/2,i.y-l+Im),d=Math.max(0,p+c-(o.floor-Gm)),h=i.y-l-d,b=p-d+c/2,L=a?`${r} · ${en(e)??e}`:`${r}`;return Y.svg`
47
+ `}function Fm(n,r,e,t,a,s){let o=Im[n];if(!o)return Y.svg``;let i=o.centre,l=Math.min(14,Math.abs(i.y-Ve)*.45+6),c=(t.length-1)*sd,p=Math.max(i.y+8-c/2,i.y-l+Gm),d=Math.max(0,p+c-(o.floor-Om)),h=i.y-l-d,b=p-d+c/2,L=a?`${r} · ${en(e)??e}`:`${r}`;return Y.svg`
48
48
  <g class=${a?"cell lagna":"cell"}>
49
49
  <text class="rashi-num" x=${i.x} y=${h} text-anchor="middle" dominant-baseline="central">${L}</text>
50
50
  ${a?Y.svg`<text class="lagna-marker" x=${i.x} y=${h-12} text-anchor="middle" dominant-baseline="central">${s("ASC")}</text>`:Y.nothing}
51
- ${t.length?Xo(t,e,i.x,b,ad,s):Y.nothing}
51
+ ${t.length?Xo(t,e,i.x,b,sd,s):Y.nothing}
52
52
  </g>
53
- `}function Fm(n,r){return Y.svg`
54
- ${Om(n.divisionLabel)}
55
- ${Oe.map((e,t)=>{let a=Jo(e,n.lagnaSign);return Bm(a,t+1,e,n.placements[e.toLowerCase()]??[],a===1,r)})}
56
- `}var wn=gt/3;function Hm(){let n=Se,r=Se+wn,e=Se+2*wn,t=qt-Se,E={Aries:[{x:r,y:n},{x:e,y:n},{x:e,y:r},{x:r,y:r}],Taurus:[{x:n,y:n},{x:r,y:n},{x:r,y:r}],Gemini:[{x:n,y:n},{x:r,y:r},{x:n,y:r}],Cancer:[{x:n,y:r},{x:r,y:r},{x:r,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:r,y:e},{x:n,y:t}],Virgo:[{x:r,y:e},{x:r,y:t},{x:n,y:t}],Libra:[{x:r,y:e},{x:e,y:e},{x:e,y:t},{x:r,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:r},{x:t,y:r},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:r},{x:e,y:r}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:r}]},Q={};for(let[$e,nt]of Object.entries(E))Q[$e]={points:[...nt],centroid:ld(nt)};return Q}var jm=Hm();function Km(n){let r=Se,e=Se+wn,t=Se+2*wn,a=qt-Se;return Y.svg`
53
+ `}function Hm(n,r){return Y.svg`
54
+ ${Bm(n.divisionLabel)}
55
+ ${Oe.map((e,t)=>{let a=Jo(e,n.lagnaSign);return Fm(a,t+1,e,n.placements[e.toLowerCase()]??[],a===1,r)})}
56
+ `}var wn=gt/3;function jm(){let n=Se,r=Se+wn,e=Se+2*wn,t=qt-Se,E={Aries:[{x:r,y:n},{x:e,y:n},{x:e,y:r},{x:r,y:r}],Taurus:[{x:n,y:n},{x:r,y:n},{x:r,y:r}],Gemini:[{x:n,y:n},{x:r,y:r},{x:n,y:r}],Cancer:[{x:n,y:r},{x:r,y:r},{x:r,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:r,y:e},{x:n,y:t}],Virgo:[{x:r,y:e},{x:r,y:t},{x:n,y:t}],Libra:[{x:r,y:e},{x:e,y:e},{x:e,y:t},{x:r,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:r},{x:t,y:r},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:r},{x:e,y:r}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:r}]},Q={};for(let[$e,nt]of Object.entries(E))Q[$e]={points:[...nt],centroid:dd(nt)};return Q}var Km=jm();function Vm(n){let r=Se,e=Se+wn,t=Se+2*wn,a=qt-Se;return Y.svg`
57
57
  <rect class="line" x=${r} y=${r} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
58
58
  <line class="line" x1=${r} y1=${e} x2=${e} y2=${e} stroke-width="1" />
59
59
  <line class="line" x1=${t} y1=${e} x2=${a} y2=${e} stroke-width="1" />
@@ -68,7 +68,7 @@
68
68
  <line class="line" x1=${a} y1=${a} x2=${t} y2=${t} stroke-width="1" />
69
69
  <line class="line" x1=${r} y1=${a} x2=${e} y2=${t} stroke-width="1" />
70
70
  ${n?Y.svg`<text class="centre-label" x=${Ve} y=${Ve} text-anchor="middle" dominant-baseline="central">${n}</text>`:Y.nothing}
71
- `}function Vm(n,r,e,t,a){let s=jm[n];if(!s)return Y.svg``;let{centroid:o,points:i}=s,l=en(n)??n,c=i.map(p=>`${p.x},${p.y}`).join(" ");return Y.svg`
71
+ `}function qm(n,r,e,t,a){let s=Km[n];if(!s)return Y.svg``;let{centroid:o,points:i}=s,l=en(n)??n,c=i.map(p=>`${p.x},${p.y}`).join(" ");return Y.svg`
72
72
  <g class=${e?"cell lagna":"cell"}>
73
73
  ${e?Y.svg`<polygon class="lagna-bg" points=${c} />`:Y.nothing}
74
74
  <text class="sign-text" x=${o.x} y=${o.y-16} text-anchor="middle" dominant-baseline="central">${l}</text>
@@ -76,60 +76,60 @@
76
76
  ${e?Y.svg`<text class="lagna-marker" x=${o.x} y=${o.y-30} text-anchor="middle" dominant-baseline="central">${a("ASC")}</text>`:Y.nothing}
77
77
  ${r.length?Xo(r,n,o.x,o.y+4,12,a):Y.nothing}
78
78
  </g>
79
- `}function qm(n,r){let e=n.lagnaSign.toLowerCase();return Y.svg`
80
- ${Km(n.divisionLabel)}
81
- ${Oe.map(t=>Vm(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Jo(t,n.lagnaSign),r))}
82
- `}function dd(n){return Wo(n.lagnaSign)!==-1}function Ym(n,r){let e=Object.values(n.placements).flat(),t=[];return e.some(a=>a.isRetrograde)&&t.push(`${sd} ${r("retrograde")}`),e.some(a=>a.combust)&&t.push(`${nd} ${r("combust")}`),e.some(a=>a.war)&&t.push(`${od} ${r("planetary war")}`),t.length===0?Y.nothing:Y.html`<p class="roxy-frame">${t.join(" · ")}</p>`}function Um(n){return Y.html`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function Sn(n,r){let e=[];dd(n)||e.push(Um(r));let t=Ym(n,r);return t!==Y.nothing&&e.push(t),e}function Rn(n,r,e){if(r==="north"&&!dd(n))return rd(n,e);switch(r){case"north":return Fm(n,e);case"east":return qm(n,e);default:return rd(n,e)}}function Cn(n,r,e){return pt({items:Tm.map(({id:t,source:a})=>({id:t,label:e(a)})),active:n,onSelect:r,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function cd(n,r,e,t){return Y.html`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${pe()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${r} ${t("Sign")}</th><th scope="col">D${r} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([a,s])=>Y.html`<tr><th scope="row">${s.graha??a}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?Y.html`<span>${it(s.longitude)}</span><small>${f(e,s.longitude,12)}°</small>`:Y.nothing}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}var pd=require("lit"),Dn=pd.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.kundli-reference-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.kundli-reference-table th,.kundli-reference-table td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:left;white-space:nowrap;border-bottom:1px solid var(--roxy-border,#e4e4e7)}.kundli-reference-table small{color:var(--roxy-secondary,#475569);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,560px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.line{fill:#0000;stroke:var(--roxy-border,#d4d4d8)}.sign-text{fill:var(--roxy-muted,#71717a);font-size:11px;font-weight:500;font-family:var(--roxy-font-sans);text-transform:uppercase;letter-spacing:.04em}.rashi-num{fill:var(--roxy-muted,#71717a);font-size:12px;font-weight:500;font-family:var(--roxy-font-sans)}.house-num{fill:var(--roxy-accent-ink,#b45309);font-size:11px;font-weight:600;font-family:var(--roxy-font-sans);opacity:.85}.planet-text{fill:var(--roxy-fg,#0a0a0a);font-size:13px;font-weight:600;font-family:var(--roxy-font-sans)}.centre-label{fill:var(--roxy-muted,#71717a);font-size:14px;font-weight:600;font-family:var(--roxy-font-sans);letter-spacing:.02em}.lagna-marker{fill:var(--roxy-accent-ink,#b45309);font-size:10px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.08em;text-transform:uppercase}.lagna-bg{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent)}.lagna-slash{stroke:var(--roxy-accent,#f59e0b);stroke-linecap:round;opacity:.7}`;var Zm={number:9,name:"Navamsa"},md=n=>"division"in n&&n.division?n.division:Zm,Cr=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=md(this.data),t=`D${e.number} ${e.name}`;return kn(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=md(e),{vargottama:s}=e;return Et.html`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${a.number} ${a.name} ${Po(a.name,a.sanskritName)?Et.html`<span class="division-meta">· ${a.sanskritName}</span>`:Et.nothing}</h2>${a.significance?Et.html`<p class="significance">${a.significance}</p>`:Et.nothing} ${be(this.effectiveLang(),e.frame,this.translator)} ${Sn(t,this.translator)}</div>${Cn(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Et.html`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${a.number} ${a.name}`})}"><title>D${a.number} ${a.name}</title>${Rn(t,this.chartStyle,this.translator)}</svg>`,`D${a.number} ${a.name}`,this.translator)}</div>${cd(e.chart.meta,a.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?Et.html`<div class="vargottama-row" part="details" role="list" aria-label="${this.t("Vargottama planets")}"><span class="vargottama-label">${this.t("Vargottama")}:</span> ${s.map(o=>Et.html`<span class="vargottama-pill" role="listitem">${R(o)??""} ${o}</span>`)}</div>`:Et.nothing}</div>`}};Cr.styles=[u,Ue,ee,Dn,q,ot,Et.css`.division-meta{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}.significance{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.vargottama-row{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;align-items:center;display:flex}.vargottama-label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin-right:var(--roxy-space-xs,.25rem);font-weight:500}.vargottama-pill{font-size:var(--roxy-text-sm,.875rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 22%, transparent);color:var(--roxy-fg,#0a0a0a);border:1px solid color-mix(in srgb, var(--roxy-accent,#f59e0b) 45%, transparent);border-radius:999px;align-items:center;gap:.2em;padding:.15em .6em;font-weight:600;display:inline-flex}`],m([(0,Tn.property)({type:String,reflect:!0,attribute:"chart-style"})],Cr.prototype,"chartStyle",2),Cr=m([(0,Tn.customElement)("roxy-divisional-chart")],Cr);var Fe=require("lit"),An=require("lit/decorators.js");var Wm={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},Dr=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,a=Wm[this.type]??this.type,s=(e.severity??"").toLowerCase(),o=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,i=o*33,l=o===3?"var(--roxy-danger)":o>=1?"var(--roxy-warning)":"transparent";return Fe.html`<article class="card" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="${`badge ${t?"present":"absent"}`}">${t?this.t("Present"):this.t("Absent")} </span>${be(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Fe.html`<p class="subtype"><span class="subtype-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:Fe.nothing} ${e.severity?Fe.html`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${o}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" style="width:${i}%;background:${l}"></span></div>`:Fe.nothing} ${e.description&&!this.hideReadings?Fe.html`<p class="description">${e.description}</p>`:Fe.nothing} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Fe.html`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(c=>Fe.html`<li>${c}</li>`)}</ul></div>`:Fe.nothing} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Fe.html`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(c=>Fe.html`<li>${c}</li>`)}</ul></div>`:Fe.nothing}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return Fe.nothing;let t=[];for(let[a,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Fe.html`<div><h3>${a}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[o,i]of Object.entries(s))typeof i=="string"&&i.length>0&&t.push(Fe.html`<div><h3>${o}</h3><p>${i}</p></div>`);return t.length===0?Fe.nothing:Fe.html`<div class="effects" part="section effects">${t}</div>`}};Dr.styles=[u,ee,Fe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.subtype{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.subtype .subtype-label{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-size:var(--roxy-text-xs,.75rem);margin-right:.4rem}.badge{align-items:center;gap:var(--roxy-space-xs,.25rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;padding:4px 10px;display:inline-flex}.badge.absent{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.present{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.severity-bar{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 30%, transparent);border-radius:4px;width:100%;height:8px;position:relative;overflow:hidden}.severity-fill{height:100%;transition:width var(--roxy-motion-duration,.2s) ease-out;border-radius:4px;display:block}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}.description{color:var(--roxy-fg,#0a0a0a);margin:0}h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}.effects{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.effects p{font-size:var(--roxy-text-sm,.875rem);margin:0}`],m([(0,An.property)({type:String,reflect:!0})],Dr.prototype,"type",2),Dr=m([(0,An.customElement)("roxy-dosha-card")],Dr);var te=require("lit"),gd=require("lit/decorators.js");var Xm=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Ds(n){if(!n.text)return"";let r=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=r;e&&(t=r?Xm.test(e.trim())?`${r}.${e}`:`${r}, ${e}`:e);let a=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[D(n.text),t].filter(Boolean).join(" "),a,n.basis].filter(Boolean).join(" · ")}var hd=require("lit"),Tr=hd.css`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var Jm=["vata","pitta","kapha"],Qm={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function eh(n){return n.split("-").map(H).join("-")}function th(n,r){return tt(n,(r??"").split(" ").filter(Boolean).map(H))}var La=class extends g{renderData(r){let e=this.effectiveLang(),t=r.composite;return te.html`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 class="title" id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?te.html`<span class="type">${eh(t.type)}</span>`:te.nothing}</header>${this.renderBar(e,r)}<div class="facts" part="details">${t?.dominant?te.html`<span><span class="lbl">${this.t("Dominant")}</span><b>${H(t.dominant)}</b></span>`:te.nothing} ${t?.secondary?te.html`<span><span class="lbl">${this.t("Secondary")}</span><b>${H(t.secondary)}</b></span>`:te.nothing} ${r.lagnaSign?te.html`<span><span class="lbl">${this.t("Lagna")}</span><b>${H(r.lagnaSign)}</b></span>`:te.nothing} ${r.moonSign?te.html`<span><span class="lbl">${this.t("Moon sign")}</span><b>${H(r.moonSign)}</b></span>`:te.nothing}</div>${this.renderFactors(e,r.factors)} ${this.renderRanking(e,r.strengthRanking)} ${this.renderPlanetDoshas(r.planetDoshas)} ${r.summary&&!this.hideReadings?te.html`<p class="summary" part="section readings">${r.summary}</p>`:te.nothing} ${be(e,r.frame,this.translator)} ${r.meta?.disclaimer?te.html`<p class="disclaimer" part="disclaimer">${r.meta.disclaimer}</p>`:te.nothing}</article>`}renderBar(r,e){let t=e.composite,a=Jm.map(o=>({humour:o,value:t?.[o]??0}));return a.reduce((o,i)=>o+i.value,0)<=0?te.nothing:te.html`<div part="chart"><div class="bar" role="img" aria-label="${a.map(o=>`${H(o.humour)} ${_e(r,o.value,0)}`).join(", ")}">${a.filter(o=>o.value>0).map(o=>te.html`<div class="${`seg seg-${o.humour}`}" style="${`flex: ${o.value} 0 0`}"></div>`)}</div><p class="shares">${a.map(o=>te.html`<span><span class="${`swatch seg-${o.humour}`}"></span>${H(o.humour)} <b>${_e(r,o.value,0)}</b></span>`)}</p></div>`}renderFactors(r,e){let t=e??[];return t.length===0?te.nothing:te.html`<section part="section factors"><h3 class="block-title">${this.t("Factors")}</h3><ul class="rows">${t.map(a=>te.html`<li class="row" part="label-track"><span class="row-name">${this.factorLabel(a.id)}</span><div><span>${th(r,a.input)}</span> ${a.doshas?.length?te.html`· ${a.doshas.map(s=>H(s)).join(", ")}`:te.nothing} ${typeof a.weight=="number"?te.html`· <span class="lbl">${this.t("Weight")}</span>${f(r,a.weight,2)}`:te.nothing} ${this.renderCitation(a.source)}</div></li>`)}</ul></section>`}factorLabel(r){let e=Qm[r??""];return e?this.t(e):D(r??"")}renderCitation(r){let e=Ds(r??{});return e?te.html`<div class="cite"><p><span class="lbl">${this.t("Source")}</span>${e}</p>${r?.note?te.html`<details class="note"><summary>${this.t("Note on the source")}${pe()}</summary><p>${r.note}</p></details>`:te.nothing}</div>`:te.nothing}renderRanking(r,e){let t=e??[];return t.length===0?te.nothing:te.html`<section part="section ranking"><h3 class="block-title">${this.t("Shadbala")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(a=>te.html`<tr class="${a.strong?"is-strong":""}"><td class="num">${j(r,a.rank)}</td><td>${a.graha??""}</td><td class="num">${this.t("{{value}} virupas",{value:f(r,a.totalVirupas,2)})}</td><td>${a.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(r){let e=r??[];return e.length===0?te.nothing:te.html`<section part="section planet-humours"><h3 class="block-title">${this.t("Planetary humours")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>te.html`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(a=>H(a)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" · ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(r){let e=new Set;for(let t of r)for(let a of[t.doshaSource,t.dhatuSource]){let s=Ds(a??{});s&&e.add(s)}return e.size===0?te.nothing:te.html`<p class="cite"><span class="lbl">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};La.styles=[u,ee,q,Tr,te.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.type{font-size:var(--roxy-text-xl,1.25rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.bar{border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);width:100%;min-width:0;height:1.5rem;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info,#0284c7) 45%, var(--roxy-surface,#fff))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 45%, var(--roxy-surface,#fff))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, var(--roxy-surface,#fff))}.shares{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.shares b{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.cite{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:.15rem 0 0}.cite p{margin:0}.cite .note summary{cursor:pointer;width:fit-content;color:var(--roxy-secondary,#475569);align-items:center;gap:.25rem;display:flex}.cite .note p{margin:.15rem 0 0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}td.num{font-variant-numeric:tabular-nums}tr.is-strong td{font-weight:var(--roxy-weight-bold,600)}.summary{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.disclaimer{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);color:var(--roxy-secondary,#475569);margin:0}`],La=m([(0,gd.customElement)("roxy-dosha-constitution")],La);var Yt=require("lit"),ud=require("lit/decorators.js");var $a=class extends g{renderData(r){return Yt.html`<article class="card" part="card" aria-label="${r.name??this.t("Dream symbol")}"><header class="head" part="header">${r.letter?Yt.html`<span class="letter" aria-hidden="true">${r.letter}</span>`:Yt.nothing}<div><p class="label">${this.t("Dream symbol")}</p>${r.name?Yt.html`<h2 class="name">${r.name}</h2>`:Yt.nothing}</div></header>${r.meaning?Yt.html`<p class="meaning">${r.meaning}</p>`:Yt.nothing}</article>`}};$a.styles=[u,Yt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.letter{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);width:2.5rem;height:2.5rem;color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-variant-numeric:tabular-nums;flex:none;justify-content:center;align-items:center;display:inline-flex}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.meaning{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.6}`],$a=m([(0,ud.customElement)("roxy-dream-card")],$a);var Qt=require("lit"),yd=require("lit/decorators.js");var wa=class extends g{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let a=typeof e.total=="number"?e.total:t.length;return Qt.html`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2 class="title">${this.t("Dream symbols")}</h2><span class="count">${a===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:a})}</span></header><ul class="grid" part="section symbols">${t.map(s=>Qt.html`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?Qt.html`<span class="letter" aria-hidden="true">${s.letter}</span>`:Qt.nothing} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Qt.html`<div class="detail" part="detail">${this.openedRow}</div>`:Qt.nothing}</section>`}};wa.styles=[u,Qt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm,.5rem);text-align:left;width:100%;font:inherit;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);cursor:pointer;background:0 0;transition:border-color .12s,background .12s;display:flex}.result[aria-pressed=true],.result:hover,.result:focus-visible{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.letter{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);width:1.6rem;height:1.6rem;color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;flex:none;place-items:center;display:grid}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:500}`],wa=m([(0,yd.customElement)("roxy-dream-search")],wa);var I=require("lit"),Me=require("lit/decorators.js"),Ut=require("lit/directives/if-defined.js"),Pd=require("lit/directives/live.js");var Ts={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var fd={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},xd={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Gt=(n,r)=>`${n}.${r}`;function Mn(n){let r=/^(.+)\.(\d+)$/.exec(n);return r?{key:r[1],index:Number(r[2])}:null}function En(n,r=Co,e=t=>Ts[t]??D(t)){let t=Mn(n);return t?r("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):r(D(n))}function vd(n,r,e){let t=Gt(r,0);return n.filter(a=>a.group===t).map(a=>({...a,key:`${Gt(r,e)}.${a.name}`,group:Gt(r,e)}))}function ei(n){return n.length<=(Pn(n)?30:12)?"tiles":"select"}function Pn(n){return n.every(r=>r.length<=2)}var rh=["latitude","longitude","timezone"],bd=["latitude","longitude"];function ah(n){let r=n.match(/^(.+?)(Latitude|Longitude)$/);return r?{group:r[1],leaf:r[2].toLowerCase()}:null}var sh=Oe.map(n=>n.toLowerCase());function ka(n,r){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?r[e]:void 0}return n}}function Ld(n){let r=n.anyOf??n.oneOf;return!r||r.length===0?n:r.find(e=>Array.isArray(e.enum))??r.find(e=>Qo(e)&&Qo(e)!=="null")??r[0]??n}function Qo(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let r=n.type.filter(e=>e!=="null");return r.length===1?r[0]:void 0}function nh(n){let r=Ld(n),e=Qo(r);return Array.isArray(r.enum)?ei(r.enum):e==="boolean"?"toggle":r.format==="date"?"date":r.format==="time"?"time":r.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function $d(n){if(n.length!==12)return!1;let r=new Set(n.map(e=>e.toLowerCase()));return sh.every(e=>r.has(e))}function zn(n,r,e){let t=Ld(r);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:nh(r)??"text",required:e.required,description:t.description??r.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:r.default??t.default,example:r.example??t.example}}function wd(n,r,e,t=n.requestBody?"POST":"GET"){let a=[],s=[],o=!1,i=n.requestBody?.content?.["application/json"]?.schema,l=ka(i,r),c=n["x-required-any-of"];if(l?.properties){let p=new Set([...l.required??[],...c?.[0]??[]]);for(let[d,h]of Object.entries(l.properties)){let b=ka(h,r)??{},L=b.type==="array"?ka(b.items,r):void 0;if(L?.type==="object"&&L.properties){let v=Math.max(1,b.minItems??1),E=new Set(L.required??[]);s.push({key:d,min:v,max:b.maxItems??v});for(let Q=0;Q<v;Q++)for(let[$e,nt]of Object.entries(L.properties)){let gr=ka(nt,r)??{};a.push(zn($e,gr,{key:`${Gt(d,Q)}.${$e}`,group:Gt(d,Q),required:p.has(d)&&E.has($e)}))}}else if(b.type==="object"&&b.properties){let v=new Set(b.required??[]);for(let[E,Q]of Object.entries(b.properties)){let $e=ka(Q,r)??{};$e.type==="array"&&ka($e.items,r)?.type==="object"||a.push(zn(E,$e,{key:`${d}.${E}`,group:d,required:p.has(d)&&v.has(E)}))}}else{let v=ah(d),E=zn(v?.leaf??d,b,{key:d,group:v?.group,required:p.has(d)});v&&(E.label=`${D(v.group)} ${v.leaf}`),a.push(E)}}}for(let p of n.parameters??[]){if(p.in!=="path"&&p.in!=="query")continue;if(p.name==="lang"&&p.in==="query"){o=!0;continue}let d=ka(p.schema,r)??{},h=zn(p.name,d,{key:p.name,required:!!p.required,inQuery:p.in==="query"});if(p.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(Ts[h.name]??D(h.name))){let b=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(p.description??h.description??"")?.[1]?.trim();b&&(h.label=b)}a.push(h)}return ti({title:oh(n.summary,e),fields:a,hasLang:o,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function ti(n,r,e){let t=`${r.toUpperCase()} /${e.replace(/^\//,"")}`,a=fd[t]??{},s=xd[t]??{},o=n.fields.map(d=>{let h={...d};return delete h.role,delete h.city,delete h.fold,{...h,...a[d.key]&&{source:a[d.key]},...s[d.key]&&{disabledWhen:s[d.key]}}}),i=[...new Set(o.map(d=>d.group))].map(d=>d===void 0?{}:{key:d,label:En(d)}),l=i.filter(d=>bd.every(h=>o.some(b=>b.group===d.key&&b.name===h)));for(let[d,h]of l.entries()){let b=o.filter(v=>v.group===h.key),L=b.find(v=>v.name==="timezone")??(d===0?o.find(v=>!v.group&&v.name==="timezone"):void 0);h.location={fields:[...b.filter(v=>bd.includes(v.name)).map(v=>v.key),...L?[L.key]:[]],required:b.some(v=>rh.includes(v.name)&&v.required)}}for(let d of o)d.name==="seed"?d.role="seed":(d.name==="limit"||d.name==="offset")&&!d.required?d.role="hidden-default":l.some(h=>h.location?.fields.includes(d.key))?d.role="location":d.name==="timezone"&&(d.city=!0);let c=i.filter(d=>d.key!==void 0&&(d.location||o.some(h=>h.group===d.key&&h.required))),p=o.some(d=>!d.group&&!d.role&&d.required)||c.length>0||l.some(d=>d.key===void 0);for(let d of i)d.key!==void 0&&p&&!c.includes(d)&&(d.fold=!0);for(let d of o)(d.group?i.find(h=>h.key===d.group)?.fold:!d.role&&(p?!d.required:d.default!==void 0))&&(d.fold=!0);return{...n,fields:o,groups:i,opensOnLoad:ih(n,r)}}function oh(n,r){let e=n?.split(" - ")[0]?.trim();return e||D(r.split("/").pop()??"")}function ih(n,r){return r.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function kd(n,r=[]){if(r.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Sd(n,r){let e=r.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function lh(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let r=Object.values(n),e=r.find(Array.isArray);return e||(r.find(a=>!!a&&typeof a=="object"&&Object.values(a).every(s=>typeof s=="number"))??null)}function ri(n,r="id"){let e=lh(n);if(!e)return[];if(!Array.isArray(e)){let a=Object.keys(e),s=a.length>0&&a.every(i=>/^[a-z]$/.test(i));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:a).map(i=>({value:i,label:s?i.toUpperCase():i,disabled:!e[i]}))}let t=[];for(let a of e){if(typeof a=="string"){t.push({value:a,label:a});continue}if(!a||typeof a!="object")continue;let s=a,o=s.id??s[r]??s.number;if(o==null)continue;let i=String(o),l=s.name??s.english;t.push({value:i,label:typeof l=="string"?l:i})}return t}function Rd(n){let r=n?.total;return typeof r=="number"?r:void 0}var Pt=require("lit"),In=require("lit/directives/if-defined.js");var Cd=require("lit"),_n=Cd.css`.spinner{border:2px solid var(--roxy-muted,#71717a);border-top-color:#0000;border-radius:50%;width:14px;height:14px;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;right:12px;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;padding:var(--roxy-space-xs,.25rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-md);max-height:22rem;animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));margin:0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm,.5rem);width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,6px);text-align:left;font-family:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);cursor:pointer;transition:background-color var(--roxy-motion-duration,.2s);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}.empty{padding:var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`;function Nn(n,r){let e,t=((...a)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...a)},r)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var dh=10,ch=10,ai=new Map;function Dd(n,r,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&r?{lang:r}:{},...e}}function ni(n,r,e,t){let a=JSON.stringify([n.submitUrl??n.baseUrl,r.path,e,t]),s=ai.get(a);return s||(s=ph(n,r,e,t).catch(o=>{throw ai.delete(a),o}),ai.set(a,s)),s}async function ph(n,r,e,t){let a=[];for(let s=0;s<ch;s++){let o=await ss(n,{path:r.path,method:"GET",query:Dd(r,t,a.length?{offset:a.length}:{})}),i=ri(o,e);a.push(...i);let l=Rd(o);if(!r.limit||l===void 0||a.length>=l||!i.length)break}return a}var si=n=>n.normalize("NFD").replace(/\p{M}/gu,"").toLowerCase(),Gn=class{constructor(r,e,t,a,s){this.host=r;this.source=e;this.field=t;this.context=a;this.onPick=s;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=Nn(r=>{this.searchServer(r)},250);r.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(r){this.query=r,this.error=null,this.source.search?r.trim().length<2?this.close():this.search(r):this.filter(r),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(r){this.query=r.label,this.close(),this.onPick(r)}keydown(r){let e=this.options.length;if(r.key==="Escape"){this.close();return}if(r.key==="ArrowDown"&&!this.open){r.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(r.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(r.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(r.key==="Home")this.highlight=0;else if(r.key==="End")this.highlight=e-1;else if(r.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;r.preventDefault(),this.host.requestUpdate()}}async filter(r){let{route:e,lang:t}=this.context();this.loading=!0,this.host.requestUpdate();try{let a=await ni(e,this.source,this.field,t);if(r!==this.query)return;let s=si(r.trim());this.show(a.filter(o=>si(o.label).includes(s)||si(o.value).includes(s)))}catch(a){this.fail(a)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(r){let{route:e,lang:t}=this.context(),a=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=!0,this.host.requestUpdate();try{let o=await ss(e,{path:this.source.path,method:"GET",query:Dd({...this.source,limit:dh},t,{[a]:r})},s.signal);if(s.signal.aborted)return;this.show(ri(o,this.field))}catch(o){if(s.signal.aborted)return;this.fail(o)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(r){this.options=r,this.open=!0,this.highlight=r.length?0:-1}fail(r){this.options=[],this.open=!1,this.error=r instanceof Error?r.message:String(r)}};function Td(n,r,e,t={}){let a=`${r}-listbox`;return Pt.html`<div class="picker"><input id="${r}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${a}" aria-autocomplete="list" aria-labelledby="${(0,In.ifDefined)(t.labelledby)}" aria-describedby="${(0,In.ifDefined)(t.describedby)}" aria-invalid="${(0,In.ifDefined)(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${r}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?Pt.html`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Pt.nothing} ${n.open?Pt.html`<ul id="${a}" class="results" role="listbox">${n.options.length===0?Pt.html`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,o)=>Pt.html`<li id="${`${r}-opt-${o}`}" class="option" role="option" aria-selected="${n.highlight===o?"true":"false"}" @mousedown="${i=>i.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:Pt.nothing}</div>${n.error?Pt.html`<small class="field-error" role="alert">${n.error}</small>`:Pt.nothing}`}var Ad=[_n,Pt.css`.picker{position:relative}`];var On="0.53.0";var zd="https://roxyapi.com/api/v2/openapi.json",mh=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${On}/dist/schemas`,oi=new Map,Bn=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},Fn=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function hh(n){let r=oi.get(n);return r||(r=fetch(n).then(async e=>{if(!e.ok)throw new Bn(e.status);return await e.json()}).catch(e=>{throw oi.delete(n),e}),oi.set(n,r)),r}function gh(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Md=n=>/\bbirth/i.test(n?.description??""),Ed=n=>n.key===`${n.group}.${n.name}`;function uh(n){let r=n.trim();if(!r)return[];try{let e=JSON.parse(r);if(Array.isArray(e))return e}catch{}return r.split(",").map(e=>e.trim()).filter(Boolean)}var Re=class extends ur{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||zd,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof Bn?this.t("HTTP error {{status}}",{status:e.status}):e instanceof Fn?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(zd)}async modelFromSpec(e){let t=await hh(e),a=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[a]?.[this.method.toLowerCase()];if(!s)throw new Fn(this.method,a);return wd(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${mh}/${Sd(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=ti(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let t={};for(let a of e.fields){let s=this.fullPages&&a.name==="limit"&&this.roleOf(a)==="hidden-default"?a.max??a.default:a.default;s!==void 0&&(t[a.key]=s);let o=a.group&&Ed(a)?this.initialValues?.[a.group]?.[a.name]:this.initialValues?.[a.key];o!==void 0&&(t[a.key]=o)}this.values=this.withoutDisabled(t),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ao(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!Ao(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let a=new Gn(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));a.query=String(this.values[t.key]??""),this.pickers.set(t.key,a);continue}this.choices={...this.choices,[t.key]:"loading"},ni(this.route,t.source,t.name,this.requestLang()).then(a=>{this.choices={...this.choices,[t.key]:a}},()=>{let{[t.key]:a,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(a=>this.serverIssues?.some(s=>s.path===a));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let a=e.disabledWhen;return!!a&&t[a.field]===a.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?Xr(this.publishableKey):void 0;t&&rs(this,t,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let a=this.fields.find(s=>s.key===t.path);return!!a&&this.roleOf(a)==="location"&&this.cityGroup(a)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e.name,e.label)}`:this.fieldText(e.name,e.label)}issueLines(e){return e.map(t=>I.html`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?I.html`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:I.nothing}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return I.nothing;let t=a=>{let s=this.fields.find(i=>i.key===a);if(s)return this.fieldLabel(s);let o=this.groupKeys().find(i=>i===a);return o?this.groupName(o):this.fieldText(a.split(".")[0]??a)};return I.html`<div part="validation-error" class="validation-error" role="alert">${e.map(a=>I.html`<div><strong>${t(a.path)}</strong> ${a.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(a=>a.group===e);return t.find(a=>a.name==="latitude")??t.find(a=>a.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(a=>this.groupHasLocation(a))||this.groupKeys().some(a=>a!==void 0))return null;let e=this.fields.filter(a=>a.required&&this.isRendered(a)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(a=>a.value);return this.isFilter(e)&&!Pn(t)?"select":this.choices[e.key]?ei(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(a=>({value:a,label:this.optionText(e.name,a)}))}effectiveSubmitLabel(){return this.submitLabel||this.t(kd(this.endpoint,this.fields))}requestLang(){return Os(this)}fieldText(e,t){return t||Pe(this.requestLang(),e,Ts[e])}optionText(e,t){return ge(this.requestLang(),e,t)}onLocationFor(e){return t=>{let a=this.groups.find(o=>o.key===e)?.location?.fields??[],s={};for(let o of a){let i=this.fields.find(l=>l.key===o)?.name;i&&(s[o]=t[i])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),t&&this.soleChoice?.key===e.key&&this.submit()}setFilter(e,t){let a={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(a[s.key]=void 0);this.setValues(a)}onTilesKeyDown(e){return t=>{let a=this.choicesOf(e).filter(p=>!p.disabled).map(p=>p.value);if(a.length===0)return;let s=a.indexOf(this.values[e.key]),o;if(t.key==="Home")o=0;else if(t.key==="End")o=a.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")o=s===-1?0:(s+1)%a.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")o=s===-1?a.length-1:(s-1+a.length)%a.length;else return;t.preventDefault();let i=a[o];if(i===void 0)return;this.chooseOption(e,i);let l=t.currentTarget,c=this.choicesOf(e).findIndex(p=>p.value===i);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(o=>o.path));let t={};for(let o of this.fields){let i=this.values[o.key];if(o.name==="seed"&&(i===void 0||i==="")&&(i=gh()),i===void 0||i==="")continue;o.kind==="array"&&typeof i=="string"&&(i=uh(i));let l=o.group?Mn(o.group):null;if(l){let c=t[l.key]??[],p=c[l.index]??{};p[o.name]=i,c[l.index]=p,t[l.key]=c}else if(o.group&&Ed(o)){let c=t[o.group]??{};c[o.name]=i,t[o.group]=c}else t[o.key]=i}let a=this.fields.filter(o=>o.inQuery).map(o=>o.name),s=this.requestLang();this.hasLang&&s&&(t.lang=s,a.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:a,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],t=[],a=new Set;for(let s of this.fields){if(!s.required)continue;let o=this.roleOf(s)==="location";if(!this.isRendered(s)&&!o)continue;let i=this.values[s.key];if(!(i!==void 0&&i!=="")){if(e.push(s.key),o){a.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of a)t.push(this.locationLabel(s));return{keys:e,labels:t}}reqMark(e){return e.required?I.html`<span class="req" aria-hidden="true">*</span>`:I.nothing}description(e){if(!e.description)return I.nothing;if(e.description.length<=120)return I.html`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return I.html`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${pe()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,a=!!e.enum&&$d(e.enum),s=this.choicesOf(e),o=Pn(s.map(c=>c.value)),i=s.findIndex(c=>c.value===this.values[e.key]),l=i===-1?s.findIndex(c=>!c.disabled):i;return I.html`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</span><div class="${o?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,p)=>{let d=this.values[e.key]===c.value,h=a?Z(c.value):void 0;return I.html`<button type="button" class="tile" role="radio" data-tile="${p}" aria-checked="${d?"true":"false"}" tabindex="${p===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${h?I.html`<span class="tile-glyph" aria-hidden="true">${h}</span>`:I.nothing} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return I.html`<div part="field" class="field"><label for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${(0,Ut.ifDefined)(this.issueFor(e)?"true":void 0)}" aria-describedby="${(0,Ut.ifDefined)(this.issueFor(e)?`${t}-error`:void 0)}" .value="${(0,Pd.live)(this.values[e.key]??"")}" @change="${a=>this.chooseOption(e,a.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(a=>I.html`<option value="${a.value}" ?selected="${this.values[e.key]===a.value}" ?disabled="${!!a.disabled}">${a.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let a=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key,o=this.issueFor(e);return I.html`<div part="field" class="field">${s?I.nothing:I.html`<label for="${a}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${Td(t,a,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:o?`${a}-error`:void 0,invalid:!!o})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,a=this.values[e.key]===!0;return I.html`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${a?"true":"false"}" @click="${()=>this.setValue(e.key,!a)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,a=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.kind==="array"?this.t("Comma separated"):e.example!=null?String(e.example):"";return I.html`<div part="field" class="field"><label for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":a}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${(0,Ut.ifDefined)(this.issueFor(e)?"true":void 0)}" aria-describedby="${(0,Ut.ifDefined)(this.issueFor(e)?`${t}-error`:void 0)}" min="${(0,Ut.ifDefined)(e.min)}" max="${(0,Ut.ifDefined)(e.max)}" step="${e.kind==="number"?"any":I.nothing}" placeholder="${s||I.nothing}" .value="${this.values[e.key]??""}" @input="${o=>{let i=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,i):this.setValue(e.key,i)}}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let a=this.choices[e.key];return a==="loading"?I.html`<div class="field"><div class="roxy-skeleton" style="height:2.75rem" aria-label="${this.t("Loading")}" role="status"></div></div>`:a||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return En(e,(t,a)=>this.t(t,a),t=>this.fieldText(t))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Mn(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),a=vd(this.fields,e,t),s=this.groups.find(i=>i.key===Gt(e,0));if(s){let i=l=>l.replace(`${Gt(e,0)}.`,`${Gt(e,t)}.`);this.groups=[...this.groups,{...s,key:Gt(e,t),label:En(Gt(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(i)}}}]}let o={...this.values};for(let i of a)i.default!==void 0&&(o[i.key]=i.default);this.values=o,this.fields=[...this.fields,...a]}removeRecord(e){let t=Gt(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let a={...this.values};for(let s of Object.keys(a))s.startsWith(`${t}.`)&&delete a[s];this.values=a}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?I.nothing:I.html`<div class="repeat-controls">${t<e.max?I.html`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:I.nothing} ${t>e.min?I.html`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:I.nothing}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Md(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return I.html`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?I.html`<span class="req" aria-hidden="true">*</span>`:I.nothing}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return I.html`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.setValue(e.key,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let a=e?this.t("{{group}} city",{group:this.groupName(e)}):Md(this.placeField(e))?this.t("City of birth"):void 0;return I.html`<roxy-location-search endpoint="${(0,Ut.ifDefined)(this.locationUrl||void 0)}" publishable-key="${(0,Ut.ifDefined)(this.publishableKey)}" lang="${(0,Ut.ifDefined)(this.effectiveLang())}" placeholder="${(0,Ut.ifDefined)(a)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(a=>a.group===e&&this.isRendered(a));return I.html`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):I.nothing}<div class="fields">${t.map(a=>this.renderField(a))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return I.html`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return I.html`<div class="spec-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=Xr(this.publishableKey);if(e)return I.html`<form><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2><div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(p=>!p.group&&this.isRendered(p)),a=this.groupKeys().filter(p=>p!==void 0),s=t.filter(p=>!p.fold),o=t.filter(p=>p.fold),i=a.filter(p=>!this.groups.find(d=>d.key===p)?.fold),l=a.filter(p=>this.groups.find(d=>d.key===p)?.fold),c=o.length>0||l.length>0;return I.html`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?I.html`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:I.nothing} ${this.renderIssueSummary()}<div class="fields">${s.map(p=>this.renderField(p))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):I.nothing} ${i.map(p=>this.groupCard(p))} ${this.repeats.map(p=>this.repeatControls(p))} ${c?I.html`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(p=>[...o.map(d=>d.key),...l].some(d=>p.path===d||p.path.startsWith(`${d}.`)))}"><summary>${this.t("Advanced")}${pe()}</summary><div class="fields">${o.map(p=>this.renderField(p))}</div>${l.map(p=>this.groupCard(p))}</details>`:I.nothing} ${this.selfSubmits?I.nothing:I.html`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let a=Number(t);return Number.isFinite(a)?a:void 0}return t}}};Re.styles=[u,q,Ad,I.css`form{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.fields{align-items:start;gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.fields:empty{display:none}.person-group{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);min-inline-size:0;margin:0;display:grid}.person-group legend{padding:0 var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-bold,600)}.field{gap:var(--roxy-space-xs,.25rem);flex-direction:column;min-width:0;display:flex}.fields>*,.field>input,.field>select{min-width:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.req{color:var(--_danger-fg);margin-left:4px}input,select{box-sizing:border-box;width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-family:inherit}input:focus,select:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.help{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.field-error{color:var(--_danger-fg);font-size:var(--roxy-text-xs,.75rem)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger,#dc2626)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.help-details>summary{cursor:pointer;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:4px;display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-top:var(--roxy-space-xs,.25rem);display:block}.location-block{gap:var(--roxy-space-xs,.25rem);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr));display:grid}.tile{min-height:44px;padding:var(--roxy-space-sm,.5rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease), background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-direction:column;justify-content:center;align-items:center;gap:2px;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent,#f59e0b)}.tile:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.tiles.narrow{gap:var(--roxy-space-xs,.25rem);grid-template-columns:repeat(auto-fill,minmax(2.25rem,1fr))}.tile[aria-checked=true]{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.tile:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.tile-glyph{font-size:1.35em;line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.toggle{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);cursor:pointer;width:44px;height:26px;transition:background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0;padding:0;position:relative}.toggle[aria-checked=true]{background:var(--roxy-accent,#f59e0b);border-color:var(--roxy-accent,#f59e0b)}.toggle .knob{background:var(--roxy-bg,#fff);width:20px;height:20px;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);border-radius:50%;position:absolute;top:2px;left:2px}.toggle[aria-checked=true] .knob{transform:translate(18px)}.toggle:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.advanced>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:6px;display:flex}.advanced[open]>summary{margin-bottom:var(--roxy-space-md,1rem)}.repeat-controls{gap:var(--roxy-space-sm,.5rem);display:flex}.repeat-btn{color:var(--roxy-accent-ink,#b45309);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font:inherit;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink,#b45309)}.advanced .fields,.advanced .person-group{margin-top:var(--roxy-space-md,1rem)}.validation-error{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 8%, transparent);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);display:grid}button.submit{background:var(--roxy-accent-ink,#b45309);min-height:44px;color:var(--roxy-bg,#fff);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}button.submit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.spec-error{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}`],m([(0,Me.property)({type:String,attribute:"data-endpoint"})],Re.prototype,"endpoint",2),m([(0,Me.property)({type:String})],Re.prototype,"method",2),m([(0,Me.property)({type:String,attribute:"spec-url"})],Re.prototype,"specUrl",2),m([(0,Me.property)({type:String,attribute:"submit-label"})],Re.prototype,"submitLabel",2),m([(0,Me.property)({type:String,attribute:"publishable-key"})],Re.prototype,"publishableKey",2),m([(0,Me.property)({type:String,attribute:"location-url"})],Re.prototype,"locationUrl",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"initialValues",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"serverIssues",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"apiRoute",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"autoload",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"fullPages",2),m([(0,Me.state)()],Re.prototype,"choices",2),m([(0,Me.state)()],Re.prototype,"clearedIssues",2),m([(0,Me.state)()],Re.prototype,"fields",2),m([(0,Me.state)()],Re.prototype,"repeats",2),m([(0,Me.state)()],Re.prototype,"formTitle",2),m([(0,Me.state)()],Re.prototype,"hasLang",2),m([(0,Me.state)()],Re.prototype,"values",2),m([(0,Me.state)()],Re.prototype,"loaded",2),m([(0,Me.state)()],Re.prototype,"specError",2),m([(0,Me.state)()],Re.prototype,"validationErrors",2),Re=m([(0,Me.customElement)("roxy-endpoint-form")],Re);var Ce=require("lit"),Hn=require("lit/decorators.js");var yh="12:00 UTC",Ar=class extends g{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),a=this.effectiveLang();return Ce.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2><p class="month"><span>${ns(a,t.year,t.month)}</span><span class="basis">${yh}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div class="tracks" role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" aria-label="${this.t("Daily positions")}" tabindex="0">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?Ce.nothing:Ce.html`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>Ce.html`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=R(e.name);return Ce.html`<div class="track" role="listitem"><span class="body-name">${t?Ce.html`<span class="glyph" aria-hidden="true">${t}</span>`:Ce.nothing}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?Ce.html`<span class="chips">${e.ingresses.map(a=>this.renderIngressChip(a))} ${e.retrogrades.map(a=>this.renderRetrogradeChip(a))}</span>`:Ce.nothing}</div>`}renderPosition(e){let{degree:t,minute:a}=No(e.degreeInSign),s=Z(e.sign),o=y(e,"sign");return Ce.html`<span class="pos" title="${o}">${t}${s?Ce.html`<span class="sg" aria-hidden="true">${s}</span>`:Ce.html`<span class="sg">${o}</span>`}${String(a).padStart(2,"0")}</span>`}renderIngressChip(e){let t=Z(e.sign),a=ta(this.effectiveLang(),e.date);return Ce.html`<span class="chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:a})}"><span aria-hidden="true">→</span>${t?Ce.html`<span aria-hidden="true">${t}</span>`:Ce.nothing}${e.signLabel} <span class="chip-date">${a}</span></span>`}renderRetrogradeChip(e){let t=this.effectiveLang(),a=ta(t,e.start),s=ta(t,e.end),o=a===s?a:`${a} - ${s}`;return Ce.html`<span class="chip chip--retro"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:o})}</span>`}renderGrid(e){let t=this.effectiveLang();return Ce.html`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(a=>{let s=R(a.name);return Ce.html`<th scope="col" title="${a.label}">${s?Ce.html`<span class="glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${a.label}</span>`:a.label}</th>`})}</tr></thead><tbody>${e.rows.map(a=>Ce.html`<tr><th scope="row" class="day">${Qi(t,a.date)}</th>${a.cells.map((s,o)=>this.renderCell(s,e.bodies[o],a.date))}</tr>`)}</tbody></table>`}renderCell(e,t,a){if(!e)return Ce.html`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(a)?"ingress":"",t?.stationDates.has(a)?"station":""].filter(Boolean).join(" ");return Ce.html`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?Ce.html`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:Ce.nothing}</td>`}toViewModel(e){let t=[],a=new Map;for(let i of e.days)for(let l of i.positions){let c=a.get(l.planet);c||(c=[],a.set(l.planet,c),t.push(l.planet)),c.push({date:i.date,p:l})}let s=[];for(let i of t){let l=a.get(i),c=l?.[0],p=l?.[l.length-1];if(!l||!c||!p)continue;let d=[],h=[],b=new Set,L=new Set;for(let v=0;v<l.length;v++){let E=l[v],Q=l[v-1];if(!E||(Q&&E.p.sign!==Q.p.sign&&(d.push({date:E.date,sign:E.p.sign,signLabel:y(E.p,"sign")}),b.add(E.date)),Q&&E.p.isRetrograde!==Q.p.isRetrograde&&L.add(E.date),!E.p.isRetrograde))continue;let $e=h[h.length-1];$e&&Q?.p.isRetrograde?$e.end=E.date:h.push({start:E.date,end:E.date})}s.push({name:i,label:y(p.p,"planet"),first:c.p,last:p.p,ingresses:d,retrogrades:h,ingressDates:b,stationDates:L})}let o=e.days.map(i=>{let l=new Map(i.positions.map(c=>[c.planet,c]));return{date:i.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:o,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let o of s.positions){let i=String(o.sign??"").toLowerCase();i&&!t.has(i)&&t.set(i,y(o,"sign"))}let a=[];for(let s of Oe){let o=t.get(s.toLowerCase()),i=Z(s);o&&i&&a.push({sign:s,label:o,glyph:i})}return a}};Ar.styles=[u,Ce.css`:host{overflow-x:clip}.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.month{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);flex-wrap:wrap;margin:0;display:flex}.basis{font-variant-numeric:tabular-nums}.wrap>*{min-width:0}h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.signkey{flex-wrap:wrap;gap:1px 0;margin:0;padding:0;list-style:none;display:flex}.signkey-item{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);white-space:nowrap;align-items:baseline;gap:.3rem;padding:2px 10px 2px 0;display:inline-flex}.signkey-glyph{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.tracks{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:minmax(0,1fr);gap:1px;display:grid;overflow:hidden}.track{align-items:center;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);padding:6px var(--roxy-space-sm,.5rem);background:var(--roxy-surface,#fff);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:.35rem;min-width:8.5rem;font-weight:500;display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.1em}.span{color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;white-space:nowrap;align-items:baseline;gap:.3rem;display:inline-flex}.arrow{color:var(--roxy-muted,#71717a)}.chip-date{color:var(--roxy-secondary,#475569)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin-left:auto;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);white-space:nowrap;align-items:baseline;gap:.25rem;padding:1px 8px;display:inline-flex}.chip--ingress{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.chip--retro{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);color:var(--_danger-fg);font-weight:var(--roxy-weight-bold,600)}.scroll:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b);outline-offset:2px}.scroll{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:4px 8px}thead th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}thead th .glyph{color:var(--roxy-fg,#0a0a0a);font-size:1.15em}th.day{z-index:1;background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;border-right:1px solid var(--roxy-border,#e4e4e7);font-weight:500;position:sticky;left:0}thead th.day{z-index:2;background:var(--roxy-surface,#fff)}td{font-variant-numeric:tabular-nums}.sg{color:var(--roxy-secondary,#475569);font-variant-numeric:normal;margin:0 .15em}.retro-mark{font-weight:var(--roxy-weight-bold,600);margin-left:.25em}td.retro{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);color:var(--_danger-fg)}td.retro .sg{color:inherit}td.ingress{box-shadow:inset 3px 0 var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}td.station{border-top:2px solid var(--_danger-fg);font-weight:var(--roxy-weight-bold,600)}`],m([(0,Hn.property)({type:String})],Ar.prototype,"heading",2),Ar=m([(0,Hn.customElement)("roxy-ephemeris-table")],Ar);var We=require("lit"),_d=require("lit/decorators.js");var Sa=class extends g{renderData(r){let e=r.conjunctions??[],t=r.stars??[];return We.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Fixed stars")}</h2>${typeof r.orb=="number"?We.html`<span class="badge"><b>${this.t("Orb")}</b> ${f(this.effectiveLang(),r.orb,1)}°</span>`:We.nothing}</header>${r.summary&&!this.hideReadings?We.html`<p class="summary">${r.summary}</p>`:We.nothing} ${e.length?We.html`<section part="section conjunctions"><p class="subhead">${this.t("Conjunctions to the chart")}</p>${e.map((a,s)=>We.html`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:a.point,star:a.star})}</span> ${pe()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:f(this.effectiveLang(),a.orb,2)})}</small></span></summary>${a.interpretation&&!this.hideReadings?We.html`<div class="interp-body"><p>${a.interpretation}</p></div>`:We.nothing}</details>`)}</section>`:We.html`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):We.nothing}</div>`}renderCatalog(r){return We.html`<details class="catalog"><summary>${pe()} ${this.t("Star catalog ({{count}})",{count:r.length})}</summary><div class="scroll"><table><caption class="subhead">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${r.map(e=>{let t=Z(e.sign);return We.html`<tr><td>${e.name}</td><td>${t?We.html`<span class="sg">${t}</span>`:We.nothing}${Kt(e.degree)} ${e.sign}</td><td class="num">${f(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><div class="kw">${(e.keywords??[]).map(a=>We.html`<span>${a}</span>`)}</div></td></tr>`})}</tbody></table></div></details>`}};Sa.styles=[u,q,me,We.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.empty-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.subhead{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0 0 var(--roxy-space-sm,.5rem);font-weight:600}.interp-lead .point{color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:.5rem;font-weight:600;display:flex}.scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;vertical-align:top;padding:6px 10px}th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}td.num{text-align:right;font-variant-numeric:tabular-nums}.sg{color:var(--roxy-secondary,#475569);margin-right:.3rem}.kw{white-space:normal;flex-wrap:wrap;gap:.2rem;max-width:18rem;display:flex}.kw span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:0 6px}`],Sa=m([(0,_d.customElement)("roxy-fixed-stars")],Sa);var T=require("lit"),qn=require("lit/decorators.js");var jn=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];var Nd=require("lit"),Kn=Nd.css`.plate-heading{font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);hyphens:manual}@container (width<=30rem){.plate-heading{letter-spacing:0;font-size:.5rem}}`;var Vn={forward:"Forward",reverse:"Backward"};function Ra(n){return"mountainCenterStar"in n}var zr=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),a=this.mode!=="annual"&&Ra(e);return T.html`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${Ra(e)?a?T.html`<span class="period">${this.t("Period {{n}}",{n:j(t,e.period??0)})}</span>`:T.nothing:T.html`<span class="period">${e.year??""}</span>`}</header>${Ra(e)?a?this.renderNatalFacts(e,t):T.nothing:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${jn.map(s=>this.renderPalace(e,s))}</div>${a?T.html`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:T.nothing} ${a&&Ra(e)?this.renderStructure(e):T.nothing} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return T.html`<div class="facts" part="details">${e.facing?T.html`<span><span class="lbl">${this.t("Facing")}</span> <b>${ge(t,"facing",e.facing.label??"")}</b></span>`:T.nothing} ${e.sitting?T.html`<span><span class="lbl">${this.t("Sitting")}</span> <b>${ge(t,"facing",e.sitting.label??"")}</b></span>`:T.nothing} ${typeof e.facingDegrees=="number"?T.html`<span>${j(t,e.facingDegrees)}°</span>`:T.nothing} ${e.mountainFlight?T.html`<span><span class="lbl">${this.t("Mountain star")}</span> ${Vn[e.mountainFlight]?this.t(Vn[e.mountainFlight]):e.mountainFlight}</span>`:T.nothing} ${e.waterFlight?T.html`<span><span class="lbl">${this.t("Water star")}</span> ${Vn[e.waterFlight]?this.t(Vn[e.waterFlight]):e.waterFlight}</span>`:T.nothing} ${e.straddling?T.html`<span><b>${this.t("Straddling")}</b></span>`:T.nothing}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?T.nothing:T.html`<div class="facts" part="details">${typeof e.centerStar=="number"?T.html`<span><span class="lbl">${this.t("Center")}</span> <b>${j(t,e.centerStar)}</b></span>`:T.nothing} ${e.changeoverDate?T.html`<span>${A(t,e.changeoverDate)}</span>`:T.nothing}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):ge(e,"facing",t)}renderPalace(e,t){let a=this.effectiveLang(),s=this.paletteHeading(a,t),o=(e.palaces??[]).find(p=>p.palace===t),i=this.mode!=="annual"&&Ra(e);if(!o)return T.html`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(i&&Ra(e)){let p=o;return T.html`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${p.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${p.water??""}</span> <span class="star" title="${this.t("Period star")}">${p.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${p.combination?T.html`<span class="combo">${y(p.combination,"name")}</span>`:T.nothing}</div>`}let c=o;return T.html`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${y(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?T.html`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?T.html`<p class="structure" part="reading">${t.meaning}</p>`:T.nothing}</section>`:T.nothing}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return T.nothing;let a=this.effectiveLang(),s=this.mode!=="annual"&&Ra(e),o=t.map(i=>{let l=this.paletteHeading(a,i.palace??"");if(s){let p=i;return!p.reading&&!p.combination?T.nothing:T.html`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body">${p.combination?T.html`<span>${y(p.combination,"name")}</span>`:T.nothing} ${p.reading&&!this.hideReadings?T.html`<p part="reading">${p.reading}</p>`:T.nothing}</div></li>`}let c=i;return T.html`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?T.html`<span>${c.element}</span>`:T.nothing}<dl class="star-facts">${c.nature?T.html`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:T.nothing} ${c.enhancer?T.html`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:T.nothing} ${c.remedy?T.html`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:T.nothing}</dl>${c.meaning&&!this.hideReadings?T.html`<p part="reading">${c.meaning}</p>`:T.nothing}</div></li>`});return o.every(i=>i===T.nothing)?T.nothing:T.html`<section part="section palaces"><ul class="rows">${o}</ul></section>`}};zr.styles=[u,Kn,Tr,T.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.period{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.plate{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;display:grid;overflow:hidden}.palace{background:var(--roxy-surface,#fff);padding:var(--roxy-space-sm,.5rem);grid-template-columns:1fr 1fr;align-content:start;gap:.1rem;min-height:5.5rem;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, var(--roxy-surface,#fff))}.mountain,.water{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600)}.mountain{text-align:start;color:var(--roxy-info,#2563eb)}.water{text-align:end;color:var(--roxy-accent-ink,#b45309)}.star{text-align:center;font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);grid-column:1/-1;font-size:1.75rem;line-height:1.1}.palace-name{text-align:center;grid-column:1/-1}.combo{text-align:center;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);grid-column:1/-1}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-mountain{background:var(--roxy-info,#2563eb)}.swatch-water{background:var(--roxy-accent,#f59e0b)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.row-body p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}.star-facts{margin:var(--roxy-space-xs,.25rem) 0 0;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs,.25rem);display:flex}.star-facts dt{color:var(--roxy-secondary,#475569)}.star-facts dd{margin:0}.structure{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin:0}`],m([(0,qn.property)({type:String,reflect:!0})],zr.prototype,"mode",2),zr=m([(0,qn.customElement)("roxy-flying-star-chart")],zr);var St=require("lit"),Id=require("lit/decorators.js");var Ca=class extends g{renderData(r){let e=r.windows??[];if(e.length===0)return this.renderEmpty();let t=_t(this.effectiveLang(),r.startDate,r.endDate);return St.html`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2 class="title">${this.t("Forecast digest")}</h2>${t?St.html`<p class="subtitle">${t}</p>`:St.nothing}</div>${e.map(a=>this.renderWindow(a))}</div>`}windowLabel(r){return r===1?this.t("Next 24 hours"):typeof r=="number"?this.t("Next {{count}} days",{count:r}):this.t("Window")}renderWindow(r){let e=[...r.top??[]].sort((s,o)=>(o.significance??0)-(s.significance??0)),t=r.byDomain??{},a=Object.entries(t);return St.html`<section class="window" part="section window"><div class="window-head" part="details"><span class="window-label">${this.windowLabel(r.days)}</span> <span class="window-count">${this.t("{{count}} events",{count:r.count??0})}</span></div>${a.length>0?St.html`<div class="domains" part="legend">${a.map(([s,o])=>St.html`<span class="domain-chip"><span class="swatch sw-${s}"></span>${D(s)} ${o}</span>`)}</div>`:St.nothing} ${e.length>0?St.html`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:St.html`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(r){let e=typeof r.significance=="number"?r.significance:0,t=this.hideReadings||r.description==null?D(r.type??""):r.description;return St.html`<div class="event" part="label-track" role="listitem"><span class="event-date">${A(this.effectiveLang(),r.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:f(this.effectiveLang(),e,0)})}"><span class="sig-fill ${r.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};Ca.styles=[u,St.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.window{gap:var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);display:grid}.window:first-of-type{border-top:none;padding-top:0}.window-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.window-label{font-weight:var(--roxy-weight-bold,600)}.window-count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.domains{flex-wrap:wrap;gap:.4rem;display:flex}.domain-chip{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);align-items:center;gap:.35rem;display:inline-flex}.swatch{border-radius:2px;width:.65rem;height:.65rem;display:inline-block}.sw-western{background:var(--roxy-accent,#f59e0b)}.sw-vedic{background:var(--roxy-info,#2563eb)}.sw-biorhythm{background:var(--roxy-success,#16a34a)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:.25rem .6rem;display:grid}.event-date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm,.875rem);line-height:1.4}.sig{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:2px;grid-column:2;height:4px;overflow:hidden}.sig-fill{border-radius:2px;height:100%;display:block}.sig-fill.western{background:var(--roxy-accent,#f59e0b)}.sig-fill.vedic{background:var(--roxy-info,#2563eb)}.sig-fill.biorhythm{background:var(--roxy-success,#16a34a)}.quiet{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}`],Ca=m([(0,Id.customElement)("roxy-forecast-digest")],Ca);var He=require("lit"),Gd=require("lit/decorators.js");var fh={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},xh=["western","vedic","biorhythm"],Da=class extends g{renderData(r){let e=r.events??[],t=this.groupByDate(e),a=xh.filter(s=>e.some(o=>o.domain===s));return He.html`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2 class="title">${this.t("Forecast timeline")}</h2>${r.startDate&&r.endDate?He.html`<div class="range">${_t(this.effectiveLang(),r.startDate,r.endDate)} · ${this.t("{{count}} events",{count:r.count??e.length})}</div>`:He.nothing}</header>${a.length?He.html`<div class="legend" part="legend">${a.map(s=>He.html`<span><span class="swatch swatch-${s}"></span>${fh[s]}</span>`)}</div>`:He.nothing} ${t.length?He.html`<div class="days" part="section events" role="list">${t.map(([s,o])=>this.renderDay(s,o))}</div>`:He.html`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(r){let e=new Map;for(let t of r){let a=t.date??"",s=e.get(a)??[];s.push(t),e.set(a,s)}return[...e.entries()]}renderDay(r,e){return He.html`<div class="day" role="listitem"><div class="day-date">${A(this.effectiveLang(),r)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(r){let e=typeof r.significance=="number"?r.significance:0,t=Math.max(0,Math.min(100,e));return He.html`<div class="event"><span class="dot dot-${r.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderHeadline(r)}</div>${r.description&&!this.hideReadings?He.html`<p class="event-desc">${r.description}</p>`:He.nothing}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${r.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(r){let e=r.body?D(r.body):"",t=r.target?D(r.target):"",a=$t({type:r.aspect}),s=Ht[a]??"",o=a?ls(r.aspect)??Ke({type:r.aspect}):"",i=typeof r.orb=="number"?f(this.effectiveLang(),r.orb,1):"",l=this.typeQualifier(r);return a&&t?He.html`<strong>${e}</strong> <span class="${s}">${o}</span> <strong>${t}</strong>${i?He.html`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:He.nothing}`:He.html`<strong>${e||D(r.type??"")}</strong>${l?He.html`<span class="kind">${l}</span>`:He.nothing}`}typeQualifier(r){return r.type==="sign-ingress"&&r.target?`enters ${D(r.target)}`:r.type==="retrograde-station"&&r.station?r.station:r.type==="eclipse"?[r.kind,"eclipse"].filter(Boolean).join(" "):r.type==="critical-day"?"critical day":r.type==="dasha-change"&&r.target?`dasha ${D(r.target)}`:D(r.type??"")}};Da.styles=[u,He.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.range{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:50%;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-western{background:var(--roxy-accent,#f59e0b)}.swatch-vedic{background:var(--roxy-info,#2563eb)}.swatch-biorhythm{background:var(--roxy-success,#16a34a)}.day{gap:var(--roxy-space-md,1rem);padding-block:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:4.5rem 1fr;display:grid}.day:first-of-type{border-top:none}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;padding-top:2px}.events{gap:var(--roxy-space-sm,.5rem);display:grid}.event{gap:var(--roxy-space-sm,.5rem);grid-template-columns:.6rem 1fr;align-items:start;display:grid}.dot{border-radius:50%;width:.6rem;height:.6rem;margin-top:4px}.dot-western{background:var(--roxy-accent,#f59e0b)}.dot-vedic{background:var(--roxy-info,#2563eb)}.dot-biorhythm{background:var(--roxy-success,#16a34a)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.event-line .aspect-trine,.event-line .aspect-sextile{color:var(--_success-fg)}.event-line .aspect-square,.event-line .aspect-opposition{color:var(--_danger-fg)}.event-line .aspect-conjunction{color:var(--roxy-accent-ink,#b45309)}.event-line .kind{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.04em;margin-left:.35em}.event-desc{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:2px 0 0}.sig{align-items:center;gap:.4rem;margin-top:4px;display:flex}.sig-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:1;max-width:8rem;height:4px;overflow:hidden}.sig-fill{border-radius:var(--roxy-radius-full,9999px);height:100%;display:block}.sig-fill-western{background:var(--roxy-accent,#f59e0b)}.sig-fill-vedic{background:var(--roxy-info,#2563eb)}.sig-fill-biorhythm{background:var(--roxy-success,#16a34a)}.sig-val{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}`],Da=m([(0,Gd.customElement)("roxy-forecast-timeline")],Da);var M=require("lit"),Od=require("lit/decorators.js"),Bd=require("lit/directives/if-defined.js");var Ta=class extends g{renderData(r){let e=this.effectiveLang(),t=r.chosen,a=r.input?.text??r.input?.textHebrew??"";return M.html`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 class="title" id="gematria-title">${a?`${this.t("Gematria")} · ${a}`:this.t("Gematria")}</h2>${t?.hebrew?M.html`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:M.nothing} ${this.chosenForm(r)?.romanization?M.html`<span class="roman">${this.chosenForm(r)?.romanization}</span>`:M.nothing} ${t?.rule?M.html`<p class="rule">${t.rule}</p>`:M.nothing}</header>${this.renderLetters(e,this.chosenForm(r)?.letters)} ${this.renderValues(e,r.values,this.t("Cipher values"))} ${this.renderForms(e,r)} ${this.renderTransformations(e,r.transformations)} ${this.renderLatin(e,r.latinValues)} ${this.renderMatches(e,r.matches)} ${this.renderConventions(r.conventions)}</article>`}chosenForm(r){let e=r.hebrewForms??[];return e.find(t=>t.hebrew===r.chosen?.hebrew)??e[0]}renderLetters(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section letters"><h3 class="block-title">${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(a=>M.html`<div class="${`letter${a.isFinal?" is-final":""}`}" dir="ltr" title="${(0,Bd.ifDefined)(a.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${a.glyph??""}</span> <span class="name">${a.name??""}</span> <span class="num">${j(r,a.value)}</span></div>`)}</div>${t.some(a=>a.isFinal)?M.html`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:M.nothing}</section>`}renderValues(r,e,t){let a=(e??[]).filter(o=>typeof o.value=="number");if(a.length===0)return M.nothing;let s=a.some(o=>(o.alternateValues??[]).length>0);return M.html`<section part="section values"><h3 class="block-title">${t}</h3><div class="scroll"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?M.html`<th>${this.t("Also published")}</th>`:M.nothing}</tr></thead><tbody>${a.map(o=>M.html`<tr><td>${D(o.id??"")}</td><td class="num">${j(r,o.value)}</td>${s?M.html`<td class="num">${(o.alternateValues??[]).map(i=>j(r,i)).join(", ")}</td>`:M.nothing}</tr>`)}</tbody></table></div>${this.renderProvenance(a)}</section>`}renderProvenance(r){let e=new Map;for(let t of r)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?M.nothing:M.html`<p class="provenance"><span class="lbl">${this.t("Tradition")}</span> ${[...e].map(([t,a],s)=>M.html`${s>0?" · ":""}${D(t)}${a?M.html`<a class="src" href="${a}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:M.nothing}`)}</p>`}renderForms(r,e){let t=e.hebrewForms??[];return t.length<2?M.nothing:M.html`<section part="section spellings"><h3 class="block-title">${this.t("Spellings")}</h3><ul class="forms">${t.map(a=>M.html`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${a.hebrew??""}</span> ${a.hebrew===e.chosen?.hebrew?M.html`<span class="chosen">${this.t("Chosen")}</span>`:M.nothing}</div><span class="roman">${a.romanization??""}</span> ${a.rule?M.html`<p class="rule">${a.rule}</p>`:M.nothing} ${this.renderFormTotals(r,a)}</li>`)}</ul></section>`}renderFormTotals(r,e){let t=(e.values??[]).find(a=>typeof a.value=="number");return t?M.html`<p class="rule"><span class="lbl">${D(t.id??"")}</span> ${j(r,t.value)}</p>`:M.nothing}renderTransformations(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section substitutions"><h3 class="block-title">${this.t("Substitutions")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td>${D(a.id??"")}</td><td>${a.output?M.html`<span lang="he" dir="rtl">${a.output}</span>`:M.nothing} ${a.outputRomanization?M.html`<span class="roman">${a.outputRomanization}</span>`:M.nothing}</td><td class="num">${j(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section latin-ciphers"><h3 class="block-title">${this.t("Latin ciphers")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td data-label="${this.t("Cipher")}">${D(a.id??"")} ${a.lineage?M.html`<p class="lineage">${a.lineage}</p>`:M.nothing}</td><td class="num" data-label="${this.t("Value")}">${j(r,a.value)}</td><td data-label="${this.t("Tradition")}">${D(a.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section matches"><h3 class="block-title">${this.t("Equal values")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${a.hebrew??""}</span> <span class="roman">${a.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${a.meaning??""} ${a.note&&!this.hideReadings?M.html`<p class="match-note" part="reading">${a.note}</p>`:M.nothing}</td><td class="num" data-label="${this.t("Value")}">${j(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(r){let e=this.effectiveLang(),t=[];for(let a of["transliteration","misparGadol"]){let s=r?.[a];s&&t.push([Pe(e,a),ge(e,a,s)])}return t.length===0?M.nothing:M.html`<p class="provenance">${t.map(([a,s],o)=>M.html`${o>0?" · ":""}<span class="lbl">${a}</span>${s}`)}</p>`}};Ta.styles=[u,Sr,M.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-items:start;gap:.15rem;min-width:0;display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.hebrew{font-size:2rem;line-height:1.4;font-weight:var(--roxy-weight-bold,600)}.roman{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);letter-spacing:.04em}.rule{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.src{margin-inline-start:.35rem}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.letters{flex-wrap:wrap;gap:.35rem;display:flex}.letter{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);justify-items:center;gap:.1rem;min-width:3rem;padding:.3rem .45rem;display:grid}.letter .glyph{font-size:var(--roxy-text-lg,1.125rem);line-height:1.3}.letter .name{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569)}.letter .num{font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.letter.is-final{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff))}.legend{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-border,#e4e4e7);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff));border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);vertical-align:top;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}td.num{font-variant-numeric:tabular-nums;white-space:nowrap}.provenance{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5)}.lineage{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);white-space:normal;margin:.15rem 0 0}a{color:var(--roxy-accent-ink,#b45309)}.forms{gap:var(--roxy-space-md,1rem);margin:0;padding:0;list-style:none;display:grid}.form{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);gap:.35rem;min-width:0;display:grid}.form:first-child{border-top:0;padding-top:0}.chosen{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, var(--roxy-surface,#fff));color:var(--roxy-fg,#0a0a0a);padding:.1rem .4rem;display:inline-block}.match-note{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);white-space:normal;margin:.15rem 0 0}`],Ta=m([(0,Od.customElement)("roxy-gematria")],Ta);var je=require("lit"),Hd=require("lit/decorators.js");var Fd=8,Aa=class extends g{renderData(r){let e=r.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=r.keyTransits??[],a=r.natalPlanets?.find(s=>s.name==="Moon")?.sign;return je.html`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2 class="title">${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:he(this.effectiveLang(),r.transitDatetime),birth:he(this.effectiveLang(),r.birthDatetime)})}</p>${a?je.html`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:a})}</p>`:je.nothing} ${be(this.effectiveLang(),r.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?je.html`<section class="key" part="section key-transits"><h3 class="key-title">${this.t("Key transits")}</h3>${t.map(s=>je.html`<p class="key-item">${s.description}</p>`)}</section>`:je.nothing}</div>`}renderPlanet(r){let e=R(r.name)??"",t=typeof r.longitude=="number"?jt(r.longitude):void 0;return je.html`<article class="row"><div class="row-top"><span class="graha">${e?je.html`<span class="glyph">${e}</span>`:je.nothing}${r.name} </span><span class="pos">${t?`${r.sign} ${t}`:r.sign} </span>${typeof r.houseFromMoon=="number"?je.html`<span class="house moon">${this.t("house {{n}} from the Moon",{n:r.houseFromMoon})}</span>`:je.nothing} ${typeof r.natalHouse=="number"?je.html`<span class="house lagna">${this.t("house {{n}} from the Lagna",{n:r.natalHouse})}</span>`:je.nothing}</div>${this.renderKaksha(r.kaksha)} ${this.renderContacts(this.t("Drishti"),r.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),r.aspectsToNatal)}</article>`}renderContacts(r,e){return e?.length?je.html`<p class="aspects"><span class="contact-label">${r}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Ke({type:t.aspectType}),planet:t.natalPlanet,orb:f(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Ke({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:je.nothing}renderKaksha(r){if(!r||typeof r.number!="number")return je.nothing;let e=r.number,t=r.bindu===!0?"yes":r.bindu===!1?"no":"",a=Fd,s=r.lord&&typeof r.startDegree=="number"&&typeof r.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:a,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)}):r.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:a,graha:r.lord}):typeof r.startDegree=="number"&&typeof r.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:a,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:a}),o=r.bindu===null||r.bindu===void 0?"":typeof r.binduCount=="number"?r.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:r.binduCount,total:a}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:r.binduCount,total:a}):r.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return je.html`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:a})}">${Array.from({length:Fd},(i,l)=>je.html`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${o?`${s} · ${o}`:s}</p>`}};Aa.styles=[u,ee,je.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.row{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.pos{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.house{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);padding:.1rem .45rem}.house.moon{border-color:var(--roxy-accent,#f59e0b)}.house.lagna{color:var(--roxy-muted,#71717a)}.contact-label{font-weight:var(--roxy-weight-bold,600);margin-right:.35em}.kaksha-bar{grid-template-columns:repeat(8,1fr);gap:2px;height:10px;margin:.15rem 0;display:grid}.seg{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:2px}.seg.here{background:color-mix(in srgb, var(--roxy-muted,#71717a) 45%, transparent)}.seg.here.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 55%, transparent)}.seg.here.no{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 55%, transparent)}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.num{font-variant-numeric:tabular-nums}.aspects{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);line-height:var(--roxy-leading-normal,1.5);margin:0}.key{padding:var(--roxy-space-md,1rem);border-top:2px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.key-title{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.key-item{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],Aa=m([(0,Hd.customElement)("roxy-gochara-table")],Aa);var Xe=require("lit"),jd=require("lit/decorators.js");var bh={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},za=class extends g{renderData(r){let e=(r.breakdown??[]).filter(p=>p?.category!==void 0),t=r.total??0,a=r.maxScore??36,s=t/a*100,o="color-mix(in srgb, var(--roxy-border) 50%, transparent)",i=s>=70?"var(--roxy-success)":s>=50?"var(--roxy-warning)":"var(--roxy-danger)",l=s*2.827,c=(100-s)*2.827;return Xe.html`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${f(this.effectiveLang(),r.total,1)}</span> <span class="over">/ ${r.maxScore}</span> ${typeof r.percentage=="number"?Xe.html`<small style="margin-left:.5rem;color:var(--roxy-muted)">${_e(this.effectiveLang(),r.percentage,1)}</small>`:Xe.nothing}</div><div class="verdict-wrap">${typeof r.isCompatible=="boolean"?Xe.html`<span class="verdict ${r.isCompatible?"yes":"no"}">${r.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:Xe.nothing} ${r.recommendation&&!this.hideReadings?Xe.html`<span class="recommendation">${r.recommendation}</span>`:Xe.nothing}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="36" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45" fill="none" stroke="${o}" stroke-width="8"/><circle class="ring-fill" cx="50" cy="50" r="45" fill="none" stroke="${i}" stroke-width="8" stroke-dasharray="${l},${c}" stroke-linecap="round" transform="rotate(-90 50 50)"/><text x="50" y="50" text-anchor="middle" dominant-baseline="central" class="ring-text">${t}</text><text x="50" y="64" text-anchor="middle" dominant-baseline="central" class="ring-max">/${a}</text></svg></div></div>${e.length>0?Xe.html`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(p=>{let d=p.score??0,h=p.maxScore??vh(p.category),b=h?d/h*100:0;return Xe.html`<tr><td>${p.category} ${p.description?Xe.html`<small>${p.description}</small>`:Xe.nothing}</td><td class="classification" data-label="${this.t("Person 1")}">${p.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${p.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${b}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${f(this.effectiveLang(),d,1)} / ${h}</td></tr>`})}</tbody></table></div>`:Xe.nothing} ${(r.doshas?.length??0)>0||(r.doshaCancellations?.length??0)>0?Xe.html`<div class="tags" part="details">${r.doshas?.map(p=>Xe.html`<span class="dosha">${p}</span>`)} ${r.doshaCancellations?.map(p=>Xe.html`<span class="cancel" title="${p.reason}">${this.t("{{dosha}} cancelled",{dosha:p.dosha})}</span>`)}</div>`:Xe.nothing} ${be(this.effectiveLang(),r.frame,this.translator)}</article>`}};za.styles=[u,ee,Sr,Xe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:1rem;display:flex}.score-info{flex:1;min-width:0}.table-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md,1rem);grid-template-columns:1fr auto;display:grid}.total{font-size:2.25rem;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;line-height:1}.over{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-base,1rem)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs,.25rem);text-align:right;display:grid}.verdict{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 10px}.verdict.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.no{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.recommendation{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.score-ring{flex-shrink:0;width:120px;height:120px}.score-ring svg{width:100%;height:100%}.score-ring .ring-text{fill:var(--roxy-fg,#0a0a0a);font-size:22px;font-weight:700;font-family:var(--roxy-font-sans)}.score-ring .ring-max{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-top:2px;line-height:1.5;display:block}td.classification{color:var(--roxy-secondary,#475569);white-space:nowrap}th.score{text-align:right}td.score{text-align:right;font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-ring .ring-text,.score-ring .ring-max{display:none}.score-bar{gap:var(--roxy-space-xs,.25rem);grid-template-columns:1fr}.verdict-wrap{text-align:left;justify-items:start}}.mini-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:8px;overflow:hidden}.mini-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.tags{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.tags span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.tags .dosha{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.tags .cancel{background:color-mix(in srgb, var(--roxy-success,#16a34a) 18%, transparent);color:var(--_success-fg)}`],za=m([(0,jd.customElement)("roxy-guna-milan")],za);function vh(n){return n&&bh[n.toLowerCase()]||1}var Ne=require("lit"),Vd=require("lit/decorators.js");var Ma=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderChart(e,t,a){let s=new Set(a?e.personAGates:(e.channels??[]).flatMap(h=>h.personAGates??[])),o=new Set(a?e.personBGates:(e.channels??[]).flatMap(h=>h.personBGates??[])),i=new Map;for(let h of new Set([...s,...o]))i.set(h,{left:s.has(h),right:o.has(h)});let l=new Set((e.centers??[]).filter(h=>h.defined).map(h=>h.id)),c=new Map((e.centers??[]).map(h=>[h.id,h.name])),p=new Map;for(let h of e.channels??[])p.set(h.gateA,h.name),p.set(h.gateB,h.name);let d=new Map;for(let[h,b]of i){let L=[b.left&&"A",b.right&&"B"].filter(Boolean).join(" + ");d.set(h,[`Gate ${h}`,p.get(h),L].filter(Boolean).join(" · "))}return Ne.html`<svg class="chart" part="chart" viewBox="${pn}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${mn({definedCenters:l,gateSources:i,gateTitles:d,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${a?Ne.nothing:Ne.html`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),a=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],o=e.centers??[],i=o.filter(l=>l.defined).length;return Ne.html`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?Ne.html`<span class="count">${e.totalChannels} channels</span>`:Ne.nothing}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,a,t),a,this.translator)} ${lr([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?D(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:o.length>0?`${i}/${o.length}`:void 0}])} ${this.hideReadings?Ne.nothing:Ne.html`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(o)} ${this.renderChannels(s,o)}</div>`}renderDynamics(e){if(!e)return Ne.nothing;let t=[{label:"Electromagnetic",aside:Yn(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:Yn(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:Yn(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:Yn(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ne.nothing:Ne.html`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ne.nothing:Ne.html`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let a=t.definedBy??[],s=a.includes("A"),o=a.includes("B"),i=!!t.defined&&!s&&!o;return Ne.html`<div class="row"><span class="cname">${t.name??D(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${Lh(!!t.defined,s,o)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ne.nothing;let a=new Map(t.map(o=>[String(o.id??""),o.name??""])),s=o=>a.get(o)||D(o);return Ne.html`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(o=>Ne.html`<tr><td>${o.name??""}</td><td class="gates">${o.gateA}-${o.gateB}</td><td>${(o.centers??[]).map(s).join(" to ")}</td><td>${o.circuit??""}</td><td>${o.dynamic?Ne.html`<span class="dyn">${o.dynamic}</span>`:Ne.nothing}</td><td class="held">${Kd(o.personAGates)}</td><td class="held">${Kd(o.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};Ma.styles=[u,q,me,Lr,hn,Ue,Ne.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.cname{flex:1;min-width:8rem}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.together{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr:last-child td{border-bottom:none}.gates{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.dyn{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:#1f6fb2;--src-right:#b04e14;--src-ink:#fff}`],Ma=m([(0,Vd.customElement)("roxy-hd-connection")],Ma);function Yn(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function Kd(n){let r=n??[];return r.length>0?r.join(", "):"Neither"}function Lh(n,r,e){return r&&e?"Defined in both charts":r?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}var Le=require("lit"),Jd=require("lit/decorators.js");var Mr=require("lit");var li=360,$h=470,di=8,Ud=li-di*2,Zn=48,As=15,ii=7,qd=16,Un=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],Zd=`0 0 ${li} ${$h}`;function wh(n,r){return di+Ud*(n*2+1)/(r*2)}function Wd(n){return Cs[n.gateA]==="throat"||Cs[n.gateB]==="throat"}function kh(n){return(Wd(n)?Cs[n.gateA]==="throat":Cs[n.gateA]==="g")?n.gateA:n.gateB}function Sh(){return Un.map(n=>Mr.svg`<g>
83
- <rect class="pn-bar" x=${di} y=${n.y} width=${Ud} height=${Zn} rx="10" />
84
- <text class="pn-bar-label" x=${li/2} y=${n.y+Zn/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
- </g>`)}function Rh(n,r,e,t){return e.map((a,s)=>Mr.svg`<g>
86
- <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*qd} cy=${r} r=${ii} />
87
- <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*qd} y=${r} text-anchor="middle" dominant-baseline="central">${t(a)}</text>
88
- </g>`)}function Yd(n,r,e,t,a,s){let o=t.length>0;return Mr.svg`<g>
79
+ `}function Ym(n,r){let e=n.lagnaSign.toLowerCase();return Y.svg`
80
+ ${Vm(n.divisionLabel)}
81
+ ${Oe.map(t=>qm(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Jo(t,n.lagnaSign),r))}
82
+ `}function cd(n){return Wo(n.lagnaSign)!==-1}function Um(n,r){let e=Object.values(n.placements).flat(),t=[];return e.some(a=>a.isRetrograde)&&t.push(`${nd} ${r("retrograde")}`),e.some(a=>a.combust)&&t.push(`${od} ${r("combust")}`),e.some(a=>a.war)&&t.push(`${id} ${r("planetary war")}`),t.length===0?Y.nothing:Y.html`<p class="roxy-frame">${t.join(" · ")}</p>`}function Zm(n){return Y.html`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function Sn(n,r){let e=[];cd(n)||e.push(Zm(r));let t=Um(n,r);return t!==Y.nothing&&e.push(t),e}function Rn(n,r,e){if(r==="north"&&!cd(n))return ad(n,e);switch(r){case"north":return Hm(n,e);case"east":return Ym(n,e);default:return ad(n,e)}}function Cn(n,r,e){return pt({items:Am.map(({id:t,source:a})=>({id:t,label:e(a)})),active:n,onSelect:r,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function pd(n,r,e,t){return Y.html`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${pe()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${r} ${t("Sign")}</th><th scope="col">D${r} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([a,s])=>Y.html`<tr><th scope="row">${s.graha??a}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?Y.html`<span>${it(s.longitude)}</span><small>${f(e,s.longitude,12)}°</small>`:Y.nothing}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}var md=require("lit"),Dn=md.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.kundli-reference-table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.kundli-reference-table th,.kundli-reference-table td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:left;white-space:nowrap;border-bottom:1px solid var(--roxy-border,#e4e4e7)}.kundli-reference-table small{color:var(--roxy-secondary,#475569);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,560px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.line{fill:#0000;stroke:var(--roxy-border,#d4d4d8)}.sign-text{fill:var(--roxy-muted,#71717a);font-size:11px;font-weight:500;font-family:var(--roxy-font-sans);text-transform:uppercase;letter-spacing:.04em}.rashi-num{fill:var(--roxy-muted,#71717a);font-size:12px;font-weight:500;font-family:var(--roxy-font-sans)}.house-num{fill:var(--roxy-accent-ink,#b45309);font-size:11px;font-weight:600;font-family:var(--roxy-font-sans);opacity:.85}.planet-text{fill:var(--roxy-fg,#0a0a0a);font-size:13px;font-weight:600;font-family:var(--roxy-font-sans)}.centre-label{fill:var(--roxy-muted,#71717a);font-size:14px;font-weight:600;font-family:var(--roxy-font-sans);letter-spacing:.02em}.lagna-marker{fill:var(--roxy-accent-ink,#b45309);font-size:10px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.08em;text-transform:uppercase}.lagna-bg{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent)}.lagna-slash{stroke:var(--roxy-accent,#f59e0b);stroke-linecap:round;opacity:.7}`;var Wm={number:9,name:"Navamsa"},hd=n=>"division"in n&&n.division?n.division:Wm,Cr=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=hd(this.data),t=`D${e.number} ${e.name}`;return kn(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=hd(e),{vargottama:s}=e;return Et.html`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${a.number} ${a.name} ${Po(a.name,a.sanskritName)?Et.html`<span class="division-meta">· ${a.sanskritName}</span>`:Et.nothing}</h2>${a.significance?Et.html`<p class="significance">${a.significance}</p>`:Et.nothing} ${be(this.effectiveLang(),e.frame,this.translator)} ${Sn(t,this.translator)}</div>${Cn(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Et.html`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${a.number} ${a.name}`})}"><title>D${a.number} ${a.name}</title>${Rn(t,this.chartStyle,this.translator)}</svg>`,`D${a.number} ${a.name}`,this.translator)}</div>${pd(e.chart.meta,a.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?Et.html`<div class="vargottama-row" part="details" role="list" aria-label="${this.t("Vargottama planets")}"><span class="vargottama-label">${this.t("Vargottama")}:</span> ${s.map(o=>Et.html`<span class="vargottama-pill" role="listitem">${R(o)??""} ${o}</span>`)}</div>`:Et.nothing}</div>`}};Cr.styles=[u,Ue,ee,Dn,q,ot,Et.css`.division-meta{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}.significance{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.vargottama-row{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;align-items:center;display:flex}.vargottama-label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin-right:var(--roxy-space-xs,.25rem);font-weight:500}.vargottama-pill{font-size:var(--roxy-text-sm,.875rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 22%, transparent);color:var(--roxy-fg,#0a0a0a);border:1px solid color-mix(in srgb, var(--roxy-accent,#f59e0b) 45%, transparent);border-radius:999px;align-items:center;gap:.2em;padding:.15em .6em;font-weight:600;display:inline-flex}`],m([(0,Tn.property)({type:String,reflect:!0,attribute:"chart-style"})],Cr.prototype,"chartStyle",2),Cr=m([(0,Tn.customElement)("roxy-divisional-chart")],Cr);var Fe=require("lit"),An=require("lit/decorators.js");var Xm={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},Dr=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,a=Xm[this.type]??this.type,s=(e.severity??"").toLowerCase(),o=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,i=o*33,l=o===3?"var(--roxy-danger)":o>=1?"var(--roxy-warning)":"transparent";return Fe.html`<article class="card" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="${`badge ${t?"present":"absent"}`}">${t?this.t("Present"):this.t("Absent")} </span>${be(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Fe.html`<p class="subtype"><span class="subtype-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:Fe.nothing} ${e.severity?Fe.html`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${o}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" style="width:${i}%;background:${l}"></span></div>`:Fe.nothing} ${e.description&&!this.hideReadings?Fe.html`<p class="description">${e.description}</p>`:Fe.nothing} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Fe.html`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(c=>Fe.html`<li>${c}</li>`)}</ul></div>`:Fe.nothing} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Fe.html`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(c=>Fe.html`<li>${c}</li>`)}</ul></div>`:Fe.nothing}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return Fe.nothing;let t=[];for(let[a,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Fe.html`<div><h3>${a}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[o,i]of Object.entries(s))typeof i=="string"&&i.length>0&&t.push(Fe.html`<div><h3>${o}</h3><p>${i}</p></div>`);return t.length===0?Fe.nothing:Fe.html`<div class="effects" part="section effects">${t}</div>`}};Dr.styles=[u,ee,Fe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.subtype{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.subtype .subtype-label{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-size:var(--roxy-text-xs,.75rem);margin-right:.4rem}.badge{align-items:center;gap:var(--roxy-space-xs,.25rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;padding:4px 10px;display:inline-flex}.badge.absent{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.present{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.severity-bar{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 30%, transparent);border-radius:4px;width:100%;height:8px;position:relative;overflow:hidden}.severity-fill{height:100%;transition:width var(--roxy-motion-duration,.2s) ease-out;border-radius:4px;display:block}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}.description{color:var(--roxy-fg,#0a0a0a);margin:0}h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}.effects{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.effects p{font-size:var(--roxy-text-sm,.875rem);margin:0}`],m([(0,An.property)({type:String,reflect:!0})],Dr.prototype,"type",2),Dr=m([(0,An.customElement)("roxy-dosha-card")],Dr);var te=require("lit"),ud=require("lit/decorators.js");var Jm=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Ds(n){if(!n.text)return"";let r=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=r;e&&(t=r?Jm.test(e.trim())?`${r}.${e}`:`${r}, ${e}`:e);let a=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[D(n.text),t].filter(Boolean).join(" "),a,n.basis].filter(Boolean).join(" · ")}var gd=require("lit"),Tr=gd.css`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var Qm=["vata","pitta","kapha"],eh={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function th(n){return n.split("-").map(H).join("-")}function rh(n,r){return tt(n,(r??"").split(" ").filter(Boolean).map(H))}var La=class extends g{renderData(r){let e=this.effectiveLang(),t=r.composite;return te.html`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 class="title" id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?te.html`<span class="type">${th(t.type)}</span>`:te.nothing}</header>${this.renderBar(e,r)}<div class="facts" part="details">${t?.dominant?te.html`<span><span class="lbl">${this.t("Dominant")}</span><b>${H(t.dominant)}</b></span>`:te.nothing} ${t?.secondary?te.html`<span><span class="lbl">${this.t("Secondary")}</span><b>${H(t.secondary)}</b></span>`:te.nothing} ${r.lagnaSign?te.html`<span><span class="lbl">${this.t("Lagna")}</span><b>${H(r.lagnaSign)}</b></span>`:te.nothing} ${r.moonSign?te.html`<span><span class="lbl">${this.t("Moon sign")}</span><b>${H(r.moonSign)}</b></span>`:te.nothing}</div>${this.renderFactors(e,r.factors)} ${this.renderRanking(e,r.strengthRanking)} ${this.renderPlanetDoshas(r.planetDoshas)} ${r.summary&&!this.hideReadings?te.html`<p class="summary" part="section readings">${r.summary}</p>`:te.nothing} ${be(e,r.frame,this.translator)} ${r.meta?.disclaimer?te.html`<p class="disclaimer" part="disclaimer">${r.meta.disclaimer}</p>`:te.nothing}</article>`}renderBar(r,e){let t=e.composite,a=Qm.map(o=>({humour:o,value:t?.[o]??0}));return a.reduce((o,i)=>o+i.value,0)<=0?te.nothing:te.html`<div part="chart"><div class="bar" role="img" aria-label="${a.map(o=>`${H(o.humour)} ${_e(r,o.value,0)}`).join(", ")}">${a.filter(o=>o.value>0).map(o=>te.html`<div class="${`seg seg-${o.humour}`}" style="${`flex: ${o.value} 0 0`}"></div>`)}</div><p class="shares">${a.map(o=>te.html`<span><span class="${`swatch seg-${o.humour}`}"></span>${H(o.humour)} <b>${_e(r,o.value,0)}</b></span>`)}</p></div>`}renderFactors(r,e){let t=e??[];return t.length===0?te.nothing:te.html`<section part="section factors"><h3 class="block-title">${this.t("Factors")}</h3><ul class="rows">${t.map(a=>te.html`<li class="row" part="label-track"><span class="row-name">${this.factorLabel(a.id)}</span><div><span>${rh(r,a.input)}</span> ${a.doshas?.length?te.html`· ${a.doshas.map(s=>H(s)).join(", ")}`:te.nothing} ${typeof a.weight=="number"?te.html`· <span class="lbl">${this.t("Weight")}</span>${f(r,a.weight,2)}`:te.nothing} ${this.renderCitation(a.source)}</div></li>`)}</ul></section>`}factorLabel(r){let e=eh[r??""];return e?this.t(e):D(r??"")}renderCitation(r){let e=Ds(r??{});return e?te.html`<div class="cite"><p><span class="lbl">${this.t("Source")}</span>${e}</p>${r?.note?te.html`<details class="note"><summary>${this.t("Note on the source")}${pe()}</summary><p>${r.note}</p></details>`:te.nothing}</div>`:te.nothing}renderRanking(r,e){let t=e??[];return t.length===0?te.nothing:te.html`<section part="section ranking"><h3 class="block-title">${this.t("Shadbala")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(a=>te.html`<tr class="${a.strong?"is-strong":""}"><td class="num">${j(r,a.rank)}</td><td>${a.graha??""}</td><td class="num">${this.t("{{value}} virupas",{value:f(r,a.totalVirupas,2)})}</td><td>${a.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(r){let e=r??[];return e.length===0?te.nothing:te.html`<section part="section planet-humours"><h3 class="block-title">${this.t("Planetary humours")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>te.html`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(a=>H(a)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" · ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(r){let e=new Set;for(let t of r)for(let a of[t.doshaSource,t.dhatuSource]){let s=Ds(a??{});s&&e.add(s)}return e.size===0?te.nothing:te.html`<p class="cite"><span class="lbl">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};La.styles=[u,ee,q,Tr,te.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.type{font-size:var(--roxy-text-xl,1.25rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.bar{border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);width:100%;min-width:0;height:1.5rem;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info,#0284c7) 45%, var(--roxy-surface,#fff))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 45%, var(--roxy-surface,#fff))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, var(--roxy-surface,#fff))}.shares{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.shares b{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.cite{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:.15rem 0 0}.cite p{margin:0}.cite .note summary{cursor:pointer;width:fit-content;color:var(--roxy-secondary,#475569);align-items:center;gap:.25rem;display:flex}.cite .note p{margin:.15rem 0 0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}td.num{font-variant-numeric:tabular-nums}tr.is-strong td{font-weight:var(--roxy-weight-bold,600)}.summary{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.disclaimer{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-left:3px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);color:var(--roxy-secondary,#475569);margin:0}`],La=m([(0,ud.customElement)("roxy-dosha-constitution")],La);var Yt=require("lit"),yd=require("lit/decorators.js");var $a=class extends g{renderData(r){return Yt.html`<article class="card" part="card" aria-label="${r.name??this.t("Dream symbol")}"><header class="head" part="header">${r.letter?Yt.html`<span class="letter" aria-hidden="true">${r.letter}</span>`:Yt.nothing}<div><p class="label">${this.t("Dream symbol")}</p>${r.name?Yt.html`<h2 class="name">${r.name}</h2>`:Yt.nothing}</div></header>${r.meaning?Yt.html`<p class="meaning">${r.meaning}</p>`:Yt.nothing}</article>`}};$a.styles=[u,Yt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.letter{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);width:2.5rem;height:2.5rem;color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-variant-numeric:tabular-nums;flex:none;justify-content:center;align-items:center;display:inline-flex}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.meaning{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.6}`],$a=m([(0,yd.customElement)("roxy-dream-card")],$a);var Qt=require("lit"),fd=require("lit/decorators.js");var wa=class extends g{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let a=typeof e.total=="number"?e.total:t.length;return Qt.html`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2 class="title">${this.t("Dream symbols")}</h2><span class="count">${a===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:a})}</span></header><ul class="grid" part="section symbols">${t.map(s=>Qt.html`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?Qt.html`<span class="letter" aria-hidden="true">${s.letter}</span>`:Qt.nothing} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Qt.html`<div class="detail" part="detail">${this.openedRow}</div>`:Qt.nothing}</section>`}};wa.styles=[u,Qt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm,.5rem);text-align:left;width:100%;font:inherit;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);cursor:pointer;background:0 0;transition:border-color .12s,background .12s;display:flex}.result[aria-pressed=true],.result:hover,.result:focus-visible{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.letter{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);width:1.6rem;height:1.6rem;color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;flex:none;place-items:center;display:grid}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:500}`],wa=m([(0,fd.customElement)("roxy-dream-search")],wa);var I=require("lit"),Me=require("lit/decorators.js"),Ut=require("lit/directives/if-defined.js"),_d=require("lit/directives/live.js");var Ts={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var xd={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},bd={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Gt=(n,r)=>`${n}.${r}`;function Mn(n){let r=/^(.+)\.(\d+)$/.exec(n);return r?{key:r[1],index:Number(r[2])}:null}function En(n,r=Co,e=t=>Ts[t]??D(t)){let t=Mn(n);return t?r("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):r(D(n))}function Ld(n,r,e){let t=Gt(r,0);return n.filter(a=>a.group===t).map(a=>({...a,key:`${Gt(r,e)}.${a.name}`,group:Gt(r,e)}))}function ti(n){return n.length<=(Pn(n)?30:12)?"tiles":"select"}function Pn(n){return n.every(r=>r.length<=2)}var ah=["latitude","longitude","timezone"],vd=["latitude","longitude"];function sh(n){let r=n.match(/^(.+?)(Latitude|Longitude)$/);return r?{group:r[1],leaf:r[2].toLowerCase()}:null}var nh=Oe.map(n=>n.toLowerCase());function ka(n,r){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?r[e]:void 0}return n}}function $d(n){let r=n.anyOf??n.oneOf;return!r||r.length===0?n:r.find(e=>Array.isArray(e.enum))??r.find(e=>ei(e)&&ei(e)!=="null")??r[0]??n}function ei(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let r=n.type.filter(e=>e!=="null");return r.length===1?r[0]:void 0}function oh(n){let r=$d(n),e=ei(r);return Array.isArray(r.enum)?ti(r.enum):e==="boolean"?"toggle":r.format==="date"?"date":r.format==="time"?"time":r.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function wd(n){if(n.length!==12)return!1;let r=new Set(n.map(e=>e.toLowerCase()));return nh.every(e=>r.has(e))}function zn(n,r,e){let t=$d(r);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:oh(r)??"text",required:e.required,description:t.description??r.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:r.default??t.default,example:r.example??t.example}}function Qo(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function kd(n,r,e,t=n.requestBody?"POST":"GET"){let a=[],s=[],o=!1,i=n.requestBody?.content?.["application/json"]?.schema,l=ka(i,r),c=l?.["x-required-any-of"];if(l?.properties){let p=Qo(l);for(let[d,h]of Object.entries(l.properties)){let b=ka(h,r)??{},L=b.type==="array"?ka(b.items,r):void 0;if(L?.type==="object"&&L.properties){let v=Math.max(1,b.minItems??1),E=Qo(L);s.push({key:d,min:v,max:b.maxItems??v});for(let Q=0;Q<v;Q++)for(let[$e,nt]of Object.entries(L.properties)){let gr=ka(nt,r)??{};a.push(zn($e,gr,{key:`${Gt(d,Q)}.${$e}`,group:Gt(d,Q),required:p.has(d)&&E.has($e)}))}}else if(b.type==="object"&&b.properties){let v=Qo(b);for(let[E,Q]of Object.entries(b.properties)){let $e=ka(Q,r)??{};$e.type==="array"&&ka($e.items,r)?.type==="object"||a.push(zn(E,$e,{key:`${d}.${E}`,group:d,required:p.has(d)&&v.has(E)}))}}else{let v=sh(d),E=zn(v?.leaf??d,b,{key:d,group:v?.group,required:p.has(d)});v&&(E.label=`${D(v.group)} ${v.leaf}`),a.push(E)}}}for(let p of n.parameters??[]){if(p.in!=="path"&&p.in!=="query")continue;if(p.name==="lang"&&p.in==="query"){o=!0;continue}let d=ka(p.schema,r)??{},h=zn(p.name,d,{key:p.name,required:!!p.required,inQuery:p.in==="query"});if(p.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(Ts[h.name]??D(h.name))){let b=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(p.description??h.description??"")?.[1]?.trim();b&&(h.label=b)}a.push(h)}return ri({title:ih(n.summary,e),fields:a,hasLang:o,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function ri(n,r,e){let t=`${r.toUpperCase()} /${e.replace(/^\//,"")}`,a=xd[t]??{},s=bd[t]??{},o=n.fields.map(d=>{let h={...d};return delete h.role,delete h.city,delete h.fold,{...h,...a[d.key]&&{source:a[d.key]},...s[d.key]&&{disabledWhen:s[d.key]}}}),i=[...new Set(o.map(d=>d.group))].map(d=>d===void 0?{}:{key:d,label:En(d)}),l=i.filter(d=>vd.every(h=>o.some(b=>b.group===d.key&&b.name===h)));for(let[d,h]of l.entries()){let b=o.filter(v=>v.group===h.key),L=b.find(v=>v.name==="timezone")??(d===0?o.find(v=>!v.group&&v.name==="timezone"):void 0);h.location={fields:[...b.filter(v=>vd.includes(v.name)).map(v=>v.key),...L?[L.key]:[]],required:b.some(v=>ah.includes(v.name)&&v.required)}}for(let d of o)d.name==="seed"?d.role="seed":(d.name==="limit"||d.name==="offset")&&!d.required?d.role="hidden-default":l.some(h=>h.location?.fields.includes(d.key))?d.role="location":d.name==="timezone"&&(d.city=!0);let c=i.filter(d=>d.key!==void 0&&(d.location||o.some(h=>h.group===d.key&&h.required))),p=o.some(d=>!d.group&&!d.role&&d.required)||c.length>0||l.some(d=>d.key===void 0);for(let d of i)d.key!==void 0&&p&&!c.includes(d)&&(d.fold=!0);for(let d of o)(d.group?i.find(h=>h.key===d.group)?.fold:!d.role&&(p?!d.required:d.default!==void 0))&&(d.fold=!0);return{...n,fields:o,groups:i,opensOnLoad:lh(n,r)}}function ih(n,r){let e=n?.split(" - ")[0]?.trim();return e||D(r.split("/").pop()??"")}function lh(n,r){return r.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function Sd(n,r=[]){if(r.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Rd(n,r){let e=r.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function dh(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let r=Object.values(n),e=r.find(Array.isArray);return e||(r.find(a=>!!a&&typeof a=="object"&&Object.values(a).every(s=>typeof s=="number"))??null)}function ai(n,r="id"){let e=dh(n);if(!e)return[];if(!Array.isArray(e)){let a=Object.keys(e),s=a.length>0&&a.every(i=>/^[a-z]$/.test(i));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:a).map(i=>({value:i,label:s?i.toUpperCase():i,disabled:!e[i]}))}let t=[];for(let a of e){if(typeof a=="string"){t.push({value:a,label:a});continue}if(!a||typeof a!="object")continue;let s=a,o=s.id??s[r]??s.number;if(o==null)continue;let i=String(o),l=s.name??s.english;t.push({value:i,label:typeof l=="string"?l:i})}return t}function Cd(n){let r=n?.total;return typeof r=="number"?r:void 0}var Pt=require("lit"),In=require("lit/directives/if-defined.js");var Dd=require("lit"),_n=Dd.css`.spinner{border:2px solid var(--roxy-muted,#71717a);border-top-color:#0000;border-radius:50%;width:14px;height:14px;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;right:12px;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;padding:var(--roxy-space-xs,.25rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-md);max-height:22rem;animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));margin:0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm,.5rem);width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,6px);text-align:left;font-family:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);cursor:pointer;transition:background-color var(--roxy-motion-duration,.2s);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}.empty{padding:var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`;function Nn(n,r){let e,t=((...a)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...a)},r)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var ch=10,ph=10,si=new Map;function Td(n,r,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&r?{lang:r}:{},...e}}function oi(n,r,e,t){let a=JSON.stringify([n.submitUrl??n.baseUrl,r.path,e,t]),s=si.get(a);return s||(s=mh(n,r,e,t).catch(o=>{throw si.delete(a),o}),si.set(a,s)),s}async function mh(n,r,e,t){let a=[];for(let s=0;s<ph;s++){let o=await ss(n,{path:r.path,method:"GET",query:Td(r,t,a.length?{offset:a.length}:{})}),i=ai(o,e);a.push(...i);let l=Cd(o);if(!r.limit||l===void 0||a.length>=l||!i.length)break}return a}var ni=n=>n.normalize("NFD").replace(/\p{M}/gu,"").toLowerCase(),Gn=class{constructor(r,e,t,a,s){this.host=r;this.source=e;this.field=t;this.context=a;this.onPick=s;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=Nn(r=>{this.searchServer(r)},250);r.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(r){this.query=r,this.error=null,this.source.search?r.trim().length<2?this.close():this.search(r):this.filter(r),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(r){this.query=r.label,this.close(),this.onPick(r)}keydown(r){let e=this.options.length;if(r.key==="Escape"){this.close();return}if(r.key==="ArrowDown"&&!this.open){r.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(r.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(r.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(r.key==="Home")this.highlight=0;else if(r.key==="End")this.highlight=e-1;else if(r.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;r.preventDefault(),this.host.requestUpdate()}}async filter(r){let{route:e,lang:t}=this.context();this.loading=!0,this.host.requestUpdate();try{let a=await oi(e,this.source,this.field,t);if(r!==this.query)return;let s=ni(r.trim());this.show(a.filter(o=>ni(o.label).includes(s)||ni(o.value).includes(s)))}catch(a){this.fail(a)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(r){let{route:e,lang:t}=this.context(),a=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=!0,this.host.requestUpdate();try{let o=await ss(e,{path:this.source.path,method:"GET",query:Td({...this.source,limit:ch},t,{[a]:r})},s.signal);if(s.signal.aborted)return;this.show(ai(o,this.field))}catch(o){if(s.signal.aborted)return;this.fail(o)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(r){this.options=r,this.open=!0,this.highlight=r.length?0:-1}fail(r){this.options=[],this.open=!1,this.error=r instanceof Error?r.message:String(r)}};function Ad(n,r,e,t={}){let a=`${r}-listbox`;return Pt.html`<div class="picker"><input id="${r}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${a}" aria-autocomplete="list" aria-labelledby="${(0,In.ifDefined)(t.labelledby)}" aria-describedby="${(0,In.ifDefined)(t.describedby)}" aria-invalid="${(0,In.ifDefined)(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${r}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?Pt.html`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Pt.nothing} ${n.open?Pt.html`<ul id="${a}" class="results" role="listbox">${n.options.length===0?Pt.html`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,o)=>Pt.html`<li id="${`${r}-opt-${o}`}" class="option" role="option" aria-selected="${n.highlight===o?"true":"false"}" @mousedown="${i=>i.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:Pt.nothing}</div>${n.error?Pt.html`<small class="field-error" role="alert">${n.error}</small>`:Pt.nothing}`}var zd=[_n,Pt.css`.picker{position:relative}`];var On="0.53.1";var Md="https://roxyapi.com/api/v2/openapi.json",hh=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${On}/dist/schemas`,ii=new Map,Bn=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},Fn=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function gh(n){let r=ii.get(n);return r||(r=fetch(n).then(async e=>{if(!e.ok)throw new Bn(e.status);return await e.json()}).catch(e=>{throw ii.delete(n),e}),ii.set(n,r)),r}function uh(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Ed=n=>/\bbirth/i.test(n?.description??""),Pd=n=>n.key===`${n.group}.${n.name}`;function yh(n){let r=n.trim();if(!r)return[];try{let e=JSON.parse(r);if(Array.isArray(e))return e}catch{}return r.split(",").map(e=>e.trim()).filter(Boolean)}var Re=class extends ur{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||Md,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof Bn?this.t("HTTP error {{status}}",{status:e.status}):e instanceof Fn?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(Md)}async modelFromSpec(e){let t=await gh(e),a=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[a]?.[this.method.toLowerCase()];if(!s)throw new Fn(this.method,a);return kd(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${hh}/${Rd(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=ri(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let t={};for(let a of e.fields){let s=this.fullPages&&a.name==="limit"&&this.roleOf(a)==="hidden-default"?a.max??a.default:a.default;s!==void 0&&(t[a.key]=s);let o=a.group&&Pd(a)?this.initialValues?.[a.group]?.[a.name]:this.initialValues?.[a.key];o!==void 0&&(t[a.key]=o)}this.values=this.withoutDisabled(t),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ao(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!Ao(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let a=new Gn(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));a.query=String(this.values[t.key]??""),this.pickers.set(t.key,a);continue}this.choices={...this.choices,[t.key]:"loading"},oi(this.route,t.source,t.name,this.requestLang()).then(a=>{this.choices={...this.choices,[t.key]:a}},()=>{let{[t.key]:a,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(a=>this.serverIssues?.some(s=>s.path===a));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let a=e.disabledWhen;return!!a&&t[a.field]===a.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?Xr(this.publishableKey):void 0;t&&rs(this,t,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let a=this.fields.find(s=>s.key===t.path);return!!a&&this.roleOf(a)==="location"&&this.cityGroup(a)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e.name,e.label)}`:this.fieldText(e.name,e.label)}issueLines(e){return e.map(t=>I.html`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?I.html`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:I.nothing}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return I.nothing;let t=a=>{let s=this.fields.find(i=>i.key===a);if(s)return this.fieldLabel(s);let o=this.groupKeys().find(i=>i===a);return o?this.groupName(o):this.fieldText(a.split(".")[0]??a)};return I.html`<div part="validation-error" class="validation-error" role="alert">${e.map(a=>I.html`<div><strong>${t(a.path)}</strong> ${a.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(a=>a.group===e);return t.find(a=>a.name==="latitude")??t.find(a=>a.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(a=>this.groupHasLocation(a))||this.groupKeys().some(a=>a!==void 0))return null;let e=this.fields.filter(a=>a.required&&this.isRendered(a)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(a=>a.value);return this.isFilter(e)&&!Pn(t)?"select":this.choices[e.key]?ti(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(a=>({value:a,label:this.optionText(e.name,a)}))}effectiveSubmitLabel(){return this.submitLabel||this.t(Sd(this.endpoint,this.fields))}requestLang(){return Os(this)}fieldText(e,t){return t||Pe(this.requestLang(),e,Ts[e])}optionText(e,t){return ge(this.requestLang(),e,t)}onLocationFor(e){return t=>{let a=this.groups.find(o=>o.key===e)?.location?.fields??[],s={};for(let o of a){let i=this.fields.find(l=>l.key===o)?.name;i&&(s[o]=t[i])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),t&&this.soleChoice?.key===e.key&&this.submit()}setFilter(e,t){let a={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(a[s.key]=void 0);this.setValues(a)}onTilesKeyDown(e){return t=>{let a=this.choicesOf(e).filter(p=>!p.disabled).map(p=>p.value);if(a.length===0)return;let s=a.indexOf(this.values[e.key]),o;if(t.key==="Home")o=0;else if(t.key==="End")o=a.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")o=s===-1?0:(s+1)%a.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")o=s===-1?a.length-1:(s-1+a.length)%a.length;else return;t.preventDefault();let i=a[o];if(i===void 0)return;this.chooseOption(e,i);let l=t.currentTarget,c=this.choicesOf(e).findIndex(p=>p.value===i);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(o=>o.path));let t={};for(let o of this.fields){let i=this.values[o.key];if(o.name==="seed"&&(i===void 0||i==="")&&(i=uh()),i===void 0||i==="")continue;o.kind==="array"&&typeof i=="string"&&(i=yh(i));let l=o.group?Mn(o.group):null;if(l){let c=t[l.key]??[],p=c[l.index]??{};p[o.name]=i,c[l.index]=p,t[l.key]=c}else if(o.group&&Pd(o)){let c=t[o.group]??{};c[o.name]=i,t[o.group]=c}else t[o.key]=i}let a=this.fields.filter(o=>o.inQuery).map(o=>o.name),s=this.requestLang();this.hasLang&&s&&(t.lang=s,a.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:a,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],t=[],a=new Set;for(let s of this.fields){if(!s.required)continue;let o=this.roleOf(s)==="location";if(!this.isRendered(s)&&!o)continue;let i=this.values[s.key];if(!(i!==void 0&&i!=="")){if(e.push(s.key),o){a.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of a)t.push(this.locationLabel(s));return{keys:e,labels:t}}reqMark(e){return e.required?I.html`<span class="req" aria-hidden="true">*</span>`:I.nothing}description(e){if(!e.description)return I.nothing;if(e.description.length<=120)return I.html`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return I.html`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${pe()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,a=!!e.enum&&wd(e.enum),s=this.choicesOf(e),o=Pn(s.map(c=>c.value)),i=s.findIndex(c=>c.value===this.values[e.key]),l=i===-1?s.findIndex(c=>!c.disabled):i;return I.html`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</span><div class="${o?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,p)=>{let d=this.values[e.key]===c.value,h=a?Z(c.value):void 0;return I.html`<button type="button" class="tile" role="radio" data-tile="${p}" aria-checked="${d?"true":"false"}" tabindex="${p===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${h?I.html`<span class="tile-glyph" aria-hidden="true">${h}</span>`:I.nothing} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return I.html`<div part="field" class="field"><label for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${(0,Ut.ifDefined)(this.issueFor(e)?"true":void 0)}" aria-describedby="${(0,Ut.ifDefined)(this.issueFor(e)?`${t}-error`:void 0)}" .value="${(0,_d.live)(this.values[e.key]??"")}" @change="${a=>this.chooseOption(e,a.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(a=>I.html`<option value="${a.value}" ?selected="${this.values[e.key]===a.value}" ?disabled="${!!a.disabled}">${a.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let a=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key,o=this.issueFor(e);return I.html`<div part="field" class="field">${s?I.nothing:I.html`<label for="${a}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${Ad(t,a,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:o?`${a}-error`:void 0,invalid:!!o})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,a=this.values[e.key]===!0;return I.html`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${a?"true":"false"}" @click="${()=>this.setValue(e.key,!a)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,a=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.kind==="array"?this.t("Comma separated"):e.example!=null?String(e.example):"";return I.html`<div part="field" class="field"><label for="${t}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":a}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${(0,Ut.ifDefined)(this.issueFor(e)?"true":void 0)}" aria-describedby="${(0,Ut.ifDefined)(this.issueFor(e)?`${t}-error`:void 0)}" min="${(0,Ut.ifDefined)(e.min)}" max="${(0,Ut.ifDefined)(e.max)}" step="${e.kind==="number"?"any":I.nothing}" placeholder="${s||I.nothing}" .value="${this.values[e.key]??""}" @input="${o=>{let i=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,i):this.setValue(e.key,i)}}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let a=this.choices[e.key];return a==="loading"?I.html`<div class="field"><div class="roxy-skeleton" style="height:2.75rem" aria-label="${this.t("Loading")}" role="status"></div></div>`:a||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return En(e,(t,a)=>this.t(t,a),t=>this.fieldText(t))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Mn(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),a=Ld(this.fields,e,t),s=this.groups.find(i=>i.key===Gt(e,0));if(s){let i=l=>l.replace(`${Gt(e,0)}.`,`${Gt(e,t)}.`);this.groups=[...this.groups,{...s,key:Gt(e,t),label:En(Gt(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(i)}}}]}let o={...this.values};for(let i of a)i.default!==void 0&&(o[i.key]=i.default);this.values=o,this.fields=[...this.fields,...a]}removeRecord(e){let t=Gt(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let a={...this.values};for(let s of Object.keys(a))s.startsWith(`${t}.`)&&delete a[s];this.values=a}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?I.nothing:I.html`<div class="repeat-controls">${t<e.max?I.html`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:I.nothing} ${t>e.min?I.html`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:I.nothing}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Ed(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return I.html`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?I.html`<span class="req" aria-hidden="true">*</span>`:I.nothing}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return I.html`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.setValue(e.key,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let a=e?this.t("{{group}} city",{group:this.groupName(e)}):Ed(this.placeField(e))?this.t("City of birth"):void 0;return I.html`<roxy-location-search endpoint="${(0,Ut.ifDefined)(this.locationUrl||void 0)}" publishable-key="${(0,Ut.ifDefined)(this.publishableKey)}" lang="${(0,Ut.ifDefined)(this.effectiveLang())}" placeholder="${(0,Ut.ifDefined)(a)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(a=>a.group===e&&this.isRendered(a));return I.html`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):I.nothing}<div class="fields">${t.map(a=>this.renderField(a))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return I.html`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return I.html`<div class="spec-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=Xr(this.publishableKey);if(e)return I.html`<form><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2><div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(p=>!p.group&&this.isRendered(p)),a=this.groupKeys().filter(p=>p!==void 0),s=t.filter(p=>!p.fold),o=t.filter(p=>p.fold),i=a.filter(p=>!this.groups.find(d=>d.key===p)?.fold),l=a.filter(p=>this.groups.find(d=>d.key===p)?.fold),c=o.length>0||l.length>0;return I.html`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?I.html`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:I.nothing} ${this.renderIssueSummary()}<div class="fields">${s.map(p=>this.renderField(p))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):I.nothing} ${i.map(p=>this.groupCard(p))} ${this.repeats.map(p=>this.repeatControls(p))} ${c?I.html`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(p=>[...o.map(d=>d.key),...l].some(d=>p.path===d||p.path.startsWith(`${d}.`)))}"><summary>${this.t("Advanced")}${pe()}</summary><div class="fields">${o.map(p=>this.renderField(p))}</div>${l.map(p=>this.groupCard(p))}</details>`:I.nothing} ${this.selfSubmits?I.nothing:I.html`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let a=Number(t);return Number.isFinite(a)?a:void 0}return t}}};Re.styles=[u,q,zd,I.css`form{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.fields{align-items:start;gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.fields:empty{display:none}.person-group{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);min-inline-size:0;margin:0;display:grid}.person-group legend{padding:0 var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-bold,600)}.field{gap:var(--roxy-space-xs,.25rem);flex-direction:column;min-width:0;display:flex}.fields>*,.field>input,.field>select{min-width:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.req{color:var(--_danger-fg);margin-left:4px}input,select{box-sizing:border-box;width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-family:inherit}input:focus,select:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.help{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.field-error{color:var(--_danger-fg);font-size:var(--roxy-text-xs,.75rem)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger,#dc2626)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.help-details>summary{cursor:pointer;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:4px;display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-top:var(--roxy-space-xs,.25rem);display:block}.location-block{gap:var(--roxy-space-xs,.25rem);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr));display:grid}.tile{min-height:44px;padding:var(--roxy-space-sm,.5rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease), background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-direction:column;justify-content:center;align-items:center;gap:2px;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent,#f59e0b)}.tile:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.tiles.narrow{gap:var(--roxy-space-xs,.25rem);grid-template-columns:repeat(auto-fill,minmax(2.25rem,1fr))}.tile[aria-checked=true]{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.tile:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.tile-glyph{font-size:1.35em;line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.toggle{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);cursor:pointer;width:44px;height:26px;transition:background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0;padding:0;position:relative}.toggle[aria-checked=true]{background:var(--roxy-accent,#f59e0b);border-color:var(--roxy-accent,#f59e0b)}.toggle .knob{background:var(--roxy-bg,#fff);width:20px;height:20px;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);border-radius:50%;position:absolute;top:2px;left:2px}.toggle[aria-checked=true] .knob{transform:translate(18px)}.toggle:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.advanced>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:6px;display:flex}.advanced[open]>summary{margin-bottom:var(--roxy-space-md,1rem)}.repeat-controls{gap:var(--roxy-space-sm,.5rem);display:flex}.repeat-btn{color:var(--roxy-accent-ink,#b45309);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font:inherit;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink,#b45309)}.advanced .fields,.advanced .person-group{margin-top:var(--roxy-space-md,1rem)}.validation-error{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 8%, transparent);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);display:grid}button.submit{background:var(--roxy-accent-ink,#b45309);min-height:44px;color:var(--roxy-bg,#fff);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}button.submit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.spec-error{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}`],m([(0,Me.property)({type:String,attribute:"data-endpoint"})],Re.prototype,"endpoint",2),m([(0,Me.property)({type:String})],Re.prototype,"method",2),m([(0,Me.property)({type:String,attribute:"spec-url"})],Re.prototype,"specUrl",2),m([(0,Me.property)({type:String,attribute:"submit-label"})],Re.prototype,"submitLabel",2),m([(0,Me.property)({type:String,attribute:"publishable-key"})],Re.prototype,"publishableKey",2),m([(0,Me.property)({type:String,attribute:"location-url"})],Re.prototype,"locationUrl",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"initialValues",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"serverIssues",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"apiRoute",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"autoload",2),m([(0,Me.property)({attribute:!1})],Re.prototype,"fullPages",2),m([(0,Me.state)()],Re.prototype,"choices",2),m([(0,Me.state)()],Re.prototype,"clearedIssues",2),m([(0,Me.state)()],Re.prototype,"fields",2),m([(0,Me.state)()],Re.prototype,"repeats",2),m([(0,Me.state)()],Re.prototype,"formTitle",2),m([(0,Me.state)()],Re.prototype,"hasLang",2),m([(0,Me.state)()],Re.prototype,"values",2),m([(0,Me.state)()],Re.prototype,"loaded",2),m([(0,Me.state)()],Re.prototype,"specError",2),m([(0,Me.state)()],Re.prototype,"validationErrors",2),Re=m([(0,Me.customElement)("roxy-endpoint-form")],Re);var Ce=require("lit"),Hn=require("lit/decorators.js");var fh="12:00 UTC",Ar=class extends g{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),a=this.effectiveLang();return Ce.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2><p class="month"><span>${ns(a,t.year,t.month)}</span><span class="basis">${fh}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div class="tracks" role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" aria-label="${this.t("Daily positions")}" tabindex="0">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?Ce.nothing:Ce.html`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>Ce.html`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=R(e.name);return Ce.html`<div class="track" role="listitem"><span class="body-name">${t?Ce.html`<span class="glyph" aria-hidden="true">${t}</span>`:Ce.nothing}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?Ce.html`<span class="chips">${e.ingresses.map(a=>this.renderIngressChip(a))} ${e.retrogrades.map(a=>this.renderRetrogradeChip(a))}</span>`:Ce.nothing}</div>`}renderPosition(e){let{degree:t,minute:a}=No(e.degreeInSign),s=Z(e.sign),o=y(e,"sign");return Ce.html`<span class="pos" title="${o}">${t}${s?Ce.html`<span class="sg" aria-hidden="true">${s}</span>`:Ce.html`<span class="sg">${o}</span>`}${String(a).padStart(2,"0")}</span>`}renderIngressChip(e){let t=Z(e.sign),a=ta(this.effectiveLang(),e.date);return Ce.html`<span class="chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:a})}"><span aria-hidden="true">→</span>${t?Ce.html`<span aria-hidden="true">${t}</span>`:Ce.nothing}${e.signLabel} <span class="chip-date">${a}</span></span>`}renderRetrogradeChip(e){let t=this.effectiveLang(),a=ta(t,e.start),s=ta(t,e.end),o=a===s?a:`${a} - ${s}`;return Ce.html`<span class="chip chip--retro"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:o})}</span>`}renderGrid(e){let t=this.effectiveLang();return Ce.html`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(a=>{let s=R(a.name);return Ce.html`<th scope="col" title="${a.label}">${s?Ce.html`<span class="glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${a.label}</span>`:a.label}</th>`})}</tr></thead><tbody>${e.rows.map(a=>Ce.html`<tr><th scope="row" class="day">${el(t,a.date)}</th>${a.cells.map((s,o)=>this.renderCell(s,e.bodies[o],a.date))}</tr>`)}</tbody></table>`}renderCell(e,t,a){if(!e)return Ce.html`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(a)?"ingress":"",t?.stationDates.has(a)?"station":""].filter(Boolean).join(" ");return Ce.html`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?Ce.html`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:Ce.nothing}</td>`}toViewModel(e){let t=[],a=new Map;for(let i of e.days)for(let l of i.positions){let c=a.get(l.planet);c||(c=[],a.set(l.planet,c),t.push(l.planet)),c.push({date:i.date,p:l})}let s=[];for(let i of t){let l=a.get(i),c=l?.[0],p=l?.[l.length-1];if(!l||!c||!p)continue;let d=[],h=[],b=new Set,L=new Set;for(let v=0;v<l.length;v++){let E=l[v],Q=l[v-1];if(!E||(Q&&E.p.sign!==Q.p.sign&&(d.push({date:E.date,sign:E.p.sign,signLabel:y(E.p,"sign")}),b.add(E.date)),Q&&E.p.isRetrograde!==Q.p.isRetrograde&&L.add(E.date),!E.p.isRetrograde))continue;let $e=h[h.length-1];$e&&Q?.p.isRetrograde?$e.end=E.date:h.push({start:E.date,end:E.date})}s.push({name:i,label:y(p.p,"planet"),first:c.p,last:p.p,ingresses:d,retrogrades:h,ingressDates:b,stationDates:L})}let o=e.days.map(i=>{let l=new Map(i.positions.map(c=>[c.planet,c]));return{date:i.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:o,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let o of s.positions){let i=String(o.sign??"").toLowerCase();i&&!t.has(i)&&t.set(i,y(o,"sign"))}let a=[];for(let s of Oe){let o=t.get(s.toLowerCase()),i=Z(s);o&&i&&a.push({sign:s,label:o,glyph:i})}return a}};Ar.styles=[u,Ce.css`:host{overflow-x:clip}.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.month{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);flex-wrap:wrap;margin:0;display:flex}.basis{font-variant-numeric:tabular-nums}.wrap>*{min-width:0}h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.signkey{flex-wrap:wrap;gap:1px 0;margin:0;padding:0;list-style:none;display:flex}.signkey-item{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);white-space:nowrap;align-items:baseline;gap:.3rem;padding:2px 10px 2px 0;display:inline-flex}.signkey-glyph{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.tracks{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:minmax(0,1fr);gap:1px;display:grid;overflow:hidden}.track{align-items:center;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);padding:6px var(--roxy-space-sm,.5rem);background:var(--roxy-surface,#fff);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:.35rem;min-width:8.5rem;font-weight:500;display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.1em}.span{color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;white-space:nowrap;align-items:baseline;gap:.3rem;display:inline-flex}.arrow{color:var(--roxy-muted,#71717a)}.chip-date{color:var(--roxy-secondary,#475569)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin-left:auto;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);white-space:nowrap;align-items:baseline;gap:.25rem;padding:1px 8px;display:inline-flex}.chip--ingress{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a)}.chip--retro{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);color:var(--_danger-fg);font-weight:var(--roxy-weight-bold,600)}.scroll:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b);outline-offset:2px}.scroll{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:4px 8px}thead th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}thead th .glyph{color:var(--roxy-fg,#0a0a0a);font-size:1.15em}th.day{z-index:1;background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;border-right:1px solid var(--roxy-border,#e4e4e7);font-weight:500;position:sticky;left:0}thead th.day{z-index:2;background:var(--roxy-surface,#fff)}td{font-variant-numeric:tabular-nums}.sg{color:var(--roxy-secondary,#475569);font-variant-numeric:normal;margin:0 .15em}.retro-mark{font-weight:var(--roxy-weight-bold,600);margin-left:.25em}td.retro{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent);color:var(--_danger-fg)}td.retro .sg{color:inherit}td.ingress{box-shadow:inset 3px 0 var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}td.station{border-top:2px solid var(--_danger-fg);font-weight:var(--roxy-weight-bold,600)}`],m([(0,Hn.property)({type:String})],Ar.prototype,"heading",2),Ar=m([(0,Hn.customElement)("roxy-ephemeris-table")],Ar);var We=require("lit"),Nd=require("lit/decorators.js");var Sa=class extends g{renderData(r){let e=r.conjunctions??[],t=r.stars??[];return We.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Fixed stars")}</h2>${typeof r.orb=="number"?We.html`<span class="badge"><b>${this.t("Orb")}</b> ${f(this.effectiveLang(),r.orb,1)}°</span>`:We.nothing}</header>${r.summary&&!this.hideReadings?We.html`<p class="summary">${r.summary}</p>`:We.nothing} ${e.length?We.html`<section part="section conjunctions"><p class="subhead">${this.t("Conjunctions to the chart")}</p>${e.map((a,s)=>We.html`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:a.point,star:a.star})}</span> ${pe()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:f(this.effectiveLang(),a.orb,2)})}</small></span></summary>${a.interpretation&&!this.hideReadings?We.html`<div class="interp-body"><p>${a.interpretation}</p></div>`:We.nothing}</details>`)}</section>`:We.html`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):We.nothing}</div>`}renderCatalog(r){return We.html`<details class="catalog"><summary>${pe()} ${this.t("Star catalog ({{count}})",{count:r.length})}</summary><div class="scroll"><table><caption class="subhead">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${r.map(e=>{let t=Z(e.sign);return We.html`<tr><td>${e.name}</td><td>${t?We.html`<span class="sg">${t}</span>`:We.nothing}${Kt(e.degree)} ${e.sign}</td><td class="num">${f(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><div class="kw">${(e.keywords??[]).map(a=>We.html`<span>${a}</span>`)}</div></td></tr>`})}</tbody></table></div></details>`}};Sa.styles=[u,q,me,We.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.empty-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.subhead{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0 0 var(--roxy-space-sm,.5rem);font-weight:600}.interp-lead .point{color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:.5rem;font-weight:600;display:flex}.scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;vertical-align:top;padding:6px 10px}th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}td.num{text-align:right;font-variant-numeric:tabular-nums}.sg{color:var(--roxy-secondary,#475569);margin-right:.3rem}.kw{white-space:normal;flex-wrap:wrap;gap:.2rem;max-width:18rem;display:flex}.kw span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);padding:0 6px}`],Sa=m([(0,Nd.customElement)("roxy-fixed-stars")],Sa);var T=require("lit"),qn=require("lit/decorators.js");var jn=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];var Id=require("lit"),Kn=Id.css`.plate-heading{font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);hyphens:manual}@container (width<=30rem){.plate-heading{letter-spacing:0;font-size:.5rem}}`;var Vn={forward:"Forward",reverse:"Backward"};function Ra(n){return"mountainCenterStar"in n}var zr=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),a=this.mode!=="annual"&&Ra(e);return T.html`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${Ra(e)?a?T.html`<span class="period">${this.t("Period {{n}}",{n:j(t,e.period??0)})}</span>`:T.nothing:T.html`<span class="period">${e.year??""}</span>`}</header>${Ra(e)?a?this.renderNatalFacts(e,t):T.nothing:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${jn.map(s=>this.renderPalace(e,s))}</div>${a?T.html`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:T.nothing} ${a&&Ra(e)?this.renderStructure(e):T.nothing} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return T.html`<div class="facts" part="details">${e.facing?T.html`<span><span class="lbl">${this.t("Facing")}</span> <b>${ge(t,"facing",e.facing.label??"")}</b></span>`:T.nothing} ${e.sitting?T.html`<span><span class="lbl">${this.t("Sitting")}</span> <b>${ge(t,"facing",e.sitting.label??"")}</b></span>`:T.nothing} ${typeof e.facingDegrees=="number"?T.html`<span>${j(t,e.facingDegrees)}°</span>`:T.nothing} ${e.mountainFlight?T.html`<span><span class="lbl">${this.t("Mountain star")}</span> ${Vn[e.mountainFlight]?this.t(Vn[e.mountainFlight]):e.mountainFlight}</span>`:T.nothing} ${e.waterFlight?T.html`<span><span class="lbl">${this.t("Water star")}</span> ${Vn[e.waterFlight]?this.t(Vn[e.waterFlight]):e.waterFlight}</span>`:T.nothing} ${e.straddling?T.html`<span><b>${this.t("Straddling")}</b></span>`:T.nothing}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?T.nothing:T.html`<div class="facts" part="details">${typeof e.centerStar=="number"?T.html`<span><span class="lbl">${this.t("Center")}</span> <b>${j(t,e.centerStar)}</b></span>`:T.nothing} ${e.changeoverDate?T.html`<span>${A(t,e.changeoverDate)}</span>`:T.nothing}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):ge(e,"facing",t)}renderPalace(e,t){let a=this.effectiveLang(),s=this.paletteHeading(a,t),o=(e.palaces??[]).find(p=>p.palace===t),i=this.mode!=="annual"&&Ra(e);if(!o)return T.html`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(i&&Ra(e)){let p=o;return T.html`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${p.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${p.water??""}</span> <span class="star" title="${this.t("Period star")}">${p.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${p.combination?T.html`<span class="combo">${y(p.combination,"name")}</span>`:T.nothing}</div>`}let c=o;return T.html`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${y(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?T.html`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?T.html`<p class="structure" part="reading">${t.meaning}</p>`:T.nothing}</section>`:T.nothing}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return T.nothing;let a=this.effectiveLang(),s=this.mode!=="annual"&&Ra(e),o=t.map(i=>{let l=this.paletteHeading(a,i.palace??"");if(s){let p=i;return!p.reading&&!p.combination?T.nothing:T.html`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body">${p.combination?T.html`<span>${y(p.combination,"name")}</span>`:T.nothing} ${p.reading&&!this.hideReadings?T.html`<p part="reading">${p.reading}</p>`:T.nothing}</div></li>`}let c=i;return T.html`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?T.html`<span>${c.element}</span>`:T.nothing}<dl class="star-facts">${c.nature?T.html`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:T.nothing} ${c.enhancer?T.html`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:T.nothing} ${c.remedy?T.html`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:T.nothing}</dl>${c.meaning&&!this.hideReadings?T.html`<p part="reading">${c.meaning}</p>`:T.nothing}</div></li>`});return o.every(i=>i===T.nothing)?T.nothing:T.html`<section part="section palaces"><ul class="rows">${o}</ul></section>`}};zr.styles=[u,Kn,Tr,T.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.period{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.plate{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;display:grid;overflow:hidden}.palace{background:var(--roxy-surface,#fff);padding:var(--roxy-space-sm,.5rem);grid-template-columns:1fr 1fr;align-content:start;gap:.1rem;min-height:5.5rem;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, var(--roxy-surface,#fff))}.mountain,.water{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600)}.mountain{text-align:start;color:var(--roxy-info,#2563eb)}.water{text-align:end;color:var(--roxy-accent-ink,#b45309)}.star{text-align:center;font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);grid-column:1/-1;font-size:1.75rem;line-height:1.1}.palace-name{text-align:center;grid-column:1/-1}.combo{text-align:center;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);grid-column:1/-1}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-mountain{background:var(--roxy-info,#2563eb)}.swatch-water{background:var(--roxy-accent,#f59e0b)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.row-body p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}.star-facts{margin:var(--roxy-space-xs,.25rem) 0 0;gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs,.25rem);display:flex}.star-facts dt{color:var(--roxy-secondary,#475569)}.star-facts dd{margin:0}.structure{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin:0}`],m([(0,qn.property)({type:String,reflect:!0})],zr.prototype,"mode",2),zr=m([(0,qn.customElement)("roxy-flying-star-chart")],zr);var St=require("lit"),Gd=require("lit/decorators.js");var Ca=class extends g{renderData(r){let e=r.windows??[];if(e.length===0)return this.renderEmpty();let t=_t(this.effectiveLang(),r.startDate,r.endDate);return St.html`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2 class="title">${this.t("Forecast digest")}</h2>${t?St.html`<p class="subtitle">${t}</p>`:St.nothing}</div>${e.map(a=>this.renderWindow(a))}</div>`}windowLabel(r){return r===1?this.t("Next 24 hours"):typeof r=="number"?this.t("Next {{count}} days",{count:r}):this.t("Window")}renderWindow(r){let e=[...r.top??[]].sort((s,o)=>(o.significance??0)-(s.significance??0)),t=r.byDomain??{},a=Object.entries(t);return St.html`<section class="window" part="section window"><div class="window-head" part="details"><span class="window-label">${this.windowLabel(r.days)}</span> <span class="window-count">${this.t("{{count}} events",{count:r.count??0})}</span></div>${a.length>0?St.html`<div class="domains" part="legend">${a.map(([s,o])=>St.html`<span class="domain-chip"><span class="swatch sw-${s}"></span>${D(s)} ${o}</span>`)}</div>`:St.nothing} ${e.length>0?St.html`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:St.html`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(r){let e=typeof r.significance=="number"?r.significance:0,t=this.hideReadings||r.description==null?D(r.type??""):r.description;return St.html`<div class="event" part="label-track" role="listitem"><span class="event-date">${A(this.effectiveLang(),r.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:f(this.effectiveLang(),e,0)})}"><span class="sig-fill ${r.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};Ca.styles=[u,St.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.window{gap:var(--roxy-space-sm,.5rem);padding-top:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);display:grid}.window:first-of-type{border-top:none;padding-top:0}.window-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.window-label{font-weight:var(--roxy-weight-bold,600)}.window-count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.domains{flex-wrap:wrap;gap:.4rem;display:flex}.domain-chip{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);align-items:center;gap:.35rem;display:inline-flex}.swatch{border-radius:2px;width:.65rem;height:.65rem;display:inline-block}.sw-western{background:var(--roxy-accent,#f59e0b)}.sw-vedic{background:var(--roxy-info,#2563eb)}.sw-biorhythm{background:var(--roxy-success,#16a34a)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:.25rem .6rem;display:grid}.event-date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm,.875rem);line-height:1.4}.sig{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:2px;grid-column:2;height:4px;overflow:hidden}.sig-fill{border-radius:2px;height:100%;display:block}.sig-fill.western{background:var(--roxy-accent,#f59e0b)}.sig-fill.vedic{background:var(--roxy-info,#2563eb)}.sig-fill.biorhythm{background:var(--roxy-success,#16a34a)}.quiet{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}`],Ca=m([(0,Gd.customElement)("roxy-forecast-digest")],Ca);var He=require("lit"),Od=require("lit/decorators.js");var xh={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},bh=["western","vedic","biorhythm"],Da=class extends g{renderData(r){let e=r.events??[],t=this.groupByDate(e),a=bh.filter(s=>e.some(o=>o.domain===s));return He.html`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2 class="title">${this.t("Forecast timeline")}</h2>${r.startDate&&r.endDate?He.html`<div class="range">${_t(this.effectiveLang(),r.startDate,r.endDate)} · ${this.t("{{count}} events",{count:r.count??e.length})}</div>`:He.nothing}</header>${a.length?He.html`<div class="legend" part="legend">${a.map(s=>He.html`<span><span class="swatch swatch-${s}"></span>${xh[s]}</span>`)}</div>`:He.nothing} ${t.length?He.html`<div class="days" part="section events" role="list">${t.map(([s,o])=>this.renderDay(s,o))}</div>`:He.html`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(r){let e=new Map;for(let t of r){let a=t.date??"",s=e.get(a)??[];s.push(t),e.set(a,s)}return[...e.entries()]}renderDay(r,e){return He.html`<div class="day" role="listitem"><div class="day-date">${A(this.effectiveLang(),r)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(r){let e=typeof r.significance=="number"?r.significance:0,t=Math.max(0,Math.min(100,e));return He.html`<div class="event"><span class="dot dot-${r.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderHeadline(r)}</div>${r.description&&!this.hideReadings?He.html`<p class="event-desc">${r.description}</p>`:He.nothing}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${r.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(r){let e=r.body?D(r.body):"",t=r.target?D(r.target):"",a=$t({type:r.aspect}),s=Ht[a]??"",o=a?ls(r.aspect)??Ke({type:r.aspect}):"",i=typeof r.orb=="number"?f(this.effectiveLang(),r.orb,1):"",l=this.typeQualifier(r);return a&&t?He.html`<strong>${e}</strong> <span class="${s}">${o}</span> <strong>${t}</strong>${i?He.html`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:He.nothing}`:He.html`<strong>${e||D(r.type??"")}</strong>${l?He.html`<span class="kind">${l}</span>`:He.nothing}`}typeQualifier(r){return r.type==="sign-ingress"&&r.target?`enters ${D(r.target)}`:r.type==="retrograde-station"&&r.station?r.station:r.type==="eclipse"?[r.kind,"eclipse"].filter(Boolean).join(" "):r.type==="critical-day"?"critical day":r.type==="dasha-change"&&r.target?`dasha ${D(r.target)}`:D(r.type??"")}};Da.styles=[u,He.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.range{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:50%;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-western{background:var(--roxy-accent,#f59e0b)}.swatch-vedic{background:var(--roxy-info,#2563eb)}.swatch-biorhythm{background:var(--roxy-success,#16a34a)}.day{gap:var(--roxy-space-md,1rem);padding-block:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:4.5rem 1fr;display:grid}.day:first-of-type{border-top:none}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;padding-top:2px}.events{gap:var(--roxy-space-sm,.5rem);display:grid}.event{gap:var(--roxy-space-sm,.5rem);grid-template-columns:.6rem 1fr;align-items:start;display:grid}.dot{border-radius:50%;width:.6rem;height:.6rem;margin-top:4px}.dot-western{background:var(--roxy-accent,#f59e0b)}.dot-vedic{background:var(--roxy-info,#2563eb)}.dot-biorhythm{background:var(--roxy-success,#16a34a)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.event-line .aspect-trine,.event-line .aspect-sextile{color:var(--_success-fg)}.event-line .aspect-square,.event-line .aspect-opposition{color:var(--_danger-fg)}.event-line .aspect-conjunction{color:var(--roxy-accent-ink,#b45309)}.event-line .kind{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.04em;margin-left:.35em}.event-desc{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:2px 0 0}.sig{align-items:center;gap:.4rem;margin-top:4px;display:flex}.sig-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:1;max-width:8rem;height:4px;overflow:hidden}.sig-fill{border-radius:var(--roxy-radius-full,9999px);height:100%;display:block}.sig-fill-western{background:var(--roxy-accent,#f59e0b)}.sig-fill-vedic{background:var(--roxy-info,#2563eb)}.sig-fill-biorhythm{background:var(--roxy-success,#16a34a)}.sig-val{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}`],Da=m([(0,Od.customElement)("roxy-forecast-timeline")],Da);var M=require("lit"),Bd=require("lit/decorators.js"),Fd=require("lit/directives/if-defined.js");var Ta=class extends g{renderData(r){let e=this.effectiveLang(),t=r.chosen,a=r.input?.text??r.input?.textHebrew??"";return M.html`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 class="title" id="gematria-title">${a?`${this.t("Gematria")} · ${a}`:this.t("Gematria")}</h2>${t?.hebrew?M.html`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:M.nothing} ${this.chosenForm(r)?.romanization?M.html`<span class="roman">${this.chosenForm(r)?.romanization}</span>`:M.nothing} ${t?.rule?M.html`<p class="rule">${t.rule}</p>`:M.nothing}</header>${this.renderLetters(e,this.chosenForm(r)?.letters)} ${this.renderValues(e,r.values,this.t("Cipher values"))} ${this.renderForms(e,r)} ${this.renderTransformations(e,r.transformations)} ${this.renderLatin(e,r.latinValues)} ${this.renderMatches(e,r.matches)} ${this.renderConventions(r.conventions)}</article>`}chosenForm(r){let e=r.hebrewForms??[];return e.find(t=>t.hebrew===r.chosen?.hebrew)??e[0]}renderLetters(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section letters"><h3 class="block-title">${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(a=>M.html`<div class="${`letter${a.isFinal?" is-final":""}`}" dir="ltr" title="${(0,Fd.ifDefined)(a.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${a.glyph??""}</span> <span class="name">${a.name??""}</span> <span class="num">${j(r,a.value)}</span></div>`)}</div>${t.some(a=>a.isFinal)?M.html`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:M.nothing}</section>`}renderValues(r,e,t){let a=(e??[]).filter(o=>typeof o.value=="number");if(a.length===0)return M.nothing;let s=a.some(o=>(o.alternateValues??[]).length>0);return M.html`<section part="section values"><h3 class="block-title">${t}</h3><div class="scroll"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?M.html`<th>${this.t("Also published")}</th>`:M.nothing}</tr></thead><tbody>${a.map(o=>M.html`<tr><td>${D(o.id??"")}</td><td class="num">${j(r,o.value)}</td>${s?M.html`<td class="num">${(o.alternateValues??[]).map(i=>j(r,i)).join(", ")}</td>`:M.nothing}</tr>`)}</tbody></table></div>${this.renderProvenance(a)}</section>`}renderProvenance(r){let e=new Map;for(let t of r)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?M.nothing:M.html`<p class="provenance"><span class="lbl">${this.t("Tradition")}</span> ${[...e].map(([t,a],s)=>M.html`${s>0?" · ":""}${D(t)}${a?M.html`<a class="src" href="${a}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:M.nothing}`)}</p>`}renderForms(r,e){let t=e.hebrewForms??[];return t.length<2?M.nothing:M.html`<section part="section spellings"><h3 class="block-title">${this.t("Spellings")}</h3><ul class="forms">${t.map(a=>M.html`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${a.hebrew??""}</span> ${a.hebrew===e.chosen?.hebrew?M.html`<span class="chosen">${this.t("Chosen")}</span>`:M.nothing}</div><span class="roman">${a.romanization??""}</span> ${a.rule?M.html`<p class="rule">${a.rule}</p>`:M.nothing} ${this.renderFormTotals(r,a)}</li>`)}</ul></section>`}renderFormTotals(r,e){let t=(e.values??[]).find(a=>typeof a.value=="number");return t?M.html`<p class="rule"><span class="lbl">${D(t.id??"")}</span> ${j(r,t.value)}</p>`:M.nothing}renderTransformations(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section substitutions"><h3 class="block-title">${this.t("Substitutions")}</h3><div class="scroll"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td>${D(a.id??"")}</td><td>${a.output?M.html`<span lang="he" dir="rtl">${a.output}</span>`:M.nothing} ${a.outputRomanization?M.html`<span class="roman">${a.outputRomanization}</span>`:M.nothing}</td><td class="num">${j(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section latin-ciphers"><h3 class="block-title">${this.t("Latin ciphers")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td data-label="${this.t("Cipher")}">${D(a.id??"")} ${a.lineage?M.html`<p class="lineage">${a.lineage}</p>`:M.nothing}</td><td class="num" data-label="${this.t("Value")}">${j(r,a.value)}</td><td data-label="${this.t("Tradition")}">${D(a.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(r,e){let t=e??[];return t.length===0?M.nothing:M.html`<section part="section matches"><h3 class="block-title">${this.t("Equal values")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(a=>M.html`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${a.hebrew??""}</span> <span class="roman">${a.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${a.meaning??""} ${a.note&&!this.hideReadings?M.html`<p class="match-note" part="reading">${a.note}</p>`:M.nothing}</td><td class="num" data-label="${this.t("Value")}">${j(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(r){let e=this.effectiveLang(),t=[];for(let a of["transliteration","misparGadol"]){let s=r?.[a];s&&t.push([Pe(e,a),ge(e,a,s)])}return t.length===0?M.nothing:M.html`<p class="provenance">${t.map(([a,s],o)=>M.html`${o>0?" · ":""}<span class="lbl">${a}</span>${s}`)}</p>`}};Ta.styles=[u,Sr,M.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-items:start;gap:.15rem;min-width:0;display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.hebrew{font-size:2rem;line-height:1.4;font-weight:var(--roxy-weight-bold,600)}.roman{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);letter-spacing:.04em}.rule{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.src{margin-inline-start:.35rem}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.letters{flex-wrap:wrap;gap:.35rem;display:flex}.letter{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-sm,4px);justify-items:center;gap:.1rem;min-width:3rem;padding:.3rem .45rem;display:grid}.letter .glyph{font-size:var(--roxy-text-lg,1.125rem);line-height:1.3}.letter .name{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569)}.letter .num{font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.letter.is-final{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff))}.legend{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-border,#e4e4e7);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff));border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);vertical-align:top;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}td.num{font-variant-numeric:tabular-nums;white-space:nowrap}.provenance{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5)}.lineage{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);white-space:normal;margin:.15rem 0 0}a{color:var(--roxy-accent-ink,#b45309)}.forms{gap:var(--roxy-space-md,1rem);margin:0;padding:0;list-style:none;display:grid}.form{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);gap:.35rem;min-width:0;display:grid}.form:first-child{border-top:0;padding-top:0}.chosen{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, var(--roxy-surface,#fff));color:var(--roxy-fg,#0a0a0a);padding:.1rem .4rem;display:inline-block}.match-note{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);white-space:normal;margin:.15rem 0 0}`],Ta=m([(0,Bd.customElement)("roxy-gematria")],Ta);var je=require("lit"),jd=require("lit/decorators.js");var Hd=8,Aa=class extends g{renderData(r){let e=r.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=r.keyTransits??[],a=r.natalPlanets?.find(s=>s.name==="Moon")?.sign;return je.html`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2 class="title">${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:he(this.effectiveLang(),r.transitDatetime),birth:he(this.effectiveLang(),r.birthDatetime)})}</p>${a?je.html`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:a})}</p>`:je.nothing} ${be(this.effectiveLang(),r.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?je.html`<section class="key" part="section key-transits"><h3 class="key-title">${this.t("Key transits")}</h3>${t.map(s=>je.html`<p class="key-item">${s.description}</p>`)}</section>`:je.nothing}</div>`}renderPlanet(r){let e=R(r.name)??"",t=typeof r.longitude=="number"?jt(r.longitude):void 0;return je.html`<article class="row"><div class="row-top"><span class="graha">${e?je.html`<span class="glyph">${e}</span>`:je.nothing}${r.name} </span><span class="pos">${t?`${r.sign} ${t}`:r.sign} </span>${typeof r.houseFromMoon=="number"?je.html`<span class="house moon">${this.t("house {{n}} from the Moon",{n:r.houseFromMoon})}</span>`:je.nothing} ${typeof r.natalHouse=="number"?je.html`<span class="house lagna">${this.t("house {{n}} from the Lagna",{n:r.natalHouse})}</span>`:je.nothing}</div>${this.renderKaksha(r.kaksha)} ${this.renderContacts(this.t("Drishti"),r.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),r.aspectsToNatal)}</article>`}renderContacts(r,e){return e?.length?je.html`<p class="aspects"><span class="contact-label">${r}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Ke({type:t.aspectType}),planet:t.natalPlanet,orb:f(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Ke({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:je.nothing}renderKaksha(r){if(!r||typeof r.number!="number")return je.nothing;let e=r.number,t=r.bindu===!0?"yes":r.bindu===!1?"no":"",a=Hd,s=r.lord&&typeof r.startDegree=="number"&&typeof r.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:a,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)}):r.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:a,graha:r.lord}):typeof r.startDegree=="number"&&typeof r.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:a,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:a}),o=r.bindu===null||r.bindu===void 0?"":typeof r.binduCount=="number"?r.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:r.binduCount,total:a}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:r.binduCount,total:a}):r.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return je.html`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:a})}">${Array.from({length:Hd},(i,l)=>je.html`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${o?`${s} · ${o}`:s}</p>`}};Aa.styles=[u,ee,je.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.row{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.pos{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.house{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);padding:.1rem .45rem}.house.moon{border-color:var(--roxy-accent,#f59e0b)}.house.lagna{color:var(--roxy-muted,#71717a)}.contact-label{font-weight:var(--roxy-weight-bold,600);margin-right:.35em}.kaksha-bar{grid-template-columns:repeat(8,1fr);gap:2px;height:10px;margin:.15rem 0;display:grid}.seg{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:2px}.seg.here{background:color-mix(in srgb, var(--roxy-muted,#71717a) 45%, transparent)}.seg.here.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 55%, transparent)}.seg.here.no{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 55%, transparent)}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.num{font-variant-numeric:tabular-nums}.aspects{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);line-height:var(--roxy-leading-normal,1.5);margin:0}.key{padding:var(--roxy-space-md,1rem);border-top:2px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.key-title{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.key-item{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}`],Aa=m([(0,jd.customElement)("roxy-gochara-table")],Aa);var Xe=require("lit"),Kd=require("lit/decorators.js");var vh={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},za=class extends g{renderData(r){let e=(r.breakdown??[]).filter(p=>p?.category!==void 0),t=r.total??0,a=r.maxScore??36,s=t/a*100,o="color-mix(in srgb, var(--roxy-border) 50%, transparent)",i=s>=70?"var(--roxy-success)":s>=50?"var(--roxy-warning)":"var(--roxy-danger)",l=s*2.827,c=(100-s)*2.827;return Xe.html`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${f(this.effectiveLang(),r.total,1)}</span> <span class="over">/ ${r.maxScore}</span> ${typeof r.percentage=="number"?Xe.html`<small style="margin-left:.5rem;color:var(--roxy-muted)">${_e(this.effectiveLang(),r.percentage,1)}</small>`:Xe.nothing}</div><div class="verdict-wrap">${typeof r.isCompatible=="boolean"?Xe.html`<span class="verdict ${r.isCompatible?"yes":"no"}">${r.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:Xe.nothing} ${r.recommendation&&!this.hideReadings?Xe.html`<span class="recommendation">${r.recommendation}</span>`:Xe.nothing}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="36" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45" fill="none" stroke="${o}" stroke-width="8"/><circle class="ring-fill" cx="50" cy="50" r="45" fill="none" stroke="${i}" stroke-width="8" stroke-dasharray="${l},${c}" stroke-linecap="round" transform="rotate(-90 50 50)"/><text x="50" y="50" text-anchor="middle" dominant-baseline="central" class="ring-text">${t}</text><text x="50" y="64" text-anchor="middle" dominant-baseline="central" class="ring-max">/${a}</text></svg></div></div>${e.length>0?Xe.html`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(p=>{let d=p.score??0,h=p.maxScore??Lh(p.category),b=h?d/h*100:0;return Xe.html`<tr><td>${p.category} ${p.description?Xe.html`<small>${p.description}</small>`:Xe.nothing}</td><td class="classification" data-label="${this.t("Person 1")}">${p.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${p.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${b}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${f(this.effectiveLang(),d,1)} / ${h}</td></tr>`})}</tbody></table></div>`:Xe.nothing} ${(r.doshas?.length??0)>0||(r.doshaCancellations?.length??0)>0?Xe.html`<div class="tags" part="details">${r.doshas?.map(p=>Xe.html`<span class="dosha">${p}</span>`)} ${r.doshaCancellations?.map(p=>Xe.html`<span class="cancel" title="${p.reason}">${this.t("{{dosha}} cancelled",{dosha:p.dosha})}</span>`)}</div>`:Xe.nothing} ${be(this.effectiveLang(),r.frame,this.translator)}</article>`}};za.styles=[u,ee,Sr,Xe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:1rem;display:flex}.score-info{flex:1;min-width:0}.table-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md,1rem);grid-template-columns:1fr auto;display:grid}.total{font-size:2.25rem;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;line-height:1}.over{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-base,1rem)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs,.25rem);text-align:right;display:grid}.verdict{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 10px}.verdict.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.no{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.recommendation{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.score-ring{flex-shrink:0;width:120px;height:120px}.score-ring svg{width:100%;height:100%}.score-ring .ring-text{fill:var(--roxy-fg,#0a0a0a);font-size:22px;font-weight:700;font-family:var(--roxy-font-sans)}.score-ring .ring-max{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-top:2px;line-height:1.5;display:block}td.classification{color:var(--roxy-secondary,#475569);white-space:nowrap}th.score{text-align:right}td.score{text-align:right;font-variant-numeric:tabular-nums;color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-ring .ring-text,.score-ring .ring-max{display:none}.score-bar{gap:var(--roxy-space-xs,.25rem);grid-template-columns:1fr}.verdict-wrap{text-align:left;justify-items:start}}.mini-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:8px;overflow:hidden}.mini-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.tags{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.tags span{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.tags .dosha{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.tags .cancel{background:color-mix(in srgb, var(--roxy-success,#16a34a) 18%, transparent);color:var(--_success-fg)}`],za=m([(0,Kd.customElement)("roxy-guna-milan")],za);function Lh(n){return n&&vh[n.toLowerCase()]||1}var Ne=require("lit"),qd=require("lit/decorators.js");var Ma=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderChart(e,t,a){let s=new Set(a?e.personAGates:(e.channels??[]).flatMap(h=>h.personAGates??[])),o=new Set(a?e.personBGates:(e.channels??[]).flatMap(h=>h.personBGates??[])),i=new Map;for(let h of new Set([...s,...o]))i.set(h,{left:s.has(h),right:o.has(h)});let l=new Set((e.centers??[]).filter(h=>h.defined).map(h=>h.id)),c=new Map((e.centers??[]).map(h=>[h.id,h.name])),p=new Map;for(let h of e.channels??[])p.set(h.gateA,h.name),p.set(h.gateB,h.name);let d=new Map;for(let[h,b]of i){let L=[b.left&&"A",b.right&&"B"].filter(Boolean).join(" + ");d.set(h,[`Gate ${h}`,p.get(h),L].filter(Boolean).join(" · "))}return Ne.html`<svg class="chart" part="chart" viewBox="${pn}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${mn({definedCenters:l,gateSources:i,gateTitles:d,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${a?Ne.nothing:Ne.html`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),a=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],o=e.centers??[],i=o.filter(l=>l.defined).length;return Ne.html`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?Ne.html`<span class="count">${e.totalChannels} channels</span>`:Ne.nothing}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,a,t),a,this.translator)} ${lr([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?D(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:o.length>0?`${i}/${o.length}`:void 0}])} ${this.hideReadings?Ne.nothing:Ne.html`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(o)} ${this.renderChannels(s,o)}</div>`}renderDynamics(e){if(!e)return Ne.nothing;let t=[{label:"Electromagnetic",aside:Yn(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:Yn(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:Yn(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:Yn(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ne.nothing:Ne.html`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ne.nothing:Ne.html`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let a=t.definedBy??[],s=a.includes("A"),o=a.includes("B"),i=!!t.defined&&!s&&!o;return Ne.html`<div class="row"><span class="cname">${t.name??D(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${$h(!!t.defined,s,o)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ne.nothing;let a=new Map(t.map(o=>[String(o.id??""),o.name??""])),s=o=>a.get(o)||D(o);return Ne.html`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(o=>Ne.html`<tr><td>${o.name??""}</td><td class="gates">${o.gateA}-${o.gateB}</td><td>${(o.centers??[]).map(s).join(" to ")}</td><td>${o.circuit??""}</td><td>${o.dynamic?Ne.html`<span class="dyn">${o.dynamic}</span>`:Ne.nothing}</td><td class="held">${Vd(o.personAGates)}</td><td class="held">${Vd(o.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};Ma.styles=[u,q,me,Lr,hn,Ue,Ne.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.cname{flex:1;min-width:8rem}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.together{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr:last-child td{border-bottom:none}.gates{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.dyn{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:#1f6fb2;--src-right:#b04e14;--src-ink:#fff}`],Ma=m([(0,qd.customElement)("roxy-hd-connection")],Ma);function Yn(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function Vd(n){let r=n??[];return r.length>0?r.join(", "):"Neither"}function $h(n,r,e){return r&&e?"Defined in both charts":r?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}var Le=require("lit"),Qd=require("lit/decorators.js");var Mr=require("lit");var di=360,wh=470,ci=8,Zd=di-ci*2,Zn=48,As=15,li=7,Yd=16,Un=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],Wd=`0 0 ${di} ${wh}`;function kh(n,r){return ci+Zd*(n*2+1)/(r*2)}function Xd(n){return Cs[n.gateA]==="throat"||Cs[n.gateB]==="throat"}function Sh(n){return(Xd(n)?Cs[n.gateA]==="throat":Cs[n.gateA]==="g")?n.gateA:n.gateB}function Rh(){return Un.map(n=>Mr.svg`<g>
83
+ <rect class="pn-bar" x=${ci} y=${n.y} width=${Zd} height=${Zn} rx="10" />
84
+ <text class="pn-bar-label" x=${di/2} y=${n.y+Zn/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
+ </g>`)}function Ch(n,r,e,t){return e.map((a,s)=>Mr.svg`<g>
86
+ <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*Yd} cy=${r} r=${li} />
87
+ <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*Yd} y=${r} text-anchor="middle" dominant-baseline="central">${t(a)}</text>
88
+ </g>`)}function Ud(n,r,e,t,a,s){let o=t.length>0;return Mr.svg`<g>
89
89
  <circle class="pn-gate-dot ${o?"on":""}" cx=${n} cy=${r} r=${As} />
90
90
  <text class="pn-gate ${o?"on":""}" x=${n} y=${r} text-anchor="middle" dominant-baseline="central">${e}</text>
91
- ${Rh(n,r+s,t,a)}
92
- </g>`}function Xd(n){let r=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>Wd(c)===e),a=e?Zn:Un[1].y+Zn,s=e?Un[1].y:Un[2].y,o=a+26,i=s-26,l=(o+i)/2;t.forEach((c,p)=>{let d=wh(p,t.length),h=kh(c),b=h===c.gateA?c.gateB:c.gateA,L=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;r.push(Mr.svg`<g>
91
+ ${Ch(n,r+s,t,a)}
92
+ </g>`}function Jd(n){let r=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>Xd(c)===e),a=e?Zn:Un[1].y+Zn,s=e?Un[1].y:Un[2].y,o=a+26,i=s-26,l=(o+i)/2;t.forEach((c,p)=>{let d=kh(p,t.length),h=Sh(c),b=h===c.gateA?c.gateB:c.gateA,L=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;r.push(Mr.svg`<g>
93
93
  <line class=${L} x1=${d} y1=${o+As} x2=${d} y2=${l-13} />
94
94
  <line class=${L} x1=${d} y1=${l+13} x2=${d} y2=${i-As} />
95
95
  <text class="pn-name ${c.defined?"on":""}" x=${d} y=${l} text-anchor="middle" dominant-baseline="central">${c.name}</text>
96
- ${Yd(d,o,h,n.holders.get(h)??[],n.letterFor,As+ii+7)}
97
- ${Yd(d,i,b,n.holders.get(b)??[],n.letterFor,-(As+ii+7))}
98
- </g>`)})}return Mr.svg`${Sh()}${r.length>0?r:Mr.nothing}`}var Ea=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===!0,isCore:s.isCore===!0}));if(t.length===0)return Le.nothing;let a=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return Le.html`<svg class="chart" part="chart" viewBox="${Zd}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${Xd({rungs:t,holders:a,letterFor:Qd})}</svg>`}renderData(e){let t=e.channels??[],a=e.gates??[],s=e.summary,o=s?.gapGates??[],i=t.some(l=>l.isCore);return Le.html`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2 class="title">Penta</h2>${typeof e.memberCount=="number"?Le.html`<span class="count">${e.memberCount} members</span>`:Le.nothing}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${lr([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&a.length>0?`${s.filledGates} of ${a.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:o.length>0?o.join(", "):void 0}])} ${this.hideReadings?Le.nothing:Le.html`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${i&&!this.hideReadings?Le.html`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Le.nothing} ${this.renderGates(a)} ${t.length>0||a.length>0?Le.html`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Le.nothing}</div>`}renderGroup(e,t,a){return t.length===0?Le.nothing:Le.html`<div class="section" part="section channels"><h3>${e}</h3>${a&&!this.hideReadings?Le.html`<p class="note">${a}</p>`:Le.nothing} ${t.map(s=>Le.html`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?Le.html`<span class="circuit">${s.circuit} circuit</span>`:Le.nothing} </span><span class="badge ${s.defined?"defined":"open"}">${s.defined?"Defined":"Open"}</span> ${s.isCore?Le.html`<span class="badge core">Core</span>`:Le.nothing} <span class="held">Gate ${s.gateA} held by ${ci(s.gateAHeldBy)}. Gate ${s.gateB} held by ${ci(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Le.nothing;let t=e.filter(a=>a.filled).length;return Le.html`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Le.nothing:Le.html`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(a=>Le.html`<div class="row"><span class="gate-id">${a.gate}</span> <span class="cname">${a.gateName??""}</span> ${a.filled?Le.html`<span class="who">Held by ${ci(a.heldBy)}</span>`:Le.html`<span class="badge gap">Gap</span>`}</div>`)}</div>`}};Ea.styles=[u,Ue,Lr,Le.css`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg,#0a0a0a);font-size:15px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border,#e4e4e7);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink,#b45309);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted,#71717a);font-size:12px;font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.pn-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink,#b45309);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted,#71717a);font-size:13px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg,#0a0a0a)}.pn-badge{fill:var(--roxy-accent-ink,#b45309)}.pn-badge-text{fill:var(--roxy-surface,#fff);font-size:9px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600)}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.section h3{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.note{margin:var(--roxy-space-xs,.25rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.gates,.gate-id{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600);min-width:3.5rem}.cname{flex:1;min-width:8rem}.circuit{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.held{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);flex-basis:100%;line-height:1.6}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.core{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.gap{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}`],Ea=m([(0,Jd.customElement)("roxy-hd-penta")],Ea);var Ch="ABCDE",Qd=n=>Ch[n]??String(n+1);function ci(n){let r=(n??[]).map(Qd);return r.length>0?r.join(", "):"nobody"}var Rt=require("lit"),ec=require("lit/decorators.js");var Pa=class extends g{renderData(r){return Dh(r)?this.renderType(r):this.renderProfile(r)}renderType(r){return Rt.html`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Type")}</h2>${r.type||r.profile?Rt.html`<div class="type-line">${[y(r,"type"),r.profile?this.t("Profile {{profile}}",{profile:r.profile}):""].filter(Boolean).join(" · ")}</div>`:Rt.nothing}</header>${lr([{label:this.t("Type"),value:y(r,"type")},{label:this.t("Strategy"),value:y(r,"strategy")},{label:this.t("Authority"),value:y(r,"authority")},{label:this.t("Profile"),value:r.profile}])} ${r.typeDescription&&!this.hideReadings?Rt.html`<p class="lead">${r.typeDescription}</p>`:Rt.nothing} ${un(r.signature?y(r,"signature"):void 0,r.notSelf?y(r,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:y(r,"strategy"),body:r.strategyDescription},{label:this.t("Authority"),aside:y(r,"authority"),body:r.authorityDescription},{label:this.t("Aura"),body:r.aura}],"hd-type-reading")}</div>`}renderProfile(r){return Rt.html`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Profile")}</h2>${r.profile?Rt.html`<div class="type-line">${r.profile}</div>`:Rt.nothing}</header>${lr([{label:this.t("Profile"),value:r.profile},{label:this.t("Personality line"),value:r.personalityLine?.toString()},{label:this.t("Design line"),value:r.designLine?.toString()}])} ${this.hideReadings?Rt.nothing:Rt.html`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${yn({personality:r.personalityKeynote,personalityLine:r.personalityLine,design:r.designKeynote,designLine:r.designLine},this.translator)}</section>`}</div>`}};Pa.styles=[u,q,me,Lr,Rt.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`],Pa=m([(0,ec.customElement)("roxy-hd-type-card")],Pa);function Dh(n){return typeof n.type=="string"}var xe=require("lit"),rc=require("lit/decorators.js");var _a=class extends g{renderData(r){let e=[...r.arrows??[]].sort((t,a)=>tc(t.position)-tc(a.position));return xe.html`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 class="title" part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${r.confident===!1?xe.html`<p class="note" role="note">${typeof r.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}°). Verify the exact birth time.",{margin:r.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:xe.nothing} ${this.renderReading(e,r.baseDescription)}</div>`}renderArrow(r){let e=r.direction==="left"?"←":"→",t=y(r,"baseName");return xe.html`<div class="arrow"><div class="arrow-head"><span class="glyph" aria-hidden="true">${e}</span> <span class="name">${y(r,"name")}</span></div>${r.layer?xe.html`<span class="layer">${y(r,"layer")}</span>`:xe.nothing} <span class="labels">${[y(r,"directionLabel"),y(r,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof r.color=="number"?xe.html`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:r.color,tone:r.tone??"",base:r.base??""})}${t?`, ${t}`:""}</span>`:xe.nothing} ${r.activation?.planet?xe.html`<span class="ctb">${[r.activation.planet,gn(r.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:xe.nothing} ${r.confident===!1?xe.html`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:xe.nothing}</div>`}renderReading(r,e){let t=r.filter(o=>o.description||o.colorMeaning);if(t.length===0||this.hideReadings)return xe.nothing;let a=new Map;for(let o of t){let i=o.layer??"",l=a.get(i);l?l.push(o):a.set(i,[o])}let s=0;return xe.html`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...a].map(([o,i])=>xe.html`<div class="group">${o?xe.html`<p class="group-head">${y(i[0],"layer")}</p>`:xe.nothing} ${i[0]?.layerDescription?xe.html`<p class="group-note">${i[0].layerDescription}</p>`:xe.nothing} ${i.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?xe.html`<p class="footnote">${this.t("Base")}. ${e}</p>`:xe.nothing}</section>`}renderArrowReading(r,e){let t=r.cognition,a=t?y(t,"label"):"",s=[{label:this.t("Color"),body:r.colorMeaning},{label:this.t("Tone"),body:r.toneMeaning},{label:this.t("Direction"),body:r.directionMeaning},{label:a?`${this.t("Cognition")} · ${a}`:this.t("Cognition"),body:t?.description}].filter(o=>!!o.body);return xe.html`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(r,"name")}</span> ${pe()} ${r.position?xe.html`<span class="interp-aside"><small>${y(r,"position")}</small></span>`:xe.nothing}</summary><div class="interp-body">${r.description?xe.html`<p>${r.description}</p>`:xe.nothing} ${s.length>0?xe.html`<dl class="facets">${s.map(o=>xe.html`<dt>${o.label}</dt><dd>${o.body}</dd>`)}</dl>`:xe.nothing}</div></details>`}};_a.styles=[u,q,me,xe.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-xs,.25rem);align-content:start;display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.75rem;line-height:1}.name{font-weight:var(--roxy-weight-bold,600)}.layer{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.labels{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.ctb{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.note{font-size:var(--roxy-text-xs,.75rem);color:var(--_warning-fg)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-of-type{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.facets{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.facets dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.facets dd{margin:0}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}`],_a=m([(0,rc.customElement)("roxy-hd-variables")],_a);function tc(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}var Ct=require("lit"),ac=require("lit/decorators.js");var Th={udaya:"Rose",asta:"Set"},Ah={udaya:"rises",asta:"sets"},Na=class extends g{renderData(r){let e=r.grahas??[];return e.length?Ct.html`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2 class="title">${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:r.date})}</p></header><div class="rows" part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(r){let e=R(r.graha)??"";return Ct.html`<article class="row"><div class="row-top"><span class="graha">${e?Ct.html`<span class="glyph">${e}</span>`:Ct.nothing}${r.graha} </span><span class="state ${r.visible?"visible":"invisible"}">${r.visible?this.t("Visible"):this.t("Invisible")} </span>${r.retrograde?Ct.html`<span class="retro" title="${this.t("retrograde")}">R</span>`:Ct.nothing}</div><p class="window" part="window">${this.windowLine(r)}</p><p class="meta" part="details">${this.metaLine(r)}</p></article>`}windowLine(r){let e=r.nextEvent,t=r.lastEvent;if(e){let a={event:this.t(Ah[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:he(this.effectiveLang(),e.datetime)};return Ct.html`${r.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",a):this.t("Invisible until it {{event}} {{where}} on {{when}}",a)}`}return t?Ct.html`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Th[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:he(this.effectiveLang(),t.datetime)})}`:Ct.html`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(r){let e=r.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=r.nextEvent??r.lastEvent,a=t&&t.kalamsa!==r.kalamsa,s={degrees:f(this.effectiveLang(),r.timeDegrees,2),limit:f(this.effectiveLang(),r.kalamsa,0),shifted:a?f(this.effectiveLang(),t.kalamsa,0):""};return Ct.html`${a?this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°, becoming {{shifted}}° at that event",s):this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°",s)} · ${e}`}};Na.styles=[u,Ct.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}.rows{display:grid}.row{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-fg,#0a0a0a);padding:.1rem .45rem}.state.invisible{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 14%, transparent)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600)}.window{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.num{font-variant-numeric:tabular-nums}`],Na=m([(0,ac.customElement)("roxy-heliacal-table")],Na);var ne=require("lit"),sc=require("lit/decorators.js");var Ia=class extends g{resolveHexagram(){let r=this.data;if(!r)return null;if("hexagram"in r&&r.hexagram){if("lines"in r){let s=r,o=s.hexagram;return{hex:o,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??o.changingLines,resultingHexagram:s.resultingHexagram}}let t=r,a=t.hexagram;return{hex:a,changingLines:a.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=r;return{hex:e,changingLines:e.changingLines}}renderData(){let r=this.resolveHexagram();if(!r)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:a,changingLines:s,dailyMessage:o,date:i,resultingHexagram:l}=r;return ne.html`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,a,s,o,i)} ${l?ne.html`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${pe()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:ne.nothing}</article>`}renderHexagram(r,e,t,a,s,o,i){let l=t??this.derivedLines(e),c=new Set(a??[]),p=!this.hideReadings;return ne.html`<div class="glyphs" part="chart">${e.symbol?ne.html`<div class="symbol">${e.symbol}</div>`:ne.nothing} ${l.length>0?ne.html`<div class="lines" aria-hidden="true">${l.slice().reverse().map((d,h)=>{let b=l.length-1-h+1,L=c.has(b),v=d===6||d===8;return ne.html`<div class="line ${`${v?"broken":"solid"}${L?" changing":""}`}">${v?ne.html`<span class="seg"></span><span class="seg"></span>`:ne.html`<span class="seg"></span>`}</div>`})}</div>`:ne.nothing}</div><div part="header"><h2 class="title">${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${i?ne.html`<time class="daily-date" part="details" datetime="${i}">${A(this.effectiveLang(),i)}</time>`:ne.nothing}<p class="subtitle">${e.chinese?ne.html`${e.chinese}`:ne.nothing} ${e.pinyin?ne.html`· ${e.pinyin}`:ne.nothing}</p><div class="trigrams" part="details">${e.upperTrigram?ne.html`<div>${this.t("Upper")} <span class="tri-glyph">${_o(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:ne.nothing} ${e.lowerTrigram?ne.html`<div>${this.t("Lower")} <span class="tri-glyph">${_o(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:ne.nothing}</div>${e.judgment&&p?ne.html`<p class="judgment">${e.judgment}</p>`:ne.nothing} ${e.image&&p?ne.html`<p class="image">${e.image}</p>`:ne.nothing} ${o&&p?ne.html`<p class="message">${o}</p>`:ne.nothing} ${e.interpretation?.general&&p?ne.html`<p>${e.interpretation.general}</p>`:ne.nothing} ${c.size>0?ne.html`<div class="changing" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((d,h)=>d-h).join(", ")})}</div>`:ne.nothing} ${this.renderTopics(e,r)} ${this.renderLines(s??e.changingLines,c,`${r}-lines`)}</div>`}renderTopics(r,e){let t=r.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(a=>a.body),`${e}-topics`,"Readings"):ne.nothing}renderLines(r,e,t){let a=r??[];if(a.length===0)return ne.nothing;let s=e.size>0,o=s?a.filter(l=>e.has(l.position)):a;if(o.length===0)return ne.nothing;let i=o.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?ne.html`<p class="line-meaning">${l.meaning}</p>`:ne.nothing}));return this.renderInterpretation(i,t,s?"Changing lines":"Lines")}derivedLines(r){let e=r.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};Ia.styles=[u,q,me,ne.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-lg,1.5rem);grid-template-columns:6rem 1fr;display:grid}.result-chart{gap:var(--roxy-space-lg,1.5rem);padding-top:var(--roxy-space-md,1rem);grid-template-columns:6rem minmax(0,1fr);display:grid}.result{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);grid-column:1/-1}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:1fr}}.glyphs{gap:var(--roxy-space-md,1rem);align-content:start;align-self:start;justify-items:center;display:grid}.symbol{color:var(--roxy-accent-ink,#b45309);font-size:3rem;line-height:1}.lines{gap:4px;width:4rem;display:grid}.line{justify-content:center;align-items:center;gap:4px;height:8px;display:flex}.seg{background:var(--roxy-fg,#0a0a0a);border-radius:1px;height:6px;display:block}.line.broken .seg{width:1.4rem}.line.solid .seg{width:3rem}.line.changing .seg{background:var(--roxy-accent,#f59e0b)}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0 0 var(--roxy-space-sm,.5rem)}.daily-date{margin-bottom:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);display:block}.trigrams{gap:var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-sm,.5rem);color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:flex}.tri-glyph{font-size:var(--roxy-text-xl,1.5rem);color:var(--roxy-accent-ink,#b45309);vertical-align:middle;margin-right:4px}.judgment,.image,.message{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.judgment:before{content:"Judgment. ";font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569)}.image:before{content:"Image. ";font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569)}.line-meaning{padding-left:var(--roxy-space-sm,.5rem);border-left:2px solid var(--roxy-border,#e4e4e7);color:var(--roxy-muted,#71717a);margin:0}.changing{margin-top:var(--roxy-space-md,1rem);padding-top:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem)}`],Ia=m([(0,sc.customElement)("roxy-hexagram")],Ia);var Ot=require("lit"),nc=require("lit/decorators.js");var Ga=class extends g{renderData(r){let e=r.dayHoras??[],t=r.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Ot.html`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2 class="title">${this.t("Hora")}</h2>${r.date?Ot.html`<p class="subtitle">${A(this.effectiveLang(),r.date)}</p>`:Ot.nothing}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(r,e){return e.length===0?Ot.nothing:Ot.html`<div class="col"><p class="section-label">${r}</p>${e.map(t=>Ot.html`<div class="row"><span class="glyph" aria-hidden="true">${R(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${Wt(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Ot.html`<span class="num">${t.number}</span>`:Ot.nothing}</div>`)}</div>`}};Ga.styles=[u,Ot.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.cols{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-xs,.25rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);display:flex}.row:last-child{border-bottom:none}.glyph{color:var(--roxy-accent-ink,#b45309);text-align:center;width:1.25em;font-size:1.15em;line-height:1}.planet{flex:1;font-weight:500}.time{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;white-space:nowrap}.num{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right;width:1.5em}@container (width<=30rem){.cols{grid-template-columns:1fr}}`],Ga=m([(0,nc.customElement)("roxy-hora-table")],Ga);var w=require("lit"),zs=require("lit/decorators.js");var zh={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Mh={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Eh=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],Ph=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],cr=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",a=Z(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o=this.effectiveLang(),i="date"in e&&e.date&&A(o,e.date)||"week"in e&&e.week&&A(o,e.week)||"month"in e&&e.month&&sr(o,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return w.html`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph" aria-hidden="true">${a}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(zh[this.period])}</h2>${i?w.html`<div class="date">${i}</div>`:w.nothing}</div>${s!==null?w.html`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:w.nothing}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",p="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],d="luckyDays"in e&&e.luckyDays?e.luckyDays:[],h=e.compatibleSigns??[];return l===void 0&&!c&&p.length===0&&d.length===0&&h.length===0?w.nothing:w.html`<div class="lucky" part="details">${l!==void 0?w.html`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:w.nothing} ${c?w.html`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:w.nothing} ${p.length?w.html`<span>${this.t("Lucky numbers")} <strong>${p.join(", ")}</strong></span>`:w.nothing} ${d.length?w.html`<span>${this.t("Lucky days")} <strong>${d.join(", ")}</strong></span>`:w.nothing} ${h.length?w.html`<span class="compat-wrap">${this.t("Best with")} <span class="compat">${h.map(b=>w.html`<span>${b}</span>`)}</span></span>`:w.nothing}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return w.nothing;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):w.nothing;let a=this.paragraphs(e.overview);return w.html`${a.length?w.html`<div class="overview" part="section overview">${a}</div>`:w.nothing}<div class="sections" part="section outlook">${Eh.map(([s,o])=>{let i=this.paragraphs(e[s]);return i.length?w.html`<div class="section"><h3>${this.t(o)}</h3>${i}</div>`:w.nothing})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?w.nothing:w.html`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>w.html`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return w.nothing;let t=this.effectiveLang();return w.html`<section part="section events"><h3 class="block-title">${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(a=>this.renderRow(w.html`<time class="row-when" datetime="${a.at}">${sr(t,a.at,"time")}</time>`,this.renderEventBodies(a),w.html`<span class="kind">${this.t(Mh[a.type])}</span> <span>${this.t("House")} ${a.house}</span> ${a.sign?w.html`<span>${this.glyphName(Z(a.sign),H(a.sign))}</span>`:w.nothing} ${a.through?w.html`<span>${this.t("through {{date}}",{date:A(t,a.through)})}</span>`:w.nothing}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(a=>this.glyphName(R(a),a));if(t.length===2&&e.aspect){let a=$t({type:e.aspect});return w.html`${t[0]} <span class="${Ht[a]??""}">${ls(e.aspect)??e.aspect}</span> ${t[1]}`}return w.html`${t}`}renderYear(e){if(!("themes"in e))return w.nothing;let t=this.effectiveLang();return w.html`${e.themes.length?w.html`<section part="section themes"><h3 class="block-title">${this.t("Themes")}</h3><ul class="rows">${e.themes.map(a=>this.renderRow(_t(t,a.from,a.to),w.html`${this.glyphName(R(a.body),a.body)} ${this.glyphName(Z(a.sign),H(a.sign))}`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${e.keyPeriods.length?w.html`<section part="section key-periods"><h3 class="block-title">${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(a=>this.renderRow(_t(t,a.from,a.to),this.glyphName(R(a.body),a.body),w.html`<span>${this.t("House")} ${a.house}</span><span>${a.focus}</span>`))}</ul></section>`:w.nothing} ${e.eclipses.length?w.html`<section part="section eclipses"><h3 class="block-title">${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(a=>this.renderRow(A(t,a.date),w.html`<span class="name">${a.kind}</span>`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${e.retrogrades.length?w.html`<section part="section retrogrades"><h3 class="block-title">${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(a=>this.renderRow(A(t,a.date),w.html`${this.glyphName(R(a.body),a.body)} <span>${a.direction}</span>`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return w.nothing;let t=this.effectiveLang(),a=Ph.filter(([s])=>e[s]);return a.length===0?w.nothing:w.html`<section part="section best-periods"><h3 class="block-title">${this.t("Best months")}</h3><div class="tiles" part="details">${a.map(([s,o])=>{let i=e[s];return i?w.html`<div class="tile"><span class="tile-label">${this.t(o)}</span> <span class="tile-value">${sr(t,i.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:i.count})}</span></div>`:w.nothing})}</div></section>`}renderRow(e,t,a,s){return w.html`<li class="row" part="label-track">${s?.when==="element"?e:w.html`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${a}</span></li>`}glyphName(e,t){return w.html`<span aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",a="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!a&&s.length===0)return w.nothing;let o=Z(t)??"";return w.html`<div class="sky" part="section sky">${t||a?w.html`<div class="moon-line">${t?w.html`<span><span class="lbl">${this.t("Moon")}</span> <span aria-hidden="true">${o}</span> <b>${t}</b></span>`:w.nothing} ${a?w.html`<span><span class="lbl">${this.t("Phase")}</span> <b>${a}</b></span>`:w.nothing}</div>`:w.nothing} ${s.length?w.html`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(i=>w.html`<li>${i}</li>`)}</ul>`:w.nothing}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],a=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&a.length===0?w.nothing:w.html`${t.length&&!this.hideReadings?w.html`<section part="section week-by-week"><h3 class="block-title">${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>w.html`<div class="week"><span class="week-no">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?w.html`<p class="week-advice">${s.advice}</p>`:w.nothing}</div></div>`)}</div></section>`:w.nothing} ${a.length?w.html`<section part="section key-dates"><h3 class="block-title">${this.t("Key dates")}</h3><dl class="dates" part="label-track">${a.map(s=>w.html`<div class="date-row"><dt>${A(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:w.nothing}`}};cr.styles=[u,Tr,w.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink,#b45309);font-size:2.25rem;line-height:1}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);text-transform:capitalize;white-space:nowrap;margin:0}.date{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.energy{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin-left:auto}.energy-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);vertical-align:middle;width:6rem;height:6px;margin-left:6px;display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.column p,.overview p,.section p{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}.overview{gap:var(--roxy-space-sm,.5rem);display:grid}.overview p{font-size:var(--roxy-text-base,1rem)}.sections{gap:var(--roxy-space-lg,1.5rem) var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr));display:grid}.section{align-content:start;gap:var(--roxy-space-sm,.5rem);display:grid}.section h3{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;margin:0}.section p{font-size:var(--roxy-text-sm,.875rem)}.lucky{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;width:100%;display:flex}.compat{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.compat span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;padding:2px 8px}.sky{gap:var(--roxy-space-sm,.5rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);display:grid}.moon-line{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold,600)}.moon-line .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.transits{gap:.25rem;margin:0;padding:0;list-style:none;display:grid}.transits li{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);padding-left:.9rem;position:relative}.transits li:before{content:"";background:var(--roxy-accent,#f59e0b);border-radius:50%;width:5px;height:5px;position:absolute;top:.5em;left:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.weeks{gap:var(--roxy-space-sm,.5rem);display:grid}.week{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);grid-template-columns:3.5rem 1fr;align-items:baseline;display:grid}.week:first-child{border-top:0;padding-top:0}.week-no{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.week-focus{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem)}.week-advice{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:.15rem 0 0}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:.3rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0;display:grid}.date-row{display:contents}.date-row dt{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.date-row dd{color:var(--roxy-fg,#0a0a0a);margin:0}.column{gap:var(--roxy-space-md,1rem);display:grid}.column p{font-size:var(--roxy-text-base,1rem)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{gap:.15rem var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-when{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.row-what{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.row-what .name{font-weight:var(--roxy-weight-bold,600)}.row-what .aspect-trine,.row-what .aspect-sextile{color:var(--_success-fg)}.row-what .aspect-square,.row-what .aspect-opposition{color:var(--_danger-fg)}.row-what .aspect-conjunction{color:var(--roxy-accent-ink,#b45309)}.row-meta{gap:.2rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;grid-column:2;display:flex}.row-meta .kind{text-transform:uppercase;letter-spacing:.04em;font-weight:var(--roxy-weight-bold,600)}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.tile{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);gap:.1rem;display:grid}.tile-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.tile-value{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.tile-note{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}`],m([(0,zs.property)({type:String,reflect:!0})],cr.prototype,"period",2),m([(0,zs.property)({type:String,reflect:!0})],cr.prototype,"layout",2),cr=m([(0,zs.customElement)("roxy-horoscope-card")],cr);var re=require("lit"),Xn=require("lit/decorators.js");var _h=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Wn=[1,2,3,4];function pi(n,r){return n?typeof r=="number"?`${n} ${r}`:n:""}function oc(n){return[...new Set(n.map(String))].join(" > ")}function Nh(n){return[...new Set(n??[])]}var Er=class extends g{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),a=e.nodes;for(let[s,o]of[["Rahu",a?.rahu],["Ketu",a?.ketu]])o&&t.push({name:s,longitude:o.longitude,house:o.house,nakshatra:o.nakshatra,pada:o.pada,starLord:o.starLord,subLord:o.subLord,subSubLord:o.subSubLord,kpNumber:o.kpNumber,retrograde:!0});return t}renderData(e){let t=e.ascendant;return re.html`<div class="wrap" part="card" aria-label="KP chart" tabindex="0"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?re.html`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?it(t.longitude):t.sign??""} </strong>${t.nakshatra?re.html`· ${pi(t.nakshatra,t.pada)}`:re.nothing} ${t.subLord?re.html`· sub lord ${t.subLord}`:re.nothing} ${typeof t.kpNumber=="number"?re.html`· KP ${t.kpNumber}`:re.nothing}</div>`:re.nothing} ${typeof e.meta?.ayanamsa=="number"?re.html`<div class="ayan">Ayanamsa: ${ra(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?re.html`· ${e.meta.houseSystem} houses`:re.nothing}</div>`:re.nothing}</header>${pt({items:_h,active:this.activeTab,onSelect:a=>{this.activeTab=a},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?re.html`<table part="table" role="table"><caption class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>re.html`<tr><td class="body">${t.name}${t.retrograde?re.html`<span class="retro">R</span>`:re.nothing}</td><td class="num">${typeof t.longitude=="number"?it(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${pi(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`:re.html`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?re.html`<table part="table" role="table"><caption class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(a=>re.html`<tr><td class="body num">${a.house}${this.renderThemes(Io(a.house,t))}</td><td class="num">${typeof a.longitude=="number"?it(a.longitude):a.sign??""}</td><td>${a.signLord??""}</td><td>${pi(a.nakshatra,a.pada)}</td><td>${a.starLord??""}</td><td>${a.subLord??""}</td><td>${a.subSubLord??""}</td><td class="num">${typeof a.kpNumber=="number"?a.kpNumber:""}</td></tr>`)}</tbody></table>`:re.html`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,a=e?.houseWise??[],s=e?.planetWise??[];return!a.length&&!s.length?re.html`<p class="roxy-empty" role="status">No significators</p>`:re.html`${this.renderLevelLegend(a)} ${a.length?re.html`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div><table part="table" role="table"><caption class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${Wn.map(o=>re.html`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${a.map(o=>re.html`<tr><td class="body num">${o.house}${this.renderThemes(Io(o.house,t))}</td>${Wn.map(i=>this.renderCell(this.planetsAtLevel(o,i).join(", ")))}<td class="chain">${oc(o.all??[])}</td></tr>`)}</tbody></table>`:re.nothing} ${s.length?re.html`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div><table part="table" role="table"><caption class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${Wn.map(o=>re.html`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(o=>re.html`<tr><td class="body">${o.planet}</td>${Wn.map(i=>this.renderCell(this.housesAtLevel(o,i).join(", ")))}<td class="chain">${oc(o.allHouses??[])}${this.renderThemes(Jt(Nh(o.allHouses),t))}</td></tr>`)}</tbody></table>`:re.nothing}`}renderThemes(e){return e?re.html`<span class="themes">${e}</span>`:re.nothing}renderCell(e){return e?re.html`<td>${e}</td>`:re.html`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(a=>a.level===t).flatMap(a=>a.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(a=>a.level===t).flatMap(a=>a.houses??[])}renderLevelLegend(e){let t=new Map;for(let a of e)for(let s of a.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?re.nothing:re.html`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((a,s)=>a[0]-s[0]).map(([a,s])=>re.html`<li><b>L${a}</b>${s}</li>`)}</ul>`}};Er.styles=[u,ot,re.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);width:100%;overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.asc,.ayan{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.asc strong{color:var(--roxy-fg,#0a0a0a)}.roxy-tablist{padding:0 var(--roxy-space-md,1rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:620px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.body{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-left:4px}.num{font-variant-numeric:tabular-nums}.sig-head{padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;gap:var(--roxy-space-xs,.25rem);display:grid}.sig-title{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sig-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);flex-wrap:wrap;margin:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink,#b45309);margin-right:4px}.chain,.empty-cell{color:var(--roxy-muted,#71717a)}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-normal,400);text-transform:none;letter-spacing:normal;display:block}`],m([(0,Xn.state)()],Er.prototype,"activeTab",2),Er=m([(0,Xn.customElement)("roxy-kp-chart")],Er);var ye=require("lit"),ic=require("lit/decorators.js");var Ih={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},Gh={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},Oh={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},Bh={gain:"Gain",loss:"Loss"},Fh={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Oa=class extends g{renderData(r){return r.layers?ye.html`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(r)} ${this.renderSignificators(r)}<section class="block" part="section cusps">${this.renderLayer("cusps",r.layers.cusps,this.renderCuspRows(r.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",r.layers.dasha,this.renderDashaRows(r.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",r.layers.rulingPlanets,this.renderRulingRows(r.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",r.layers.moonWindows,this.renderWindowRows(r.layers.moonWindows.rows))}</section>${this.renderWindows(r)}<section class="block" part="section frame">${be(this.effectiveLang(),{ayanamsa:r.ayanamsa,ayanamsaDegrees:r.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(r){let e=this.effectiveLang();return ye.html`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${he(e,r.date)}</span></div><div class="verdict-row"><span class="verdict ${r.band}">${this.t(Ih[r.band])}</span> <span class="evidence">${f(e,r.score,1)}</span></div><dl class="facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${he(e,r.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${tt(e,r.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${tt(e,r.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(r){let e=r.significators,t=this.effectiveLang(),a=s=>ye.html`<div class="chips">${s.map(o=>ye.html`<span class="chip">${this.glyphName(o)}</span>`)}</div>`;return ye.html`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${a(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${a(e.loss)}</dd></div></dl>${e.byHouse.length?ye.html`<div class="scroll" part="table" tabindex="0"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>ye.html`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${tt(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:ye.nothing}</section>`}renderLayer(r,e,t){let a=this.effectiveLang();return ye.html`<div class="block-head"><h3>${this.t(Oh[r])}</h3><span class="evidence">${this.t("Weight")} ${_e(a,e.weight,0)} · ${this.t("Score")} ${f(a,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0">${t}</div>`}renderCuspRows(r){return ye.html`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(e=>ye.html`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${f(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(r){let e=this.effectiveLang();return ye.html`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${r.map(t=>ye.html`<tr><td>${this.t(Fh[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${he(e,t.startDate)}</td><td>${he(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td><td class="num">${_e(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(r){return ye.html`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(e=>ye.html`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${f(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(r){let e=this.effectiveLang();return ye.html`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(t=>ye.html`<tr><td>${yt(e,t.from)}</td><td>${yt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(r){let e=this.effectiveLang(),t=r.bestWindow,a=r.worstWindows??[];if(!t&&!a.length)return ye.nothing;let s=(o,i)=>ye.html`<span class="window ${i}"><span>${this.glyphName(o.subLord)}</span> <small>${Wt(e,{start:o.from,end:o.to})}</small></span>`;return ye.html`<section class="block" part="section windows"><dl class="facts">${t?ye.html`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="chips">${s(t,"best")}</div></dd></div>`:ye.nothing} ${a.length?ye.html`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="chips">${a.map(o=>s(o,"worst"))}</div></dd></div>`:ye.nothing}</dl></section>`}glyphName(r,e=!1){let t=R(r);return ye.html`${t?ye.html`<span class="glyph" aria-hidden="true">${t}</span>`:ye.nothing}${r}${e?ye.html`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:ye.nothing}`}verdictChip(r){return ye.html`<span class="state ${r}">${this.t(Gh[r])}</span>`}groupChip(r){return ye.html`<span class="chip">${this.t(Bh[r])}</span>`}};Oa.styles=[u,ee,ye.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);display:grid}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.when{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.verdict-row{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:.15rem .6rem}.verdict.strong,.verdict.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.mixed,.verdict.caution{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-accent-ink,#b45309)}.verdict.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.evidence{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.block{padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.block h3{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));margin:0;display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{flex-wrap:wrap;gap:.35rem;display:flex}.chip{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-secondary,#475569);padding:1px 8px}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em;font-weight:var(--roxy-weight-bold,600)}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.retro{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-left:.3em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:1px 8px}.state.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.state.mixed{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309)}.state.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.window{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);gap:1px;padding:.3rem .6rem;display:grid}.window small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.window.best{border-color:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, transparent)}.window.worst{border-color:color-mix(in srgb, var(--roxy-danger,#dc2626) 35%, transparent)}`],Oa=m([(0,ic.customElement)("roxy-kp-finance-card")],Oa);var er=require("lit"),lc=require("lit/decorators.js");var Ba=class extends g{renderData(r){let e=r.planets??[];return er.html`<div class="wrap" part="card" aria-label="KP planets table" tabindex="0"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof r.ayanamsa=="number"?er.html`<span class="ayanamsa">Ayanamsa: ${f(this.effectiveLang(),r.ayanamsa,2)}°</span>`:er.nothing}</header><table part="table" role="table"><caption class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>er.html`<tr><td class="planet">${t.planet} ${t.retrograde?er.html`<span class="retro">R</span>`:er.nothing}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div>`}};Ba.styles=[u,er.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.ayanamsa{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:560px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.planet{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);margin-left:4px}`],Ba=m([(0,lc.customElement)("roxy-kp-planets-table")],Ba);var bt=require("lit"),dc=require("lit/decorators.js");var Fa=class extends g{renderData(r){let e=r.significators??[];return bt.html`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${r.dayLord?bt.html`<div class="day-lord">Day lord: <strong>${r.dayLord}</strong></div>`:bt.nothing}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${r.moonSignLord??""}</dd><dt>Star lord</dt><dd>${r.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${r.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${r.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${r.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${r.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${r.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${r.lagnaSubSublord??""}</dd></dl></div></div>${r.rulingPlanets?.length?bt.html`<div class="rp-list" part="details" role="list" aria-label="Ruling planets by strength"><span class="rp-label">Ruling planets</span> ${r.rulingPlanets.map((t,a)=>bt.html`<span class="rp" role="listitem"><span class="rank">${a+1}</span> ${t}</span>`)}</div>`:bt.nothing} ${e.length?bt.html`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let a=Jt(t.signifies,r.houseThemes);return bt.html`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${a?bt.html`<span class="themes">${a}</span>`:bt.nothing}</td></tr>`})}</tbody></table>`:bt.nothing}</div>`}};Fa.styles=[u,bt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.day-lord{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.day-lord strong{color:var(--roxy-fg,#0a0a0a)}.groups{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));display:grid}.group h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.group dl{grid-template-columns:var(--roxy-label-col) 1fr;gap:2px var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);margin:0;display:grid}.group dt{color:var(--roxy-muted,#71717a)}.group dd{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);margin:0}.rp-list{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;align-items:center;display:flex}.rp-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em;margin-right:var(--roxy-space-xs,.25rem)}.rp{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:999px;align-items:center;gap:.3em;padding:.15em .6em;display:inline-flex}.rp .rank{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7)}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}`],Fa=m([(0,dc.customElement)("roxy-kp-ruling-planets")],Fa);var de=require("lit"),Jn=require("lit/decorators.js");var Pr=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),a=e.trigram;return de.html`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?de.html`<span class="group">${this.t("{{direction}} group",{direction:ge(t,"facing",H(e.group))})}</span>`:de.nothing}</header><div class="facts" part="details">${a?de.html`<span><span class="lbl">${this.t("Trigram")}</span> <span lang="zh">${a.chinese??""}</span> ${a.symbol??""} <b>${a.english??""}</b> ${a.element??""}</span>`:de.nothing} ${a?.familyMember?de.html`<span><span class="lbl">${this.t("Role")}</span>${a.familyMember}</span>`:de.nothing} ${"solarYear"in e&&typeof e.solarYear=="number"?de.html`<span class="solar-year"><span class="lbl">${this.t("Year")}</span><b>${sr(t,String(e.solarYear),"year")}</b></span>`:de.nothing} ${"gender"in e&&e.gender?de.html`<span class="formula-gender"><span class="lbl">${Pe(t,"gender")}</span>${ge(t,"gender",e.gender)}</span>`:de.nothing} ${"boundaryDate"in e&&e.boundaryDate?de.html`<span>${this.t("Year boundary")} ${A(t,e.boundaryDate)}</span>`:de.nothing} ${"reassigned"in e&&e.reassigned?de.html`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:de.nothing} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${jn.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?fr(e.conventions,this.translator,this.effectiveLang()):de.nothing}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return de.nothing;let t=this.effectiveLang();return de.html`${e.bestSector?de.html`<span><span class="lbl">${this.t("Best")}</span><b>${ge(t,"facing",e.bestSector)}</b></span>`:de.nothing} ${e.worstSector?de.html`<span><span class="lbl">${this.t("Worst")}</span><b>${ge(t,"facing",e.worstSector)}</b></span>`:de.nothing}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):ge(e,"facing",t)}renderSector(e,t){let a=this.effectiveLang(),s=this.sectorHeading(a,t);if(t==="Center")return de.html`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol">${e.trigram?.symbol??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let o=(e.sectors??[]).find(l=>l.direction===t);if(!o)return de.html`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let i=o.nature==="auspicious";return de.html`<div class="sector ${i?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${y(o,"starName")}</span> ${"chinese"in o&&o.chinese?de.html`<span class="star-hanzi" lang="zh">${o.chinese}</span>`:de.nothing} <span class="domain">${o.domain??""}</span> ${typeof o.rank=="number"?de.html`<span class="rank">${i?this.t("Rank"):this.t("Severity")} ${o.rank}</span>`:de.nothing}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return de.nothing;let a=this.effectiveLang(),s=t.map(o=>{let i=this.mode==="mansions"&&"reading"in o?o.reading:void 0;return!i||this.hideReadings?de.nothing:de.html`<li class="row" part="label-track"><span class="row-name">${this.sectorHeading(a,o.direction??"")}</span><div class="row-body"><span>${y(o,"starName")}</span><p part="reading">${i}</p></div></li>`});return s.every(o=>o===de.nothing)?de.nothing:de.html`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};Pr.styles=[u,ee,Kn,Tr,de.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.group{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.plate{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;display:grid;overflow:hidden}.sector{background:var(--roxy-surface,#fff);padding:var(--roxy-space-sm,.5rem);text-align:center;align-content:start;gap:.1rem;min-height:5.5rem;display:grid}.sector-good .sector-name,.sector-bad .sector-name,.sector-self .sector-name,.sector-good .rank,.sector-bad .rank{color:var(--roxy-secondary,#475569)}.sector-good .star-hanzi,.sector-bad .star-hanzi{color:var(--roxy-fg,#0a0a0a)}.sector-good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, var(--roxy-surface,#fff))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, var(--roxy-surface,#fff))}.sector-self{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, var(--roxy-surface,#fff))}.star-name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.star-hanzi{font-size:var(--roxy-text-base,1rem);color:var(--roxy-accent-ink,#b45309)}.domain{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569)}.rank{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.centre{align-content:center;gap:.1rem;display:grid}.kua-number{font-size:2rem;line-height:1;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.trigram-symbol{color:var(--roxy-accent-ink,#b45309);font-size:1.5rem;line-height:1.1}@container (width<=30rem){.plate{background:var(--roxy-surface,#fff);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm,.5rem);text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";align-content:start;row-gap:.15rem;min-height:auto;display:grid}.sector:last-child{border-bottom:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:right;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:right;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-good{background:var(--roxy-success,#16a34a)}.swatch-bad{background:var(--roxy-danger,#dc2626)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.row-body p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}`],m([(0,Jn.property)({type:String,reflect:!0})],Pr.prototype,"mode",2),Pr=m([(0,Jn.customElement)("roxy-kua-card")],Pr);var Je=require("lit"),pc=require("lit/decorators.js");var mi=320,Bt=mi/2,pr=128,Hh=118,cc=137,jh=152,Kh=.95,Vh={glyph:11},qh=Vh.glyph;function mr(n,r){let e=n*Math.PI/180;return{x:Bt+r*Math.sin(e),y:Bt-r*Math.cos(e)}}var Yh=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],Ha=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderData(e){let t=e.bodies??[],a=e.birthDetails;return Je.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Local space")}</h2>${a?Je.html`<div class="meta">${he(this.effectiveLang(),a.date,a.time)}</div>`:Je.nothing}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary?Je.html`<p class="summary">${e.summary}</p>`:Je.nothing} ${this.renderList(t)}</div>`}renderDial(e){return Je.html`<svg viewBox="0 0 ${mi} ${mi}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${Bt}" cy="${Bt}" r="${pr}"/><circle class="dial" cx="${Bt}" cy="${Bt}" r="${pr*.66}" stroke-width="0.5"/><circle class="dial" cx="${Bt}" cy="${Bt}" r="${pr*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Bt}" cy="${Bt}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=mr(l,pr),p=mr(l,pr-(l%45===0?8:4));e.push(Je.svg`<line class="tick" x1=${p.x} y1=${p.y} x2=${c.x} y2=${c.y} />`)}let t=mr(0,pr),a=mr(180,pr),s=mr(90,pr),o=mr(270,pr),i=Yh.map(({az:l,source:c})=>{let p=mr(l,jh),d=l%90===0;return Je.svg`<text class=${`compass-label${d?" cardinal":""}`} x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Je.svg`
96
+ ${Ud(d,o,h,n.holders.get(h)??[],n.letterFor,As+li+7)}
97
+ ${Ud(d,i,b,n.holders.get(b)??[],n.letterFor,-(As+li+7))}
98
+ </g>`)})}return Mr.svg`${Rh()}${r.length>0?r:Mr.nothing}`}var Ea=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===!0,isCore:s.isCore===!0}));if(t.length===0)return Le.nothing;let a=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return Le.html`<svg class="chart" part="chart" viewBox="${Wd}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${Jd({rungs:t,holders:a,letterFor:ec})}</svg>`}renderData(e){let t=e.channels??[],a=e.gates??[],s=e.summary,o=s?.gapGates??[],i=t.some(l=>l.isCore);return Le.html`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2 class="title">Penta</h2>${typeof e.memberCount=="number"?Le.html`<span class="count">${e.memberCount} members</span>`:Le.nothing}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${lr([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&a.length>0?`${s.filledGates} of ${a.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:o.length>0?o.join(", "):void 0}])} ${this.hideReadings?Le.nothing:Le.html`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${i&&!this.hideReadings?Le.html`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Le.nothing} ${this.renderGates(a)} ${t.length>0||a.length>0?Le.html`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Le.nothing}</div>`}renderGroup(e,t,a){return t.length===0?Le.nothing:Le.html`<div class="section" part="section channels"><h3>${e}</h3>${a&&!this.hideReadings?Le.html`<p class="note">${a}</p>`:Le.nothing} ${t.map(s=>Le.html`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?Le.html`<span class="circuit">${s.circuit} circuit</span>`:Le.nothing} </span><span class="badge ${s.defined?"defined":"open"}">${s.defined?"Defined":"Open"}</span> ${s.isCore?Le.html`<span class="badge core">Core</span>`:Le.nothing} <span class="held">Gate ${s.gateA} held by ${pi(s.gateAHeldBy)}. Gate ${s.gateB} held by ${pi(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Le.nothing;let t=e.filter(a=>a.filled).length;return Le.html`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Le.nothing:Le.html`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(a=>Le.html`<div class="row"><span class="gate-id">${a.gate}</span> <span class="cname">${a.gateName??""}</span> ${a.filled?Le.html`<span class="who">Held by ${pi(a.heldBy)}</span>`:Le.html`<span class="badge gap">Gap</span>`}</div>`)}</div>`}};Ea.styles=[u,Ue,Lr,Le.css`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg,#0a0a0a);font-size:15px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border,#e4e4e7);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink,#b45309);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted,#71717a);font-size:12px;font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.pn-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink,#b45309);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted,#71717a);font-size:13px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg,#0a0a0a)}.pn-badge{fill:var(--roxy-accent-ink,#b45309)}.pn-badge-text{fill:var(--roxy-surface,#fff);font-size:9px;font-weight:var(--roxy-weight-bold,600);font-family:var(--roxy-font-sans)}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600)}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.section h3{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.note{margin:var(--roxy-space-xs,.25rem) 0 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.gates,.gate-id{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600);min-width:3.5rem}.cname{flex:1;min-width:8rem}.circuit{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.held{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);flex-basis:100%;line-height:1.6}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.core{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.gap{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}`],Ea=m([(0,Qd.customElement)("roxy-hd-penta")],Ea);var Dh="ABCDE",ec=n=>Dh[n]??String(n+1);function pi(n){let r=(n??[]).map(ec);return r.length>0?r.join(", "):"nobody"}var Rt=require("lit"),tc=require("lit/decorators.js");var Pa=class extends g{renderData(r){return Th(r)?this.renderType(r):this.renderProfile(r)}renderType(r){return Rt.html`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Type")}</h2>${r.type||r.profile?Rt.html`<div class="type-line">${[y(r,"type"),r.profile?this.t("Profile {{profile}}",{profile:r.profile}):""].filter(Boolean).join(" · ")}</div>`:Rt.nothing}</header>${lr([{label:this.t("Type"),value:y(r,"type")},{label:this.t("Strategy"),value:y(r,"strategy")},{label:this.t("Authority"),value:y(r,"authority")},{label:this.t("Profile"),value:r.profile}])} ${r.typeDescription&&!this.hideReadings?Rt.html`<p class="lead">${r.typeDescription}</p>`:Rt.nothing} ${un(r.signature?y(r,"signature"):void 0,r.notSelf?y(r,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:y(r,"strategy"),body:r.strategyDescription},{label:this.t("Authority"),aside:y(r,"authority"),body:r.authorityDescription},{label:this.t("Aura"),body:r.aura}],"hd-type-reading")}</div>`}renderProfile(r){return Rt.html`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Profile")}</h2>${r.profile?Rt.html`<div class="type-line">${r.profile}</div>`:Rt.nothing}</header>${lr([{label:this.t("Profile"),value:r.profile},{label:this.t("Personality line"),value:r.personalityLine?.toString()},{label:this.t("Design line"),value:r.designLine?.toString()}])} ${this.hideReadings?Rt.nothing:Rt.html`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${yn({personality:r.personalityKeynote,personalityLine:r.personalityLine,design:r.designKeynote,designLine:r.designLine},this.translator)}</section>`}</div>`}};Pa.styles=[u,q,me,Lr,Rt.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.type-line{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`],Pa=m([(0,tc.customElement)("roxy-hd-type-card")],Pa);function Th(n){return typeof n.type=="string"}var xe=require("lit"),ac=require("lit/decorators.js");var _a=class extends g{renderData(r){let e=[...r.arrows??[]].sort((t,a)=>rc(t.position)-rc(a.position));return xe.html`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 class="title" part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${r.confident===!1?xe.html`<p class="note" role="note">${typeof r.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}°). Verify the exact birth time.",{margin:r.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:xe.nothing} ${this.renderReading(e,r.baseDescription)}</div>`}renderArrow(r){let e=r.direction==="left"?"←":"→",t=y(r,"baseName");return xe.html`<div class="arrow"><div class="arrow-head"><span class="glyph" aria-hidden="true">${e}</span> <span class="name">${y(r,"name")}</span></div>${r.layer?xe.html`<span class="layer">${y(r,"layer")}</span>`:xe.nothing} <span class="labels">${[y(r,"directionLabel"),y(r,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof r.color=="number"?xe.html`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:r.color,tone:r.tone??"",base:r.base??""})}${t?`, ${t}`:""}</span>`:xe.nothing} ${r.activation?.planet?xe.html`<span class="ctb">${[r.activation.planet,gn(r.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:xe.nothing} ${r.confident===!1?xe.html`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:xe.nothing}</div>`}renderReading(r,e){let t=r.filter(o=>o.description||o.colorMeaning);if(t.length===0||this.hideReadings)return xe.nothing;let a=new Map;for(let o of t){let i=o.layer??"",l=a.get(i);l?l.push(o):a.set(i,[o])}let s=0;return xe.html`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...a].map(([o,i])=>xe.html`<div class="group">${o?xe.html`<p class="group-head">${y(i[0],"layer")}</p>`:xe.nothing} ${i[0]?.layerDescription?xe.html`<p class="group-note">${i[0].layerDescription}</p>`:xe.nothing} ${i.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?xe.html`<p class="footnote">${this.t("Base")}. ${e}</p>`:xe.nothing}</section>`}renderArrowReading(r,e){let t=r.cognition,a=t?y(t,"label"):"",s=[{label:this.t("Color"),body:r.colorMeaning},{label:this.t("Tone"),body:r.toneMeaning},{label:this.t("Direction"),body:r.directionMeaning},{label:a?`${this.t("Cognition")} · ${a}`:this.t("Cognition"),body:t?.description}].filter(o=>!!o.body);return xe.html`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(r,"name")}</span> ${pe()} ${r.position?xe.html`<span class="interp-aside"><small>${y(r,"position")}</small></span>`:xe.nothing}</summary><div class="interp-body">${r.description?xe.html`<p>${r.description}</p>`:xe.nothing} ${s.length>0?xe.html`<dl class="facets">${s.map(o=>xe.html`<dt>${o.label}</dt><dd>${o.body}</dd>`)}</dl>`:xe.nothing}</div></details>`}};_a.styles=[u,q,me,xe.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-xs,.25rem);align-content:start;display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.75rem;line-height:1}.name{font-weight:var(--roxy-weight-bold,600)}.layer{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.labels{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.ctb{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.note{font-size:var(--roxy-text-xs,.75rem);color:var(--_warning-fg)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group{margin-bottom:var(--roxy-space-md,1rem)}.group:last-of-type{margin-bottom:0}.group-head{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.group-note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.facets{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.facets dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.facets dd{margin:0}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0;line-height:1.6}`],_a=m([(0,ac.customElement)("roxy-hd-variables")],_a);function rc(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}var Ct=require("lit"),sc=require("lit/decorators.js");var Ah={udaya:"Rose",asta:"Set"},zh={udaya:"rises",asta:"sets"},Na=class extends g{renderData(r){let e=r.grahas??[];return e.length?Ct.html`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2 class="title">${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:r.date})}</p></header><div class="rows" part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(r){let e=R(r.graha)??"";return Ct.html`<article class="row"><div class="row-top"><span class="graha">${e?Ct.html`<span class="glyph">${e}</span>`:Ct.nothing}${r.graha} </span><span class="state ${r.visible?"visible":"invisible"}">${r.visible?this.t("Visible"):this.t("Invisible")} </span>${r.retrograde?Ct.html`<span class="retro" title="${this.t("retrograde")}">R</span>`:Ct.nothing}</div><p class="window" part="window">${this.windowLine(r)}</p><p class="meta" part="details">${this.metaLine(r)}</p></article>`}windowLine(r){let e=r.nextEvent,t=r.lastEvent;if(e){let a={event:this.t(zh[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:he(this.effectiveLang(),e.datetime)};return Ct.html`${r.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",a):this.t("Invisible until it {{event}} {{where}} on {{when}}",a)}`}return t?Ct.html`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Ah[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:he(this.effectiveLang(),t.datetime)})}`:Ct.html`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(r){let e=r.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=r.nextEvent??r.lastEvent,a=t&&t.kalamsa!==r.kalamsa,s={degrees:f(this.effectiveLang(),r.timeDegrees,2),limit:f(this.effectiveLang(),r.kalamsa,0),shifted:a?f(this.effectiveLang(),t.kalamsa,0):""};return Ct.html`${a?this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°, becoming {{shifted}}° at that event",s):this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°",s)} · ${e}`}};Na.styles=[u,Ct.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}.rows{display:grid}.row{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-sm,4px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-fg,#0a0a0a);padding:.1rem .45rem}.state.invisible{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 14%, transparent)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600)}.window{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.num{font-variant-numeric:tabular-nums}`],Na=m([(0,sc.customElement)("roxy-heliacal-table")],Na);var ne=require("lit"),nc=require("lit/decorators.js");var Ia=class extends g{resolveHexagram(){let r=this.data;if(!r)return null;if("hexagram"in r&&r.hexagram){if("lines"in r){let s=r,o=s.hexagram;return{hex:o,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??o.changingLines,resultingHexagram:s.resultingHexagram}}let t=r,a=t.hexagram;return{hex:a,changingLines:a.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=r;return{hex:e,changingLines:e.changingLines}}renderData(){let r=this.resolveHexagram();if(!r)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:a,changingLines:s,dailyMessage:o,date:i,resultingHexagram:l}=r;return ne.html`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,a,s,o,i)} ${l?ne.html`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${pe()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:ne.nothing}</article>`}renderHexagram(r,e,t,a,s,o,i){let l=t??this.derivedLines(e),c=new Set(a??[]),p=!this.hideReadings;return ne.html`<div class="glyphs" part="chart">${e.symbol?ne.html`<div class="symbol">${e.symbol}</div>`:ne.nothing} ${l.length>0?ne.html`<div class="lines" aria-hidden="true">${l.slice().reverse().map((d,h)=>{let b=l.length-1-h+1,L=c.has(b),v=d===6||d===8;return ne.html`<div class="line ${`${v?"broken":"solid"}${L?" changing":""}`}">${v?ne.html`<span class="seg"></span><span class="seg"></span>`:ne.html`<span class="seg"></span>`}</div>`})}</div>`:ne.nothing}</div><div part="header"><h2 class="title">${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${i?ne.html`<time class="daily-date" part="details" datetime="${i}">${A(this.effectiveLang(),i)}</time>`:ne.nothing}<p class="subtitle">${e.chinese?ne.html`${e.chinese}`:ne.nothing} ${e.pinyin?ne.html`· ${e.pinyin}`:ne.nothing}</p><div class="trigrams" part="details">${e.upperTrigram?ne.html`<div>${this.t("Upper")} <span class="tri-glyph">${_o(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:ne.nothing} ${e.lowerTrigram?ne.html`<div>${this.t("Lower")} <span class="tri-glyph">${_o(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:ne.nothing}</div>${e.judgment&&p?ne.html`<p class="judgment">${e.judgment}</p>`:ne.nothing} ${e.image&&p?ne.html`<p class="image">${e.image}</p>`:ne.nothing} ${o&&p?ne.html`<p class="message">${o}</p>`:ne.nothing} ${e.interpretation?.general&&p?ne.html`<p>${e.interpretation.general}</p>`:ne.nothing} ${c.size>0?ne.html`<div class="changing" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((d,h)=>d-h).join(", ")})}</div>`:ne.nothing} ${this.renderTopics(e,r)} ${this.renderLines(s??e.changingLines,c,`${r}-lines`)}</div>`}renderTopics(r,e){let t=r.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(a=>a.body),`${e}-topics`,"Readings"):ne.nothing}renderLines(r,e,t){let a=r??[];if(a.length===0)return ne.nothing;let s=e.size>0,o=s?a.filter(l=>e.has(l.position)):a;if(o.length===0)return ne.nothing;let i=o.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?ne.html`<p class="line-meaning">${l.meaning}</p>`:ne.nothing}));return this.renderInterpretation(i,t,s?"Changing lines":"Lines")}derivedLines(r){let e=r.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};Ia.styles=[u,q,me,ne.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-lg,1.5rem);grid-template-columns:6rem 1fr;display:grid}.result-chart{gap:var(--roxy-space-lg,1.5rem);padding-top:var(--roxy-space-md,1rem);grid-template-columns:6rem minmax(0,1fr);display:grid}.result{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);grid-column:1/-1}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);cursor:pointer;display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:1fr}}.glyphs{gap:var(--roxy-space-md,1rem);align-content:start;align-self:start;justify-items:center;display:grid}.symbol{color:var(--roxy-accent-ink,#b45309);font-size:3rem;line-height:1}.lines{gap:4px;width:4rem;display:grid}.line{justify-content:center;align-items:center;gap:4px;height:8px;display:flex}.seg{background:var(--roxy-fg,#0a0a0a);border-radius:1px;height:6px;display:block}.line.broken .seg{width:1.4rem}.line.solid .seg{width:3rem}.line.changing .seg{background:var(--roxy-accent,#f59e0b)}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0 0 var(--roxy-space-sm,.5rem)}.daily-date{margin-bottom:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);display:block}.trigrams{gap:var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-sm,.5rem);color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:flex}.tri-glyph{font-size:var(--roxy-text-xl,1.5rem);color:var(--roxy-accent-ink,#b45309);vertical-align:middle;margin-right:4px}.judgment,.image,.message{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.judgment:before{content:"Judgment. ";font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569)}.image:before{content:"Image. ";font-weight:var(--roxy-weight-bold,600);color:var(--roxy-secondary,#475569)}.line-meaning{padding-left:var(--roxy-space-sm,.5rem);border-left:2px solid var(--roxy-border,#e4e4e7);color:var(--roxy-muted,#71717a);margin:0}.changing{margin-top:var(--roxy-space-md,1rem);padding-top:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem)}`],Ia=m([(0,nc.customElement)("roxy-hexagram")],Ia);var Ot=require("lit"),oc=require("lit/decorators.js");var Ga=class extends g{renderData(r){let e=r.dayHoras??[],t=r.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Ot.html`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2 class="title">${this.t("Hora")}</h2>${r.date?Ot.html`<p class="subtitle">${A(this.effectiveLang(),r.date)}</p>`:Ot.nothing}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(r,e){return e.length===0?Ot.nothing:Ot.html`<div class="col"><p class="section-label">${r}</p>${e.map(t=>Ot.html`<div class="row"><span class="glyph" aria-hidden="true">${R(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${Wt(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Ot.html`<span class="num">${t.number}</span>`:Ot.nothing}</div>`)}</div>`}};Ga.styles=[u,Ot.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.cols{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-xs,.25rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);display:flex}.row:last-child{border-bottom:none}.glyph{color:var(--roxy-accent-ink,#b45309);text-align:center;width:1.25em;font-size:1.15em;line-height:1}.planet{flex:1;font-weight:500}.time{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;white-space:nowrap}.num{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right;width:1.5em}@container (width<=30rem){.cols{grid-template-columns:1fr}}`],Ga=m([(0,oc.customElement)("roxy-hora-table")],Ga);var w=require("lit"),zs=require("lit/decorators.js");var Mh={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Eh={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Ph=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],_h=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],cr=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",a=Z(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o=this.effectiveLang(),i="date"in e&&e.date&&A(o,e.date)||"week"in e&&e.week&&A(o,e.week)||"month"in e&&e.month&&sr(o,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return w.html`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph" aria-hidden="true">${a}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(Mh[this.period])}</h2>${i?w.html`<div class="date">${i}</div>`:w.nothing}</div>${s!==null?w.html`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:w.nothing}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",p="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],d="luckyDays"in e&&e.luckyDays?e.luckyDays:[],h=e.compatibleSigns??[];return l===void 0&&!c&&p.length===0&&d.length===0&&h.length===0?w.nothing:w.html`<div class="lucky" part="details">${l!==void 0?w.html`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:w.nothing} ${c?w.html`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:w.nothing} ${p.length?w.html`<span>${this.t("Lucky numbers")} <strong>${p.join(", ")}</strong></span>`:w.nothing} ${d.length?w.html`<span>${this.t("Lucky days")} <strong>${d.join(", ")}</strong></span>`:w.nothing} ${h.length?w.html`<span class="compat-wrap">${this.t("Best with")} <span class="compat">${h.map(b=>w.html`<span>${b}</span>`)}</span></span>`:w.nothing}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return w.nothing;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):w.nothing;let a=this.paragraphs(e.overview);return w.html`${a.length?w.html`<div class="overview" part="section overview">${a}</div>`:w.nothing}<div class="sections" part="section outlook">${Ph.map(([s,o])=>{let i=this.paragraphs(e[s]);return i.length?w.html`<div class="section"><h3>${this.t(o)}</h3>${i}</div>`:w.nothing})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?w.nothing:w.html`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>w.html`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return w.nothing;let t=this.effectiveLang();return w.html`<section part="section events"><h3 class="block-title">${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(a=>this.renderRow(w.html`<time class="row-when" datetime="${a.at}">${sr(t,a.at,"time")}</time>`,this.renderEventBodies(a),w.html`<span class="kind">${this.t(Eh[a.type])}</span> <span>${this.t("House")} ${a.house}</span> ${a.sign?w.html`<span>${this.glyphName(Z(a.sign),H(a.sign))}</span>`:w.nothing} ${a.through?w.html`<span>${this.t("through {{date}}",{date:A(t,a.through)})}</span>`:w.nothing}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(a=>this.glyphName(R(a),a));if(t.length===2&&e.aspect){let a=$t({type:e.aspect});return w.html`${t[0]} <span class="${Ht[a]??""}">${ls(e.aspect)??e.aspect}</span> ${t[1]}`}return w.html`${t}`}renderYear(e){if(!("themes"in e))return w.nothing;let t=this.effectiveLang();return w.html`${e.themes.length?w.html`<section part="section themes"><h3 class="block-title">${this.t("Themes")}</h3><ul class="rows">${e.themes.map(a=>this.renderRow(_t(t,a.from,a.to),w.html`${this.glyphName(R(a.body),a.body)} ${this.glyphName(Z(a.sign),H(a.sign))}`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${e.keyPeriods.length?w.html`<section part="section key-periods"><h3 class="block-title">${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(a=>this.renderRow(_t(t,a.from,a.to),this.glyphName(R(a.body),a.body),w.html`<span>${this.t("House")} ${a.house}</span><span>${a.focus}</span>`))}</ul></section>`:w.nothing} ${e.eclipses.length?w.html`<section part="section eclipses"><h3 class="block-title">${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(a=>this.renderRow(A(t,a.date),w.html`<span class="name">${a.kind}</span>`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${e.retrogrades.length?w.html`<section part="section retrogrades"><h3 class="block-title">${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(a=>this.renderRow(A(t,a.date),w.html`${this.glyphName(R(a.body),a.body)} <span>${a.direction}</span>`,w.html`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:w.nothing} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return w.nothing;let t=this.effectiveLang(),a=_h.filter(([s])=>e[s]);return a.length===0?w.nothing:w.html`<section part="section best-periods"><h3 class="block-title">${this.t("Best months")}</h3><div class="tiles" part="details">${a.map(([s,o])=>{let i=e[s];return i?w.html`<div class="tile"><span class="tile-label">${this.t(o)}</span> <span class="tile-value">${sr(t,i.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:i.count})}</span></div>`:w.nothing})}</div></section>`}renderRow(e,t,a,s){return w.html`<li class="row" part="label-track">${s?.when==="element"?e:w.html`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${a}</span></li>`}glyphName(e,t){return w.html`<span aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",a="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!a&&s.length===0)return w.nothing;let o=Z(t)??"";return w.html`<div class="sky" part="section sky">${t||a?w.html`<div class="moon-line">${t?w.html`<span><span class="lbl">${this.t("Moon")}</span> <span aria-hidden="true">${o}</span> <b>${t}</b></span>`:w.nothing} ${a?w.html`<span><span class="lbl">${this.t("Phase")}</span> <b>${a}</b></span>`:w.nothing}</div>`:w.nothing} ${s.length?w.html`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(i=>w.html`<li>${i}</li>`)}</ul>`:w.nothing}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],a=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&a.length===0?w.nothing:w.html`${t.length&&!this.hideReadings?w.html`<section part="section week-by-week"><h3 class="block-title">${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>w.html`<div class="week"><span class="week-no">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?w.html`<p class="week-advice">${s.advice}</p>`:w.nothing}</div></div>`)}</div></section>`:w.nothing} ${a.length?w.html`<section part="section key-dates"><h3 class="block-title">${this.t("Key dates")}</h3><dl class="dates" part="label-track">${a.map(s=>w.html`<div class="date-row"><dt>${A(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:w.nothing}`}};cr.styles=[u,Tr,w.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink,#b45309);font-size:2.25rem;line-height:1}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);text-transform:capitalize;white-space:nowrap;margin:0}.date{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.energy{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin-left:auto}.energy-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);vertical-align:middle;width:6rem;height:6px;margin-left:6px;display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.column p,.overview p,.section p{color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}.overview{gap:var(--roxy-space-sm,.5rem);display:grid}.overview p{font-size:var(--roxy-text-base,1rem)}.sections{gap:var(--roxy-space-lg,1.5rem) var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr));display:grid}.section{align-content:start;gap:var(--roxy-space-sm,.5rem);display:grid}.section h3{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;margin:0}.section p{font-size:var(--roxy-text-sm,.875rem)}.lucky{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;width:100%;display:flex}.compat{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.compat span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;padding:2px 8px}.sky{gap:var(--roxy-space-sm,.5rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);display:grid}.moon-line{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold,600)}.moon-line .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.transits{gap:.25rem;margin:0;padding:0;list-style:none;display:grid}.transits li{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);padding-left:.9rem;position:relative}.transits li:before{content:"";background:var(--roxy-accent,#f59e0b);border-radius:50%;width:5px;height:5px;position:absolute;top:.5em;left:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.weeks{gap:var(--roxy-space-sm,.5rem);display:grid}.week{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);grid-template-columns:3.5rem 1fr;align-items:baseline;display:grid}.week:first-child{border-top:0;padding-top:0}.week-no{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.week-focus{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem)}.week-advice{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:.15rem 0 0}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:.3rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0;display:grid}.date-row{display:contents}.date-row dt{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.date-row dd{color:var(--roxy-fg,#0a0a0a);margin:0}.column{gap:var(--roxy-space-md,1rem);display:grid}.column p{font-size:var(--roxy-text-base,1rem)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{gap:.15rem var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-when{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.row-what{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.row-what .name{font-weight:var(--roxy-weight-bold,600)}.row-what .aspect-trine,.row-what .aspect-sextile{color:var(--_success-fg)}.row-what .aspect-square,.row-what .aspect-opposition{color:var(--_danger-fg)}.row-what .aspect-conjunction{color:var(--roxy-accent-ink,#b45309)}.row-meta{gap:.2rem var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;grid-column:2;display:flex}.row-meta .kind{text-transform:uppercase;letter-spacing:.04em;font-weight:var(--roxy-weight-bold,600)}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));display:grid}.tile{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);gap:.1rem;display:grid}.tile-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.tile-value{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.tile-note{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}`],m([(0,zs.property)({type:String,reflect:!0})],cr.prototype,"period",2),m([(0,zs.property)({type:String,reflect:!0})],cr.prototype,"layout",2),cr=m([(0,zs.customElement)("roxy-horoscope-card")],cr);var re=require("lit"),Xn=require("lit/decorators.js");var Nh=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Wn=[1,2,3,4];function mi(n,r){return n?typeof r=="number"?`${n} ${r}`:n:""}function ic(n){return[...new Set(n.map(String))].join(" > ")}function Ih(n){return[...new Set(n??[])]}var Er=class extends g{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),a=e.nodes;for(let[s,o]of[["Rahu",a?.rahu],["Ketu",a?.ketu]])o&&t.push({name:s,longitude:o.longitude,house:o.house,nakshatra:o.nakshatra,pada:o.pada,starLord:o.starLord,subLord:o.subLord,subSubLord:o.subSubLord,kpNumber:o.kpNumber,retrograde:!0});return t}renderData(e){let t=e.ascendant;return re.html`<div class="wrap" part="card" aria-label="KP chart" tabindex="0"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?re.html`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?it(t.longitude):t.sign??""} </strong>${t.nakshatra?re.html`· ${mi(t.nakshatra,t.pada)}`:re.nothing} ${t.subLord?re.html`· sub lord ${t.subLord}`:re.nothing} ${typeof t.kpNumber=="number"?re.html`· KP ${t.kpNumber}`:re.nothing}</div>`:re.nothing} ${typeof e.meta?.ayanamsa=="number"?re.html`<div class="ayan">Ayanamsa: ${ra(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?re.html`· ${e.meta.houseSystem} houses`:re.nothing}</div>`:re.nothing}</header>${pt({items:Nh,active:this.activeTab,onSelect:a=>{this.activeTab=a},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?re.html`<table part="table" role="table"><caption class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>re.html`<tr><td class="body">${t.name}${t.retrograde?re.html`<span class="retro">R</span>`:re.nothing}</td><td class="num">${typeof t.longitude=="number"?it(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${mi(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`:re.html`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?re.html`<table part="table" role="table"><caption class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(a=>re.html`<tr><td class="body num">${a.house}${this.renderThemes(Io(a.house,t))}</td><td class="num">${typeof a.longitude=="number"?it(a.longitude):a.sign??""}</td><td>${a.signLord??""}</td><td>${mi(a.nakshatra,a.pada)}</td><td>${a.starLord??""}</td><td>${a.subLord??""}</td><td>${a.subSubLord??""}</td><td class="num">${typeof a.kpNumber=="number"?a.kpNumber:""}</td></tr>`)}</tbody></table>`:re.html`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,a=e?.houseWise??[],s=e?.planetWise??[];return!a.length&&!s.length?re.html`<p class="roxy-empty" role="status">No significators</p>`:re.html`${this.renderLevelLegend(a)} ${a.length?re.html`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div><table part="table" role="table"><caption class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${Wn.map(o=>re.html`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${a.map(o=>re.html`<tr><td class="body num">${o.house}${this.renderThemes(Io(o.house,t))}</td>${Wn.map(i=>this.renderCell(this.planetsAtLevel(o,i).join(", ")))}<td class="chain">${ic(o.all??[])}</td></tr>`)}</tbody></table>`:re.nothing} ${s.length?re.html`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div><table part="table" role="table"><caption class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${Wn.map(o=>re.html`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(o=>re.html`<tr><td class="body">${o.planet}</td>${Wn.map(i=>this.renderCell(this.housesAtLevel(o,i).join(", ")))}<td class="chain">${ic(o.allHouses??[])}${this.renderThemes(Jt(Ih(o.allHouses),t))}</td></tr>`)}</tbody></table>`:re.nothing}`}renderThemes(e){return e?re.html`<span class="themes">${e}</span>`:re.nothing}renderCell(e){return e?re.html`<td>${e}</td>`:re.html`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(a=>a.level===t).flatMap(a=>a.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(a=>a.level===t).flatMap(a=>a.houses??[])}renderLevelLegend(e){let t=new Map;for(let a of e)for(let s of a.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?re.nothing:re.html`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((a,s)=>a[0]-s[0]).map(([a,s])=>re.html`<li><b>L${a}</b>${s}</li>`)}</ul>`}};Er.styles=[u,ot,re.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);width:100%;overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-xs,.25rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.asc,.ayan{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.asc strong{color:var(--roxy-fg,#0a0a0a)}.roxy-tablist{padding:0 var(--roxy-space-md,1rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:620px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.body{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-left:4px}.num{font-variant-numeric:tabular-nums}.sig-head{padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;gap:var(--roxy-space-xs,.25rem);display:grid}.sig-title{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sig-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin:0}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);flex-wrap:wrap;margin:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink,#b45309);margin-right:4px}.chain,.empty-cell{color:var(--roxy-muted,#71717a)}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-normal,400);text-transform:none;letter-spacing:normal;display:block}`],m([(0,Xn.state)()],Er.prototype,"activeTab",2),Er=m([(0,Xn.customElement)("roxy-kp-chart")],Er);var ye=require("lit"),lc=require("lit/decorators.js");var Gh={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},Oh={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},Bh={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},Fh={gain:"Gain",loss:"Loss"},Hh={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Oa=class extends g{renderData(r){return r.layers?ye.html`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(r)} ${this.renderSignificators(r)}<section class="block" part="section cusps">${this.renderLayer("cusps",r.layers.cusps,this.renderCuspRows(r.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",r.layers.dasha,this.renderDashaRows(r.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",r.layers.rulingPlanets,this.renderRulingRows(r.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",r.layers.moonWindows,this.renderWindowRows(r.layers.moonWindows.rows))}</section>${this.renderWindows(r)}<section class="block" part="section frame">${be(this.effectiveLang(),{ayanamsa:r.ayanamsa,ayanamsaDegrees:r.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(r){let e=this.effectiveLang();return ye.html`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${he(e,r.date)}</span></div><div class="verdict-row"><span class="verdict ${r.band}">${this.t(Gh[r.band])}</span> <span class="evidence">${f(e,r.score,1)}</span></div><dl class="facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${he(e,r.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${tt(e,r.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${tt(e,r.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(r){let e=r.significators,t=this.effectiveLang(),a=s=>ye.html`<div class="chips">${s.map(o=>ye.html`<span class="chip">${this.glyphName(o)}</span>`)}</div>`;return ye.html`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${a(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${a(e.loss)}</dd></div></dl>${e.byHouse.length?ye.html`<div class="scroll" part="table" tabindex="0"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>ye.html`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${tt(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:ye.nothing}</section>`}renderLayer(r,e,t){let a=this.effectiveLang();return ye.html`<div class="block-head"><h3>${this.t(Bh[r])}</h3><span class="evidence">${this.t("Weight")} ${_e(a,e.weight,0)} · ${this.t("Score")} ${f(a,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0">${t}</div>`}renderCuspRows(r){return ye.html`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(e=>ye.html`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${f(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(r){let e=this.effectiveLang();return ye.html`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${r.map(t=>ye.html`<tr><td>${this.t(Hh[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${he(e,t.startDate)}</td><td>${he(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td><td class="num">${_e(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(r){return ye.html`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(e=>ye.html`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${f(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(r){let e=this.effectiveLang();return ye.html`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${r.map(t=>ye.html`<tr><td>${yt(e,t.from)}</td><td>${yt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(r){let e=this.effectiveLang(),t=r.bestWindow,a=r.worstWindows??[];if(!t&&!a.length)return ye.nothing;let s=(o,i)=>ye.html`<span class="window ${i}"><span>${this.glyphName(o.subLord)}</span> <small>${Wt(e,{start:o.from,end:o.to})}</small></span>`;return ye.html`<section class="block" part="section windows"><dl class="facts">${t?ye.html`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="chips">${s(t,"best")}</div></dd></div>`:ye.nothing} ${a.length?ye.html`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="chips">${a.map(o=>s(o,"worst"))}</div></dd></div>`:ye.nothing}</dl></section>`}glyphName(r,e=!1){let t=R(r);return ye.html`${t?ye.html`<span class="glyph" aria-hidden="true">${t}</span>`:ye.nothing}${r}${e?ye.html`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:ye.nothing}`}verdictChip(r){return ye.html`<span class="state ${r}">${this.t(Oh[r])}</span>`}groupChip(r){return ye.html`<span class="chip">${this.t(Fh[r])}</span>`}};Oa.styles=[u,ee,ye.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);display:grid}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.when{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.verdict-row{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:.15rem .6rem}.verdict.strong,.verdict.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.mixed,.verdict.caution{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-accent-ink,#b45309)}.verdict.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.evidence{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.block{padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.block h3{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));margin:0;display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{flex-wrap:wrap;gap:.35rem;display:flex}.chip{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-secondary,#475569);padding:1px 8px}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em;font-weight:var(--roxy-weight-bold,600)}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.retro{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-left:.3em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:1px 8px}.state.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.state.mixed{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309)}.state.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.window{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);gap:1px;padding:.3rem .6rem;display:grid}.window small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.window.best{border-color:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, transparent)}.window.worst{border-color:color-mix(in srgb, var(--roxy-danger,#dc2626) 35%, transparent)}`],Oa=m([(0,lc.customElement)("roxy-kp-finance-card")],Oa);var er=require("lit"),dc=require("lit/decorators.js");var Ba=class extends g{renderData(r){let e=r.planets??[];return er.html`<div class="wrap" part="card" aria-label="KP planets table" tabindex="0"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof r.ayanamsa=="number"?er.html`<span class="ayanamsa">Ayanamsa: ${f(this.effectiveLang(),r.ayanamsa,2)}°</span>`:er.nothing}</header><table part="table" role="table"><caption class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>er.html`<tr><td class="planet">${t.planet} ${t.retrograde?er.html`<span class="retro">R</span>`:er.nothing}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div>`}};Ba.styles=[u,er.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.ayanamsa{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:560px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.planet{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);margin-left:4px}`],Ba=m([(0,dc.customElement)("roxy-kp-planets-table")],Ba);var bt=require("lit"),cc=require("lit/decorators.js");var Fa=class extends g{renderData(r){let e=r.significators??[];return bt.html`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${r.dayLord?bt.html`<div class="day-lord">Day lord: <strong>${r.dayLord}</strong></div>`:bt.nothing}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${r.moonSignLord??""}</dd><dt>Star lord</dt><dd>${r.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${r.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${r.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${r.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${r.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${r.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${r.lagnaSubSublord??""}</dd></dl></div></div>${r.rulingPlanets?.length?bt.html`<div class="rp-list" part="details" role="list" aria-label="Ruling planets by strength"><span class="rp-label">Ruling planets</span> ${r.rulingPlanets.map((t,a)=>bt.html`<span class="rp" role="listitem"><span class="rank">${a+1}</span> ${t}</span>`)}</div>`:bt.nothing} ${e.length?bt.html`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let a=Jt(t.signifies,r.houseThemes);return bt.html`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${a?bt.html`<span class="themes">${a}</span>`:bt.nothing}</td></tr>`})}</tbody></table>`:bt.nothing}</div>`}};Fa.styles=[u,bt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.day-lord{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.day-lord strong{color:var(--roxy-fg,#0a0a0a)}.groups{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));display:grid}.group h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.group dl{grid-template-columns:var(--roxy-label-col) 1fr;gap:2px var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);margin:0;display:grid}.group dt{color:var(--roxy-muted,#71717a)}.group dd{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);margin:0}.rp-list{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;align-items:center;display:flex}.rp-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em;margin-right:var(--roxy-space-xs,.25rem)}.rp{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:999px;align-items:center;gap:.3em;padding:.15em .6em;display:inline-flex}.rp .rank{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-sm,.5rem);text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7)}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}`],Fa=m([(0,cc.customElement)("roxy-kp-ruling-planets")],Fa);var de=require("lit"),Jn=require("lit/decorators.js");var Pr=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),a=e.trigram;return de.html`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?de.html`<span class="group">${this.t("{{direction}} group",{direction:ge(t,"facing",H(e.group))})}</span>`:de.nothing}</header><div class="facts" part="details">${a?de.html`<span><span class="lbl">${this.t("Trigram")}</span> <span lang="zh">${a.chinese??""}</span> ${a.symbol??""} <b>${a.english??""}</b> ${a.element??""}</span>`:de.nothing} ${a?.familyMember?de.html`<span><span class="lbl">${this.t("Role")}</span>${a.familyMember}</span>`:de.nothing} ${"solarYear"in e&&typeof e.solarYear=="number"?de.html`<span class="solar-year"><span class="lbl">${this.t("Year")}</span><b>${sr(t,String(e.solarYear),"year")}</b></span>`:de.nothing} ${"gender"in e&&e.gender?de.html`<span class="formula-gender"><span class="lbl">${Pe(t,"gender")}</span>${ge(t,"gender",e.gender)}</span>`:de.nothing} ${"boundaryDate"in e&&e.boundaryDate?de.html`<span>${this.t("Year boundary")} ${A(t,e.boundaryDate)}</span>`:de.nothing} ${"reassigned"in e&&e.reassigned?de.html`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:de.nothing} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${jn.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?fr(e.conventions,this.translator,this.effectiveLang()):de.nothing}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return de.nothing;let t=this.effectiveLang();return de.html`${e.bestSector?de.html`<span><span class="lbl">${this.t("Best")}</span><b>${ge(t,"facing",e.bestSector)}</b></span>`:de.nothing} ${e.worstSector?de.html`<span><span class="lbl">${this.t("Worst")}</span><b>${ge(t,"facing",e.worstSector)}</b></span>`:de.nothing}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):ge(e,"facing",t)}renderSector(e,t){let a=this.effectiveLang(),s=this.sectorHeading(a,t);if(t==="Center")return de.html`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol">${e.trigram?.symbol??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let o=(e.sectors??[]).find(l=>l.direction===t);if(!o)return de.html`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let i=o.nature==="auspicious";return de.html`<div class="sector ${i?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${y(o,"starName")}</span> ${"chinese"in o&&o.chinese?de.html`<span class="star-hanzi" lang="zh">${o.chinese}</span>`:de.nothing} <span class="domain">${o.domain??""}</span> ${typeof o.rank=="number"?de.html`<span class="rank">${i?this.t("Rank"):this.t("Severity")} ${o.rank}</span>`:de.nothing}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return de.nothing;let a=this.effectiveLang(),s=t.map(o=>{let i=this.mode==="mansions"&&"reading"in o?o.reading:void 0;return!i||this.hideReadings?de.nothing:de.html`<li class="row" part="label-track"><span class="row-name">${this.sectorHeading(a,o.direction??"")}</span><div class="row-body"><span>${y(o,"starName")}</span><p part="reading">${i}</p></div></li>`});return s.every(o=>o===de.nothing)?de.nothing:de.html`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};Pr.styles=[u,ee,Kn,Tr,de.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.group{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.plate{background:var(--roxy-border,#e4e4e7);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;display:grid;overflow:hidden}.sector{background:var(--roxy-surface,#fff);padding:var(--roxy-space-sm,.5rem);text-align:center;align-content:start;gap:.1rem;min-height:5.5rem;display:grid}.sector-good .sector-name,.sector-bad .sector-name,.sector-self .sector-name,.sector-good .rank,.sector-bad .rank{color:var(--roxy-secondary,#475569)}.sector-good .star-hanzi,.sector-bad .star-hanzi{color:var(--roxy-fg,#0a0a0a)}.sector-good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, var(--roxy-surface,#fff))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, var(--roxy-surface,#fff))}.sector-self{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, var(--roxy-surface,#fff))}.star-name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.star-hanzi{font-size:var(--roxy-text-base,1rem);color:var(--roxy-accent-ink,#b45309)}.domain{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569)}.rank{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.centre{align-content:center;gap:.1rem;display:grid}.kua-number{font-size:2rem;line-height:1;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.trigram-symbol{color:var(--roxy-accent-ink,#b45309);font-size:1.5rem;line-height:1.1}@container (width<=30rem){.plate{background:var(--roxy-surface,#fff);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm,.5rem);text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";align-content:start;row-gap:.15rem;min-height:auto;display:grid}.sector:last-child{border-bottom:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:right;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:right;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-good{background:var(--roxy-success,#16a34a)}.swatch-bad{background:var(--roxy-danger,#dc2626)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.rows{margin:0;padding:0;list-style:none;display:grid}.row{border-top:1px solid var(--roxy-border,#e4e4e7);padding-block:var(--roxy-space-sm,.5rem);gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);align-items:baseline}.row:first-child{border-top:0;padding-top:0}.row-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a)}.row-body p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}`],m([(0,Jn.property)({type:String,reflect:!0})],Pr.prototype,"mode",2),Pr=m([(0,Jn.customElement)("roxy-kua-card")],Pr);var Je=require("lit"),mc=require("lit/decorators.js");var hi=320,Bt=hi/2,pr=128,jh=118,pc=137,Kh=152,Vh=.95,qh={glyph:11},Yh=qh.glyph;function mr(n,r){let e=n*Math.PI/180;return{x:Bt+r*Math.sin(e),y:Bt-r*Math.cos(e)}}var Uh=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],Ha=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this)}renderData(e){let t=e.bodies??[],a=e.birthDetails;return Je.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Local space")}</h2>${a?Je.html`<div class="meta">${he(this.effectiveLang(),a.date,a.time)}</div>`:Je.nothing}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary?Je.html`<p class="summary">${e.summary}</p>`:Je.nothing} ${this.renderList(t)}</div>`}renderDial(e){return Je.html`<svg viewBox="0 0 ${hi} ${hi}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${Bt}" cy="${Bt}" r="${pr}"/><circle class="dial" cx="${Bt}" cy="${Bt}" r="${pr*.66}" stroke-width="0.5"/><circle class="dial" cx="${Bt}" cy="${Bt}" r="${pr*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Bt}" cy="${Bt}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=mr(l,pr),p=mr(l,pr-(l%45===0?8:4));e.push(Je.svg`<line class="tick" x1=${p.x} y1=${p.y} x2=${c.x} y2=${c.y} />`)}let t=mr(0,pr),a=mr(180,pr),s=mr(90,pr),o=mr(270,pr),i=Uh.map(({az:l,source:c})=>{let p=mr(l,Kh),d=l%90===0;return Je.svg`<text class=${`compass-label${d?" cardinal":""}`} x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Je.svg`
99
99
  <line class="cardinal-axis" x1=${t.x} y1=${t.y} x2=${a.x} y2=${a.y} />
100
100
  <line class="cardinal-axis" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} />
101
- ${e}${i}`}renderSpokes(e){let t=e.map((s,o)=>({b:s,i:o})),a=zt(Kh*qh,cc);return It(t,({b:s})=>s.azimuth,a).map(({item:s,displayLongitude:o})=>{let{b:i,i:l}=s,c=la(i.planet,l),p=i.aboveHorizon===!1,d=mr(i.azimuth,Hh),h=mr(o,cc),b=i.symbol||R(i.planet)||i.planet,L=`${i.altitude>0?"+":""}${Math.round(i.altitude)}°`;return Je.svg`<g>
101
+ ${e}${i}`}renderSpokes(e){let t=e.map((s,o)=>({b:s,i:o})),a=zt(Vh*Yh,pc);return It(t,({b:s})=>s.azimuth,a).map(({item:s,displayLongitude:o})=>{let{b:i,i:l}=s,c=la(i.planet,l),p=i.aboveHorizon===!1,d=mr(i.azimuth,jh),h=mr(o,pc),b=i.symbol||R(i.planet)||i.planet,L=`${i.altitude>0?"+":""}${Math.round(i.altitude)}°`;return Je.svg`<g>
102
102
  <line class=${`spoke${p?" below":""}`} stroke=${c} x1=${Bt} y1=${Bt} x2=${d.x} y2=${d.y}><title>${this.t("{{planet}} {{direction}} {{azimuth}}° altitude {{altitude}}",{planet:i.planet,direction:i.compassDirection,azimuth:Math.round(i.azimuth),altitude:L})}</title></line>
103
103
  <text class=${`body-glyph${p?" below":""}`} fill=${c} x=${h.x} y=${h.y} text-anchor="middle" dominant-baseline="central">${b}</text>
104
- </g>`})}renderList(e){return e.length===0?Je.nothing:Je.html`<div class="table-scroll" part="table"><table class="list"><caption class="roxy-sr-only">${this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((t,a)=>{let s=la(t.planet,a),o=t.aboveHorizon===!1;return Je.html`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${s}`}"></span> ${t.symbol?Je.html`${t.symbol}`:Je.nothing}${t.planet}</span></td><td>${t.compassDirection}</td><td class="num">${Math.round(t.azimuth)}°</td><td class="num">${t.altitude>0?"+":""}${Math.round(t.altitude)}°</td><td><span class="${`horizon-pill ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};Ha.styles=[u,Ue,Je.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,480px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border,#e4e4e7)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border,#e4e4e7) 10%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border,#e4e4e7);stroke-width:.5px}.tick{stroke:var(--roxy-secondary,#475569);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary,#475569);font-size:9px;font-weight:600;font-family:var(--roxy-font-sans)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg,#0a0a0a)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:11px;font-weight:600;font-family:var(--roxy-font-sans)}.body-glyph.below{opacity:.45}.wrap>*{min-width:0}.table-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.list{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}.list th,.list td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:4px 8px}.list th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}.list td.num{text-align:right;font-variant-numeric:tabular-nums}.body-cell{align-items:center;gap:.4rem;display:inline-flex}.body-dot{border-radius:50%;flex-shrink:0;width:10px;height:10px}.horizon-pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:1px 7px}.horizon-pill.up{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.horizon-pill.down{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a)}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}`],Ha=m([(0,pc.customElement)("roxy-local-space-compass")],Ha);var vt=require("lit"),ut=require("lit/decorators.js");var at=class extends ur{constructor(){super(...arguments);this.endpoint=`${js}/location/search`;this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=!1;this.isLoading=!1;this.highlight=-1;this.error=null;this.debouncedFetch=Nn(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=!1,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=!1)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=Xr(this.publishableKey??this.apiKey);t&&!this.refusal&&rs(this,t,{warn:!0}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=!0;try{let a=new URL(this.endpoint,document.baseURI);a.searchParams.set("q",e),a.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let o=this.publishableKey??this.apiKey;o&&(s["X-API-Key"]=o);let i=await fetch(a,{headers:s,signal:t.signal});if(!i.ok)throw new Error(await Ki(i));let l=await i.json();if(t.signal.aborted)return;this.error=null,this.results=l.cities??[],this.isOpen=!0,this.highlight=this.results.length>0?0:-1}catch(a){if(a?.name==="AbortError")return;this.results=[],this.isOpen=!1,this.highlight=-1,this.error=a instanceof Error?a.message:String(a)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=!1)}}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=!1,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:!0,composed:!0}))}render(){return this.refusal?vt.html`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:vt.html`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=!0)}}"> ${this.isLoading?vt.html`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:vt.nothing} ${this.isOpen?vt.html`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?vt.html`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>vt.html`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?vt.html`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:vt.nothing}</div>${this.error?vt.html`<p class="search-error" role="alert">${this.t(this.error)}</p>`:vt.nothing}`}};at.styles=[u,_n,vt.css`:host{display:block;position:relative}.field{position:relative}input{width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));box-sizing:border-box;font-family:inherit}input:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.option .city{font-weight:var(--roxy-weight-bold,600)}.option .where{color:var(--roxy-muted,#71717a);flex-grow:1}.option .tz{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs,.25rem) 0 0;color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem)}`],m([(0,ut.property)({type:String,attribute:"api-key"})],at.prototype,"apiKey",2),m([(0,ut.property)({type:String,attribute:"publishable-key"})],at.prototype,"publishableKey",2),m([(0,ut.property)({type:String})],at.prototype,"endpoint",2),m([(0,ut.property)({type:String})],at.prototype,"placeholder",2),m([(0,ut.property)({type:String,attribute:"default-value"})],at.prototype,"defaultValue",2),m([(0,ut.state)()],at.prototype,"query",2),m([(0,ut.state)()],at.prototype,"results",2),m([(0,ut.state)()],at.prototype,"isOpen",2),m([(0,ut.state)()],at.prototype,"isLoading",2),m([(0,ut.state)()],at.prototype,"highlight",2),m([(0,ut.state)()],at.prototype,"refusal",2),m([(0,ut.state)()],at.prototype,"error",2),at=m([(0,ut.customElement)("roxy-location-search")],at);var Ie=require("lit"),hc=require("lit/decorators.js");var mc={forward:"Forward",reverse:"Backward"},ja=class extends g{renderData(r){let e=this.effectiveLang();return Ie.html`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${r.direction?Ie.html`<span><span class="lbl">${this.t("Direction")}</span><b>${mc[r.direction]?this.t(mc[r.direction]):r.direction}</b></span>`:Ie.nothing} ${typeof r.startAge=="number"?Ie.html`<span><span class="lbl">${this.t("Starts")}</span><b>${this.ageLabel(e,r.startAge,r.startAgeMonths)}</b></span>`:Ie.nothing} ${r.boundaryTerm?Ie.html`<span><span class="lbl">${this.t("Counted to")}</span>${ge(e,"boundaryTerm",r.boundaryTerm)}</span>`:Ie.nothing} ${typeof r.daysToTerm=="number"?Ie.html`<span><span class="lbl">${this.t("Days")}</span>${j(e,r.daysToTerm)}</span>`:Ie.nothing} ${r.gender?Ie.html`<span><span class="lbl">${this.t("Formula")}</span>${ge(e,"gender",r.gender)}</span>`:Ie.nothing}</div>${this.renderStrip(r,e)} ${this.renderAnnuals(r)} ${r.summary&&!this.hideReadings?Ie.html`<p class="summary" part="section summary">${r.summary}</p>`:Ie.nothing} ${fr(r.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(r,e,t){let a=j(r,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:a,months:j(r,t)}):this.t("{{years}} yrs",{years:a})}renderStrip(r,e){let t=r.luckPillars??[];return t.length===0?Ie.nothing:Ie.html`<div class="strip-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(a=>Ie.html`<div class="pillar" part="pillar"><span class="ages">${this.t("{{start}} to {{end}}",{start:j(e,a.startAge??0),end:j(e,a.endAge??0)})}</span> <span class="god">${y(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} ${y(a.stem,"element")}</span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${y(a.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(a.startYear??""),end:String(a.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(r){let e=r.annualPillars??[];return e.length===0?Ie.nothing:Ie.html`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><div class="annuals">${e.map(t=>Ie.html`<span class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${y(t.tenGod,"name")}</span></span>`)}</div></section>`}};ja.styles=[u,ee,Ie.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.strip-wrap{overflow-x:auto}.strip{gap:var(--roxy-space-sm,.5rem);min-width:min-content;display:flex}.pillar{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;flex:none;align-content:start;gap:.2rem;min-width:6rem;display:grid}.ages{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.god{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);min-height:1.2em}.hanzi{color:var(--roxy-fg,#0a0a0a);font-size:1.75rem;line-height:1.15}.hanzi-branch{color:var(--roxy-accent-ink,#b45309)}.romanised{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.years{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.annuals{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.annual{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-xs,.75rem);align-items:baseline;gap:.35rem;padding:2px 8px;display:flex}.annual .yr{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600)}.summary{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}`],ja=m([(0,hc.customElement)("roxy-luck-pillars")],ja);var P=require("lit"),Qn=require("lit/decorators.js");var Uh={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Zh={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Wh=13;function gc(n){return"tzolkin"in n}var _r=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),a=this.mode==="chart"&&gc(e)?e:void 0,s=gc(e)?e.tzolkin:e,o=s?.reading,i=o?.numberBand?Uh[o.numberBand]:void 0;return P.html`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?P.html`<div class="coefficient">${j(t,s.number)}</div>`:P.nothing}<div><p class="lbl">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?P.html`<span><span class="lbl">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:P.nothing} ${s?.daySignKiche?P.html`<span><span class="lbl">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:P.nothing}</p></div></header><div class="facts" part="details">${e.date?P.html`<span><span class="lbl">${this.t("Date")}</span><b>${A(t,e.date)}</b></span>`:P.nothing} ${this.renderTrecena(t,s?.trecena)} ${a?this.renderHaabFact(t,a.haab):P.nothing} ${a?.longCount?.formatted?P.html`<span><span class="lbl">${this.t("Long Count")}</span><b>${a.longCount.formatted}</b></span>`:P.nothing} ${a?.calendarRound?P.html`<span><span class="lbl">${this.t("Calendar Round")}</span><b>${a.calendarRound}</b></span>`:P.nothing} ${a?.yearBearer?.daySignName?P.html`<span><span class="lbl">${this.t("Year Bearer")}</span><b>${j(t,a.yearBearer.number)} ${a.yearBearer.daySignName}</b></span>`:P.nothing} ${a?.lordOfNight?.label?P.html`<span><span class="lbl">${this.t("Lord of the Night")}</span><b>${a.lordOfNight.label}</b></span>`:P.nothing} ${i?P.html`<span><span class="lbl">${this.t("Character of the number")}</span><span class="band">${this.t(i)}</span></span>`:P.nothing} ${e.conventions?.correlation?P.html`<span><span class="lbl">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${ge(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:P.nothing}</div>${o?.keynote&&!this.hideReadings?P.html`<p class="keynote" part="reading">${o.keynote}</p>`:P.nothing} ${this.renderLists(o)} ${this.renderInterpretation(this.sections(a,o),"mayan-day")} ${this.renderCross(t,a?.cross)} ${a?.summary&&!this.hideReadings?P.html`<p class="summary" part="reading">${a.summary}</p>`:P.nothing}</article>`}renderTrecena(e,t){return t?P.html`<span><span class="lbl">${this.t("Trecena")}</span><b>${j(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:j(e,t.dayOfTrecena),total:j(e,Wh)}):P.nothing} ${t.rulingSignName?P.html`· <span class="lbl">${this.t("Ruling sign")}</span>${t.rulingSignName}`:P.nothing}</span>`:P.nothing}renderHaabFact(e,t){return t?.monthName?P.html`<span><span class="lbl">${this.t("Haab")}</span><b>${j(e,t.day)} ${t.monthName}</b> ${t.monthClassic?P.html`(${t.monthClassic})`:P.nothing} ${typeof t.dayOfYear=="number"?P.html`· <span class="lbl">${this.t("Day of year")}</span>${j(e,t.dayOfYear)}`:P.nothing}</span>`:P.nothing}renderLists(e){let t=e?.strengths??[],a=e?.challenges??[];return this.hideReadings||t.length===0&&a.length===0?P.nothing:P.html`<div class="lists" part="section readings">${t.length>0?P.html`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>P.html`<li>${s}</li>`)}</ul></div>`:P.nothing} ${a.length>0?P.html`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${a.map(s=>P.html`<li>${s}</li>`)}</ul></div>`:P.nothing}</div>`}sections(e,t){let a=[];return t?.numberReading&&a.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&a.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&a.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&a.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&a.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),a}crossLabel(e){let t=Zh[e??""];return t?this.t(t):D(e??"")}renderCross(e,t){let a=t??[];return a.length===0?P.nothing:P.html`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${a.map(s=>P.html`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${j(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${j(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?P.html`(${s.daySignKiche})`:P.nothing} ${s.reading&&!this.hideReadings?P.html`<p part="reading">${s.reading}</p>`:P.nothing}</td></tr>`)}</tbody></table></div></section>`}};_r.styles=[u,me,Sr,P.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.coefficient{font-size:2.75rem;line-height:1;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);flex-shrink:0}.hero>div:not(.coefficient){min-width:0}.title{font-size:var(--roxy-text-xl,1.25rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.spellings{gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;margin:.15rem 0 0;display:flex}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.band{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff));color:var(--roxy-fg,#0a0a0a);padding:.1rem .4rem;display:inline-block}.keynote{font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.summary{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);color:var(--roxy-secondary,#475569);margin:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0;padding-left:1.1rem}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);vertical-align:top;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}td.num{font-variant-numeric:tabular-nums;white-space:nowrap}td p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}`],m([(0,Qn.property)({type:String,reflect:!0})],_r.prototype,"mode",2),_r=m([(0,Qn.customElement)("roxy-mayan-day-sign")],_r);var Ge=require("lit"),eo=require("lit/decorators.js");var Nr=class extends g{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let a=ns(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Ge.html`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${a||this.t("Moon phase calendar")}</h2><div class="list" part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):Ge.nothing}renderSingle(e){let t=e.meaning?.symbol||uc(e.phase);return Ge.html`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header"><span class="emoji" aria-hidden="true">${t}</span><div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?Ge.html`<div class="date">${A(this.effectiveLang(),e.date)}</div>`:Ge.nothing}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Ge.html`<div><span>${this.t("Illumination")}</span> <strong>${_e(this.effectiveLang(),e.illumination,0)}</strong></div>`:Ge.nothing} ${typeof e.age=="number"?Ge.html`<div><span>${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:f(this.effectiveLang(),e.age,1)})}</strong></div>`:Ge.nothing} ${e.sign?Ge.html`<div><span>${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:Ge.nothing} ${typeof e.distance=="number"?Ge.html`<div><span>${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:f(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:Ge.nothing}</div>${e.meaning?.description&&!this.hideReadings?Ge.html`<p class="meaning">${e.meaning.description}</p>`:Ge.nothing} ${e.meaning?.keywords?.length&&!this.hideReadings?Ge.html`<div class="keywords">${e.meaning.keywords.map(a=>Ge.html`<span>${a}</span>`)}</div>`:Ge.nothing}</article>`}renderListItem(e){let t=uc(e.phase);return Ge.html`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${A(this.effectiveLang(),e.date)}</span></div>`}};Nr.styles=[u,Ge.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.emoji{font-size:3rem;line-height:1}.label{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.stats{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.stats div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.stats strong{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}.meaning{color:var(--roxy-fg,#0a0a0a)}.keywords{gap:var(--roxy-space-xs,.25rem);margin-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.keywords span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.list{gap:var(--roxy-space-sm,.5rem);display:grid}.list-item{gap:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem) 0;font-size:var(--roxy-text-sm,.875rem);grid-template-columns:2.5rem 1fr auto;align-items:center;display:grid}.list-item:last-child{border-bottom:none}`],m([(0,eo.property)({type:String,reflect:!0})],Nr.prototype,"mode",2),Nr=m([(0,eo.customElement)("roxy-moon-phase")],Nr);function uc(n){return ol(n)??"🌙"}var Ee=require("lit"),yc=require("lit/decorators.js");var Ka=class extends g{renderData(r){let e=r.remedies;return Ee.html`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:r.name})}"><header class="head" part="header"><h2 class="name">${r.name}</h2>${typeof r.number=="number"?Ee.html`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:r.number})}</span>`:Ee.nothing} ${r.range?Ee.html`<span class="range">${r.range}</span>`:Ee.nothing}</header><dl class="facts" part="details">${r.lord?Ee.html`<div class="fact"><dt>${this.t("Lord")}</dt><dd>${r.lord}</dd></div>`:Ee.nothing} ${r.deity?Ee.html`<div class="fact"><dt>${this.t("Deity")}</dt><dd>${r.deity}</dd></div>`:Ee.nothing} ${r.symbol?Ee.html`<div class="fact"><dt>${this.t("Symbol")}</dt><dd>${r.symbol}</dd></div>`:Ee.nothing}</dl>${r.characteristics&&!this.hideReadings?Ee.html`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${r.characteristics}</p></div>`:Ee.nothing} ${e&&!this.hideReadings?Ee.html`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?Ee.html`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:Ee.nothing} ${e.gemstones?Ee.html`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:Ee.nothing} ${e.rituals?Ee.html`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:Ee.nothing}</div></div>`:Ee.nothing}</article>`}};Ka.styles=[u,Ee.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.number{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600)}.range{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.section h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.section p{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.5}.remedies{gap:var(--roxy-space-xs,.25rem);display:grid}.remedy{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.remedy strong{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600)}`],Ka=m([(0,yc.customElement)("roxy-nakshatra-card")],Ka);var $=require("lit");var we=require("lit"),fc=require("lit/decorators.js");var Va=class extends g{rows(){let r=this.data;if(!r)return[];let e=(r.planets??[]).map(a=>({name:a.name,label:y(a,"name"),sign:a.sign,signLabel:y(a,"sign"),longitude:a.longitude,latitude:a.latitude,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,dignity:a.dignity})),t=[["Ascendant",r.ascendant],["Midheaven",r.midheaven],["Part of Fortune",r.partOfFortune],["Vertex",r.vertex]];for(let[a,s]of t)s&&e.push({name:a,label:this.t(a),sign:s.sign,signLabel:y(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(r){if(!r.planets)return this.renderEmpty();let e=this.rows(),t=r.birthDetails,a=e.some(i=>Number.isFinite(i.latitude)),s=e.some(i=>i.sect),o=["latitude","longitude","timezone"];return we.html`<div class="wrap" part="card" aria-label="${this.t("Western planetary positions")}" tabindex="0"><header class="head" part="header"><h2 class="title">${this.t("Planetary positions")}</h2>${t?we.html`<div part="details"><p class="birth-date">${he(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${o.map(i=>we.html`<div><dt>${Pe(this.effectiveLang(),i)}</dt><dd>${f(this.effectiveLang(),t[i],5)}</dd></div>`)}</dl></div>`:we.nothing}</header><table role="table" part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${a?we.html`<th scope="col">${Pe(this.effectiveLang(),"latitude")}</th>`:we.nothing}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?we.html`<th scope="col">${this.t("Sect")}</th>`:we.nothing}</tr></thead><tbody>${e.map(i=>{let l=R(i.name)??"",c=i.sect==="day"?this.t("Daytime"):i.sect==="night"?this.t("Night"):"",p=Z(i.sign)??"",d=typeof i.speed=="number"?f(this.effectiveLang(),i.speed,6):"";return we.html`<tr class="${i.isPoint?"point":""}"><td class="body">${l?we.html`<span class="glyph">${l}</span>`:we.nothing}${i.label}</td><td>${p?we.html`<span class="glyph">${p}</span>`:we.nothing}${i.signLabel??""}</td><td class="num">${typeof i.longitude=="number"?it(i.longitude,i.signLabel):""}</td><td class="num">${typeof i.longitude=="number"?`${f(this.effectiveLang(),i.longitude,5)}°`:we.nothing}</td>${a?we.html`<td class="num">${typeof i.latitude=="number"?`${f(this.effectiveLang(),i.latitude,5)}°`:we.nothing}</td>`:we.nothing}<td class="num">${typeof i.house=="number"?i.house:""}</td><td class="dignity">${i.dignity?H(i.dignity):""}</td><td class="num">${d?we.html`${d}${this.t("°/day")}`:we.nothing} ${i.isRetrograde?we.html`<span class="retro">℞</span>`:we.nothing}</td>${s?we.html`<td>${c}</td>`:we.nothing}</tr>`})}</tbody></table>${r.houses?.length?we.html`<details class="head" part="section houses"><summary>${this.t("Houses")}</summary><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${r.houses.map(i=>we.html`<tr><th scope="row">${f(this.effectiveLang(),i.number,0)}</th><td>${y(i,"sign")}</td><td>${it(i.longitude,y(i,"sign"))}</td><td>${f(this.effectiveLang(),i.longitude,5)}°</td></tr>`)}</tbody></table></details>`:we.nothing}</div>`}};Va.styles=[u,ds,we.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{overflow-wrap:anywhere;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.birth-date{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:460px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.point{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent)}td.body{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.retro{color:var(--roxy-danger,#dc2626);font-weight:var(--roxy-weight-bold,600)}.num{font-variant-numeric:tabular-nums}`],Va=m([(0,fc.customElement)("roxy-western-planets-table")],Va);var fs=require("lit/decorators.js"),yi=require("lit/directives/if-defined.js");var vc=require("lit"),gs=vc.css`.aspect{stroke-width:.8px;fill:none;opacity:.55}.aspect-trine,.aspect-sextile{stroke:var(--roxy-success,#16a34a)}.aspect-square,.aspect-opposition{stroke:var(--roxy-danger,#dc2626)}.aspect-conjunction{stroke:var(--roxy-accent-ink,#b45309)}.aspect-other{stroke:var(--roxy-muted,#71717a);stroke-opacity:.7}`,xc=.3,Xh=.9,bc=.5,Jh=1.8;function us(n){let{strength:r}=n;if(typeof r!="number"||!Number.isFinite(r))return;let e=Math.min(1,Math.max(0,r/100)),t=xc+e*(Xh-xc),a=bc+e*(Jh-bc);return`opacity:${t.toFixed(3)};stroke-width:${a.toFixed(3)}`}var Ir=class{constructor(r,e){this.host=r,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),r.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let r=!1;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],a=Qh(this.host.renderRoot,t,this.size[e]);a!==this.size[e]&&(this.size[e]=a,r=!0)}r&&this.host.requestUpdate()}};function Qh(n,r,e){let t=n?.querySelector(r);if(!t||typeof getComputedStyle!="function")return e;let a=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(a)&&a>0?a:e}var Lc={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},fi=540,U=fi/2,ys=220,hi=202,Ms=174,Es=144,eg=232,gi=249,ui={glyph:14,degree:7},tg=.95,rg=3.4,ag=1.85,sg=1.25,ng=.9,og=28,ig=13,to=84,hr=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.heading="Natal chart";this.view="wheel";this.type=new Ir(this,{glyph:[".planet-glyph",ui.glyph],degree:[".planet-deg",ui.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let t=this.getPlanets(),a=e.aspects??[],s=this.view;return $.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2>${e.birthDetails?$.html`<div class="meta">${he(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</div>`:$.nothing}</header>${a.length>0?$.html`${pt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:o=>{this.view=o},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(t,a):this.renderAspectGrid(t,a)}</div>`:this.renderWheel(t,a)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${f(this.effectiveLang(),t.length,0)}</span> ${a.length>0?$.html`<span>${this.t("{{count}} aspects",{count:a.length})}</span>`:$.nothing} ${this.hasCusps&&e.houseSystem?$.html`<span>${this.t("{{system}} houses",{system:e.houseSystem})}</span>`:$.html`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${a.length>0?$.html`<span><span class="legend-swatch" style="background:var(--roxy-success)"></span>${this.t("Harmonious aspects")}</span> <span><span class="legend-swatch" style="background:var(--roxy-danger)"></span>${this.t("Challenging aspects")}</span>`:$.nothing}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(a)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport($.html`<svg viewBox="0 0 ${fi} ${fi}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${U}" cy="${U}" r="${ys}" stroke-width="1.5"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${hi-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${Ms}" stroke-width="1"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${to}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,t)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,t){let a=e.map(i=>({name:i.name,label:y(i,"name")})),s=(i,l)=>[Ft(i),Ft(l)].sort().join("|"),o=new Map;for(let i of t)o.set(s(i.planet1,i.planet2),i);return a.length===0?$.html`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:$.html`<div class="grid-scroll" part="section aspects table aspect-grid"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><th></th>${a.slice(0,-1).map(i=>{let l=R(i.name)??i.label;return $.html`<th scope="col" title="${i.label}">${l}</th>`})}</tr></thead><tbody>${a.slice(1).map((i,l)=>{let c=R(i.name)??i.label;return $.html`<tr><th scope="row" title="${i.label}">${c}</th>${a.slice(0,l+1).map(p=>{let d=o.get(s(i.name,p.name));if(!d)return $.html`<td class="empty"></td>`;let h=$t(d),b=ls(h)??y(d,"type",Ke(d)),L=Ht[h]??"aspect-other",v=f(this.effectiveLang(),d.orb,1);return $.html`<td class="${`cell ${L}`}" title="${`${i.label} ${y(d,"type",h)} ${p.label}${v?` (${this.t("Orb")} ${v}°)`:""}`}"><span class="asp">${b}</span></td>`})} ${a.slice(l+1,-1).map(()=>$.html`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),a=[{longitude:e,label:this.t("ASC")},{longitude:ks(e),label:this.t("DSC")}];t!==null&&(a.push({longitude:t,label:this.t("MC")}),a.push({longitude:ks(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&a.push({longitude:At(s),label:this.t("PoF")});let o=this.data?.vertex?.longitude;return typeof o=="number"&&a.push({longitude:At(o),label:this.t("Vtx")}),It(a,i=>i.longitude,zt(og,gi)).map(({item:i,longitude:l,displayLongitude:c})=>this.renderAngleMark(l,c,i.label))}renderAngleMark(e,t,a){let s=this.toAngle(e),o=this.toAngle(t),i=B(U,U,ys,s),l=B(U,U,eg,s),c=B(U,U,gi,o),p=Math.abs(t-e)>.5,d=B(U,U,gi-8,o);return $.svg`
104
+ </g>`})}renderList(e){return e.length===0?Je.nothing:Je.html`<div class="table-scroll" part="table"><table class="list"><caption class="roxy-sr-only">${this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((t,a)=>{let s=la(t.planet,a),o=t.aboveHorizon===!1;return Je.html`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${s}`}"></span> ${t.symbol?Je.html`${t.symbol}`:Je.nothing}${t.planet}</span></td><td>${t.compassDirection}</td><td class="num">${Math.round(t.azimuth)}°</td><td class="num">${t.altitude>0?"+":""}${Math.round(t.altitude)}°</td><td><span class="${`horizon-pill ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};Ha.styles=[u,Ue,Je.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,480px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border,#e4e4e7)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border,#e4e4e7) 10%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border,#e4e4e7);stroke-width:.5px}.tick{stroke:var(--roxy-secondary,#475569);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary,#475569);font-size:9px;font-weight:600;font-family:var(--roxy-font-sans)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg,#0a0a0a)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:11px;font-weight:600;font-family:var(--roxy-font-sans)}.body-glyph.below{opacity:.45}.wrap>*{min-width:0}.table-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.list{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}.list th,.list td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:4px 8px}.list th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}.list td.num{text-align:right;font-variant-numeric:tabular-nums}.body-cell{align-items:center;gap:.4rem;display:inline-flex}.body-dot{border-radius:50%;flex-shrink:0;width:10px;height:10px}.horizon-pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:1px 7px}.horizon-pill.up{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.horizon-pill.down{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a)}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}`],Ha=m([(0,mc.customElement)("roxy-local-space-compass")],Ha);var vt=require("lit"),ut=require("lit/decorators.js");var at=class extends ur{constructor(){super(...arguments);this.endpoint=`${js}/location/search`;this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=!1;this.isLoading=!1;this.highlight=-1;this.error=null;this.debouncedFetch=Nn(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=!1,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=!1)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=Xr(this.publishableKey??this.apiKey);t&&!this.refusal&&rs(this,t,{warn:!0}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=!0;try{let a=new URL(this.endpoint,document.baseURI);a.searchParams.set("q",e),a.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let o=this.publishableKey??this.apiKey;o&&(s["X-API-Key"]=o);let i=await fetch(a,{headers:s,signal:t.signal});if(!i.ok)throw new Error(await Vi(i));let l=await i.json();if(t.signal.aborted)return;this.error=null,this.results=l.cities??[],this.isOpen=!0,this.highlight=this.results.length>0?0:-1}catch(a){if(a?.name==="AbortError")return;this.results=[],this.isOpen=!1,this.highlight=-1,this.error=a instanceof Error?a.message:String(a)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=!1)}}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=!1,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:!0,composed:!0}))}render(){return this.refusal?vt.html`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:vt.html`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=!0)}}"> ${this.isLoading?vt.html`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:vt.nothing} ${this.isOpen?vt.html`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?vt.html`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>vt.html`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?vt.html`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:vt.nothing}</div>${this.error?vt.html`<p class="search-error" role="alert">${this.t(this.error)}</p>`:vt.nothing}`}};at.styles=[u,_n,vt.css`:host{display:block;position:relative}.field{position:relative}input{width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));box-sizing:border-box;font-family:inherit}input:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.option .city{font-weight:var(--roxy-weight-bold,600)}.option .where{color:var(--roxy-muted,#71717a);flex-grow:1}.option .tz{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs,.25rem) 0 0;color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem)}`],m([(0,ut.property)({type:String,attribute:"api-key"})],at.prototype,"apiKey",2),m([(0,ut.property)({type:String,attribute:"publishable-key"})],at.prototype,"publishableKey",2),m([(0,ut.property)({type:String})],at.prototype,"endpoint",2),m([(0,ut.property)({type:String})],at.prototype,"placeholder",2),m([(0,ut.property)({type:String,attribute:"default-value"})],at.prototype,"defaultValue",2),m([(0,ut.state)()],at.prototype,"query",2),m([(0,ut.state)()],at.prototype,"results",2),m([(0,ut.state)()],at.prototype,"isOpen",2),m([(0,ut.state)()],at.prototype,"isLoading",2),m([(0,ut.state)()],at.prototype,"highlight",2),m([(0,ut.state)()],at.prototype,"refusal",2),m([(0,ut.state)()],at.prototype,"error",2),at=m([(0,ut.customElement)("roxy-location-search")],at);var Ie=require("lit"),gc=require("lit/decorators.js");var hc={forward:"Forward",reverse:"Backward"},ja=class extends g{renderData(r){let e=this.effectiveLang();return Ie.html`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${r.direction?Ie.html`<span><span class="lbl">${this.t("Direction")}</span><b>${hc[r.direction]?this.t(hc[r.direction]):r.direction}</b></span>`:Ie.nothing} ${typeof r.startAge=="number"?Ie.html`<span><span class="lbl">${this.t("Starts")}</span><b>${this.ageLabel(e,r.startAge,r.startAgeMonths)}</b></span>`:Ie.nothing} ${r.boundaryTerm?Ie.html`<span><span class="lbl">${this.t("Counted to")}</span>${ge(e,"boundaryTerm",r.boundaryTerm)}</span>`:Ie.nothing} ${typeof r.daysToTerm=="number"?Ie.html`<span><span class="lbl">${this.t("Days")}</span>${j(e,r.daysToTerm)}</span>`:Ie.nothing} ${r.gender?Ie.html`<span><span class="lbl">${this.t("Formula")}</span>${ge(e,"gender",r.gender)}</span>`:Ie.nothing}</div>${this.renderStrip(r,e)} ${this.renderAnnuals(r)} ${r.summary&&!this.hideReadings?Ie.html`<p class="summary" part="section summary">${r.summary}</p>`:Ie.nothing} ${fr(r.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(r,e,t){let a=j(r,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:a,months:j(r,t)}):this.t("{{years}} yrs",{years:a})}renderStrip(r,e){let t=r.luckPillars??[];return t.length===0?Ie.nothing:Ie.html`<div class="strip-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(a=>Ie.html`<div class="pillar" part="pillar"><span class="ages">${this.t("{{start}} to {{end}}",{start:j(e,a.startAge??0),end:j(e,a.endAge??0)})}</span> <span class="god">${y(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} ${y(a.stem,"element")}</span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${y(a.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(a.startYear??""),end:String(a.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(r){let e=r.annualPillars??[];return e.length===0?Ie.nothing:Ie.html`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><div class="annuals">${e.map(t=>Ie.html`<span class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${y(t.tenGod,"name")}</span></span>`)}</div></section>`}};ja.styles=[u,ee,Ie.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.strip-wrap{overflow-x:auto}.strip{gap:var(--roxy-space-sm,.5rem);min-width:min-content;display:flex}.pillar{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;flex:none;align-content:start;gap:.2rem;min-width:6rem;display:grid}.ages{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.god{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);min-height:1.2em}.hanzi{color:var(--roxy-fg,#0a0a0a);font-size:1.75rem;line-height:1.15}.hanzi-branch{color:var(--roxy-accent-ink,#b45309)}.romanised{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a)}.years{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.annuals{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.annual{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-xs,.75rem);align-items:baseline;gap:.35rem;padding:2px 8px;display:flex}.annual .yr{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600)}.summary{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}`],ja=m([(0,gc.customElement)("roxy-luck-pillars")],ja);var P=require("lit"),Qn=require("lit/decorators.js");var Zh={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Wh={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Xh=13;function uc(n){return"tzolkin"in n}var _r=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),a=this.mode==="chart"&&uc(e)?e:void 0,s=uc(e)?e.tzolkin:e,o=s?.reading,i=o?.numberBand?Zh[o.numberBand]:void 0;return P.html`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?P.html`<div class="coefficient">${j(t,s.number)}</div>`:P.nothing}<div><p class="lbl">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?P.html`<span><span class="lbl">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:P.nothing} ${s?.daySignKiche?P.html`<span><span class="lbl">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:P.nothing}</p></div></header><div class="facts" part="details">${e.date?P.html`<span><span class="lbl">${this.t("Date")}</span><b>${A(t,e.date)}</b></span>`:P.nothing} ${this.renderTrecena(t,s?.trecena)} ${a?this.renderHaabFact(t,a.haab):P.nothing} ${a?.longCount?.formatted?P.html`<span><span class="lbl">${this.t("Long Count")}</span><b>${a.longCount.formatted}</b></span>`:P.nothing} ${a?.calendarRound?P.html`<span><span class="lbl">${this.t("Calendar Round")}</span><b>${a.calendarRound}</b></span>`:P.nothing} ${a?.yearBearer?.daySignName?P.html`<span><span class="lbl">${this.t("Year Bearer")}</span><b>${j(t,a.yearBearer.number)} ${a.yearBearer.daySignName}</b></span>`:P.nothing} ${a?.lordOfNight?.label?P.html`<span><span class="lbl">${this.t("Lord of the Night")}</span><b>${a.lordOfNight.label}</b></span>`:P.nothing} ${i?P.html`<span><span class="lbl">${this.t("Character of the number")}</span><span class="band">${this.t(i)}</span></span>`:P.nothing} ${e.conventions?.correlation?P.html`<span><span class="lbl">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${ge(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:P.nothing}</div>${o?.keynote&&!this.hideReadings?P.html`<p class="keynote" part="reading">${o.keynote}</p>`:P.nothing} ${this.renderLists(o)} ${this.renderInterpretation(this.sections(a,o),"mayan-day")} ${this.renderCross(t,a?.cross)} ${a?.summary&&!this.hideReadings?P.html`<p class="summary" part="reading">${a.summary}</p>`:P.nothing}</article>`}renderTrecena(e,t){return t?P.html`<span><span class="lbl">${this.t("Trecena")}</span><b>${j(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:j(e,t.dayOfTrecena),total:j(e,Xh)}):P.nothing} ${t.rulingSignName?P.html`· <span class="lbl">${this.t("Ruling sign")}</span>${t.rulingSignName}`:P.nothing}</span>`:P.nothing}renderHaabFact(e,t){return t?.monthName?P.html`<span><span class="lbl">${this.t("Haab")}</span><b>${j(e,t.day)} ${t.monthName}</b> ${t.monthClassic?P.html`(${t.monthClassic})`:P.nothing} ${typeof t.dayOfYear=="number"?P.html`· <span class="lbl">${this.t("Day of year")}</span>${j(e,t.dayOfYear)}`:P.nothing}</span>`:P.nothing}renderLists(e){let t=e?.strengths??[],a=e?.challenges??[];return this.hideReadings||t.length===0&&a.length===0?P.nothing:P.html`<div class="lists" part="section readings">${t.length>0?P.html`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>P.html`<li>${s}</li>`)}</ul></div>`:P.nothing} ${a.length>0?P.html`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${a.map(s=>P.html`<li>${s}</li>`)}</ul></div>`:P.nothing}</div>`}sections(e,t){let a=[];return t?.numberReading&&a.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&a.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&a.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&a.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&a.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),a}crossLabel(e){let t=Wh[e??""];return t?this.t(t):D(e??"")}renderCross(e,t){let a=t??[];return a.length===0?P.nothing:P.html`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${a.map(s=>P.html`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${j(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${j(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?P.html`(${s.daySignKiche})`:P.nothing} ${s.reading&&!this.hideReadings?P.html`<p part="reading">${s.reading}</p>`:P.nothing}</td></tr>`)}</tbody></table></div></section>`}};_r.styles=[u,me,Sr,P.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.coefficient{font-size:2.75rem;line-height:1;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);flex-shrink:0}.hero>div:not(.coefficient){min-width:0}.title{font-size:var(--roxy-text-xl,1.25rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.spellings{gap:.15rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;margin:.15rem 0 0;display:flex}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.band{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, var(--roxy-surface,#fff));color:var(--roxy-fg,#0a0a0a);padding:.1rem .4rem;display:inline-block}.keynote{font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.summary{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);color:var(--roxy-secondary,#475569);margin:0}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0;padding-left:1.1rem}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);vertical-align:top;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}td.num{font-variant-numeric:tabular-nums;white-space:nowrap}td p{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:.15rem 0 0}`],m([(0,Qn.property)({type:String,reflect:!0})],_r.prototype,"mode",2),_r=m([(0,Qn.customElement)("roxy-mayan-day-sign")],_r);var Ge=require("lit"),eo=require("lit/decorators.js");var Nr=class extends g{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let a=ns(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Ge.html`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${a||this.t("Moon phase calendar")}</h2><div class="list" part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):Ge.nothing}renderSingle(e){let t=e.meaning?.symbol||yc(e.phase);return Ge.html`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header"><span class="emoji" aria-hidden="true">${t}</span><div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?Ge.html`<div class="date">${A(this.effectiveLang(),e.date)}</div>`:Ge.nothing}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Ge.html`<div><span>${this.t("Illumination")}</span> <strong>${_e(this.effectiveLang(),e.illumination,0)}</strong></div>`:Ge.nothing} ${typeof e.age=="number"?Ge.html`<div><span>${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:f(this.effectiveLang(),e.age,1)})}</strong></div>`:Ge.nothing} ${e.sign?Ge.html`<div><span>${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:Ge.nothing} ${typeof e.distance=="number"?Ge.html`<div><span>${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:f(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:Ge.nothing}</div>${e.meaning?.description&&!this.hideReadings?Ge.html`<p class="meaning">${e.meaning.description}</p>`:Ge.nothing} ${e.meaning?.keywords?.length&&!this.hideReadings?Ge.html`<div class="keywords">${e.meaning.keywords.map(a=>Ge.html`<span>${a}</span>`)}</div>`:Ge.nothing}</article>`}renderListItem(e){let t=yc(e.phase);return Ge.html`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${A(this.effectiveLang(),e.date)}</span></div>`}};Nr.styles=[u,Ge.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.emoji{font-size:3rem;line-height:1}.label{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.stats{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.stats div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.stats strong{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}.meaning{color:var(--roxy-fg,#0a0a0a)}.keywords{gap:var(--roxy-space-xs,.25rem);margin-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.keywords span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.list{gap:var(--roxy-space-sm,.5rem);display:grid}.list-item{gap:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem) 0;font-size:var(--roxy-text-sm,.875rem);grid-template-columns:2.5rem 1fr auto;align-items:center;display:grid}.list-item:last-child{border-bottom:none}`],m([(0,eo.property)({type:String,reflect:!0})],Nr.prototype,"mode",2),Nr=m([(0,eo.customElement)("roxy-moon-phase")],Nr);function yc(n){return il(n)??"🌙"}var Ee=require("lit"),fc=require("lit/decorators.js");var Ka=class extends g{renderData(r){let e=r.remedies;return Ee.html`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:r.name})}"><header class="head" part="header"><h2 class="name">${r.name}</h2>${typeof r.number=="number"?Ee.html`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:r.number})}</span>`:Ee.nothing} ${r.range?Ee.html`<span class="range">${r.range}</span>`:Ee.nothing}</header><dl class="facts" part="details">${r.lord?Ee.html`<div class="fact"><dt>${this.t("Lord")}</dt><dd>${r.lord}</dd></div>`:Ee.nothing} ${r.deity?Ee.html`<div class="fact"><dt>${this.t("Deity")}</dt><dd>${r.deity}</dd></div>`:Ee.nothing} ${r.symbol?Ee.html`<div class="fact"><dt>${this.t("Symbol")}</dt><dd>${r.symbol}</dd></div>`:Ee.nothing}</dl>${r.characteristics&&!this.hideReadings?Ee.html`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${r.characteristics}</p></div>`:Ee.nothing} ${e&&!this.hideReadings?Ee.html`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?Ee.html`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:Ee.nothing} ${e.gemstones?Ee.html`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:Ee.nothing} ${e.rituals?Ee.html`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:Ee.nothing}</div></div>`:Ee.nothing}</article>`}};Ka.styles=[u,Ee.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.number{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600)}.range{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.section h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.section p{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.5}.remedies{gap:var(--roxy-space-xs,.25rem);display:grid}.remedy{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.remedy strong{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600)}`],Ka=m([(0,fc.customElement)("roxy-nakshatra-card")],Ka);var $=require("lit");var we=require("lit"),xc=require("lit/decorators.js");var Va=class extends g{rows(){let r=this.data;if(!r)return[];let e=(r.planets??[]).map(a=>({name:a.name,label:y(a,"name"),sign:a.sign,signLabel:y(a,"sign"),longitude:a.longitude,latitude:a.latitude,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,dignity:a.dignity})),t=[["Ascendant",r.ascendant],["Midheaven",r.midheaven],["Part of Fortune",r.partOfFortune],["Vertex",r.vertex]];for(let[a,s]of t)s&&e.push({name:a,label:this.t(a),sign:s.sign,signLabel:y(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(r){if(!r.planets)return this.renderEmpty();let e=this.rows(),t=r.birthDetails,a=e.some(i=>Number.isFinite(i.latitude)),s=e.some(i=>i.sect),o=["latitude","longitude","timezone"];return we.html`<div class="wrap" part="card" aria-label="${this.t("Western planetary positions")}" tabindex="0"><header class="head" part="header"><h2 class="title">${this.t("Planetary positions")}</h2>${t?we.html`<div part="details"><p class="birth-date">${he(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${o.map(i=>we.html`<div><dt>${Pe(this.effectiveLang(),i)}</dt><dd>${f(this.effectiveLang(),t[i],5)}</dd></div>`)}</dl></div>`:we.nothing}</header><table role="table" part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${a?we.html`<th scope="col">${Pe(this.effectiveLang(),"latitude")}</th>`:we.nothing}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?we.html`<th scope="col">${this.t("Sect")}</th>`:we.nothing}</tr></thead><tbody>${e.map(i=>{let l=R(i.name)??"",c=i.sect==="day"?this.t("Daytime"):i.sect==="night"?this.t("Night"):"",p=Z(i.sign)??"",d=typeof i.speed=="number"?f(this.effectiveLang(),i.speed,6):"";return we.html`<tr class="${i.isPoint?"point":""}"><td class="body">${l?we.html`<span class="glyph">${l}</span>`:we.nothing}${i.label}</td><td>${p?we.html`<span class="glyph">${p}</span>`:we.nothing}${i.signLabel??""}</td><td class="num">${typeof i.longitude=="number"?it(i.longitude,i.signLabel):""}</td><td class="num">${typeof i.longitude=="number"?`${f(this.effectiveLang(),i.longitude,5)}°`:we.nothing}</td>${a?we.html`<td class="num">${typeof i.latitude=="number"?`${f(this.effectiveLang(),i.latitude,5)}°`:we.nothing}</td>`:we.nothing}<td class="num">${typeof i.house=="number"?i.house:""}</td><td class="dignity">${i.dignity?H(i.dignity):""}</td><td class="num">${d?we.html`${d}${this.t("°/day")}`:we.nothing} ${i.isRetrograde?we.html`<span class="retro">℞</span>`:we.nothing}</td>${s?we.html`<td>${c}</td>`:we.nothing}</tr>`})}</tbody></table>${r.houses?.length?we.html`<details class="head" part="section houses"><summary>${this.t("Houses")}</summary><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${r.houses.map(i=>we.html`<tr><th scope="row">${f(this.effectiveLang(),i.number,0)}</th><td>${y(i,"sign")}</td><td>${it(i.longitude,y(i,"sign"))}</td><td>${f(this.effectiveLang(),i.longitude,5)}°</td></tr>`)}</tbody></table></details>`:we.nothing}</div>`}};Va.styles=[u,ds,we.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:auto}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{overflow-wrap:anywhere;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.birth-date{margin:var(--roxy-space-sm,.5rem) 0 0;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:460px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.point{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent)}td.body{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.retro{color:var(--roxy-danger,#dc2626);font-weight:var(--roxy-weight-bold,600)}.num{font-variant-numeric:tabular-nums}`],Va=m([(0,xc.customElement)("roxy-western-planets-table")],Va);var fs=require("lit/decorators.js"),fi=require("lit/directives/if-defined.js");var Lc=require("lit"),gs=Lc.css`.aspect{stroke-width:.8px;fill:none;opacity:.55}.aspect-trine,.aspect-sextile{stroke:var(--roxy-success,#16a34a)}.aspect-square,.aspect-opposition{stroke:var(--roxy-danger,#dc2626)}.aspect-conjunction{stroke:var(--roxy-accent-ink,#b45309)}.aspect-other{stroke:var(--roxy-muted,#71717a);stroke-opacity:.7}`,bc=.3,Jh=.9,vc=.5,Qh=1.8;function us(n){let{strength:r}=n;if(typeof r!="number"||!Number.isFinite(r))return;let e=Math.min(1,Math.max(0,r/100)),t=bc+e*(Jh-bc),a=vc+e*(Qh-vc);return`opacity:${t.toFixed(3)};stroke-width:${a.toFixed(3)}`}var Ir=class{constructor(r,e){this.host=r,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),r.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let r=!1;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],a=eg(this.host.renderRoot,t,this.size[e]);a!==this.size[e]&&(this.size[e]=a,r=!0)}r&&this.host.requestUpdate()}};function eg(n,r,e){let t=n?.querySelector(r);if(!t||typeof getComputedStyle!="function")return e;let a=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(a)&&a>0?a:e}var $c={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},xi=540,U=xi/2,ys=220,gi=202,Ms=174,Es=144,tg=232,ui=249,yi={glyph:14,degree:7},rg=.95,ag=3.4,sg=1.85,ng=1.25,og=.9,ig=28,lg=13,to=84,hr=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.heading="Natal chart";this.view="wheel";this.type=new Ir(this,{glyph:[".planet-glyph",yi.glyph],degree:[".planet-deg",yi.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let t=this.getPlanets(),a=e.aspects??[],s=this.view;return $.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2>${e.birthDetails?$.html`<div class="meta">${he(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</div>`:$.nothing}</header>${a.length>0?$.html`${pt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:o=>{this.view=o},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(t,a):this.renderAspectGrid(t,a)}</div>`:this.renderWheel(t,a)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${f(this.effectiveLang(),t.length,0)}</span> ${a.length>0?$.html`<span>${this.t("{{count}} aspects",{count:a.length})}</span>`:$.nothing} ${this.hasCusps&&e.houseSystem?$.html`<span>${this.t("{{system}} houses",{system:e.houseSystem})}</span>`:$.html`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${a.length>0?$.html`<span><span class="legend-swatch" style="background:var(--roxy-success)"></span>${this.t("Harmonious aspects")}</span> <span><span class="legend-swatch" style="background:var(--roxy-danger)"></span>${this.t("Challenging aspects")}</span>`:$.nothing}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(a)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport($.html`<svg viewBox="0 0 ${xi} ${xi}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${U}" cy="${U}" r="${ys}" stroke-width="1.5"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${gi-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${Ms}" stroke-width="1"/><circle class="wheel-line" cx="${U}" cy="${U}" r="${to}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,t)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,t){let a=e.map(i=>({name:i.name,label:y(i,"name")})),s=(i,l)=>[Ft(i),Ft(l)].sort().join("|"),o=new Map;for(let i of t)o.set(s(i.planet1,i.planet2),i);return a.length===0?$.html`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:$.html`<div class="grid-scroll" part="section aspects table aspect-grid"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><th></th>${a.slice(0,-1).map(i=>{let l=R(i.name)??i.label;return $.html`<th scope="col" title="${i.label}">${l}</th>`})}</tr></thead><tbody>${a.slice(1).map((i,l)=>{let c=R(i.name)??i.label;return $.html`<tr><th scope="row" title="${i.label}">${c}</th>${a.slice(0,l+1).map(p=>{let d=o.get(s(i.name,p.name));if(!d)return $.html`<td class="empty"></td>`;let h=$t(d),b=ls(h)??y(d,"type",Ke(d)),L=Ht[h]??"aspect-other",v=f(this.effectiveLang(),d.orb,1);return $.html`<td class="${`cell ${L}`}" title="${`${i.label} ${y(d,"type",h)} ${p.label}${v?` (${this.t("Orb")} ${v}°)`:""}`}"><span class="asp">${b}</span></td>`})} ${a.slice(l+1,-1).map(()=>$.html`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),a=[{longitude:e,label:this.t("ASC")},{longitude:ks(e),label:this.t("DSC")}];t!==null&&(a.push({longitude:t,label:this.t("MC")}),a.push({longitude:ks(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&a.push({longitude:At(s),label:this.t("PoF")});let o=this.data?.vertex?.longitude;return typeof o=="number"&&a.push({longitude:At(o),label:this.t("Vtx")}),It(a,i=>i.longitude,zt(ig,ui)).map(({item:i,longitude:l,displayLongitude:c})=>this.renderAngleMark(l,c,i.label))}renderAngleMark(e,t,a){let s=this.toAngle(e),o=this.toAngle(t),i=B(U,U,ys,s),l=B(U,U,tg,s),c=B(U,U,ui,o),p=Math.abs(t-e)>.5,d=B(U,U,ui-8,o);return $.svg`
105
105
  <g>
106
106
  <line class="angle-tick" x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} />
107
107
  ${p?$.svg`<line class="angle-tick" x1=${l.x} y1=${l.y} x2=${d.x} y2=${d.y} />`:$.nothing}
108
108
  <text class="angle-marker" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${a}</text>
109
109
  </g>
110
- `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(a=>a.longitude):Array.from({length:12},(a,s)=>this.getAscendant()+s*30)).map(a=>{let s=this.toAngle(a),o=B(U,U,Ms,s),i=B(U,U,ys,s);return $.svg`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}renderSigns(){return Oe.map((e,t)=>{let a=this.toAngle(t*30+15),s=B(U,U,hi,a);return $.svg`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Z(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((a,s)=>{let o=e[(s+1)%12],i=rn(a.longitude,o?o.longitude:a.longitude+30),l=B(U,U,Ms-12,this.toAngle(i));return $.svg`<text class="house-num" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${a.number}</text>`});let t=this.getAscendant();return Array.from({length:12},(a,s)=>{let o=this.toAngle(t+s*30+15),i=B(U,U,Ms-12,o),l=s+1;return $.svg`<text class="house-num" x=${i.x} y=${i.y} text-anchor="middle" dominant-baseline="central">${l}</text>`})}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let a=this.toAngle(t),s=t%30===0,o=s?hi-14:ys-5,i=B(U,U,o,a),l=B(U,U,ys,a);e.push($.svg`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(t=>{let a=this.toAngle(t.longitude),s=B(U,U,Ms+9,a);return $.svg`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${jt(t.longitude)}</text>`}):$.nothing}renderPlanets(e){let t=this.type.size.degree>ui.degree,a=tg*this.type.size.glyph,s={width:a,height:a},o=b=>({width:((t?ag:rg)+(b?sg:0))*this.type.size.degree,height:ng*this.type.size.degree}),i=(b,L,v)=>{let E=o(b.isRetrograde===!0),Q=Es-or(L,s,E,Xt);return v===0?Q:Math.min(Q,Math.max(Q-ig,to+Xt+ml(L,E)))},l=zt(a,Es),c=o(!0),p=Math.max(l,zt(c.width,Es-or(90,s,c,Xt))/2),d=It(e,b=>b.longitude,p),h=hl(d,({item:b,displayLongitude:L},v)=>{let E=this.toAngle(L);return{...B(U,U,i(b,E,v),E),...o(b.isRetrograde===!0)}});return d.map((b,L)=>{let{item:v,longitude:E,displayLongitude:Q}=b,$e=this.toAngle(E),nt=this.toAngle(Q),gr=B(U,U,Es,nt),Ur=B(U,U,i(v,nt,h[L]??0),nt),Zr=B(U,U,ys-4,$e),Wr=B(U,U,Es+8,nt),vs=y(v,"name"),Is=R(v.name)??vs,zi=v.isRetrograde===!0,Mi=jt(v.longitude),ep=t?`${Nt(v.longitude).degree}°`:Mi,tp=Math.abs(Q-E)>.5;return $.svg`<g>
111
- ${tp?$.svg`<line class="planet-leader" x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:$.nothing}
112
- <text class="planet-glyph" x=${gr.x} y=${gr.y} text-anchor="middle" dominant-baseline="central"><title>${vs}${zi?` ${this.t("retrograde")}`:""} - ${Mi} ${y(v,"sign")}</title>${Is}</text>
113
- <text class="planet-deg" x=${Ur.x} y=${Ur.y} text-anchor="middle" dominant-baseline="central">${ep}${zi?$.svg`<tspan class="retro"> ℞</tspan>`:$.nothing}</text>
114
- </g>`})}renderPositionDetails(e){return $.html`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${(0,yi.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return $.nothing;let a=Xs(e,"retrogradePlanets");return $.html`<div class="details" part="details">${e?.dominantElement||e?.dominantModality?$.html`<div class="pill-row">${e.dominantElement?$.html`<span class="pill">${this.t("Dominant element")}: ${y(e,"dominantElement")}</span>`:$.nothing} ${e.dominantModality?$.html`<span class="pill">${this.t("Dominant modality")}: ${y(e,"dominantModality")}</span>`:$.nothing}</div>`:$.nothing} ${t?$.html`<div class="pill-row"><span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:t.neutral})}</span></div>`:$.nothing} ${a.length>0?$.html`<div class="pill-row">${a.map(({value:s,label:o})=>{let i=R(s)??"";return $.html`<span class="pill pill--muted">${i} ${o} R</span>`})}</div>`:$.nothing} ${t?.summary&&!this.hideReadings?$.html`<p class="summary">${t.summary}</p>`:$.nothing} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return $.nothing;let t=["Fire","Earth","Air","Water"],a=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},o={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},i=Oe,l=this.data?.summary,c={};for(let L of t)c[L]={Cardinal:[],Fixed:[],Mutable:[]};let p=0;for(let L of e){let v=i.indexOf(H(L.sign??""));if(v<0)continue;let E=t[v%4],Q=a[v%3],$e=R(L.name)??y(L,"name");c[E]?.[Q]?.push($e),p++}if(p===0)return $.nothing;let d=L=>t.reduce((v,E)=>v+(c[E]?.[L]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([L,v])=>({label:s[H(L)]??L,count:v})),...Object.entries(l?.modalityDistribution??{}).map(([L,v])=>({label:o[H(L)]?.full??L,count:v}))],b=Object.values(l?.elementDistribution??{}).reduce((L,v)=>L+v,0);return $.html`${h.length?$.html`<section class="block" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p>${this.t("{{count}} planets",{count:b})}</p><div class="pill-row">${h.map(({label:L,count:v})=>$.html`<span class="pill">${L}: ${f(this.effectiveLang(),v,0)}</span>`)}</div></section>`:$.nothing}<div class="grid-scroll"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption>${this.t("All {{count}} bodies in the chart, placed by sign",{count:p})}</caption><thead><tr><th></th>${a.map(L=>$.html`<th scope="col" title="${o[L]?.full??L}">${o[L]?.abbr??L}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(L=>{let v=a.reduce((E,Q)=>E+(c[L]?.[Q]?.length??0),0);return $.html`<tr><th scope="row">${s[L]??L}</th>${a.map(E=>$.html`<td>${(c[L]?.[E]??[]).join(" ")}</td>`)}<td class="em-total">${v}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${a.map(L=>$.html`<td class="em-total">${d(L)}</td>`)}<td class="em-total">${p}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return $.nothing;let t=[...e].sort((a,s)=>(Lc[a.kind]??9)-(Lc[s.kind]??9)||(s.tightness??0)-(a.tightness??0));return $.html`<section class="block" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(a=>this.renderPattern(a))}</section>`}renderPattern(e){let t=e.planets??[],a=e.apex?[...t].sort((s,o)=>+(o===e.apex)-+(s===e.apex)):t;return $.html`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?$.html`<span class="pattern-tag">${e.element}</span>`:$.nothing} ${e.modality?$.html`<span class="pattern-tag">${e.modality}</span>`:$.nothing} ${e.dissociate?$.html`<span class="pattern-tag" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:$.nothing} ${typeof e.tightness=="number"?$.html`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:_e(this.effectiveLang(),e.tightness,0)})}</span>`:$.nothing}</div><div class="pattern-planets">${a.map(s=>{let o=R(s),i=!!e.apex&&s===e.apex;return $.html`<span class="${i?"planet-chip apex":"planet-chip"}">${o?$.html`<span aria-hidden="true">${o}</span>`:$.nothing}${s}${i?$.html`<span class="apex-tag">${this.t("apex")}</span>`:$.nothing}</span>`})}</div>${e.interpretation&&!this.hideReadings?$.html`<p class="pattern-interp">${e.interpretation}</p>`:$.nothing}</div>`}renderAspectDetails(e){return e.length===0?$.nothing:$.html`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${(0,yi.ifDefined)(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let a=t.interpretation,s=R(t.name)??"",o=y(t,"name"),i=a.summary||a.detailed||"",l=a.summary?a.detailed:void 0;return{label:`${s} ${o}`.trim(),aside:`${y(t,"sign")} ${jt(t.longitude)}`,body:i,extra:$.html`${l?$.html`<p>${l}</p>`:$.nothing} ${Jr(a.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,t){let a=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let o=Ft(s.name);o&&a.set(o,s.longitude)}return t.map(s=>{let o=a.get(Ft(s.planet1)),i=a.get(Ft(s.planet2));if(o===void 0||i===void 0)return $.nothing;let l=B(U,U,to-2,this.toAngle(o)),c=B(U,U,to-2,this.toAngle(i)),p=$t(s),d=Ht[p]??"aspect-other",h=f(this.effectiveLang(),s.orb,1);return $.svg`<line class=${`aspect ${d}`} style=${us(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${y(s,"planet1")} ${y(s,"type",p)} ${y(s,"planet2")}${h?` (${this.t("Orb")} ${h}°)`:""}</title></line>`})}};hr.styles=[u,Ue,gs,ot,q,me,$.css`roxy-aspects-table::part(card),roxy-western-planets-table::part(card){box-shadow:none;border:0;padding:0}.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{overflow-wrap:anywhere;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,680px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign-glyph{fill:var(--roxy-secondary,#475569);font-size:14px;font-family:var(--roxy-font-sans)}.planet-glyph{fill:var(--roxy-accent-ink,#b45309);font-size:14px;font-weight:600;font-family:var(--roxy-font-sans)}.planet-deg{fill:var(--roxy-fg,#0a0a0a);font-size:7px;font-family:var(--roxy-font-sans)}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:24px}.planet-deg{font-size:13px}.house-num{font-size:12px}}.planet-deg .retro{fill:var(--roxy-danger,#dc2626)}.planet-leader{stroke:var(--roxy-accent,#f59e0b);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted,#71717a);font-size:9px;font-family:var(--roxy-font-sans)}.cusp-deg{fill:var(--roxy-muted,#71717a);font-size:6px;font-family:var(--roxy-font-sans)}.tick{stroke:var(--roxy-border,#e4e4e7)}.tick-major{stroke:var(--roxy-secondary,#475569)}.angle-marker{fill:var(--roxy-accent-ink,#b45309);font-size:13px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.angle-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.legend{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.legend-swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.legend .caveat{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);padding:1px 8px}.grid-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table.aspect-grid{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem);margin:0 auto}table.aspect-grid th,table.aspect-grid td{text-align:center;border:1px solid var(--roxy-border,#e4e4e7);width:1.6rem;height:1.6rem;padding:0}table.aspect-grid th{color:var(--roxy-secondary,#475569);font-weight:var(--roxy-weight-bold,600)}table.aspect-grid td.cell{cursor:default}table.aspect-grid td.empty{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 18%, transparent)}table.aspect-grid td .asp{font-size:.95em;line-height:1}table.aspect-grid td.aspect-trine .asp,table.aspect-grid td.aspect-sextile .asp{color:var(--roxy-success,#16a34a)}table.aspect-grid td.aspect-square .asp,table.aspect-grid td.aspect-opposition .asp{color:var(--roxy-danger,#dc2626)}table.aspect-grid td.aspect-conjunction .asp{color:var(--roxy-accent-ink,#b45309)}table.aspect-grid td.aspect-other .asp{color:var(--roxy-muted,#71717a)}.details{margin-top:var(--roxy-space-md,1rem)}.pill-row{gap:var(--roxy-space-xs,.25rem);margin-bottom:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-fg,#0f172a) 8%, transparent);color:var(--roxy-fg,#0f172a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 15%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 15%, transparent);color:var(--_danger-fg)}.pill--muted{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.summary{color:var(--roxy-fg,#0f172a);font-size:var(--roxy-text-sm,.875rem);margin:var(--roxy-space-md,1rem) 0}.em-grid{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem);width:100%}.em-grid caption{caption-side:top;text-align:left;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);padding-bottom:var(--roxy-space-xs,.25rem)}.em-grid th,.em-grid td{border:1px solid var(--roxy-border,#e4e4e7);text-align:center;vertical-align:middle;padding:3px 5px}.em-grid th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.04em}.em-grid th[scope=row]{text-align:left}.em-grid td{color:var(--roxy-accent-ink,#b45309);min-width:1.4rem;font-size:.95em;line-height:1.4}.em-grid .em-total{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 25%, transparent)}.pattern{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem);gap:.35rem;display:grid}.pattern-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold,600)}.pattern-tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:1px 8px}.pattern-tight{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.pattern-planets{flex-wrap:wrap;gap:.25rem;display:flex}.planet-chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.3rem;padding:1px 8px;display:inline-flex}.planet-chip.apex{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 20%, transparent);font-weight:var(--roxy-weight-bold,600)}.planet-chip .apex-tag{text-transform:uppercase;letter-spacing:.04em;font-size:.85em;font-weight:400}.pattern-interp{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.45}`],m([(0,fs.property)({type:String})],hr.prototype,"heading",2),m([(0,fs.state)()],hr.prototype,"view",2),hr=m([(0,fs.customElement)("roxy-natal-chart")],hr);var x=require("lit"),ao=require("lit/decorators.js");var lg=new Set([11,22,33]),dg=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Gr=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(cg[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,ro(e.number,e.type))} ${e.meaning?.description&&a?x.html`<p class="meaning">${e.meaning.description}</p>`:x.nothing} ${e.calculation?x.html`<pre class="calc" part="calculation">${e.calculation}</pre>`:x.nothing} ${e.hasKarmicDebt&&e.karmicDebtNumber?x.html`<div class="karmic" part="section karmic-debt">${this.t("Karmic debt")} ${e.karmicDebtNumber}. ${a?pg(e.karmicDebtMeaning):""}</div>`:x.nothing} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,ro(e.number,e.type))} ${e.dailyMessage&&a?x.html`<p class="meaning">${e.dailyMessage}</p>`:x.nothing} ${e.meaning?.description&&a?x.html`<p class="meaning">${e.meaning.description}</p>`:x.nothing} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?x.html`<p class="meaning">${e.guidance}</p>`:x.nothing}<dl class="attrs" part="details">${this.attr(this.t("Date"),A(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),xi(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),xi(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?x.html`<p class="meaning">${e.focus}</p>`:x.nothing}<dl class="attrs" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),xi(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?x.html`<p class="label">${e.cycle}</p>`:x.nothing} ${e.forecast&&a?x.html`<p class="meaning">${e.forecast}</p>`:x.nothing} ${a?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):x.nothing} ${e.advice&&a?x.html`<p class="meaning">${e.advice}</p>`:x.nothing}</article>`}renderChart(e,t){let a=Object.entries(e.coreNumbers??{}).filter(([,p])=>p),s=e.additionalInsights,o=e.luckyAssociations,i=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="label">${t}</p>${e.profile?.name?x.html`<h2 class="title">${e.profile.name}</h2>`:x.nothing} ${e.profile?.birthdate?x.html`<p class="label">${A(this.effectiveLang(),e.profile.birthdate)}</p>`:x.nothing}</div>${e.summary&&c?x.html`<p class="meaning">${e.summary}</p>`:x.nothing} ${a.length>0?x.html`<div class="cores" part="details cores">${a.map(([p,d])=>x.html`<div class="item"><div class="core-head"><span class="core-key">${D(p)}</span> <strong>${d.number??""}</strong></div>${d.meaning?.title?x.html`<span class="core-title">${d.meaning.title}</span>`:x.nothing} ${ro(d.number,d.type)?x.html`<span class="master">${this.t("Master")} ${d.number}</span>`:x.nothing}</div>`)}</div>`:x.nothing} ${this.renderInterpretation(a.map(([p,d])=>({label:D(p),aside:[d.number!=null?`${d.number}`:"",ro(d.number,d.type)?"master":"",d.hasKarmicDebt&&d.karmicDebtNumber?`karmic debt ${d.karmicDebtNumber}`:""].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:this.renderReading(d.meaning,`numerology-core-${p}`)})),"numerology-cores","Core numbers")} ${l?x.html`<dl class="attrs" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:x.nothing} ${i?x.html`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${i.title?x.html`<h4 class="sub-title">${[i.day?this.t("Day {{day}}",{day:i.day}):"",i.title].filter(Boolean).join(" · ")}</h4>`:x.nothing} ${i.description&&c?x.html`<p>${i.description}</p>`:x.nothing} ${this.renderReading(i,"numerology-birth-day-profile")}</section>`:x.nothing} ${s?this.renderInsights(s):x.nothing} ${o?x.html`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="attrs">${this.attr(this.t("Day"),o.day)} ${this.attr(this.t("Element"),o.element)} ${this.attr(this.t("Ruling planet"),o.rulingPlanet)} ${this.attr(this.t("Colors"),o.colors?.join(", "))} ${this.attr(this.t("Gemstones"),o.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),o.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),o.incompatibleNumbers?.join(", "))}</dl></section>`:x.nothing}</article>`}renderInsights(e){let t=e.karmicLessons,a=e.karmicDebt,s=e.personalYear,o=e.hiddenPassion,i=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),p=!this.hideReadings;return x.html`${t?x.html`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?x.html`<div class="chips">${t.missingNumbers.map(d=>x.html`<span>${this.t("Missing")} ${d}</span>`)}</div>`:x.html`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?x.html`<div class="chips">${c.map(([d,h])=>x.html`<span>${d} x ${h}</span>`)}</div>`:x.nothing} ${this.renderInterpretation((t.lessons??[]).map(d=>({label:d.lesson??`Lesson ${d.number}`,aside:d.number!=null?`${d.number}`:"",body:d.description??"",extra:d.howToOvercome?x.html`<p><strong>${this.t("How to overcome")}.</strong> ${d.howToOvercome}</p>`:x.nothing})),"numerology-karmic-lessons","Lessons")}</section>`:x.nothing}${a?.hasKarmicDebt?x.html`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${a.debtNumbers?.length?x.html`<div class="chips">${a.debtNumbers.map(d=>x.html`<span>${this.t("Debt")} ${d}</span>`)}</div>`:x.nothing} ${this.renderInterpretation((a.meanings??[]).map(d=>({label:`${this.t("Karmic debt")} ${d.number}`,body:d.description??"",extra:x.html`${d.challenge?x.html`<p><strong>${this.t("Challenge")}.</strong> ${d.challenge}</p>`:x.nothing}${d.resolution?x.html`<p><strong>${this.t("Resolution")}.</strong> ${d.resolution}</p>`:x.nothing}`})),"numerology-karmic-debt","Debts")}</section>`:x.nothing}${s?x.html`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4 class="sub-title">${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" · ")}</h4>${s.forecast&&p?x.html`<p>${s.forecast}</p>`:x.nothing} ${p?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):x.nothing} ${s.advice&&p?x.html`<p>${s.advice}</p>`:x.nothing} ${s.personalMonth?x.html`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" · ")}.</strong> ${p?s.personalMonth.focus??"":""}</p>`:x.nothing}</section>`:x.nothing}${e.pinnacles?.length&&p?x.html`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(d=>({label:[d.position!=null?`Pinnacle ${d.position}`:"Pinnacle",d.meaning?.title??""].filter(Boolean).join(" · "),aside:[d.number!=null?`${d.number}`:"",$c(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:this.renderLists(["Opportunities",d.meaning?.opportunities],["Challenges",d.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:x.nothing}${e.challenges?.length&&p?x.html`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(d=>({label:[d.position!=null?`Challenge ${d.position}`:"Challenge",d.meaning?.title??""].filter(Boolean).join(" · "),aside:[d.number!=null?`${d.number}`:"",$c(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:x.html`${d.meaning?.lesson?x.html`<p><strong>${this.t("Lesson")}.</strong> ${d.meaning.lesson}</p>`:x.nothing}${d.meaning?.howToOvercome?x.html`<p><strong>${this.t("How to overcome")}.</strong> ${d.meaning.howToOvercome}</p>`:x.nothing}`})),"numerology-challenges","Obstacle periods")}</section>`:x.nothing}${o||i?x.html`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${o?x.html`<div><h4 class="sub-title">${[o.number!=null?this.t("Hidden passion {{number}}",{number:o.number}):this.t("Hidden passion"),o.title??""].filter(Boolean).join(" · ")}</h4>${o.description&&p?x.html`<p>${o.description}</p>`:x.nothing} ${typeof o.count=="number"?x.html`<p class="label">${this.t("Appears {{count}} times in the name",{count:o.count})}</p>`:x.nothing}</div>`:x.nothing} ${i?x.html`<div><h4 class="sub-title">${[i.number!=null?this.t("Subconscious self {{number}}",{number:i.number}):this.t("Subconscious self"),i.title??""].filter(Boolean).join(" · ")}</h4>${i.description&&p?x.html`<p>${i.description}</p>`:x.nothing} ${i.uniqueNumbers?.length?x.html`<p class="label">${this.t("Numbers present: {{list}}",{list:tt(this.effectiveLang(),i.uniqueNumbers.map(String))})}</p>`:x.nothing}</div>`:x.nothing}</section>`:x.nothing}${l&&p?x.html`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:bi(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:bi(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:bi(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:x.nothing}`}renderHero(e,t,a,s=!1){return x.html`<div class="hero" part="header">${typeof t=="number"?x.html`<div class="numeral">${t}</div>`:x.nothing}<div><p class="label">${e}</p>${a?x.html`<h2 class="title">${a}</h2>`:x.nothing} ${s?x.html`<span class="master">${this.t("Master number")}</span>`:x.nothing}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return x.nothing;let a=dg.map(([s,o])=>({label:o,body:e[s]??""}));return x.html`${e.keywords?.length?x.html`<div class="chips">${e.keywords.map(s=>x.html`<span>${s}</span>`)}</div>`:x.nothing}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(a,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,a])=>a&&a.length>0);return t.length===0?x.nothing:x.html`<div class="lists">${t.map(([a,s])=>x.html`<div><h3>${this.t(a)}</h3><ul>${(s??[]).map(o=>x.html`<li>${o}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?x.nothing:x.html`<div class="attr"><dt>${e}</dt><dd>${t}</dd></div>`}};Gr.styles=[u,q,me,x.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{font-size:4rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.meaning{color:var(--roxy-fg,#0a0a0a);margin:0}.master{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-top:2px;padding:2px 10px;display:inline-block}.calc{font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 30%, transparent);padding:var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-sm,4px);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.cores{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.cores .item{font-size:var(--roxy-text-sm,.875rem);gap:2px;display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs,.25rem);display:flex}.cores .item .core-key{color:var(--roxy-muted,#71717a);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600)}.cores .item .core-title{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{gap:var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);margin:0;padding-left:1.1rem;line-height:1.6;display:grid}.sub{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);display:grid}.sub>h3{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.sub-title{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub p{font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.attrs{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));margin:0;display:grid}.attr{gap:2px;display:grid}.attr dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.attr dd{font-size:var(--roxy-text-sm,.875rem);margin:0;font-weight:500}.karmic{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 12%, transparent);border:1px solid color-mix(in srgb, var(--roxy-warning,#ea580c) 32%, transparent);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}`],m([(0,ao.property)({type:String,reflect:!0})],Gr.prototype,"type",2),Gr=m([(0,ao.customElement)("roxy-numerology-card")],Gr);var cg={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function pg(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function ro(n,r){return r==="master"||n!==void 0&&lg.has(n)}function xi(n,r){return[n!=null?`${n}`:"",r??""].filter(Boolean).join(" · ")}function $c(n,r){return n==null?"":r==null?`ages ${n} onward`:`ages ${n} to ${r}`}function bi(n,r){return[n??"",r!=null?`${r}`:""].filter(Boolean).join(" · ")}var ae=require("lit"),so=require("lit/decorators.js");function vi(...n){return n.filter(Boolean).join(" · ")}function Li(...n){return n.filter(Boolean).join(", ")}var Or=class extends g{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,a="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],o=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],i=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return ae.html`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2 class="title">${this.t("Panchang")}</h2><span class="date">${t?A(this.effectiveLang(),t.date):""}</span></header><table part="table"><tbody>${this.limbs(e,t).map(p=>this.renderLimbRow(p))} ${t?ae.html`${this.renderRow(this.t("Sunrise"),yt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),yt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),yt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),yt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:a?ae.html`${this.renderRow(this.t("Sun"),this.formatLongitude(a.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(a.moonLongitude))}`:ae.nothing}</tbody></table>${t?this.renderTransitions(t.transitions):ae.nothing} ${c?ae.html`<div class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</div><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(p=>!!p[1]),...o])}</tbody></table><div class="section" part="section inauspicious">${this.t("Inauspicious periods")}</div><table part="table inauspicious"><tbody>${this.renderPeriodRows([...i.filter(p=>!!p[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:ae.nothing}</div>`}limbs(e,t){let a=e.tithi,s=e.nakshatra,o=e.yoga,i=e.karana,l=[{label:this.t("Tithi"),value:Li(a?.name,a?.paksha?`${a.paksha} paksha`:void 0),meta:vi(a?.rulingPlanet?`Ruled by ${a.rulingPlanet}`:void 0,a?.deity?`Deity ${a.deity}`:void 0,a?.element,typeof a?.percent=="number"?`${_e(this.effectiveLang(),a.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:Li(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:vi(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:o?.name??"",meta:o?.characteristics??""},{label:this.t("Karana"),value:Li(i?.name,i?.type),meta:i?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:ws(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return ae.html`<tr><th>${e.label}</th><td>${e.value}${e.meta?ae.html`<small>${e.meta}</small>`:ae.nothing}</td></tr>`}renderRow(e,t){return t?ae.html`<tr><th>${e}</th><td>${t}</td></tr>`:ae.nothing}renderTransitions(e){return e?ae.html`<div class="section" part="section transitions">${this.t("Next transitions")}</div><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:ae.nothing}renderPeriodRows(e){return e.map(([t,a])=>{let s=Wt(this.effectiveLang(),a);return s?ae.html`<tr><th>${t}</th><td>${s}</td></tr>`:ae.nothing})}expandWindows(e,t){return!t||t.length===0?[]:t.map((a,s)=>[t.length>1?`${e} ${s+1}`:e,a])}renderBhadraRow(e){if(!e)return ae.nothing;let t=this.formatSpan(e.startsAt,e.endsAt);return ae.html`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:ae.html`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return ae.nothing;let t=this.formatSpan(e.startsAt,e.endsAt);return ae.html`<tr><th>${this.t("Panchaka")}</th><td>${e.active?ae.html`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?ae.html`<small>${t}</small>`:ae.nothing}`:ae.html`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?ae.nothing:ae.html`<div class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</div><table part="table balams"><tbody>${e?ae.html`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"good")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:ae.nothing} ${t?ae.html`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"good")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"bad")}</td></tr>`:ae.nothing}</tbody></table>`}renderChips(e,t){return e?.length?ae.html`<div class="chips">${e.map(a=>ae.html`<span class="chip ${t}">${a}</span>`)}</div>`:ae.html`<span class="quiet">${this.t("None")}</span>`}renderTransitionRow(e,t){if(!t?.endsAt)return ae.nothing;let a=yt(this.effectiveLang(),t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:a,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:a,next:t.next}):this.t("ends {{time}}",{time:a});return ae.html`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?ae.html`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:yt(this.effectiveLang(),e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:yt(this.effectiveLang(),e.changesAt)})}</td></tr>`:ae.nothing}formatSpan(e,t){let a=Wt(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!a||!e||!t||e.slice(0,10)===t.slice(0,10)?a:this.t("{{range}} (ends {{date}})",{range:a,date:A(this.effectiveLang(),t)})}formatRashi(e){return ws(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?vi(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=Wt(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?it(e):""}};Or.styles=[u,ae.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}tbody tr:nth-child(odd){background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 24%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;vertical-align:top}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;width:38%}td{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}td small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:normal;margin-top:2px;line-height:1.5;display:block}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.quiet{color:var(--roxy-muted,#71717a)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin-top:4px;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);padding:1px 8px}.chip.good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 14%, transparent);color:var(--_success-fg)}.chip.bad{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}`],m([(0,so.property)({type:String,reflect:!0})],Or.prototype,"detail",2),Or=m([(0,so.customElement)("roxy-panchang-table")],Or);var ce=require("lit"),no=require("lit/decorators.js");var Br=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),a=t.cols;return ce.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.heading||t.title}</h2>${t.badges.length?ce.html`<div class="badges" part="details">${t.badges.map(s=>ce.html`<span class="badge"><b>${s.label}</b> ${s.value}</span>`)}</div>`:ce.nothing}</header>${t.summary&&!this.hideReadings?ce.html`<p class="summary">${t.summary}</p>`:ce.nothing}<div class="scroll" part="table"><table><caption>${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${a.natal?ce.html`<th scope="col">${this.t("Natal")}</th>`:ce.nothing} ${a.house?ce.html`<th scope="col" class="num">${this.t("House")}</th>`:ce.nothing} ${a.motion?ce.html`<th scope="col">${this.t("Motion")}</th>`:ce.nothing} ${a.formula?ce.html`<th scope="col">${this.t("Formula")}</th>`:ce.nothing}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,a))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let a=R(e.label);return ce.html`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${a?ce.html`<span class="glyph">${a}</span>`:ce.nothing}${e.label}</td><td>${this.signCell(e.sign,e.degree)}</td>${t.natal?ce.html`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):ce.html`—`}</td>`:ce.nothing} ${t.house?ce.html`<td class="num">${e.house!=null?e.house:ce.html`—`}</td>`:ce.nothing} ${t.motion?ce.html`<td>${e.speed!=null?ce.html`${f(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?ce.html`<span class="retro">℞</span>`:ce.nothing}`:ce.html`—`}</td>`:ce.nothing} ${t.formula?ce.html`<td class="formula">${e.formula??ce.html`—`}</td>`:ce.nothing}</tr>`}signCell(e,t){let a=Z(e);return ce.html`<span class="sign">${a?ce.html`<span class="sg">${a}</span>`:ce.nothing}${Kt(t)} ${e}</span>`}signFromLongitude(e){let t=Nt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(a=>a.interpretation).map(a=>({label:`${R(a.label)??""} ${a.label}`.trim(),aside:`${a.sign} ${Kt(a.degree)}`.trim(),body:a.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.asteroids.map(a=>({label:a.name,sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.lilith.map(a=>({label:this.t("{{variant}} apogee",{variant:H(a.variant)}),sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${f(this.effectiveLang(),e.solarArc,2)}°`},{label:this.t("Directed to"),value:A(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:!1,motion:!1,formula:!1,natal:!0},rows:e.directed.map(a=>({label:a.name,sign:a.sign,degree:a.degree,natalLongitude:a.natalLongitude,interpretation:a.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:H(e.sect)}]:[],summary:e.summary,cols:{house:!1,motion:!1,formula:!0,natal:!1},rows:e.lots.map(a=>({label:a.name,sign:a.sign,degree:a.degree,formula:a.formula,interpretation:a.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,degree:e.ascendant.degree,isAngle:!0}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,degree:e.midheaven.degree,isAngle:!0}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:A(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:f(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:[...t,...e.planets.map(a=>({label:a.name,sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))]}}};Br.styles=[u,q,me,ce.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}caption{text-align:left;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);padding-bottom:var(--roxy-space-xs,.25rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:6px 10px}th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}td.num{text-align:right;font-variant-numeric:tabular-nums}.body-cell{color:var(--roxy-fg,#0a0a0a);font-weight:500}.body-cell .glyph{color:var(--roxy-accent-ink,#b45309);margin-right:.35rem}tr.angle td{color:var(--roxy-secondary,#475569)}.sign{align-items:baseline;gap:.3rem;display:inline-flex}.sign .sg{color:var(--roxy-secondary,#475569)}.retro{color:var(--roxy-danger,#dc2626);margin-left:.3em;font-weight:600}.formula{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;white-space:normal}`],m([(0,no.property)({type:String})],Br.prototype,"heading",2),Br=m([(0,no.customElement)("roxy-positions-table")],Br);var ct=require("lit"),wc=require("lit/decorators.js");var qa=class extends g{renderData(r){let e=Z(r.profectedSign),t=R(r.lordOfYear),a=Z(r.lordNatalPosition?.sign);return ct.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Annual profection")}</h2>${r.targetDate?ct.html`<span class="badge"><b>${this.t("For")}</b> ${A(this.effectiveLang(),r.targetDate)}</span>`:ct.nothing}</header><div class="focus" part="details"><div class="age"><span class="n">${r.age}</span> <span class="l">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${r.profectedHouse}</span> <span class="sign">${e?ct.html`<span class="sg">${e}</span>`:ct.nothing}${r.profectedSign}</span></div></div><div class="lord" part="details"><span class="label">${this.t("Lord of the year")}</span> <span class="value">${t?ct.html`${t}`:ct.nothing}${r.lordOfYear}</span> ${r.lordNatalPosition?ct.html`<span class="sub">${this.t("Natal")} ${a?ct.html`<span>${a}</span>`:ct.nothing}${this.t("{{sign}} · house {{house}}",{sign:r.lordNatalPosition.sign,house:r.lordNatalPosition.house})}</span>`:ct.nothing}</div>${r.interpretation&&!this.hideReadings?ct.html`<p class="interp">${r.interpretation}</p>`:ct.nothing}</div>`}};qa.styles=[u,ct.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.focus{align-items:center;gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-md,8px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 9%, transparent);flex-wrap:wrap;display:flex}.age{justify-items:center;min-width:4.5rem;display:grid}.age .n{color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;font-size:2rem;font-weight:700;line-height:1}.age .l{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.arrow{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.house{gap:2px;display:grid}.house .h{font-size:var(--roxy-text-lg,1.125rem);color:var(--roxy-fg,#0a0a0a);font-weight:600}.house .sign{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.house .sign .sg{margin-right:.3rem}.lord{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4rem .75rem;display:flex}.lord .label{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-size:var(--roxy-text-xs,.75rem)}.lord .value{color:var(--roxy-fg,#0a0a0a);font-weight:600}.lord .sub{color:var(--roxy-muted,#71717a)}.interp{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);line-height:var(--roxy-leading-normal,1.5);margin:0}`],qa=m([(0,wc.customElement)("roxy-profection-card")],qa);var lt=require("lit"),Sc=require("lit/decorators.js");var Rc=["name","english","title"],mg=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),hg=new Set(["id","symbol",...Rc]),kc=48;function gg(n){return D(n).toLowerCase().replace(/\s+/g,"-")}function ug(n){return Object.values(os(n)).filter(r=>typeof r=="string"||typeof r=="number").map(String).join(" · ")}var Ya=class extends g{renderData(r){let e=os(r),t=this.deriveTitle(e),a=typeof e.symbol=="string"?e.symbol:void 0,s=Array.isArray(e.keywords)?e.keywords.map(String):[],o=[],i=[],l=[],c=(d,h,b)=>{if(h!=null){if(Array.isArray(h)){let L=h.filter(v=>v!=null).map(v=>typeof v=="object"?ug(v):String(v)).filter(v=>v.length>0);L.length>0&&i.push([d,L,L.some(v=>v.length>kc)])}else if(typeof h=="string")mg.has(d)||h.length>kc?o.push([d,h]):l.push([d,h]);else if(typeof h=="number"||typeof h=="boolean")l.push([d,String(h)]);else if(typeof h=="object"&&b<2)for(let[L,v]of Object.entries(os(h)))c(`${d} ${L}`,v,b+1)}};for(let[d,h]of Object.entries(e))hg.has(d)||d==="keywords"&&Array.isArray(h)||c(d,h,0);let p=!this.hideReadings;return lt.html`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${a?lt.html`<span class="symbol" aria-hidden="true">${a}</span>`:lt.nothing}<div><p class="label">${this.t("Reference")}</p><h2 class="name">${t}</h2></div></header>${s.length>0&&p?lt.html`<div class="chips">${s.map(d=>lt.html`<span>${d}</span>`)}</div>`:lt.nothing} ${p?o.map(([d,h])=>lt.html`<p class="prose"><span class="prose-label">${Pe(this.effectiveLang(),d)}</span>${h}</p>`):lt.nothing} ${l.length>0?lt.html`<div class="facts-wrap" part="details"><dl class="facts">${l.map(([d,h])=>lt.html`<div class="fact"><dt>${Pe(this.effectiveLang(),d)}</dt><dd>${h}</dd></div>`)}</dl></div>`:lt.nothing} ${i.map(([d,h,b])=>b&&!p?lt.nothing:lt.html`<div class="list" part="section ${gg(d)}"><h3>${Pe(this.effectiveLang(),d)}</h3><div class="chips">${h.map(L=>lt.html`<span>${L}</span>`)}</div></div>`)}</article>`}deriveTitle(r){for(let a of Rc)if(typeof r[a]=="string")return r[a];let e=typeof r.type=="string"?D(r.type):"",t=r.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Ya.styles=[u,lt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.symbol{color:var(--roxy-accent-ink,#b45309);flex:none;font-size:2.5rem;line-height:1}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.prose{margin:0;line-height:1.6}.prose .prose-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px;display:block}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.list h3,.facts-wrap h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));margin:0;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}`],Ya=m([(0,Sc.customElement)("roxy-reference-card")],Ya);var Qe=require("lit"),Dc=require("lit/decorators.js"),Tc=require("lit/directives/if-defined.js");var Cc=n=>R(n)??"",Ua=class extends g{renderData(r){let e=r.changes,t=["latitude","longitude"];return Qe.html`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${(0,Tc.ifDefined)(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${r}"></roxy-natal-chart><section class="changes" part="card changes"><h3 class="title">${this.t("What changes at this location")}</h3>${r.relocation?Qe.html`<dl class="roxy-facts" part="details">${t.map(a=>Qe.html`<div><dt>${Pe(this.effectiveLang(),a==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${f(this.effectiveLang(),r.relocation[a],5)}</dd></div>`)}</dl>`:Qe.nothing}<div class="move" part="details">${typeof e?.distanceKm=="number"?Qe.html`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:j(this.effectiveLang(),e.distanceKm),direction:e.direction?ge(this.effectiveLang(),"direction",H(e.direction),e.direction):""})}</span>`:Qe.nothing} ${e?Qe.html`<span>${r.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:y(r.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:y(r.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:Qe.nothing}</div>${r.interpretation?.summary&&!this.hideReadings?Qe.html`<p class="summary">${r.interpretation.summary}</p>`:Qe.nothing} ${e?.angularPlanets?.length?Qe.html`<div part="section angular-planets"><p class="block-label">${this.t("Angular planets here")}</p><div class="chips">${Xs(e,"angularPlanets").map(({value:a,label:s})=>Qe.html`<span class="chip">${Cc(a)} ${s}</span>`)}</div></div>`:Qe.nothing}<div part="section house-changes"><p class="block-label">${this.t("Planets that change house")}</p>${e?.planetsChangedHouse?.length?Qe.html`<ul class="moves-list">${e.planetsChangedHouse.map(a=>Qe.html`<li>${Cc(a.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(a,"planet"),from:a.natalHouse,to:a.relocatedHouse})}</li>`)}</ul>`:Qe.html`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</div></section></div>`}};Ua.styles=[u,ds,Qe.css`.stack{gap:var(--roxy-space-md,1rem);display:grid}.changes{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.move{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.summary{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.block-label{font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0 0 var(--roxy-space-xs,.25rem);font-weight:600}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 10px}.moves-list{gap:2px;margin:0;padding:0;list-style:none;display:grid}.moves-list li{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.moves-list .arrow{color:var(--roxy-muted,#71717a)}.empty-note{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}`],Ua=m([(0,Dc.customElement)("roxy-relocation-wheel")],Ua);var Dt=require("lit"),Ac=require("lit/decorators.js");var $i=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info, #0284c7)"},{key:"digBala",source:"Dig",color:"var(--roxy-success, #16a34a)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning, #ea580c)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent, #f59e0b)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary, #475569)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger, #dc2626)"}],Za=class extends g{renderData(r){if(!r.planets?.length)return this.renderEmpty();let e=[...r.planets].sort((t,a)=>t.relativeRank-a.relativeRank);return Dt.html`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${be(this.effectiveLang(),r.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${$i.map(t=>Dt.html`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(r){let e=R(r.planet)??"",t=$i.map(c=>Math.max(0,r[c.key])),a=t.reduce((c,p)=>c+p,0),s=typeof r.strengthRatio=="number"&&r.strengthRatio>=1,o=s?"adequacy-badge--adequate":"adequacy-badge--weak",i=s?this.t("Adequate"):this.t("Weak"),l=f(this.effectiveLang(),r.totalRupas,2)&&f(this.effectiveLang(),r.minRequired,2)?`${f(this.effectiveLang(),r.totalRupas,2)} / ${f(this.effectiveLang(),r.minRequired,2)} R`:"";return Dt.html`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:r.planet})}"><div class="planet-label"><span class="glyph" aria-hidden="true">${e}</span> ${r.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:r.relativeRank})}">#${r.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:r.planet})}">${a>0?$i.map((c,p)=>{let d=t[p];if(d<=0)return Dt.nothing;let h=d/a*100;return Dt.html`<div class="bar-segment" style="flex-grow:${h};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:f(this.effectiveLang(),d,1)})}"></div>`}):Dt.nothing}</div>${this.renderPhala(r)}</div><div class="pills">${l?Dt.html`<span class="rupas-label">${l}</span>`:Dt.nothing} <span class="${`adequacy-badge ${o}`}">${i}</span></div></div>`}renderPhala(r){let e=typeof r.ishtaPhala=="number"?r.ishtaPhala:0,t=typeof r.kashtaPhala=="number"?r.kashtaPhala:0;if(e+t<=0)return Dt.nothing;let a=f(this.effectiveLang(),e,1)||"0",s=f(this.effectiveLang(),t,1)||"0";return Dt.html`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:a,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:a})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Za.styles=[u,ee,Dt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.planet-row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:8rem 1fr auto;display:grid}.planet-row:last-of-type{border-bottom:none}.planet-label{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:6px;display:flex}.glyph{font-size:1.2em;line-height:1}.bar-wrap{flex-direction:column;gap:4px;display:flex}.bar{border-radius:var(--roxy-radius-sm,4px);background:var(--roxy-border,#e4e4e7);height:12px;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1))}.pills{flex-direction:column;align-items:flex-end;gap:4px;display:flex}.rupas-label{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);height:6px;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success,#16a34a)}.phala-kashta{background:var(--roxy-danger,#dc2626)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}.adequacy-badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 6px;display:inline-block}.adequacy-badge--adequate{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.adequacy-badge--weak{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.rank-badge{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.legend-row{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);align-items:center;gap:6px;display:flex}.legend-swatch{border-radius:var(--roxy-radius-sm,4px);flex-shrink:0;width:10px;height:10px;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:6rem 1fr}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Za=m([(0,Ac.customElement)("roxy-shadbala-table")],Za);var S=require("lit"),Nc=require("lit/decorators.js");var yg=12,ki=680,ve=ki/2,oo=204,fg=186,zc=160,Mc=258,xg=212,wi=224,io=86,Ec={glyph:18,degree:10},bg=1.3,vg=1.85,Lg=1.25,$g=.95,wg=.9,Pc=8,_c=4,Wa=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.type=new Ir(this,{glyph:[".p1",Ec.glyph],degree:[".planet-deg",Ec.degree]})}renderData(e){let{person1:t,person2:a,compatibilityScore:s,analysis:o}=e,i=e.interAspects??[],l=t?.planets??[],c=a?.planets??[],p=typeof s=="number"?Math.round(s):void 0,d=o?.overall,h=o?.strengths??[],b=o?.challenges??[],L=l.length>0&&c.length>0,v=[...i].sort((Q,$e)=>($e.strength??0)-(Q.strength??0)),E=v.slice(0,yg);return S.html`<div class="wrap" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2 class="title">${this.t("Synastry")}</h2>${typeof p=="number"?S.html`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:p})}">${p} / 100</span>`:S.nothing}</div>${this.renderPeople(t,a)} ${L?S.html`${this.viewport.renderChartViewport(S.html`<svg viewBox="0 0 ${ki} ${ki}" part="chart" role="img" aria-label="${this.t("Dual chart wheel comparing two natal charts")}"><title>${this.t("Synastry dual wheel")}</title><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${oo}" stroke-width="1.5"/><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${oo-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${io}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,i)} ${this.renderRing(l,zc,(Q,$e,nt)=>zc-or(Q,$e,nt,Xt),"p1",1)} ${this.renderRing(c,Mc,(Q,$e,nt)=>Mc+or(Q,$e,nt,Xt),"p2",2)} ${this.renderAscendants(e)}</svg>`,this.t("Synastry dual wheel"),this.translator)}<div class="legend-row" part="legend"><span><span class="swatch" style="background:var(--roxy-accent)"></span>${this.t("Person 1")}</span> <span><span class="swatch" style="background:var(--roxy-info)"></span>${this.t("Person 2")}</span> <span><span class="swatch" style="background:var(--roxy-success)"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch" style="background:var(--roxy-danger)"></span>${this.t("Challenging aspects")}</span> <span class="caveat">${this.t("Sign sectors, not houses")}</span></div>`:S.html`<div class="missing-planets" role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</div>`} ${this.renderOverlay(t,a)} ${this.renderSummaryPills(e.summary)} ${d&&!this.hideReadings?S.html`<p class="summary">${d}</p>`:S.nothing} ${E.length>0?S.html`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${E.map((Q,$e)=>this.renderAspectCard(Q,$e))}</section>`:S.nothing} ${v.length>E.length?this.renderCatalog(v):S.nothing} ${!this.hideReadings&&(h.length>0||b.length>0)?S.html`<div class="lists" part="section strengths-challenges">${h.length?S.html`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(Q=>S.html`<li>${Q}</li>`)}</ul></div>`:S.nothing} ${b.length?S.html`<div><h3>${this.t("Challenges")}</h3><ul>${b.map(Q=>S.html`<li>${Q}</li>`)}</ul></div>`:S.nothing}</div>`:S.nothing}</div>`}renderPeople(e,t){let a=(o,i)=>{if(!o)return S.nothing;let l=o.ascendant,p=[["Sun",o.sunSign??"",y(o,"sunSign")],["Moon",o.moonSign??"",y(o,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Kt(l.degree)}`:""]].filter(([,,d])=>d);return p.length===0?S.nothing:S.html`<div class="person"><span class="person-name"><span class="person-dot p${i}" aria-hidden="true"></span> ${o.name||this.t("Person {{n}}",{n:i})}</span><div class="big-three">${p.map(([d,h,b])=>S.html`<span><span class="lbl">${this.t(d)}</span> <span aria-hidden="true">${Z(h)??""}</span> ${b}</span>`)}</div></div>`},s=[a(e,1),a(t,2)].filter(o=>o!==S.nothing);return s.length===0?S.nothing:S.html`<div class="people">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return S.nothing;let a=(i,l)=>i?.name||this.t("Person {{n}}",{n:l}),s=a(e,1),o=a(t,2);return S.html`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,o,1)} ${this.renderOverlayTable(t.planets,o,s,2)}</section>`}renderOverlayTable(e,t,a,s){let o=e.filter(l=>typeof l.houseInOtherChart=="number");if(o.length===0)return S.nothing;let i=`overlay-${s}`;return S.html`<div class="overlay-dir"><h4 id="${i}"><span class="person-dot p${s}" aria-hidden="true"></span> ${this.t("{{first}} in the houses of {{second}}",{first:t,second:a})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${i}"><table aria-labelledby="${i}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${o.map(l=>S.html`<tr><td><span aria-hidden="true">${R(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?S.html`<span class="retro" title="${this.t("retrograde")}">℞</span>`:S.nothing}</td><td><span aria-hidden="true">${Z(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Kt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryPills(e){if(!e||typeof e!="object")return S.nothing;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return typeof e.total!="number"&&t.length===0?S.nothing:S.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?S.html`<span class="pill">${this.t("Total")}: ${e.total}</span>`:S.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill">${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([a,s])=>S.html`<span class="pill">${Ke({type:a})}: ${s}</span>`)}</div>`}renderAspectCard(e,t){let a=R(e.planet1)??"",s=R(e.planet2)??"",o=(e.interpretation??"neutral").toLowerCase(),i=e.meaning,l=S.html`<span class="interp-lead"><span aria-hidden="true" class="glyph">${a}</span>${y(e,"planet1")} <span class="asp-name ${o}">${y(e,"type",Ke(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${y(e,"planet2")}</span>`,c=S.html`<span class="interp-aside"><small>${this.t("orb {{orb}}° · str {{strength}}",{orb:f(this.effectiveLang(),e.orb,2),strength:f(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?S.html`<div class="interp-card" part="reading"><div class="static-head">${l}${c}</div></div>`:S.html`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${l}${pe()}${c}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return S.html`<div class="interp-body">${e.relationshipContext?S.html`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:S.nothing} ${e.description?.short?S.html`<p>${e.description.short}</p>`:S.nothing} ${e.description?.long&&e.description.long!==e.description.short?S.html`<p>${e.description.long}</p>`:S.nothing} ${Jr(e.keywords)}</div>`}renderCatalog(e){return S.html`<details class="catalog"><summary>${pe()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}toAngle(e){return 180-e}renderSpokes(){return Array.from({length:12},(e,t)=>{let a=this.toAngle(t*30),s=B(ve,ve,io,a),o=B(ve,ve,oo,a);return S.svg`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderSigns(){return Oe.map((e,t)=>{let a=this.toAngle(t*30+15),s=B(ve,ve,fg,a);return S.svg`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Z(e)}</text>`})}renderRing(e,t,a,s,o){let i={width:bg*this.type.size.glyph,height:$g*this.type.size.glyph},l=d=>({width:(vg+(d.isRetrograde===!0?Lg:0))*this.type.size.degree,height:wg*this.type.size.degree}),c=zt(i.width,t);return It(e,d=>d.longitude,(d,h)=>Math.max(c,zt((l(d).width+l(h).width)/2,a(90,i,l(d))))).map(({item:d,longitude:h,displayLongitude:b})=>{let L=this.toAngle(b),v=B(ve,ve,t,L),E=B(ve,ve,a(L,i,l(d)),L),Q=R(d.name)??y(d,"name"),$e=d.isRetrograde===!0,nt=typeof d.house=="number"?` · ${this.t("House {{n}}",{n:d.house})}`:"",gr=`${y(d,"name")}${$e?` ${this.t("retrograde")}`:""} - ${jt(h)} ${y(d,"sign")}${nt}`,Ur=Math.abs(b-h)>.5,Zr=B(ve,ve,t+(o===1?Pc:-Pc),this.toAngle(h)),Wr=B(ve,ve,t+(o===1?_c:-_c),L);return S.svg`<g>
110
+ `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(a=>a.longitude):Array.from({length:12},(a,s)=>this.getAscendant()+s*30)).map(a=>{let s=this.toAngle(a),o=B(U,U,Ms,s),i=B(U,U,ys,s);return $.svg`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}renderSigns(){return Oe.map((e,t)=>{let a=this.toAngle(t*30+15),s=B(U,U,gi,a);return $.svg`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Z(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((a,s)=>{let o=e[(s+1)%12],i=rn(a.longitude,o?o.longitude:a.longitude+30),l=B(U,U,Ms-12,this.toAngle(i));return $.svg`<text class="house-num" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${a.number}</text>`});let t=this.getAscendant();return Array.from({length:12},(a,s)=>{let o=this.toAngle(t+s*30+15),i=B(U,U,Ms-12,o),l=s+1;return $.svg`<text class="house-num" x=${i.x} y=${i.y} text-anchor="middle" dominant-baseline="central">${l}</text>`})}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let a=this.toAngle(t),s=t%30===0,o=s?gi-14:ys-5,i=B(U,U,o,a),l=B(U,U,ys,a);e.push($.svg`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(t=>{let a=this.toAngle(t.longitude),s=B(U,U,Ms+9,a);return $.svg`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${jt(t.longitude)}</text>`}):$.nothing}renderPlanets(e){let t=this.type.size.degree>yi.degree,a=rg*this.type.size.glyph,s={width:a,height:a},o=b=>({width:((t?sg:ag)+(b?ng:0))*this.type.size.degree,height:og*this.type.size.degree}),i=(b,L,v)=>{let E=o(b.isRetrograde===!0),Q=Es-or(L,s,E,Xt);return v===0?Q:Math.min(Q,Math.max(Q-lg,to+Xt+hl(L,E)))},l=zt(a,Es),c=o(!0),p=Math.max(l,zt(c.width,Es-or(90,s,c,Xt))/2),d=It(e,b=>b.longitude,p),h=gl(d,({item:b,displayLongitude:L},v)=>{let E=this.toAngle(L);return{...B(U,U,i(b,E,v),E),...o(b.isRetrograde===!0)}});return d.map((b,L)=>{let{item:v,longitude:E,displayLongitude:Q}=b,$e=this.toAngle(E),nt=this.toAngle(Q),gr=B(U,U,Es,nt),Ur=B(U,U,i(v,nt,h[L]??0),nt),Zr=B(U,U,ys-4,$e),Wr=B(U,U,Es+8,nt),vs=y(v,"name"),Is=R(v.name)??vs,Mi=v.isRetrograde===!0,Ei=jt(v.longitude),tp=t?`${Nt(v.longitude).degree}°`:Ei,rp=Math.abs(Q-E)>.5;return $.svg`<g>
111
+ ${rp?$.svg`<line class="planet-leader" x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:$.nothing}
112
+ <text class="planet-glyph" x=${gr.x} y=${gr.y} text-anchor="middle" dominant-baseline="central"><title>${vs}${Mi?` ${this.t("retrograde")}`:""} - ${Ei} ${y(v,"sign")}</title>${Is}</text>
113
+ <text class="planet-deg" x=${Ur.x} y=${Ur.y} text-anchor="middle" dominant-baseline="central">${tp}${Mi?$.svg`<tspan class="retro"> ℞</tspan>`:$.nothing}</text>
114
+ </g>`})}renderPositionDetails(e){return $.html`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${(0,fi.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return $.nothing;let a=Xs(e,"retrogradePlanets");return $.html`<div class="details" part="details">${e?.dominantElement||e?.dominantModality?$.html`<div class="pill-row">${e.dominantElement?$.html`<span class="pill">${this.t("Dominant element")}: ${y(e,"dominantElement")}</span>`:$.nothing} ${e.dominantModality?$.html`<span class="pill">${this.t("Dominant modality")}: ${y(e,"dominantModality")}</span>`:$.nothing}</div>`:$.nothing} ${t?$.html`<div class="pill-row"><span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:t.neutral})}</span></div>`:$.nothing} ${a.length>0?$.html`<div class="pill-row">${a.map(({value:s,label:o})=>{let i=R(s)??"";return $.html`<span class="pill pill--muted">${i} ${o} R</span>`})}</div>`:$.nothing} ${t?.summary&&!this.hideReadings?$.html`<p class="summary">${t.summary}</p>`:$.nothing} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return $.nothing;let t=["Fire","Earth","Air","Water"],a=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},o={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},i=Oe,l=this.data?.summary,c={};for(let L of t)c[L]={Cardinal:[],Fixed:[],Mutable:[]};let p=0;for(let L of e){let v=i.indexOf(H(L.sign??""));if(v<0)continue;let E=t[v%4],Q=a[v%3],$e=R(L.name)??y(L,"name");c[E]?.[Q]?.push($e),p++}if(p===0)return $.nothing;let d=L=>t.reduce((v,E)=>v+(c[E]?.[L]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([L,v])=>({label:s[H(L)]??L,count:v})),...Object.entries(l?.modalityDistribution??{}).map(([L,v])=>({label:o[H(L)]?.full??L,count:v}))],b=Object.values(l?.elementDistribution??{}).reduce((L,v)=>L+v,0);return $.html`${h.length?$.html`<section class="block" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p>${this.t("{{count}} planets",{count:b})}</p><div class="pill-row">${h.map(({label:L,count:v})=>$.html`<span class="pill">${L}: ${f(this.effectiveLang(),v,0)}</span>`)}</div></section>`:$.nothing}<div class="grid-scroll"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption>${this.t("All {{count}} bodies in the chart, placed by sign",{count:p})}</caption><thead><tr><th></th>${a.map(L=>$.html`<th scope="col" title="${o[L]?.full??L}">${o[L]?.abbr??L}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(L=>{let v=a.reduce((E,Q)=>E+(c[L]?.[Q]?.length??0),0);return $.html`<tr><th scope="row">${s[L]??L}</th>${a.map(E=>$.html`<td>${(c[L]?.[E]??[]).join(" ")}</td>`)}<td class="em-total">${v}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${a.map(L=>$.html`<td class="em-total">${d(L)}</td>`)}<td class="em-total">${p}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return $.nothing;let t=[...e].sort((a,s)=>($c[a.kind]??9)-($c[s.kind]??9)||(s.tightness??0)-(a.tightness??0));return $.html`<section class="block" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(a=>this.renderPattern(a))}</section>`}renderPattern(e){let t=e.planets??[],a=e.apex?[...t].sort((s,o)=>+(o===e.apex)-+(s===e.apex)):t;return $.html`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?$.html`<span class="pattern-tag">${e.element}</span>`:$.nothing} ${e.modality?$.html`<span class="pattern-tag">${e.modality}</span>`:$.nothing} ${e.dissociate?$.html`<span class="pattern-tag" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:$.nothing} ${typeof e.tightness=="number"?$.html`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:_e(this.effectiveLang(),e.tightness,0)})}</span>`:$.nothing}</div><div class="pattern-planets">${a.map(s=>{let o=R(s),i=!!e.apex&&s===e.apex;return $.html`<span class="${i?"planet-chip apex":"planet-chip"}">${o?$.html`<span aria-hidden="true">${o}</span>`:$.nothing}${s}${i?$.html`<span class="apex-tag">${this.t("apex")}</span>`:$.nothing}</span>`})}</div>${e.interpretation&&!this.hideReadings?$.html`<p class="pattern-interp">${e.interpretation}</p>`:$.nothing}</div>`}renderAspectDetails(e){return e.length===0?$.nothing:$.html`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${(0,fi.ifDefined)(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let a=t.interpretation,s=R(t.name)??"",o=y(t,"name"),i=a.summary||a.detailed||"",l=a.summary?a.detailed:void 0;return{label:`${s} ${o}`.trim(),aside:`${y(t,"sign")} ${jt(t.longitude)}`,body:i,extra:$.html`${l?$.html`<p>${l}</p>`:$.nothing} ${Jr(a.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,t){let a=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let o=Ft(s.name);o&&a.set(o,s.longitude)}return t.map(s=>{let o=a.get(Ft(s.planet1)),i=a.get(Ft(s.planet2));if(o===void 0||i===void 0)return $.nothing;let l=B(U,U,to-2,this.toAngle(o)),c=B(U,U,to-2,this.toAngle(i)),p=$t(s),d=Ht[p]??"aspect-other",h=f(this.effectiveLang(),s.orb,1);return $.svg`<line class=${`aspect ${d}`} style=${us(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${y(s,"planet1")} ${y(s,"type",p)} ${y(s,"planet2")}${h?` (${this.t("Orb")} ${h}°)`:""}</title></line>`})}};hr.styles=[u,Ue,gs,ot,q,me,$.css`roxy-aspects-table::part(card),roxy-western-planets-table::part(card){box-shadow:none;border:0;padding:0}.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.title{overflow-wrap:anywhere;font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,680px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign-glyph{fill:var(--roxy-secondary,#475569);font-size:14px;font-family:var(--roxy-font-sans)}.planet-glyph{fill:var(--roxy-accent-ink,#b45309);font-size:14px;font-weight:600;font-family:var(--roxy-font-sans)}.planet-deg{fill:var(--roxy-fg,#0a0a0a);font-size:7px;font-family:var(--roxy-font-sans)}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:24px}.planet-deg{font-size:13px}.house-num{font-size:12px}}.planet-deg .retro{fill:var(--roxy-danger,#dc2626)}.planet-leader{stroke:var(--roxy-accent,#f59e0b);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted,#71717a);font-size:9px;font-family:var(--roxy-font-sans)}.cusp-deg{fill:var(--roxy-muted,#71717a);font-size:6px;font-family:var(--roxy-font-sans)}.tick{stroke:var(--roxy-border,#e4e4e7)}.tick-major{stroke:var(--roxy-secondary,#475569)}.angle-marker{fill:var(--roxy-accent-ink,#b45309);font-size:13px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.angle-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.legend{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.legend-swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.legend .caveat{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);padding:1px 8px}.grid-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table.aspect-grid{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem);margin:0 auto}table.aspect-grid th,table.aspect-grid td{text-align:center;border:1px solid var(--roxy-border,#e4e4e7);width:1.6rem;height:1.6rem;padding:0}table.aspect-grid th{color:var(--roxy-secondary,#475569);font-weight:var(--roxy-weight-bold,600)}table.aspect-grid td.cell{cursor:default}table.aspect-grid td.empty{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 18%, transparent)}table.aspect-grid td .asp{font-size:.95em;line-height:1}table.aspect-grid td.aspect-trine .asp,table.aspect-grid td.aspect-sextile .asp{color:var(--roxy-success,#16a34a)}table.aspect-grid td.aspect-square .asp,table.aspect-grid td.aspect-opposition .asp{color:var(--roxy-danger,#dc2626)}table.aspect-grid td.aspect-conjunction .asp{color:var(--roxy-accent-ink,#b45309)}table.aspect-grid td.aspect-other .asp{color:var(--roxy-muted,#71717a)}.details{margin-top:var(--roxy-space-md,1rem)}.pill-row{gap:var(--roxy-space-xs,.25rem);margin-bottom:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-fg,#0f172a) 8%, transparent);color:var(--roxy-fg,#0f172a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 15%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 15%, transparent);color:var(--_danger-fg)}.pill--muted{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.summary{color:var(--roxy-fg,#0f172a);font-size:var(--roxy-text-sm,.875rem);margin:var(--roxy-space-md,1rem) 0}.em-grid{border-collapse:collapse;font-size:var(--roxy-text-xs,.75rem);width:100%}.em-grid caption{caption-side:top;text-align:left;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);padding-bottom:var(--roxy-space-xs,.25rem)}.em-grid th,.em-grid td{border:1px solid var(--roxy-border,#e4e4e7);text-align:center;vertical-align:middle;padding:3px 5px}.em-grid th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.04em}.em-grid th[scope=row]{text-align:left}.em-grid td{color:var(--roxy-accent-ink,#b45309);min-width:1.4rem;font-size:.95em;line-height:1.4}.em-grid .em-total{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 25%, transparent)}.pattern{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem);gap:.35rem;display:grid}.pattern-head{flex-wrap:wrap;align-items:baseline;gap:.5rem;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold,600)}.pattern-tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a);text-transform:capitalize;padding:1px 8px}.pattern-tight{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.pattern-planets{flex-wrap:wrap;gap:.25rem;display:flex}.planet-chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.3rem;padding:1px 8px;display:inline-flex}.planet-chip.apex{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 20%, transparent);font-weight:var(--roxy-weight-bold,600)}.planet-chip .apex-tag{text-transform:uppercase;letter-spacing:.04em;font-size:.85em;font-weight:400}.pattern-interp{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.45}`],m([(0,fs.property)({type:String})],hr.prototype,"heading",2),m([(0,fs.state)()],hr.prototype,"view",2),hr=m([(0,fs.customElement)("roxy-natal-chart")],hr);var x=require("lit"),ao=require("lit/decorators.js");var dg=new Set([11,22,33]),cg=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Gr=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(pg[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,ro(e.number,e.type))} ${e.meaning?.description&&a?x.html`<p class="meaning">${e.meaning.description}</p>`:x.nothing} ${e.calculation?x.html`<pre class="calc" part="calculation">${e.calculation}</pre>`:x.nothing} ${e.hasKarmicDebt&&e.karmicDebtNumber?x.html`<div class="karmic" part="section karmic-debt">${this.t("Karmic debt")} ${e.karmicDebtNumber}. ${a?mg(e.karmicDebtMeaning):""}</div>`:x.nothing} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,ro(e.number,e.type))} ${e.dailyMessage&&a?x.html`<p class="meaning">${e.dailyMessage}</p>`:x.nothing} ${e.meaning?.description&&a?x.html`<p class="meaning">${e.meaning.description}</p>`:x.nothing} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?x.html`<p class="meaning">${e.guidance}</p>`:x.nothing}<dl class="attrs" part="details">${this.attr(this.t("Date"),A(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),bi(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),bi(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?x.html`<p class="meaning">${e.focus}</p>`:x.nothing}<dl class="attrs" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),bi(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let a=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?x.html`<p class="label">${e.cycle}</p>`:x.nothing} ${e.forecast&&a?x.html`<p class="meaning">${e.forecast}</p>`:x.nothing} ${a?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):x.nothing} ${e.advice&&a?x.html`<p class="meaning">${e.advice}</p>`:x.nothing}</article>`}renderChart(e,t){let a=Object.entries(e.coreNumbers??{}).filter(([,p])=>p),s=e.additionalInsights,o=e.luckyAssociations,i=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return x.html`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="label">${t}</p>${e.profile?.name?x.html`<h2 class="title">${e.profile.name}</h2>`:x.nothing} ${e.profile?.birthdate?x.html`<p class="label">${A(this.effectiveLang(),e.profile.birthdate)}</p>`:x.nothing}</div>${e.summary&&c?x.html`<p class="meaning">${e.summary}</p>`:x.nothing} ${a.length>0?x.html`<div class="cores" part="details cores">${a.map(([p,d])=>x.html`<div class="item"><div class="core-head"><span class="core-key">${D(p)}</span> <strong>${d.number??""}</strong></div>${d.meaning?.title?x.html`<span class="core-title">${d.meaning.title}</span>`:x.nothing} ${ro(d.number,d.type)?x.html`<span class="master">${this.t("Master")} ${d.number}</span>`:x.nothing}</div>`)}</div>`:x.nothing} ${this.renderInterpretation(a.map(([p,d])=>({label:D(p),aside:[d.number!=null?`${d.number}`:"",ro(d.number,d.type)?"master":"",d.hasKarmicDebt&&d.karmicDebtNumber?`karmic debt ${d.karmicDebtNumber}`:""].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:this.renderReading(d.meaning,`numerology-core-${p}`)})),"numerology-cores","Core numbers")} ${l?x.html`<dl class="attrs" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:x.nothing} ${i?x.html`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${i.title?x.html`<h4 class="sub-title">${[i.day?this.t("Day {{day}}",{day:i.day}):"",i.title].filter(Boolean).join(" · ")}</h4>`:x.nothing} ${i.description&&c?x.html`<p>${i.description}</p>`:x.nothing} ${this.renderReading(i,"numerology-birth-day-profile")}</section>`:x.nothing} ${s?this.renderInsights(s):x.nothing} ${o?x.html`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="attrs">${this.attr(this.t("Day"),o.day)} ${this.attr(this.t("Element"),o.element)} ${this.attr(this.t("Ruling planet"),o.rulingPlanet)} ${this.attr(this.t("Colors"),o.colors?.join(", "))} ${this.attr(this.t("Gemstones"),o.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),o.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),o.incompatibleNumbers?.join(", "))}</dl></section>`:x.nothing}</article>`}renderInsights(e){let t=e.karmicLessons,a=e.karmicDebt,s=e.personalYear,o=e.hiddenPassion,i=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),p=!this.hideReadings;return x.html`${t?x.html`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?x.html`<div class="chips">${t.missingNumbers.map(d=>x.html`<span>${this.t("Missing")} ${d}</span>`)}</div>`:x.html`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?x.html`<div class="chips">${c.map(([d,h])=>x.html`<span>${d} x ${h}</span>`)}</div>`:x.nothing} ${this.renderInterpretation((t.lessons??[]).map(d=>({label:d.lesson??`Lesson ${d.number}`,aside:d.number!=null?`${d.number}`:"",body:d.description??"",extra:d.howToOvercome?x.html`<p><strong>${this.t("How to overcome")}.</strong> ${d.howToOvercome}</p>`:x.nothing})),"numerology-karmic-lessons","Lessons")}</section>`:x.nothing}${a?.hasKarmicDebt?x.html`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${a.debtNumbers?.length?x.html`<div class="chips">${a.debtNumbers.map(d=>x.html`<span>${this.t("Debt")} ${d}</span>`)}</div>`:x.nothing} ${this.renderInterpretation((a.meanings??[]).map(d=>({label:`${this.t("Karmic debt")} ${d.number}`,body:d.description??"",extra:x.html`${d.challenge?x.html`<p><strong>${this.t("Challenge")}.</strong> ${d.challenge}</p>`:x.nothing}${d.resolution?x.html`<p><strong>${this.t("Resolution")}.</strong> ${d.resolution}</p>`:x.nothing}`})),"numerology-karmic-debt","Debts")}</section>`:x.nothing}${s?x.html`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4 class="sub-title">${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" · ")}</h4>${s.forecast&&p?x.html`<p>${s.forecast}</p>`:x.nothing} ${p?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):x.nothing} ${s.advice&&p?x.html`<p>${s.advice}</p>`:x.nothing} ${s.personalMonth?x.html`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" · ")}.</strong> ${p?s.personalMonth.focus??"":""}</p>`:x.nothing}</section>`:x.nothing}${e.pinnacles?.length&&p?x.html`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(d=>({label:[d.position!=null?`Pinnacle ${d.position}`:"Pinnacle",d.meaning?.title??""].filter(Boolean).join(" · "),aside:[d.number!=null?`${d.number}`:"",wc(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:this.renderLists(["Opportunities",d.meaning?.opportunities],["Challenges",d.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:x.nothing}${e.challenges?.length&&p?x.html`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(d=>({label:[d.position!=null?`Challenge ${d.position}`:"Challenge",d.meaning?.title??""].filter(Boolean).join(" · "),aside:[d.number!=null?`${d.number}`:"",wc(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:x.html`${d.meaning?.lesson?x.html`<p><strong>${this.t("Lesson")}.</strong> ${d.meaning.lesson}</p>`:x.nothing}${d.meaning?.howToOvercome?x.html`<p><strong>${this.t("How to overcome")}.</strong> ${d.meaning.howToOvercome}</p>`:x.nothing}`})),"numerology-challenges","Obstacle periods")}</section>`:x.nothing}${o||i?x.html`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${o?x.html`<div><h4 class="sub-title">${[o.number!=null?this.t("Hidden passion {{number}}",{number:o.number}):this.t("Hidden passion"),o.title??""].filter(Boolean).join(" · ")}</h4>${o.description&&p?x.html`<p>${o.description}</p>`:x.nothing} ${typeof o.count=="number"?x.html`<p class="label">${this.t("Appears {{count}} times in the name",{count:o.count})}</p>`:x.nothing}</div>`:x.nothing} ${i?x.html`<div><h4 class="sub-title">${[i.number!=null?this.t("Subconscious self {{number}}",{number:i.number}):this.t("Subconscious self"),i.title??""].filter(Boolean).join(" · ")}</h4>${i.description&&p?x.html`<p>${i.description}</p>`:x.nothing} ${i.uniqueNumbers?.length?x.html`<p class="label">${this.t("Numbers present: {{list}}",{list:tt(this.effectiveLang(),i.uniqueNumbers.map(String))})}</p>`:x.nothing}</div>`:x.nothing}</section>`:x.nothing}${l&&p?x.html`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:vi(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:vi(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:vi(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:x.nothing}`}renderHero(e,t,a,s=!1){return x.html`<div class="hero" part="header">${typeof t=="number"?x.html`<div class="numeral">${t}</div>`:x.nothing}<div><p class="label">${e}</p>${a?x.html`<h2 class="title">${a}</h2>`:x.nothing} ${s?x.html`<span class="master">${this.t("Master number")}</span>`:x.nothing}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return x.nothing;let a=cg.map(([s,o])=>({label:o,body:e[s]??""}));return x.html`${e.keywords?.length?x.html`<div class="chips">${e.keywords.map(s=>x.html`<span>${s}</span>`)}</div>`:x.nothing}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(a,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,a])=>a&&a.length>0);return t.length===0?x.nothing:x.html`<div class="lists">${t.map(([a,s])=>x.html`<div><h3>${this.t(a)}</h3><ul>${(s??[]).map(o=>x.html`<li>${o}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?x.nothing:x.html`<div class="attr"><dt>${e}</dt><dd>${t}</dd></div>`}};Gr.styles=[u,q,me,x.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.numeral{font-size:4rem;line-height:1;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.meaning{color:var(--roxy-fg,#0a0a0a);margin:0}.master{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);margin-top:2px;padding:2px 10px;display:inline-block}.calc{font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 30%, transparent);padding:var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-sm,4px);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.cores{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.cores .item{font-size:var(--roxy-text-sm,.875rem);gap:2px;display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs,.25rem);display:flex}.cores .item .core-key{color:var(--roxy-muted,#71717a);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600)}.cores .item .core-title{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{gap:var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-sm,.875rem);margin:0;padding-left:1.1rem;line-height:1.6;display:grid}.sub{gap:var(--roxy-space-sm,.5rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);display:grid}.sub>h3{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.sub-title{font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);margin:0}.sub p{font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.attrs{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));margin:0;display:grid}.attr{gap:2px;display:grid}.attr dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.attr dd{font-size:var(--roxy-text-sm,.875rem);margin:0;font-weight:500}.karmic{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 12%, transparent);border:1px solid color-mix(in srgb, var(--roxy-warning,#ea580c) 32%, transparent);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}`],m([(0,ao.property)({type:String,reflect:!0})],Gr.prototype,"type",2),Gr=m([(0,ao.customElement)("roxy-numerology-card")],Gr);var pg={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function mg(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function ro(n,r){return r==="master"||n!==void 0&&dg.has(n)}function bi(n,r){return[n!=null?`${n}`:"",r??""].filter(Boolean).join(" · ")}function wc(n,r){return n==null?"":r==null?`ages ${n} onward`:`ages ${n} to ${r}`}function vi(n,r){return[n??"",r!=null?`${r}`:""].filter(Boolean).join(" · ")}var ae=require("lit"),so=require("lit/decorators.js");function Li(...n){return n.filter(Boolean).join(" · ")}function $i(...n){return n.filter(Boolean).join(", ")}var Or=class extends g{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,a="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],o=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],i=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return ae.html`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2 class="title">${this.t("Panchang")}</h2><span class="date">${t?A(this.effectiveLang(),t.date):""}</span></header><table part="table"><tbody>${this.limbs(e,t).map(p=>this.renderLimbRow(p))} ${t?ae.html`${this.renderRow(this.t("Sunrise"),yt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),yt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),yt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),yt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:a?ae.html`${this.renderRow(this.t("Sun"),this.formatLongitude(a.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(a.moonLongitude))}`:ae.nothing}</tbody></table>${t?this.renderTransitions(t.transitions):ae.nothing} ${c?ae.html`<div class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</div><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(p=>!!p[1]),...o])}</tbody></table><div class="section" part="section inauspicious">${this.t("Inauspicious periods")}</div><table part="table inauspicious"><tbody>${this.renderPeriodRows([...i.filter(p=>!!p[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:ae.nothing}</div>`}limbs(e,t){let a=e.tithi,s=e.nakshatra,o=e.yoga,i=e.karana,l=[{label:this.t("Tithi"),value:$i(a?.name,a?.paksha?`${a.paksha} paksha`:void 0),meta:Li(a?.rulingPlanet?`Ruled by ${a.rulingPlanet}`:void 0,a?.deity?`Deity ${a.deity}`:void 0,a?.element,typeof a?.percent=="number"?`${_e(this.effectiveLang(),a.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:$i(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:Li(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:o?.name??"",meta:o?.characteristics??""},{label:this.t("Karana"),value:$i(i?.name,i?.type),meta:i?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:ws(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return ae.html`<tr><th>${e.label}</th><td>${e.value}${e.meta?ae.html`<small>${e.meta}</small>`:ae.nothing}</td></tr>`}renderRow(e,t){return t?ae.html`<tr><th>${e}</th><td>${t}</td></tr>`:ae.nothing}renderTransitions(e){return e?ae.html`<div class="section" part="section transitions">${this.t("Next transitions")}</div><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:ae.nothing}renderPeriodRows(e){return e.map(([t,a])=>{let s=Wt(this.effectiveLang(),a);return s?ae.html`<tr><th>${t}</th><td>${s}</td></tr>`:ae.nothing})}expandWindows(e,t){return!t||t.length===0?[]:t.map((a,s)=>[t.length>1?`${e} ${s+1}`:e,a])}renderBhadraRow(e){if(!e)return ae.nothing;let t=this.formatSpan(e.startsAt,e.endsAt);return ae.html`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:ae.html`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return ae.nothing;let t=this.formatSpan(e.startsAt,e.endsAt);return ae.html`<tr><th>${this.t("Panchaka")}</th><td>${e.active?ae.html`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?ae.html`<small>${t}</small>`:ae.nothing}`:ae.html`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?ae.nothing:ae.html`<div class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</div><table part="table balams"><tbody>${e?ae.html`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"good")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:ae.nothing} ${t?ae.html`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"good")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"bad")}</td></tr>`:ae.nothing}</tbody></table>`}renderChips(e,t){return e?.length?ae.html`<div class="chips">${e.map(a=>ae.html`<span class="chip ${t}">${a}</span>`)}</div>`:ae.html`<span class="quiet">${this.t("None")}</span>`}renderTransitionRow(e,t){if(!t?.endsAt)return ae.nothing;let a=yt(this.effectiveLang(),t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:a,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:a,next:t.next}):this.t("ends {{time}}",{time:a});return ae.html`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?ae.html`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:yt(this.effectiveLang(),e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:yt(this.effectiveLang(),e.changesAt)})}</td></tr>`:ae.nothing}formatSpan(e,t){let a=Wt(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!a||!e||!t||e.slice(0,10)===t.slice(0,10)?a:this.t("{{range}} (ends {{date}})",{range:a,date:A(this.effectiveLang(),t)})}formatRashi(e){return ws(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?Li(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=Wt(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?it(e):""}};Or.styles=[u,ae.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);justify-content:space-between;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.date{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}tbody tr:nth-child(odd){background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 24%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;vertical-align:top}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;width:38%}td{color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums}td small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:normal;margin-top:2px;line-height:1.5;display:block}.section{border-top:1px solid var(--roxy-border,#e4e4e7);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.quiet{color:var(--roxy-muted,#71717a)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;margin-top:4px;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);padding:1px 8px}.chip.good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 14%, transparent);color:var(--_success-fg)}.chip.bad{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}`],m([(0,so.property)({type:String,reflect:!0})],Or.prototype,"detail",2),Or=m([(0,so.customElement)("roxy-panchang-table")],Or);var ce=require("lit"),no=require("lit/decorators.js");var Br=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),a=t.cols;return ce.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.heading||t.title}</h2>${t.badges.length?ce.html`<div class="badges" part="details">${t.badges.map(s=>ce.html`<span class="badge"><b>${s.label}</b> ${s.value}</span>`)}</div>`:ce.nothing}</header>${t.summary&&!this.hideReadings?ce.html`<p class="summary">${t.summary}</p>`:ce.nothing}<div class="scroll" part="table"><table><caption>${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${a.natal?ce.html`<th scope="col">${this.t("Natal")}</th>`:ce.nothing} ${a.house?ce.html`<th scope="col" class="num">${this.t("House")}</th>`:ce.nothing} ${a.motion?ce.html`<th scope="col">${this.t("Motion")}</th>`:ce.nothing} ${a.formula?ce.html`<th scope="col">${this.t("Formula")}</th>`:ce.nothing}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,a))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let a=R(e.label);return ce.html`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${a?ce.html`<span class="glyph">${a}</span>`:ce.nothing}${e.label}</td><td>${this.signCell(e.sign,e.degree)}</td>${t.natal?ce.html`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):ce.html`—`}</td>`:ce.nothing} ${t.house?ce.html`<td class="num">${e.house!=null?e.house:ce.html`—`}</td>`:ce.nothing} ${t.motion?ce.html`<td>${e.speed!=null?ce.html`${f(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?ce.html`<span class="retro">℞</span>`:ce.nothing}`:ce.html`—`}</td>`:ce.nothing} ${t.formula?ce.html`<td class="formula">${e.formula??ce.html`—`}</td>`:ce.nothing}</tr>`}signCell(e,t){let a=Z(e);return ce.html`<span class="sign">${a?ce.html`<span class="sg">${a}</span>`:ce.nothing}${Kt(t)} ${e}</span>`}signFromLongitude(e){let t=Nt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(a=>a.interpretation).map(a=>({label:`${R(a.label)??""} ${a.label}`.trim(),aside:`${a.sign} ${Kt(a.degree)}`.trim(),body:a.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.asteroids.map(a=>({label:a.name,sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.lilith.map(a=>({label:this.t("{{variant}} apogee",{variant:H(a.variant)}),sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${f(this.effectiveLang(),e.solarArc,2)}°`},{label:this.t("Directed to"),value:A(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:!1,motion:!1,formula:!1,natal:!0},rows:e.directed.map(a=>({label:a.name,sign:a.sign,degree:a.degree,natalLongitude:a.natalLongitude,interpretation:a.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:H(e.sect)}]:[],summary:e.summary,cols:{house:!1,motion:!1,formula:!0,natal:!1},rows:e.lots.map(a=>({label:a.name,sign:a.sign,degree:a.degree,formula:a.formula,interpretation:a.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,degree:e.ascendant.degree,isAngle:!0}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,degree:e.midheaven.degree,isAngle:!0}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:A(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:f(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:[...t,...e.planets.map(a=>({label:a.name,sign:a.sign,degree:a.degree,house:a.house,speed:a.speed,isRetrograde:a.isRetrograde,interpretation:a.interpretation}))]}}};Br.styles=[u,q,me,ce.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{align-items:baseline;gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badges{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}caption{text-align:left;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);padding-bottom:var(--roxy-space-xs,.25rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:6px 10px}th{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:var(--roxy-text-xs,.75rem)}td.num{text-align:right;font-variant-numeric:tabular-nums}.body-cell{color:var(--roxy-fg,#0a0a0a);font-weight:500}.body-cell .glyph{color:var(--roxy-accent-ink,#b45309);margin-right:.35rem}tr.angle td{color:var(--roxy-secondary,#475569)}.sign{align-items:baseline;gap:.3rem;display:inline-flex}.sign .sg{color:var(--roxy-secondary,#475569)}.retro{color:var(--roxy-danger,#dc2626);margin-left:.3em;font-weight:600}.formula{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;white-space:normal}`],m([(0,no.property)({type:String})],Br.prototype,"heading",2),Br=m([(0,no.customElement)("roxy-positions-table")],Br);var ct=require("lit"),kc=require("lit/decorators.js");var qa=class extends g{renderData(r){let e=Z(r.profectedSign),t=R(r.lordOfYear),a=Z(r.lordNatalPosition?.sign);return ct.html`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Annual profection")}</h2>${r.targetDate?ct.html`<span class="badge"><b>${this.t("For")}</b> ${A(this.effectiveLang(),r.targetDate)}</span>`:ct.nothing}</header><div class="focus" part="details"><div class="age"><span class="n">${r.age}</span> <span class="l">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${r.profectedHouse}</span> <span class="sign">${e?ct.html`<span class="sg">${e}</span>`:ct.nothing}${r.profectedSign}</span></div></div><div class="lord" part="details"><span class="label">${this.t("Lord of the year")}</span> <span class="value">${t?ct.html`${t}`:ct.nothing}${r.lordOfYear}</span> ${r.lordNatalPosition?ct.html`<span class="sub">${this.t("Natal")} ${a?ct.html`<span>${a}</span>`:ct.nothing}${this.t("{{sign}} · house {{house}}",{sign:r.lordNatalPosition.sign,house:r.lordNatalPosition.house})}</span>`:ct.nothing}</div>${r.interpretation&&!this.hideReadings?ct.html`<p class="interp">${r.interpretation}</p>`:ct.nothing}</div>`}};qa.styles=[u,ct.css`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}header{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.badge b{color:var(--roxy-accent-ink,#b45309);font-weight:600}.focus{align-items:center;gap:var(--roxy-space-md,1rem);padding:var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-md,8px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 9%, transparent);flex-wrap:wrap;display:flex}.age{justify-items:center;min-width:4.5rem;display:grid}.age .n{color:var(--roxy-accent-ink,#b45309);font-variant-numeric:tabular-nums;font-size:2rem;font-weight:700;line-height:1}.age .l{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.arrow{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.house{gap:2px;display:grid}.house .h{font-size:var(--roxy-text-lg,1.125rem);color:var(--roxy-fg,#0a0a0a);font-weight:600}.house .sign{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.house .sign .sg{margin-right:.3rem}.lord{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4rem .75rem;display:flex}.lord .label{color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-size:var(--roxy-text-xs,.75rem)}.lord .value{color:var(--roxy-fg,#0a0a0a);font-weight:600}.lord .sub{color:var(--roxy-muted,#71717a)}.interp{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);line-height:var(--roxy-leading-normal,1.5);margin:0}`],qa=m([(0,kc.customElement)("roxy-profection-card")],qa);var lt=require("lit"),Rc=require("lit/decorators.js");var Cc=["name","english","title"],hg=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),gg=new Set(["id","symbol",...Cc]),Sc=48;function ug(n){return D(n).toLowerCase().replace(/\s+/g,"-")}function yg(n){return Object.values(os(n)).filter(r=>typeof r=="string"||typeof r=="number").map(String).join(" · ")}var Ya=class extends g{renderData(r){let e=os(r),t=this.deriveTitle(e),a=typeof e.symbol=="string"?e.symbol:void 0,s=Array.isArray(e.keywords)?e.keywords.map(String):[],o=[],i=[],l=[],c=(d,h,b)=>{if(h!=null){if(Array.isArray(h)){let L=h.filter(v=>v!=null).map(v=>typeof v=="object"?yg(v):String(v)).filter(v=>v.length>0);L.length>0&&i.push([d,L,L.some(v=>v.length>Sc)])}else if(typeof h=="string")hg.has(d)||h.length>Sc?o.push([d,h]):l.push([d,h]);else if(typeof h=="number"||typeof h=="boolean")l.push([d,String(h)]);else if(typeof h=="object"&&b<2)for(let[L,v]of Object.entries(os(h)))c(`${d} ${L}`,v,b+1)}};for(let[d,h]of Object.entries(e))gg.has(d)||d==="keywords"&&Array.isArray(h)||c(d,h,0);let p=!this.hideReadings;return lt.html`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${a?lt.html`<span class="symbol" aria-hidden="true">${a}</span>`:lt.nothing}<div><p class="label">${this.t("Reference")}</p><h2 class="name">${t}</h2></div></header>${s.length>0&&p?lt.html`<div class="chips">${s.map(d=>lt.html`<span>${d}</span>`)}</div>`:lt.nothing} ${p?o.map(([d,h])=>lt.html`<p class="prose"><span class="prose-label">${Pe(this.effectiveLang(),d)}</span>${h}</p>`):lt.nothing} ${l.length>0?lt.html`<div class="facts-wrap" part="details"><dl class="facts">${l.map(([d,h])=>lt.html`<div class="fact"><dt>${Pe(this.effectiveLang(),d)}</dt><dd>${h}</dd></div>`)}</dl></div>`:lt.nothing} ${i.map(([d,h,b])=>b&&!p?lt.nothing:lt.html`<div class="list" part="section ${ug(d)}"><h3>${Pe(this.effectiveLang(),d)}</h3><div class="chips">${h.map(L=>lt.html`<span>${L}</span>`)}</div></div>`)}</article>`}deriveTitle(r){for(let a of Cc)if(typeof r[a]=="string")return r[a];let e=typeof r.type=="string"?D(r.type):"",t=r.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Ya.styles=[u,lt.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);display:flex}.symbol{color:var(--roxy-accent-ink,#b45309);flex:none;font-size:2.5rem;line-height:1}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.prose{margin:0;line-height:1.6}.prose .prose-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px;display:block}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.list h3,.facts-wrap h3{margin:0 0 var(--roxy-space-xs,.25rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));margin:0;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}`],Ya=m([(0,Rc.customElement)("roxy-reference-card")],Ya);var Qe=require("lit"),Tc=require("lit/decorators.js"),Ac=require("lit/directives/if-defined.js");var Dc=n=>R(n)??"",Ua=class extends g{renderData(r){let e=r.changes,t=["latitude","longitude"];return Qe.html`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${(0,Ac.ifDefined)(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${r}"></roxy-natal-chart><section class="changes" part="card changes"><h3 class="title">${this.t("What changes at this location")}</h3>${r.relocation?Qe.html`<dl class="roxy-facts" part="details">${t.map(a=>Qe.html`<div><dt>${Pe(this.effectiveLang(),a==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${f(this.effectiveLang(),r.relocation[a],5)}</dd></div>`)}</dl>`:Qe.nothing}<div class="move" part="details">${typeof e?.distanceKm=="number"?Qe.html`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:j(this.effectiveLang(),e.distanceKm),direction:e.direction?ge(this.effectiveLang(),"direction",H(e.direction),e.direction):""})}</span>`:Qe.nothing} ${e?Qe.html`<span>${r.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:y(r.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:y(r.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:Qe.nothing}</div>${r.interpretation?.summary&&!this.hideReadings?Qe.html`<p class="summary">${r.interpretation.summary}</p>`:Qe.nothing} ${e?.angularPlanets?.length?Qe.html`<div part="section angular-planets"><p class="block-label">${this.t("Angular planets here")}</p><div class="chips">${Xs(e,"angularPlanets").map(({value:a,label:s})=>Qe.html`<span class="chip">${Dc(a)} ${s}</span>`)}</div></div>`:Qe.nothing}<div part="section house-changes"><p class="block-label">${this.t("Planets that change house")}</p>${e?.planetsChangedHouse?.length?Qe.html`<ul class="moves-list">${e.planetsChangedHouse.map(a=>Qe.html`<li>${Dc(a.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(a,"planet"),from:a.natalHouse,to:a.relocatedHouse})}</li>`)}</ul>`:Qe.html`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</div></section></div>`}};Ua.styles=[u,ds,Qe.css`.stack{gap:var(--roxy-space-md,1rem);display:grid}.changes{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.move{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.summary{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0}.block-label{font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0 0 var(--roxy-space-xs,.25rem);font-weight:600}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chip{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 10px}.moves-list{gap:2px;margin:0;padding:0;list-style:none;display:grid}.moves-list li{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.moves-list .arrow{color:var(--roxy-muted,#71717a)}.empty-note{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);margin:0}`],Ua=m([(0,Tc.customElement)("roxy-relocation-wheel")],Ua);var Dt=require("lit"),zc=require("lit/decorators.js");var wi=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info, #0284c7)"},{key:"digBala",source:"Dig",color:"var(--roxy-success, #16a34a)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning, #ea580c)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent, #f59e0b)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary, #475569)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger, #dc2626)"}],Za=class extends g{renderData(r){if(!r.planets?.length)return this.renderEmpty();let e=[...r.planets].sort((t,a)=>t.relativeRank-a.relativeRank);return Dt.html`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${be(this.effectiveLang(),r.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${wi.map(t=>Dt.html`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(r){let e=R(r.planet)??"",t=wi.map(c=>Math.max(0,r[c.key])),a=t.reduce((c,p)=>c+p,0),s=typeof r.strengthRatio=="number"&&r.strengthRatio>=1,o=s?"adequacy-badge--adequate":"adequacy-badge--weak",i=s?this.t("Adequate"):this.t("Weak"),l=f(this.effectiveLang(),r.totalRupas,2)&&f(this.effectiveLang(),r.minRequired,2)?`${f(this.effectiveLang(),r.totalRupas,2)} / ${f(this.effectiveLang(),r.minRequired,2)} R`:"";return Dt.html`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:r.planet})}"><div class="planet-label"><span class="glyph" aria-hidden="true">${e}</span> ${r.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:r.relativeRank})}">#${r.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:r.planet})}">${a>0?wi.map((c,p)=>{let d=t[p];if(d<=0)return Dt.nothing;let h=d/a*100;return Dt.html`<div class="bar-segment" style="flex-grow:${h};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:f(this.effectiveLang(),d,1)})}"></div>`}):Dt.nothing}</div>${this.renderPhala(r)}</div><div class="pills">${l?Dt.html`<span class="rupas-label">${l}</span>`:Dt.nothing} <span class="${`adequacy-badge ${o}`}">${i}</span></div></div>`}renderPhala(r){let e=typeof r.ishtaPhala=="number"?r.ishtaPhala:0,t=typeof r.kashtaPhala=="number"?r.kashtaPhala:0;if(e+t<=0)return Dt.nothing;let a=f(this.effectiveLang(),e,1)||"0",s=f(this.effectiveLang(),t,1)||"0";return Dt.html`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:a,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:a})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Za.styles=[u,ee,Dt.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.planet-row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);grid-template-columns:8rem 1fr auto;display:grid}.planet-row:last-of-type{border-bottom:none}.planet-label{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:6px;display:flex}.glyph{font-size:1.2em;line-height:1}.bar-wrap{flex-direction:column;gap:4px;display:flex}.bar{border-radius:var(--roxy-radius-sm,4px);background:var(--roxy-border,#e4e4e7);height:12px;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1))}.pills{flex-direction:column;align-items:flex-end;gap:4px;display:flex}.rupas-label{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);height:6px;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success,#16a34a)}.phala-kashta{background:var(--roxy-danger,#dc2626)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}.adequacy-badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 6px;display:inline-block}.adequacy-badge--adequate{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.adequacy-badge--weak{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.rank-badge{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.legend-row{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);align-items:center;gap:6px;display:flex}.legend-swatch{border-radius:var(--roxy-radius-sm,4px);flex-shrink:0;width:10px;height:10px;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:6rem 1fr}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Za=m([(0,zc.customElement)("roxy-shadbala-table")],Za);var S=require("lit"),Ic=require("lit/decorators.js");var fg=12,Si=680,ve=Si/2,oo=204,xg=186,Mc=160,Ec=258,bg=212,ki=224,io=86,Pc={glyph:18,degree:10},vg=1.3,Lg=1.85,$g=1.25,wg=.95,kg=.9,_c=8,Nc=4,Wa=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.type=new Ir(this,{glyph:[".p1",Pc.glyph],degree:[".planet-deg",Pc.degree]})}renderData(e){let{person1:t,person2:a,compatibilityScore:s,analysis:o}=e,i=e.interAspects??[],l=t?.planets??[],c=a?.planets??[],p=typeof s=="number"?Math.round(s):void 0,d=o?.overall,h=o?.strengths??[],b=o?.challenges??[],L=l.length>0&&c.length>0,v=[...i].sort((Q,$e)=>($e.strength??0)-(Q.strength??0)),E=v.slice(0,fg);return S.html`<div class="wrap" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2 class="title">${this.t("Synastry")}</h2>${typeof p=="number"?S.html`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:p})}">${p} / 100</span>`:S.nothing}</div>${this.renderPeople(t,a)} ${L?S.html`${this.viewport.renderChartViewport(S.html`<svg viewBox="0 0 ${Si} ${Si}" part="chart" role="img" aria-label="${this.t("Dual chart wheel comparing two natal charts")}"><title>${this.t("Synastry dual wheel")}</title><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${oo}" stroke-width="1.5"/><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${oo-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${ve}" cy="${ve}" r="${io}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,i)} ${this.renderRing(l,Mc,(Q,$e,nt)=>Mc-or(Q,$e,nt,Xt),"p1",1)} ${this.renderRing(c,Ec,(Q,$e,nt)=>Ec+or(Q,$e,nt,Xt),"p2",2)} ${this.renderAscendants(e)}</svg>`,this.t("Synastry dual wheel"),this.translator)}<div class="legend-row" part="legend"><span><span class="swatch" style="background:var(--roxy-accent)"></span>${this.t("Person 1")}</span> <span><span class="swatch" style="background:var(--roxy-info)"></span>${this.t("Person 2")}</span> <span><span class="swatch" style="background:var(--roxy-success)"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch" style="background:var(--roxy-danger)"></span>${this.t("Challenging aspects")}</span> <span class="caveat">${this.t("Sign sectors, not houses")}</span></div>`:S.html`<div class="missing-planets" role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</div>`} ${this.renderOverlay(t,a)} ${this.renderSummaryPills(e.summary)} ${d&&!this.hideReadings?S.html`<p class="summary">${d}</p>`:S.nothing} ${E.length>0?S.html`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${E.map((Q,$e)=>this.renderAspectCard(Q,$e))}</section>`:S.nothing} ${v.length>E.length?this.renderCatalog(v):S.nothing} ${!this.hideReadings&&(h.length>0||b.length>0)?S.html`<div class="lists" part="section strengths-challenges">${h.length?S.html`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(Q=>S.html`<li>${Q}</li>`)}</ul></div>`:S.nothing} ${b.length?S.html`<div><h3>${this.t("Challenges")}</h3><ul>${b.map(Q=>S.html`<li>${Q}</li>`)}</ul></div>`:S.nothing}</div>`:S.nothing}</div>`}renderPeople(e,t){let a=(o,i)=>{if(!o)return S.nothing;let l=o.ascendant,p=[["Sun",o.sunSign??"",y(o,"sunSign")],["Moon",o.moonSign??"",y(o,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Kt(l.degree)}`:""]].filter(([,,d])=>d);return p.length===0?S.nothing:S.html`<div class="person"><span class="person-name"><span class="person-dot p${i}" aria-hidden="true"></span> ${o.name||this.t("Person {{n}}",{n:i})}</span><div class="big-three">${p.map(([d,h,b])=>S.html`<span><span class="lbl">${this.t(d)}</span> <span aria-hidden="true">${Z(h)??""}</span> ${b}</span>`)}</div></div>`},s=[a(e,1),a(t,2)].filter(o=>o!==S.nothing);return s.length===0?S.nothing:S.html`<div class="people">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return S.nothing;let a=(i,l)=>i?.name||this.t("Person {{n}}",{n:l}),s=a(e,1),o=a(t,2);return S.html`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,o,1)} ${this.renderOverlayTable(t.planets,o,s,2)}</section>`}renderOverlayTable(e,t,a,s){let o=e.filter(l=>typeof l.houseInOtherChart=="number");if(o.length===0)return S.nothing;let i=`overlay-${s}`;return S.html`<div class="overlay-dir"><h4 id="${i}"><span class="person-dot p${s}" aria-hidden="true"></span> ${this.t("{{first}} in the houses of {{second}}",{first:t,second:a})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${i}"><table aria-labelledby="${i}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${o.map(l=>S.html`<tr><td><span aria-hidden="true">${R(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?S.html`<span class="retro" title="${this.t("retrograde")}">℞</span>`:S.nothing}</td><td><span aria-hidden="true">${Z(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Kt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryPills(e){if(!e||typeof e!="object")return S.nothing;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return typeof e.total!="number"&&t.length===0?S.nothing:S.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?S.html`<span class="pill">${this.t("Total")}: ${e.total}</span>`:S.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill">${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([a,s])=>S.html`<span class="pill">${Ke({type:a})}: ${s}</span>`)}</div>`}renderAspectCard(e,t){let a=R(e.planet1)??"",s=R(e.planet2)??"",o=(e.interpretation??"neutral").toLowerCase(),i=e.meaning,l=S.html`<span class="interp-lead"><span aria-hidden="true" class="glyph">${a}</span>${y(e,"planet1")} <span class="asp-name ${o}">${y(e,"type",Ke(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${y(e,"planet2")}</span>`,c=S.html`<span class="interp-aside"><small>${this.t("orb {{orb}}° · str {{strength}}",{orb:f(this.effectiveLang(),e.orb,2),strength:f(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?S.html`<div class="interp-card" part="reading"><div class="static-head">${l}${c}</div></div>`:S.html`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${l}${pe()}${c}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return S.html`<div class="interp-body">${e.relationshipContext?S.html`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:S.nothing} ${e.description?.short?S.html`<p>${e.description.short}</p>`:S.nothing} ${e.description?.long&&e.description.long!==e.description.short?S.html`<p>${e.description.long}</p>`:S.nothing} ${Jr(e.keywords)}</div>`}renderCatalog(e){return S.html`<details class="catalog"><summary>${pe()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}toAngle(e){return 180-e}renderSpokes(){return Array.from({length:12},(e,t)=>{let a=this.toAngle(t*30),s=B(ve,ve,io,a),o=B(ve,ve,oo,a);return S.svg`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderSigns(){return Oe.map((e,t)=>{let a=this.toAngle(t*30+15),s=B(ve,ve,xg,a);return S.svg`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Z(e)}</text>`})}renderRing(e,t,a,s,o){let i={width:vg*this.type.size.glyph,height:wg*this.type.size.glyph},l=d=>({width:(Lg+(d.isRetrograde===!0?$g:0))*this.type.size.degree,height:kg*this.type.size.degree}),c=zt(i.width,t);return It(e,d=>d.longitude,(d,h)=>Math.max(c,zt((l(d).width+l(h).width)/2,a(90,i,l(d))))).map(({item:d,longitude:h,displayLongitude:b})=>{let L=this.toAngle(b),v=B(ve,ve,t,L),E=B(ve,ve,a(L,i,l(d)),L),Q=R(d.name)??y(d,"name"),$e=d.isRetrograde===!0,nt=typeof d.house=="number"?` · ${this.t("House {{n}}",{n:d.house})}`:"",gr=`${y(d,"name")}${$e?` ${this.t("retrograde")}`:""} - ${jt(h)} ${y(d,"sign")}${nt}`,Ur=Math.abs(b-h)>.5,Zr=B(ve,ve,t+(o===1?_c:-_c),this.toAngle(h)),Wr=B(ve,ve,t+(o===1?Nc:-Nc),L);return S.svg`<g>
115
115
  ${Ur?S.svg`<line class=${`leader ${s}`} x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:S.nothing}
116
116
  <text class=${s} x=${v.x} y=${v.y} text-anchor="middle" dominant-baseline="central"><title>${gr}</title>${Q}<tspan class="person-tag" dy="-0.55em" dx="0.15em">${o}</tspan></text>
117
117
  <text class="planet-deg" x=${E.x} y=${E.y} text-anchor="middle" dominant-baseline="central">${Nt(h).degree}°${$e?S.svg`<tspan class="retro"> ℞</tspan>`:S.nothing}</text>
118
- </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((a,s)=>{let o=a?.ascendant;if(!o)return[];let i=Oe.findIndex(l=>l.toLowerCase()===o.sign.toLowerCase());return i<0?[]:[{longitude:i*30+o.degree,index:s+1}]});return It(t,a=>a.longitude,zt(34,wi)).map(({item:a,longitude:s,displayLongitude:o})=>{let i=this.toAngle(s),l=this.toAngle(o),c=B(ve,ve,oo,i),p=B(ve,ve,xg,i),d=B(ve,ve,wi,l),h=B(ve,ve,wi-7,l);return S.svg`<g>
118
+ </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((a,s)=>{let o=a?.ascendant;if(!o)return[];let i=Oe.findIndex(l=>l.toLowerCase()===o.sign.toLowerCase());return i<0?[]:[{longitude:i*30+o.degree,index:s+1}]});return It(t,a=>a.longitude,zt(34,ki)).map(({item:a,longitude:s,displayLongitude:o})=>{let i=this.toAngle(s),l=this.toAngle(o),c=B(ve,ve,oo,i),p=B(ve,ve,bg,i),d=B(ve,ve,ki,l),h=B(ve,ve,ki-7,l);return S.svg`<g>
119
119
  <line class="asc-tick" x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y} />
120
120
  ${Math.abs(o-s)>.5?S.svg`<line class="asc-tick" x1=${p.x} y1=${p.y} x2=${h.x} y2=${h.y} />`:S.nothing}
121
121
  <text class="asc-label" x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${this.t("ASC{{n}}",{n:a.index})}</text>
122
- </g>`})}renderInterAspectLines(e,t,a){let s=(o,i)=>{let l=H(i);for(let c of o)if(H(c.name)===l&&typeof c.longitude=="number")return c.longitude};return a.map(o=>{let i=s(e,o.planet1),l=s(t,o.planet2);if(i===void 0||l===void 0)return S.nothing;let c=B(ve,ve,io-2,this.toAngle(i)),p=B(ve,ve,io-2,this.toAngle(l)),d=$t(o),h=Ht[d]??"aspect-other",b=f(this.effectiveLang(),o.orb,1);return S.svg`<line class=${`aspect ${h}`} style=${us(o)} x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y}><title>${y(o,"planet1")} ${y(o,"type",Ke(o))} ${y(o,"planet2")}${b?` (${this.t("Orb")} ${b}°)`:""}</title></line>`})}renderAspects(e){return S.html`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?S.nothing:S.html`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>S.html`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Ke(t))}</td><td class="orb">${f(this.effectiveLang(),t.orb,1)}</td><td>${f(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?S.nothing:S.html`<td>${t.meaning?S.html`<details part="reading"><summary>${pe()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:S.nothing}</td>`}</tr>`)}</tbody></table>`}};Wa.styles=[u,Ue,gs,q,me,S.css`td .interp-body{white-space:normal;min-width:16rem;max-width:38rem}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.score{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-xl,1.5rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,800px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign{fill:var(--roxy-secondary,#475569);font-size:14px}.p1{fill:var(--roxy-accent-ink,#b45309);font-size:18px;font-weight:600}.p2{fill:var(--roxy-info,#0284c7);font-size:18px;font-weight:600}.person-tag{opacity:.85;font-size:10px;font-weight:700}.planet-deg{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}.planet-deg .retro{fill:var(--roxy-danger,#dc2626);font-size:inherit}.leader{stroke-width:.5px;opacity:.7}.leader.p1{stroke:var(--roxy-accent,#f59e0b)}.leader.p2{stroke:var(--roxy-info,#0284c7)}@container (width<=480px){.sign,.p1,.p2{font-size:28px}.person-tag,.planet-deg{font-size:15px}}.asc-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.asc-label{fill:var(--roxy-accent-ink,#b45309);font-size:9px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.legend-row{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin-top:calc(var(--roxy-space-xs,.25rem) * -1);flex-wrap:wrap;display:flex}.legend-row .caveat{font-style:italic}.legend-row .swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);margin:0}.people{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));display:grid}.person{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);gap:.3rem;display:grid}.person-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem);align-items:center;gap:.4rem;display:flex}.person-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.person-dot.p1{background:var(--roxy-accent,#f59e0b)}.person-dot.p2{background:var(--roxy-info,#0284c7)}.big-three{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;gap:.25rem .75rem;display:flex}.big-three span{align-items:baseline;gap:.25rem;display:inline-flex}.big-three .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.summary-pills{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.glyph{font-size:1.1em;line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;font-weight:500;display:flex}.asp-name{font-weight:var(--roxy-weight-bold,600);text-transform:capitalize}.asp-name.harmonious{color:var(--_success-fg)}.asp-name.challenging{color:var(--_danger-fg)}.context{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.catalog>summary{cursor:pointer;font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:.5rem;display:flex}.scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.overlay-dir{margin-top:var(--roxy-space-md,1rem)}.overlay-dir:first-of-type{margin-top:0}.overlay-dir h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.4rem;margin:0;display:flex}.overlay-house{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.own-house{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.retro{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-inline-start:.3em}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td.orb{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}.missing-planets{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);line-height:1.5}.missing-planets code{font-family:var(--roxy-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);background:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 6%, transparent);border-radius:4px;padding:0 4px;font-size:.95em}`],Wa=m([(0,Nc.customElement)("roxy-synastry-chart")],Wa);var qe=require("lit"),lo=require("lit/decorators.js");function Xa(n,r){return ge(n,"arcana",r,`${H(r)} Arcana`)}function Ps(n,r){return ge(n,"suit",r,H(r))}var kg=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Fr=class extends g{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,a=!!t.reversed,s=t.keywords??[],o=this.effectiveLang(),i=[t.arcana?Xa(o,t.arcana):"",t.suit?Ps(o,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return qe.html`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,a)}<div part="header"><div class="meta">${i?`${i} · `:""}<span class="drawn">${a?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2 class="title">${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?qe.html`<p class="message">${e.dailyMessage}</p>`:qe.nothing} ${t.meaning&&l?qe.html`<p class="reading">${t.meaning}</p>`:qe.nothing} ${s.length>0&&l?qe.html`<div class="chips">${s.map(c=>qe.html`<span>${c}</span>`)}</div>`:qe.nothing} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",a=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??a?.keywords??[],o=!this.hideReadings;return qe.html`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta">${[e.arcana?Xa(this.effectiveLang(),e.arcana):"",e.suit?Ps(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" · ")}</div><h2 class="title">${e.name??this.t("Tarot card")}</h2>${pt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:i=>{this.orientation=i},label:this.t("Card orientation"),idPrefix:"tarot",controls:!0})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${a?.description&&o?qe.html`<p class="reading">${a.description}</p>`:qe.nothing} ${s.length>0&&o?qe.html`<div class="chips">${s.map(i=>qe.html`<span>${i}</span>`)}</div>`:qe.nothing} ${this.renderGuidance(a,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,a){let s=`image ${a?"reversed":""}`;return e?qe.html`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:qe.html`<div class="${s}" part="chart" style="aspect-ratio:0.6;display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return qe.nothing;let a=kg.map(([s,o])=>({label:this.t(o),body:e[s]??""}));return this.renderInterpretation(a,t,"Guidance")}};Fr.styles=[u,q,me,ot,qe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,9rem) 1fr;align-items:start;display:grid}@container (width<=480px){.card{grid-template-columns:1fr}}.image{border-radius:var(--roxy-radius-md,8px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);width:100%;height:auto;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.image.reversed{transform:rotate(180deg)}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--roxy-space-sm,.5rem)}.drawn{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.message{color:var(--roxy-fg,#0a0a0a);margin:var(--roxy-space-sm,.5rem) 0 var(--roxy-space-md,1rem)}.reading{margin:0 0 var(--roxy-space-md,1rem);white-space:pre-line}.roxy-tablist{margin:var(--roxy-space-sm,.5rem) 0}.chips{gap:var(--roxy-space-xs,.25rem);margin-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}`],m([(0,lo.state)()],Fr.prototype,"orientation",2),Fr=m([(0,lo.customElement)("roxy-tarot-card")],Fr);var tr=require("lit"),co=require("lit/decorators.js");var Hr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let a=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,o=this.effectiveLang();return tr.html`<section class="wrap" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(i=>tr.html`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?tr.html`<img class="art" src="${i.imageUrl}" alt="${i.name??this.t("Tarot card")}" loading="lazy">`:tr.html`<div class="art" aria-hidden="true"></div>`}<p class="name">${i.name}</p><p class="meta">${Sg(o,i)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?tr.html`<div class="detail" part="detail">${this.openedRow}</div>`:tr.nothing}</section>`}};Hr.styles=[u,tr.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs,.25rem);text-align:left;width:100%;font:inherit;color:inherit;background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);box-shadow:var(--roxy-shadow-sm);cursor:pointer;transition:border-color .12s;display:grid}.tile[aria-pressed=true],.tile:hover,.tile:focus-visible{border-color:var(--roxy-accent,#f59e0b);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.art{aspect-ratio:2/3;border-radius:var(--roxy-radius-sm,4px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);width:100%}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.meta{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}`],m([(0,co.property)({type:String,reflect:!0})],Hr.prototype,"heading",2),Hr=m([(0,co.customElement)("roxy-tarot-catalog")],Hr);function Sg(n,r){let e=Xa(n,r.arcana);return r.suit?`${e} · ${Ps(n,r.suit)}`:e}var se=require("lit"),po=require("lit/decorators.js");function Rg(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var jr=class extends g{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,a="cards"in e&&!("spread"in e),s=a?[]:"positions"in e?e.positions??[]:[],o=a&&"cards"in e?e.cards:[],i=t?e:void 0,l=y(i,"strength"),c=i?.card,p=t?this.t("Yes or no"):a?this.t("Card draw"):Rg(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),d="question"in e?e.question:void 0,h="summary"in e?e.summary:void 0,b=i?.interpretation,L=i?.answer?i.answer.toLowerCase():"";return se.html`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${p}</h2>${d?se.html`<span class="question">"${d}"</span>`:se.nothing}</header>${t?se.html`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?se.html`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:se.html`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${c?.arcana?se.html`<p class="arcana">${Xa(this.effectiveLang(),c.arcana)}</p>`:se.nothing}</div><div class="meta" part="details"><div><span class="${`answer ${L}`}">${y(i,"answer")}</span> ${l?se.html`<small>· ${l}</small>`:se.nothing}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?se.html`<div class="chips">${c.keywords.map(v=>se.html`<span>${v}</span>`)}</div>`:se.nothing}</div></div>`:se.nothing} ${s.length>0?se.html`<div class="grid" part="section positions">${s.map(v=>se.html`<div class="card"><p class="label">${v.name??""}</p><div class="image" part="chart">${v.card?.imageUrl?se.html`<img src="${v.card.imageUrl}" alt="${v.card.name??this.t("Tarot card")}" class="${v.card.reversed?"reversed":""}">`:se.html`${v.card?.name??"?"}`}</div><p class="name">${v.card?.name??""} ${v.card?.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${v.interpretation&&!this.hideReadings?se.html`<p class="interp">${v.interpretation}</p>`:se.nothing}</div>`)}</div>`:se.nothing} ${o.length>0?se.html`<div class="grid" part="section cards">${o.map(v=>se.html`<div class="card"><div class="image" part="chart">${v.imageUrl?se.html`<img src="${v.imageUrl}" alt="${v.name??this.t("Tarot card")}" class="${v.reversed?"reversed":""}">`:se.html`${v.name??"?"}`}</div><p class="name">${v.name??""} ${v.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${v.meaning&&!this.hideReadings?se.html`<p class="interp">${v.meaning}</p>`:se.nothing}</div>`)}</div>`:se.nothing} ${h&&!this.hideReadings?se.html`<p class="reading">${h}</p>`:se.nothing} ${b&&!this.hideReadings?se.html`<p class="reading">${b}</p>`:se.nothing}</article>`}};jr.styles=[u,se.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;align-items:baseline;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.question{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.answer{border-radius:var(--roxy-radius-full,9999px);font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-base,1rem);text-transform:uppercase;letter-spacing:.06em;padding:4px 14px;display:inline-block}.answer.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.answer.no{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.answer.maybe{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 16%, transparent);color:var(--_warning-fg)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.verdict{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,8rem) 1fr;align-items:start;display:grid}@container (width<=26rem){.verdict{grid-template-columns:1fr}}.verdict .meta{gap:var(--roxy-space-sm,.5rem);justify-items:start;display:grid}.arcana{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);background:var(--roxy-surface,#fff);gap:var(--roxy-space-xs,.25rem);grid-template-columns:minmax(0,1fr);display:grid}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.image{aspect-ratio:.6;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:var(--roxy-radius-sm,4px);width:100%;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1))}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.interp{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:0}.reading{color:var(--roxy-fg,#0a0a0a);margin:0}`],m([(0,po.property)({type:String,reflect:!0})],jr.prototype,"spread",2),jr=m([(0,po.customElement)("roxy-tarot-spread")],jr);var G=require("lit");var xs=require("lit/decorators.js"),go=require("lit/directives/if-defined.js");var Ri=640,oe=Ri/2,Cg=212,Dg=226,_s=204,Tg=186,Si=168,Ic=250,Gc=142,Ns=78,Ag=166,Oc={glyph:18,degree:10},zg=.95,Mg=1.85,Eg=1.25,Pg=.9,_g=8,Ng=4,mo=(n,r)=>R(n)??r,ho=n=>{let r=new Map;for(let e of n)r.set(H(e.name),e);return r},rr=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.heading="Transits";this.type=new Ir(this,{glyph:[".natal-glyph",Oc.glyph],degree:[".planet-deg",Oc.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,o)=>typeof s=="number"?{number:o+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,o)=>s.number-o.number);return t.every((s,o)=>s.number===o+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],a=e.transitPlanets??[],s=e.aspects??[],o=he(this.effectiveLang(),e.transitDate),i=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...a].some(c=>Number.isFinite(c.house));return G.html`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2 class="title">${this.t(this.heading)}</h2>${o||i?G.html`<p class="subtitle">${[o,i].filter(Boolean).join(" · ")}</p>`:G.nothing}</div>${this.renderWheel(t,a,s)} ${this.renderLegend(t,a,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,a,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0° Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,a){return this.viewport.renderChartViewport(G.html`<svg viewBox="0 0 ${Ri} ${Ri}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${_s}" stroke-width="1.5"/><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${Si}" stroke-width="0.8"/><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${Ns}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,a)} ${this.renderRing(e,Gc,(s,o,i)=>Gc-or(s,o,i,Xt),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,Ic,(s,o,i)=>Ic+or(s,o,i,Xt),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let a=this.toAngle(t),s=t%30===0,o=B(oe,oe,s?Si:_s-5,a),i=B(oe,oe,_s,a);e.push(G.svg`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return Oe.map((e,t)=>{let a=this.toAngle(t*30),s=B(oe,oe,Ns,a),o=B(oe,oe,_s,a);return G.svg`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,a)=>{let s=e[(a+1)%12],o=this.toAngle(t.longitude),i=B(oe,oe,Ns,o),l=B(oe,oe,Si,o),c=B(oe,oe,Ag,this.toAngle(rn(t.longitude,s?.longitude??t.longitude+30)));return G.svg`<g>
122
+ </g>`})}renderInterAspectLines(e,t,a){let s=(o,i)=>{let l=H(i);for(let c of o)if(H(c.name)===l&&typeof c.longitude=="number")return c.longitude};return a.map(o=>{let i=s(e,o.planet1),l=s(t,o.planet2);if(i===void 0||l===void 0)return S.nothing;let c=B(ve,ve,io-2,this.toAngle(i)),p=B(ve,ve,io-2,this.toAngle(l)),d=$t(o),h=Ht[d]??"aspect-other",b=f(this.effectiveLang(),o.orb,1);return S.svg`<line class=${`aspect ${h}`} style=${us(o)} x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y}><title>${y(o,"planet1")} ${y(o,"type",Ke(o))} ${y(o,"planet2")}${b?` (${this.t("Orb")} ${b}°)`:""}</title></line>`})}renderAspects(e){return S.html`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?S.nothing:S.html`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>S.html`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Ke(t))}</td><td class="orb">${f(this.effectiveLang(),t.orb,1)}</td><td>${f(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?S.nothing:S.html`<td>${t.meaning?S.html`<details part="reading"><summary>${pe()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:S.nothing}</td>`}</tr>`)}</tbody></table>`}};Wa.styles=[u,Ue,gs,q,me,S.css`td .interp-body{white-space:normal;min-width:16rem;max-width:38rem}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.score{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-xl,1.5rem)}svg{width:100%;max-width:var(--roxy-chart-max-width,800px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign{fill:var(--roxy-secondary,#475569);font-size:14px}.p1{fill:var(--roxy-accent-ink,#b45309);font-size:18px;font-weight:600}.p2{fill:var(--roxy-info,#0284c7);font-size:18px;font-weight:600}.person-tag{opacity:.85;font-size:10px;font-weight:700}.planet-deg{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}.planet-deg .retro{fill:var(--roxy-danger,#dc2626);font-size:inherit}.leader{stroke-width:.5px;opacity:.7}.leader.p1{stroke:var(--roxy-accent,#f59e0b)}.leader.p2{stroke:var(--roxy-info,#0284c7)}@container (width<=480px){.sign,.p1,.p2{font-size:28px}.person-tag,.planet-deg{font-size:15px}}.asc-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.asc-label{fill:var(--roxy-accent-ink,#b45309);font-size:9px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.legend-row{gap:var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin-top:calc(var(--roxy-space-xs,.25rem) * -1);flex-wrap:wrap;display:flex}.legend-row .caveat{font-style:italic}.legend-row .swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);margin:0}.people{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));display:grid}.person{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);gap:.3rem;display:grid}.person-name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem);align-items:center;gap:.4rem;display:flex}.person-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.person-dot.p1{background:var(--roxy-accent,#f59e0b)}.person-dot.p2{background:var(--roxy-info,#0284c7)}.big-three{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;gap:.25rem .75rem;display:flex}.big-three span{align-items:baseline;gap:.25rem;display:inline-flex}.big-three .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.summary-pills{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a);padding:2px 8px}.pill--success{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.pill--danger{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.glyph{font-size:1.1em;line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;font-weight:500;display:flex}.asp-name{font-weight:var(--roxy-weight-bold,600);text-transform:capitalize}.asp-name.harmonious{color:var(--_success-fg)}.asp-name.challenging{color:var(--_danger-fg)}.context{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.catalog>summary{cursor:pointer;font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:.5rem;display:flex}.scroll{min-width:0;margin-top:var(--roxy-space-sm,.5rem);overflow-x:auto}.overlay-dir{margin-top:var(--roxy-space-md,1rem)}.overlay-dir:first-of-type{margin-top:0}.overlay-dir h4{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:baseline;gap:.4rem;margin:0;display:flex}.overlay-house{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309)}.own-house{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.retro{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);margin-inline-start:.3em}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td.orb{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));display:grid}.lists h3{margin:0 0 var(--roxy-space-xs,.25rem) 0;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.lists ul{padding-left:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);margin:0}.missing-planets{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 8%, transparent);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);line-height:1.5}.missing-planets code{font-family:var(--roxy-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);background:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 6%, transparent);border-radius:4px;padding:0 4px;font-size:.95em}`],Wa=m([(0,Ic.customElement)("roxy-synastry-chart")],Wa);var qe=require("lit"),lo=require("lit/decorators.js");function Xa(n,r){return ge(n,"arcana",r,`${H(r)} Arcana`)}function Ps(n,r){return ge(n,"suit",r,H(r))}var Sg=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Fr=class extends g{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,a=!!t.reversed,s=t.keywords??[],o=this.effectiveLang(),i=[t.arcana?Xa(o,t.arcana):"",t.suit?Ps(o,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return qe.html`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,a)}<div part="header"><div class="meta">${i?`${i} · `:""}<span class="drawn">${a?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2 class="title">${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?qe.html`<p class="message">${e.dailyMessage}</p>`:qe.nothing} ${t.meaning&&l?qe.html`<p class="reading">${t.meaning}</p>`:qe.nothing} ${s.length>0&&l?qe.html`<div class="chips">${s.map(c=>qe.html`<span>${c}</span>`)}</div>`:qe.nothing} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",a=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??a?.keywords??[],o=!this.hideReadings;return qe.html`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta">${[e.arcana?Xa(this.effectiveLang(),e.arcana):"",e.suit?Ps(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" · ")}</div><h2 class="title">${e.name??this.t("Tarot card")}</h2>${pt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:i=>{this.orientation=i},label:this.t("Card orientation"),idPrefix:"tarot",controls:!0})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${a?.description&&o?qe.html`<p class="reading">${a.description}</p>`:qe.nothing} ${s.length>0&&o?qe.html`<div class="chips">${s.map(i=>qe.html`<span>${i}</span>`)}</div>`:qe.nothing} ${this.renderGuidance(a,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,a){let s=`image ${a?"reversed":""}`;return e?qe.html`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:qe.html`<div class="${s}" part="chart" style="aspect-ratio:0.6;display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return qe.nothing;let a=Sg.map(([s,o])=>({label:this.t(o),body:e[s]??""}));return this.renderInterpretation(a,t,"Guidance")}};Fr.styles=[u,q,me,ot,qe.css`.card{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-lg,1.5rem);grid-template-columns:minmax(0,9rem) 1fr;align-items:start;display:grid}@container (width<=480px){.card{grid-template-columns:1fr}}.image{border-radius:var(--roxy-radius-md,8px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);width:100%;height:auto;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.image.reversed{transform:rotate(180deg)}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--roxy-space-sm,.5rem)}.drawn{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.message{color:var(--roxy-fg,#0a0a0a);margin:var(--roxy-space-sm,.5rem) 0 var(--roxy-space-md,1rem)}.reading{margin:0 0 var(--roxy-space-md,1rem);white-space:pre-line}.roxy-tablist{margin:var(--roxy-space-sm,.5rem) 0}.chips{gap:var(--roxy-space-xs,.25rem);margin-top:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}`],m([(0,lo.state)()],Fr.prototype,"orientation",2),Fr=m([(0,lo.customElement)("roxy-tarot-card")],Fr);var tr=require("lit"),co=require("lit/decorators.js");var Hr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let a=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,o=this.effectiveLang();return tr.html`<section class="wrap" part="card" aria-label="${a}"><header class="head" part="header"><h2 class="title">${a}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(i=>tr.html`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?tr.html`<img class="art" src="${i.imageUrl}" alt="${i.name??this.t("Tarot card")}" loading="lazy">`:tr.html`<div class="art" aria-hidden="true"></div>`}<p class="name">${i.name}</p><p class="meta">${Rg(o,i)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?tr.html`<div class="detail" part="detail">${this.openedRow}</div>`:tr.nothing}</section>`}};Hr.styles=[u,tr.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.count{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs,.25rem);text-align:left;width:100%;font:inherit;color:inherit;background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);box-shadow:var(--roxy-shadow-sm);cursor:pointer;transition:border-color .12s;display:grid}.tile[aria-pressed=true],.tile:hover,.tile:focus-visible{border-color:var(--roxy-accent,#f59e0b);outline:none}.detail{margin-top:var(--roxy-space-md,1rem)}.art{aspect-ratio:2/3;border-radius:var(--roxy-radius-sm,4px);object-fit:cover;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 35%, transparent);width:100%}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);margin:0}.meta{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);margin:0}`],m([(0,co.property)({type:String,reflect:!0})],Hr.prototype,"heading",2),Hr=m([(0,co.customElement)("roxy-tarot-catalog")],Hr);function Rg(n,r){let e=Xa(n,r.arcana);return r.suit?`${e} · ${Ps(n,r.suit)}`:e}var se=require("lit"),po=require("lit/decorators.js");function Cg(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var jr=class extends g{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,a="cards"in e&&!("spread"in e),s=a?[]:"positions"in e?e.positions??[]:[],o=a&&"cards"in e?e.cards:[],i=t?e:void 0,l=y(i,"strength"),c=i?.card,p=t?this.t("Yes or no"):a?this.t("Card draw"):Cg(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),d="question"in e?e.question:void 0,h="summary"in e?e.summary:void 0,b=i?.interpretation,L=i?.answer?i.answer.toLowerCase():"";return se.html`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${p}</h2>${d?se.html`<span class="question">"${d}"</span>`:se.nothing}</header>${t?se.html`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?se.html`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:se.html`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${c?.arcana?se.html`<p class="arcana">${Xa(this.effectiveLang(),c.arcana)}</p>`:se.nothing}</div><div class="meta" part="details"><div><span class="${`answer ${L}`}">${y(i,"answer")}</span> ${l?se.html`<small>· ${l}</small>`:se.nothing}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?se.html`<div class="chips">${c.keywords.map(v=>se.html`<span>${v}</span>`)}</div>`:se.nothing}</div></div>`:se.nothing} ${s.length>0?se.html`<div class="grid" part="section positions">${s.map(v=>se.html`<div class="card"><p class="label">${v.name??""}</p><div class="image" part="chart">${v.card?.imageUrl?se.html`<img src="${v.card.imageUrl}" alt="${v.card.name??this.t("Tarot card")}" class="${v.card.reversed?"reversed":""}">`:se.html`${v.card?.name??"?"}`}</div><p class="name">${v.card?.name??""} ${v.card?.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${v.interpretation&&!this.hideReadings?se.html`<p class="interp">${v.interpretation}</p>`:se.nothing}</div>`)}</div>`:se.nothing} ${o.length>0?se.html`<div class="grid" part="section cards">${o.map(v=>se.html`<div class="card"><div class="image" part="chart">${v.imageUrl?se.html`<img src="${v.imageUrl}" alt="${v.name??this.t("Tarot card")}" class="${v.reversed?"reversed":""}">`:se.html`${v.name??"?"}`}</div><p class="name">${v.name??""} ${v.reversed?se.html`<small>${this.t("(reversed)")}</small>`:se.nothing}</p>${v.meaning&&!this.hideReadings?se.html`<p class="interp">${v.meaning}</p>`:se.nothing}</div>`)}</div>`:se.nothing} ${h&&!this.hideReadings?se.html`<p class="reading">${h}</p>`:se.nothing} ${b&&!this.hideReadings?se.html`<p class="reading">${b}</p>`:se.nothing}</article>`}};jr.styles=[u,se.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;align-items:baseline;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);text-transform:capitalize;margin:0}.question{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);font-style:italic}.answer{border-radius:var(--roxy-radius-full,9999px);font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-base,1rem);text-transform:uppercase;letter-spacing:.06em;padding:4px 14px;display:inline-block}.answer.yes{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.answer.no{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--_danger-fg)}.answer.maybe{background:color-mix(in srgb, var(--roxy-warning,#ea580c) 16%, transparent);color:var(--_warning-fg)}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.verdict{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,8rem) 1fr;align-items:start;display:grid}@container (width<=26rem){.verdict{grid-template-columns:1fr}}.verdict .meta{gap:var(--roxy-space-sm,.5rem);justify-items:start;display:grid}.arcana{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.grid{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);background:var(--roxy-surface,#fff);gap:var(--roxy-space-xs,.25rem);grid-template-columns:minmax(0,1fr);display:grid}.label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0}.image{aspect-ratio:.6;background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);border-radius:var(--roxy-radius-sm,4px);width:100%;font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1))}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.interp{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);margin:0}.reading{color:var(--roxy-fg,#0a0a0a);margin:0}`],m([(0,po.property)({type:String,reflect:!0})],jr.prototype,"spread",2),jr=m([(0,po.customElement)("roxy-tarot-spread")],jr);var G=require("lit");var xs=require("lit/decorators.js"),go=require("lit/directives/if-defined.js");var Ci=640,oe=Ci/2,Dg=212,Tg=226,_s=204,Ag=186,Ri=168,Gc=250,Oc=142,Ns=78,zg=166,Bc={glyph:18,degree:10},Mg=.95,Eg=1.85,Pg=1.25,_g=.9,Ng=8,Ig=4,mo=(n,r)=>R(n)??r,ho=n=>{let r=new Map;for(let e of n)r.set(H(e.name),e);return r},rr=class extends g{constructor(){super(...arguments);this.viewport=new Be(this);this.heading="Transits";this.type=new Ir(this,{glyph:[".natal-glyph",Bc.glyph],degree:[".planet-deg",Bc.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,o)=>typeof s=="number"?{number:o+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,o)=>s.number-o.number);return t.every((s,o)=>s.number===o+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],a=e.transitPlanets??[],s=e.aspects??[],o=he(this.effectiveLang(),e.transitDate),i=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...a].some(c=>Number.isFinite(c.house));return G.html`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2 class="title">${this.t(this.heading)}</h2>${o||i?G.html`<p class="subtitle">${[o,i].filter(Boolean).join(" · ")}</p>`:G.nothing}</div>${this.renderWheel(t,a,s)} ${this.renderLegend(t,a,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,a,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0° Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,a){return this.viewport.renderChartViewport(G.html`<svg viewBox="0 0 ${Ci} ${Ci}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${_s}" stroke-width="1.5"/><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${Ri}" stroke-width="0.8"/><circle class="wheel-line" cx="${oe}" cy="${oe}" r="${Ns}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,a)} ${this.renderRing(e,Oc,(s,o,i)=>Oc-or(s,o,i,Xt),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,Gc,(s,o,i)=>Gc+or(s,o,i,Xt),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let a=this.toAngle(t),s=t%30===0,o=B(oe,oe,s?Ri:_s-5,a),i=B(oe,oe,_s,a);e.push(G.svg`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return Oe.map((e,t)=>{let a=this.toAngle(t*30),s=B(oe,oe,Ns,a),o=B(oe,oe,_s,a);return G.svg`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,a)=>{let s=e[(a+1)%12],o=this.toAngle(t.longitude),i=B(oe,oe,Ns,o),l=B(oe,oe,Ri,o),c=B(oe,oe,zg,this.toAngle(rn(t.longitude,s?.longitude??t.longitude+30)));return G.svg`<g>
123
123
  <line class="house-cusp" x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} />
124
124
  <text class="house-num" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${t.number}</text>
125
- </g>`}):G.nothing}renderSigns(){return Oe.map((e,t)=>{let a=B(oe,oe,Tg,this.toAngle(t*30+15));return G.svg`<text class="sign-glyph" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${Z(e)}</text>`})}renderRing(e,t,a,s,o,i){let l=zg*this.type.size.glyph,c={width:l,height:l},p=b=>({width:(Mg+(b.isRetrograde===!0?Eg:0))*this.type.size.degree,height:Pg*this.type.size.degree}),d=zt(l,t);return It(e,b=>b.longitude,(b,L)=>Math.max(d,zt((p(b).width+p(L).width)/2,a(90,c,p(b))))).map(({item:b,longitude:L,displayLongitude:v})=>{let E=this.toAngle(v),Q=B(oe,oe,t,E),$e=B(oe,oe,a(E,c,p(b)),E),nt=b.isRetrograde===!0,gr=`${Nt(L).degree}°`,Ur=y(b,"name"),Zr=`${o} ${Ur}${nt?` ${this.t("retrograde")}`:""} - ${jt(L)} ${y(b,"sign")}`,Wr=Math.abs(v-L)>.5,vs=B(oe,oe,t+i*_g,this.toAngle(L)),Is=B(oe,oe,t+i*Ng,E);return G.svg`<g>
125
+ </g>`}):G.nothing}renderSigns(){return Oe.map((e,t)=>{let a=B(oe,oe,Ag,this.toAngle(t*30+15));return G.svg`<text class="sign-glyph" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${Z(e)}</text>`})}renderRing(e,t,a,s,o,i){let l=Mg*this.type.size.glyph,c={width:l,height:l},p=b=>({width:(Eg+(b.isRetrograde===!0?Pg:0))*this.type.size.degree,height:_g*this.type.size.degree}),d=zt(l,t);return It(e,b=>b.longitude,(b,L)=>Math.max(d,zt((p(b).width+p(L).width)/2,a(90,c,p(b))))).map(({item:b,longitude:L,displayLongitude:v})=>{let E=this.toAngle(v),Q=B(oe,oe,t,E),$e=B(oe,oe,a(E,c,p(b)),E),nt=b.isRetrograde===!0,gr=`${Nt(L).degree}°`,Ur=y(b,"name"),Zr=`${o} ${Ur}${nt?` ${this.t("retrograde")}`:""} - ${jt(L)} ${y(b,"sign")}`,Wr=Math.abs(v-L)>.5,vs=B(oe,oe,t+i*Ng,this.toAngle(L)),Is=B(oe,oe,t+i*Ig,E);return G.svg`<g>
126
126
  ${Wr?G.svg`<line class=${`leader ${s}`} x1=${vs.x} y1=${vs.y} x2=${Is.x} y2=${Is.y} />`:G.nothing}
127
127
  <text class=${s} x=${Q.x} y=${Q.y} text-anchor="middle" dominant-baseline="central"><title>${Zr}</title>${mo(b.name,Ur)}</text>
128
128
  <text class="planet-deg" x=${$e.x} y=${$e.y} text-anchor="middle" dominant-baseline="central">${gr}${nt?G.svg`<tspan class="retro"> ℞</tspan>`:G.nothing}</text>
129
- </g>`})}renderAspectLines(e,t,a){let s=ho(e),o=ho(t);return a.map(i=>{let l=o.get(H(i.planet1)),c=s.get(H(i.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return G.nothing;let p=B(oe,oe,Ns-2,this.toAngle(l.longitude)),d=B(oe,oe,Ns-2,this.toAngle(c.longitude)),h=$t(i),b=f(this.effectiveLang(),i.orb,1);return G.svg`<line class=${`aspect ${Ht[h]??"aspect-other"}`} style=${us(i)} x1=${p.x} y1=${p.y} x2=${d.x} y2=${d.y}><title>${this.t("Transiting")} ${y(i,"planet1")} ${y(i,"type",h)} ${this.t("Natal")} ${y(i,"planet2")}${b?` (${this.t("Orb")} ${b}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return G.nothing;let t=At(e);return[t,ks(t)].map((a,s)=>{let o=this.toAngle(a),i=B(oe,oe,_s,o),l=B(oe,oe,Cg,o),c=B(oe,oe,Dg,o);return G.svg`<g>
129
+ </g>`})}renderAspectLines(e,t,a){let s=ho(e),o=ho(t);return a.map(i=>{let l=o.get(H(i.planet1)),c=s.get(H(i.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return G.nothing;let p=B(oe,oe,Ns-2,this.toAngle(l.longitude)),d=B(oe,oe,Ns-2,this.toAngle(c.longitude)),h=$t(i),b=f(this.effectiveLang(),i.orb,1);return G.svg`<line class=${`aspect ${Ht[h]??"aspect-other"}`} style=${us(i)} x1=${p.x} y1=${p.y} x2=${d.x} y2=${d.y}><title>${this.t("Transiting")} ${y(i,"planet1")} ${y(i,"type",h)} ${this.t("Natal")} ${y(i,"planet2")}${b?` (${this.t("Orb")} ${b}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return G.nothing;let t=At(e);return[t,ks(t)].map((a,s)=>{let o=this.toAngle(a),i=B(oe,oe,_s,o),l=B(oe,oe,Dg,o),c=B(oe,oe,Tg,o);return G.svg`<g>
130
130
  <line class="axis-tick" x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} />
131
131
  <text class="axis-label" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${s===0?this.t("ASC"):this.t("DSC")}</text>
132
- </g>`})}renderLegend(e,t,a,s){return G.html`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${a.length>0?G.html`<span><span class="swatch swatch--harmonious"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch swatch--challenging"></span>${this.t("Challenging aspects")}</span>`:G.nothing} ${s?G.html`<span>${this.t("{{system}} houses",{system:s})}</span>`:G.nothing} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return G.nothing;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return G.html`<div part="details"><div class="summary-pills" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?G.html`<span class="pill pill--muted">${this.t("Total")}: ${e.total}</span>`:G.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([a,s])=>G.html`<span class="pill pill--muted">${Ke({type:a})}: ${s}</span>`)}</div>${e.strongest?this.renderStrongest(e.strongest):G.nothing}</div>`}renderStrongest(e){let t=y(e,"planet1"),a=y(e,"planet2");return G.html`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${mo(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="nature-badge ${(e.interpretation??"neutral").toLowerCase()}">${y(e,"type",Ke(e))}</span> <span aria-hidden="true" class="glyph">${mo(e.planet2,a)}</span>${this.t("Natal")} ${a} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${f(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${f(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,a){if(e.length===0&&t.length===0)return G.nothing;let s=ho(e),o=ho(t),i=e.length>0?e:t,l=p=>p?G.html`${Z(p.sign)??""} ${jt(p.longitude)} ${y(p,"sign")}${p.isRetrograde?G.html`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:G.nothing}`:G.nothing,c=p=>a?G.html`<td>${p&&Number.isFinite(p.house)?p.house:G.nothing}</td>`:G.nothing;return G.html`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${a?this.t("Both house numbers are read against the natal house cusps."):G.nothing}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${a?G.html`<th scope="col">${this.t("Natal house")}</th>`:G.nothing}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${a?G.html`<th scope="col">${this.t("Transiting house")}</th>`:G.nothing}</tr></thead><tbody>${i.map(p=>{let d=H(p.name),h=y(p,"name");return G.html`<tr><th scope="row"><span aria-hidden="true" class="glyph">${mo(p.name,h)}</span> ${h}</th><td>${l(s.get(d))}</td>${c(s.get(d))}<td>${l(o.get(d))}</td>${c(o.get(d))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return G.html`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?G.nothing:G.html`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};rr.styles=[u,Ue,gs,q,G.css`roxy-aspects-table::part(card),roxy-western-planets-table::part(card){box-shadow:none;border:0;padding:0}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,760px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign-glyph{fill:var(--roxy-secondary,#475569);font-size:14px;font-family:var(--roxy-font-sans)}.natal-glyph{fill:var(--roxy-accent-ink,#b45309);font-size:18px;font-weight:600;font-family:var(--roxy-font-sans)}.transit-glyph{fill:var(--roxy-info,#0284c7);font-size:18px;font-weight:600;font-family:var(--roxy-font-sans)}.leader{stroke:currentColor;stroke-width:.6px;opacity:.6}.leader.natal-glyph{stroke:var(--roxy-accent-ink,#b45309)}.leader.transit-glyph{stroke:var(--roxy-info,#0284c7)}.planet-deg{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}.planet-deg .retro{fill:var(--roxy-danger,#dc2626)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:26px}.planet-deg{font-size:14px}.house-num{font-size:12px}}.tick{stroke:var(--roxy-border,#e4e4e7)}.tick-major{stroke:var(--roxy-secondary,#475569)}.house-cusp{stroke:var(--roxy-secondary,#475569);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary,#475569);font-size:9px;font-family:var(--roxy-font-sans)}.axis-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink,#b45309);font-size:10px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.swatch--natal{background:var(--roxy-accent-ink,#b45309)}.swatch--transit{background:var(--roxy-info,#0284c7)}.swatch--harmonious{background:var(--roxy-success,#16a34a)}.swatch--challenging{background:var(--roxy-danger,#dc2626)}.legend{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.summary-pills{gap:var(--roxy-space-sm,.5rem);margin-bottom:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}.strongest{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:center;gap:.4rem;display:flex}.strongest .label{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.strongest .meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.glyph{font-size:1.1em;line-height:1}.nature-badge{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}thead th{color:var(--roxy-muted,#71717a);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}th{font-weight:var(--roxy-weight-bold,600)}td{font-variant-numeric:tabular-nums}.retro-badge{color:var(--_danger-fg);font-weight:var(--roxy-weight-bold,600);margin-left:.25rem}`],m([(0,xs.property)({type:String})],rr.prototype,"heading",2),m([(0,xs.property)({type:Number})],rr.prototype,"ascendant",2),m([(0,xs.property)({type:Array})],rr.prototype,"houses",2),rr=m([(0,xs.customElement)("roxy-transit-wheel")],rr);var st=require("lit"),uo=require("lit/decorators.js");var Kr=class extends g{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:a,transitPlanets:s,transitAspects:o,summary:i}=e,l=[A(this.effectiveLang(),t),yt(this.effectiveLang(),a)].filter(Boolean).join(" "),c=o?.length??0,p=this.tab;return st.html`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2 class="title">${this.t("Transits")}</h2>${l?st.html`<p class="subtitle">${l}</p>`:st.nothing}</div>${c>0?st.html`${pt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:p,onSelect:d=>{this.tab=d},label:this.t("Transit views"),idPrefix:"transits",controls:!0})}<div id="transits-panel-${p}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${p}">${p==="positions"?st.html`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`:st.html`${i?this.renderSummaryPills(i):st.nothing}<div class="overflow-scroll">${this.renderAspectsList(o??[])}</div>`}</div>`:st.html`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`}</div>`}renderSummaryPills(e){return st.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span class="pill pill--muted">${this.t("Total")}: ${e.totalAspects} </span><span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})} </span><span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})} </span><span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:e.neutral})}</span></div>`}renderPlanetsTable(e){return st.html`<table class="planets-table" part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let a=R(t.name)??"",s=Z(t.sign)??"",o=t.speed>=0?"↑":"↓";return st.html`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${a}</span> ${t.name} ${t.isRetrograde?st.html`<span class="retro-badge" aria-label="${this.t("retrograde")}">R</span>`:st.nothing}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${t.sign}</div></td><td class="num">${Kt(t.degree)}</td><td class="speed"><span class="speed-arrow" aria-hidden="true">${o}</span> ${f(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("°/day")}</td></tr>`})}</tbody></table>`}renderAspectsList(e){return st.html`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,a)=>{let s=R(t.transitPlanet)??"",o=R(t.natalPlanet)??"",i=(t.nature??"neutral").toLowerCase(),l=t.interpretation,c=Ke(t),p=t.isApplying?this.t("Applying"):this.t("Separating");return st.html`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${a===0}"><summary><span aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="nature-badge ${i}">${c}</span> <span aria-hidden="true">${o}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:p,orb:f(this.effectiveLang(),t.orb,2),strength:f(this.effectiveLang(),t.strength,1)})} </span>${pe()}</summary><div class="interp-body">${$s(l,this.translator)}</div></details>`})}</div>`}};Kr.styles=[u,ot,q,zo,st.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.summary-pills{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.glyph{margin-right:2px;font-size:1.1em;line-height:1}.planet-cell{white-space:nowrap;align-items:center;gap:4px;display:flex}.retro-badge{border-radius:var(--roxy-radius-sm,4px);background:color-mix(in srgb, var(--roxy-warning,#ea580c) 12%, transparent);color:var(--_warning-fg);font-size:.7em;font-weight:var(--roxy-weight-bold,600);vertical-align:middle;margin-left:2px;padding:1px 4px;display:inline-block}.speed{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);white-space:nowrap}.speed-arrow{font-size:.85em}td.num{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.aspect-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.aspect-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;align-items:center;gap:.5em;font-weight:500;display:flex}.aspect-card summary .meta{color:var(--roxy-muted,#71717a);font-weight:400;font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.aspect-card .interp-body{margin-top:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);line-height:1.45}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs,.25rem)}.nature-badge{font-size:var(--roxy-text-xs,.75rem);border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}`],m([(0,uo.state)()],Kr.prototype,"tab",2),Kr=m([(0,uo.customElement)("roxy-transits-table")],Kr);var Zt=require("lit"),Bc=require("lit/decorators.js");var Ig=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],Ja=class extends g{renderData(r){let e=Ig.filter(t=>r[t.key]?.length);return e.length?Zt.html`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2 class="title">${this.t("Upagrahas")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,r[t.key]))}</div>`:this.renderEmpty()}renderGroup(r,e){let t=Zt.html`<div class="group-head"><h3 class="group-title">${this.t(r.titleSource)}</h3><p class="group-note">${this.t(r.noteSource)}</p></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(r.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(a=>{let s=Z(a.rashi)??"";return Zt.html`<tr><td class="name">${a.name}</td><td>${s?Zt.html`<span class="glyph">${s}</span>`:Zt.nothing}${a.rashi??""}</td><td class="num">${typeof a.longitude=="number"?it(a.longitude):""}</td><td class="num">${f(this.effectiveLang(),a.longitude,2)}</td><td>${a.nakshatra??""}</td><td class="num">${a.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return r.key==="timeBased"?Zt.html`<section part="section time-based">${t}</section>`:Zt.html`<section part="section sun-based">${t}</section>`}};Ja.styles=[u,ee,Zt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.group-head{padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;gap:var(--roxy-space-xs,.25rem);display:grid}.group-title{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.group-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:520px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.name{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.num{font-variant-numeric:tabular-nums}`],Ja=m([(0,Bc.customElement)("roxy-upagraha-table")],Ja);var z=require("lit"),xo=require("lit/decorators.js"),Ci=require("lit/directives/if-defined.js");var Gg=["North","East","South","West"],Og={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},Bg={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Fg={feet:"ft²",metres:"m²"},yo=.04,Hg=8,jg=.88;function Fc(n){return"cells"in n}function Kg(n){let r=n.map(o=>o.center?.x).filter(o=>o!=null),e=n.map(o=>o.center?.y).filter(o=>o!=null),t=Math.max(0,...n.map(o=>o.rowFromNorth??0),...n.map(o=>o.columnFromWest??0));if(t<2||r.length===0||e.length===0)return;let a=(Math.max(...r)-Math.min(...r))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(a>0)||!(s>0)))return{size:t,cellW:a,cellH:s,originX:Math.min(...r)-a/2,originY:Math.min(...e)-s/2}}function fo(n,r){let e=((r?.x??0)-n.originX)/n.cellW,t=n.size-((r?.y??0)-n.originY)/n.cellH;return[Hc(e),Hc(t)]}function Hc(n){return Math.round(n*1e3)/1e3}var Vr=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),a=Fc(e)?e:void 0,s=this.mode==="entrance"&&!Fc(e)?e:void 0,o=a?Kg(a.cells??[]):Vg(e.conventions?.grid);return z.html`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?z.html`<span class="${`verdict verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:z.nothing}</header>${this.renderGrid(t,o,a,s)} ${this.renderLegend(s,a)} ${this.renderDevatas(t,a?.cells)} ${this.renderFacts(t,e,a,s)} ${s?.effect&&!this.hideReadings?z.html`<p class="effect" part="reading">${s.effect}</p>`:z.nothing} ${s?.reading&&!this.hideReadings?z.html`<p class="reading" part="reading">${s.reading}</p>`:z.nothing} ${this.renderSources(a?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,a,s){if(!t)return z.nothing;let o=t.size,i=`${-yo} ${-yo} ${o+yo*2} ${o+yo*2}`;return z.html`<div class="frame" part="chart">${Gg.map(l=>z.html`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${ge(e,"facing",l)}</span>`)} <svg viewBox="${i}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(a?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(o):z.nothing} ${s?this.renderDoor(e,s):z.nothing} ${this.renderVamsa(t,a?.vamsa)} ${this.renderBrahmasthan(t,a?.brahmasthan?.polygon)} ${this.renderAtimarma(t,a)}</svg></div>`}renderCell(e,t){let a=t.class??t.role??"",s=["pada",a?`pada-${a}`:"",t.withinPlot===!1?"pada-outside":""].filter(Boolean).join(" "),o=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,o,[o,this.ringLabel(a)].filter(Boolean).join(" · "))}renderPada(e,t,a,s,o,i,l){let c=(t??1)-1,p=(a??1)-1,d=i.length>Hg;return z.svg`<g>
132
+ </g>`})}renderLegend(e,t,a,s){return G.html`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${a.length>0?G.html`<span><span class="swatch swatch--harmonious"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch swatch--challenging"></span>${this.t("Challenging aspects")}</span>`:G.nothing} ${s?G.html`<span>${this.t("{{system}} houses",{system:s})}</span>`:G.nothing} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return G.nothing;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return G.html`<div part="details"><div class="summary-pills" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?G.html`<span class="pill pill--muted">${this.t("Total")}: ${e.total}</span>`:G.nothing} <span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([a,s])=>G.html`<span class="pill pill--muted">${Ke({type:a})}: ${s}</span>`)}</div>${e.strongest?this.renderStrongest(e.strongest):G.nothing}</div>`}renderStrongest(e){let t=y(e,"planet1"),a=y(e,"planet2");return G.html`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${mo(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="nature-badge ${(e.interpretation??"neutral").toLowerCase()}">${y(e,"type",Ke(e))}</span> <span aria-hidden="true" class="glyph">${mo(e.planet2,a)}</span>${this.t("Natal")} ${a} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${f(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${f(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,a){if(e.length===0&&t.length===0)return G.nothing;let s=ho(e),o=ho(t),i=e.length>0?e:t,l=p=>p?G.html`${Z(p.sign)??""} ${jt(p.longitude)} ${y(p,"sign")}${p.isRetrograde?G.html`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:G.nothing}`:G.nothing,c=p=>a?G.html`<td>${p&&Number.isFinite(p.house)?p.house:G.nothing}</td>`:G.nothing;return G.html`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${a?this.t("Both house numbers are read against the natal house cusps."):G.nothing}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${a?G.html`<th scope="col">${this.t("Natal house")}</th>`:G.nothing}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${a?G.html`<th scope="col">${this.t("Transiting house")}</th>`:G.nothing}</tr></thead><tbody>${i.map(p=>{let d=H(p.name),h=y(p,"name");return G.html`<tr><th scope="row"><span aria-hidden="true" class="glyph">${mo(p.name,h)}</span> ${h}</th><td>${l(s.get(d))}</td>${c(s.get(d))}<td>${l(o.get(d))}</td>${c(o.get(d))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return G.html`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?G.nothing:G.html`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${(0,go.ifDefined)(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};rr.styles=[u,Ue,gs,q,G.css`roxy-aspects-table::part(card),roxy-western-planets-table::part(card){box-shadow:none;border:0;padding:0}.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}svg{width:100%;max-width:var(--roxy-chart-max-width,760px);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border,#e4e4e7)}.sign-glyph{fill:var(--roxy-secondary,#475569);font-size:14px;font-family:var(--roxy-font-sans)}.natal-glyph{fill:var(--roxy-accent-ink,#b45309);font-size:18px;font-weight:600;font-family:var(--roxy-font-sans)}.transit-glyph{fill:var(--roxy-info,#0284c7);font-size:18px;font-weight:600;font-family:var(--roxy-font-sans)}.leader{stroke:currentColor;stroke-width:.6px;opacity:.6}.leader.natal-glyph{stroke:var(--roxy-accent-ink,#b45309)}.leader.transit-glyph{stroke:var(--roxy-info,#0284c7)}.planet-deg{fill:var(--roxy-muted,#71717a);font-size:10px;font-family:var(--roxy-font-sans)}.planet-deg .retro{fill:var(--roxy-danger,#dc2626)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:26px}.planet-deg{font-size:14px}.house-num{font-size:12px}}.tick{stroke:var(--roxy-border,#e4e4e7)}.tick-major{stroke:var(--roxy-secondary,#475569)}.house-cusp{stroke:var(--roxy-secondary,#475569);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary,#475569);font-size:9px;font-family:var(--roxy-font-sans)}.axis-tick{stroke:var(--roxy-accent-ink,#b45309);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink,#b45309);font-size:10px;font-weight:700;font-family:var(--roxy-font-sans);letter-spacing:.04em}.swatch{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:4px;display:inline-block}.swatch--natal{background:var(--roxy-accent-ink,#b45309)}.swatch--transit{background:var(--roxy-info,#0284c7)}.swatch--harmonious{background:var(--roxy-success,#16a34a)}.swatch--challenging{background:var(--roxy-danger,#dc2626)}.legend{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.summary-pills{gap:var(--roxy-space-sm,.5rem);margin-bottom:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}.strongest{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:center;gap:.4rem;display:flex}.strongest .label{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.strongest .meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.glyph{font-size:1.1em;line-height:1}.nature-badge{font-size:var(--roxy-text-xs,.75rem);text-transform:capitalize;border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}.scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}thead th{color:var(--roxy-muted,#71717a);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}th{font-weight:var(--roxy-weight-bold,600)}td{font-variant-numeric:tabular-nums}.retro-badge{color:var(--_danger-fg);font-weight:var(--roxy-weight-bold,600);margin-left:.25rem}`],m([(0,xs.property)({type:String})],rr.prototype,"heading",2),m([(0,xs.property)({type:Number})],rr.prototype,"ascendant",2),m([(0,xs.property)({type:Array})],rr.prototype,"houses",2),rr=m([(0,xs.customElement)("roxy-transit-wheel")],rr);var st=require("lit"),uo=require("lit/decorators.js");var Kr=class extends g{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:a,transitPlanets:s,transitAspects:o,summary:i}=e,l=[A(this.effectiveLang(),t),yt(this.effectiveLang(),a)].filter(Boolean).join(" "),c=o?.length??0,p=this.tab;return st.html`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2 class="title">${this.t("Transits")}</h2>${l?st.html`<p class="subtitle">${l}</p>`:st.nothing}</div>${c>0?st.html`${pt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:p,onSelect:d=>{this.tab=d},label:this.t("Transit views"),idPrefix:"transits",controls:!0})}<div id="transits-panel-${p}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${p}">${p==="positions"?st.html`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`:st.html`${i?this.renderSummaryPills(i):st.nothing}<div class="overflow-scroll">${this.renderAspectsList(o??[])}</div>`}</div>`:st.html`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`}</div>`}renderSummaryPills(e){return st.html`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span class="pill pill--muted">${this.t("Total")}: ${e.totalAspects} </span><span class="pill pill--success">${this.t("Harmonious: {{count}}",{count:e.harmonious})} </span><span class="pill pill--danger">${this.t("Challenging: {{count}}",{count:e.challenging})} </span><span class="pill pill--muted">${this.t("Neutral: {{count}}",{count:e.neutral})}</span></div>`}renderPlanetsTable(e){return st.html`<table class="planets-table" part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let a=R(t.name)??"",s=Z(t.sign)??"",o=t.speed>=0?"↑":"↓";return st.html`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${a}</span> ${t.name} ${t.isRetrograde?st.html`<span class="retro-badge" aria-label="${this.t("retrograde")}">R</span>`:st.nothing}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${t.sign}</div></td><td class="num">${Kt(t.degree)}</td><td class="speed"><span class="speed-arrow" aria-hidden="true">${o}</span> ${f(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("°/day")}</td></tr>`})}</tbody></table>`}renderAspectsList(e){return st.html`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,a)=>{let s=R(t.transitPlanet)??"",o=R(t.natalPlanet)??"",i=(t.nature??"neutral").toLowerCase(),l=t.interpretation,c=Ke(t),p=t.isApplying?this.t("Applying"):this.t("Separating");return st.html`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${a===0}"><summary><span aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="nature-badge ${i}">${c}</span> <span aria-hidden="true">${o}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:p,orb:f(this.effectiveLang(),t.orb,2),strength:f(this.effectiveLang(),t.strength,1)})} </span>${pe()}</summary><div class="interp-body">${$s(l,this.translator)}</div></details>`})}</div>`}};Kr.styles=[u,ot,q,zo,st.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.summary-pills{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{padding:2px var(--roxy-space-sm,.5rem);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);border:1px solid;align-items:center;gap:4px;display:inline-flex}.pill--muted{color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent)}.pill--success{color:var(--_success-fg);background:color-mix(in srgb, var(--roxy-success,#16a34a) 10%, transparent)}.pill--danger{color:var(--_danger-fg);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 10%, transparent)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.glyph{margin-right:2px;font-size:1.1em;line-height:1}.planet-cell{white-space:nowrap;align-items:center;gap:4px;display:flex}.retro-badge{border-radius:var(--roxy-radius-sm,4px);background:color-mix(in srgb, var(--roxy-warning,#ea580c) 12%, transparent);color:var(--_warning-fg);font-size:.7em;font-weight:var(--roxy-weight-bold,600);vertical-align:middle;margin-left:2px;padding:1px 4px;display:inline-block}.speed{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a);white-space:nowrap}.speed-arrow{font-size:.85em}td.num{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}.aspect-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.aspect-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);flex-wrap:wrap;align-items:center;gap:.5em;font-weight:500;display:flex}.aspect-card summary .meta{color:var(--roxy-muted,#71717a);font-weight:400;font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;margin-left:auto}.aspect-card .interp-body{margin-top:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);line-height:1.45}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs,.25rem)}.nature-badge{font-size:var(--roxy-text-xs,.75rem);border-radius:9999px;padding:1px 8px;font-weight:600;display:inline-block}.nature-badge.harmonious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, transparent);color:var(--_success-fg)}.nature-badge.challenging{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, transparent);color:var(--_danger-fg)}.nature-badge.neutral{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent);color:var(--roxy-fg,#0a0a0a)}`],m([(0,uo.state)()],Kr.prototype,"tab",2),Kr=m([(0,uo.customElement)("roxy-transits-table")],Kr);var Zt=require("lit"),Fc=require("lit/decorators.js");var Gg=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],Ja=class extends g{renderData(r){let e=Gg.filter(t=>r[t.key]?.length);return e.length?Zt.html`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2 class="title">${this.t("Upagrahas")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,r[t.key]))}</div>`:this.renderEmpty()}renderGroup(r,e){let t=Zt.html`<div class="group-head"><h3 class="group-title">${this.t(r.titleSource)}</h3><p class="group-note">${this.t(r.noteSource)}</p></div><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(r.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(a=>{let s=Z(a.rashi)??"";return Zt.html`<tr><td class="name">${a.name}</td><td>${s?Zt.html`<span class="glyph">${s}</span>`:Zt.nothing}${a.rashi??""}</td><td class="num">${typeof a.longitude=="number"?it(a.longitude):""}</td><td class="num">${f(this.effectiveLang(),a.longitude,2)}</td><td>${a.nakshatra??""}</td><td class="num">${a.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return r.key==="timeBased"?Zt.html`<section part="section time-based">${t}</section>`:Zt.html`<section part="section sun-based">${t}</section>`}};Ja.styles=[u,ee,Zt.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.group-head{padding:var(--roxy-space-md,1rem) var(--roxy-space-md,1rem) 0;gap:var(--roxy-space-xs,.25rem);display:grid}.group-title{font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);margin:0}.group-note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:520px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}td.name{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}.num{font-variant-numeric:tabular-nums}`],Ja=m([(0,Fc.customElement)("roxy-upagraha-table")],Ja);var z=require("lit"),xo=require("lit/decorators.js"),Di=require("lit/directives/if-defined.js");var Og=["North","East","South","West"],Bg={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},Fg={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Hg={feet:"ft²",metres:"m²"},yo=.04,jg=8,Kg=.88;function Hc(n){return"cells"in n}function Vg(n){let r=n.map(o=>o.center?.x).filter(o=>o!=null),e=n.map(o=>o.center?.y).filter(o=>o!=null),t=Math.max(0,...n.map(o=>o.rowFromNorth??0),...n.map(o=>o.columnFromWest??0));if(t<2||r.length===0||e.length===0)return;let a=(Math.max(...r)-Math.min(...r))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(a>0)||!(s>0)))return{size:t,cellW:a,cellH:s,originX:Math.min(...r)-a/2,originY:Math.min(...e)-s/2}}function fo(n,r){let e=((r?.x??0)-n.originX)/n.cellW,t=n.size-((r?.y??0)-n.originY)/n.cellH;return[jc(e),jc(t)]}function jc(n){return Math.round(n*1e3)/1e3}var Vr=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),a=Hc(e)?e:void 0,s=this.mode==="entrance"&&!Hc(e)?e:void 0,o=a?Vg(a.cells??[]):qg(e.conventions?.grid);return z.html`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?z.html`<span class="${`verdict verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:z.nothing}</header>${this.renderGrid(t,o,a,s)} ${this.renderLegend(s,a)} ${this.renderDevatas(t,a?.cells)} ${this.renderFacts(t,e,a,s)} ${s?.effect&&!this.hideReadings?z.html`<p class="effect" part="reading">${s.effect}</p>`:z.nothing} ${s?.reading&&!this.hideReadings?z.html`<p class="reading" part="reading">${s.reading}</p>`:z.nothing} ${this.renderSources(a?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,a,s){if(!t)return z.nothing;let o=t.size,i=`${-yo} ${-yo} ${o+yo*2} ${o+yo*2}`;return z.html`<div class="frame" part="chart">${Og.map(l=>z.html`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${ge(e,"facing",l)}</span>`)} <svg viewBox="${i}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(a?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(o):z.nothing} ${s?this.renderDoor(e,s):z.nothing} ${this.renderVamsa(t,a?.vamsa)} ${this.renderBrahmasthan(t,a?.brahmasthan?.polygon)} ${this.renderAtimarma(t,a)}</svg></div>`}renderCell(e,t){let a=t.class??t.role??"",s=["pada",a?`pada-${a}`:"",t.withinPlot===!1?"pada-outside":""].filter(Boolean).join(" "),o=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,o,[o,this.ringLabel(a)].filter(Boolean).join(" · "))}renderPada(e,t,a,s,o,i,l){let c=(t??1)-1,p=(a??1)-1,d=i.length>jg;return z.svg`<g>
133
133
  <rect class=${s} x=${c} y=${p} width="1" height="1">
134
134
  <title>${l}</title>
135
135
  </rect>
@@ -138,9 +138,9 @@
138
138
  class="devata"
139
139
  x=${c+.5}
140
140
  y=${p+.68}
141
- textLength=${(0,Ci.ifDefined)(d?jg:void 0)}
142
- lengthAdjust=${(0,Ci.ifDefined)(d?"spacingAndGlyphs":void 0)}
141
+ textLength=${(0,Di.ifDefined)(d?Kg:void 0)}
142
+ lengthAdjust=${(0,Di.ifDefined)(d?"spacingAndGlyphs":void 0)}
143
143
  >${i}</text
144
144
  >`:z.nothing}
145
- </g>`}renderEmptyGrid(e){let t=[];for(let a=0;a<e;a++)for(let s=0;s<e;s++)t.push(z.svg`<rect class="pada" x=${s} y=${a} width="1" height="1"></rect>`);return t}renderDoor(e,t){let a=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,a,a)}renderVamsa(e,t){return(t??[]).map(a=>{let[s,o]=fo(e,a.from),[i,l]=fo(e,a.to);return z.svg`<line class="vamsa" x1=${s} y1=${o} x2=${i} y2=${l}></line>`})}renderBrahmasthan(e,t){let a=t??[];if(a.length<3)return z.nothing;let s=a.map(o=>fo(e,o).join(",")).join(" ");return z.svg`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let a=new Set(t?.atimarma??[]);return a.size===0?z.nothing:(t?.cells??[]).filter(s=>s.square!=null&&a.has(s.square)).map(s=>{let[o,i]=fo(e,s.center);return z.svg`<circle class="atimarma" cx=${o} cy=${i} r="0.06"></circle>`})}renderDevatas(e,t){let a=new Map;for(let s of t??[])!s.devataName||s.square==null||a.set(s.devataName,[...a.get(s.devataName)??[],s.square]);return a.size===0?z.nothing:z.html`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...a].map(([s,o])=>z.html`<li><b>${s}</b> ${o.sort((i,l)=>i-l).map(i=>j(e,i)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return z.html`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let a=(t?.cells??[]).some(s=>s.withinPlot===!1);return z.html`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${a?z.html`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:z.nothing}</div>`}renderFacts(e,t,a,s){let o=t.conventions?.grid;return z.html`<div class="facts" part="details">${o?z.html`<span><span class="lbl">${Pe(e,"grid")}</span><b>${ge(e,"grid",o)}</b></span>`:z.nothing} ${s?.pada!=null?z.html`<span><span class="lbl">${this.t("Pada")}</span><b>${j(e,s.pada)}</b></span>`:z.nothing} ${s?.side?z.html`<span><span class="lbl">${this.t("Side")}</span><b>${ge(e,"facing",s.side)}</b></span>`:z.nothing} ${s?.startCorner?z.html`<span><span class="lbl">${this.t("Counted from")}</span>${ge(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?z.html`· ${j(e,s.ordinalOnSide)}`:z.nothing}</span>`:z.nothing} ${s?.devata?.name?z.html`<span><span class="lbl">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?z.html`· ${this.t("Pada")} ${j(e,s.devata.padaCount)}`:z.nothing}</span>`:z.nothing} ${s?.recommendedPadas?.length?z.html`<span><span class="lbl">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(i=>j(e,i)).join(", ")}</span>`:z.nothing} ${a?.brahmasthan?.area!=null?z.html`<span><span class="lbl">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,a.brahmasthan.area,a.conventions?.unit)}</b></span>`:z.nothing} ${a?.marma?.areaEach!=null?z.html`<span><span class="lbl">${this.t("Area of one marma")}</span>${this.areaLabel(e,a.marma.areaEach,a.conventions?.unit)}</span>`:z.nothing} ${a?.atimarma?.length?z.html`<span><span class="lbl">${this.t("Crossing points")}</span>${a.atimarma.map(i=>j(e,i)).join(", ")}</span>`:z.nothing}</div>`}renderSources(e){return e.length===0?z.nothing:z.html`<section part="section sources"><ul class="cites">${e.map(t=>z.html`<li>${Ds(t)}</li>`)}</ul></section>`}areaLabel(e,t,a){let s=f(e,t,2);if(!a)return s;let o=Fg[a]??`${a}²`;return z.html`<span title="${ge(e,"unit",a)}">${s} ${o}</span>`}ringLabel(e){let t=Og[e];return t?this.t(t):D(e)}verdictLabel(e){let t=Bg[e];return t?this.t(t):D(e)}};Vr.styles=[u,z.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.verdict{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-info,#0284c7) 12%, var(--roxy-surface,#fff));padding:.1rem .4rem;display:inline-block}.verdict-auspicious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, var(--roxy-surface,#fff))}.verdict-inauspicious{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, var(--roxy-surface,#fff))}.frame{max-width:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";place-items:center;gap:.15rem .25rem;width:100%;margin-inline:auto;display:grid}.compass{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);letter-spacing:.06em}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 7%, var(--roxy-surface,#fff))}.pada-center,.pada-brahma{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, var(--roxy-surface,#fff))}.pada-outside{fill:color-mix(in srgb, var(--roxy-muted,#71717a) 18%, var(--roxy-surface,#fff))}.pada-door{fill:color-mix(in srgb, var(--roxy-success,#16a34a) 26%, var(--roxy-surface,#fff));stroke:var(--roxy-fg,#0a0a0a);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink,#b45309);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary,#475569);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink,#b45309)}text{fill:var(--roxy-fg,#0a0a0a);font-family:var(--roxy-font-sans,system-ui, sans-serif)}.devata{text-anchor:middle;font-size:.19px}.square-no{text-anchor:middle;fill:var(--roxy-muted,#71717a);font-size:.14px}@container (width<=30rem){.devata{display:none}.square-no{dominant-baseline:middle;font-size:.34px;transform:translateY(.16px)}}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.devatas{gap:.2rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.devatas b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-border,#e4e4e7);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-brahma{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, var(--roxy-surface,#fff))}.swatch-outside{background:color-mix(in srgb, var(--roxy-muted,#71717a) 18%, var(--roxy-surface,#fff))}.swatch-door{background:color-mix(in srgb, var(--roxy-success,#16a34a) 26%, var(--roxy-surface,#fff))}.effect{font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.reading{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);color:var(--roxy-secondary,#475569);margin:0}.cites{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0;padding:0;list-style:none}`],m([(0,xo.property)({type:String,reflect:!0})],Vr.prototype,"mode",2),Vr=m([(0,xo.customElement)("roxy-vastu-mandala")],Vr);function Vg(n){let r=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(r));if(!(!Number.isFinite(e)||e<2||e*e!==r))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}var et=require("lit"),jc=require("lit/decorators.js");var Qa=class extends g{renderData(r){let e=r.aspects??[],t=r.mutualAspects??[],a=r.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=r.datetime?he(this.effectiveLang(),r.datetime):"";return et.html`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2 class="title">${this.t("Vedic aspects")}</h2>${s?et.html`<p class="subtitle">${this.t("Chart time {{when}}",{when:s})}</p>`:et.nothing}</div>${a.length>0?et.html`<div part="section positions"><p class="section-label">${this.t("Sidereal positions")}</p><div class="mutual">${a.map(o=>et.html`<span class="position"><strong>${o.name}</strong> ${typeof o.longitude=="number"?it(o.longitude):o.sign??""}</span>`)}</div></div>`:et.nothing} ${t.length>0?et.html`<div part="section mutual-aspects"><p class="section-label">${this.t("Mutual aspects")}</p><div class="mutual">${t.map(o=>et.html`<span class="mutual-pill">${o.planet1} ⟷ ${o.planet2} ${o.aspectType?et.html`<span class="rel">${o.aspectType}</span>`:et.nothing}</span>`)}</div></div>`:et.nothing} ${e.length>0?et.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(o=>et.html`<tr><td>${o.aspectingPlanet}</td><td><span class="kind">${o.aspectType}</span></td><td>${o.aspectedPlanet}</td><td>${typeof o.strength=="number"?et.html`<span class="bar" style="width:${Math.max(4,Math.min(100,o.strength)*.4)}px"></span><span class="num">${f(this.effectiveLang(),o.strength,0)}</span>`:et.nothing}</td><td class="num">${typeof o.orb=="number"?`${f(this.effectiveLang(),o.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:et.nothing}</div>`}};Qa.styles=[u,et.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.mutual{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.mutual-pill{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:.35rem;padding:2px 10px;display:inline-flex}.mutual-pill .rel{font-size:var(--roxy-text-xs,.75rem);font-weight:400}.position{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;align-items:baseline;gap:.35rem;padding:2px 10px;display:inline-flex}.position strong{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem)}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}tbody tr:last-child td{border-bottom:none}.kind{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px;font-weight:600;display:inline-block}.num{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.bar{background:var(--roxy-accent,#f59e0b);vertical-align:middle;border-radius:3px;height:6px;margin-right:6px;display:inline-block}`],Qa=m([(0,jc.customElement)("roxy-vedic-aspects")],Qa);var N=require("lit"),qc=require("lit/decorators.js");var Di={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},qg=Object.keys(Di),Kc=8,bo={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},Yg={day:"Day",finance:"Finance",natal:"Natal"},Vc={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},es=class extends g{renderData(r){let e=r.grahas??[];return e.length?N.html`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(r)} ${this.renderPanchanga(r)} ${this.renderGrahas(e,r.houseThemes)} ${this.renderWindows(r)} ${this.renderFinance(r)} ${this.renderDasha(r)} ${this.renderProvenance(r)}</div>`:this.renderEmpty()}renderHead(r){let e=new Map((r.tally??[]).map(a=>[a.state,a.count])),t=e.get("favourable")??0;return N.html`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("Vedic daily")}</h2><span class="when">${Zs(this.effectiveLang(),r.dayStart,r.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${r.verdict}">${this.t(bo[r.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:r.evaluated})}</span></div>${e.size?N.html`<div class="tally" part="legend">${qg.filter(a=>e.get(a)).map(a=>N.html`<span class="pill">${this.t(Di[a])} ${e.get(a)}</span>`)}</div>`:N.nothing} ${r.subject?N.html`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:r.subject.janmaRashi,nakshatra:r.subject.janmaNakshatra})}</p>`:N.nothing} ${(r.degraded??[]).map(a=>N.html`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:a.component,reason:a.reason})}</p>`)}</header>`}renderPanchanga(r){let e=r.panchanga;if(!e)return N.nothing;let t=(a,s)=>s?N.html`<div class="fact"><dt>${a}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?N.html`<span class="until">${this.t("until {{time}}",{time:he(this.effectiveLang(),s.validTo)})}</span>`:N.nothing}</dd></div>`:N.nothing;return N.html`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="facts" part="details"><div class="fact"><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div class="fact"><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(r,e){return r?.[String(e)]?.join(", ")??""}renderGrahas(r,e){return N.html`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${r.map(t=>{let a=R(t.graha)??"",s=this.theme(e,t.houseFromMoon);return N.html`<tr><td>${a?N.html`<span class="glyph">${a}</span>`:N.nothing}${t.graha}</td><td>${t.sign}</td><td class="num" title="${s}">${t.houseFromMoon}</td><td class="num">${typeof t.binduCount=="number"?t.binduCount:""}</td><td class="num">${this.renderKaksha(t.kaksha)}</td><td><span class="state ${t.state}" title="${t.stateSource??""}">${this.t(Di[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(r){if(!r||typeof r.number!="number")return N.nothing;let e=r.bindu===!0?"yes":r.bindu===!1?"no":"",t=r.bindu===!0?this.t("this kaksha lord gave bindu"):r.bindu===!1?this.t("this kaksha lord gave no bindu"):"",a=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:r.number,total:Kc,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)});return N.html`<span class="kaksha" title="${t?`${a} · ${t}`:a}">${r.number}/${Kc} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(r){let e=r.tara??[],t=r.chandrabala??[];if(!e.length&&!t.length)return N.nothing;let a=(s,o)=>N.html`<small>${Zs(this.effectiveLang(),s,o)}</small>`;return N.html`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?N.html`<div class="chips">${e.map(s=>N.html`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${a(s.validFrom,s.validTo)}</span>`)}</div>`:N.nothing} ${t.length?N.html`<div class="chips">${t.map(s=>N.html`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?N.html`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:N.nothing} </span>${a(s.validFrom,s.validTo)}</span>`)}</div>`:N.nothing}</section>`}renderFinance(r){let e=r.areas?.finance;if(!e)return N.nothing;let t=r.houseThemes,a=s=>{let o=this.theme(t,s.house);return N.html`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${o?` (${o})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?N.html`<span class="note">${s.dashaLevels.map(i=>this.t(Vc[i])).join(", ")}</span>`:N.nothing}</li>`};return N.html`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(bo[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?N.html`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:N.nothing}</div><div class="lists">${e.drivers?.length?N.html`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(a)}</ul></div>`:N.nothing} ${e.cautions?.length?N.html`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(a)}</ul></div>`:N.nothing}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(r){return r?N.html`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${r.band}">${this.t(bo[r.band])}</span> <span class="evidence">${r.score}</span></div><ul class="layers">${r.layers.map(e=>N.html`<li><span>${this.t(Yg[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(bo[e.band])}</span></li>`)}</ul></div>`:N.nothing}renderDasha(r){let e=r.dasha??[];return e.length?N.html`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>N.html`<span class="window"><span>${this.t(Vc[t.level])} · ${t.lord}</span> <small>${Zs(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:N.nothing}renderProvenance(r){return r.frames?N.html`<section class="block" part="section frame">${il(this.effectiveLang(),r.frames,this.translator)}</section>`:N.nothing}};es.styles=[u,ee,N.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.when{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.verdict-row{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:.15rem .6rem}.verdict.very-strong,.verdict.strong{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.moderate{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-accent-ink,#b45309)}.verdict.weak{background:color-mix(in srgb, var(--roxy-muted,#71717a) 16%, transparent);color:var(--roxy-secondary,#475569)}.evidence{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.tally{flex-wrap:wrap;gap:.35rem;display:flex}.pill{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;padding:1px 8px}.block{padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.block h3{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7.5rem,1fr));margin:0;display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}.fact .until{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.scroll{-webkit-overflow-scrolling:touch;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em;font-weight:var(--roxy-weight-bold,600)}td.num{font-variant-numeric:tabular-nums}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);cursor:help;padding:1px 8px}.state.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.state.underdelivered,.state.obstructed,.state.void{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309)}.state.aggravated,.state.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.kaksha{cursor:help;align-items:center;gap:.35rem;display:inline-flex}.dot{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 90%, transparent);border-radius:50%;width:7px;height:7px}.dot.yes{background:var(--roxy-success,#16a34a)}.dot.no{background:var(--roxy-warning,#f59e0b)}.chips{flex-wrap:wrap;gap:.35rem;display:flex}.window{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);gap:1px;padding:.3rem .6rem;display:grid}.window small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.window.yes{border-color:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, transparent)}.window.no{border-color:color-mix(in srgb, var(--roxy-danger,#dc2626) 35%, transparent)}.mark{color:var(--_danger-fg)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0;padding-left:1.1rem}.note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.composite{gap:var(--roxy-space-sm,.5rem);display:grid}.layers{font-size:var(--roxy-text-sm,.875rem);gap:.2rem;margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:.2rem var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary,#475569)}`],es=m([(0,qc.customElement)("roxy-vedic-daily")],es);var Ti=require("lit"),bs=require("lit/decorators.js");var ar=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?kn(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return Ti.html`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${a}</h2>${be(this.effectiveLang(),e.frame,this.translator)} ${Sn(t,this.translator)}</div>${Cn(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Ti.html`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("Vedic birth chart with twelve sign houses")}"><title>${this.t("Vedic kundli")}</title>${Rn(t,this.chartStyle,this.translator)}</svg>`,a,this.translator)}</div></div>`}};ar.styles=[u,Ue,ee,Dn,ot],m([(0,bs.property)({type:String,reflect:!0,attribute:"chart-style"})],ar.prototype,"chartStyle",2),m([(0,bs.property)({type:String,reflect:!0,attribute:"chart-reference"})],ar.prototype,"chartReference",2),m([(0,bs.property)({type:String,reflect:!0,attribute:"lagna-override"})],ar.prototype,"lagnaOverride",2),ar=m([(0,bs.customElement)("roxy-vedic-kundli")],ar);var V=require("lit"),Uc=require("lit/decorators.js");var Ug=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Yc=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],ts=class extends g{orderedRows(){let r=this.data?.meta??{},e=new Set,t=[];for(let a of Ug){let s=r[a];s&&(t.push([a,s]),e.add(a))}for(let[a,s]of Object.entries(r))e.has(a)||t.push([a,s]);return t}renderData(r){if(!r.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,a])=>a.avasthaInfo);return V.html`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2 class="title">${this.t("Planetary positions")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):V.nothing}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([a,s])=>{let o=(s.graha??a)==="Lagna",i=R(s.graha??a)??"",l=Z(s.rashi)??"";return V.html`<tr class="${o?"lagna":""}"><td class="graha">${i?V.html`<span class="glyph">${i}</span>`:V.nothing}${s.graha??a}</td><td>${l?V.html`<span class="glyph">${l}</span>`:V.nothing}${s.rashi??""}</td><td class="num">${typeof s.longitude=="number"?it(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td class="num">${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td class="num">${typeof s.house=="number"?s.house:""}</td>${Yc.map(([c])=>V.html`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?V.html`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:V.nothing}</td>`)}<td>${s.isRetrograde?V.html`<span class="retro">R</span>`:V.nothing}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let r=this.data?.modernPlanets??[];return r.length===0?V.nothing:r.map((e,t)=>{let a=Z(e.rashi)??"";return V.html`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${ws(e.planet,e.sanskritName)}</td><td>${a?V.html`<span class="glyph">${a}</span>`:V.nothing}${e.rashi??""}</td><td class="num">${typeof e.longitude=="number"?it(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td class="num">${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?V.html`<span class="retro">R</span>`:V.nothing}</td></tr>`})}renderCombustion(){let r=this.data?.combustion??[];return r.length===0?V.nothing:V.html`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>{let t=R(e.planet)??"",a=f(this.effectiveLang(),e.distanceFromSun,2),s=f(this.effectiveLang(),e.orb,1);return V.html`<div class="condition"><span class="planet">${t?`${t} `:""}${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:a,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let r=this.data?.planetaryWar??[];return r.length===0?V.nothing:V.html`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>{let t=f(this.effectiveLang(),e.distance,2);return V.html`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return V.nothing;let r=this.data?.interpretations??{},e=this.orderedRows().map(([t,a])=>[a.graha??t,r[a.graha??t],a.avasthaInfo]).filter(([,t,a])=>t!=null||a!=null);return e.length===0?V.nothing:V.html`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${pe()}</summary><div class="panel-body">${e.map(([t,a,s])=>{let o=R(t)??"";return V.html`<div class="interp"><span class="planet">${o?`${o} `:""}${t}</span> ${a?.rashi?V.html`<p><span class="label">${this.t("Rashi.")}</span> ${a.rashi}</p>`:V.nothing} ${a?.nakshatra?V.html`<p><span class="label">${this.t("Nakshatra.")}</span> ${a.nakshatra}</p>`:V.nothing} ${Yc.map(([i,l])=>s?.[i]?.interpretation?V.html`<p><span class="label">${this.t(l)}</span> ${s[i].interpretation}</p>`:V.nothing)}</div>`})}</div></details>`}renderHouses(){let r=(this.data?.houses??[]).filter(e=>e.name||e.description);return r.length===0?V.nothing:V.html`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>V.html`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?V.html`<p class="desc">${e.description}</p>`:V.nothing}</div>`)}</div></details>`}renderYogas(){let r=(this.data?.yogas??[]).filter(e=>e.present);return r.length===0?V.nothing:V.html`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>V.html`<div class="bhava"><span class="name">${e.name} ${e.quality?V.html`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:V.nothing}</span> ${e.result?V.html`<p class="desc">${e.result}</p>`:V.nothing}</div>`)}</div></details>`}};ts.styles=[u,ee,q,V.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:760px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.lagna{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}tbody tr.modern-first{border-top-width:2px}td.graha{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}tbody tr.lagna .glyph{color:var(--roxy-accent-ink,#b45309)}.gloss{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);display:block}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600)}.num{font-variant-numeric:tabular-nums}details.panel{border-top:1px solid var(--roxy-border,#e4e4e7)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);display:flex}details.panel>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px}.summary-count{margin-left:auto;margin-right:var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-normal,400);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.panel-body{padding:0 var(--roxy-space-md,1rem) var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}.condition{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4em;display:flex}.condition .planet{font-weight:var(--roxy-weight-bold,600)}.condition .detail{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.condition .winner{color:var(--_success-fg);font-weight:var(--roxy-weight-bold,600)}.interp{gap:.15em;display:grid}.interp .planet{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem)}.interp p{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.interp .label{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600)}.bhava{gap:.15em;display:grid}.bhava .name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem)}.bhava .desc{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.quality{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.04em}.quality.positive{color:var(--_success-fg)}.quality.negative{color:var(--_danger-fg)}.quality.both{color:var(--roxy-muted,#71717a)}`],ts=m([(0,Uc.customElement)("roxy-vedic-planets-table")],ts);var fe=require("lit"),vo=require("lit/decorators.js");function Zc(n){return n.suppressedBy||void 0}var Wc=["classical","asraya","dala","akriti","sankhya"];function Xc(n){let r=Wc.indexOf(n.family);return r===-1?Wc.length:r}var Zg=[{id:"present",source:"Present",open:!0,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:!0,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:!1,noteSource:"At least one classical condition fails. Read the evidence for which."}],qr=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Zc(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return fe.nothing;let a=[...t].sort((s,o)=>Xc(s)-Xc(o));return fe.html`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${a.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){let t=`quality-chip quality-${e}`;return fe.html`<span class="${t}">${e}</span>`}renderFamilyChip(e){return e.family?fe.html`<span class="family-chip" title="${this.t("Classical family")}">${H(e.family)}</span>`:fe.nothing}renderDetailCard(e){return fe.html`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):fe.nothing} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?fe.html`<p class="description">${e.description}</p>`:fe.nothing} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?fe.nothing:fe.html`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Zc(e),[a,s]=e.present?["is-present","Present"]:t?["is-outranked",`Outranked by ${H(t)}`]:["is-absent","Not present"];return fe.html`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):fe.nothing} ${this.renderFamilyChip(e)} <span class="present-badge ${a}">${s}</span></p>${e.description&&!this.hideReadings?fe.html`<p class="description">${e.description}</p>`:fe.nothing} ${e.present?this.renderEffects(e.result):fe.nothing} ${e.evidence?fe.html`<p class="evidence">${e.evidence}</p>`:fe.nothing}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let a=e;return fe.html`<div class="wrap" part="card">${this.renderDetailCard(a)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let a=e.yogas;if(a.length>0&&"present"in a[0]){let c=a,p=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,d=e.total??c.filter(h=>h.present).length;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:d,total:c.length})}</span></div>${be(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${p.length>0?Zg.map(h=>this.renderVerdictGroup(h,p.filter(b=>this.verdictOf(b)===h.id))):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(a.length>0&&"description"in a[0]){let c=a,p=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,d=e.total;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${d!==void 0?fe.html`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:fe.nothing}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${p.length>0?p.map(h=>this.renderDetailCard(h)):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let o=a,i=t?o.filter(c=>c.name.toLowerCase().includes(t)):o,l=e.total;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${l!==void 0?fe.html`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:fe.nothing}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${i.length>0?i.map(c=>fe.html`<div class="yoga-chip">${c.name}</div>`):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return fe.html`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};qr.styles=[u,ee,fe.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.search-wrap{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.search{width:100%;max-width:280px;font-size:var(--roxy-text-sm,.875rem);font-family:var(--roxy-font-sans);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);outline:none;padding:.35em .75em}.search::placeholder{color:var(--roxy-fg,#0a0a0a);opacity:.65}.search:focus{border-color:var(--roxy-accent,#f59e0b);box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 30%, transparent)}.grid{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fill,minmax(180px,1fr));display:grid}.yoga-chip{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);word-break:break-word;padding:.4em .8em}.yoga-chip .yoga-id{color:var(--roxy-fg,#0a0a0a);opacity:.75;margin-top:.15em;font-size:.7em;display:block}.detail-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);gap:var(--roxy-space-sm,.5rem);display:grid}.detail-name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;margin:0;display:flex}.quality-chip{font-size:var(--roxy-text-xs,.75rem);border-radius:999px;padding:.15em .6em;font-weight:600;display:inline-block}.quality-Positive{background:color-mix(in srgb, var(--roxy-success,#22c55e) 18%, transparent);color:var(--_success-fg);border:1px solid color-mix(in srgb, var(--roxy-success,#22c55e) 40%, transparent)}.quality-Negative{background:color-mix(in srgb, var(--roxy-danger,#ef4444) 18%, transparent);color:var(--_danger-fg);border:1px solid color-mix(in srgb, var(--roxy-danger,#ef4444) 40%, transparent)}.quality-Both{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 18%, transparent);color:var(--_warning-fg);border:1px solid color-mix(in srgb, var(--roxy-warning,#f59e0b) 40%, transparent)}.family-chip{font-size:var(--roxy-text-xs,.75rem);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-fg,#0a0a0a);border-radius:999px;padding:.15em .6em;font-weight:500;display:inline-block}.present-badge{font-size:var(--roxy-text-xs,.75rem);border-radius:999px;padding:.15em .6em;font-weight:600;display:inline-block}.present-badge.is-present{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.present-badge.is-absent{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a)}.present-badge.is-outranked{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 16%, transparent);color:var(--_warning-fg)}.detail-card.absent{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 22%, var(--roxy-surface,#fff))}.detail-card.outranked{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 10%, var(--roxy-surface,#fff))}.group-stack{gap:var(--roxy-space-md,1rem);display:grid}.group{gap:var(--roxy-space-sm,.5rem);display:grid}.group-summary{align-items:baseline;gap:var(--roxy-space-sm,.5rem);cursor:pointer;color:var(--roxy-muted,#71717a);list-style:none;display:flex}.group-summary:before{content:"+";color:var(--roxy-accent-ink,#b45309);font-size:1.1em;line-height:1}.group[open]>.group-summary:before{content:"-"}.group-label{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.group-count{font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.group-note,.evidence{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.description{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.detail-card details{font-size:var(--roxy-text-sm,.875rem)}.detail-card details>summary{cursor:pointer;color:var(--roxy-accent-ink,#b45309);align-items:center;gap:.4em;padding:.25em 0;font-weight:500;list-style:none;display:flex}.detail-card details>summary:before{content:"+";font-size:1.1em;line-height:1}.detail-card details[open]>summary:before{content:"-"}.detail-card details .result-body{padding-top:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);line-height:var(--roxy-leading-normal,1.5)}.no-results{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);padding:var(--roxy-space-md,1rem) 0;text-align:center}.detail-grid{gap:var(--roxy-space-sm,.5rem);display:grid}`],m([(0,vo.state)()],qr.prototype,"filter",2),qr=m([(0,vo.customElement)("roxy-yoga-list")],qr);var k=require("lit"),$o=require("lit/decorators.js");var Lo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Jc={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Yr=class extends g{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,a=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o="date"in e&&e.date?A(a,e.date):"";return k.html`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${y(t,"name")}</h2><div class="sub">${t.pinyin??""}${o?` ${o}`:""}</div></div>${s!==null?k.html`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:j(a,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:k.nothing}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?k.html`<p class="prose" part="section interpretation">${e.interpretation}</p>`:k.nothing} ${"conventions"in e?fr(e.conventions,this.translator,this.effectiveLang()):k.nothing}</article>`}renderIdentity(e,t){let a="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,o="element"in e&&typeof e.element=="string"?e:void 0,i=o?y(o,"element"):y(t,"element"),l="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!i&&!l&&!a&&!s&&!t.branch?k.nothing:k.html`<div class="facts" part="details">${i?k.html`<span><span class="lbl">${this.t("Element")}</span><b>${i}</b></span>`:k.nothing} ${l?k.html`<span><span class="lbl">${this.t("Polarity")}</span>${l}</span>`:k.nothing} ${t.branch?k.html`<span><span class="lbl">${this.t("Branch")}</span>${t.branch}</span>`:k.nothing} ${a?k.html`<span><span class="lbl">${this.t("Pillar")}</span> <b>${a.stem??""}</b> ${a.branch??""}</span>`:k.nothing} ${s&&typeof s.start=="number"?k.html`<span><span class="lbl">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:k.nothing}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return k.nothing;let t="year"in e?e.year:void 0,a="benMingNian"in e?e.benMingNian:!1;return k.html`${k.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Day")}</span><b>${e.relationship&&Lo[e.relationship]?this.t(Lo[e.relationship]):e.relationship??""}</b></span> ${t?k.html`<span><span class="lbl">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&Lo[t.relationship]?this.t(Lo[t.relationship]):t.relationship??""}</span>`:k.nothing} ${a?k.html`<span class="tag">${this.t("Ben Ming Nian")}</span>`:k.nothing}</div>`} ${this.hideReadings?k.nothing:k.html`${e.overview?k.html`<p class="prose" part="section overview">${e.overview}</p>`:k.nothing}<div class="sections" part="section outlook">${"love"in e&&e.love?k.html`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:k.nothing} ${"career"in e&&e.career?k.html`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:k.nothing} ${"advice"in e&&e.advice?k.html`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:k.nothing}</div>`} ${t?.note&&!this.hideReadings?k.html`<p class="prose" part="reading">${t.note}</p>`:k.nothing}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return k.nothing;let t=e;return k.html`${t.trine?k.html`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> ${y(t.trine,"element")}</span> ${t.trine.members?.length?k.html`<span class="chips">${t.trine.members.map(a=>k.html`<span>${a}</span>`)}</span>`:k.nothing} ${t.trine.theme?k.html`<span>${t.trine.theme}</span>`:k.nothing}</div></section>`:k.nothing} ${this.renderPartners(t)} ${this.hideReadings?k.nothing:k.html`${t.summary?k.html`<p class="prose" part="section summary">${t.summary}</p>`:k.nothing} ${t.traits?.length?k.html`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><div class="chips">${t.traits.map(a=>k.html`<span>${a}</span>`)}</div></section>`:k.nothing} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?k.html`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:k.nothing}`}`}renderPartners(e){let a=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return a.length===0?k.nothing:k.html`<section part="section partners"><div class="partners">${a.map(([s,o])=>k.html`<div class="partner"><span class="role">${this.t(s)}</span> <span class="glyph" lang="zh">${o?.chinese??""}</span> <span class="who">${y(o,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?k.html`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(a=>k.html`<li>${a}</li>`)}</ul></section>`:k.nothing}renderCompatibility(e){let t=e.signs?.first,a=e.signs?.second,s=typeof e.score=="number"?e.score:null;return k.html`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${y(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${a?.chinese??""}</span> <span class="sub">${y(a,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${y(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?k.html`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?k.html`<span class="tag">${Jc[e.verdict]?this.t(Jc[e.verdict]):e.verdict}</span>`:k.nothing}</div>`:k.nothing} ${e.sharedElement?k.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Shared element")}</span><b>${y(e,"sharedElement")}</b></span></div>`:k.nothing} ${this.hideReadings?k.nothing:k.html`${e.summary?k.html`<p class="prose" part="section summary">${e.summary}</p>`:k.nothing} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?k.html`<p class="prose" part="reading">${e.advice}</p>`:k.nothing}`}</article>`}};Yr.styles=[u,ee,k.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.hanzi{color:var(--roxy-accent-ink,#b45309);font-size:2.75rem;line-height:1}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.sub{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.energy{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin-left:auto}.energy-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);vertical-align:middle;width:6rem;height:6px;margin-left:6px;display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.facts{gap:.35rem var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.prose{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}.sections{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.section p{font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.bullets{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0;padding-left:1.1rem}.partners{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.partner{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;gap:.1rem;display:grid}.partner .role{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.partner .glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.5rem;line-height:1.15}.partner .who{font-size:var(--roxy-text-sm,.875rem)}.score{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.score-value{font-size:2rem;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;line-height:1}.score-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:1;min-width:8rem;height:8px;overflow:hidden}.score-fill{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-info,#2563eb) 16%, transparent);color:var(--_info-fg);padding:1px 8px}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.pair .side{text-align:center;gap:.1rem;display:grid}`],m([(0,$o.property)({type:String,reflect:!0})],Yr.prototype,"mode",2),Yr=m([(0,$o.customElement)("roxy-zodiac-card")],Yr);var Qc={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function Ai(n){let r=n.lastIndexOf(":"),e=r===-1?n:n.slice(r+1),t=Qc[e];return t?{...t,toolName:e}:void 0}var wo=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:!0},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:!0},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:!0}];var Wg=wo.map(n=>n.slug);
145
+ </g>`}renderEmptyGrid(e){let t=[];for(let a=0;a<e;a++)for(let s=0;s<e;s++)t.push(z.svg`<rect class="pada" x=${s} y=${a} width="1" height="1"></rect>`);return t}renderDoor(e,t){let a=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,a,a)}renderVamsa(e,t){return(t??[]).map(a=>{let[s,o]=fo(e,a.from),[i,l]=fo(e,a.to);return z.svg`<line class="vamsa" x1=${s} y1=${o} x2=${i} y2=${l}></line>`})}renderBrahmasthan(e,t){let a=t??[];if(a.length<3)return z.nothing;let s=a.map(o=>fo(e,o).join(",")).join(" ");return z.svg`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let a=new Set(t?.atimarma??[]);return a.size===0?z.nothing:(t?.cells??[]).filter(s=>s.square!=null&&a.has(s.square)).map(s=>{let[o,i]=fo(e,s.center);return z.svg`<circle class="atimarma" cx=${o} cy=${i} r="0.06"></circle>`})}renderDevatas(e,t){let a=new Map;for(let s of t??[])!s.devataName||s.square==null||a.set(s.devataName,[...a.get(s.devataName)??[],s.square]);return a.size===0?z.nothing:z.html`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...a].map(([s,o])=>z.html`<li><b>${s}</b> ${o.sort((i,l)=>i-l).map(i=>j(e,i)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return z.html`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let a=(t?.cells??[]).some(s=>s.withinPlot===!1);return z.html`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${a?z.html`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:z.nothing}</div>`}renderFacts(e,t,a,s){let o=t.conventions?.grid;return z.html`<div class="facts" part="details">${o?z.html`<span><span class="lbl">${Pe(e,"grid")}</span><b>${ge(e,"grid",o)}</b></span>`:z.nothing} ${s?.pada!=null?z.html`<span><span class="lbl">${this.t("Pada")}</span><b>${j(e,s.pada)}</b></span>`:z.nothing} ${s?.side?z.html`<span><span class="lbl">${this.t("Side")}</span><b>${ge(e,"facing",s.side)}</b></span>`:z.nothing} ${s?.startCorner?z.html`<span><span class="lbl">${this.t("Counted from")}</span>${ge(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?z.html`· ${j(e,s.ordinalOnSide)}`:z.nothing}</span>`:z.nothing} ${s?.devata?.name?z.html`<span><span class="lbl">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?z.html`· ${this.t("Pada")} ${j(e,s.devata.padaCount)}`:z.nothing}</span>`:z.nothing} ${s?.recommendedPadas?.length?z.html`<span><span class="lbl">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(i=>j(e,i)).join(", ")}</span>`:z.nothing} ${a?.brahmasthan?.area!=null?z.html`<span><span class="lbl">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,a.brahmasthan.area,a.conventions?.unit)}</b></span>`:z.nothing} ${a?.marma?.areaEach!=null?z.html`<span><span class="lbl">${this.t("Area of one marma")}</span>${this.areaLabel(e,a.marma.areaEach,a.conventions?.unit)}</span>`:z.nothing} ${a?.atimarma?.length?z.html`<span><span class="lbl">${this.t("Crossing points")}</span>${a.atimarma.map(i=>j(e,i)).join(", ")}</span>`:z.nothing}</div>`}renderSources(e){return e.length===0?z.nothing:z.html`<section part="section sources"><ul class="cites">${e.map(t=>z.html`<li>${Ds(t)}</li>`)}</ul></section>`}areaLabel(e,t,a){let s=f(e,t,2);if(!a)return s;let o=Hg[a]??`${a}²`;return z.html`<span title="${ge(e,"unit",a)}">${s} ${o}</span>`}ringLabel(e){let t=Bg[e];return t?this.t(t):D(e)}verdictLabel(e){let t=Fg[e];return t?this.t(t):D(e)}};Vr.styles=[u,z.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:.35rem var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.verdict{border-radius:var(--roxy-radius-sm,4px);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);background:color-mix(in srgb, var(--roxy-info,#0284c7) 12%, var(--roxy-surface,#fff));padding:.1rem .4rem;display:inline-block}.verdict-auspicious{background:color-mix(in srgb, var(--roxy-success,#16a34a) 12%, var(--roxy-surface,#fff))}.verdict-inauspicious{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 12%, var(--roxy-surface,#fff))}.frame{max-width:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";place-items:center;gap:.15rem .25rem;width:100%;margin-inline:auto;display:grid}.compass{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);letter-spacing:.06em}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 7%, var(--roxy-surface,#fff))}.pada-center,.pada-brahma{fill:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, var(--roxy-surface,#fff))}.pada-outside{fill:color-mix(in srgb, var(--roxy-muted,#71717a) 18%, var(--roxy-surface,#fff))}.pada-door{fill:color-mix(in srgb, var(--roxy-success,#16a34a) 26%, var(--roxy-surface,#fff));stroke:var(--roxy-fg,#0a0a0a);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink,#b45309);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary,#475569);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink,#b45309)}text{fill:var(--roxy-fg,#0a0a0a);font-family:var(--roxy-font-sans,system-ui, sans-serif)}.devata{text-anchor:middle;font-size:.19px}.square-no{text-anchor:middle;fill:var(--roxy-muted,#71717a);font-size:.14px}@container (width<=30rem){.devata{display:none}.square-no{dominant-baseline:middle;font-size:.34px;transform:translateY(.16px)}}.facts{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.devatas{gap:.2rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.devatas b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.legend{gap:.35rem var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-border,#e4e4e7);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.swatch-brahma{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, var(--roxy-surface,#fff))}.swatch-outside{background:color-mix(in srgb, var(--roxy-muted,#71717a) 18%, var(--roxy-surface,#fff))}.swatch-door{background:color-mix(in srgb, var(--roxy-success,#16a34a) 26%, var(--roxy-surface,#fff))}.effect{font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-relaxed,1.65);margin:0}.reading{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-relaxed,1.65);color:var(--roxy-secondary,#475569);margin:0}.cites{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0;padding:0;list-style:none}`],m([(0,xo.property)({type:String,reflect:!0})],Vr.prototype,"mode",2),Vr=m([(0,xo.customElement)("roxy-vastu-mandala")],Vr);function qg(n){let r=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(r));if(!(!Number.isFinite(e)||e<2||e*e!==r))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}var et=require("lit"),Kc=require("lit/decorators.js");var Qa=class extends g{renderData(r){let e=r.aspects??[],t=r.mutualAspects??[],a=r.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=r.datetime?he(this.effectiveLang(),r.datetime):"";return et.html`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2 class="title">${this.t("Vedic aspects")}</h2>${s?et.html`<p class="subtitle">${this.t("Chart time {{when}}",{when:s})}</p>`:et.nothing}</div>${a.length>0?et.html`<div part="section positions"><p class="section-label">${this.t("Sidereal positions")}</p><div class="mutual">${a.map(o=>et.html`<span class="position"><strong>${o.name}</strong> ${typeof o.longitude=="number"?it(o.longitude):o.sign??""}</span>`)}</div></div>`:et.nothing} ${t.length>0?et.html`<div part="section mutual-aspects"><p class="section-label">${this.t("Mutual aspects")}</p><div class="mutual">${t.map(o=>et.html`<span class="mutual-pill">${o.planet1} ⟷ ${o.planet2} ${o.aspectType?et.html`<span class="rel">${o.aspectType}</span>`:et.nothing}</span>`)}</div></div>`:et.nothing} ${e.length>0?et.html`<div class="overflow-scroll" part="table"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(o=>et.html`<tr><td>${o.aspectingPlanet}</td><td><span class="kind">${o.aspectType}</span></td><td>${o.aspectedPlanet}</td><td>${typeof o.strength=="number"?et.html`<span class="bar" style="width:${Math.max(4,Math.min(100,o.strength)*.4)}px"></span><span class="num">${f(this.effectiveLang(),o.strength,0)}</span>`:et.nothing}</td><td class="num">${typeof o.orb=="number"?`${f(this.effectiveLang(),o.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:et.nothing}</div>`}};Qa.styles=[u,et.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.section-label{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin:0 0 var(--roxy-space-xs,.25rem) 0}.mutual{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.mutual-pill{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:.35rem;padding:2px 10px;display:inline-flex}.mutual-pill .rel{font-size:var(--roxy-text-xs,.75rem);font-weight:400}.position{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;align-items:baseline;gap:.35rem;padding:2px 10px;display:inline-flex}.position strong{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem)}.overflow-scroll{-webkit-overflow-scrolling:touch;min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}tbody tr:last-child td{border-bottom:none}.kind{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px;font-weight:600;display:inline-block}.num{font-variant-numeric:tabular-nums;color:var(--roxy-muted,#71717a)}.bar{background:var(--roxy-accent,#f59e0b);vertical-align:middle;border-radius:3px;height:6px;margin-right:6px;display:inline-block}`],Qa=m([(0,Kc.customElement)("roxy-vedic-aspects")],Qa);var N=require("lit"),Yc=require("lit/decorators.js");var Ti={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},Yg=Object.keys(Ti),Vc=8,bo={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},Ug={day:"Day",finance:"Finance",natal:"Natal"},qc={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},es=class extends g{renderData(r){let e=r.grahas??[];return e.length?N.html`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(r)} ${this.renderPanchanga(r)} ${this.renderGrahas(e,r.houseThemes)} ${this.renderWindows(r)} ${this.renderFinance(r)} ${this.renderDasha(r)} ${this.renderProvenance(r)}</div>`:this.renderEmpty()}renderHead(r){let e=new Map((r.tally??[]).map(a=>[a.state,a.count])),t=e.get("favourable")??0;return N.html`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("Vedic daily")}</h2><span class="when">${Zs(this.effectiveLang(),r.dayStart,r.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${r.verdict}">${this.t(bo[r.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:r.evaluated})}</span></div>${e.size?N.html`<div class="tally" part="legend">${Yg.filter(a=>e.get(a)).map(a=>N.html`<span class="pill">${this.t(Ti[a])} ${e.get(a)}</span>`)}</div>`:N.nothing} ${r.subject?N.html`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:r.subject.janmaRashi,nakshatra:r.subject.janmaNakshatra})}</p>`:N.nothing} ${(r.degraded??[]).map(a=>N.html`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:a.component,reason:a.reason})}</p>`)}</header>`}renderPanchanga(r){let e=r.panchanga;if(!e)return N.nothing;let t=(a,s)=>s?N.html`<div class="fact"><dt>${a}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?N.html`<span class="until">${this.t("until {{time}}",{time:he(this.effectiveLang(),s.validTo)})}</span>`:N.nothing}</dd></div>`:N.nothing;return N.html`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="facts" part="details"><div class="fact"><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div class="fact"><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(r,e){return r?.[String(e)]?.join(", ")??""}renderGrahas(r,e){return N.html`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${r.map(t=>{let a=R(t.graha)??"",s=this.theme(e,t.houseFromMoon);return N.html`<tr><td>${a?N.html`<span class="glyph">${a}</span>`:N.nothing}${t.graha}</td><td>${t.sign}</td><td class="num" title="${s}">${t.houseFromMoon}</td><td class="num">${typeof t.binduCount=="number"?t.binduCount:""}</td><td class="num">${this.renderKaksha(t.kaksha)}</td><td><span class="state ${t.state}" title="${t.stateSource??""}">${this.t(Ti[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(r){if(!r||typeof r.number!="number")return N.nothing;let e=r.bindu===!0?"yes":r.bindu===!1?"no":"",t=r.bindu===!0?this.t("this kaksha lord gave bindu"):r.bindu===!1?this.t("this kaksha lord gave no bindu"):"",a=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:r.number,total:Vc,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)});return N.html`<span class="kaksha" title="${t?`${a} · ${t}`:a}">${r.number}/${Vc} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(r){let e=r.tara??[],t=r.chandrabala??[];if(!e.length&&!t.length)return N.nothing;let a=(s,o)=>N.html`<small>${Zs(this.effectiveLang(),s,o)}</small>`;return N.html`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?N.html`<div class="chips">${e.map(s=>N.html`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${a(s.validFrom,s.validTo)}</span>`)}</div>`:N.nothing} ${t.length?N.html`<div class="chips">${t.map(s=>N.html`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?N.html`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:N.nothing} </span>${a(s.validFrom,s.validTo)}</span>`)}</div>`:N.nothing}</section>`}renderFinance(r){let e=r.areas?.finance;if(!e)return N.nothing;let t=r.houseThemes,a=s=>{let o=this.theme(t,s.house);return N.html`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${o?` (${o})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?N.html`<span class="note">${s.dashaLevels.map(i=>this.t(qc[i])).join(", ")}</span>`:N.nothing}</li>`};return N.html`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(bo[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?N.html`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:N.nothing}</div><div class="lists">${e.drivers?.length?N.html`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(a)}</ul></div>`:N.nothing} ${e.cautions?.length?N.html`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(a)}</ul></div>`:N.nothing}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(r){return r?N.html`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${r.band}">${this.t(bo[r.band])}</span> <span class="evidence">${r.score}</span></div><ul class="layers">${r.layers.map(e=>N.html`<li><span>${this.t(Ug[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(bo[e.band])}</span></li>`)}</ul></div>`:N.nothing}renderDasha(r){let e=r.dasha??[];return e.length?N.html`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>N.html`<span class="window"><span>${this.t(qc[t.level])} · ${t.lord}</span> <small>${Zs(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:N.nothing}renderProvenance(r){return r.frames?N.html`<section class="block" part="section frame">${ll(this.effectiveLang(),r.frames,this.translator)}</section>`:N.nothing}};es.styles=[u,ee,N.css`.wrap{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-sm);display:grid;overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.when{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.verdict-row{align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);padding:.15rem .6rem}.verdict.very-strong,.verdict.strong{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.verdict.moderate{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-accent-ink,#b45309)}.verdict.weak{background:color-mix(in srgb, var(--roxy-muted,#71717a) 16%, transparent);color:var(--roxy-secondary,#475569)}.evidence{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-sm,.875rem);font-variant-numeric:tabular-nums}.tally{flex-wrap:wrap;gap:.35rem;display:flex}.pill{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-secondary,#475569);font-variant-numeric:tabular-nums;padding:1px 8px}.block{padding:var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);gap:var(--roxy-space-sm,.5rem);display:grid}.block h3{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em;color:var(--roxy-muted,#71717a);margin:0}.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(7.5rem,1fr));margin:0;display:grid}.fact{gap:2px;display:grid}.fact dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em}.fact dd{font-size:var(--roxy-text-sm,.875rem);margin:0}.fact .until{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.scroll{-webkit-overflow-scrolling:touch;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap;padding:.35rem .5rem}th{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.05em;font-weight:var(--roxy-weight-bold,600)}td.num{font-variant-numeric:tabular-nums}.glyph{color:var(--roxy-muted,#71717a);margin-right:.35em}.state{font-size:var(--roxy-text-xs,.75rem);border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-muted,#71717a) 14%, transparent);cursor:help;padding:1px 8px}.state.favourable{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.state.underdelivered,.state.obstructed,.state.void{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-accent-ink,#b45309)}.state.aggravated,.state.unfavourable{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 14%, transparent);color:var(--_danger-fg)}.kaksha{cursor:help;align-items:center;gap:.35rem;display:inline-flex}.dot{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 90%, transparent);border-radius:50%;width:7px;height:7px}.dot.yes{background:var(--roxy-success,#16a34a)}.dot.no{background:var(--roxy-warning,#f59e0b)}.chips{flex-wrap:wrap;gap:.35rem;display:flex}.window{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);gap:1px;padding:.3rem .6rem;display:grid}.window small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.window.yes{border-color:color-mix(in srgb, var(--roxy-success,#16a34a) 45%, transparent)}.window.no{border-color:color-mix(in srgb, var(--roxy-danger,#dc2626) 35%, transparent)}.mark{color:var(--_danger-fg)}.lists{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0;padding-left:1.1rem}.note{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.composite{gap:var(--roxy-space-sm,.5rem);display:grid}.layers{font-size:var(--roxy-text-sm,.875rem);gap:.2rem;margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:.2rem var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary,#475569)}`],es=m([(0,Yc.customElement)("roxy-vedic-daily")],es);var Ai=require("lit"),bs=require("lit/decorators.js");var ar=class extends g{constructor(){super(...arguments);this.chartViewport=new Be(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?kn(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return Ai.html`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${a}</h2>${be(this.effectiveLang(),e.frame,this.translator)} ${Sn(t,this.translator)}</div>${Cn(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Ai.html`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("Vedic birth chart with twelve sign houses")}"><title>${this.t("Vedic kundli")}</title>${Rn(t,this.chartStyle,this.translator)}</svg>`,a,this.translator)}</div></div>`}};ar.styles=[u,Ue,ee,Dn,ot],m([(0,bs.property)({type:String,reflect:!0,attribute:"chart-style"})],ar.prototype,"chartStyle",2),m([(0,bs.property)({type:String,reflect:!0,attribute:"chart-reference"})],ar.prototype,"chartReference",2),m([(0,bs.property)({type:String,reflect:!0,attribute:"lagna-override"})],ar.prototype,"lagnaOverride",2),ar=m([(0,bs.customElement)("roxy-vedic-kundli")],ar);var V=require("lit"),Zc=require("lit/decorators.js");var Zg=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Uc=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],ts=class extends g{orderedRows(){let r=this.data?.meta??{},e=new Set,t=[];for(let a of Zg){let s=r[a];s&&(t.push([a,s]),e.add(a))}for(let[a,s]of Object.entries(r))e.has(a)||t.push([a,s]);return t}renderData(r){if(!r.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,a])=>a.avasthaInfo);return V.html`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2 class="title">${this.t("Planetary positions")}</h2>${be(this.effectiveLang(),r.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):V.nothing}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([a,s])=>{let o=(s.graha??a)==="Lagna",i=R(s.graha??a)??"",l=Z(s.rashi)??"";return V.html`<tr class="${o?"lagna":""}"><td class="graha">${i?V.html`<span class="glyph">${i}</span>`:V.nothing}${s.graha??a}</td><td>${l?V.html`<span class="glyph">${l}</span>`:V.nothing}${s.rashi??""}</td><td class="num">${typeof s.longitude=="number"?it(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td class="num">${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td class="num">${typeof s.house=="number"?s.house:""}</td>${Uc.map(([c])=>V.html`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?V.html`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:V.nothing}</td>`)}<td>${s.isRetrograde?V.html`<span class="retro">R</span>`:V.nothing}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let r=this.data?.modernPlanets??[];return r.length===0?V.nothing:r.map((e,t)=>{let a=Z(e.rashi)??"";return V.html`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${ws(e.planet,e.sanskritName)}</td><td>${a?V.html`<span class="glyph">${a}</span>`:V.nothing}${e.rashi??""}</td><td class="num">${typeof e.longitude=="number"?it(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td class="num">${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?V.html`<span class="retro">R</span>`:V.nothing}</td></tr>`})}renderCombustion(){let r=this.data?.combustion??[];return r.length===0?V.nothing:V.html`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>{let t=R(e.planet)??"",a=f(this.effectiveLang(),e.distanceFromSun,2),s=f(this.effectiveLang(),e.orb,1);return V.html`<div class="condition"><span class="planet">${t?`${t} `:""}${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:a,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let r=this.data?.planetaryWar??[];return r.length===0?V.nothing:V.html`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>{let t=f(this.effectiveLang(),e.distance,2);return V.html`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return V.nothing;let r=this.data?.interpretations??{},e=this.orderedRows().map(([t,a])=>[a.graha??t,r[a.graha??t],a.avasthaInfo]).filter(([,t,a])=>t!=null||a!=null);return e.length===0?V.nothing:V.html`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${pe()}</summary><div class="panel-body">${e.map(([t,a,s])=>{let o=R(t)??"";return V.html`<div class="interp"><span class="planet">${o?`${o} `:""}${t}</span> ${a?.rashi?V.html`<p><span class="label">${this.t("Rashi.")}</span> ${a.rashi}</p>`:V.nothing} ${a?.nakshatra?V.html`<p><span class="label">${this.t("Nakshatra.")}</span> ${a.nakshatra}</p>`:V.nothing} ${Uc.map(([i,l])=>s?.[i]?.interpretation?V.html`<p><span class="label">${this.t(l)}</span> ${s[i].interpretation}</p>`:V.nothing)}</div>`})}</div></details>`}renderHouses(){let r=(this.data?.houses??[]).filter(e=>e.name||e.description);return r.length===0?V.nothing:V.html`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>V.html`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?V.html`<p class="desc">${e.description}</p>`:V.nothing}</div>`)}</div></details>`}renderYogas(){let r=(this.data?.yogas??[]).filter(e=>e.present);return r.length===0?V.nothing:V.html`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${r.length}</span>${pe()}</summary><div class="panel-body">${r.map(e=>V.html`<div class="bhava"><span class="name">${e.name} ${e.quality?V.html`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:V.nothing}</span> ${e.result?V.html`<p class="desc">${e.result}</p>`:V.nothing}</div>`)}</div></details>`}};ts.styles=[u,ee,q,V.css`.wrap{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);box-shadow:var(--roxy-shadow-sm);overflow:hidden}.head{padding:var(--roxy-space-md,1rem);border-bottom:1px solid var(--roxy-border,#e4e4e7)}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.scroll{min-width:0;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem);min-width:760px}thead{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 20%, transparent)}th,td{padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);text-align:left;white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr{border-top:1px solid var(--roxy-border,#e4e4e7)}tbody tr.lagna{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}tbody tr.modern-first{border-top-width:2px}td.graha{font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a)}.glyph{color:var(--roxy-muted,#71717a);margin-right:.4em}tbody tr.lagna .glyph{color:var(--roxy-accent-ink,#b45309)}.gloss{color:var(--roxy-secondary,#475569);font-size:var(--roxy-text-xs,.75rem);display:block}.retro{color:var(--_warning-fg);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600)}.num{font-variant-numeric:tabular-nums}details.panel{border-top:1px solid var(--roxy-border,#e4e4e7)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);display:flex}details.panel>summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px}.summary-count{margin-left:auto;margin-right:var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-normal,400);color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.panel-body{padding:0 var(--roxy-space-md,1rem) var(--roxy-space-md,1rem);gap:var(--roxy-space-sm,.5rem);grid-template-columns:minmax(0,1fr);display:grid}.condition{font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;align-items:baseline;gap:.4em;display:flex}.condition .planet{font-weight:var(--roxy-weight-bold,600)}.condition .detail{color:var(--roxy-muted,#71717a);font-variant-numeric:tabular-nums}.condition .winner{color:var(--_success-fg);font-weight:var(--roxy-weight-bold,600)}.interp{gap:.15em;display:grid}.interp .planet{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem)}.interp p{font-size:var(--roxy-text-sm,.875rem);line-height:var(--roxy-leading-normal,1.5);margin:0}.interp .label{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600)}.bhava{gap:.15em;display:grid}.bhava .name{font-weight:var(--roxy-weight-bold,600);font-size:var(--roxy-text-sm,.875rem)}.bhava .desc{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.quality{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.04em}.quality.positive{color:var(--_success-fg)}.quality.negative{color:var(--_danger-fg)}.quality.both{color:var(--roxy-muted,#71717a)}`],ts=m([(0,Zc.customElement)("roxy-vedic-planets-table")],ts);var fe=require("lit"),vo=require("lit/decorators.js");function Wc(n){return n.suppressedBy||void 0}var Xc=["classical","asraya","dala","akriti","sankhya"];function Jc(n){let r=Xc.indexOf(n.family);return r===-1?Xc.length:r}var Wg=[{id:"present",source:"Present",open:!0,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:!0,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:!1,noteSource:"At least one classical condition fails. Read the evidence for which."}],qr=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Wc(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return fe.nothing;let a=[...t].sort((s,o)=>Jc(s)-Jc(o));return fe.html`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${a.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){let t=`quality-chip quality-${e}`;return fe.html`<span class="${t}">${e}</span>`}renderFamilyChip(e){return e.family?fe.html`<span class="family-chip" title="${this.t("Classical family")}">${H(e.family)}</span>`:fe.nothing}renderDetailCard(e){return fe.html`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):fe.nothing} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?fe.html`<p class="description">${e.description}</p>`:fe.nothing} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?fe.nothing:fe.html`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Wc(e),[a,s]=e.present?["is-present","Present"]:t?["is-outranked",`Outranked by ${H(t)}`]:["is-absent","Not present"];return fe.html`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):fe.nothing} ${this.renderFamilyChip(e)} <span class="present-badge ${a}">${s}</span></p>${e.description&&!this.hideReadings?fe.html`<p class="description">${e.description}</p>`:fe.nothing} ${e.present?this.renderEffects(e.result):fe.nothing} ${e.evidence?fe.html`<p class="evidence">${e.evidence}</p>`:fe.nothing}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let a=e;return fe.html`<div class="wrap" part="card">${this.renderDetailCard(a)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let a=e.yogas;if(a.length>0&&"present"in a[0]){let c=a,p=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,d=e.total??c.filter(h=>h.present).length;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:d,total:c.length})}</span></div>${be(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${p.length>0?Wg.map(h=>this.renderVerdictGroup(h,p.filter(b=>this.verdictOf(b)===h.id))):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(a.length>0&&"description"in a[0]){let c=a,p=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,d=e.total;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${d!==void 0?fe.html`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:fe.nothing}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${p.length>0?p.map(h=>this.renderDetailCard(h)):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let o=a,i=t?o.filter(c=>c.name.toLowerCase().includes(t)):o,l=e.total;return fe.html`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${l!==void 0?fe.html`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:fe.nothing}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${i.length>0?i.map(c=>fe.html`<div class="yoga-chip">${c.name}</div>`):fe.html`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return fe.html`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};qr.styles=[u,ee,fe.css`.wrap{gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.search-wrap{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.search{width:100%;max-width:280px;font-size:var(--roxy-text-sm,.875rem);font-family:var(--roxy-font-sans);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);outline:none;padding:.35em .75em}.search::placeholder{color:var(--roxy-fg,#0a0a0a);opacity:.65}.search:focus{border-color:var(--roxy-accent,#f59e0b);box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 30%, transparent)}.grid{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fill,minmax(180px,1fr));display:grid}.yoga-chip{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-size:var(--roxy-text-sm,.875rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);word-break:break-word;padding:.4em .8em}.yoga-chip .yoga-id{color:var(--roxy-fg,#0a0a0a);opacity:.75;margin-top:.15em;font-size:.7em;display:block}.detail-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);gap:var(--roxy-space-sm,.5rem);display:grid}.detail-name{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;margin:0;display:flex}.quality-chip{font-size:var(--roxy-text-xs,.75rem);border-radius:999px;padding:.15em .6em;font-weight:600;display:inline-block}.quality-Positive{background:color-mix(in srgb, var(--roxy-success,#22c55e) 18%, transparent);color:var(--_success-fg);border:1px solid color-mix(in srgb, var(--roxy-success,#22c55e) 40%, transparent)}.quality-Negative{background:color-mix(in srgb, var(--roxy-danger,#ef4444) 18%, transparent);color:var(--_danger-fg);border:1px solid color-mix(in srgb, var(--roxy-danger,#ef4444) 40%, transparent)}.quality-Both{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 18%, transparent);color:var(--_warning-fg);border:1px solid color-mix(in srgb, var(--roxy-warning,#f59e0b) 40%, transparent)}.family-chip{font-size:var(--roxy-text-xs,.75rem);border:1px solid var(--roxy-border,#e4e4e7);color:var(--roxy-fg,#0a0a0a);border-radius:999px;padding:.15em .6em;font-weight:500;display:inline-block}.present-badge{font-size:var(--roxy-text-xs,.75rem);border-radius:999px;padding:.15em .6em;font-weight:600;display:inline-block}.present-badge.is-present{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--_success-fg)}.present-badge.is-absent{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 55%, transparent);color:var(--roxy-fg,#0a0a0a)}.present-badge.is-outranked{background:color-mix(in srgb, var(--roxy-warning,#f59e0b) 16%, transparent);color:var(--_warning-fg)}.detail-card.absent{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 22%, var(--roxy-surface,#fff))}.detail-card.outranked{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 10%, var(--roxy-surface,#fff))}.group-stack{gap:var(--roxy-space-md,1rem);display:grid}.group{gap:var(--roxy-space-sm,.5rem);display:grid}.group-summary{align-items:baseline;gap:var(--roxy-space-sm,.5rem);cursor:pointer;color:var(--roxy-muted,#71717a);list-style:none;display:flex}.group-summary:before{content:"+";color:var(--roxy-accent-ink,#b45309);font-size:1.1em;line-height:1}.group[open]>.group-summary:before{content:"-"}.group-label{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.group-count{font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums}.group-note,.evidence{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.description{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);line-height:var(--roxy-leading-normal,1.5);margin:0}.detail-card details{font-size:var(--roxy-text-sm,.875rem)}.detail-card details>summary{cursor:pointer;color:var(--roxy-accent-ink,#b45309);align-items:center;gap:.4em;padding:.25em 0;font-weight:500;list-style:none;display:flex}.detail-card details>summary:before{content:"+";font-size:1.1em;line-height:1}.detail-card details[open]>summary:before{content:"-"}.detail-card details .result-body{padding-top:var(--roxy-space-xs,.25rem);color:var(--roxy-fg,#0a0a0a);line-height:var(--roxy-leading-normal,1.5)}.no-results{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);padding:var(--roxy-space-md,1rem) 0;text-align:center}.detail-grid{gap:var(--roxy-space-sm,.5rem);display:grid}`],m([(0,vo.state)()],qr.prototype,"filter",2),qr=m([(0,vo.customElement)("roxy-yoga-list")],qr);var k=require("lit"),$o=require("lit/decorators.js");var Lo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Qc={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Yr=class extends g{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,a=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o="date"in e&&e.date?A(a,e.date):"";return k.html`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${y(t,"name")}</h2><div class="sub">${t.pinyin??""}${o?` ${o}`:""}</div></div>${s!==null?k.html`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:j(a,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:k.nothing}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?k.html`<p class="prose" part="section interpretation">${e.interpretation}</p>`:k.nothing} ${"conventions"in e?fr(e.conventions,this.translator,this.effectiveLang()):k.nothing}</article>`}renderIdentity(e,t){let a="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,o="element"in e&&typeof e.element=="string"?e:void 0,i=o?y(o,"element"):y(t,"element"),l="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!i&&!l&&!a&&!s&&!t.branch?k.nothing:k.html`<div class="facts" part="details">${i?k.html`<span><span class="lbl">${this.t("Element")}</span><b>${i}</b></span>`:k.nothing} ${l?k.html`<span><span class="lbl">${this.t("Polarity")}</span>${l}</span>`:k.nothing} ${t.branch?k.html`<span><span class="lbl">${this.t("Branch")}</span>${t.branch}</span>`:k.nothing} ${a?k.html`<span><span class="lbl">${this.t("Pillar")}</span> <b>${a.stem??""}</b> ${a.branch??""}</span>`:k.nothing} ${s&&typeof s.start=="number"?k.html`<span><span class="lbl">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:k.nothing}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return k.nothing;let t="year"in e?e.year:void 0,a="benMingNian"in e?e.benMingNian:!1;return k.html`${k.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Day")}</span><b>${e.relationship&&Lo[e.relationship]?this.t(Lo[e.relationship]):e.relationship??""}</b></span> ${t?k.html`<span><span class="lbl">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&Lo[t.relationship]?this.t(Lo[t.relationship]):t.relationship??""}</span>`:k.nothing} ${a?k.html`<span class="tag">${this.t("Ben Ming Nian")}</span>`:k.nothing}</div>`} ${this.hideReadings?k.nothing:k.html`${e.overview?k.html`<p class="prose" part="section overview">${e.overview}</p>`:k.nothing}<div class="sections" part="section outlook">${"love"in e&&e.love?k.html`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:k.nothing} ${"career"in e&&e.career?k.html`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:k.nothing} ${"advice"in e&&e.advice?k.html`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:k.nothing}</div>`} ${t?.note&&!this.hideReadings?k.html`<p class="prose" part="reading">${t.note}</p>`:k.nothing}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return k.nothing;let t=e;return k.html`${t.trine?k.html`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> ${y(t.trine,"element")}</span> ${t.trine.members?.length?k.html`<span class="chips">${t.trine.members.map(a=>k.html`<span>${a}</span>`)}</span>`:k.nothing} ${t.trine.theme?k.html`<span>${t.trine.theme}</span>`:k.nothing}</div></section>`:k.nothing} ${this.renderPartners(t)} ${this.hideReadings?k.nothing:k.html`${t.summary?k.html`<p class="prose" part="section summary">${t.summary}</p>`:k.nothing} ${t.traits?.length?k.html`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><div class="chips">${t.traits.map(a=>k.html`<span>${a}</span>`)}</div></section>`:k.nothing} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?k.html`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:k.nothing}`}`}renderPartners(e){let a=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return a.length===0?k.nothing:k.html`<section part="section partners"><div class="partners">${a.map(([s,o])=>k.html`<div class="partner"><span class="role">${this.t(s)}</span> <span class="glyph" lang="zh">${o?.chinese??""}</span> <span class="who">${y(o,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?k.html`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(a=>k.html`<li>${a}</li>`)}</ul></section>`:k.nothing}renderCompatibility(e){let t=e.signs?.first,a=e.signs?.second,s=typeof e.score=="number"?e.score:null;return k.html`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${y(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${a?.chinese??""}</span> <span class="sub">${y(a,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${y(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?k.html`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?k.html`<span class="tag">${Qc[e.verdict]?this.t(Qc[e.verdict]):e.verdict}</span>`:k.nothing}</div>`:k.nothing} ${e.sharedElement?k.html`<div class="facts" part="details"><span><span class="lbl">${this.t("Shared element")}</span><b>${y(e,"sharedElement")}</b></span></div>`:k.nothing} ${this.hideReadings?k.nothing:k.html`${e.summary?k.html`<p class="prose" part="section summary">${e.summary}</p>`:k.nothing} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?k.html`<p class="prose" part="reading">${e.advice}</p>`:k.nothing}`}</article>`}};Yr.styles=[u,ee,k.css`.card{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.hanzi{color:var(--roxy-accent-ink,#b45309);font-size:2.75rem;line-height:1}.title{font-size:var(--roxy-text-xl,1.5rem);font-weight:var(--roxy-weight-bold,600);letter-spacing:var(--roxy-tracking-tight);margin:0}.sub{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a)}.energy{font-variant-numeric:tabular-nums;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);margin-left:auto}.energy-bar{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);vertical-align:middle;width:6rem;height:6px;margin-left:6px;display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.facts{gap:.35rem var(--roxy-space-md,1rem);border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569);flex-wrap:wrap;display:flex}.facts .lbl{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600);margin-right:.35rem}.facts b{color:var(--roxy-fg,#0a0a0a);font-weight:var(--roxy-weight-bold,600)}.block-title{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;letter-spacing:.06em}.prose{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);margin:0;line-height:1.7}.sections{gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.section p{font-size:var(--roxy-text-sm,.875rem);margin:0}.chips{gap:var(--roxy-space-xs,.25rem);flex-wrap:wrap;display:flex}.chips span{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 8px}.bullets{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);margin:0;padding-left:1.1rem}.partners{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.partner{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem);text-align:center;gap:.1rem;display:grid}.partner .role{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;font-weight:var(--roxy-weight-bold,600)}.partner .glyph{color:var(--roxy-accent-ink,#b45309);font-size:1.5rem;line-height:1.15}.partner .who{font-size:var(--roxy-text-sm,.875rem)}.score{align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.score-value{font-size:2rem;font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;line-height:1}.score-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);flex:1;min-width:8rem;height:8px;overflow:hidden}.score-fill{background:var(--roxy-accent,#f59e0b);height:100%;display:block}.tag{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);background:color-mix(in srgb, var(--roxy-info,#2563eb) 16%, transparent);color:var(--_info-fg);padding:1px 8px}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.pair .side{text-align:center;gap:.1rem;display:grid}`],m([(0,$o.property)({type:String,reflect:!0})],Yr.prototype,"mode",2),Yr=m([(0,$o.customElement)("roxy-zodiac-card")],Yr);var ep={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function zi(n){let r=n.lastIndexOf(":"),e=r===-1?n:n.slice(r+1),t=ep[e];return t?{...t,toolName:e}:void 0}var wo=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:!0},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:!0},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:!0}];var Xg=wo.map(n=>n.slug);
146
146
  //# sourceMappingURL=index.cjs.map