@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.js CHANGED
@@ -1,19 +1,19 @@
1
- var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e,t)=>{for(var a=t>1?void 0:t?ip(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&&op(r,e,a),a};import{css as Sp,html as re,nothing as ze}from"lit";import{customElement as Rp,property as Cp}from"lit/decorators.js";import{html as nt,nothing as Dr}from"lit";import{property as pt,state as ar}from"lit/decorators.js";import{ifDefined as Xa}from"lit/directives/if-defined.js";var Sl=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function li(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 ii(n){let r=n.toLowerCase();return Sl.find(e=>e.toLowerCase()===r)}function Bn(n){let r=li(n);if(!r)return;let e=ii(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?ii(`zh-${s}`):void 0}return ii(a)}import{LitElement as dp}from"lit";function It(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function w(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 Rl="__ROXY_UI_I18N__";function di(){let n=globalThis,r=n[Rl];if(r)return r;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[Rl]=e,e}function ci(n,r){return r?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in r?String(r[t]??""):e):n}function Cl(n,r,e){return ci(Dl(n,r)??r,e)}function Dl(n,r){if(!n)return;let{catalogs:e}=di(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[It(r)]}function Tl(n){if(!n)return;let{fieldLabels:r}=di(),e=n.toLowerCase();return r[e]??r[e.split("-")[0]]}function pi(n,r){return Tl(n)?.fields[r]}function Al(n,r,e){return Tl(n)?.enums[`${r}.${e}`]}function zl(n){let{listeners:r}=di();return r.add(n),()=>{r.delete(n)}}var Fn=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){this.unsubscribe=zl(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Rr=class extends dp{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Fn(this)}t(e,t){return Cl(this.effectiveLang(),e,t)}effectiveLang(){return li(this)}};import{css as cp}from"lit";var u=cp`: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 pp="__cols",mp="__rows";function hp(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Hn(n){if(Array.isArray(n)){let s=!1,o=n.map(i=>{let l=Hn(i);return l!==i&&(s=!0),l});return s?o:n}if(!hp(n))return n;let r=n[pp],e=n[mp];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]=Hn(s[l])}),o});let t=!1,a={};for(let[s,o]of Object.entries(n)){let i=Hn(o);i!==o&&(t=!0),a[s]=i}return t?a:n}function jn(n){return Hn(n)}var gp="pk_live_YOUR_KEY",Ml={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===gp?Ml.sample:n.startsWith("pk_")?void 0:Ml.secret}function Ua(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 Vn="https://roxyapi.com/api/v2";async function El(n){return(await Pl(n)).message}async function Pl(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 Za=class extends Error{constructor(e,t=null,a=!0){super(e);this.issues=t;this.worded=a}};function mi(n){return n.submitUrl?void 0:Xr(n.publishableKey)}function hi(n){return!!(n.submitUrl||n.publishableKey&&!mi(n))}async function Wa(n,r,e){let t=mi(n);if(t)throw new Za(t.message);let a=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:up(r,n.submitContext),signal:e}):await yp(n,r,e);if(!a.ok){let s=await Pl(a);throw new Za(s.message,s.issues,s.worded)}return await a.json()}function up(n,r){return JSON.stringify(r?{...n,context:r}:n)}function yp(n,r,e){let t=new URL(`${n.baseUrl??Vn}${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 Kn=class{constructor(r){this.baseUrl=Vn;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=mi(this);if(e){this.host.error=e.message,Ua(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 Wa(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 Za&&(this.host.issues=a.issues),this.worded=a instanceof Za&&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 _l(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}}import{css as Nl,html as Cr,nothing as Jr}from"lit";import{css as fp,html as xp}from"lit";function B(){return xp`<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 M=fp`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 gi=Nl`.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}`,F=Nl`.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}${gi}`;function Qr(n){return n?.length?Cr`<div class="interp-keywords">${n.map(r=>Cr`<span class="kw">${r}</span>`)}</div>`:Jr}function mn(n,r){if(!n)return Jr;let e=(t,a)=>a?Cr`<p><strong>${r(t)}</strong> ${a}</p>`:Jr;return Cr`${n.summary?Cr`<p>${n.summary}</p>`:Jr} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Qr(n.keywords)}`}function Il(n,r,e){let t=n.filter(a=>!!a.body);return t.length===0?Jr:Cr`<section class="block" part="section readings"><h3>${e}</h3>${t.map((a,s)=>Cr`<details class="interp-card" part="reading" name="${r}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${B()} ${a.aside?Cr`<span class="interp-aside"><small>${a.aside}</small></span>`:Jr}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??Jr}</div></details>`)}</section>`}var Gl="roxy-data";function Ol(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function bp(n){return`<script type="application/json" class="${Gl}">${Ol(n)}<\/script>`}function vp(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var qn=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(vp(r)&&r.classList.contains(Gl))return r;return null}parse(r){if(r?.trim())try{return JSON.parse(r)}catch{return}}};var Lp={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 Rr{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 Wa(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(_l(this.endpoint,this.method,t.values,t.queryKeys??[]))};new qn(this),this.fetcher=new Kn(this)}static{this.styles=[u]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=jn(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 nt`${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")?nt`<roxy-data .data="${e}" lang="${Xa(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 Dr;let t=e.map(a=>`[part~="${a}"],roxy-endpoint-form::part(${a}){display:none!important}`).join("");return nt`<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()?nt`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,a){return this.hideReadings?Dr:Il(e,t,this.t(a??"Reading"))}renderResult(e){let t=nt`<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()?nt`${t}${this.renderAttribution()}`:t}renderWithForm(e){return nt`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Dr:this.renderErrorBanner(this.error):this.data==null?Dr:this.showAttribution()?nt`${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"?Dr:e.length>=t?Dr:nt`<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?nt`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Dr}</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:Bn(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return nt`<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(Dr):this.renderEmpty()}renderForm(){return nt`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Xa(this.specUrl)}" publishable-key="${Xa(this.publishableKey)}" location-url="${Xa(this.locationUrl)}" submit-label="${Xa(this.submitLabel)}" lang="${Xa(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 nt`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return nt`<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?nt`${t}${this.renderForm()}`:t}renderErrorBanner(e){return nt`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([pt({attribute:!1})],g.prototype,"data",2),m([pt({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([pt({type:String})],g.prototype,"method",2),m([pt({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([pt({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([pt({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([pt({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([pt({attribute:"submit-context",converter:Lp})],g.prototype,"submitContext",2),m([pt({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([pt({type:Boolean})],g.prototype,"remember",2),m([pt({type:Boolean,attribute:"hide-readings",reflect:!0})],g.prototype,"hideReadings",2),m([pt({type:String,attribute:"hide-sections",reflect:!0})],g.prototype,"hideSections",2),m([pt({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([pt({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([pt({type:String})],g.prototype,"attribution",2),m([ar()],g.prototype,"loading",2),m([ar()],g.prototype,"error",2),m([ar()],g.prototype,"issues",2),m([ar()],g.prototype,"selfFetched",2),m([ar()],g.prototype,"editing",2),m([ar()],g.prototype,"sticky",2),m([ar()],g.prototype,"openedRow",2),m([ar()],g.prototype,"openedRowId",2),m([ar()],g.prototype,"moreLoading",2),m([ar()],g.prototype,"moreError",2);var Yn=/^\d{4}-\d{2}-\d{2}$/,$p=/^\d{4}-\d{2}$/,Hl=/^\d{2}:\d{2}(:\d{2})?$/,wp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Bl=new Map;function ut(n){if(!n)return["en"];let r=Bl.get(n);if(r)return[r,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Bl.set(n,e),[e,"en"]}var Fl=new Map;function Un(n){let r=n??"",e=Fl.get(r);if(e)return e;let a={hour:new Intl.DateTimeFormat(ut(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 Fl.set(r,a),a}function ui(n,r){return n&&r?`${n} - ${r}`:n||r}function ea(n){let r=Hl.test(n)?`1970-01-01T${n}`:Yn.test(n)?`${n}T00:00:00`:$p.test(n)?`${n}-01T00:00:00`:wp.test(n)?n.replace(" ","T"):null;return r?{d:new Date(`${r}Z`),timeZone:"UTC"}:{d:new Date(n)}}function mt(n,r){if(typeof r!="string"||r.length===0||Yn.test(r))return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleTimeString(ut(n),{...Un(n),timeZone:t})}function k(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(ut(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function sr(n,r){return r?ui(mt(n,r.start),mt(n,r.end)):""}function Ct(n,r,e){return ui(k(n,r),k(n,e))}function hr(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(ut(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?Un(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(ut(n),{month:"short",day:"numeric",timeZone:t})}function jl(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(ut(n),{weekday:"short",day:"numeric",timeZone:t})}function Ja(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(ut(n),{month:"long",year:"numeric",timeZone:"UTC"})}function Zn(n,r){return typeof r!="number"||!Number.isInteger(r)||r<1||r>12?"":new Date(Date.UTC(2e3,r-1,1,12)).toLocaleDateString(ut(n),{month:"long",timeZone:"UTC"})}function z(n,r){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(ut(n),{maximumFractionDigits:0})}function He(n,r){let e=r.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(ut(n),{style:"long",type:"conjunction"}).format(e)}function f(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(ut(n),{maximumFractionDigits:e})}function ve(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":(r/100).toLocaleString(ut(n),{style:"percent",maximumFractionDigits:e})}var Gt={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function yt(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Ae(n){return A(yt(n))}var kp={"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"?kp[r]??w(r):"",a=typeof e=="number"?`${f(n,e,2)}°`:"";return t&&a?`${t} (${a})`:t||a}function H(n,r,e,t=!1){let a=typeof r=="string"&&Yn.test(r)&&typeof e=="string"&&Hl.test(e)?`${r}T${e}`:r;if(typeof a!="string"||a.length===0)return"";if(Yn.test(a))return k(n,a);let{d:s,timeZone:o}=ea(a);return Number.isNaN(s.getTime())?a:s.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...Un(n),...t?{second:"2-digit"}:{},timeZone:o})}function Wn(n,r,e){return ui(H(n,r),H(n,e))}function Kl(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...Un(n),timeZone:"UTC",timeZoneName:"short"})}function yi(n,r){if(!(typeof r!="string"||!r))return r===n?void 0:r}function hn(n,r){let e=typeof n=="string"?n:"",t=yi(e,r);return e?t?`${e} (${t})`:e:t??""}function fe(n,r,e){return pi(n,r)??e??w(r)}function j(n,r,e,t){return Al(n,r,e)??t??w(e)}var Xn="Localized";function y(n,r,e){let t=n,a=t?.[`${r}${Xn}`];if(typeof a=="string"&&a!=="")return a;if(e!==void 0)return e;let s=t?.[r];return typeof s=="string"?s:""}function Jn(n,r){let e=n,t=e?.[r];if(!Array.isArray(t))return[];let a=e?.[`${r}${Xn}`],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 Qa(n){let r;for(let e of Object.keys(n)){if(!e.endsWith(Xn))continue;let t=e.slice(0,-Xn.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 Vl(n){return!("days"in n)}var aa=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&Vl(e)?re`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:Vl(e)?ze:re`<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?re`<span class="lunar">${Ct(t,e.startDate,e.endDate)}</span>`:ze} ${"year"in e&&typeof e.year=="number"?re`<span class="lunar">${Ja(t,e.year,e.month)||e.year}</span>`:ze} ${typeof e.total=="number"?re`<span class="lunar">${this.t("{{count}} days",{count:z(t,e.total)})}</span>`:ze}</header>${"avoidAnimal"in e&&e.avoidAnimal?re`<div class="facts" part="details"><span><span class="lbl">${this.t("Avoiding")}</span><b>${w(y(e,"avoidAnimal"))}</b></span></div>`:ze} ${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 re`<header class="head" part="header"><h2 class="title" id="almanac-title">${k(t,e.date)}</h2>${e.lunar?re`<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>`:ze} ${a?.name?re`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")} <span lang="zh">${a.chinese??""}</span></span>`:ze}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${a?.meaning&&!this.hideReadings?re`<p class="meaning" part="reading">${a.meaning}</p>`:ze} ${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?ze:re`<div class="facts" part="details">${a.map(([s,o])=>re`<span><span class="lbl">${this.t(s)}</span> <b lang="zh">${o?.chinese??""}</b> ${o?.naYin??""}</span>`)} ${e.clashAnimal?re`<span><span class="lbl">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:ze}</div>`}renderLists(e,t){let a=e.favours??[],s=e.avoids??[];return a.length===0&&s.length===0?ze:re`<div class="lists" part="section activities">${a.length?re`<div class="list"><h3>${this.t("Favours")}</h3><div class="chips chips-favour">${a.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</div></div>`:ze} ${s.length?re`<div class="list"><h3>${this.t("Avoids")}</h3><div class="chips chips-avoid">${s.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</div></div>`:ze}</div>`}renderMansion(e){let t=e.mansion;return t?.name?re`<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?re`<span>${w(t.palace)}</span>`:ze} ${t.planet?re`<span>${t.planet}</span>`:ze} ${t.animal?re`<span>${y(t,"animal")}</span>`:ze}</div>`:ze}renderSolarTerms(e,t){let a="solarTerms"in e?e.solarTerms??[]:[];return a.length===0?ze:re`<div class="terms" part="details">${a.map(s=>re`<span>${ta(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let a=e.dayOfficer,s=e.favours??[];return re`<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?re`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")}</span>`:ze} ${s.length?re`<span class="chips chips-favour">${s.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</span>`:ze} ${e.clashAnimal?re`<span class="lbl">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:ze}</div></li>`}};aa.styles=[u,Sp`.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([Cp({type:String,reflect:!0})],aa.prototype,"mode",2),aa=m([Rp("roxy-almanac-day")],aa);import{css as Tp,html as Dt,nothing as gr}from"lit";import{customElement as Ap}from"lit/decorators.js";var Dp=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Qn(n,r,e,t){let a=[];if(r)for(let s of Dp){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 es=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 Dt`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${r.number??""}`}"><div class="hero" part="header">${r.number?Dt`<div class="numeral">${r.number}</div>`:gr}<div><p class="label">${this.t("Angel number")}</p>${r.title?Dt`<h2 class="title">${r.title}</h2>`:gr}</div></div>${r.coreMessage&&!this.hideReadings?Dt`<p class="core">${r.coreMessage}</p>`:gr}<div class="badges" part="details">${r.type?Dt`<span class="badge">${r.type}</span>`:gr} ${typeof r.digitRoot=="number"?Dt`<span class="badge">${this.t("Digit root")} ${r.digitRoot}</span>`:gr} ${r.energy?Dt`<span class="${`badge ${t}`}">${r.energy}</span>`:gr}</div>${a.length>0&&!this.hideReadings?Dt`<div class="chips">${a.map(o=>Dt`<span>${o}</span>`)}</div>`:gr} ${this.renderSections(r)} ${r.affirmation&&!this.hideReadings?Dt`<p class="affirmation">${r.affirmation}</p>`:gr} ${s.length>0&&!this.hideReadings?Dt`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${s.map(o=>Dt`<li>${o}</li>`)}</ul></div>`:gr}</article>`}renderSections(r){return this.renderInterpretation(Qn(this.translator,r.meaning,r.biblical,r.shadow),"angel-meaning","Reading")}};es.styles=[u,F,Tp`.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}`],es=m([Ap("roxy-angel-number-card")],es);import{css as zp,html as ge,nothing as Me}from"lit";import{customElement as Mp}from"lit/decorators.js";var Ep={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},ts=class extends g{renderData(r){let e=r.knownMeaning,t=r.digitRootMeaning,a=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return ge`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:r.number??""})}"><div class="hero" part="header">${r.number?ge`<div class="numeral">${r.number}</div>`:Me}<div>${e?.title?ge`<p class="label">${this.t("Number analysis")}</p>`:Me}<h2 class="title">${a}</h2></div></div><div class="badges" part="details">${r.type?ge`<span class="badge">${r.type}</span>`:Me} ${typeof r.digits=="number"?ge`<span class="badge">${this.t("{{count}} digits",{count:r.digits})}</span>`:Me} ${typeof r.uniqueDigits=="number"?ge`<span class="badge">${this.t("{{count}} unique",{count:r.uniqueDigits})}</span>`:Me} ${typeof r.digitRoot=="number"?ge`<span class="badge">${this.t("Digit root {{n}}",{n:r.digitRoot})}</span>`:Me} ${r.isPalindrome?ge`<span class="badge flag">${this.t("Palindrome")}</span>`:Me} ${r.isRepeating?ge`<span class="badge flag">${this.t("Repeating")}</span>`:Me} ${e?.energy?ge`<span class="${`badge energy-${e.energy}`}">${this.t(Ep[e.energy]??"Neutral energy")}</span>`:Me}</div>${r.contextNote?ge`<div class="context" part="section context"><p class="label">${this.t("Where you saw it")}</p><p>${r.contextNote}</p></div>`:Me} ${e&&!this.hideReadings?ge`<div class="section" part="section known-meaning"><p class="label">${this.t("Known angel number")}</p>${e.coreMessage?ge`<p>${e.coreMessage}</p>`:Me} ${e.keywords&&e.keywords.length>0?ge`<div class="chips">${e.keywords.map(o=>ge`<span>${o}</span>`)}</div>`:Me} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?ge`<p><em>${e.affirmation}</em></p>`:Me} ${s.length>0?ge`<p class="label">${this.t("What to do next")}</p><ol class="steps">${s.map(o=>ge`<li>${o}</li>`)}</ol>`:Me}</div>`:Me} ${t&&!this.hideReadings?ge`<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?ge`<h3>${t.title}</h3>`:Me} ${t.coreMessage?ge`<p>${t.coreMessage}</p>`:Me} ${e?Me:this.renderRootMeaning(t)}</div>`:Me}</article>`}renderMeaning(r,e,t,a){return this.renderInterpretation(Qn(this.translator,r,t,a),e,"Reading")}renderRootMeaning(r){return ge`${r.keywords&&r.keywords.length>0?ge`<div class="chips">${r.keywords.map(e=>ge`<span>${e}</span>`)}</div>`:Me}${this.renderMeaning(r.meaning,"lookup-root")}${r.affirmation?ge`<p><em>${r.affirmation}</em></p>`:Me}`}};ts.styles=[u,M,F,zp`.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}`],ts=m([Mp("roxy-angel-number-lookup")],ts);import{css as Fp,html as Ar,nothing as un}from"lit";import{customElement as Hp}from"lit/decorators.js";var rs=(n,r)=>r?n[It(r)]:void 0,Pp={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":"⚸"},L=n=>rs(Pp,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"},Yl=n=>rs(_p,n),Np={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},P=n=>rs(Np,n),Ip={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},eo=n=>rs(Ip,n),we=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Gp={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},as=n=>rs(Gp,n),Op={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},fi=n=>rs(Op,n),ql={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},Ul=n=>{if(!n)return;let r=It(n),e=r.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return ql[r]??ql[t]};import{css as Bp,html as gn,nothing as to}from"lit";var I=Bp`.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 U(n,r,e){if(!r?.ayanamsa)return to;let t=ra(n,r.ayanamsa);if(!t)return to;let a=typeof r.ayanamsaDegrees=="number"?f(n,r.ayanamsaDegrees,4):void 0;return gn`<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 Tr(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?to:gn`<p class="roxy-frame">${t.map(([a,s,o],i)=>gn`${i>0?" · ":""}${r(a)}: <span class="roxy-frame-deg" title="${o}">${j(e,s,o)}</span>`)}</p>`}function Zl(n,r,e){let t=Object.values(r??{}).filter(a=>!!a?.ayanamsa);return t.length===0?to:gn`<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 gn`<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 jp=new Set(["a1","a12"]),ss=class extends g{renderData(r){let e=r.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(a=>a.exceptionApplied).length;return Ar`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2 class="title">${this.t("Arudha padas")}</h2>${U(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?Ar`<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>`:un}</div>`}renderRow(r){let e=a=>P(a)??"",t=a=>{let s=e(a);return Ar`${s?Ar`<span class="glyph">${s}</span>`:un}${a??""}`};return Ar`<tr class="${jp.has(r.id)?"lead-row":""}"><td class="pada">${r.name??""}${r.abbreviation?Ar`<span class="abbr">${r.abbreviation}</span>`:un}</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?Ar`<span class="exception">${this.t("Moved")}</span>`:un}</td><td class="num">${r.houseFromLagna??""}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?Ar`<p>${r.significations}</p>`:un}</td></tr>`}};ss.styles=[u,I,Fp`.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}`],ss=m([Hp("roxy-arudha-padas")],ss);import{css as Vp,html as Ee,nothing as Xl}from"lit";import{customElement as qp,state as Yp}from"lit/decorators.js";import{css as Kp,html as xi,nothing as Wl}from"lit";var Ue=Kp`.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 ot(n){let{items:r,active:e,onSelect:t,label:a,idPrefix:s,controls:o=!1}=n;return xi`<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(x=>x.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=>xi`<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}`:Wl}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${o?r.filter(l=>l.id!==e).map(l=>xi`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Wl}`}var Up=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],sa=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Ee`<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?Ee`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Xl} ${U(this.effectiveLang(),e.frame,this.translator)}</div>${ot({items:Up.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 Ee`<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=>Ee`<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?Ee`<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 Ee`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${P(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.")}`:Ee`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Ee`${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.")}`:Ee`<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?Ee`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Ee`${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?Ee`<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=>Ee`<th scope="col" title="${o}">${P(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Ee`<tr><td>${o.planet}</td>${o.bindus.map(i=>Ee`<td class="${`bindu-cell ${this.bhinnaTier(i)}`}">${i}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${s?Ee`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,i)=>Ee`<td>${s.bindus[i]??0}</td>`)}<td>${s.total}</td></tr></tfoot>`:Xl}</table></div>`:Ee`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Ee`<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=>Ee`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Ee`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};sa.styles=[u,I,Ue,Vp`.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([Yp()],sa.prototype,"activeTab",2),sa=m([qp("roxy-ashtakavarga-grid")],sa);import{css as Wp,html as oe,nothing as Pe}from"lit";import{customElement as Xp}from"lit/decorators.js";import{css as Zp}from"lit";var ns=Zp`.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 Jp(n,r,e){if(n.include?.length){let t={bodies:He(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 Jl={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},os=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=H(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 oe`<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?oe`<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>`:Pe} ${typeof o=="number"&&Number.isFinite(o)?oe`<dl class="roxy-facts" part="details"><div><dt>${fe(this.effectiveLang(),"timezone")}</dt><dd>${f(this.effectiveLang(),o,5)}</dd></div></dl>`:Pe}</div>${a?this.renderSummary(a):Pe} ${a&&"strongest"in a&&a.strongest?this.renderStrongest(a.strongest):Pe} ${e.length>0?oe`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>oe`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:Pe} ${t.length>0?oe`<div part="section patterns"><p class="section-label">${this.t("Chart patterns")}</p>${[...t].sort((l,c)=>(Jl[l.kind]??9)-(Jl[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</div>`:Pe} ${i?oe`<p class="provenance">${Jp(i,this.effectiveLang(),this.translator)}</p>`:Pe}</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 oe`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?oe`<span class="pill pill--muted">${this.t("Total")}: ${e}</span>`:Pe} <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])=>oe`<span class="pill pill--muted">${Ae({type:a})}: ${s}</span>`)}</div>`}renderStrongest(r){let e=L(r.planet1)??"",t=L(r.planet2)??"",a=(r.interpretation??"neutral").toLowerCase();return oe`<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",Ae(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=L(r.planet1)??"",a=L(r.planet2)??"",s=(r.interpretation??"neutral").toLowerCase(),o=Ae(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=oe`<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?oe`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:oe`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${B()}</summary><div class="interp-body" part="readings">${l?this.renderMeaning(l):Pe} ${c?this.renderTransit(c):Pe} ${p?mn(p,this.translator):Pe}</div></details>`}renderMeaning(r){return oe`${r.description?.short?oe`<p>${r.description.short}</p>`:Pe} ${r.description?.long&&r.description.long!==r.description.short?oe`<p>${r.description.long}</p>`:Pe} ${Qr(r.keywords)}`}renderTransit(r){return mn(r,this.translator)}renderPattern(r){let e=r.planets??[],t=r.apex?[...e].sort((a,s)=>+(s===r.apex)-+(a===r.apex)):e;return oe`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${r.name??r.kind??this.t("Pattern")}</span> ${r.element?oe`<span class="pattern-tag">${r.element}</span>`:Pe} ${r.modality?oe`<span class="pattern-tag">${r.modality}</span>`:Pe} ${r.dissociate?oe`<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>`:Pe} ${typeof r.tightness=="number"?oe`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:ve(this.effectiveLang(),r.tightness,0)})}</span>`:Pe}</div>${t.length?oe`<div class="pattern-planets">${t.map(a=>{let s=L(a),o=!!r.apex&&a===r.apex;return oe`<span class="${o?"planet-chip apex":"planet-chip"}">${s?oe`<span aria-hidden="true">${s}</span>`:Pe}${a}${o?oe`<span class="apex-tag">${this.t("apex")}</span>`:Pe}</span>`})}</div>`:Pe} ${r.interpretation&&!this.hideReadings?oe`<p class="pattern-interp">${r.interpretation}</p>`:Pe}</div>`}};os.styles=[u,ns,M,F,Wp`.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}`],os=m([Xp("roxy-aspects-table")],os);import{css as am,html as Ft,nothing as zr,svg as Ht}from"lit";import{customElement as sm}from"lit/decorators.js";import{css as Qp,html as Ql,nothing as em}from"lit";var ke=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 Ql`<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"?Ql`<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>`:em}</dialog></div>`}},Ne=Qp`.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 $t(n){let r=n%360;return r<0?r+360:r}function Tt(n){let r=$t(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:we[e]??"Aries",signIndex:e,degree:a,minute:o,second:i}}function Ze(n,r){let{sign:e,degree:t,minute:a}=Tt(n);return`${t}° ${r||e} ${String(a).padStart(2,"0")}'`}function Ot(n){return Bt($t(n)%30)}function bi(n){let r=Math.floor(n);return{degree:r,minute:Math.floor((n-r)*60)}}function Bt(n){let{degree:r,minute:e}=bi(n);return`${r}°${String(e).padStart(2,"0")}'`}function yn(n){return $t(n+180)}function ro(n,r){let e=$t(n),t=$t(r)-e;return t<0&&(t+=360),$t(e+t/2)}function At(n,r,e){let t=n.filter(c=>Number.isFinite(r(c))).map(c=>{let p=$t(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=$t(l),i=p}return t}var nr=2;function ed(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 ur(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 tm=(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 td(n,r){let e=[],t=a=>e.reduce((s,o)=>tm(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 wt(n,r){return r>0?n/r*(180/Math.PI):0}function C(n,r,e,t){let a=t*Math.PI/180;return{x:n+e*Math.cos(a),y:r+e*Math.sin(a)}}var rm={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)"},rd=["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 na(n,r=0){return rm[A(n)]??rd[r%rd.length]??"var(--roxy-accent)"}var ad="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 ao=360,is=180,ls=n=>n+180,ds=n=>90-n,nm=9,sd=23.44,nd=66.56,od=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,id=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function om(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(`${ls(a.longitude)},${ds(a.latitude)}`),t=a.longitude;return e.length&&r.push(e),r.filter(a=>a.length>1).map(a=>a.join(" "))}var ld={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},cs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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 Ft`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Astrocartography")}</h2>${a?Ft`<div class="meta">${H(this.effectiveLang(),a.date,a.time)} · ${id(Math.round(a.latitude))} ${od(Math.round(a.longitude))}</div>`:zr}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,a),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?Ft`<p class="summary">${e.summary}</p>`:zr} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return Ft`<svg viewBox="0 0 ${ao} ${is}" 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="${ao}" height="${is}"/><path class="land" d="${ad}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?Ht`<text class="birthplace" x=${ls(t.longitude)} y=${ds(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:zr}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let o=ls(s),i=s===0;e.push(Ht`<line class=${i?"grat-axis":"grat"} x1=${o} y1="0" x2=${o} y2=${is} />`),e.push(Ht`<text class="axis-label" x=${o} y=${is-2} text-anchor="middle">${od(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let o=ds(s),i=s===0;t.push(Ht`<line class=${i?"grat-axis":"grat"} x1="0" y1=${o} x2=${ao} y2=${o} />`),t.push(Ht`<text class="axis-label" x="2" y=${o-1}>${id(s)}</text>`)}let a=[sd,-sd,nd,-nd].map(s=>Ht`<line class="grat-ref" x1="0" y1=${ds(s)} x2=${ao} y2=${ds(s)} />`);return Ht`${e}${t}${a}`}renderBodyLines(e){let t=e.map((p,d)=>({line:p,color:na(p.planet,d),glyph:p.symbol||L(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(At(t,d=>p(d)+180,nm).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:x}=p,v=b=>b.get(p)??0;return Ht`${[this.renderMeridian(d.mc.longitude,v(o),h,x,d.planet,"mc",!1),this.renderMeridian(d.ic.longitude,v(i),h,x,d.planet,"ic",!0),this.renderCurve(d.ascendant.points,{longitude:v(l),latitude:a(d.ascendant.points??[]).latitude},h,x,d.planet,"ascendant",!1),this.renderCurve(d.descendant.points,{longitude:v(c),latitude:a(d.descendant.points??[]).latitude},h,x,d.planet,"descendant",!0)]}`})}renderMeridian(e,t,a,s,o,i,l){let c=ls(e),p=i==="ic"?is-16:9;return Ht`<g>
2
- <line class=${`acg-line${l?" dashed":""}`} stroke=${a} x1=${c} y1="0" x2=${c} y2=${is}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(ld[i]??"MC")})}</title></line>
1
+ var ip=Object.defineProperty;var lp=Object.getOwnPropertyDescriptor;var m=(n,r,e,t)=>{for(var a=t>1?void 0:t?lp(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&&ip(r,e,a),a};import{css as Rp,html as re,nothing as ze}from"lit";import{customElement as Cp,property as Dp}from"lit/decorators.js";import{html as nt,nothing as Dr}from"lit";import{property as pt,state as ar}from"lit/decorators.js";import{ifDefined as Xa}from"lit/directives/if-defined.js";var Rl=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function li(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 dp={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ii(n){let r=n.toLowerCase();return Rl.find(e=>e.toLowerCase()===r)}function Bn(n){let r=li(n);if(!r)return;let e=ii(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")??dp[t[1]??""];return s?ii(`zh-${s}`):void 0}return ii(a)}import{LitElement as cp}from"lit";function It(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function w(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 Cl="__ROXY_UI_I18N__";function di(){let n=globalThis,r=n[Cl];if(r)return r;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[Cl]=e,e}function ci(n,r){return r?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in r?String(r[t]??""):e):n}function Dl(n,r,e){return ci(Tl(n,r)??r,e)}function Tl(n,r){if(!n)return;let{catalogs:e}=di(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[It(r)]}function Al(n){if(!n)return;let{fieldLabels:r}=di(),e=n.toLowerCase();return r[e]??r[e.split("-")[0]]}function pi(n,r){return Al(n)?.fields[r]}function zl(n,r,e){return Al(n)?.enums[`${r}.${e}`]}function Ml(n){let{listeners:r}=di();return r.add(n),()=>{r.delete(n)}}var Fn=class{constructor(r){this.host=r,r.addController(this)}hostConnected(){this.unsubscribe=Ml(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Rr=class extends cp{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Fn(this)}t(e,t){return Dl(this.effectiveLang(),e,t)}effectiveLang(){return li(this)}};import{css as pp}from"lit";var u=pp`: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 mp="__cols",hp="__rows";function gp(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Hn(n){if(Array.isArray(n)){let s=!1,o=n.map(i=>{let l=Hn(i);return l!==i&&(s=!0),l});return s?o:n}if(!gp(n))return n;let r=n[mp],e=n[hp];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]=Hn(s[l])}),o});let t=!1,a={};for(let[s,o]of Object.entries(n)){let i=Hn(o);i!==o&&(t=!0),a[s]=i}return t?a:n}function jn(n){return Hn(n)}var up="pk_live_YOUR_KEY",El={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===up?El.sample:n.startsWith("pk_")?void 0:El.secret}function Ua(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 Vn="https://roxyapi.com/api/v2";async function Pl(n){return(await _l(n)).message}async function _l(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 Za=class extends Error{constructor(e,t=null,a=!0){super(e);this.issues=t;this.worded=a}};function mi(n){return n.submitUrl?void 0:Xr(n.publishableKey)}function hi(n){return!!(n.submitUrl||n.publishableKey&&!mi(n))}async function Wa(n,r,e){let t=mi(n);if(t)throw new Za(t.message);let a=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:yp(r,n.submitContext),signal:e}):await fp(n,r,e);if(!a.ok){let s=await _l(a);throw new Za(s.message,s.issues,s.worded)}return await a.json()}function yp(n,r){return JSON.stringify(r?{...n,context:r}:n)}function fp(n,r,e){let t=new URL(`${n.baseUrl??Vn}${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 Kn=class{constructor(r){this.baseUrl=Vn;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=mi(this);if(e){this.host.error=e.message,Ua(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 Wa(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 Za&&(this.host.issues=a.issues),this.worded=a instanceof Za&&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 Nl(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}}import{css as Il,html as Cr,nothing as Jr}from"lit";import{css as xp,html as bp}from"lit";function B(){return bp`<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 M=xp`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 gi=Il`.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}`,F=Il`.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}${gi}`;function Qr(n){return n?.length?Cr`<div class="interp-keywords">${n.map(r=>Cr`<span class="kw">${r}</span>`)}</div>`:Jr}function mn(n,r){if(!n)return Jr;let e=(t,a)=>a?Cr`<p><strong>${r(t)}</strong> ${a}</p>`:Jr;return Cr`${n.summary?Cr`<p>${n.summary}</p>`:Jr} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Qr(n.keywords)}`}function Gl(n,r,e){let t=n.filter(a=>!!a.body);return t.length===0?Jr:Cr`<section class="block" part="section readings"><h3>${e}</h3>${t.map((a,s)=>Cr`<details class="interp-card" part="reading" name="${r}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${B()} ${a.aside?Cr`<span class="interp-aside"><small>${a.aside}</small></span>`:Jr}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??Jr}</div></details>`)}</section>`}var Ol="roxy-data";function Bl(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function vp(n){return`<script type="application/json" class="${Ol}">${Bl(n)}<\/script>`}function Lp(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var qn=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(Lp(r)&&r.classList.contains(Ol))return r;return null}parse(r){if(r?.trim())try{return JSON.parse(r)}catch{return}}};var $p={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 Rr{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 Wa(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(Nl(this.endpoint,this.method,t.values,t.queryKeys??[]))};new qn(this),this.fetcher=new Kn(this)}static{this.styles=[u]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=jn(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 nt`${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")?nt`<roxy-data .data="${e}" lang="${Xa(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 Dr;let t=e.map(a=>`[part~="${a}"],roxy-endpoint-form::part(${a}){display:none!important}`).join("");return nt`<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()?nt`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,a){return this.hideReadings?Dr:Gl(e,t,this.t(a??"Reading"))}renderResult(e){let t=nt`<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()?nt`${t}${this.renderAttribution()}`:t}renderWithForm(e){return nt`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Dr:this.renderErrorBanner(this.error):this.data==null?Dr:this.showAttribution()?nt`${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"?Dr:e.length>=t?Dr:nt`<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?nt`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Dr}</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:Bn(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return nt`<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(Dr):this.renderEmpty()}renderForm(){return nt`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Xa(this.specUrl)}" publishable-key="${Xa(this.publishableKey)}" location-url="${Xa(this.locationUrl)}" submit-label="${Xa(this.submitLabel)}" lang="${Xa(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 nt`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return nt`<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?nt`${t}${this.renderForm()}`:t}renderErrorBanner(e){return nt`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([pt({attribute:!1})],g.prototype,"data",2),m([pt({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([pt({type:String})],g.prototype,"method",2),m([pt({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([pt({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([pt({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([pt({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([pt({attribute:"submit-context",converter:$p})],g.prototype,"submitContext",2),m([pt({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([pt({type:Boolean})],g.prototype,"remember",2),m([pt({type:Boolean,attribute:"hide-readings",reflect:!0})],g.prototype,"hideReadings",2),m([pt({type:String,attribute:"hide-sections",reflect:!0})],g.prototype,"hideSections",2),m([pt({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([pt({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([pt({type:String})],g.prototype,"attribution",2),m([ar()],g.prototype,"loading",2),m([ar()],g.prototype,"error",2),m([ar()],g.prototype,"issues",2),m([ar()],g.prototype,"selfFetched",2),m([ar()],g.prototype,"editing",2),m([ar()],g.prototype,"sticky",2),m([ar()],g.prototype,"openedRow",2),m([ar()],g.prototype,"openedRowId",2),m([ar()],g.prototype,"moreLoading",2),m([ar()],g.prototype,"moreError",2);var Yn=/^\d{4}-\d{2}-\d{2}$/,wp=/^\d{4}-\d{2}$/,jl=/^\d{2}:\d{2}(:\d{2})?$/,kp=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Fl=new Map;function ut(n){if(!n)return["en"];let r=Fl.get(n);if(r)return[r,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Fl.set(n,e),[e,"en"]}var Hl=new Map;function Un(n){let r=n??"",e=Hl.get(r);if(e)return e;let a={hour:new Intl.DateTimeFormat(ut(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 Hl.set(r,a),a}function ui(n,r){return n&&r?`${n} - ${r}`:n||r}function ea(n){let r=jl.test(n)?`1970-01-01T${n}`:Yn.test(n)?`${n}T00:00:00`:wp.test(n)?`${n}-01T00:00:00`:kp.test(n)?n.replace(" ","T"):null;return r?{d:new Date(`${r}Z`),timeZone:"UTC"}:{d:new Date(n)}}function mt(n,r){if(typeof r!="string"||r.length===0||Yn.test(r))return"";let{d:e,timeZone:t}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleTimeString(ut(n),{...Un(n),timeZone:t})}function k(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(ut(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function sr(n,r){return r?ui(mt(n,r.start),mt(n,r.end)):""}function Ct(n,r,e){return ui(k(n,r),k(n,e))}function hr(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(ut(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?Un(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(ut(n),{month:"short",day:"numeric",timeZone:t})}function Kl(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(ut(n),{weekday:"short",day:"numeric",timeZone:t})}function Ja(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(ut(n),{month:"long",year:"numeric",timeZone:"UTC"})}function Zn(n,r){return typeof r!="number"||!Number.isInteger(r)||r<1||r>12?"":new Date(Date.UTC(2e3,r-1,1,12)).toLocaleDateString(ut(n),{month:"long",timeZone:"UTC"})}function z(n,r){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(ut(n),{maximumFractionDigits:0})}function He(n,r){let e=r.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(ut(n),{style:"long",type:"conjunction"}).format(e)}function f(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":r.toLocaleString(ut(n),{maximumFractionDigits:e})}function ve(n,r,e=1){return typeof r!="number"||!Number.isFinite(r)?"":(r/100).toLocaleString(ut(n),{style:"percent",maximumFractionDigits:e})}var Gt={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function yt(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Ae(n){return A(yt(n))}var Sp={"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"?Sp[r]??w(r):"",a=typeof e=="number"?`${f(n,e,2)}°`:"";return t&&a?`${t} (${a})`:t||a}function H(n,r,e,t=!1){let a=typeof r=="string"&&Yn.test(r)&&typeof e=="string"&&jl.test(e)?`${r}T${e}`:r;if(typeof a!="string"||a.length===0)return"";if(Yn.test(a))return k(n,a);let{d:s,timeZone:o}=ea(a);return Number.isNaN(s.getTime())?a:s.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...Un(n),...t?{second:"2-digit"}:{},timeZone:o})}function Wn(n,r,e){return ui(H(n,r),H(n,e))}function Vl(n,r){if(typeof r!="string"||r.length===0)return"";let{d:e}=ea(r);return Number.isNaN(e.getTime())?r:e.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...Un(n),timeZone:"UTC",timeZoneName:"short"})}function yi(n,r){if(!(typeof r!="string"||!r))return r===n?void 0:r}function hn(n,r){let e=typeof n=="string"?n:"",t=yi(e,r);return e?t?`${e} (${t})`:e:t??""}function fe(n,r,e){return pi(n,r)??e??w(r)}function j(n,r,e,t){return zl(n,r,e)??t??w(e)}var Xn="Localized";function y(n,r,e){let t=n,a=t?.[`${r}${Xn}`];if(typeof a=="string"&&a!=="")return a;if(e!==void 0)return e;let s=t?.[r];return typeof s=="string"?s:""}function Jn(n,r){let e=n,t=e?.[r];if(!Array.isArray(t))return[];let a=e?.[`${r}${Xn}`],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 Qa(n){let r;for(let e of Object.keys(n)){if(!e.endsWith(Xn))continue;let t=e.slice(0,-Xn.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 ql(n){return!("days"in n)}var aa=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&ql(e)?re`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:ql(e)?ze:re`<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?re`<span class="lunar">${Ct(t,e.startDate,e.endDate)}</span>`:ze} ${"year"in e&&typeof e.year=="number"?re`<span class="lunar">${Ja(t,e.year,e.month)||e.year}</span>`:ze} ${typeof e.total=="number"?re`<span class="lunar">${this.t("{{count}} days",{count:z(t,e.total)})}</span>`:ze}</header>${"avoidAnimal"in e&&e.avoidAnimal?re`<div class="facts" part="details"><span><span class="lbl">${this.t("Avoiding")}</span><b>${w(y(e,"avoidAnimal"))}</b></span></div>`:ze} ${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 re`<header class="head" part="header"><h2 class="title" id="almanac-title">${k(t,e.date)}</h2>${e.lunar?re`<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>`:ze} ${a?.name?re`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")} <span lang="zh">${a.chinese??""}</span></span>`:ze}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${a?.meaning&&!this.hideReadings?re`<p class="meaning" part="reading">${a.meaning}</p>`:ze} ${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?ze:re`<div class="facts" part="details">${a.map(([s,o])=>re`<span><span class="lbl">${this.t(s)}</span> <b lang="zh">${o?.chinese??""}</b> ${o?.naYin??""}</span>`)} ${e.clashAnimal?re`<span><span class="lbl">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:ze}</div>`}renderLists(e,t){let a=e.favours??[],s=e.avoids??[];return a.length===0&&s.length===0?ze:re`<div class="lists" part="section activities">${a.length?re`<div class="list"><h3>${this.t("Favours")}</h3><div class="chips chips-favour">${a.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</div></div>`:ze} ${s.length?re`<div class="list"><h3>${this.t("Avoids")}</h3><div class="chips chips-avoid">${s.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</div></div>`:ze}</div>`}renderMansion(e){let t=e.mansion;return t?.name?re`<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?re`<span>${w(t.palace)}</span>`:ze} ${t.planet?re`<span>${t.planet}</span>`:ze} ${t.animal?re`<span>${y(t,"animal")}</span>`:ze}</div>`:ze}renderSolarTerms(e,t){let a="solarTerms"in e?e.solarTerms??[]:[];return a.length===0?ze:re`<div class="terms" part="details">${a.map(s=>re`<span>${ta(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let a=e.dayOfficer,s=e.favours??[];return re`<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?re`<span class="tag tag-${a.quality??"neutral"}">${y(a,"name")}</span>`:ze} ${s.length?re`<span class="chips chips-favour">${s.map(o=>re`<span>${j(t,"activity",o)}</span>`)}</span>`:ze} ${e.clashAnimal?re`<span class="lbl">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:ze}</div></li>`}};aa.styles=[u,Rp`.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([Dp({type:String,reflect:!0})],aa.prototype,"mode",2),aa=m([Cp("roxy-almanac-day")],aa);import{css as Ap,html as Dt,nothing as gr}from"lit";import{customElement as zp}from"lit/decorators.js";var Tp=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Qn(n,r,e,t){let a=[];if(r)for(let s of Tp){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 es=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 Dt`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${r.number??""}`}"><div class="hero" part="header">${r.number?Dt`<div class="numeral">${r.number}</div>`:gr}<div><p class="label">${this.t("Angel number")}</p>${r.title?Dt`<h2 class="title">${r.title}</h2>`:gr}</div></div>${r.coreMessage&&!this.hideReadings?Dt`<p class="core">${r.coreMessage}</p>`:gr}<div class="badges" part="details">${r.type?Dt`<span class="badge">${r.type}</span>`:gr} ${typeof r.digitRoot=="number"?Dt`<span class="badge">${this.t("Digit root")} ${r.digitRoot}</span>`:gr} ${r.energy?Dt`<span class="${`badge ${t}`}">${r.energy}</span>`:gr}</div>${a.length>0&&!this.hideReadings?Dt`<div class="chips">${a.map(o=>Dt`<span>${o}</span>`)}</div>`:gr} ${this.renderSections(r)} ${r.affirmation&&!this.hideReadings?Dt`<p class="affirmation">${r.affirmation}</p>`:gr} ${s.length>0&&!this.hideReadings?Dt`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${s.map(o=>Dt`<li>${o}</li>`)}</ul></div>`:gr}</article>`}renderSections(r){return this.renderInterpretation(Qn(this.translator,r.meaning,r.biblical,r.shadow),"angel-meaning","Reading")}};es.styles=[u,F,Ap`.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}`],es=m([zp("roxy-angel-number-card")],es);import{css as Mp,html as ge,nothing as Me}from"lit";import{customElement as Ep}from"lit/decorators.js";var Pp={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},ts=class extends g{renderData(r){let e=r.knownMeaning,t=r.digitRootMeaning,a=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return ge`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:r.number??""})}"><div class="hero" part="header">${r.number?ge`<div class="numeral">${r.number}</div>`:Me}<div>${e?.title?ge`<p class="label">${this.t("Number analysis")}</p>`:Me}<h2 class="title">${a}</h2></div></div><div class="badges" part="details">${r.type?ge`<span class="badge">${r.type}</span>`:Me} ${typeof r.digits=="number"?ge`<span class="badge">${this.t("{{count}} digits",{count:r.digits})}</span>`:Me} ${typeof r.uniqueDigits=="number"?ge`<span class="badge">${this.t("{{count}} unique",{count:r.uniqueDigits})}</span>`:Me} ${typeof r.digitRoot=="number"?ge`<span class="badge">${this.t("Digit root {{n}}",{n:r.digitRoot})}</span>`:Me} ${r.isPalindrome?ge`<span class="badge flag">${this.t("Palindrome")}</span>`:Me} ${r.isRepeating?ge`<span class="badge flag">${this.t("Repeating")}</span>`:Me} ${e?.energy?ge`<span class="${`badge energy-${e.energy}`}">${this.t(Pp[e.energy]??"Neutral energy")}</span>`:Me}</div>${r.contextNote?ge`<div class="context" part="section context"><p class="label">${this.t("Where you saw it")}</p><p>${r.contextNote}</p></div>`:Me} ${e&&!this.hideReadings?ge`<div class="section" part="section known-meaning"><p class="label">${this.t("Known angel number")}</p>${e.coreMessage?ge`<p>${e.coreMessage}</p>`:Me} ${e.keywords&&e.keywords.length>0?ge`<div class="chips">${e.keywords.map(o=>ge`<span>${o}</span>`)}</div>`:Me} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?ge`<p><em>${e.affirmation}</em></p>`:Me} ${s.length>0?ge`<p class="label">${this.t("What to do next")}</p><ol class="steps">${s.map(o=>ge`<li>${o}</li>`)}</ol>`:Me}</div>`:Me} ${t&&!this.hideReadings?ge`<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?ge`<h3>${t.title}</h3>`:Me} ${t.coreMessage?ge`<p>${t.coreMessage}</p>`:Me} ${e?Me:this.renderRootMeaning(t)}</div>`:Me}</article>`}renderMeaning(r,e,t,a){return this.renderInterpretation(Qn(this.translator,r,t,a),e,"Reading")}renderRootMeaning(r){return ge`${r.keywords&&r.keywords.length>0?ge`<div class="chips">${r.keywords.map(e=>ge`<span>${e}</span>`)}</div>`:Me}${this.renderMeaning(r.meaning,"lookup-root")}${r.affirmation?ge`<p><em>${r.affirmation}</em></p>`:Me}`}};ts.styles=[u,M,F,Mp`.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}`],ts=m([Ep("roxy-angel-number-lookup")],ts);import{css as Hp,html as Ar,nothing as un}from"lit";import{customElement as jp}from"lit/decorators.js";var rs=(n,r)=>r?n[It(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":"⚸"},L=n=>rs(_p,n),Np={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"},Ul=n=>rs(Np,n),Ip={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},P=n=>rs(Ip,n),Gp={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},eo=n=>rs(Gp,n),we=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Op={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},as=n=>rs(Op,n),Bp={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},fi=n=>rs(Bp,n),Yl={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},Zl=n=>{if(!n)return;let r=It(n),e=r.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return Yl[r]??Yl[t]};import{css as Fp,html as gn,nothing as to}from"lit";var I=Fp`.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 U(n,r,e){if(!r?.ayanamsa)return to;let t=ra(n,r.ayanamsa);if(!t)return to;let a=typeof r.ayanamsaDegrees=="number"?f(n,r.ayanamsaDegrees,4):void 0;return gn`<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 Tr(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?to:gn`<p class="roxy-frame">${t.map(([a,s,o],i)=>gn`${i>0?" · ":""}${r(a)}: <span class="roxy-frame-deg" title="${o}">${j(e,s,o)}</span>`)}</p>`}function Wl(n,r,e){let t=Object.values(r??{}).filter(a=>!!a?.ayanamsa);return t.length===0?to:gn`<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 gn`<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 Kp=new Set(["a1","a12"]),ss=class extends g{renderData(r){let e=r.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(a=>a.exceptionApplied).length;return Ar`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2 class="title">${this.t("Arudha padas")}</h2>${U(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?Ar`<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>`:un}</div>`}renderRow(r){let e=a=>P(a)??"",t=a=>{let s=e(a);return Ar`${s?Ar`<span class="glyph">${s}</span>`:un}${a??""}`};return Ar`<tr class="${Kp.has(r.id)?"lead-row":""}"><td class="pada">${r.name??""}${r.abbreviation?Ar`<span class="abbr">${r.abbreviation}</span>`:un}</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?Ar`<span class="exception">${this.t("Moved")}</span>`:un}</td><td class="num">${r.houseFromLagna??""}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?Ar`<p>${r.significations}</p>`:un}</td></tr>`}};ss.styles=[u,I,Hp`.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}`],ss=m([jp("roxy-arudha-padas")],ss);import{css as qp,html as Ee,nothing as Jl}from"lit";import{customElement as Yp,state as Up}from"lit/decorators.js";import{css as Vp,html as xi,nothing as Xl}from"lit";var Ue=Vp`.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 ot(n){let{items:r,active:e,onSelect:t,label:a,idPrefix:s,controls:o=!1}=n;return xi`<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(x=>x.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=>xi`<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}`:Xl}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${o?r.filter(l=>l.id!==e).map(l=>xi`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Xl}`}var Zp=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],sa=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Ee`<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?Ee`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Jl} ${U(this.effectiveLang(),e.frame,this.translator)}</div>${ot({items:Zp.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 Ee`<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=>Ee`<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?Ee`<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 Ee`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${P(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.")}`:Ee`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Ee`${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.")}`:Ee`<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?Ee`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Ee`${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?Ee`<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=>Ee`<th scope="col" title="${o}">${P(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Ee`<tr><td>${o.planet}</td>${o.bindus.map(i=>Ee`<td class="${`bindu-cell ${this.bhinnaTier(i)}`}">${i}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${s?Ee`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,i)=>Ee`<td>${s.bindus[i]??0}</td>`)}<td>${s.total}</td></tr></tfoot>`:Jl}</table></div>`:Ee`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Ee`<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=>Ee`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Ee`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};sa.styles=[u,I,Ue,qp`.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([Up()],sa.prototype,"activeTab",2),sa=m([Yp("roxy-ashtakavarga-grid")],sa);import{css as Xp,html as oe,nothing as Pe}from"lit";import{customElement as Jp}from"lit/decorators.js";import{css as Wp}from"lit";var ns=Wp`.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 Qp(n,r,e){if(n.include?.length){let t={bodies:He(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 Ql={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},os=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=H(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 oe`<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?oe`<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>`:Pe} ${typeof o=="number"&&Number.isFinite(o)?oe`<dl class="roxy-facts" part="details"><div><dt>${fe(this.effectiveLang(),"timezone")}</dt><dd>${f(this.effectiveLang(),o,5)}</dd></div></dl>`:Pe}</div>${a?this.renderSummary(a):Pe} ${a&&"strongest"in a&&a.strongest?this.renderStrongest(a.strongest):Pe} ${e.length>0?oe`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>oe`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:Pe} ${t.length>0?oe`<div part="section patterns"><p class="section-label">${this.t("Chart patterns")}</p>${[...t].sort((l,c)=>(Ql[l.kind]??9)-(Ql[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</div>`:Pe} ${i?oe`<p class="provenance">${Qp(i,this.effectiveLang(),this.translator)}</p>`:Pe}</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 oe`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?oe`<span class="pill pill--muted">${this.t("Total")}: ${e}</span>`:Pe} <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])=>oe`<span class="pill pill--muted">${Ae({type:a})}: ${s}</span>`)}</div>`}renderStrongest(r){let e=L(r.planet1)??"",t=L(r.planet2)??"",a=(r.interpretation??"neutral").toLowerCase();return oe`<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",Ae(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=L(r.planet1)??"",a=L(r.planet2)??"",s=(r.interpretation??"neutral").toLowerCase(),o=Ae(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=oe`<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?oe`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:oe`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${B()}</summary><div class="interp-body" part="readings">${l?this.renderMeaning(l):Pe} ${c?this.renderTransit(c):Pe} ${p?mn(p,this.translator):Pe}</div></details>`}renderMeaning(r){return oe`${r.description?.short?oe`<p>${r.description.short}</p>`:Pe} ${r.description?.long&&r.description.long!==r.description.short?oe`<p>${r.description.long}</p>`:Pe} ${Qr(r.keywords)}`}renderTransit(r){return mn(r,this.translator)}renderPattern(r){let e=r.planets??[],t=r.apex?[...e].sort((a,s)=>+(s===r.apex)-+(a===r.apex)):e;return oe`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${r.name??r.kind??this.t("Pattern")}</span> ${r.element?oe`<span class="pattern-tag">${r.element}</span>`:Pe} ${r.modality?oe`<span class="pattern-tag">${r.modality}</span>`:Pe} ${r.dissociate?oe`<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>`:Pe} ${typeof r.tightness=="number"?oe`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:ve(this.effectiveLang(),r.tightness,0)})}</span>`:Pe}</div>${t.length?oe`<div class="pattern-planets">${t.map(a=>{let s=L(a),o=!!r.apex&&a===r.apex;return oe`<span class="${o?"planet-chip apex":"planet-chip"}">${s?oe`<span aria-hidden="true">${s}</span>`:Pe}${a}${o?oe`<span class="apex-tag">${this.t("apex")}</span>`:Pe}</span>`})}</div>`:Pe} ${r.interpretation&&!this.hideReadings?oe`<p class="pattern-interp">${r.interpretation}</p>`:Pe}</div>`}};os.styles=[u,ns,M,F,Xp`.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}`],os=m([Jp("roxy-aspects-table")],os);import{css as sm,html as Ft,nothing as zr,svg as Ht}from"lit";import{customElement as nm}from"lit/decorators.js";import{css as em,html as ed,nothing as tm}from"lit";var ke=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 ed`<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"?ed`<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>`:tm}</dialog></div>`}},Ne=em`.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 $t(n){let r=n%360;return r<0?r+360:r}function Tt(n){let r=$t(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:we[e]??"Aries",signIndex:e,degree:a,minute:o,second:i}}function Ze(n,r){let{sign:e,degree:t,minute:a}=Tt(n);return`${t}° ${r||e} ${String(a).padStart(2,"0")}'`}function Ot(n){return Bt($t(n)%30)}function bi(n){let r=Math.floor(n);return{degree:r,minute:Math.floor((n-r)*60)}}function Bt(n){let{degree:r,minute:e}=bi(n);return`${r}°${String(e).padStart(2,"0")}'`}function yn(n){return $t(n+180)}function ro(n,r){let e=$t(n),t=$t(r)-e;return t<0&&(t+=360),$t(e+t/2)}function At(n,r,e){let t=n.filter(c=>Number.isFinite(r(c))).map(c=>{let p=$t(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=$t(l),i=p}return t}var nr=2;function td(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 ur(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 rm=(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 rd(n,r){let e=[],t=a=>e.reduce((s,o)=>rm(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 wt(n,r){return r>0?n/r*(180/Math.PI):0}function C(n,r,e,t){let a=t*Math.PI/180;return{x:n+e*Math.cos(a),y:r+e*Math.sin(a)}}var am={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)"},ad=["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 na(n,r=0){return am[A(n)]??ad[r%ad.length]??"var(--roxy-accent)"}var sd="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 ao=360,is=180,ls=n=>n+180,ds=n=>90-n,om=9,nd=23.44,od=66.56,id=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,ld=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function im(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(`${ls(a.longitude)},${ds(a.latitude)}`),t=a.longitude;return e.length&&r.push(e),r.filter(a=>a.length>1).map(a=>a.join(" "))}var dd={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},cs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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 Ft`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Astrocartography")}</h2>${a?Ft`<div class="meta">${H(this.effectiveLang(),a.date,a.time)} · ${ld(Math.round(a.latitude))} ${id(Math.round(a.longitude))}</div>`:zr}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,a),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?Ft`<p class="summary">${e.summary}</p>`:zr} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return Ft`<svg viewBox="0 0 ${ao} ${is}" 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="${ao}" height="${is}"/><path class="land" d="${sd}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?Ht`<text class="birthplace" x=${ls(t.longitude)} y=${ds(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:zr}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let o=ls(s),i=s===0;e.push(Ht`<line class=${i?"grat-axis":"grat"} x1=${o} y1="0" x2=${o} y2=${is} />`),e.push(Ht`<text class="axis-label" x=${o} y=${is-2} text-anchor="middle">${id(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let o=ds(s),i=s===0;t.push(Ht`<line class=${i?"grat-axis":"grat"} x1="0" y1=${o} x2=${ao} y2=${o} />`),t.push(Ht`<text class="axis-label" x="2" y=${o-1}>${ld(s)}</text>`)}let a=[nd,-nd,od,-od].map(s=>Ht`<line class="grat-ref" x1="0" y1=${ds(s)} x2=${ao} y2=${ds(s)} />`);return Ht`${e}${t}${a}`}renderBodyLines(e){let t=e.map((p,d)=>({line:p,color:na(p.planet,d),glyph:p.symbol||L(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(At(t,d=>p(d)+180,om).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:x}=p,v=b=>b.get(p)??0;return Ht`${[this.renderMeridian(d.mc.longitude,v(o),h,x,d.planet,"mc",!1),this.renderMeridian(d.ic.longitude,v(i),h,x,d.planet,"ic",!0),this.renderCurve(d.ascendant.points,{longitude:v(l),latitude:a(d.ascendant.points??[]).latitude},h,x,d.planet,"ascendant",!1),this.renderCurve(d.descendant.points,{longitude:v(c),latitude:a(d.descendant.points??[]).latitude},h,x,d.planet,"descendant",!0)]}`})}renderMeridian(e,t,a,s,o,i,l){let c=ls(e),p=i==="ic"?is-16:9;return Ht`<g>
2
+ <line class=${`acg-line${l?" dashed":""}`} stroke=${a} x1=${c} y1="0" x2=${c} y2=${is}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(dd[i]??"MC")})}</title></line>
3
3
  <text class="acg-glyph" fill=${a} x=${ls(t)} y=${p} text-anchor="middle" dominant-baseline="central">${s}</text>
4
- </g>`}renderCurve(e,t,a,s,o,i,l){let c=om(e??[]);return c.length===0?zr:Ht`<g>
5
- ${c.map(p=>Ht`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${a} points=${p}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(ld[i]??"MC")})}</title></polyline>`)}
4
+ </g>`}renderCurve(e,t,a,s,o,i,l){let c=im(e??[]);return c.length===0?zr:Ht`<g>
5
+ ${c.map(p=>Ht`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${a} points=${p}><title>${this.t("{{planet}} {{angle}} line",{planet:o,angle:this.t(dd[i]??"MC")})}</title></polyline>`)}
6
6
  <text class="acg-glyph" fill=${a} x=${ls(t.longitude)} y=${ds(t.latitude)} text-anchor="middle" dominant-baseline="central">${s}</text>
7
- </g>`}renderLegend(e){return e.length===0?zr:Ft`<div class="legend" part="legend">${e.map((t,a)=>{let s=na(t.planet,a);return Ft`<span class="legend-item"><span class="legend-swatch" style="${`border-top-color: ${s}`}"></span> ${t.symbol?Ft`${t.symbol}`:zr}${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?zr:Ft`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,a)=>{let s=na(t.planet,a),o=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return Ft`<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?Ft`${t.symbol}`:zr}${t.planet} </span>${B()}</summary><div class="interp-body">${o.filter(([,i])=>i).map(([i,l])=>Ft`<p class="interp-line"><span class="code">${i}</span>${l}</p>`)}</div></details>`})}</section>`}};cs.styles=[u,Ne,M,F,am`.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}`],cs=m([sm("roxy-astrocartography-map")],cs);import{css as im,html as Ie,nothing as ht}from"lit";import{customElement as lm}from"lit/decorators.js";var dm={year:"Year",month:"Month",day:"Day",hour:"Hour"},dd={harmonious:"Harmonious",challenging:"Challenging"},cd={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},pd={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},ps=class extends g{renderData(r){let e=this.effectiveLang(),t=H(e,r.birthData?.date,r.birthData?.time);return Ie`<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`<span class="born">${t}</span>`:ht} ${r.zodiacAnimal?Ie`<span class="animal">${y(r,"zodiacAnimal")}</span>`:ht}</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`<p class="summary" part="section summary">${r.summary}</p>`:ht} ${Tr(r.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(r){let e=dm[r.position],t=r.position==="day";return Ie`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos">${e?this.t(e):w(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`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${r.hiddenStems.map(a=>Ie`<li><span lang="zh">${a.stem?.chinese??""}</span> <span class="role">${a.role}</span> ${y(a.tenGod,"name")}</li>`)}</ul>`:ht} ${r.naYin?Ie`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${r.naYin}</span>`:ht}</div>`}renderDayMaster(r){let e=r.dayMaster;return e?Ie`<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`<p part="reading">${e.nature}</p>`:ht}</div></section>`:ht}renderElements(r){let e=r.fiveElements??[];if(e.length===0)return ht;let t=this.effectiveLang(),a=e.reduce((s,o)=>s+(o.count??0),0)||1;return Ie`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>Ie`<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">${z(t,s.count??0)} ${s.level&&pd[s.level]?this.t(pd[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?Ie`<p class="element-reading" part="reading">${s.reading}</p>`:ht}</div>`)}</div></section>`}renderInteractions(r){let e=r.interactions??[];return e.length===0?ht:Ie`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>Ie`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&cd[t.type]?this.t(cd[t.type]):w(t.type??"")}</b> ${t.quality?Ie`<span class="tag tag-${t.quality}">${t.quality&&dd[t.quality]?this.t(dd[t.quality]):t.quality}</span>`:ht} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?Ie`<span>${t.transformsTo}</span>`:ht} ${t.variety?Ie`<span>${t.variety}</span>`:ht} ${t.type==="punishment"&&typeof t.complete=="boolean"?Ie`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ht}</div>${t.meaning&&!this.hideReadings?Ie`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ht}</li>`)}</ul></section>`}};ps.styles=[u,I,im`.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}`],ps=m([lm("roxy-bazi-chart")],ps);import{css as cm,html as oa,nothing as so}from"lit";import{customElement as pm}from"lit/decorators.js";function or(n,r){return!r||!n?.length?"":n.map(e=>r[String(e)]?.[0]).filter(Boolean).join(", ")}function vi(n,r){return!r||typeof n!="number"?"":(r[String(n)]??[]).join(", ")}var ms=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 oa`<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>${U(this.effectiveLang(),r.frame,this.translator)}</header>${a.length?oa`<div class="moved-list" part="table moved">${a.map(o=>this.renderMoved(o,r.houseThemes))}</div>`:so} ${t.length?oa`<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>`:so}</div>`}renderMoved(r,e){let t=L(r.graha)??"",a=typeof r.bhava=="number"?or([r.bhava],e):"";return oa`<div class="moved-row"><span class="graha">${t?oa`<span class="glyph">${t}</span>`:so}${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?oa`<span class="themes">${a}</span>`:so}</div>`}renderBhavaRow(r){let e=(r.grahas??[]).join(", ");return oa`<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>`}};ms.styles=[u,I,cm`.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}`],ms=m([pm("roxy-bhav-chalit-table")],ms);import{css as mm,html as ia,nothing as no}from"lit";import{customElement as hm}from"lit/decorators.js";var md=[{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)"}],hs=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 ia`<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>${U(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")}">${md.map(a=>ia`<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"?or([r.house],t):"";return ia`<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?ia`<span class="lord">${this.t("lord {{graha}}",{graha:r.lord})}</span>`:no} <span class="total">${this.t("{{value}} rupas",{value:f(this.effectiveLang(),r.totalRupas,2)})} ${typeof r.rank=="number"?ia`<span class="rank">#${r.rank}</span>`:no}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:f(this.effectiveLang(),r.totalVirupas,1)})}">${md.map(s=>{let o=Math.max(0,r[s.key]??0);return o>0?ia`<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>`:no})}</div>${a?ia`<p class="themes">${a}</p>`:no}</article>`}};hs.styles=[u,I,mm`.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}`],hs=m([hm("roxy-bhava-bala-table")],hs);import{css as gm,html as xe,nothing as ft,svg as hd}from"lit";import{customElement as um,property as ym}from"lit/decorators.js";var fn=["physical","emotional","intellectual","intuitive"],oo={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function Mr(n,r){let e=oo[n];return e?r(e):w(n)}var io={physical:"#dc2626",emotional:"#0284c7",intellectual:"#16a34a",intuitive:"#a855f7",aesthetic:"#f59e0b",awareness:"#ec4899",spiritual:"#14b8a6",passion:"#ef4444",mastery:"#6366f1",wisdom:"#475569"},fm={ascending:"ascending through zero",descending:"descending through zero"},xm={double:"Double day",triple:"Triple day"},la=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 xe`<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?xe`<span class="phase">${w(e.overallPhase)}</span>`:ft} ${typeof e.energyRating=="number"?xe`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:ft}</div></header>${s?xe`<div class="spotlight" part="details spotlight" style="${`border-left-color: ${io[s.cycle]??"var(--roxy-accent, #f59e0b)"}`}"><p class="label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${Mr(s.cycle,o=>this.t(o))}</strong> ${typeof s.value=="number"?xe`<span class="energy">${ve(this.effectiveLang(),s.value,0)}</span>`:ft} ${s.phase?xe`<span class="phase">${w(s.phase)}</span>`:ft}</div>${s.message&&!this.hideReadings?xe`<p>${s.message}</p>`:ft}</div>`:ft}<div class="bars" part="chart bars" role="list">${a.map(([o,i])=>{let l=Math.abs(i)*50,c=io[o]??"var(--roxy-accent, #f59e0b)";return xe`<div class="bar" role="listitem"><span>${Mr(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">${ve(this.effectiveLang(),i*100,0)}</span></div>`})}</div>${this.hideReadings?ft:xe`${e.dailyMessage?xe`<p class="advice">${e.dailyMessage}</p>`:ft} ${e.advice?xe`<p class="advice">${e.advice}</p>`:ft}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return xe`<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 xe`<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">${Ct(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"/>${fn.map(l=>{let c=t.map((d,h)=>{let x=d[l]??0,v=h*o,b=s/2-x/100*(s/2-8);return`${v.toFixed(2)},${b.toFixed(2)}`}).join(" "),p=io[l]??"#475569";return hd`<polyline points=${c} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?hd`<circle cx=${(c*o).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger, #dc2626)"><title>${[k(this.effectiveLang(),l.date),He(this.effectiveLang(),(l.criticalCycles??[]).map(p=>Mr(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>`:ft)}</svg><div class="forecast-axis" part="legend"><span>${k(this.effectiveLang(),t[0]?.date)}</span><span>${k(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${fn.map(l=>xe`<span class="key"><span class="dot" style="${`background: ${io[l]}`}"></span>${this.t(oo[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${i?xe`<dl class="stats" part="details">${this.stat(this.t("Best day"),k(this.effectiveLang(),i.bestDay))} ${this.stat(this.t("Worst day"),k(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>`:ft} ${this.renderForecastData(e)} ${i?.periodAdvice&&!this.hideReadings?xe`<p class="advice">${i.periodAdvice}</p>`:ft}</section>`}renderForecastData(e){let t=this.effectiveLang();return xe`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${B()}</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>${fn.map(a=>xe`<th scope="col">${this.t(oo[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=>xe`<tr><th scope="row"><time datetime="${a.date}">${k(t,a.date)}</time></th>${fn.map(s=>xe`<td>${ve(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?He(t,a.criticalCycles.map(s=>Mr(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:k(this.effectiveLang(),o.date)||o.date,aside:[o.cycle?Mr(o.cycle,i=>this.t(i)):"",this.severityName(o.severity)].filter(Boolean).join(" · "),body:o.advisory??"",extra:xe`<p class="crit-meta">${[o.direction?this.t(fm[o.direction]):"",typeof o.period=="number"?this.t("{{period}}-day cycle",{period:o.period}):""].filter(Boolean).join(" · ")}</p>`}));return xe`<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">${Ct(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?k(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${a.length>0?xe`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:He(this.effectiveLang(),a.map(o=>k(this.effectiveLang(),o)||o))})}</p>`:ft} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=xm[e];return t?this.t(t):""}stat(e,t){return t?xe`<div class="stat"><dt>${e}</dt><dd>${t}</dd></div>`:ft}};la.styles=[u,M,F,gm`.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([ym({type:String,reflect:!0})],la.prototype,"mode",2),la=m([um("roxy-biorhythm-chart")],la);import{css as Om,html as V,nothing as ae}from"lit";import{customElement as Bm,state as Fm}from"lit/decorators.js";import{nothing as bm,svg as kt}from"lit";var vd=14,vm=86,Ld=0,Lm=102,yr=6,$d=(vm-vd)*yr,$m=(Lm-Ld)*yr;function ca(n,r){return{x:(n-vd)*yr,y:(r-Ld)*yr}}var D=50,po=n=>2*D-n,xn=1.02*yr,wd=1.35*yr,Ri=1.15*yr,Ge=2.87,xt=4.4,gd=5.65,Li={head:{64:[D-Ge,11.2],61:[D,11.2],63:[D+Ge,11.2]},ajna:{47:[D-Ge,18],24:[D,18],4:[D+Ge,18],17:[D-Ge,20.6],11:[D+Ge,20.6],43:[D,25.3]},throat:{62:[D-Ge,32.4],23:[D,32.4],56:[D+Ge,32.4],16:[D-xt,34.7],35:[D+xt,34.7],20:[D-xt,37.3],12:[D+xt,37.3],45:[D+xt,39.6],31:[D-Ge,41.9],8:[D,41.9],33:[D+Ge,41.9]},g:{1:[D,47.7],7:[D-Ge,50.3],13:[D+Ge,50.3],10:[D-gd,53.4],25:[D+gd,53.4],15:[D-Ge,56.8],46:[D+Ge,56.8],2:[D,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:[D-Ge,72.7],14:[D,72.7],29:[D+Ge,72.7],34:[D-xt,75.4],27:[D-xt,79],59:[D+xt,79],42:[D-Ge,81.7],3:[D,81.7],9:[D+Ge,81.7]},"solar-plexus":{},root:{53:[D-Ge,90.2],60:[D,90.2],52:[D+Ge,90.2],54:[D-xt,92.6],19:[D+xt,92.6],38:[D-xt,95.3],39:[D+xt,95.3],58:[D-xt,98.1],41:[D+xt,98.1]}},wm={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function km(){let n={},r={};for(let[e,[t,a]]of Object.entries(Li.spleen))Li["solar-plexus"][wm[Number(e)]]=[po(t),a];for(let[e,t]of Object.entries(Li))for(let[a,[s,o]]of Object.entries(t))n[Number(a)]=ca(s,o),r[Number(a)]=e;return{points:n,centerOf:r}}var{points:Si,centerOf:bn}=km(),e0=$d/2;function da(n){return n.map(([r,e])=>ca(r,e))}function $i(n,r,e){return da([[D-n,r],[D+n,r],[D+n,e],[D-n,e]])}var wi=5.9,ud=[[18.3,68.3],[18.3,82],[30.3,75.15]],ki=[20,84.4],yd=12*yr,Sm=[63.2,67.9],Rm=13.1*yr,Ci=[{id:"head",label:"Head",color:"gold",points:da([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:da([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:$i(wi,31,43.3)},{id:"g",label:"G",color:"gold",points:da([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:da([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:ca(...Sm),room:Rm}},{id:"spleen",label:"Spleen",color:"brown",points:da(ud),caption:{at:ca(...ki),room:yd}},{id:"sacral",label:"Sacral",color:"red",points:$i(wi,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:da(ud.map(([n,r])=>[po(n),r])),caption:{at:ca(po(ki[0]),ki[1]),room:yd}},{id:"root",label:"Root",color:"brown",points:$i(wi,88.5,99.8)}],Cm=[[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]],Dm=Tm();function Tm(){let n=po,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 ${lo(r[0])}`];for(let t=1;t+2<r.length;t+=3)e.push(`C ${lo(r[t])} ${lo(r[t+1])} ${lo(r[t+2])}`);e.push(`L ${co(r[r.length-1],n)}`);for(let t=r.length-3;t>=1;t-=3)e.push(`C ${co(r[t+1],n)} ${co(r[t],n)} ${co(r[t-1],n)}`);return e.push("Z"),e.join(" ")}function lo([n,r]){let e=ca(n,r);return`${e.x} ${e.y}`}function co([n,r],e){let t=ca(e(n),r);return`${t.x} ${t.y}`}function Am(n){return n.map(r=>`${r.x},${r.y}`).join(" ")}function kd(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function zm(){return kt`<path class="bg-body" d=${Dm} />`}function Mm(n){let r=[];for(let[e,t]of Cm){let a=Si[e],s=Si[t];if(!a||!s)continue;r.push(kt`<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=kd(c);r.push(kt`<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(kt`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`)}}return r}function Em(n,r,e){return Ci.flatMap(t=>{let a=n.has(t.id),s=`bg-center bg-${t.color}${a?" defined":""}`,o=r?.get(t.id)||t.label;return[kt`<polygon class=${s} points=${Am(t.points)}><title>${o}: ${a?e.defined:e.open}</title></polygon>`,t.caption?fd(o,t.caption.at,"bg-caption",t.caption.room):fd(o,xd(t.points),a?`defined bg-${t.color}`:"",_m(t.points,xd(t.points).y)*.86)]})}function fd(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(Ri,t/Math.max(1,s*Pm)),i=o*1.05,l=r.y-i*(a.length-1)/2;return kt`<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)=>kt`<tspan x=${r.x} y=${l+p*i}>${c}</tspan>`)}</text>`}var Pm=.66;function _m(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 xd(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 bd(n,r){return`M ${n.x} ${n.y-xn} A ${xn} ${xn} 0 0 ${r} ${n.x} ${n.y+xn} Z`}function Nm(n,r){let e=[];for(let[t,a]of Object.entries(Si)){let s=Number(t),o=n.get(s),i=o?kd(o):"",l=r.get(s);e.push(kt`<g class="bg-gate-node">
8
- ${i==="both"?[kt`<path class="bg-gate-dot on src-left" d=${bd(a,0)} />`,kt`<path class="bg-gate-dot on src-right" d=${bd(a,1)} />`]:kt`<circle class="bg-gate-dot ${i&&`on ${i}`}" cx=${a.x} cy=${a.y} r=${xn} />`}
7
+ </g>`}renderLegend(e){return e.length===0?zr:Ft`<div class="legend" part="legend">${e.map((t,a)=>{let s=na(t.planet,a);return Ft`<span class="legend-item"><span class="legend-swatch" style="${`border-top-color: ${s}`}"></span> ${t.symbol?Ft`${t.symbol}`:zr}${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?zr:Ft`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,a)=>{let s=na(t.planet,a),o=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return Ft`<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?Ft`${t.symbol}`:zr}${t.planet} </span>${B()}</summary><div class="interp-body">${o.filter(([,i])=>i).map(([i,l])=>Ft`<p class="interp-line"><span class="code">${i}</span>${l}</p>`)}</div></details>`})}</section>`}};cs.styles=[u,Ne,M,F,sm`.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}`],cs=m([nm("roxy-astrocartography-map")],cs);import{css as lm,html as Ie,nothing as ht}from"lit";import{customElement as dm}from"lit/decorators.js";var cm={year:"Year",month:"Month",day:"Day",hour:"Hour"},cd={harmonious:"Harmonious",challenging:"Challenging"},pd={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},md={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},ps=class extends g{renderData(r){let e=this.effectiveLang(),t=H(e,r.birthData?.date,r.birthData?.time);return Ie`<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`<span class="born">${t}</span>`:ht} ${r.zodiacAnimal?Ie`<span class="animal">${y(r,"zodiacAnimal")}</span>`:ht}</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`<p class="summary" part="section summary">${r.summary}</p>`:ht} ${Tr(r.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(r){let e=cm[r.position],t=r.position==="day";return Ie`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos">${e?this.t(e):w(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`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${r.hiddenStems.map(a=>Ie`<li><span lang="zh">${a.stem?.chinese??""}</span> <span class="role">${a.role}</span> ${y(a.tenGod,"name")}</li>`)}</ul>`:ht} ${r.naYin?Ie`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${r.naYin}</span>`:ht}</div>`}renderDayMaster(r){let e=r.dayMaster;return e?Ie`<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`<p part="reading">${e.nature}</p>`:ht}</div></section>`:ht}renderElements(r){let e=r.fiveElements??[];if(e.length===0)return ht;let t=this.effectiveLang(),a=e.reduce((s,o)=>s+(o.count??0),0)||1;return Ie`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>Ie`<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">${z(t,s.count??0)} ${s.level&&md[s.level]?this.t(md[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?Ie`<p class="element-reading" part="reading">${s.reading}</p>`:ht}</div>`)}</div></section>`}renderInteractions(r){let e=r.interactions??[];return e.length===0?ht:Ie`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>Ie`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&pd[t.type]?this.t(pd[t.type]):w(t.type??"")}</b> ${t.quality?Ie`<span class="tag tag-${t.quality}">${t.quality&&cd[t.quality]?this.t(cd[t.quality]):t.quality}</span>`:ht} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?Ie`<span>${t.transformsTo}</span>`:ht} ${t.variety?Ie`<span>${t.variety}</span>`:ht} ${t.type==="punishment"&&typeof t.complete=="boolean"?Ie`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ht}</div>${t.meaning&&!this.hideReadings?Ie`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ht}</li>`)}</ul></section>`}};ps.styles=[u,I,lm`.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}`],ps=m([dm("roxy-bazi-chart")],ps);import{css as pm,html as oa,nothing as so}from"lit";import{customElement as mm}from"lit/decorators.js";function or(n,r){return!r||!n?.length?"":n.map(e=>r[String(e)]?.[0]).filter(Boolean).join(", ")}function vi(n,r){return!r||typeof n!="number"?"":(r[String(n)]??[]).join(", ")}var ms=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 oa`<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>${U(this.effectiveLang(),r.frame,this.translator)}</header>${a.length?oa`<div class="moved-list" part="table moved">${a.map(o=>this.renderMoved(o,r.houseThemes))}</div>`:so} ${t.length?oa`<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>`:so}</div>`}renderMoved(r,e){let t=L(r.graha)??"",a=typeof r.bhava=="number"?or([r.bhava],e):"";return oa`<div class="moved-row"><span class="graha">${t?oa`<span class="glyph">${t}</span>`:so}${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?oa`<span class="themes">${a}</span>`:so}</div>`}renderBhavaRow(r){let e=(r.grahas??[]).join(", ");return oa`<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>`}};ms.styles=[u,I,pm`.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}`],ms=m([mm("roxy-bhav-chalit-table")],ms);import{css as hm,html as ia,nothing as no}from"lit";import{customElement as gm}from"lit/decorators.js";var hd=[{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)"}],hs=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 ia`<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>${U(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")}">${hd.map(a=>ia`<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"?or([r.house],t):"";return ia`<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?ia`<span class="lord">${this.t("lord {{graha}}",{graha:r.lord})}</span>`:no} <span class="total">${this.t("{{value}} rupas",{value:f(this.effectiveLang(),r.totalRupas,2)})} ${typeof r.rank=="number"?ia`<span class="rank">#${r.rank}</span>`:no}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:f(this.effectiveLang(),r.totalVirupas,1)})}">${hd.map(s=>{let o=Math.max(0,r[s.key]??0);return o>0?ia`<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>`:no})}</div>${a?ia`<p class="themes">${a}</p>`:no}</article>`}};hs.styles=[u,I,hm`.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}`],hs=m([gm("roxy-bhava-bala-table")],hs);import{css as um,html as xe,nothing as ft,svg as gd}from"lit";import{customElement as ym,property as fm}from"lit/decorators.js";var fn=["physical","emotional","intellectual","intuitive"],oo={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function Mr(n,r){let e=oo[n];return e?r(e):w(n)}var io={physical:"#dc2626",emotional:"#0284c7",intellectual:"#16a34a",intuitive:"#a855f7",aesthetic:"#f59e0b",awareness:"#ec4899",spiritual:"#14b8a6",passion:"#ef4444",mastery:"#6366f1",wisdom:"#475569"},xm={ascending:"ascending through zero",descending:"descending through zero"},bm={double:"Double day",triple:"Triple day"},la=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 xe`<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?xe`<span class="phase">${w(e.overallPhase)}</span>`:ft} ${typeof e.energyRating=="number"?xe`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:ft}</div></header>${s?xe`<div class="spotlight" part="details spotlight" style="${`border-left-color: ${io[s.cycle]??"var(--roxy-accent, #f59e0b)"}`}"><p class="label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${Mr(s.cycle,o=>this.t(o))}</strong> ${typeof s.value=="number"?xe`<span class="energy">${ve(this.effectiveLang(),s.value,0)}</span>`:ft} ${s.phase?xe`<span class="phase">${w(s.phase)}</span>`:ft}</div>${s.message&&!this.hideReadings?xe`<p>${s.message}</p>`:ft}</div>`:ft}<div class="bars" part="chart bars" role="list">${a.map(([o,i])=>{let l=Math.abs(i)*50,c=io[o]??"var(--roxy-accent, #f59e0b)";return xe`<div class="bar" role="listitem"><span>${Mr(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">${ve(this.effectiveLang(),i*100,0)}</span></div>`})}</div>${this.hideReadings?ft:xe`${e.dailyMessage?xe`<p class="advice">${e.dailyMessage}</p>`:ft} ${e.advice?xe`<p class="advice">${e.advice}</p>`:ft}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return xe`<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 xe`<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">${Ct(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"/>${fn.map(l=>{let c=t.map((d,h)=>{let x=d[l]??0,v=h*o,b=s/2-x/100*(s/2-8);return`${v.toFixed(2)},${b.toFixed(2)}`}).join(" "),p=io[l]??"#475569";return gd`<polyline points=${c} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?gd`<circle cx=${(c*o).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger, #dc2626)"><title>${[k(this.effectiveLang(),l.date),He(this.effectiveLang(),(l.criticalCycles??[]).map(p=>Mr(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>`:ft)}</svg><div class="forecast-axis" part="legend"><span>${k(this.effectiveLang(),t[0]?.date)}</span><span>${k(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${fn.map(l=>xe`<span class="key"><span class="dot" style="${`background: ${io[l]}`}"></span>${this.t(oo[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${i?xe`<dl class="stats" part="details">${this.stat(this.t("Best day"),k(this.effectiveLang(),i.bestDay))} ${this.stat(this.t("Worst day"),k(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>`:ft} ${this.renderForecastData(e)} ${i?.periodAdvice&&!this.hideReadings?xe`<p class="advice">${i.periodAdvice}</p>`:ft}</section>`}renderForecastData(e){let t=this.effectiveLang();return xe`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${B()}</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>${fn.map(a=>xe`<th scope="col">${this.t(oo[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=>xe`<tr><th scope="row"><time datetime="${a.date}">${k(t,a.date)}</time></th>${fn.map(s=>xe`<td>${ve(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?He(t,a.criticalCycles.map(s=>Mr(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:k(this.effectiveLang(),o.date)||o.date,aside:[o.cycle?Mr(o.cycle,i=>this.t(i)):"",this.severityName(o.severity)].filter(Boolean).join(" · "),body:o.advisory??"",extra:xe`<p class="crit-meta">${[o.direction?this.t(xm[o.direction]):"",typeof o.period=="number"?this.t("{{period}}-day cycle",{period:o.period}):""].filter(Boolean).join(" · ")}</p>`}));return xe`<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">${Ct(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?k(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${a.length>0?xe`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:He(this.effectiveLang(),a.map(o=>k(this.effectiveLang(),o)||o))})}</p>`:ft} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=bm[e];return t?this.t(t):""}stat(e,t){return t?xe`<div class="stat"><dt>${e}</dt><dd>${t}</dd></div>`:ft}};la.styles=[u,M,F,um`.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([fm({type:String,reflect:!0})],la.prototype,"mode",2),la=m([ym("roxy-biorhythm-chart")],la);import{css as Bm,html as V,nothing as ae}from"lit";import{customElement as Fm,state as Hm}from"lit/decorators.js";import{nothing as vm,svg as kt}from"lit";var Ld=14,Lm=86,$d=0,$m=102,yr=6,wd=(Lm-Ld)*yr,wm=($m-$d)*yr;function ca(n,r){return{x:(n-Ld)*yr,y:(r-$d)*yr}}var D=50,po=n=>2*D-n,xn=1.02*yr,kd=1.35*yr,Ri=1.15*yr,Ge=2.87,xt=4.4,ud=5.65,Li={head:{64:[D-Ge,11.2],61:[D,11.2],63:[D+Ge,11.2]},ajna:{47:[D-Ge,18],24:[D,18],4:[D+Ge,18],17:[D-Ge,20.6],11:[D+Ge,20.6],43:[D,25.3]},throat:{62:[D-Ge,32.4],23:[D,32.4],56:[D+Ge,32.4],16:[D-xt,34.7],35:[D+xt,34.7],20:[D-xt,37.3],12:[D+xt,37.3],45:[D+xt,39.6],31:[D-Ge,41.9],8:[D,41.9],33:[D+Ge,41.9]},g:{1:[D,47.7],7:[D-Ge,50.3],13:[D+Ge,50.3],10:[D-ud,53.4],25:[D+ud,53.4],15:[D-Ge,56.8],46:[D+Ge,56.8],2:[D,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:[D-Ge,72.7],14:[D,72.7],29:[D+Ge,72.7],34:[D-xt,75.4],27:[D-xt,79],59:[D+xt,79],42:[D-Ge,81.7],3:[D,81.7],9:[D+Ge,81.7]},"solar-plexus":{},root:{53:[D-Ge,90.2],60:[D,90.2],52:[D+Ge,90.2],54:[D-xt,92.6],19:[D+xt,92.6],38:[D-xt,95.3],39:[D+xt,95.3],58:[D-xt,98.1],41:[D+xt,98.1]}},km={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function Sm(){let n={},r={};for(let[e,[t,a]]of Object.entries(Li.spleen))Li["solar-plexus"][km[Number(e)]]=[po(t),a];for(let[e,t]of Object.entries(Li))for(let[a,[s,o]]of Object.entries(t))n[Number(a)]=ca(s,o),r[Number(a)]=e;return{points:n,centerOf:r}}var{points:Si,centerOf:bn}=Sm(),t0=wd/2;function da(n){return n.map(([r,e])=>ca(r,e))}function $i(n,r,e){return da([[D-n,r],[D+n,r],[D+n,e],[D-n,e]])}var wi=5.9,yd=[[18.3,68.3],[18.3,82],[30.3,75.15]],ki=[20,84.4],fd=12*yr,Rm=[63.2,67.9],Cm=13.1*yr,Ci=[{id:"head",label:"Head",color:"gold",points:da([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:da([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:$i(wi,31,43.3)},{id:"g",label:"G",color:"gold",points:da([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:da([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:ca(...Rm),room:Cm}},{id:"spleen",label:"Spleen",color:"brown",points:da(yd),caption:{at:ca(...ki),room:fd}},{id:"sacral",label:"Sacral",color:"red",points:$i(wi,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:da(yd.map(([n,r])=>[po(n),r])),caption:{at:ca(po(ki[0]),ki[1]),room:fd}},{id:"root",label:"Root",color:"brown",points:$i(wi,88.5,99.8)}],Dm=[[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]],Tm=Am();function Am(){let n=po,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 ${lo(r[0])}`];for(let t=1;t+2<r.length;t+=3)e.push(`C ${lo(r[t])} ${lo(r[t+1])} ${lo(r[t+2])}`);e.push(`L ${co(r[r.length-1],n)}`);for(let t=r.length-3;t>=1;t-=3)e.push(`C ${co(r[t+1],n)} ${co(r[t],n)} ${co(r[t-1],n)}`);return e.push("Z"),e.join(" ")}function lo([n,r]){let e=ca(n,r);return`${e.x} ${e.y}`}function co([n,r],e){let t=ca(e(n),r);return`${t.x} ${t.y}`}function zm(n){return n.map(r=>`${r.x},${r.y}`).join(" ")}function Sd(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function Mm(){return kt`<path class="bg-body" d=${Tm} />`}function Em(n){let r=[];for(let[e,t]of Dm){let a=Si[e],s=Si[t];if(!a||!s)continue;r.push(kt`<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=Sd(c);r.push(kt`<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(kt`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${o.x} y2=${o.y} />`)}}return r}function Pm(n,r,e){return Ci.flatMap(t=>{let a=n.has(t.id),s=`bg-center bg-${t.color}${a?" defined":""}`,o=r?.get(t.id)||t.label;return[kt`<polygon class=${s} points=${zm(t.points)}><title>${o}: ${a?e.defined:e.open}</title></polygon>`,t.caption?xd(o,t.caption.at,"bg-caption",t.caption.room):xd(o,bd(t.points),a?`defined bg-${t.color}`:"",Nm(t.points,bd(t.points).y)*.86)]})}function xd(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(Ri,t/Math.max(1,s*_m)),i=o*1.05,l=r.y-i*(a.length-1)/2;return kt`<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)=>kt`<tspan x=${r.x} y=${l+p*i}>${c}</tspan>`)}</text>`}var _m=.66;function Nm(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 bd(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 vd(n,r){return`M ${n.x} ${n.y-xn} A ${xn} ${xn} 0 0 ${r} ${n.x} ${n.y+xn} Z`}function Im(n,r){let e=[];for(let[t,a]of Object.entries(Si)){let s=Number(t),o=n.get(s),i=o?Sd(o):"",l=r.get(s);e.push(kt`<g class="bg-gate-node">
8
+ ${i==="both"?[kt`<path class="bg-gate-dot on src-left" d=${vd(a,0)} />`,kt`<path class="bg-gate-dot on src-right" d=${vd(a,1)} />`]:kt`<circle class="bg-gate-dot ${i&&`on ${i}`}" cx=${a.x} cy=${a.y} r=${xn} />`}
9
9
  <text class="bg-gate ${o?"on":""}" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${s}</text>
10
- ${l?kt`<title>${l}</title>`:bm}
11
- </g>`)}return e}var mo=`0 0 ${$d} ${$m}`;function ho(n){return kt`
12
- ${zm()}
13
- ${Mm(n.gateSources)}
14
- ${Em(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
- ${Nm(n.gateSources,n.gateTitles)}
16
- `}import{css as Im}from"lit";var go=Im`.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:${Ri}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:${wd}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}`;import{css as Gm,html as Er,nothing as pa}from"lit";var Pr=Gm`.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 uo(n,r){return n==="design"?r("Design"):n==="personality"?r("Personality"):n??""}function fr(n){let r=n.filter(e=>!!e.value);return r.length===0?pa:Er`<div class="facts" part="facts">${r.map(e=>Er`<div class="fact" part="fact"><span>${e.label}</span> <strong>${e.value}</strong></div>`)}</div>`}function yo(n,r,e){return!n&&!r?pa:Er`<div class="themes" part="themes">${n?Er`<span class="pill pill--good">${e("Signature: {{value}}",{value:n})}</span>`:pa} ${r?Er`<span class="pill pill--shadow">${e("Not-self: {{value}}",{value:r})}</span>`:pa}</div>`}function fo(n,r){return!n?.personality&&!n?.design?pa:Er`<dl class="keynotes" part="keynotes">${n.personality?Er`<dt>${r("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:pa} ${n.design?Er`<dt>${r("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:pa}</dl>`}var Hm=["gold","green","brown","red"];function jm(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 ma=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.side="personality"}renderData(e){let t=e.centers??[],a=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=jm(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 V`<div class="wrap" part="card"><header class="head" part="header"><div><h2 class="title">${this.t("Bodygraph")}</h2>${e.designInstantUtc?V`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${Kl(this.effectiveLang(),e.designInstantUtc)}</time></div>`:ae}</div>${e.type||e.profile?V`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:ae}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(V`<svg class="chart" part="chart" viewBox="${mo}" 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>${ho({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}`:""}`,uo(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?L(e.planet)??y(e,"planet"):""}renderSummary(e,t){let a=e.incarnationCross;return V`<div class="summary" part="details">${fr([{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?V`<p class="lead">${e.typeDescription}</p>`:ae} ${a?.name?V`<p class="cross">${a.name} ${a.gates?.length?V`<span class="gates">(${a.gates.join(", ")})</span>`:ae}</p>`:ae} ${yo(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=Hm.map(a=>[a,Ci.filter(s=>s.color===a).map(s=>e.get(s.id)||s.label).join(", ")]);return V`<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])=>V`<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:fo(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 ae;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 V`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...a].map(([o,i])=>V`<div class="group">${o?V`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(i[0],"circuit")})}</p>`:ae} ${i[0]?.circuitDescription?V`<p class="group-note">${i[0].circuitDescription}</p>`:ae} ${i.map(l=>V`<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>${B()} <span class="interp-aside"><span class="chips">${(l.centers??[]).map(c=>V`<span class="chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?V`<p>${l.description}</p>`:ae}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return ae;let t=e.filter(a=>a.defined).length;return V`<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)=>V`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(a,"name")}</span> ${B()} <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?V`<span class="chip">${this.t("Motor")}</span>`:ae} ${a.awareness?V`<span class="chip">${this.t("Awareness")}</span>`:ae}</span></span></summary><div class="interp-body">${a.theme?V`<p>${a.theme}</p>`:ae} ${!a.defined&&a.notSelfQuestion?V`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${a.notSelfQuestion}</dd></dl>`:ae} ${a.biology?V`<p class="footnote">${this.t("Biology")}. ${a.biology}</p>`:ae} ${a.gates?.length?V`<p class="footnote">${this.t("Gates {{gates}}",{gates:a.gates.join(", ")})}</p>`:ae}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return ae;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 V`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${o?ot({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}):ae}<div id="${o?`hd-panel-${i}`:ae}" part="panel" role="${o?"tabpanel":ae}" aria-labelledby="${o?`hd-tab-${i}`:ae}">${c?V`<p class="side-note">${c}</p>`:ae} ${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 V`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${a?V`<span class="glyph" aria-hidden="true">${a}</span>`:ae} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${B()} ${s?V`<span class="interp-aside"><small>${s}</small></span>`:ae}</summary><div class="interp-body">${e.gateDescription?V`<p>${e.gateDescription}</p>`:ae} ${e.lineMeaning?V`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:ae} ${e.planetDescription?V`<p class="footnote">${s}. ${e.planetDescription}</p>`:ae} ${o?.number?V`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:o.number})}${o.english?`, ${o.english}`:""}</p>`:ae}</div></details>`}};ma.styles=[u,Ne,Ue,M,F,Pr,go,Om`.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([Fm()],ma.prototype,"side",2),ma=m([Bm("roxy-bodygraph")],ma);import{css as Km,html as ha,nothing as vn}from"lit";import{customElement as Vm}from"lit/decorators.js";var qm={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."},gs=class extends g{renderData(r){let e=r.karakas??[];return e.length?ha`<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?qm[r.scheme]??"":""}</p>${U(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=L(r.graha)??"",a=P(r.rashi)??"";return ha`<tr class="${e?"ak":""}"><td class="office">${r.name??""}${r.abbreviation?ha`<span class="abbr">${r.abbreviation}</span>`:vn}</td><td>${t?ha`<span class="glyph">${t}</span>`:vn}${r.graha??""}</td><td>${a?ha`<span class="glyph">${a}</span>`:vn}${r.rashi??""}</td><td class="num">${f(this.effectiveLang(),r.degreeInRashi,2)}</td><td class="num">${f(this.effectiveLang(),r.rankingDegree,2)} ${r.isReversed?ha`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:vn}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?ha`<p>${r.significations}</p>`:vn}</td></tr>`}};gs.styles=[u,I,Km`.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}`],gs=m([Vm("roxy-chara-karakas")],gs);import{css as Ym,html as ga,nothing as Di}from"lit";import{customElement as Um}from"lit/decorators.js";var us=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=L(r.lord)??"",s=sr(this.effectiveLang(),r);return ga`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${r.name}${t?ga`<span class="now-badge">${this.t("Now")}</span>`:Di} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${a?ga`<span aria-hidden="true">${a}</span>`:Di} ${r.lord}</span></div>`}renderData(r){let{date:e,dayChoghadiya:t,nightChoghadiya:a}=r;return ga`<div class="wrap" part="card"><div class="header" part="header"><h2 class="title">${this.t("Choghadiya")}</h2>${e?ga`<p class="subtitle">${k(this.effectiveLang(),e)}</p>`:Di}</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)):ga`<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)):ga`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};us.styles=[u,Ym`.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}`],us=m([Um("roxy-choghadiya-grid")],us);import{css as Zm,html as Se,nothing as We}from"lit";import{customElement as Wm,property as Xm}from"lit/decorators.js";var Jm=["sun","moon","venus","mars"],Sd=["fire","earth","air","water"],Rd={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},Qm={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},ua=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,x=!this.hideReadings,v=this.t(Rd[this.mode]??Rd.astrology);return Se`<article class="card" part="card" aria-label="${v}"><div class="head" part="header"><h2>${v}</h2><div>${typeof t=="number"?Se`<div class="score">${Math.round(t)}</div>`:We} ${s?Se`<div class="rating">${s}</div>`:We}</div></div>${Object.keys(a).length>0?Se`<div role="list" part="details breakdown">${Object.entries(a).map(([b,S])=>Se`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${b}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,S))}%"></span></span> <span>${Math.round(S)}</span></div>`)}</div>`:We} ${o?Se`<p><span class="archetype">${o.label}</span> ${o.description&&x?Se`· ${o.description}`:We}</p>`:We} ${l&&x?Se`<p class="lead">${l}</p>`:We} ${c&&x?Se`<p class="body">${c}</p>`:We} ${i&&x?Se`<p class="body">${i}</p>`:We} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${x&&((p?.length??0)>0||(d?.length??0)>0)?Se`<div class="lists" part="section strengths-challenges">${p?.length?Se`<div><h3>${this.t("Strengths")}</h3><ul>${p.map(b=>Se`<li>${b}</li>`)}</ul></div>`:We} ${d?.length?Se`<div><h3>${this.t("Challenges")}</h3><ul>${d.map(b=>Se`<li>${b}</li>`)}</ul></div>`:We}</div>`:We} ${h?.length?Se`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul class="key-aspects">${h.slice(0,6).map(b=>Se`<li>${eh(this.effectiveLang(),b,x)}</li>`)}</ul></div></div>`:We}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Se`<div class="pills" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Se`<span class="pill">${this.t("Total")}: ${e.total}</span>`:We} <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>`:We}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return We;let a=e?.persons,s=Jm.map(o=>{let i=t[o];if(!i)return null;let l=c=>{let p=A((c==="person1"?i.person1Sign:i.person2Sign)??""),d=a?.[c]?.[o]?.degree,h=P(p)??"",x=typeof d=="number"?` ${Math.round(d)}°`:"";return`${h} ${p}${x}`.trim()};return{label:`${L(o)??""} ${A(o)}`.trim(),aside:He(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 We;let t=e.person1,a=e.person2,s=Math.max(1,...Sd.map(i=>Math.max(t?.[i]??0,a?.[i]??0))),o=e.sharedElement?.toLowerCase();return Se`<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>${Sd.map(i=>{let l=t?.[i]??0,c=a?.[i]??0;return Se`<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?Se`<p class="shared-note">${e.description}</p>`:We}</section>`}renderSubScores(){let e=this.data;if(!e)return We;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:[He(this.effectiveLang(),[String(o.person1),String(o.person2)]),ve(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:Mr(a,o=>this.t(o)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:ve(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(Qm[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}};ua.styles=[u,M,F,Zm`.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([Xm({type:String,reflect:!0})],ua.prototype,"mode",2),ua=m([Wm("roxy-compatibility-card")],ua);function eh(n,r,e){let t=yt(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}`}import{css as th,html as xo,nothing as Ti}from"lit";import{customElement as rh}from"lit/decorators.js";var Cd={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},ah={fortunate:"success",unfortunate:"danger",mixed:"warning"},ys=class extends g{renderData(r){let e=z(this.effectiveLang(),r.number);return xo`<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?xo`<h2 class="name">${r.name}</h2>`:Ti}</div></header><div class="badges" part="details"><span class="badge">${this.t("Root number {{n}}",{n:z(this.effectiveLang(),r.root)})}</span> <span class="${`badge ${ah[r.nature]??""}`}">${Cd[r.nature]?this.t(Cd[r.nature]):w(r.nature)}</span> ${typeof r.sameAs=="number"?xo`<span class="badge">${this.t("Same meaning as {{n}}",{n:z(this.effectiveLang(),r.sameAs)})}</span>`:Ti}</div>${r.meaning&&!this.hideReadings?xo`<p class="meaning" part="section readings">${r.meaning}</p>`:Ti}</article>`}};ys.styles=[u,th`.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}`],ys=m([rh("roxy-compound-number")],ys);import{css as ih,html as bt,nothing as ir}from"lit";import{customElement as lh}from"lit/decorators.js";var sh={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"},nh=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"]),oh={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function bo(n){let r=[],e=[];for(let o of n.toLowerCase().split(/[\s-]+/)){let i=oh[o];if(i){e.push(i);continue}let l=sh[o]??(nh.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 fs=class extends g{renderData(r){let e=r.colors??[],t=r.keywords??[],a=r.pairsWith??[],s=Zn(this.effectiveLang(),r.birthMonth)||void 0,o=r.name??this.t("Crystal");return bt`<article class="wrap" part="card" aria-label="${o}"><div class="hero" part="header">${r.imageUrl?bt`<img class="photo" part="chart" src="${r.imageUrl}" alt="${o}" loading="lazy">`:ir}<div><h2 class="title">${r.name}</h2>${r.description&&!this.hideReadings?bt`<p class="desc">${r.description}</p>`:ir}</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?bt`<div class="attr"><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(i=>bt`<span class="color"><span class="dot" style="${`background:${bo(i)}`}"></span>${i}</span>`)}</div></dd></div>`:ir}</dl>${this.renderMeaning(r.meaning)} ${t.length&&!this.hideReadings?bt`<div part="section keywords"><p class="section-label">${this.t("Keywords")}</p><div class="chips">${t.map(i=>bt`<span class="chip">${i}</span>`)}</div></div>`:ir} ${r.affirmation&&!this.hideReadings?bt`<p class="affirmation">${r.affirmation}</p>`:ir} ${a.length?bt`<div part="section pairs-with"><p class="section-label">${this.t("Pairs with")}</p><div class="chips">${a.map(i=>bt`<span class="chip">${String(i).replace(/-/g," ")}</span>`)}</div></div>`:ir}</article>`}attr(r,e){return e==null||e===""?ir:bt`<div class="attr"><dt>${r}</dt><dd>${e}</dd></div>`}list(r,e){return e?.length?bt`<div class="attr"><dt>${r}</dt><dd>${e.join(", ")}</dd></div>`:ir}renderMeaning(r){if(!r||this.hideReadings)return ir;let t=[[this.t("Spiritual"),r.spiritual],[this.t("Emotional"),r.emotional],[this.t("Physical"),r.physical]].filter(([,a])=>!!a);return t.length===0?ir:bt`<div class="meaning" part="section meaning">${t.map(([a,s])=>bt`<h3>${a}</h3><p>${s}</p>`)}</div>`}};fs.styles=[u,ih`.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}`],fs=m([lh("roxy-crystal-card")],fs);import{css as dh,html as ya,nothing as Dd}from"lit";import{customElement as ch,property as ph}from"lit/decorators.js";var fa=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 ya`<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=>ya`<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?ya`<img class="photo" src="${o.imageUrl}" alt="${o.name??this.t("Crystal")}" loading="lazy">`:ya`<div class="photo" aria-hidden="true"></div>`}<p class="name">${o.name}</p>${o.colors&&o.colors.length>0?ya`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:He(this.effectiveLang(),o.colors)})}">${o.colors.map(i=>ya`<span class="swatch" style="${`background:${bo(i)}`}" title="${i}"></span>`)}</div>`:Dd}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?ya`<div class="detail" part="detail">${this.openedRow}</div>`:Dd}</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:Zn(this.effectiveLang(),e.month)}):this.t("Crystals")}};fa.styles=[u,dh`.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([ph({type:String,reflect:!0})],fa.prototype,"heading",2),fa=m([ch("roxy-crystal-grid")],fa);import{css as mh,html as Xe,nothing as et}from"lit";import{customElement as hh,property as gh,state as uh}from"lit/decorators.js";function Td(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function Ai(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 zi(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 Ad(n,r){return or(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,r)}function vo(n,r){let e=r.startDate?k(n,r.startDate):"",t=r.endDate?k(n,r.endDate):"";return e&&e===t?`${H(n,r.startDate)} to ${H(n,r.endDate)}`:e&&t?`${e} to ${t}`:e||t}var _r=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=fh(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 Xe`<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?ot({items:l,active:c,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):et}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:et}">${c==="timeline"?Xe`${this.period==="current"?this.renderCurrent(e):et} ${t.length>0?Xe`<div class="timeline" part="chart timeline" role="list">${t.map(p=>this.renderBar(p,a,s,e.houseThemes))}</div>`:et}`:et} ${c==="readings"?this.renderReadings(o):et} ${c==="frame"?this.renderFrame(i):et}</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?Xe`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?Xe`<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>`:et}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",`${zi(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 Xe`<dl class="frame" part="details frame">${e.map(([t,a])=>Xe`<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=Ai(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Td(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=Ai(e);if(!t)return et;let a=t.period,s=vo(this.effectiveLang(),a),o=a.nominalStartDate?k(this.effectiveLang(),a.nominalStartDate):"";return Xe`<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"?` (${yh(this.effectiveLang(),a.durationYears)})`:""})} ${o?Xe`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:o})}`:et}</p>`}readings(e,t){let a=[],s=Ai(e);if(s?.period.interpretation&&a.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:vo(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=zi(p);a.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:d?this.t("{{balance}} left",{balance:d}):vo(this.effectiveLang(),c),body:c.interpretation})}}let o=t.find(i=>this.isCurrent(i));return o?.interpretation&&a.push({label:`${o.planet} ${Td(e)}`,aside:vo(this.effectiveLang(),o),body:o.interpretation}),a}renderCurrent(e){if(!("mahadasha"in e))return et;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 Xe`<div class="current" part="details current">${t.map(([a,s,o])=>{if(!s)return et;let i=zi(o),l=Ad(s.significators,e.houseThemes);return Xe`<div><span>${this.t(a)}</span> <strong>${s.planet}</strong> ${i?Xe`<small>${this.t("{{balance}} left",{balance:i})}</small>`:et} ${l?Xe`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:et}</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=Ad(e.significators,s),h=["bar",l?"now":"",a==="time"?"fine":""].filter(Boolean).join(" ");return Xe`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?Xe`<span class="now-badge">${this.t("Now")}</span>`:et} </span><span class="${p}"><span class="bar-fill" style="width:${i}%"></span> ${c>=0?Xe`<span class="bar-progress" style="left:${c*i}%" aria-hidden="true"></span>`:et} </span><span class="dates">${e.startDate?hr(this.effectiveLang(),e.startDate,a):""} ${e.endDate?Xe`- ${hr(this.effectiveLang(),e.endDate,a)}`:""} </span>${d?Xe`<span class="houses">${this.t("Signifies {{houses}}",{houses:d})}</span>`:et}</div>`}};_r.styles=[u,M,F,Ue,mh`.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([gh({type:String,reflect:!0})],_r.prototype,"period",2),m([uh()],_r.prototype,"view",2),_r=m([hh("roxy-dasha-timeline")],_r);var Mi=365.25;function yh(n,r){if(r>=1)return`${f(n,r,1)} years`;let e=r*Mi;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 fh(n){return n>=2?"year":n>=60/Mi?"month":n>=1/Mi?"day":"time"}import{css as bh,html as Z,nothing as xr}from"lit";import{customElement as vh,property as Lh}from"lit/decorators.js";import{ifDefined as zd}from"lit/directives/if-defined.js";import{css as xh}from"lit";var Nr=xh`@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 Md=["title","name","label","heading","overview","summary"],$h=80,wh=80,kh=3,Sh=["imageUrl","image","icon","symbol"],Rh=["imageUrl","image"],Ch=["affirmation","mantra","motto","quote"],Dh=new Set(["seed"]),Th=new Set(["id","slug","key"]),Ah=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),zh=8,Ed=1,Mh=12,Eh=n=>n.toLowerCase().replace(/[_-]/g,""),Pd=n=>/^(has|is)([A-Z_]|$)/.test(n),Ph=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,_h=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,Nh=/^https?:\/\//,Ih=6;function Gh(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 xa(n){return n===null||["string","number","boolean"].includes(typeof n)}function Ei(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(xa))}function _d(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(_d)}var ba=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=Ih?Z`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:Z`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?xr:xa(e)?Z`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?Z`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(xa)?this.renderChips(e):e.every(a=>a!==null&&typeof a=="object"&&!Array.isArray(a))?this.renderObjectArray(e):Z`<ol>${e.map(a=>Z`<li>${this.renderValue(a)}</li>`)}</ol>`}renderChips(e){return Z`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>Z`<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(x=>typeof x[h]=="string"&&Array.from(x[h]).length>wh))),o=new Set(a.filter(h=>s.has(h)||t.some(x=>Ei(x[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>kh,p=t.length>Mh;return Z`<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?xr:"0"}">${c?Z`${p?Z`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:xr} ${t.map(h=>Z`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:Z`<table class="${s.size?"roxy-table stacked prose":o.size?"roxy-table stacked":"roxy-table"}" role="table">${p?Z`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:xr}<thead><tr>${a.map(h=>Z`<th class="${l(h)}">${fe(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>Z`<tr>${a.map(x=>Z`<td class="${l(x)}" data-label="${fe(this.effectiveLang(),x)}">${this.renderCell(h[x],x)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=Qa(e),a=Md.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let o=Eh(s);return Dh.has(o)||a&&Th.has(o)?!1:!Ah.has(o)}))}renderObject(e){let t=this.suppress(e),a=Md.find(d=>typeof t[d]=="string"&&t[d].length<=$h),s=Sh.find(d=>typeof t[d]=="string"&&t[d].startsWith("http")),o=a!=="summary"&&typeof t.summary=="string"?"summary":null,i=Ch.find(d=>typeof t[d]=="string"),l=Object.entries(t).filter(([d,h])=>d!==a&&d!==o&&d!==i&&!Rh.includes(d)&&!_d(h)),c=l.filter(([,d])=>!Ei(d)),p=l.filter(([,d])=>Ei(d));return Z`${s?Z`<img class="roxy-image" src="${String(t[s])}" alt="${a?String(t[a]):this.t("illustration")}" loading="lazy">`:xr} ${a?Z`<h3 class="roxy-title" part="header">${t[a]}</h3>`:xr} ${o?Z`<p class="roxy-summary">${t[o]}</p>`:xr} ${i?Z`<blockquote class="roxy-quote">${t[i]}</blockquote>`:xr} ${c.length>0?Z`<dl class="roxy-rows" part="details label-track">${c.map(([d,h])=>Z`<dt>${fe(this.effectiveLang(),d)}</dt><dd>${this.renderField(h,d)}</dd>`)}</dl>`:xr} ${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=fe(this.effectiveLang(),e);return a>zh||this.depth>=Ed?Z`<details class="roxy-section" ?open="${this.depth<Ed}"><summary>${o}</summary>${s}</details>`:Z`<div class="roxy-section"><h4>${o}</h4>${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&Pd(t)?Z`<span class="roxy-badge">${this.t("Yes")}</span>`:xa(e)?Z`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(xa)?this.renderChips(e):Z`<roxy-data bare lang="${zd(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&Pd(t)?Z`<span class="roxy-badge">${this.t("Yes")}</span>`:xa(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(xa)?e.filter(a=>a!==null).map(a=>this.formatScalar(a)).join(", "):Z`<roxy-data bare lang="${zd(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return typeof e=="string"&&Nh.test(e)?Z`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&Gh(t,e)?String(e):f(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):Ph.test(e)?H(this.effectiveLang(),e):_h.test(e)?w(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)}};ba.styles=[u,bh`.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}`,Nr],m([Lh({attribute:!1})],ba.prototype,"depth",2),ba=m([vh("roxy-data")],ba);import{css as og,html as xs,nothing as Ii}from"lit";import{customElement as ig,property as lg}from"lit/decorators.js";import{html as Ln,nothing as lt,svg as Re}from"lit";var jt=400,se=20,it=jt-2*se,_e=jt/2,Nd=Object.fromEntries(we.map(n=>[n.toLowerCase(),n])),Oh=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],Od="ʳ",Bd="ᶜ",Fd="ʷ";function Pi(n){return we.indexOf(n)}function Bh(n){let r=Yl(n.graha)??n.graha,e=`${n.isRetrograde?Od:""}${n.combust?Bd:""}${n.war?Fd:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${r}${e}`;let{degree:t}=Tt(n.longitude);return`${r} ${t}°${e}`}function Fh(n,r,e){let t=[A(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=Tt(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 _i(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 Re`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${Bh(i)}<title>${Fh(i,r,s)}</title></text>`})}function $o(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 we)l[d.toLowerCase()]=[];let c=t?Nd[t.toLowerCase()]??"":"",p=c;for(let[d,h]of Object.entries(n??{})){let x=(h?.rashi??"").toLowerCase();if(d==="Lagna"||h?.graha==="Lagna"){c||(p=Nd[x]??"");continue}if(!x||!(x in l))continue;let v=h.graha??d,b=v.toLowerCase();l[x]?.push({graha:v,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:o.has(b)||void 0,war:i.get(b)})}return{lagnaSign:p,placements:l,divisionLabel:e}}var va=it/4,Hh={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 jh(n){let r=Hh[n]??{col:0,row:0};return{x:se+r.col*va,y:se+r.row*va,w:va,h:va}}function Kh(n){let r=se,e=se+va,t=se+2*va,a=se+3*va,s=jt-se;return Re`
10
+ ${l?kt`<title>${l}</title>`:vm}
11
+ </g>`)}return e}var mo=`0 0 ${wd} ${wm}`;function ho(n){return kt`
12
+ ${Mm()}
13
+ ${Em(n.gateSources)}
14
+ ${Pm(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
+ ${Im(n.gateSources,n.gateTitles)}
16
+ `}import{css as Gm}from"lit";var go=Gm`.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:${Ri}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:${kd}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}`;import{css as Om,html as Er,nothing as pa}from"lit";var Pr=Om`.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 uo(n,r){return n==="design"?r("Design"):n==="personality"?r("Personality"):n??""}function fr(n){let r=n.filter(e=>!!e.value);return r.length===0?pa:Er`<div class="facts" part="facts">${r.map(e=>Er`<div class="fact" part="fact"><span>${e.label}</span> <strong>${e.value}</strong></div>`)}</div>`}function yo(n,r,e){return!n&&!r?pa:Er`<div class="themes" part="themes">${n?Er`<span class="pill pill--good">${e("Signature: {{value}}",{value:n})}</span>`:pa} ${r?Er`<span class="pill pill--shadow">${e("Not-self: {{value}}",{value:r})}</span>`:pa}</div>`}function fo(n,r){return!n?.personality&&!n?.design?pa:Er`<dl class="keynotes" part="keynotes">${n.personality?Er`<dt>${r("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:pa} ${n.design?Er`<dt>${r("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:pa}</dl>`}var jm=["gold","green","brown","red"];function Km(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 ma=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.side="personality"}renderData(e){let t=e.centers??[],a=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=Km(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 V`<div class="wrap" part="card"><header class="head" part="header"><div><h2 class="title">${this.t("Bodygraph")}</h2>${e.designInstantUtc?V`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${Vl(this.effectiveLang(),e.designInstantUtc)}</time></div>`:ae}</div>${e.type||e.profile?V`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:ae}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(V`<svg class="chart" part="chart" viewBox="${mo}" 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>${ho({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}`:""}`,uo(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?L(e.planet)??y(e,"planet"):""}renderSummary(e,t){let a=e.incarnationCross;return V`<div class="summary" part="details">${fr([{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?V`<p class="lead">${e.typeDescription}</p>`:ae} ${a?.name?V`<p class="cross">${a.name} ${a.gates?.length?V`<span class="gates">(${a.gates.join(", ")})</span>`:ae}</p>`:ae} ${yo(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=jm.map(a=>[a,Ci.filter(s=>s.color===a).map(s=>e.get(s.id)||s.label).join(", ")]);return V`<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])=>V`<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:fo(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 ae;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 V`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...a].map(([o,i])=>V`<div class="group">${o?V`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(i[0],"circuit")})}</p>`:ae} ${i[0]?.circuitDescription?V`<p class="group-note">${i[0].circuitDescription}</p>`:ae} ${i.map(l=>V`<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>${B()} <span class="interp-aside"><span class="chips">${(l.centers??[]).map(c=>V`<span class="chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?V`<p>${l.description}</p>`:ae}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return ae;let t=e.filter(a=>a.defined).length;return V`<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)=>V`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(a,"name")}</span> ${B()} <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?V`<span class="chip">${this.t("Motor")}</span>`:ae} ${a.awareness?V`<span class="chip">${this.t("Awareness")}</span>`:ae}</span></span></summary><div class="interp-body">${a.theme?V`<p>${a.theme}</p>`:ae} ${!a.defined&&a.notSelfQuestion?V`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${a.notSelfQuestion}</dd></dl>`:ae} ${a.biology?V`<p class="footnote">${this.t("Biology")}. ${a.biology}</p>`:ae} ${a.gates?.length?V`<p class="footnote">${this.t("Gates {{gates}}",{gates:a.gates.join(", ")})}</p>`:ae}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return ae;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 V`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${o?ot({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}):ae}<div id="${o?`hd-panel-${i}`:ae}" part="panel" role="${o?"tabpanel":ae}" aria-labelledby="${o?`hd-tab-${i}`:ae}">${c?V`<p class="side-note">${c}</p>`:ae} ${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 V`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${a?V`<span class="glyph" aria-hidden="true">${a}</span>`:ae} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${B()} ${s?V`<span class="interp-aside"><small>${s}</small></span>`:ae}</summary><div class="interp-body">${e.gateDescription?V`<p>${e.gateDescription}</p>`:ae} ${e.lineMeaning?V`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:ae} ${e.planetDescription?V`<p class="footnote">${s}. ${e.planetDescription}</p>`:ae} ${o?.number?V`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:o.number})}${o.english?`, ${o.english}`:""}</p>`:ae}</div></details>`}};ma.styles=[u,Ne,Ue,M,F,Pr,go,Bm`.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([Hm()],ma.prototype,"side",2),ma=m([Fm("roxy-bodygraph")],ma);import{css as Vm,html as ha,nothing as vn}from"lit";import{customElement as qm}from"lit/decorators.js";var Ym={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."},gs=class extends g{renderData(r){let e=r.karakas??[];return e.length?ha`<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?Ym[r.scheme]??"":""}</p>${U(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=L(r.graha)??"",a=P(r.rashi)??"";return ha`<tr class="${e?"ak":""}"><td class="office">${r.name??""}${r.abbreviation?ha`<span class="abbr">${r.abbreviation}</span>`:vn}</td><td>${t?ha`<span class="glyph">${t}</span>`:vn}${r.graha??""}</td><td>${a?ha`<span class="glyph">${a}</span>`:vn}${r.rashi??""}</td><td class="num">${f(this.effectiveLang(),r.degreeInRashi,2)}</td><td class="num">${f(this.effectiveLang(),r.rankingDegree,2)} ${r.isReversed?ha`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:vn}</td><td class="meaning"><strong>${r.meaning??""}</strong> ${r.significations?ha`<p>${r.significations}</p>`:vn}</td></tr>`}};gs.styles=[u,I,Vm`.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}`],gs=m([qm("roxy-chara-karakas")],gs);import{css as Um,html as ga,nothing as Di}from"lit";import{customElement as Zm}from"lit/decorators.js";var us=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=L(r.lord)??"",s=sr(this.effectiveLang(),r);return ga`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${r.name}${t?ga`<span class="now-badge">${this.t("Now")}</span>`:Di} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${a?ga`<span aria-hidden="true">${a}</span>`:Di} ${r.lord}</span></div>`}renderData(r){let{date:e,dayChoghadiya:t,nightChoghadiya:a}=r;return ga`<div class="wrap" part="card"><div class="header" part="header"><h2 class="title">${this.t("Choghadiya")}</h2>${e?ga`<p class="subtitle">${k(this.effectiveLang(),e)}</p>`:Di}</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)):ga`<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)):ga`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};us.styles=[u,Um`.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}`],us=m([Zm("roxy-choghadiya-grid")],us);import{css as Wm,html as Se,nothing as We}from"lit";import{customElement as Xm,property as Jm}from"lit/decorators.js";var Qm=["sun","moon","venus","mars"],Rd=["fire","earth","air","water"],Cd={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},eh={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},ua=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,x=!this.hideReadings,v=this.t(Cd[this.mode]??Cd.astrology);return Se`<article class="card" part="card" aria-label="${v}"><div class="head" part="header"><h2>${v}</h2><div>${typeof t=="number"?Se`<div class="score">${Math.round(t)}</div>`:We} ${s?Se`<div class="rating">${s}</div>`:We}</div></div>${Object.keys(a).length>0?Se`<div role="list" part="details breakdown">${Object.entries(a).map(([b,S])=>Se`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${b}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,S))}%"></span></span> <span>${Math.round(S)}</span></div>`)}</div>`:We} ${o?Se`<p><span class="archetype">${o.label}</span> ${o.description&&x?Se`· ${o.description}`:We}</p>`:We} ${l&&x?Se`<p class="lead">${l}</p>`:We} ${c&&x?Se`<p class="body">${c}</p>`:We} ${i&&x?Se`<p class="body">${i}</p>`:We} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${x&&((p?.length??0)>0||(d?.length??0)>0)?Se`<div class="lists" part="section strengths-challenges">${p?.length?Se`<div><h3>${this.t("Strengths")}</h3><ul>${p.map(b=>Se`<li>${b}</li>`)}</ul></div>`:We} ${d?.length?Se`<div><h3>${this.t("Challenges")}</h3><ul>${d.map(b=>Se`<li>${b}</li>`)}</ul></div>`:We}</div>`:We} ${h?.length?Se`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul class="key-aspects">${h.slice(0,6).map(b=>Se`<li>${th(this.effectiveLang(),b,x)}</li>`)}</ul></div></div>`:We}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Se`<div class="pills" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Se`<span class="pill">${this.t("Total")}: ${e.total}</span>`:We} <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>`:We}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return We;let a=e?.persons,s=Qm.map(o=>{let i=t[o];if(!i)return null;let l=c=>{let p=A((c==="person1"?i.person1Sign:i.person2Sign)??""),d=a?.[c]?.[o]?.degree,h=P(p)??"",x=typeof d=="number"?` ${Math.round(d)}°`:"";return`${h} ${p}${x}`.trim()};return{label:`${L(o)??""} ${A(o)}`.trim(),aside:He(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 We;let t=e.person1,a=e.person2,s=Math.max(1,...Rd.map(i=>Math.max(t?.[i]??0,a?.[i]??0))),o=e.sharedElement?.toLowerCase();return Se`<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>${Rd.map(i=>{let l=t?.[i]??0,c=a?.[i]??0;return Se`<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?Se`<p class="shared-note">${e.description}</p>`:We}</section>`}renderSubScores(){let e=this.data;if(!e)return We;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:[He(this.effectiveLang(),[String(o.person1),String(o.person2)]),ve(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:Mr(a,o=>this.t(o)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:ve(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(eh[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}};ua.styles=[u,M,F,Wm`.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([Jm({type:String,reflect:!0})],ua.prototype,"mode",2),ua=m([Xm("roxy-compatibility-card")],ua);function th(n,r,e){let t=yt(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}`}import{css as rh,html as xo,nothing as Ti}from"lit";import{customElement as ah}from"lit/decorators.js";var Dd={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},sh={fortunate:"success",unfortunate:"danger",mixed:"warning"},ys=class extends g{renderData(r){let e=z(this.effectiveLang(),r.number);return xo`<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?xo`<h2 class="name">${r.name}</h2>`:Ti}</div></header><div class="badges" part="details"><span class="badge">${this.t("Root number {{n}}",{n:z(this.effectiveLang(),r.root)})}</span> <span class="${`badge ${sh[r.nature]??""}`}">${Dd[r.nature]?this.t(Dd[r.nature]):w(r.nature)}</span> ${typeof r.sameAs=="number"?xo`<span class="badge">${this.t("Same meaning as {{n}}",{n:z(this.effectiveLang(),r.sameAs)})}</span>`:Ti}</div>${r.meaning&&!this.hideReadings?xo`<p class="meaning" part="section readings">${r.meaning}</p>`:Ti}</article>`}};ys.styles=[u,rh`.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}`],ys=m([ah("roxy-compound-number")],ys);import{css as lh,html as bt,nothing as ir}from"lit";import{customElement as dh}from"lit/decorators.js";var nh={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"},oh=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"]),ih={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function bo(n){let r=[],e=[];for(let o of n.toLowerCase().split(/[\s-]+/)){let i=ih[o];if(i){e.push(i);continue}let l=nh[o]??(oh.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 fs=class extends g{renderData(r){let e=r.colors??[],t=r.keywords??[],a=r.pairsWith??[],s=Zn(this.effectiveLang(),r.birthMonth)||void 0,o=r.name??this.t("Crystal");return bt`<article class="wrap" part="card" aria-label="${o}"><div class="hero" part="header">${r.imageUrl?bt`<img class="photo" part="chart" src="${r.imageUrl}" alt="${o}" loading="lazy">`:ir}<div><h2 class="title">${r.name}</h2>${r.description&&!this.hideReadings?bt`<p class="desc">${r.description}</p>`:ir}</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?bt`<div class="attr"><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(i=>bt`<span class="color"><span class="dot" style="${`background:${bo(i)}`}"></span>${i}</span>`)}</div></dd></div>`:ir}</dl>${this.renderMeaning(r.meaning)} ${t.length&&!this.hideReadings?bt`<div part="section keywords"><p class="section-label">${this.t("Keywords")}</p><div class="chips">${t.map(i=>bt`<span class="chip">${i}</span>`)}</div></div>`:ir} ${r.affirmation&&!this.hideReadings?bt`<p class="affirmation">${r.affirmation}</p>`:ir} ${a.length?bt`<div part="section pairs-with"><p class="section-label">${this.t("Pairs with")}</p><div class="chips">${a.map(i=>bt`<span class="chip">${String(i).replace(/-/g," ")}</span>`)}</div></div>`:ir}</article>`}attr(r,e){return e==null||e===""?ir:bt`<div class="attr"><dt>${r}</dt><dd>${e}</dd></div>`}list(r,e){return e?.length?bt`<div class="attr"><dt>${r}</dt><dd>${e.join(", ")}</dd></div>`:ir}renderMeaning(r){if(!r||this.hideReadings)return ir;let t=[[this.t("Spiritual"),r.spiritual],[this.t("Emotional"),r.emotional],[this.t("Physical"),r.physical]].filter(([,a])=>!!a);return t.length===0?ir:bt`<div class="meaning" part="section meaning">${t.map(([a,s])=>bt`<h3>${a}</h3><p>${s}</p>`)}</div>`}};fs.styles=[u,lh`.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}`],fs=m([dh("roxy-crystal-card")],fs);import{css as ch,html as ya,nothing as Td}from"lit";import{customElement as ph,property as mh}from"lit/decorators.js";var fa=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 ya`<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=>ya`<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?ya`<img class="photo" src="${o.imageUrl}" alt="${o.name??this.t("Crystal")}" loading="lazy">`:ya`<div class="photo" aria-hidden="true"></div>`}<p class="name">${o.name}</p>${o.colors&&o.colors.length>0?ya`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:He(this.effectiveLang(),o.colors)})}">${o.colors.map(i=>ya`<span class="swatch" style="${`background:${bo(i)}`}" title="${i}"></span>`)}</div>`:Td}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?ya`<div class="detail" part="detail">${this.openedRow}</div>`:Td}</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:Zn(this.effectiveLang(),e.month)}):this.t("Crystals")}};fa.styles=[u,ch`.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([mh({type:String,reflect:!0})],fa.prototype,"heading",2),fa=m([ph("roxy-crystal-grid")],fa);import{css as hh,html as Xe,nothing as et}from"lit";import{customElement as gh,property as uh,state as yh}from"lit/decorators.js";function Ad(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function Ai(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 zi(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 zd(n,r){return or(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,r)}function vo(n,r){let e=r.startDate?k(n,r.startDate):"",t=r.endDate?k(n,r.endDate):"";return e&&e===t?`${H(n,r.startDate)} to ${H(n,r.endDate)}`:e&&t?`${e} to ${t}`:e||t}var _r=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=xh(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 Xe`<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?ot({items:l,active:c,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):et}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:et}">${c==="timeline"?Xe`${this.period==="current"?this.renderCurrent(e):et} ${t.length>0?Xe`<div class="timeline" part="chart timeline" role="list">${t.map(p=>this.renderBar(p,a,s,e.houseThemes))}</div>`:et}`:et} ${c==="readings"?this.renderReadings(o):et} ${c==="frame"?this.renderFrame(i):et}</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?Xe`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?Xe`<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>`:et}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",`${zi(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 Xe`<dl class="frame" part="details frame">${e.map(([t,a])=>Xe`<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=Ai(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ad(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=Ai(e);if(!t)return et;let a=t.period,s=vo(this.effectiveLang(),a),o=a.nominalStartDate?k(this.effectiveLang(),a.nominalStartDate):"";return Xe`<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"?` (${fh(this.effectiveLang(),a.durationYears)})`:""})} ${o?Xe`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:o})}`:et}</p>`}readings(e,t){let a=[],s=Ai(e);if(s?.period.interpretation&&a.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:vo(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=zi(p);a.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:d?this.t("{{balance}} left",{balance:d}):vo(this.effectiveLang(),c),body:c.interpretation})}}let o=t.find(i=>this.isCurrent(i));return o?.interpretation&&a.push({label:`${o.planet} ${Ad(e)}`,aside:vo(this.effectiveLang(),o),body:o.interpretation}),a}renderCurrent(e){if(!("mahadasha"in e))return et;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 Xe`<div class="current" part="details current">${t.map(([a,s,o])=>{if(!s)return et;let i=zi(o),l=zd(s.significators,e.houseThemes);return Xe`<div><span>${this.t(a)}</span> <strong>${s.planet}</strong> ${i?Xe`<small>${this.t("{{balance}} left",{balance:i})}</small>`:et} ${l?Xe`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:et}</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=zd(e.significators,s),h=["bar",l?"now":"",a==="time"?"fine":""].filter(Boolean).join(" ");return Xe`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?Xe`<span class="now-badge">${this.t("Now")}</span>`:et} </span><span class="${p}"><span class="bar-fill" style="width:${i}%"></span> ${c>=0?Xe`<span class="bar-progress" style="left:${c*i}%" aria-hidden="true"></span>`:et} </span><span class="dates">${e.startDate?hr(this.effectiveLang(),e.startDate,a):""} ${e.endDate?Xe`- ${hr(this.effectiveLang(),e.endDate,a)}`:""} </span>${d?Xe`<span class="houses">${this.t("Signifies {{houses}}",{houses:d})}</span>`:et}</div>`}};_r.styles=[u,M,F,Ue,hh`.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([uh({type:String,reflect:!0})],_r.prototype,"period",2),m([yh()],_r.prototype,"view",2),_r=m([gh("roxy-dasha-timeline")],_r);var Mi=365.25;function fh(n,r){if(r>=1)return`${f(n,r,1)} years`;let e=r*Mi;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 xh(n){return n>=2?"year":n>=60/Mi?"month":n>=1/Mi?"day":"time"}import{css as vh,html as Z,nothing as xr}from"lit";import{customElement as Lh,property as $h}from"lit/decorators.js";import{ifDefined as Md}from"lit/directives/if-defined.js";import{css as bh}from"lit";var Nr=bh`@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 Ed=["title","name","label","heading","overview","summary"],wh=80,kh=80,Sh=3,Rh=["imageUrl","image","icon","symbol"],Ch=["imageUrl","image"],Dh=["affirmation","mantra","motto","quote"],Th=new Set(["seed"]),Ah=new Set(["id","slug","key"]),zh=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),Mh=8,Pd=1,Eh=12,Ph=n=>n.toLowerCase().replace(/[_-]/g,""),_d=n=>/^(has|is)([A-Z_]|$)/.test(n),_h=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,Nh=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,Ih=/^https?:\/\//,Gh=6;function Oh(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 xa(n){return n===null||["string","number","boolean"].includes(typeof n)}function Ei(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(xa))}function Nd(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(Nd)}var ba=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=Gh?Z`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:Z`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?xr:xa(e)?Z`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?Z`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(xa)?this.renderChips(e):e.every(a=>a!==null&&typeof a=="object"&&!Array.isArray(a))?this.renderObjectArray(e):Z`<ol>${e.map(a=>Z`<li>${this.renderValue(a)}</li>`)}</ol>`}renderChips(e){return Z`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>Z`<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(x=>typeof x[h]=="string"&&Array.from(x[h]).length>kh))),o=new Set(a.filter(h=>s.has(h)||t.some(x=>Ei(x[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>Sh,p=t.length>Eh;return Z`<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?xr:"0"}">${c?Z`${p?Z`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:xr} ${t.map(h=>Z`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:Z`<table class="${s.size?"roxy-table stacked prose":o.size?"roxy-table stacked":"roxy-table"}" role="table">${p?Z`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:xr}<thead><tr>${a.map(h=>Z`<th class="${l(h)}">${fe(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>Z`<tr>${a.map(x=>Z`<td class="${l(x)}" data-label="${fe(this.effectiveLang(),x)}">${this.renderCell(h[x],x)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=Qa(e),a=Ed.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let o=Ph(s);return Th.has(o)||a&&Ah.has(o)?!1:!zh.has(o)}))}renderObject(e){let t=this.suppress(e),a=Ed.find(d=>typeof t[d]=="string"&&t[d].length<=wh),s=Rh.find(d=>typeof t[d]=="string"&&t[d].startsWith("http")),o=a!=="summary"&&typeof t.summary=="string"?"summary":null,i=Dh.find(d=>typeof t[d]=="string"),l=Object.entries(t).filter(([d,h])=>d!==a&&d!==o&&d!==i&&!Ch.includes(d)&&!Nd(h)),c=l.filter(([,d])=>!Ei(d)),p=l.filter(([,d])=>Ei(d));return Z`${s?Z`<img class="roxy-image" src="${String(t[s])}" alt="${a?String(t[a]):this.t("illustration")}" loading="lazy">`:xr} ${a?Z`<h3 class="roxy-title" part="header">${t[a]}</h3>`:xr} ${o?Z`<p class="roxy-summary">${t[o]}</p>`:xr} ${i?Z`<blockquote class="roxy-quote">${t[i]}</blockquote>`:xr} ${c.length>0?Z`<dl class="roxy-rows" part="details label-track">${c.map(([d,h])=>Z`<dt>${fe(this.effectiveLang(),d)}</dt><dd>${this.renderField(h,d)}</dd>`)}</dl>`:xr} ${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=fe(this.effectiveLang(),e);return a>Mh||this.depth>=Pd?Z`<details class="roxy-section" ?open="${this.depth<Pd}"><summary>${o}</summary>${s}</details>`:Z`<div class="roxy-section"><h4>${o}</h4>${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&_d(t)?Z`<span class="roxy-badge">${this.t("Yes")}</span>`:xa(e)?Z`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(xa)?this.renderChips(e):Z`<roxy-data bare lang="${Md(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&_d(t)?Z`<span class="roxy-badge">${this.t("Yes")}</span>`:xa(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(xa)?e.filter(a=>a!==null).map(a=>this.formatScalar(a)).join(", "):Z`<roxy-data bare lang="${Md(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return typeof e=="string"&&Ih.test(e)?Z`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&Oh(t,e)?String(e):f(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):_h.test(e)?H(this.effectiveLang(),e):Nh.test(e)?w(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)}};ba.styles=[u,vh`.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}`,Nr],m([$h({attribute:!1})],ba.prototype,"depth",2),ba=m([Lh("roxy-data")],ba);import{css as ig,html as xs,nothing as Ii}from"lit";import{customElement as lg,property as dg}from"lit/decorators.js";import{html as Ln,nothing as lt,svg as Re}from"lit";var jt=400,se=20,it=jt-2*se,_e=jt/2,Id=Object.fromEntries(we.map(n=>[n.toLowerCase(),n])),Bh=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],Bd="ʳ",Fd="ᶜ",Hd="ʷ";function Pi(n){return we.indexOf(n)}function Fh(n){let r=Ul(n.graha)??n.graha,e=`${n.isRetrograde?Bd:""}${n.combust?Fd:""}${n.war?Hd:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${r}${e}`;let{degree:t}=Tt(n.longitude);return`${r} ${t}°${e}`}function Hh(n,r,e){let t=[A(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=Tt(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 _i(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 Re`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${Fh(i)}<title>${Hh(i,r,s)}</title></text>`})}function $o(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 we)l[d.toLowerCase()]=[];let c=t?Id[t.toLowerCase()]??"":"",p=c;for(let[d,h]of Object.entries(n??{})){let x=(h?.rashi??"").toLowerCase();if(d==="Lagna"||h?.graha==="Lagna"){c||(p=Id[x]??"");continue}if(!x||!(x in l))continue;let v=h.graha??d,b=v.toLowerCase();l[x]?.push({graha:v,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:o.has(b)||void 0,war:i.get(b)})}return{lagnaSign:p,placements:l,divisionLabel:e}}var va=it/4,jh={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 Kh(n){let r=jh[n]??{col:0,row:0};return{x:se+r.col*va,y:se+r.row*va,w:va,h:va}}function Vh(n){let r=se,e=se+va,t=se+2*va,a=se+3*va,s=jt-se;return Re`
17
17
  <rect class="line" x=${r} y=${r} width=${it} height=${it} 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 @@ var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e
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?Re`<text class="centre-label" x=${_e} y=${_e} text-anchor="middle" dominant-baseline="central">${n}</text>`:lt}
27
- `}function Ni(n,r){let e=Pi(r),t=Pi(n);return e===-1||t===-1?0:(t-e+12)%12+1}function Vh(n,r,e,t,a){let s=jh(n),o=s.x+s.w/2,i=s.y+s.h/2,l=eo(n)??n,c=14;return Re`
27
+ `}function Ni(n,r){let e=Pi(r),t=Pi(n);return e===-1||t===-1?0:(t-e+12)%12+1}function qh(n,r,e,t,a){let s=Kh(n),o=s.x+s.w/2,i=s.y+s.h/2,l=eo(n)??n,c=14;return Re`
28
28
  <g class=${e?"cell lagna":"cell"}>
29
29
  ${e?Re`
30
30
  <rect class="lagna-bg" x=${s.x} y=${s.y} width=${s.w} height=${s.h} />
@@ -35,25 +35,25 @@ var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e
35
35
  ${e?Re`<text class="lagna-marker" x=${o} y=${s.y+26} text-anchor="middle" dominant-baseline="central">${a("ASC")}</text>`:lt}
36
36
  ${r.length?_i(r,n,o,i+4,14,a):lt}
37
37
  </g>
38
- `}function Id(n,r){let e=n.lagnaSign.toLowerCase();return Re`
39
- ${Kh(n.divisionLabel)}
40
- ${we.map(t=>Vh(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ni(t,n.lagnaSign),r))}
41
- `}var Hd={tl:{x:se,y:se},tr:{x:jt-se,y:se},br:{x:jt-se,y:jt-se},bl:{x:se,y:jt-se},top:{x:_e,y:se},right:{x:jt-se,y:_e},bottom:{x:_e,y:jt-se},left:{x:se,y:_e},tlMid:{x:_e-it/4,y:_e-it/4},trMid:{x:_e+it/4,y:_e-it/4},brMid:{x:_e+it/4,y:_e+it/4},blMid:{x:_e-it/4,y:_e+it/4}};function jd(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 qh=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:_e,y:_e}:Hd[t]);return[n,{centre:jd(e),floor:Math.max(...e.map(t=>t.y))}]})),Gd=12,Yh=16,Uh=8;function Zh(n){let{tl:r,tr:e,br:t,bl:a,top:s,right:o,bottom:i,left:l}=Hd;return Re`
38
+ `}function Gd(n,r){let e=n.lagnaSign.toLowerCase();return Re`
39
+ ${Vh(n.divisionLabel)}
40
+ ${we.map(t=>qh(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ni(t,n.lagnaSign),r))}
41
+ `}var jd={tl:{x:se,y:se},tr:{x:jt-se,y:se},br:{x:jt-se,y:jt-se},bl:{x:se,y:jt-se},top:{x:_e,y:se},right:{x:jt-se,y:_e},bottom:{x:_e,y:jt-se},left:{x:se,y:_e},tlMid:{x:_e-it/4,y:_e-it/4},trMid:{x:_e+it/4,y:_e-it/4},brMid:{x:_e+it/4,y:_e+it/4},blMid:{x:_e-it/4,y:_e+it/4}};function Kd(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 Yh=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:_e,y:_e}:jd[t]);return[n,{centre:Kd(e),floor:Math.max(...e.map(t=>t.y))}]})),Od=12,Uh=16,Zh=8;function Wh(n){let{tl:r,tr:e,br:t,bl:a,top:s,right:o,bottom:i,left:l}=jd;return Re`
42
42
  <rect class="line" x=${r.x} y=${r.y} width=${it} height=${it} 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?Re`<text class="centre-label" x=${_e} y=${_e} text-anchor="middle" dominant-baseline="central">${n}</text>`:lt}
47
- `}function Wh(n,r,e,t,a,s){let o=qh[n];if(!o)return Re``;let i=o.centre,l=Math.min(14,Math.abs(i.y-_e)*.45+6),c=(t.length-1)*Gd,p=Math.max(i.y+8-c/2,i.y-l+Yh),d=Math.max(0,p+c-(o.floor-Uh)),h=i.y-l-d,x=p-d+c/2,v=a?`${r} · ${eo(e)??e}`:`${r}`;return Re`
47
+ `}function Xh(n,r,e,t,a,s){let o=Yh[n];if(!o)return Re``;let i=o.centre,l=Math.min(14,Math.abs(i.y-_e)*.45+6),c=(t.length-1)*Od,p=Math.max(i.y+8-c/2,i.y-l+Uh),d=Math.max(0,p+c-(o.floor-Zh)),h=i.y-l-d,x=p-d+c/2,v=a?`${r} · ${eo(e)??e}`:`${r}`;return Re`
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">${v}</text>
50
50
  ${a?Re`<text class="lagna-marker" x=${i.x} y=${h-12} text-anchor="middle" dominant-baseline="central">${s("ASC")}</text>`:lt}
51
- ${t.length?_i(t,e,i.x,x,Gd,s):lt}
51
+ ${t.length?_i(t,e,i.x,x,Od,s):lt}
52
52
  </g>
53
- `}function Xh(n,r){return Re`
54
- ${Zh(n.divisionLabel)}
55
- ${we.map((e,t)=>{let a=Ni(e,n.lagnaSign);return Wh(a,t+1,e,n.placements[e.toLowerCase()]??[],a===1,r)})}
56
- `}var Lo=it/3;function Jh(){let n=se,r=se+Lo,e=se+2*Lo,t=jt-se,S={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}]},N={};for(let[ee,Ye]of Object.entries(S))N[ee]={points:[...Ye],centroid:jd(Ye)};return N}var Qh=Jh();function eg(n){let r=se,e=se+Lo,t=se+2*Lo,a=jt-se;return Re`
53
+ `}function Jh(n,r){return Re`
54
+ ${Wh(n.divisionLabel)}
55
+ ${we.map((e,t)=>{let a=Ni(e,n.lagnaSign);return Xh(a,t+1,e,n.placements[e.toLowerCase()]??[],a===1,r)})}
56
+ `}var Lo=it/3;function Qh(){let n=se,r=se+Lo,e=se+2*Lo,t=jt-se,S={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}]},N={};for(let[ee,Ye]of Object.entries(S))N[ee]={points:[...Ye],centroid:Kd(Ye)};return N}var eg=Qh();function tg(n){let r=se,e=se+Lo,t=se+2*Lo,a=jt-se;return Re`
57
57
  <rect class="line" x=${r} y=${r} width=${it} height=${it} 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 @@ var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e
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?Re`<text class="centre-label" x=${_e} y=${_e} text-anchor="middle" dominant-baseline="central">${n}</text>`:lt}
71
- `}function tg(n,r,e,t,a){let s=Qh[n];if(!s)return Re``;let{centroid:o,points:i}=s,l=eo(n)??n,c=i.map(p=>`${p.x},${p.y}`).join(" ");return Re`
71
+ `}function rg(n,r,e,t,a){let s=eg[n];if(!s)return Re``;let{centroid:o,points:i}=s,l=eo(n)??n,c=i.map(p=>`${p.x},${p.y}`).join(" ");return Re`
72
72
  <g class=${e?"cell lagna":"cell"}>
73
73
  ${e?Re`<polygon class="lagna-bg" points=${c} />`:lt}
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 @@ var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e
76
76
  ${e?Re`<text class="lagna-marker" x=${o.x} y=${o.y-30} text-anchor="middle" dominant-baseline="central">${a("ASC")}</text>`:lt}
77
77
  ${r.length?_i(r,n,o.x,o.y+4,12,a):lt}
78
78
  </g>
79
- `}function rg(n,r){let e=n.lagnaSign.toLowerCase();return Re`
80
- ${eg(n.divisionLabel)}
81
- ${we.map(t=>tg(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ni(t,n.lagnaSign),r))}
82
- `}function Kd(n){return Pi(n.lagnaSign)!==-1}function ag(n,r){let e=Object.values(n.placements).flat(),t=[];return e.some(a=>a.isRetrograde)&&t.push(`${Od} ${r("retrograde")}`),e.some(a=>a.combust)&&t.push(`${Bd} ${r("combust")}`),e.some(a=>a.war)&&t.push(`${Fd} ${r("planetary war")}`),t.length===0?lt:Ln`<p class="roxy-frame">${t.join(" · ")}</p>`}function sg(n){return Ln`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function wo(n,r){let e=[];Kd(n)||e.push(sg(r));let t=ag(n,r);return t!==lt&&e.push(t),e}function ko(n,r,e){if(r==="north"&&!Kd(n))return Id(n,e);switch(r){case"north":return Xh(n,e);case"east":return rg(n,e);default:return Id(n,e)}}function So(n,r,e){return ot({items:Oh.map(({id:t,source:a})=>({id:t,label:e(a)})),active:n,onSelect:r,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function Vd(n,r,e,t){return Ln`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${B()}</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])=>Ln`<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"?Ln`<span>${Ze(s.longitude)}</span><small>${f(e,s.longitude,12)}°</small>`:lt}</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>`}import{css as ng}from"lit";var Ro=ng`.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 dg={number:9,name:"Navamsa"},qd=n=>"division"in n&&n.division?n.division:dg,La=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=qd(this.data),t=`D${e.number} ${e.name}`;return $o(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=qd(e),{vargottama:s}=e;return xs`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${a.number} ${a.name} ${yi(a.name,a.sanskritName)?xs`<span class="division-meta">· ${a.sanskritName}</span>`:Ii}</h2>${a.significance?xs`<p class="significance">${a.significance}</p>`:Ii} ${U(this.effectiveLang(),e.frame,this.translator)} ${wo(t,this.translator)}</div>${So(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(xs`<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>${ko(t,this.chartStyle,this.translator)}</svg>`,`D${a.number} ${a.name}`,this.translator)}</div>${Vd(e.chart.meta,a.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?xs`<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=>xs`<span class="vargottama-pill" role="listitem">${L(o)??""} ${o}</span>`)}</div>`:Ii}</div>`}};La.styles=[u,Ne,I,Ro,M,Ue,og`.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([lg({type:String,reflect:!0,attribute:"chart-style"})],La.prototype,"chartStyle",2),La=m([ig("roxy-divisional-chart")],La);import{css as cg,html as Kt,nothing as $a}from"lit";import{customElement as pg,property as mg}from"lit/decorators.js";var hg={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},wa=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,a=hg[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 Kt`<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>${U(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Kt`<p class="subtype"><span class="subtype-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:$a} ${e.severity?Kt`<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>`:$a} ${e.description&&!this.hideReadings?Kt`<p class="description">${e.description}</p>`:$a} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Kt`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(c=>Kt`<li>${c}</li>`)}</ul></div>`:$a} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Kt`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(c=>Kt`<li>${c}</li>`)}</ul></div>`:$a}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return $a;let t=[];for(let[a,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Kt`<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(Kt`<div><h3>${o}</h3><p>${i}</p></div>`);return t.length===0?$a:Kt`<div class="effects" part="section effects">${t}</div>`}};wa.styles=[u,I,cg`.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([mg({type:String,reflect:!0})],wa.prototype,"type",2),wa=m([pg("roxy-dosha-card")],wa);import{css as yg,html as Ce,nothing as dt}from"lit";import{customElement as fg}from"lit/decorators.js";var gg=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function $n(n){if(!n.text)return"";let r=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=r;e&&(t=r?gg.test(e.trim())?`${r}.${e}`:`${r}, ${e}`:e);let a=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[w(n.text),t].filter(Boolean).join(" "),a,n.basis].filter(Boolean).join(" · ")}import{css as ug}from"lit";var Ir=ug`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var xg=["vata","pitta","kapha"],bg={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function vg(n){return n.split("-").map(A).join("-")}function Lg(n,r){return He(n,(r??"").split(" ").filter(Boolean).map(A))}var bs=class extends g{renderData(r){let e=this.effectiveLang(),t=r.composite;return Ce`<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?Ce`<span class="type">${vg(t.type)}</span>`:dt}</header>${this.renderBar(e,r)}<div class="facts" part="details">${t?.dominant?Ce`<span><span class="lbl">${this.t("Dominant")}</span><b>${A(t.dominant)}</b></span>`:dt} ${t?.secondary?Ce`<span><span class="lbl">${this.t("Secondary")}</span><b>${A(t.secondary)}</b></span>`:dt} ${r.lagnaSign?Ce`<span><span class="lbl">${this.t("Lagna")}</span><b>${A(r.lagnaSign)}</b></span>`:dt} ${r.moonSign?Ce`<span><span class="lbl">${this.t("Moon sign")}</span><b>${A(r.moonSign)}</b></span>`:dt}</div>${this.renderFactors(e,r.factors)} ${this.renderRanking(e,r.strengthRanking)} ${this.renderPlanetDoshas(r.planetDoshas)} ${r.summary&&!this.hideReadings?Ce`<p class="summary" part="section readings">${r.summary}</p>`:dt} ${U(e,r.frame,this.translator)} ${r.meta?.disclaimer?Ce`<p class="disclaimer" part="disclaimer">${r.meta.disclaimer}</p>`:dt}</article>`}renderBar(r,e){let t=e.composite,a=xg.map(o=>({humour:o,value:t?.[o]??0}));return a.reduce((o,i)=>o+i.value,0)<=0?dt:Ce`<div part="chart"><div class="bar" role="img" aria-label="${a.map(o=>`${A(o.humour)} ${ve(r,o.value,0)}`).join(", ")}">${a.filter(o=>o.value>0).map(o=>Ce`<div class="${`seg seg-${o.humour}`}" style="${`flex: ${o.value} 0 0`}"></div>`)}</div><p class="shares">${a.map(o=>Ce`<span><span class="${`swatch seg-${o.humour}`}"></span>${A(o.humour)} <b>${ve(r,o.value,0)}</b></span>`)}</p></div>`}renderFactors(r,e){let t=e??[];return t.length===0?dt:Ce`<section part="section factors"><h3 class="block-title">${this.t("Factors")}</h3><ul class="rows">${t.map(a=>Ce`<li class="row" part="label-track"><span class="row-name">${this.factorLabel(a.id)}</span><div><span>${Lg(r,a.input)}</span> ${a.doshas?.length?Ce`· ${a.doshas.map(s=>A(s)).join(", ")}`:dt} ${typeof a.weight=="number"?Ce`· <span class="lbl">${this.t("Weight")}</span>${f(r,a.weight,2)}`:dt} ${this.renderCitation(a.source)}</div></li>`)}</ul></section>`}factorLabel(r){let e=bg[r??""];return e?this.t(e):w(r??"")}renderCitation(r){let e=$n(r??{});return e?Ce`<div class="cite"><p><span class="lbl">${this.t("Source")}</span>${e}</p>${r?.note?Ce`<details class="note"><summary>${this.t("Note on the source")}${B()}</summary><p>${r.note}</p></details>`:dt}</div>`:dt}renderRanking(r,e){let t=e??[];return t.length===0?dt:Ce`<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=>Ce`<tr class="${a.strong?"is-strong":""}"><td class="num">${z(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?dt:Ce`<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=>Ce`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(a=>A(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=$n(a??{});s&&e.add(s)}return e.size===0?dt:Ce`<p class="cite"><span class="lbl">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};bs.styles=[u,I,M,Ir,yg`.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}`],bs=m([fg("roxy-dosha-constitution")],bs);import{css as $g,html as Co,nothing as Gi}from"lit";import{customElement as wg}from"lit/decorators.js";var vs=class extends g{renderData(r){return Co`<article class="card" part="card" aria-label="${r.name??this.t("Dream symbol")}"><header class="head" part="header">${r.letter?Co`<span class="letter" aria-hidden="true">${r.letter}</span>`:Gi}<div><p class="label">${this.t("Dream symbol")}</p>${r.name?Co`<h2 class="name">${r.name}</h2>`:Gi}</div></header>${r.meaning?Co`<p class="meaning">${r.meaning}</p>`:Gi}</article>`}};vs.styles=[u,$g`.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}`],vs=m([wg("roxy-dream-card")],vs);import{css as kg,html as Do,nothing as Yd}from"lit";import{customElement as Sg}from"lit/decorators.js";var Ls=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 Do`<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=>Do`<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?Do`<span class="letter" aria-hidden="true">${s.letter}</span>`:Yd} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Do`<div class="detail" part="detail">${this.openedRow}</div>`:Yd}</section>`}};Ls.styles=[u,kg`.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}`],Ls=m([Sg("roxy-dream-search")],Ls);import{css as Gg,html as W,nothing as tt}from"lit";import{customElement as Og,property as Vt,state as lr}from"lit/decorators.js";import{ifDefined as dr}from"lit/directives/if-defined.js";import{live as Bg}from"lit/directives/live.js";var wn={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 Ud={"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}}},Zd={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var zt=(n,r)=>`${n}.${r}`;function Ao(n){let r=/^(.+)\.(\d+)$/.exec(n);return r?{key:r[1],index:Number(r[2])}:null}function zo(n,r=ci,e=t=>wn[t]??w(t)){let t=Ao(n);return t?r("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):r(w(n))}function Xd(n,r,e){let t=zt(r,0);return n.filter(a=>a.group===t).map(a=>({...a,key:`${zt(r,e)}.${a.name}`,group:zt(r,e)}))}function Bi(n){return n.length<=(Mo(n)?30:12)?"tiles":"select"}function Mo(n){return n.every(r=>r.length<=2)}var Rg=["latitude","longitude","timezone"],Wd=["latitude","longitude"];function Cg(n){let r=n.match(/^(.+?)(Latitude|Longitude)$/);return r?{group:r[1],leaf:r[2].toLowerCase()}:null}var Dg=we.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 Jd(n){let r=n.anyOf??n.oneOf;return!r||r.length===0?n:r.find(e=>Array.isArray(e.enum))??r.find(e=>Oi(e)&&Oi(e)!=="null")??r[0]??n}function Oi(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 Tg(n){let r=Jd(n),e=Oi(r);return Array.isArray(r.enum)?Bi(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 Qd(n){if(n.length!==12)return!1;let r=new Set(n.map(e=>e.toLowerCase()));return Dg.every(e=>r.has(e))}function To(n,r,e){let t=Jd(r);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Tg(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 ec(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 x=ka(h,r)??{},v=x.type==="array"?ka(x.items,r):void 0;if(v?.type==="object"&&v.properties){let b=Math.max(1,x.minItems??1),S=new Set(v.required??[]);s.push({key:d,min:b,max:x.maxItems??b});for(let N=0;N<b;N++)for(let[ee,Ye]of Object.entries(v.properties)){let Sr=ka(Ye,r)??{};a.push(To(ee,Sr,{key:`${zt(d,N)}.${ee}`,group:zt(d,N),required:p.has(d)&&S.has(ee)}))}}else if(x.type==="object"&&x.properties){let b=new Set(x.required??[]);for(let[S,N]of Object.entries(x.properties)){let ee=ka(N,r)??{};ee.type==="array"&&ka(ee.items,r)?.type==="object"||a.push(To(S,ee,{key:`${d}.${S}`,group:d,required:p.has(d)&&b.has(S)}))}}else{let b=Cg(d),S=To(b?.leaf??d,x,{key:d,group:b?.group,required:p.has(d)});b&&(S.label=`${w(b.group)} ${b.leaf}`),a.push(S)}}}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=To(p.name,d,{key:p.name,required:!!p.required,inQuery:p.in==="query"});if(p.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(wn[h.name]??w(h.name))){let x=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(p.description??h.description??"")?.[1]?.trim();x&&(h.label=x)}a.push(h)}return Fi({title:Ag(n.summary,e),fields:a,hasLang:o,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function Fi(n,r,e){let t=`${r.toUpperCase()} /${e.replace(/^\//,"")}`,a=Ud[t]??{},s=Zd[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:zo(d)}),l=i.filter(d=>Wd.every(h=>o.some(x=>x.group===d.key&&x.name===h)));for(let[d,h]of l.entries()){let x=o.filter(b=>b.group===h.key),v=x.find(b=>b.name==="timezone")??(d===0?o.find(b=>!b.group&&b.name==="timezone"):void 0);h.location={fields:[...x.filter(b=>Wd.includes(b.name)).map(b=>b.key),...v?[v.key]:[]],required:x.some(b=>Rg.includes(b.name)&&b.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:zg(n,r)}}function Ag(n,r){let e=n?.split(" - ")[0]?.trim();return e||w(r.split("/").pop()??"")}function zg(n,r){return r.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function tc(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 rc(n,r){let e=r.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function Mg(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 Hi(n,r="id"){let e=Mg(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 ac(n){let r=n?.total;return typeof r=="number"?r:void 0}import{css as Pg,html as $s,nothing as ji}from"lit";import{ifDefined as Ki}from"lit/directives/if-defined.js";import{css as Eg}from"lit";var Eo=Eg`.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 Po(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 _g=10,Ng=10,Vi=new Map;function sc(n,r,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&r?{lang:r}:{},...e}}function Yi(n,r,e,t){let a=JSON.stringify([n.submitUrl??n.baseUrl,r.path,e,t]),s=Vi.get(a);return s||(s=Ig(n,r,e,t).catch(o=>{throw Vi.delete(a),o}),Vi.set(a,s)),s}async function Ig(n,r,e,t){let a=[];for(let s=0;s<Ng;s++){let o=await Wa(n,{path:r.path,method:"GET",query:sc(r,t,a.length?{offset:a.length}:{})}),i=Hi(o,e);a.push(...i);let l=ac(o);if(!r.limit||l===void 0||a.length>=l||!i.length)break}return a}var qi=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),_o=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=Po(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 Yi(e,this.source,this.field,t);if(r!==this.query)return;let s=qi(r.trim());this.show(a.filter(o=>qi(o.label).includes(s)||qi(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 Wa(e,{path:this.source.path,method:"GET",query:sc({...this.source,limit:_g},t,{[a]:r})},s.signal);if(s.signal.aborted)return;this.show(Hi(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 nc(n,r,e,t={}){let a=`${r}-listbox`;return $s`<div class="picker"><input id="${r}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${a}" aria-autocomplete="list" aria-labelledby="${Ki(t.labelledby)}" aria-describedby="${Ki(t.describedby)}" aria-invalid="${Ki(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?$s`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:ji} ${n.open?$s`<ul id="${a}" class="results" role="listbox">${n.options.length===0?$s`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,o)=>$s`<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>`:ji}</div>${n.error?$s`<small class="field-error" role="alert">${n.error}</small>`:ji}`}var oc=[Eo,Pg`.picker{position:relative}`];var Ui="0.53.0";var ic="https://roxyapi.com/api/v2/openapi.json",Fg=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${Ui}/dist/schemas`,Zi=new Map,No=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},Io=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function Hg(n){let r=Zi.get(n);return r||(r=fetch(n).then(async e=>{if(!e.ok)throw new No(e.status);return await e.json()}).catch(e=>{throw Zi.delete(n),e}),Zi.set(n,r)),r}function jg(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var lc=n=>/\bbirth/i.test(n?.description??""),dc=n=>n.key===`${n.group}.${n.name}`;function Kg(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 ie=class extends Rr{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||ic,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof No?this.t("HTTP error {{status}}",{status:e.status}):e instanceof Io?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(ic)}async modelFromSpec(e){let t=await Hg(e),a=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[a]?.[this.method.toLowerCase()];if(!s)throw new Io(this.method,a);return ec(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Fg}/${rc(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Fi(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&&dc(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&&hi(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(),!hi(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 _o(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"},Yi(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&&Ua(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=>W`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?W`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:tt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return tt;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 W`<div part="validation-error" class="validation-error" role="alert">${e.map(a=>W`<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)&&!Mo(t)?"select":this.choices[e.key]?Bi(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(tc(this.endpoint,this.fields))}requestLang(){return Bn(this)}fieldText(e,t){return t||fe(this.requestLang(),e,wn[e])}optionText(e,t){return j(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=jg()),i===void 0||i==="")continue;o.kind==="array"&&typeof i=="string"&&(i=Kg(i));let l=o.group?Ao(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&&dc(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?W`<span class="req" aria-hidden="true">*</span>`:tt}description(e){if(!e.description)return tt;if(e.description.length<=120)return W`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return W`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${B()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,a=!!e.enum&&Qd(e.enum),s=this.choicesOf(e),o=Mo(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 W`<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?P(c.value):void 0;return W`<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?W`<span class="tile-glyph" aria-hidden="true">${h}</span>`:tt} <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 W`<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="${dr(this.issueFor(e)?"true":void 0)}" aria-describedby="${dr(this.issueFor(e)?`${t}-error`:void 0)}" .value="${Bg(this.values[e.key]??"")}" @change="${a=>this.chooseOption(e,a.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(a=>W`<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 W`<div part="field" class="field">${s?tt:W`<label for="${a}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${nc(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 W`<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 W`<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="${dr(this.issueFor(e)?"true":void 0)}" aria-describedby="${dr(this.issueFor(e)?`${t}-error`:void 0)}" min="${dr(e.min)}" max="${dr(e.max)}" step="${e.kind==="number"?"any":tt}" placeholder="${s||tt}" .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"?W`<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 zo(e,(t,a)=>this.t(t,a),t=>this.fieldText(t))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Ao(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),a=Xd(this.fields,e,t),s=this.groups.find(i=>i.key===zt(e,0));if(s){let i=l=>l.replace(`${zt(e,0)}.`,`${zt(e,t)}.`);this.groups=[...this.groups,{...s,key:zt(e,t),label:zo(zt(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=zt(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?tt:W`<div class="repeat-controls">${t<e.max?W`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:tt} ${t>e.min?W`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:tt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):lc(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return W`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?W`<span class="req" aria-hidden="true">*</span>`:tt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return W`<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)}):lc(this.placeField(e))?this.t("City of birth"):void 0;return W`<roxy-location-search endpoint="${dr(this.locationUrl||void 0)}" publishable-key="${dr(this.publishableKey)}" lang="${dr(this.effectiveLang())}" placeholder="${dr(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 W`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):tt}<div class="fields">${t.map(a=>this.renderField(a))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return W`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return W`<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 W`<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 W`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?W`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:tt} ${this.renderIssueSummary()}<div class="fields">${s.map(p=>this.renderField(p))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):tt} ${i.map(p=>this.groupCard(p))} ${this.repeats.map(p=>this.repeatControls(p))} ${c?W`<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")}${B()}</summary><div class="fields">${o.map(p=>this.renderField(p))}</div>${l.map(p=>this.groupCard(p))}</details>`:tt} ${this.selfSubmits?tt:W`<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}}};ie.styles=[u,M,oc,Gg`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([Vt({type:String,attribute:"data-endpoint"})],ie.prototype,"endpoint",2),m([Vt({type:String})],ie.prototype,"method",2),m([Vt({type:String,attribute:"spec-url"})],ie.prototype,"specUrl",2),m([Vt({type:String,attribute:"submit-label"})],ie.prototype,"submitLabel",2),m([Vt({type:String,attribute:"publishable-key"})],ie.prototype,"publishableKey",2),m([Vt({type:String,attribute:"location-url"})],ie.prototype,"locationUrl",2),m([Vt({attribute:!1})],ie.prototype,"initialValues",2),m([Vt({attribute:!1})],ie.prototype,"serverIssues",2),m([Vt({attribute:!1})],ie.prototype,"apiRoute",2),m([Vt({attribute:!1})],ie.prototype,"autoload",2),m([Vt({attribute:!1})],ie.prototype,"fullPages",2),m([lr()],ie.prototype,"choices",2),m([lr()],ie.prototype,"clearedIssues",2),m([lr()],ie.prototype,"fields",2),m([lr()],ie.prototype,"repeats",2),m([lr()],ie.prototype,"formTitle",2),m([lr()],ie.prototype,"hasLang",2),m([lr()],ie.prototype,"values",2),m([lr()],ie.prototype,"loaded",2),m([lr()],ie.prototype,"specError",2),m([lr()],ie.prototype,"validationErrors",2),ie=m([Og("roxy-endpoint-form")],ie);import{css as Vg,html as je,nothing as kn}from"lit";import{customElement as qg,property as Yg}from"lit/decorators.js";var Ug="12:00 UTC",Sa=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 je`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2><p class="month"><span>${Ja(a,t.year,t.month)}</span><span class="basis">${Ug}</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?kn:je`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>je`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=L(e.name);return je`<div class="track" role="listitem"><span class="body-name">${t?je`<span class="glyph" aria-hidden="true">${t}</span>`:kn}${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?je`<span class="chips">${e.ingresses.map(a=>this.renderIngressChip(a))} ${e.retrogrades.map(a=>this.renderRetrogradeChip(a))}</span>`:kn}</div>`}renderPosition(e){let{degree:t,minute:a}=bi(e.degreeInSign),s=P(e.sign),o=y(e,"sign");return je`<span class="pos" title="${o}">${t}${s?je`<span class="sg" aria-hidden="true">${s}</span>`:je`<span class="sg">${o}</span>`}${String(a).padStart(2,"0")}</span>`}renderIngressChip(e){let t=P(e.sign),a=ta(this.effectiveLang(),e.date);return je`<span class="chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:a})}"><span aria-hidden="true">→</span>${t?je`<span aria-hidden="true">${t}</span>`:kn}${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 je`<span class="chip chip--retro"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:o})}</span>`}renderGrid(e){let t=this.effectiveLang();return je`<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=L(a.name);return je`<th scope="col" title="${a.label}">${s?je`<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=>je`<tr><th scope="row" class="day">${jl(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 je`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(a)?"ingress":"",t?.stationDates.has(a)?"station":""].filter(Boolean).join(" ");return je`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?je`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:kn}</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=[],x=new Set,v=new Set;for(let b=0;b<l.length;b++){let S=l[b],N=l[b-1];if(!S||(N&&S.p.sign!==N.p.sign&&(d.push({date:S.date,sign:S.p.sign,signLabel:y(S.p,"sign")}),x.add(S.date)),N&&S.p.isRetrograde!==N.p.isRetrograde&&v.add(S.date),!S.p.isRetrograde))continue;let ee=h[h.length-1];ee&&N?.p.isRetrograde?ee.end=S.date:h.push({start:S.date,end:S.date})}s.push({name:i,label:y(p.p,"planet"),first:c.p,last:p.p,ingresses:d,retrogrades:h,ingressDates:x,stationDates:v})}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 we){let o=t.get(s.toLowerCase()),i=P(s);o&&i&&a.push({sign:s,label:o,glyph:i})}return a}};Sa.styles=[u,Vg`: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([Yg({type:String})],Sa.prototype,"heading",2),Sa=m([qg("roxy-ephemeris-table")],Sa);import{css as Zg,html as qt,nothing as Sn}from"lit";import{customElement as Wg}from"lit/decorators.js";var ws=class extends g{renderData(r){let e=r.conjunctions??[],t=r.stars??[];return qt`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Fixed stars")}</h2>${typeof r.orb=="number"?qt`<span class="badge"><b>${this.t("Orb")}</b> ${f(this.effectiveLang(),r.orb,1)}°</span>`:Sn}</header>${r.summary&&!this.hideReadings?qt`<p class="summary">${r.summary}</p>`:Sn} ${e.length?qt`<section part="section conjunctions"><p class="subhead">${this.t("Conjunctions to the chart")}</p>${e.map((a,s)=>qt`<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> ${B()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:f(this.effectiveLang(),a.orb,2)})}</small></span></summary>${a.interpretation&&!this.hideReadings?qt`<div class="interp-body"><p>${a.interpretation}</p></div>`:Sn}</details>`)}</section>`:qt`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):Sn}</div>`}renderCatalog(r){return qt`<details class="catalog"><summary>${B()} ${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=P(e.sign);return qt`<tr><td>${e.name}</td><td>${t?qt`<span class="sg">${t}</span>`:Sn}${Bt(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=>qt`<span>${a}</span>`)}</div></td></tr>`})}</tbody></table></div></details>`}};ws.styles=[u,M,F,Zg`.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}`],ws=m([Wg("roxy-fixed-stars")],ws);import{css as Jg,html as te,nothing as le}from"lit";import{customElement as Qg,property as eu}from"lit/decorators.js";var Go=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as Xg}from"lit";var Oo=Xg`.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 Bo={forward:"Forward",reverse:"Backward"};function Ra(n){return"mountainCenterStar"in n}var Ca=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),a=this.mode!=="annual"&&Ra(e);return te`<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?te`<span class="period">${this.t("Period {{n}}",{n:z(t,e.period??0)})}</span>`:le:te`<span class="period">${e.year??""}</span>`}</header>${Ra(e)?a?this.renderNatalFacts(e,t):le:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${Go.map(s=>this.renderPalace(e,s))}</div>${a?te`<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>`:le} ${a&&Ra(e)?this.renderStructure(e):le} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return te`<div class="facts" part="details">${e.facing?te`<span><span class="lbl">${this.t("Facing")}</span> <b>${j(t,"facing",e.facing.label??"")}</b></span>`:le} ${e.sitting?te`<span><span class="lbl">${this.t("Sitting")}</span> <b>${j(t,"facing",e.sitting.label??"")}</b></span>`:le} ${typeof e.facingDegrees=="number"?te`<span>${z(t,e.facingDegrees)}°</span>`:le} ${e.mountainFlight?te`<span><span class="lbl">${this.t("Mountain star")}</span> ${Bo[e.mountainFlight]?this.t(Bo[e.mountainFlight]):e.mountainFlight}</span>`:le} ${e.waterFlight?te`<span><span class="lbl">${this.t("Water star")}</span> ${Bo[e.waterFlight]?this.t(Bo[e.waterFlight]):e.waterFlight}</span>`:le} ${e.straddling?te`<span><b>${this.t("Straddling")}</b></span>`:le}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?le:te`<div class="facts" part="details">${typeof e.centerStar=="number"?te`<span><span class="lbl">${this.t("Center")}</span> <b>${z(t,e.centerStar)}</b></span>`:le} ${e.changeoverDate?te`<span>${k(t,e.changeoverDate)}</span>`:le}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):j(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 te`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(i&&Ra(e)){let p=o;return te`<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?te`<span class="combo">${y(p.combination,"name")}</span>`:le}</div>`}let c=o;return te`<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?te`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?te`<p class="structure" part="reading">${t.meaning}</p>`:le}</section>`:le}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return le;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?le:te`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body">${p.combination?te`<span>${y(p.combination,"name")}</span>`:le} ${p.reading&&!this.hideReadings?te`<p part="reading">${p.reading}</p>`:le}</div></li>`}let c=i;return te`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?te`<span>${c.element}</span>`:le}<dl class="star-facts">${c.nature?te`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:le} ${c.enhancer?te`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:le} ${c.remedy?te`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:le}</dl>${c.meaning&&!this.hideReadings?te`<p part="reading">${c.meaning}</p>`:le}</div></li>`});return o.every(i=>i===le)?le:te`<section part="section palaces"><ul class="rows">${o}</ul></section>`}};Ca.styles=[u,Oo,Ir,Jg`.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([eu({type:String,reflect:!0})],Ca.prototype,"mode",2),Ca=m([Qg("roxy-flying-star-chart")],Ca);import{css as tu,html as Gr,nothing as cc}from"lit";import{customElement as ru}from"lit/decorators.js";var ks=class extends g{renderData(r){let e=r.windows??[];if(e.length===0)return this.renderEmpty();let t=Ct(this.effectiveLang(),r.startDate,r.endDate);return Gr`<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?Gr`<p class="subtitle">${t}</p>`:cc}</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 Gr`<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?Gr`<div class="domains" part="legend">${a.map(([s,o])=>Gr`<span class="domain-chip"><span class="swatch sw-${s}"></span>${w(s)} ${o}</span>`)}</div>`:cc} ${e.length>0?Gr`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:Gr`<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?w(r.type??""):r.description;return Gr`<div class="event" part="label-track" role="listitem"><span class="event-date">${k(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>`}};ks.styles=[u,tu`.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}`],ks=m([ru("roxy-forecast-digest")],ks);import{css as au,html as St,nothing as Rn}from"lit";import{customElement as su}from"lit/decorators.js";var nu={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},ou=["western","vedic","biorhythm"],Ss=class extends g{renderData(r){let e=r.events??[],t=this.groupByDate(e),a=ou.filter(s=>e.some(o=>o.domain===s));return St`<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?St`<div class="range">${Ct(this.effectiveLang(),r.startDate,r.endDate)} · ${this.t("{{count}} events",{count:r.count??e.length})}</div>`:Rn}</header>${a.length?St`<div class="legend" part="legend">${a.map(s=>St`<span><span class="swatch swatch-${s}"></span>${nu[s]}</span>`)}</div>`:Rn} ${t.length?St`<div class="days" part="section events" role="list">${t.map(([s,o])=>this.renderDay(s,o))}</div>`:St`<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 St`<div class="day" role="listitem"><div class="day-date">${k(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 St`<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?St`<p class="event-desc">${r.description}</p>`:Rn}<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?w(r.body):"",t=r.target?w(r.target):"",a=yt({type:r.aspect}),s=Gt[a]??"",o=a?as(r.aspect)??Ae({type:r.aspect}):"",i=typeof r.orb=="number"?f(this.effectiveLang(),r.orb,1):"",l=this.typeQualifier(r);return a&&t?St`<strong>${e}</strong> <span class="${s}">${o}</span> <strong>${t}</strong>${i?St`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:Rn}`:St`<strong>${e||w(r.type??"")}</strong>${l?St`<span class="kind">${l}</span>`:Rn}`}typeQualifier(r){return r.type==="sign-ingress"&&r.target?`enters ${w(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 ${w(r.target)}`:w(r.type??"")}};Ss.styles=[u,au`.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}`],Ss=m([su("roxy-forecast-timeline")],Ss);import{css as iu,html as J,nothing as De}from"lit";import{customElement as lu}from"lit/decorators.js";import{ifDefined as du}from"lit/directives/if-defined.js";var Rs=class extends g{renderData(r){let e=this.effectiveLang(),t=r.chosen,a=r.input?.text??r.input?.textHebrew??"";return J`<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?J`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:De} ${this.chosenForm(r)?.romanization?J`<span class="roman">${this.chosenForm(r)?.romanization}</span>`:De} ${t?.rule?J`<p class="rule">${t.rule}</p>`:De}</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?De:J`<section part="section letters"><h3 class="block-title">${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(a=>J`<div class="${`letter${a.isFinal?" is-final":""}`}" dir="ltr" title="${du(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">${z(r,a.value)}</span></div>`)}</div>${t.some(a=>a.isFinal)?J`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:De}</section>`}renderValues(r,e,t){let a=(e??[]).filter(o=>typeof o.value=="number");if(a.length===0)return De;let s=a.some(o=>(o.alternateValues??[]).length>0);return J`<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?J`<th>${this.t("Also published")}</th>`:De}</tr></thead><tbody>${a.map(o=>J`<tr><td>${w(o.id??"")}</td><td class="num">${z(r,o.value)}</td>${s?J`<td class="num">${(o.alternateValues??[]).map(i=>z(r,i)).join(", ")}</td>`:De}</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?De:J`<p class="provenance"><span class="lbl">${this.t("Tradition")}</span> ${[...e].map(([t,a],s)=>J`${s>0?" · ":""}${w(t)}${a?J`<a class="src" href="${a}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:De}`)}</p>`}renderForms(r,e){let t=e.hebrewForms??[];return t.length<2?De:J`<section part="section spellings"><h3 class="block-title">${this.t("Spellings")}</h3><ul class="forms">${t.map(a=>J`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${a.hebrew??""}</span> ${a.hebrew===e.chosen?.hebrew?J`<span class="chosen">${this.t("Chosen")}</span>`:De}</div><span class="roman">${a.romanization??""}</span> ${a.rule?J`<p class="rule">${a.rule}</p>`:De} ${this.renderFormTotals(r,a)}</li>`)}</ul></section>`}renderFormTotals(r,e){let t=(e.values??[]).find(a=>typeof a.value=="number");return t?J`<p class="rule"><span class="lbl">${w(t.id??"")}</span> ${z(r,t.value)}</p>`:De}renderTransformations(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<tr><td>${w(a.id??"")}</td><td>${a.output?J`<span lang="he" dir="rtl">${a.output}</span>`:De} ${a.outputRomanization?J`<span class="roman">${a.outputRomanization}</span>`:De}</td><td class="num">${z(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<tr><td data-label="${this.t("Cipher")}">${w(a.id??"")} ${a.lineage?J`<p class="lineage">${a.lineage}</p>`:De}</td><td class="num" data-label="${this.t("Value")}">${z(r,a.value)}</td><td data-label="${this.t("Tradition")}">${w(a.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<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?J`<p class="match-note" part="reading">${a.note}</p>`:De}</td><td class="num" data-label="${this.t("Value")}">${z(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([fe(e,a),j(e,a,s)])}return t.length===0?De:J`<p class="provenance">${t.map(([a,s],o)=>J`${o>0?" · ":""}<span class="lbl">${a}</span>${s}`)}</p>`}};Rs.styles=[u,Nr,iu`.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}`],Rs=m([lu("roxy-gematria")],Rs);import{css as cu,html as Yt,nothing as Da}from"lit";import{customElement as pu}from"lit/decorators.js";var pc=8,Cs=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 Yt`<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:H(this.effectiveLang(),r.transitDatetime),birth:H(this.effectiveLang(),r.birthDatetime)})}</p>${a?Yt`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:a})}</p>`:Da} ${U(this.effectiveLang(),r.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?Yt`<section class="key" part="section key-transits"><h3 class="key-title">${this.t("Key transits")}</h3>${t.map(s=>Yt`<p class="key-item">${s.description}</p>`)}</section>`:Da}</div>`}renderPlanet(r){let e=L(r.name)??"",t=typeof r.longitude=="number"?Ot(r.longitude):void 0;return Yt`<article class="row"><div class="row-top"><span class="graha">${e?Yt`<span class="glyph">${e}</span>`:Da}${r.name} </span><span class="pos">${t?`${r.sign} ${t}`:r.sign} </span>${typeof r.houseFromMoon=="number"?Yt`<span class="house moon">${this.t("house {{n}} from the Moon",{n:r.houseFromMoon})}</span>`:Da} ${typeof r.natalHouse=="number"?Yt`<span class="house lagna">${this.t("house {{n}} from the Lagna",{n:r.natalHouse})}</span>`:Da}</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?Yt`<p class="aspects"><span class="contact-label">${r}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Ae({type:t.aspectType}),planet:t.natalPlanet,orb:f(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Ae({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:Da}renderKaksha(r){if(!r||typeof r.number!="number")return Da;let e=r.number,t=r.bindu===!0?"yes":r.bindu===!1?"no":"",a=pc,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 Yt`<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:pc},(i,l)=>Yt`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${o?`${s} · ${o}`:s}</p>`}};Cs.styles=[u,I,cu`.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}`],Cs=m([pu("roxy-gochara-table")],Cs);import{css as mu,html as cr,nothing as Ds}from"lit";import{customElement as hu}from"lit/decorators.js";var gu={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},Ts=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 cr`<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"?cr`<small style="margin-left:.5rem;color:var(--roxy-muted)">${ve(this.effectiveLang(),r.percentage,1)}</small>`:Ds}</div><div class="verdict-wrap">${typeof r.isCompatible=="boolean"?cr`<span class="verdict ${r.isCompatible?"yes":"no"}">${r.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:Ds} ${r.recommendation&&!this.hideReadings?cr`<span class="recommendation">${r.recommendation}</span>`:Ds}</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?cr`<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??uu(p.category),x=h?d/h*100:0;return cr`<tr><td>${p.category} ${p.description?cr`<small>${p.description}</small>`:Ds}</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:${x}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${f(this.effectiveLang(),d,1)} / ${h}</td></tr>`})}</tbody></table></div>`:Ds} ${(r.doshas?.length??0)>0||(r.doshaCancellations?.length??0)>0?cr`<div class="tags" part="details">${r.doshas?.map(p=>cr`<span class="dosha">${p}</span>`)} ${r.doshaCancellations?.map(p=>cr`<span class="cancel" title="${p.reason}">${this.t("{{dosha}} cancelled",{dosha:p.dosha})}</span>`)}</div>`:Ds} ${U(this.effectiveLang(),r.frame,this.translator)}</article>`}};Ts.styles=[u,I,Nr,mu`.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)}`],Ts=m([hu("roxy-guna-milan")],Ts);function uu(n){return n&&gu[n.toLowerCase()]||1}import{css as yu,html as Ut,nothing as Or}from"lit";import{customElement as fu}from"lit/decorators.js";var As=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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,x]of i){let v=[x.left&&"A",x.right&&"B"].filter(Boolean).join(" + ");d.set(h,[`Gate ${h}`,p.get(h),v].filter(Boolean).join(" · "))}return Ut`<svg class="chart" part="chart" viewBox="${mo}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${ho({definedCenters:l,gateSources:i,gateTitles:d,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${a?Or:Ut`<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 Ut`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?Ut`<span class="count">${e.totalChannels} channels</span>`:Or}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,a,t),a,this.translator)} ${fr([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?w(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:o.length>0?`${i}/${o.length}`:void 0}])} ${this.hideReadings?Or:Ut`<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 Or;let t=[{label:"Electromagnetic",aside:Fo(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:Fo(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:Fo(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:Fo(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?Or:Ut`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Or:Ut`<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 Ut`<div class="row"><span class="cname">${t.name??w(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${xu(!!t.defined,s,o)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Or;let a=new Map(t.map(o=>[String(o.id??""),o.name??""])),s=o=>a.get(o)||w(o);return Ut`<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=>Ut`<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?Ut`<span class="dyn">${o.dynamic}</span>`:Or}</td><td class="held">${mc(o.personAGates)}</td><td class="held">${mc(o.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};As.styles=[u,M,F,Pr,go,Ne,yu`.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}`],As=m([fu("roxy-hd-connection")],As);function Fo(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function mc(n){let r=n??[];return r.length>0?r.join(", "):"Neither"}function xu(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"}import{css as Su,html as ct,nothing as Zt}from"lit";import{customElement as Ru}from"lit/decorators.js";import{nothing as bu,svg as Dn}from"lit";var Xi=360,vu=470,Ji=8,uc=Xi-Ji*2,jo=48,Cn=15,Wi=7,hc=16,Ho=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],yc=`0 0 ${Xi} ${vu}`;function Lu(n,r){return Ji+uc*(n*2+1)/(r*2)}function fc(n){return bn[n.gateA]==="throat"||bn[n.gateB]==="throat"}function $u(n){return(fc(n)?bn[n.gateA]==="throat":bn[n.gateA]==="g")?n.gateA:n.gateB}function wu(){return Ho.map(n=>Dn`<g>
83
- <rect class="pn-bar" x=${Ji} y=${n.y} width=${uc} height=${jo} rx="10" />
84
- <text class="pn-bar-label" x=${Xi/2} y=${n.y+jo/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
- </g>`)}function ku(n,r,e,t){return e.map((a,s)=>Dn`<g>
86
- <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*hc} cy=${r} r=${Wi} />
87
- <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*hc} y=${r} text-anchor="middle" dominant-baseline="central">${t(a)}</text>
88
- </g>`)}function gc(n,r,e,t,a,s){let o=t.length>0;return Dn`<g>
79
+ `}function ag(n,r){let e=n.lagnaSign.toLowerCase();return Re`
80
+ ${tg(n.divisionLabel)}
81
+ ${we.map(t=>rg(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ni(t,n.lagnaSign),r))}
82
+ `}function Vd(n){return Pi(n.lagnaSign)!==-1}function sg(n,r){let e=Object.values(n.placements).flat(),t=[];return e.some(a=>a.isRetrograde)&&t.push(`${Bd} ${r("retrograde")}`),e.some(a=>a.combust)&&t.push(`${Fd} ${r("combust")}`),e.some(a=>a.war)&&t.push(`${Hd} ${r("planetary war")}`),t.length===0?lt:Ln`<p class="roxy-frame">${t.join(" · ")}</p>`}function ng(n){return Ln`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function wo(n,r){let e=[];Vd(n)||e.push(ng(r));let t=sg(n,r);return t!==lt&&e.push(t),e}function ko(n,r,e){if(r==="north"&&!Vd(n))return Gd(n,e);switch(r){case"north":return Jh(n,e);case"east":return ag(n,e);default:return Gd(n,e)}}function So(n,r,e){return ot({items:Bh.map(({id:t,source:a})=>({id:t,label:e(a)})),active:n,onSelect:r,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function qd(n,r,e,t){return Ln`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${B()}</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])=>Ln`<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"?Ln`<span>${Ze(s.longitude)}</span><small>${f(e,s.longitude,12)}°</small>`:lt}</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>`}import{css as og}from"lit";var Ro=og`.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 cg={number:9,name:"Navamsa"},Yd=n=>"division"in n&&n.division?n.division:cg,La=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=Yd(this.data),t=`D${e.number} ${e.name}`;return $o(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let a=Yd(e),{vargottama:s}=e;return xs`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${a.number} ${a.name} ${yi(a.name,a.sanskritName)?xs`<span class="division-meta">· ${a.sanskritName}</span>`:Ii}</h2>${a.significance?xs`<p class="significance">${a.significance}</p>`:Ii} ${U(this.effectiveLang(),e.frame,this.translator)} ${wo(t,this.translator)}</div>${So(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(xs`<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>${ko(t,this.chartStyle,this.translator)}</svg>`,`D${a.number} ${a.name}`,this.translator)}</div>${qd(e.chart.meta,a.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?xs`<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=>xs`<span class="vargottama-pill" role="listitem">${L(o)??""} ${o}</span>`)}</div>`:Ii}</div>`}};La.styles=[u,Ne,I,Ro,M,Ue,ig`.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([dg({type:String,reflect:!0,attribute:"chart-style"})],La.prototype,"chartStyle",2),La=m([lg("roxy-divisional-chart")],La);import{css as pg,html as Kt,nothing as $a}from"lit";import{customElement as mg,property as hg}from"lit/decorators.js";var gg={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},wa=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,a=gg[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 Kt`<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>${U(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Kt`<p class="subtype"><span class="subtype-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:$a} ${e.severity?Kt`<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>`:$a} ${e.description&&!this.hideReadings?Kt`<p class="description">${e.description}</p>`:$a} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Kt`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(c=>Kt`<li>${c}</li>`)}</ul></div>`:$a} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Kt`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(c=>Kt`<li>${c}</li>`)}</ul></div>`:$a}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return $a;let t=[];for(let[a,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Kt`<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(Kt`<div><h3>${o}</h3><p>${i}</p></div>`);return t.length===0?$a:Kt`<div class="effects" part="section effects">${t}</div>`}};wa.styles=[u,I,pg`.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([hg({type:String,reflect:!0})],wa.prototype,"type",2),wa=m([mg("roxy-dosha-card")],wa);import{css as fg,html as Ce,nothing as dt}from"lit";import{customElement as xg}from"lit/decorators.js";var ug=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function $n(n){if(!n.text)return"";let r=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=r;e&&(t=r?ug.test(e.trim())?`${r}.${e}`:`${r}, ${e}`:e);let a=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[w(n.text),t].filter(Boolean).join(" "),a,n.basis].filter(Boolean).join(" · ")}import{css as yg}from"lit";var Ir=yg`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var bg=["vata","pitta","kapha"],vg={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function Lg(n){return n.split("-").map(A).join("-")}function $g(n,r){return He(n,(r??"").split(" ").filter(Boolean).map(A))}var bs=class extends g{renderData(r){let e=this.effectiveLang(),t=r.composite;return Ce`<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?Ce`<span class="type">${Lg(t.type)}</span>`:dt}</header>${this.renderBar(e,r)}<div class="facts" part="details">${t?.dominant?Ce`<span><span class="lbl">${this.t("Dominant")}</span><b>${A(t.dominant)}</b></span>`:dt} ${t?.secondary?Ce`<span><span class="lbl">${this.t("Secondary")}</span><b>${A(t.secondary)}</b></span>`:dt} ${r.lagnaSign?Ce`<span><span class="lbl">${this.t("Lagna")}</span><b>${A(r.lagnaSign)}</b></span>`:dt} ${r.moonSign?Ce`<span><span class="lbl">${this.t("Moon sign")}</span><b>${A(r.moonSign)}</b></span>`:dt}</div>${this.renderFactors(e,r.factors)} ${this.renderRanking(e,r.strengthRanking)} ${this.renderPlanetDoshas(r.planetDoshas)} ${r.summary&&!this.hideReadings?Ce`<p class="summary" part="section readings">${r.summary}</p>`:dt} ${U(e,r.frame,this.translator)} ${r.meta?.disclaimer?Ce`<p class="disclaimer" part="disclaimer">${r.meta.disclaimer}</p>`:dt}</article>`}renderBar(r,e){let t=e.composite,a=bg.map(o=>({humour:o,value:t?.[o]??0}));return a.reduce((o,i)=>o+i.value,0)<=0?dt:Ce`<div part="chart"><div class="bar" role="img" aria-label="${a.map(o=>`${A(o.humour)} ${ve(r,o.value,0)}`).join(", ")}">${a.filter(o=>o.value>0).map(o=>Ce`<div class="${`seg seg-${o.humour}`}" style="${`flex: ${o.value} 0 0`}"></div>`)}</div><p class="shares">${a.map(o=>Ce`<span><span class="${`swatch seg-${o.humour}`}"></span>${A(o.humour)} <b>${ve(r,o.value,0)}</b></span>`)}</p></div>`}renderFactors(r,e){let t=e??[];return t.length===0?dt:Ce`<section part="section factors"><h3 class="block-title">${this.t("Factors")}</h3><ul class="rows">${t.map(a=>Ce`<li class="row" part="label-track"><span class="row-name">${this.factorLabel(a.id)}</span><div><span>${$g(r,a.input)}</span> ${a.doshas?.length?Ce`· ${a.doshas.map(s=>A(s)).join(", ")}`:dt} ${typeof a.weight=="number"?Ce`· <span class="lbl">${this.t("Weight")}</span>${f(r,a.weight,2)}`:dt} ${this.renderCitation(a.source)}</div></li>`)}</ul></section>`}factorLabel(r){let e=vg[r??""];return e?this.t(e):w(r??"")}renderCitation(r){let e=$n(r??{});return e?Ce`<div class="cite"><p><span class="lbl">${this.t("Source")}</span>${e}</p>${r?.note?Ce`<details class="note"><summary>${this.t("Note on the source")}${B()}</summary><p>${r.note}</p></details>`:dt}</div>`:dt}renderRanking(r,e){let t=e??[];return t.length===0?dt:Ce`<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=>Ce`<tr class="${a.strong?"is-strong":""}"><td class="num">${z(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?dt:Ce`<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=>Ce`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(a=>A(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=$n(a??{});s&&e.add(s)}return e.size===0?dt:Ce`<p class="cite"><span class="lbl">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};bs.styles=[u,I,M,Ir,fg`.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}`],bs=m([xg("roxy-dosha-constitution")],bs);import{css as wg,html as Co,nothing as Gi}from"lit";import{customElement as kg}from"lit/decorators.js";var vs=class extends g{renderData(r){return Co`<article class="card" part="card" aria-label="${r.name??this.t("Dream symbol")}"><header class="head" part="header">${r.letter?Co`<span class="letter" aria-hidden="true">${r.letter}</span>`:Gi}<div><p class="label">${this.t("Dream symbol")}</p>${r.name?Co`<h2 class="name">${r.name}</h2>`:Gi}</div></header>${r.meaning?Co`<p class="meaning">${r.meaning}</p>`:Gi}</article>`}};vs.styles=[u,wg`.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}`],vs=m([kg("roxy-dream-card")],vs);import{css as Sg,html as Do,nothing as Ud}from"lit";import{customElement as Rg}from"lit/decorators.js";var Ls=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 Do`<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=>Do`<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?Do`<span class="letter" aria-hidden="true">${s.letter}</span>`:Ud} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Do`<div class="detail" part="detail">${this.openedRow}</div>`:Ud}</section>`}};Ls.styles=[u,Sg`.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}`],Ls=m([Rg("roxy-dream-search")],Ls);import{css as Og,html as W,nothing as tt}from"lit";import{customElement as Bg,property as Vt,state as lr}from"lit/decorators.js";import{ifDefined as dr}from"lit/directives/if-defined.js";import{live as Fg}from"lit/directives/live.js";var wn={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 Zd={"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}}},Wd={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var zt=(n,r)=>`${n}.${r}`;function Ao(n){let r=/^(.+)\.(\d+)$/.exec(n);return r?{key:r[1],index:Number(r[2])}:null}function zo(n,r=ci,e=t=>wn[t]??w(t)){let t=Ao(n);return t?r("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):r(w(n))}function Jd(n,r,e){let t=zt(r,0);return n.filter(a=>a.group===t).map(a=>({...a,key:`${zt(r,e)}.${a.name}`,group:zt(r,e)}))}function Fi(n){return n.length<=(Mo(n)?30:12)?"tiles":"select"}function Mo(n){return n.every(r=>r.length<=2)}var Cg=["latitude","longitude","timezone"],Xd=["latitude","longitude"];function Dg(n){let r=n.match(/^(.+?)(Latitude|Longitude)$/);return r?{group:r[1],leaf:r[2].toLowerCase()}:null}var Tg=we.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 Qd(n){let r=n.anyOf??n.oneOf;return!r||r.length===0?n:r.find(e=>Array.isArray(e.enum))??r.find(e=>Bi(e)&&Bi(e)!=="null")??r[0]??n}function Bi(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 Ag(n){let r=Qd(n),e=Bi(r);return Array.isArray(r.enum)?Fi(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 ec(n){if(n.length!==12)return!1;let r=new Set(n.map(e=>e.toLowerCase()));return Tg.every(e=>r.has(e))}function To(n,r,e){let t=Qd(r);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Ag(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 Oi(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function tc(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=Oi(l);for(let[d,h]of Object.entries(l.properties)){let x=ka(h,r)??{},v=x.type==="array"?ka(x.items,r):void 0;if(v?.type==="object"&&v.properties){let b=Math.max(1,x.minItems??1),S=Oi(v);s.push({key:d,min:b,max:x.maxItems??b});for(let N=0;N<b;N++)for(let[ee,Ye]of Object.entries(v.properties)){let Sr=ka(Ye,r)??{};a.push(To(ee,Sr,{key:`${zt(d,N)}.${ee}`,group:zt(d,N),required:p.has(d)&&S.has(ee)}))}}else if(x.type==="object"&&x.properties){let b=Oi(x);for(let[S,N]of Object.entries(x.properties)){let ee=ka(N,r)??{};ee.type==="array"&&ka(ee.items,r)?.type==="object"||a.push(To(S,ee,{key:`${d}.${S}`,group:d,required:p.has(d)&&b.has(S)}))}}else{let b=Dg(d),S=To(b?.leaf??d,x,{key:d,group:b?.group,required:p.has(d)});b&&(S.label=`${w(b.group)} ${b.leaf}`),a.push(S)}}}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=To(p.name,d,{key:p.name,required:!!p.required,inQuery:p.in==="query"});if(p.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(wn[h.name]??w(h.name))){let x=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(p.description??h.description??"")?.[1]?.trim();x&&(h.label=x)}a.push(h)}return Hi({title:zg(n.summary,e),fields:a,hasLang:o,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function Hi(n,r,e){let t=`${r.toUpperCase()} /${e.replace(/^\//,"")}`,a=Zd[t]??{},s=Wd[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:zo(d)}),l=i.filter(d=>Xd.every(h=>o.some(x=>x.group===d.key&&x.name===h)));for(let[d,h]of l.entries()){let x=o.filter(b=>b.group===h.key),v=x.find(b=>b.name==="timezone")??(d===0?o.find(b=>!b.group&&b.name==="timezone"):void 0);h.location={fields:[...x.filter(b=>Xd.includes(b.name)).map(b=>b.key),...v?[v.key]:[]],required:x.some(b=>Cg.includes(b.name)&&b.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:Mg(n,r)}}function zg(n,r){let e=n?.split(" - ")[0]?.trim();return e||w(r.split("/").pop()??"")}function Mg(n,r){return r.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function rc(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 ac(n,r){let e=r.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function Eg(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 ji(n,r="id"){let e=Eg(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 sc(n){let r=n?.total;return typeof r=="number"?r:void 0}import{css as _g,html as $s,nothing as Ki}from"lit";import{ifDefined as Vi}from"lit/directives/if-defined.js";import{css as Pg}from"lit";var Eo=Pg`.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 Po(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 Ng=10,Ig=10,qi=new Map;function nc(n,r,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&r?{lang:r}:{},...e}}function Ui(n,r,e,t){let a=JSON.stringify([n.submitUrl??n.baseUrl,r.path,e,t]),s=qi.get(a);return s||(s=Gg(n,r,e,t).catch(o=>{throw qi.delete(a),o}),qi.set(a,s)),s}async function Gg(n,r,e,t){let a=[];for(let s=0;s<Ig;s++){let o=await Wa(n,{path:r.path,method:"GET",query:nc(r,t,a.length?{offset:a.length}:{})}),i=ji(o,e);a.push(...i);let l=sc(o);if(!r.limit||l===void 0||a.length>=l||!i.length)break}return a}var Yi=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),_o=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=Po(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 Ui(e,this.source,this.field,t);if(r!==this.query)return;let s=Yi(r.trim());this.show(a.filter(o=>Yi(o.label).includes(s)||Yi(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 Wa(e,{path:this.source.path,method:"GET",query:nc({...this.source,limit:Ng},t,{[a]:r})},s.signal);if(s.signal.aborted)return;this.show(ji(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 oc(n,r,e,t={}){let a=`${r}-listbox`;return $s`<div class="picker"><input id="${r}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${a}" aria-autocomplete="list" aria-labelledby="${Vi(t.labelledby)}" aria-describedby="${Vi(t.describedby)}" aria-invalid="${Vi(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?$s`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Ki} ${n.open?$s`<ul id="${a}" class="results" role="listbox">${n.options.length===0?$s`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,o)=>$s`<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>`:Ki}</div>${n.error?$s`<small class="field-error" role="alert">${n.error}</small>`:Ki}`}var ic=[Eo,_g`.picker{position:relative}`];var Zi="0.53.1";var lc="https://roxyapi.com/api/v2/openapi.json",Hg=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${Zi}/dist/schemas`,Wi=new Map,No=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},Io=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function jg(n){let r=Wi.get(n);return r||(r=fetch(n).then(async e=>{if(!e.ok)throw new No(e.status);return await e.json()}).catch(e=>{throw Wi.delete(n),e}),Wi.set(n,r)),r}function Kg(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var dc=n=>/\bbirth/i.test(n?.description??""),cc=n=>n.key===`${n.group}.${n.name}`;function Vg(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 ie=class extends Rr{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||lc,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof No?this.t("HTTP error {{status}}",{status:e.status}):e instanceof Io?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(lc)}async modelFromSpec(e){let t=await jg(e),a=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[a]?.[this.method.toLowerCase()];if(!s)throw new Io(this.method,a);return tc(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Hg}/${ac(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Hi(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&&cc(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&&hi(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(),!hi(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 _o(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"},Ui(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&&Ua(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=>W`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?W`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:tt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return tt;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 W`<div part="validation-error" class="validation-error" role="alert">${e.map(a=>W`<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)&&!Mo(t)?"select":this.choices[e.key]?Fi(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(rc(this.endpoint,this.fields))}requestLang(){return Bn(this)}fieldText(e,t){return t||fe(this.requestLang(),e,wn[e])}optionText(e,t){return j(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=Kg()),i===void 0||i==="")continue;o.kind==="array"&&typeof i=="string"&&(i=Vg(i));let l=o.group?Ao(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&&cc(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?W`<span class="req" aria-hidden="true">*</span>`:tt}description(e){if(!e.description)return tt;if(e.description.length<=120)return W`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return W`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${B()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,a=!!e.enum&&ec(e.enum),s=this.choicesOf(e),o=Mo(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 W`<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?P(c.value):void 0;return W`<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?W`<span class="tile-glyph" aria-hidden="true">${h}</span>`:tt} <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 W`<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="${dr(this.issueFor(e)?"true":void 0)}" aria-describedby="${dr(this.issueFor(e)?`${t}-error`:void 0)}" .value="${Fg(this.values[e.key]??"")}" @change="${a=>this.chooseOption(e,a.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(a=>W`<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 W`<div part="field" class="field">${s?tt:W`<label for="${a}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${oc(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 W`<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 W`<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="${dr(this.issueFor(e)?"true":void 0)}" aria-describedby="${dr(this.issueFor(e)?`${t}-error`:void 0)}" min="${dr(e.min)}" max="${dr(e.max)}" step="${e.kind==="number"?"any":tt}" placeholder="${s||tt}" .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"?W`<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 zo(e,(t,a)=>this.t(t,a),t=>this.fieldText(t))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Ao(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),a=Jd(this.fields,e,t),s=this.groups.find(i=>i.key===zt(e,0));if(s){let i=l=>l.replace(`${zt(e,0)}.`,`${zt(e,t)}.`);this.groups=[...this.groups,{...s,key:zt(e,t),label:zo(zt(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=zt(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?tt:W`<div class="repeat-controls">${t<e.max?W`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:tt} ${t>e.min?W`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:tt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):dc(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return W`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?W`<span class="req" aria-hidden="true">*</span>`:tt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return W`<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)}):dc(this.placeField(e))?this.t("City of birth"):void 0;return W`<roxy-location-search endpoint="${dr(this.locationUrl||void 0)}" publishable-key="${dr(this.publishableKey)}" lang="${dr(this.effectiveLang())}" placeholder="${dr(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 W`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):tt}<div class="fields">${t.map(a=>this.renderField(a))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return W`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return W`<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 W`<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 W`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?W`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:tt} ${this.renderIssueSummary()}<div class="fields">${s.map(p=>this.renderField(p))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):tt} ${i.map(p=>this.groupCard(p))} ${this.repeats.map(p=>this.repeatControls(p))} ${c?W`<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")}${B()}</summary><div class="fields">${o.map(p=>this.renderField(p))}</div>${l.map(p=>this.groupCard(p))}</details>`:tt} ${this.selfSubmits?tt:W`<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}}};ie.styles=[u,M,ic,Og`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([Vt({type:String,attribute:"data-endpoint"})],ie.prototype,"endpoint",2),m([Vt({type:String})],ie.prototype,"method",2),m([Vt({type:String,attribute:"spec-url"})],ie.prototype,"specUrl",2),m([Vt({type:String,attribute:"submit-label"})],ie.prototype,"submitLabel",2),m([Vt({type:String,attribute:"publishable-key"})],ie.prototype,"publishableKey",2),m([Vt({type:String,attribute:"location-url"})],ie.prototype,"locationUrl",2),m([Vt({attribute:!1})],ie.prototype,"initialValues",2),m([Vt({attribute:!1})],ie.prototype,"serverIssues",2),m([Vt({attribute:!1})],ie.prototype,"apiRoute",2),m([Vt({attribute:!1})],ie.prototype,"autoload",2),m([Vt({attribute:!1})],ie.prototype,"fullPages",2),m([lr()],ie.prototype,"choices",2),m([lr()],ie.prototype,"clearedIssues",2),m([lr()],ie.prototype,"fields",2),m([lr()],ie.prototype,"repeats",2),m([lr()],ie.prototype,"formTitle",2),m([lr()],ie.prototype,"hasLang",2),m([lr()],ie.prototype,"values",2),m([lr()],ie.prototype,"loaded",2),m([lr()],ie.prototype,"specError",2),m([lr()],ie.prototype,"validationErrors",2),ie=m([Bg("roxy-endpoint-form")],ie);import{css as qg,html as je,nothing as kn}from"lit";import{customElement as Yg,property as Ug}from"lit/decorators.js";var Zg="12:00 UTC",Sa=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 je`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2><p class="month"><span>${Ja(a,t.year,t.month)}</span><span class="basis">${Zg}</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?kn:je`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>je`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=L(e.name);return je`<div class="track" role="listitem"><span class="body-name">${t?je`<span class="glyph" aria-hidden="true">${t}</span>`:kn}${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?je`<span class="chips">${e.ingresses.map(a=>this.renderIngressChip(a))} ${e.retrogrades.map(a=>this.renderRetrogradeChip(a))}</span>`:kn}</div>`}renderPosition(e){let{degree:t,minute:a}=bi(e.degreeInSign),s=P(e.sign),o=y(e,"sign");return je`<span class="pos" title="${o}">${t}${s?je`<span class="sg" aria-hidden="true">${s}</span>`:je`<span class="sg">${o}</span>`}${String(a).padStart(2,"0")}</span>`}renderIngressChip(e){let t=P(e.sign),a=ta(this.effectiveLang(),e.date);return je`<span class="chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:a})}"><span aria-hidden="true">→</span>${t?je`<span aria-hidden="true">${t}</span>`:kn}${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 je`<span class="chip chip--retro"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:o})}</span>`}renderGrid(e){let t=this.effectiveLang();return je`<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=L(a.name);return je`<th scope="col" title="${a.label}">${s?je`<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=>je`<tr><th scope="row" class="day">${Kl(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 je`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(a)?"ingress":"",t?.stationDates.has(a)?"station":""].filter(Boolean).join(" ");return je`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?je`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:kn}</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=[],x=new Set,v=new Set;for(let b=0;b<l.length;b++){let S=l[b],N=l[b-1];if(!S||(N&&S.p.sign!==N.p.sign&&(d.push({date:S.date,sign:S.p.sign,signLabel:y(S.p,"sign")}),x.add(S.date)),N&&S.p.isRetrograde!==N.p.isRetrograde&&v.add(S.date),!S.p.isRetrograde))continue;let ee=h[h.length-1];ee&&N?.p.isRetrograde?ee.end=S.date:h.push({start:S.date,end:S.date})}s.push({name:i,label:y(p.p,"planet"),first:c.p,last:p.p,ingresses:d,retrogrades:h,ingressDates:x,stationDates:v})}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 we){let o=t.get(s.toLowerCase()),i=P(s);o&&i&&a.push({sign:s,label:o,glyph:i})}return a}};Sa.styles=[u,qg`: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([Ug({type:String})],Sa.prototype,"heading",2),Sa=m([Yg("roxy-ephemeris-table")],Sa);import{css as Wg,html as qt,nothing as Sn}from"lit";import{customElement as Xg}from"lit/decorators.js";var ws=class extends g{renderData(r){let e=r.conjunctions??[],t=r.stars??[];return qt`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Fixed stars")}</h2>${typeof r.orb=="number"?qt`<span class="badge"><b>${this.t("Orb")}</b> ${f(this.effectiveLang(),r.orb,1)}°</span>`:Sn}</header>${r.summary&&!this.hideReadings?qt`<p class="summary">${r.summary}</p>`:Sn} ${e.length?qt`<section part="section conjunctions"><p class="subhead">${this.t("Conjunctions to the chart")}</p>${e.map((a,s)=>qt`<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> ${B()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:f(this.effectiveLang(),a.orb,2)})}</small></span></summary>${a.interpretation&&!this.hideReadings?qt`<div class="interp-body"><p>${a.interpretation}</p></div>`:Sn}</details>`)}</section>`:qt`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):Sn}</div>`}renderCatalog(r){return qt`<details class="catalog"><summary>${B()} ${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=P(e.sign);return qt`<tr><td>${e.name}</td><td>${t?qt`<span class="sg">${t}</span>`:Sn}${Bt(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=>qt`<span>${a}</span>`)}</div></td></tr>`})}</tbody></table></div></details>`}};ws.styles=[u,M,F,Wg`.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}`],ws=m([Xg("roxy-fixed-stars")],ws);import{css as Qg,html as te,nothing as le}from"lit";import{customElement as eu,property as tu}from"lit/decorators.js";var Go=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as Jg}from"lit";var Oo=Jg`.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 Bo={forward:"Forward",reverse:"Backward"};function Ra(n){return"mountainCenterStar"in n}var Ca=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),a=this.mode!=="annual"&&Ra(e);return te`<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?te`<span class="period">${this.t("Period {{n}}",{n:z(t,e.period??0)})}</span>`:le:te`<span class="period">${e.year??""}</span>`}</header>${Ra(e)?a?this.renderNatalFacts(e,t):le:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${Go.map(s=>this.renderPalace(e,s))}</div>${a?te`<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>`:le} ${a&&Ra(e)?this.renderStructure(e):le} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return te`<div class="facts" part="details">${e.facing?te`<span><span class="lbl">${this.t("Facing")}</span> <b>${j(t,"facing",e.facing.label??"")}</b></span>`:le} ${e.sitting?te`<span><span class="lbl">${this.t("Sitting")}</span> <b>${j(t,"facing",e.sitting.label??"")}</b></span>`:le} ${typeof e.facingDegrees=="number"?te`<span>${z(t,e.facingDegrees)}°</span>`:le} ${e.mountainFlight?te`<span><span class="lbl">${this.t("Mountain star")}</span> ${Bo[e.mountainFlight]?this.t(Bo[e.mountainFlight]):e.mountainFlight}</span>`:le} ${e.waterFlight?te`<span><span class="lbl">${this.t("Water star")}</span> ${Bo[e.waterFlight]?this.t(Bo[e.waterFlight]):e.waterFlight}</span>`:le} ${e.straddling?te`<span><b>${this.t("Straddling")}</b></span>`:le}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?le:te`<div class="facts" part="details">${typeof e.centerStar=="number"?te`<span><span class="lbl">${this.t("Center")}</span> <b>${z(t,e.centerStar)}</b></span>`:le} ${e.changeoverDate?te`<span>${k(t,e.changeoverDate)}</span>`:le}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):j(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 te`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(i&&Ra(e)){let p=o;return te`<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?te`<span class="combo">${y(p.combination,"name")}</span>`:le}</div>`}let c=o;return te`<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?te`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?te`<p class="structure" part="reading">${t.meaning}</p>`:le}</section>`:le}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return le;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?le:te`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body">${p.combination?te`<span>${y(p.combination,"name")}</span>`:le} ${p.reading&&!this.hideReadings?te`<p part="reading">${p.reading}</p>`:le}</div></li>`}let c=i;return te`<li class="row" part="label-track"><span class="row-name">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?te`<span>${c.element}</span>`:le}<dl class="star-facts">${c.nature?te`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:le} ${c.enhancer?te`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:le} ${c.remedy?te`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:le}</dl>${c.meaning&&!this.hideReadings?te`<p part="reading">${c.meaning}</p>`:le}</div></li>`});return o.every(i=>i===le)?le:te`<section part="section palaces"><ul class="rows">${o}</ul></section>`}};Ca.styles=[u,Oo,Ir,Qg`.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([tu({type:String,reflect:!0})],Ca.prototype,"mode",2),Ca=m([eu("roxy-flying-star-chart")],Ca);import{css as ru,html as Gr,nothing as pc}from"lit";import{customElement as au}from"lit/decorators.js";var ks=class extends g{renderData(r){let e=r.windows??[];if(e.length===0)return this.renderEmpty();let t=Ct(this.effectiveLang(),r.startDate,r.endDate);return Gr`<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?Gr`<p class="subtitle">${t}</p>`:pc}</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 Gr`<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?Gr`<div class="domains" part="legend">${a.map(([s,o])=>Gr`<span class="domain-chip"><span class="swatch sw-${s}"></span>${w(s)} ${o}</span>`)}</div>`:pc} ${e.length>0?Gr`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:Gr`<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?w(r.type??""):r.description;return Gr`<div class="event" part="label-track" role="listitem"><span class="event-date">${k(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>`}};ks.styles=[u,ru`.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}`],ks=m([au("roxy-forecast-digest")],ks);import{css as su,html as St,nothing as Rn}from"lit";import{customElement as nu}from"lit/decorators.js";var ou={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},iu=["western","vedic","biorhythm"],Ss=class extends g{renderData(r){let e=r.events??[],t=this.groupByDate(e),a=iu.filter(s=>e.some(o=>o.domain===s));return St`<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?St`<div class="range">${Ct(this.effectiveLang(),r.startDate,r.endDate)} · ${this.t("{{count}} events",{count:r.count??e.length})}</div>`:Rn}</header>${a.length?St`<div class="legend" part="legend">${a.map(s=>St`<span><span class="swatch swatch-${s}"></span>${ou[s]}</span>`)}</div>`:Rn} ${t.length?St`<div class="days" part="section events" role="list">${t.map(([s,o])=>this.renderDay(s,o))}</div>`:St`<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 St`<div class="day" role="listitem"><div class="day-date">${k(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 St`<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?St`<p class="event-desc">${r.description}</p>`:Rn}<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?w(r.body):"",t=r.target?w(r.target):"",a=yt({type:r.aspect}),s=Gt[a]??"",o=a?as(r.aspect)??Ae({type:r.aspect}):"",i=typeof r.orb=="number"?f(this.effectiveLang(),r.orb,1):"",l=this.typeQualifier(r);return a&&t?St`<strong>${e}</strong> <span class="${s}">${o}</span> <strong>${t}</strong>${i?St`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:Rn}`:St`<strong>${e||w(r.type??"")}</strong>${l?St`<span class="kind">${l}</span>`:Rn}`}typeQualifier(r){return r.type==="sign-ingress"&&r.target?`enters ${w(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 ${w(r.target)}`:w(r.type??"")}};Ss.styles=[u,su`.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}`],Ss=m([nu("roxy-forecast-timeline")],Ss);import{css as lu,html as J,nothing as De}from"lit";import{customElement as du}from"lit/decorators.js";import{ifDefined as cu}from"lit/directives/if-defined.js";var Rs=class extends g{renderData(r){let e=this.effectiveLang(),t=r.chosen,a=r.input?.text??r.input?.textHebrew??"";return J`<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?J`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:De} ${this.chosenForm(r)?.romanization?J`<span class="roman">${this.chosenForm(r)?.romanization}</span>`:De} ${t?.rule?J`<p class="rule">${t.rule}</p>`:De}</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?De:J`<section part="section letters"><h3 class="block-title">${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(a=>J`<div class="${`letter${a.isFinal?" is-final":""}`}" dir="ltr" title="${cu(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">${z(r,a.value)}</span></div>`)}</div>${t.some(a=>a.isFinal)?J`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:De}</section>`}renderValues(r,e,t){let a=(e??[]).filter(o=>typeof o.value=="number");if(a.length===0)return De;let s=a.some(o=>(o.alternateValues??[]).length>0);return J`<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?J`<th>${this.t("Also published")}</th>`:De}</tr></thead><tbody>${a.map(o=>J`<tr><td>${w(o.id??"")}</td><td class="num">${z(r,o.value)}</td>${s?J`<td class="num">${(o.alternateValues??[]).map(i=>z(r,i)).join(", ")}</td>`:De}</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?De:J`<p class="provenance"><span class="lbl">${this.t("Tradition")}</span> ${[...e].map(([t,a],s)=>J`${s>0?" · ":""}${w(t)}${a?J`<a class="src" href="${a}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:De}`)}</p>`}renderForms(r,e){let t=e.hebrewForms??[];return t.length<2?De:J`<section part="section spellings"><h3 class="block-title">${this.t("Spellings")}</h3><ul class="forms">${t.map(a=>J`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${a.hebrew??""}</span> ${a.hebrew===e.chosen?.hebrew?J`<span class="chosen">${this.t("Chosen")}</span>`:De}</div><span class="roman">${a.romanization??""}</span> ${a.rule?J`<p class="rule">${a.rule}</p>`:De} ${this.renderFormTotals(r,a)}</li>`)}</ul></section>`}renderFormTotals(r,e){let t=(e.values??[]).find(a=>typeof a.value=="number");return t?J`<p class="rule"><span class="lbl">${w(t.id??"")}</span> ${z(r,t.value)}</p>`:De}renderTransformations(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<tr><td>${w(a.id??"")}</td><td>${a.output?J`<span lang="he" dir="rtl">${a.output}</span>`:De} ${a.outputRomanization?J`<span class="roman">${a.outputRomanization}</span>`:De}</td><td class="num">${z(r,a.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<tr><td data-label="${this.t("Cipher")}">${w(a.id??"")} ${a.lineage?J`<p class="lineage">${a.lineage}</p>`:De}</td><td class="num" data-label="${this.t("Value")}">${z(r,a.value)}</td><td data-label="${this.t("Tradition")}">${w(a.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(r,e){let t=e??[];return t.length===0?De:J`<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=>J`<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?J`<p class="match-note" part="reading">${a.note}</p>`:De}</td><td class="num" data-label="${this.t("Value")}">${z(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([fe(e,a),j(e,a,s)])}return t.length===0?De:J`<p class="provenance">${t.map(([a,s],o)=>J`${o>0?" · ":""}<span class="lbl">${a}</span>${s}`)}</p>`}};Rs.styles=[u,Nr,lu`.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}`],Rs=m([du("roxy-gematria")],Rs);import{css as pu,html as Yt,nothing as Da}from"lit";import{customElement as mu}from"lit/decorators.js";var mc=8,Cs=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 Yt`<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:H(this.effectiveLang(),r.transitDatetime),birth:H(this.effectiveLang(),r.birthDatetime)})}</p>${a?Yt`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:a})}</p>`:Da} ${U(this.effectiveLang(),r.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?Yt`<section class="key" part="section key-transits"><h3 class="key-title">${this.t("Key transits")}</h3>${t.map(s=>Yt`<p class="key-item">${s.description}</p>`)}</section>`:Da}</div>`}renderPlanet(r){let e=L(r.name)??"",t=typeof r.longitude=="number"?Ot(r.longitude):void 0;return Yt`<article class="row"><div class="row-top"><span class="graha">${e?Yt`<span class="glyph">${e}</span>`:Da}${r.name} </span><span class="pos">${t?`${r.sign} ${t}`:r.sign} </span>${typeof r.houseFromMoon=="number"?Yt`<span class="house moon">${this.t("house {{n}} from the Moon",{n:r.houseFromMoon})}</span>`:Da} ${typeof r.natalHouse=="number"?Yt`<span class="house lagna">${this.t("house {{n}} from the Lagna",{n:r.natalHouse})}</span>`:Da}</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?Yt`<p class="aspects"><span class="contact-label">${r}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Ae({type:t.aspectType}),planet:t.natalPlanet,orb:f(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Ae({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:Da}renderKaksha(r){if(!r||typeof r.number!="number")return Da;let e=r.number,t=r.bindu===!0?"yes":r.bindu===!1?"no":"",a=mc,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 Yt`<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:mc},(i,l)=>Yt`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${o?`${s} · ${o}`:s}</p>`}};Cs.styles=[u,I,pu`.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}`],Cs=m([mu("roxy-gochara-table")],Cs);import{css as hu,html as cr,nothing as Ds}from"lit";import{customElement as gu}from"lit/decorators.js";var uu={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},Ts=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 cr`<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"?cr`<small style="margin-left:.5rem;color:var(--roxy-muted)">${ve(this.effectiveLang(),r.percentage,1)}</small>`:Ds}</div><div class="verdict-wrap">${typeof r.isCompatible=="boolean"?cr`<span class="verdict ${r.isCompatible?"yes":"no"}">${r.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:Ds} ${r.recommendation&&!this.hideReadings?cr`<span class="recommendation">${r.recommendation}</span>`:Ds}</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?cr`<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??yu(p.category),x=h?d/h*100:0;return cr`<tr><td>${p.category} ${p.description?cr`<small>${p.description}</small>`:Ds}</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:${x}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${f(this.effectiveLang(),d,1)} / ${h}</td></tr>`})}</tbody></table></div>`:Ds} ${(r.doshas?.length??0)>0||(r.doshaCancellations?.length??0)>0?cr`<div class="tags" part="details">${r.doshas?.map(p=>cr`<span class="dosha">${p}</span>`)} ${r.doshaCancellations?.map(p=>cr`<span class="cancel" title="${p.reason}">${this.t("{{dosha}} cancelled",{dosha:p.dosha})}</span>`)}</div>`:Ds} ${U(this.effectiveLang(),r.frame,this.translator)}</article>`}};Ts.styles=[u,I,Nr,hu`.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)}`],Ts=m([gu("roxy-guna-milan")],Ts);function yu(n){return n&&uu[n.toLowerCase()]||1}import{css as fu,html as Ut,nothing as Or}from"lit";import{customElement as xu}from"lit/decorators.js";var As=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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,x]of i){let v=[x.left&&"A",x.right&&"B"].filter(Boolean).join(" + ");d.set(h,[`Gate ${h}`,p.get(h),v].filter(Boolean).join(" · "))}return Ut`<svg class="chart" part="chart" viewBox="${mo}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${ho({definedCenters:l,gateSources:i,gateTitles:d,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${a?Or:Ut`<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 Ut`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?Ut`<span class="count">${e.totalChannels} channels</span>`:Or}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,a,t),a,this.translator)} ${fr([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?w(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:o.length>0?`${i}/${o.length}`:void 0}])} ${this.hideReadings?Or:Ut`<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 Or;let t=[{label:"Electromagnetic",aside:Fo(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:Fo(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:Fo(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:Fo(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?Or:Ut`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Or:Ut`<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 Ut`<div class="row"><span class="cname">${t.name??w(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${bu(!!t.defined,s,o)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Or;let a=new Map(t.map(o=>[String(o.id??""),o.name??""])),s=o=>a.get(o)||w(o);return Ut`<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=>Ut`<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?Ut`<span class="dyn">${o.dynamic}</span>`:Or}</td><td class="held">${hc(o.personAGates)}</td><td class="held">${hc(o.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};As.styles=[u,M,F,Pr,go,Ne,fu`.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}`],As=m([xu("roxy-hd-connection")],As);function Fo(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function hc(n){let r=n??[];return r.length>0?r.join(", "):"Neither"}function bu(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"}import{css as Ru,html as ct,nothing as Zt}from"lit";import{customElement as Cu}from"lit/decorators.js";import{nothing as vu,svg as Dn}from"lit";var Ji=360,Lu=470,Qi=8,yc=Ji-Qi*2,jo=48,Cn=15,Xi=7,gc=16,Ho=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],fc=`0 0 ${Ji} ${Lu}`;function $u(n,r){return Qi+yc*(n*2+1)/(r*2)}function xc(n){return bn[n.gateA]==="throat"||bn[n.gateB]==="throat"}function wu(n){return(xc(n)?bn[n.gateA]==="throat":bn[n.gateA]==="g")?n.gateA:n.gateB}function ku(){return Ho.map(n=>Dn`<g>
83
+ <rect class="pn-bar" x=${Qi} y=${n.y} width=${yc} height=${jo} rx="10" />
84
+ <text class="pn-bar-label" x=${Ji/2} y=${n.y+jo/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
+ </g>`)}function Su(n,r,e,t){return e.map((a,s)=>Dn`<g>
86
+ <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*gc} cy=${r} r=${Xi} />
87
+ <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*gc} y=${r} text-anchor="middle" dominant-baseline="central">${t(a)}</text>
88
+ </g>`)}function uc(n,r,e,t,a,s){let o=t.length>0;return Dn`<g>
89
89
  <circle class="pn-gate-dot ${o?"on":""}" cx=${n} cy=${r} r=${Cn} />
90
90
  <text class="pn-gate ${o?"on":""}" x=${n} y=${r} text-anchor="middle" dominant-baseline="central">${e}</text>
91
- ${ku(n,r+s,t,a)}
92
- </g>`}function xc(n){let r=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>fc(c)===e),a=e?jo:Ho[1].y+jo,s=e?Ho[1].y:Ho[2].y,o=a+26,i=s-26,l=(o+i)/2;t.forEach((c,p)=>{let d=Lu(p,t.length),h=$u(c),x=h===c.gateA?c.gateB:c.gateA,v=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;r.push(Dn`<g>
91
+ ${Su(n,r+s,t,a)}
92
+ </g>`}function bc(n){let r=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>xc(c)===e),a=e?jo:Ho[1].y+jo,s=e?Ho[1].y:Ho[2].y,o=a+26,i=s-26,l=(o+i)/2;t.forEach((c,p)=>{let d=$u(p,t.length),h=wu(c),x=h===c.gateA?c.gateB:c.gateA,v=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;r.push(Dn`<g>
93
93
  <line class=${v} x1=${d} y1=${o+Cn} x2=${d} y2=${l-13} />
94
94
  <line class=${v} x1=${d} y1=${l+13} x2=${d} y2=${i-Cn} />
95
95
  <text class="pn-name ${c.defined?"on":""}" x=${d} y=${l} text-anchor="middle" dominant-baseline="central">${c.name}</text>
96
- ${gc(d,o,h,n.holders.get(h)??[],n.letterFor,Cn+Wi+7)}
97
- ${gc(d,i,x,n.holders.get(x)??[],n.letterFor,-(Cn+Wi+7))}
98
- </g>`)})}return Dn`${wu()}${r.length>0?r:bu}`}var zs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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 Zt;let a=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return ct`<svg class="chart" part="chart" viewBox="${yc}" 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>${xc({rungs:t,holders:a,letterFor:bc})}</svg>`}renderData(e){let t=e.channels??[],a=e.gates??[],s=e.summary,o=s?.gapGates??[],i=t.some(l=>l.isCore);return ct`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2 class="title">Penta</h2>${typeof e.memberCount=="number"?ct`<span class="count">${e.memberCount} members</span>`:Zt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${fr([{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?Zt:ct`<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?ct`<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>`:Zt} ${this.renderGates(a)} ${t.length>0||a.length>0?ct`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Zt}</div>`}renderGroup(e,t,a){return t.length===0?Zt:ct`<div class="section" part="section channels"><h3>${e}</h3>${a&&!this.hideReadings?ct`<p class="note">${a}</p>`:Zt} ${t.map(s=>ct`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?ct`<span class="circuit">${s.circuit} circuit</span>`:Zt} </span><span class="badge ${s.defined?"defined":"open"}">${s.defined?"Defined":"Open"}</span> ${s.isCore?ct`<span class="badge core">Core</span>`:Zt} <span class="held">Gate ${s.gateA} held by ${Qi(s.gateAHeldBy)}. Gate ${s.gateB} held by ${Qi(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Zt;let t=e.filter(a=>a.filled).length;return ct`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Zt:ct`<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=>ct`<div class="row"><span class="gate-id">${a.gate}</span> <span class="cname">${a.gateName??""}</span> ${a.filled?ct`<span class="who">Held by ${Qi(a.heldBy)}</span>`:ct`<span class="badge gap">Gap</span>`}</div>`)}</div>`}};zs.styles=[u,Ne,Pr,Su`.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}`],zs=m([Ru("roxy-hd-penta")],zs);var Cu="ABCDE",bc=n=>Cu[n]??String(n+1);function Qi(n){let r=(n??[]).map(bc);return r.length>0?r.join(", "):"nobody"}import{css as Du,html as Ms,nothing as Ko}from"lit";import{customElement as Tu}from"lit/decorators.js";var Es=class extends g{renderData(r){return Au(r)?this.renderType(r):this.renderProfile(r)}renderType(r){return Ms`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Type")}</h2>${r.type||r.profile?Ms`<div class="type-line">${[y(r,"type"),r.profile?this.t("Profile {{profile}}",{profile:r.profile}):""].filter(Boolean).join(" · ")}</div>`:Ko}</header>${fr([{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?Ms`<p class="lead">${r.typeDescription}</p>`:Ko} ${yo(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 Ms`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Profile")}</h2>${r.profile?Ms`<div class="type-line">${r.profile}</div>`:Ko}</header>${fr([{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?Ko:Ms`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${fo({personality:r.personalityKeynote,personalityLine:r.personalityLine,design:r.designKeynote,designLine:r.designLine},this.translator)}</section>`}</div>`}};Es.styles=[u,M,F,Pr,Du`.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)}`],Es=m([Tu("roxy-hd-type-card")],Es);function Au(n){return typeof n.type=="string"}import{css as zu,html as rt,nothing as Mt}from"lit";import{customElement as Mu}from"lit/decorators.js";var Ps=class extends g{renderData(r){let e=[...r.arrows??[]].sort((t,a)=>vc(t.position)-vc(a.position));return rt`<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?rt`<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>`:Mt} ${this.renderReading(e,r.baseDescription)}</div>`}renderArrow(r){let e=r.direction==="left"?"←":"→",t=y(r,"baseName");return rt`<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?rt`<span class="layer">${y(r,"layer")}</span>`:Mt} <span class="labels">${[y(r,"directionLabel"),y(r,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof r.color=="number"?rt`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:r.color,tone:r.tone??"",base:r.base??""})}${t?`, ${t}`:""}</span>`:Mt} ${r.activation?.planet?rt`<span class="ctb">${[r.activation.planet,uo(r.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:Mt} ${r.confident===!1?rt`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:Mt}</div>`}renderReading(r,e){let t=r.filter(o=>o.description||o.colorMeaning);if(t.length===0||this.hideReadings)return Mt;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 rt`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...a].map(([o,i])=>rt`<div class="group">${o?rt`<p class="group-head">${y(i[0],"layer")}</p>`:Mt} ${i[0]?.layerDescription?rt`<p class="group-note">${i[0].layerDescription}</p>`:Mt} ${i.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?rt`<p class="footnote">${this.t("Base")}. ${e}</p>`:Mt}</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 rt`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(r,"name")}</span> ${B()} ${r.position?rt`<span class="interp-aside"><small>${y(r,"position")}</small></span>`:Mt}</summary><div class="interp-body">${r.description?rt`<p>${r.description}</p>`:Mt} ${s.length>0?rt`<dl class="facets">${s.map(o=>rt`<dt>${o.label}</dt><dd>${o.body}</dd>`)}</dl>`:Mt}</div></details>`}};Ps.styles=[u,M,F,zu`.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}`],Ps=m([Mu("roxy-hd-variables")],Ps);function vc(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}}import{css as Eu,html as Br,nothing as Lc}from"lit";import{customElement as Pu}from"lit/decorators.js";var _u={udaya:"Rose",asta:"Set"},Nu={udaya:"rises",asta:"sets"},_s=class extends g{renderData(r){let e=r.grahas??[];return e.length?Br`<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=L(r.graha)??"";return Br`<article class="row"><div class="row-top"><span class="graha">${e?Br`<span class="glyph">${e}</span>`:Lc}${r.graha} </span><span class="state ${r.visible?"visible":"invisible"}">${r.visible?this.t("Visible"):this.t("Invisible")} </span>${r.retrograde?Br`<span class="retro" title="${this.t("retrograde")}">R</span>`:Lc}</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(Nu[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:H(this.effectiveLang(),e.datetime)};return Br`${r.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",a):this.t("Invisible until it {{event}} {{where}} on {{when}}",a)}`}return t?Br`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(_u[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:H(this.effectiveLang(),t.datetime)})}`:Br`${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 Br`${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}`}};_s.styles=[u,Eu`.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}`],_s=m([Pu("roxy-heliacal-table")],_s);import{css as Iu,html as Ke,nothing as at}from"lit";import{customElement as Gu}from"lit/decorators.js";var Ns=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 Ke`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,a,s,o,i)} ${l?Ke`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${B()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:at}</article>`}renderHexagram(r,e,t,a,s,o,i){let l=t??this.derivedLines(e),c=new Set(a??[]),p=!this.hideReadings;return Ke`<div class="glyphs" part="chart">${e.symbol?Ke`<div class="symbol">${e.symbol}</div>`:at} ${l.length>0?Ke`<div class="lines" aria-hidden="true">${l.slice().reverse().map((d,h)=>{let x=l.length-1-h+1,v=c.has(x),b=d===6||d===8;return Ke`<div class="line ${`${b?"broken":"solid"}${v?" changing":""}`}">${b?Ke`<span class="seg"></span><span class="seg"></span>`:Ke`<span class="seg"></span>`}</div>`})}</div>`:at}</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?Ke`<time class="daily-date" part="details" datetime="${i}">${k(this.effectiveLang(),i)}</time>`:at}<p class="subtitle">${e.chinese?Ke`${e.chinese}`:at} ${e.pinyin?Ke`· ${e.pinyin}`:at}</p><div class="trigrams" part="details">${e.upperTrigram?Ke`<div>${this.t("Upper")} <span class="tri-glyph">${fi(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:at} ${e.lowerTrigram?Ke`<div>${this.t("Lower")} <span class="tri-glyph">${fi(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:at}</div>${e.judgment&&p?Ke`<p class="judgment">${e.judgment}</p>`:at} ${e.image&&p?Ke`<p class="image">${e.image}</p>`:at} ${o&&p?Ke`<p class="message">${o}</p>`:at} ${e.interpretation?.general&&p?Ke`<p>${e.interpretation.general}</p>`:at} ${c.size>0?Ke`<div class="changing" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((d,h)=>d-h).join(", ")})}</div>`:at} ${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"):at}renderLines(r,e,t){let a=r??[];if(a.length===0)return at;let s=e.size>0,o=s?a.filter(l=>e.has(l.position)):a;if(o.length===0)return at;let i=o.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Ke`<p class="line-meaning">${l.meaning}</p>`:at}));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):[]}};Ns.styles=[u,M,F,Iu`.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)}`],Ns=m([Gu("roxy-hexagram")],Ns);import{css as Ou,html as Tn,nothing as el}from"lit";import{customElement as Bu}from"lit/decorators.js";var Is=class extends g{renderData(r){let e=r.dayHoras??[],t=r.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Tn`<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?Tn`<p class="subtitle">${k(this.effectiveLang(),r.date)}</p>`:el}</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?el:Tn`<div class="col"><p class="section-label">${r}</p>${e.map(t=>Tn`<div class="row"><span class="glyph" aria-hidden="true">${L(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${sr(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Tn`<span class="num">${t.number}</span>`:el}</div>`)}</div>`}};Is.styles=[u,Ou`.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}}`],Is=m([Bu("roxy-hora-table")],Is);import{css as Fu,html as T,nothing as Y}from"lit";import{customElement as Hu,property as $c}from"lit/decorators.js";var ju={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Ku={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Vu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],qu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Fr=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",a=P(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o=this.effectiveLang(),i="date"in e&&e.date&&k(o,e.date)||"week"in e&&e.week&&k(o,e.week)||"month"in e&&e.month&&hr(o,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return T`<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(ju[this.period])}</h2>${i?T`<div class="date">${i}</div>`:Y}</div>${s!==null?T`<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>`:Y}</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?Y:T`<div class="lucky" part="details">${l!==void 0?T`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:Y} ${c?T`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:Y} ${p.length?T`<span>${this.t("Lucky numbers")} <strong>${p.join(", ")}</strong></span>`:Y} ${d.length?T`<span>${this.t("Lucky days")} <strong>${d.join(", ")}</strong></span>`:Y} ${h.length?T`<span class="compat-wrap">${this.t("Best with")} <span class="compat">${h.map(x=>T`<span>${x}</span>`)}</span></span>`:Y}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return Y;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):Y;let a=this.paragraphs(e.overview);return T`${a.length?T`<div class="overview" part="section overview">${a}</div>`:Y}<div class="sections" part="section outlook">${Vu.map(([s,o])=>{let i=this.paragraphs(e[s]);return i.length?T`<div class="section"><h3>${this.t(o)}</h3>${i}</div>`:Y})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?Y:T`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>T`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return Y;let t=this.effectiveLang();return T`<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(T`<time class="row-when" datetime="${a.at}">${hr(t,a.at,"time")}</time>`,this.renderEventBodies(a),T`<span class="kind">${this.t(Ku[a.type])}</span> <span>${this.t("House")} ${a.house}</span> ${a.sign?T`<span>${this.glyphName(P(a.sign),A(a.sign))}</span>`:Y} ${a.through?T`<span>${this.t("through {{date}}",{date:k(t,a.through)})}</span>`:Y}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(a=>this.glyphName(L(a),a));if(t.length===2&&e.aspect){let a=yt({type:e.aspect});return T`${t[0]} <span class="${Gt[a]??""}">${as(e.aspect)??e.aspect}</span> ${t[1]}`}return T`${t}`}renderYear(e){if(!("themes"in e))return Y;let t=this.effectiveLang();return T`${e.themes.length?T`<section part="section themes"><h3 class="block-title">${this.t("Themes")}</h3><ul class="rows">${e.themes.map(a=>this.renderRow(Ct(t,a.from,a.to),T`${this.glyphName(L(a.body),a.body)} ${this.glyphName(P(a.sign),A(a.sign))}`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${e.keyPeriods.length?T`<section part="section key-periods"><h3 class="block-title">${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(a=>this.renderRow(Ct(t,a.from,a.to),this.glyphName(L(a.body),a.body),T`<span>${this.t("House")} ${a.house}</span><span>${a.focus}</span>`))}</ul></section>`:Y} ${e.eclipses.length?T`<section part="section eclipses"><h3 class="block-title">${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(a=>this.renderRow(k(t,a.date),T`<span class="name">${a.kind}</span>`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${e.retrogrades.length?T`<section part="section retrogrades"><h3 class="block-title">${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(a=>this.renderRow(k(t,a.date),T`${this.glyphName(L(a.body),a.body)} <span>${a.direction}</span>`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return Y;let t=this.effectiveLang(),a=qu.filter(([s])=>e[s]);return a.length===0?Y:T`<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?T`<div class="tile"><span class="tile-label">${this.t(o)}</span> <span class="tile-value">${hr(t,i.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:i.count})}</span></div>`:Y})}</div></section>`}renderRow(e,t,a,s){return T`<li class="row" part="label-track">${s?.when==="element"?e:T`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${a}</span></li>`}glyphName(e,t){return T`<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 Y;let o=P(t)??"";return T`<div class="sky" part="section sky">${t||a?T`<div class="moon-line">${t?T`<span><span class="lbl">${this.t("Moon")}</span> <span aria-hidden="true">${o}</span> <b>${t}</b></span>`:Y} ${a?T`<span><span class="lbl">${this.t("Phase")}</span> <b>${a}</b></span>`:Y}</div>`:Y} ${s.length?T`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(i=>T`<li>${i}</li>`)}</ul>`:Y}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],a=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&a.length===0?Y:T`${t.length&&!this.hideReadings?T`<section part="section week-by-week"><h3 class="block-title">${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>T`<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?T`<p class="week-advice">${s.advice}</p>`:Y}</div></div>`)}</div></section>`:Y} ${a.length?T`<section part="section key-dates"><h3 class="block-title">${this.t("Key dates")}</h3><dl class="dates" part="label-track">${a.map(s=>T`<div class="date-row"><dt>${k(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:Y}`}};Fr.styles=[u,Ir,Fu`.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([$c({type:String,reflect:!0})],Fr.prototype,"period",2),m([$c({type:String,reflect:!0})],Fr.prototype,"layout",2),Fr=m([Hu("roxy-horoscope-card")],Fr);import{css as Yu,html as de,nothing as Wt}from"lit";import{customElement as Uu,state as Zu}from"lit/decorators.js";var Wu=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Vo=[1,2,3,4];function tl(n,r){return n?typeof r=="number"?`${n} ${r}`:n:""}function wc(n){return[...new Set(n.map(String))].join(" > ")}function Xu(n){return[...new Set(n??[])]}var Ta=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 de`<div class="wrap" part="card" aria-label="KP chart" tabindex="0"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?de`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?Ze(t.longitude):t.sign??""} </strong>${t.nakshatra?de`· ${tl(t.nakshatra,t.pada)}`:Wt} ${t.subLord?de`· sub lord ${t.subLord}`:Wt} ${typeof t.kpNumber=="number"?de`· KP ${t.kpNumber}`:Wt}</div>`:Wt} ${typeof e.meta?.ayanamsa=="number"?de`<div class="ayan">Ayanamsa: ${ra(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?de`· ${e.meta.houseSystem} houses`:Wt}</div>`:Wt}</header>${ot({items:Wu,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?de`<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=>de`<tr><td class="body">${t.name}${t.retrograde?de`<span class="retro">R</span>`:Wt}</td><td class="num">${typeof t.longitude=="number"?Ze(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${tl(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>`:de`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?de`<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=>de`<tr><td class="body num">${a.house}${this.renderThemes(vi(a.house,t))}</td><td class="num">${typeof a.longitude=="number"?Ze(a.longitude):a.sign??""}</td><td>${a.signLord??""}</td><td>${tl(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>`:de`<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?de`<p class="roxy-empty" role="status">No significators</p>`:de`${this.renderLevelLegend(a)} ${a.length?de`<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>${Vo.map(o=>de`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${a.map(o=>de`<tr><td class="body num">${o.house}${this.renderThemes(vi(o.house,t))}</td>${Vo.map(i=>this.renderCell(this.planetsAtLevel(o,i).join(", ")))}<td class="chain">${wc(o.all??[])}</td></tr>`)}</tbody></table>`:Wt} ${s.length?de`<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>${Vo.map(o=>de`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(o=>de`<tr><td class="body">${o.planet}</td>${Vo.map(i=>this.renderCell(this.housesAtLevel(o,i).join(", ")))}<td class="chain">${wc(o.allHouses??[])}${this.renderThemes(or(Xu(o.allHouses),t))}</td></tr>`)}</tbody></table>`:Wt}`}renderThemes(e){return e?de`<span class="themes">${e}</span>`:Wt}renderCell(e){return e?de`<td>${e}</td>`:de`<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?Wt:de`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((a,s)=>a[0]-s[0]).map(([a,s])=>de`<li><b>L${a}</b>${s}</li>`)}</ul>`}};Ta.styles=[u,Ue,Yu`.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([Zu()],Ta.prototype,"activeTab",2),Ta=m([Uu("roxy-kp-chart")],Ta);import{css as Ju,html as ue,nothing as Gs}from"lit";import{customElement as Qu}from"lit/decorators.js";var ey={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},ty={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},ry={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},ay={gain:"Gain",loss:"Loss"},sy={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Os=class extends g{renderData(r){return r.layers?ue`<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">${U(this.effectiveLang(),{ayanamsa:r.ayanamsa,ayanamsaDegrees:r.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(r){let e=this.effectiveLang();return ue`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${H(e,r.date)}</span></div><div class="verdict-row"><span class="verdict ${r.band}">${this.t(ey[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>${H(e,r.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${He(e,r.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${He(e,r.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(r){let e=r.significators,t=this.effectiveLang(),a=s=>ue`<div class="chips">${s.map(o=>ue`<span class="chip">${this.glyphName(o)}</span>`)}</div>`;return ue`<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?ue`<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=>ue`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${He(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:Gs}</section>`}renderLayer(r,e,t){let a=this.effectiveLang();return ue`<div class="block-head"><h3>${this.t(ry[r])}</h3><span class="evidence">${this.t("Weight")} ${ve(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 ue`<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=>ue`<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 ue`<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=>ue`<tr><td>${this.t(sy[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${H(e,t.startDate)}</td><td>${H(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td><td class="num">${ve(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(r){return ue`<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=>ue`<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 ue`<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=>ue`<tr><td>${mt(e,t.from)}</td><td>${mt(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 Gs;let s=(o,i)=>ue`<span class="window ${i}"><span>${this.glyphName(o.subLord)}</span> <small>${sr(e,{start:o.from,end:o.to})}</small></span>`;return ue`<section class="block" part="section windows"><dl class="facts">${t?ue`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="chips">${s(t,"best")}</div></dd></div>`:Gs} ${a.length?ue`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="chips">${a.map(o=>s(o,"worst"))}</div></dd></div>`:Gs}</dl></section>`}glyphName(r,e=!1){let t=L(r);return ue`${t?ue`<span class="glyph" aria-hidden="true">${t}</span>`:Gs}${r}${e?ue`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:Gs}`}verdictChip(r){return ue`<span class="state ${r}">${this.t(ty[r])}</span>`}groupChip(r){return ue`<span class="chip">${this.t(ay[r])}</span>`}};Os.styles=[u,I,Ju`.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)}`],Os=m([Qu("roxy-kp-finance-card")],Os);import{css as ny,html as qo,nothing as kc}from"lit";import{customElement as oy}from"lit/decorators.js";var Bs=class extends g{renderData(r){let e=r.planets??[];return qo`<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"?qo`<span class="ayanamsa">Ayanamsa: ${f(this.effectiveLang(),r.ayanamsa,2)}°</span>`:kc}</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=>qo`<tr><td class="planet">${t.planet} ${t.retrograde?qo`<span class="retro">R</span>`:kc}</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>`}};Bs.styles=[u,ny`.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}`],Bs=m([oy("roxy-kp-planets-table")],Bs);import{css as iy,html as Aa,nothing as Yo}from"lit";import{customElement as ly}from"lit/decorators.js";var Fs=class extends g{renderData(r){let e=r.significators??[];return Aa`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${r.dayLord?Aa`<div class="day-lord">Day lord: <strong>${r.dayLord}</strong></div>`:Yo}</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?Aa`<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)=>Aa`<span class="rp" role="listitem"><span class="rank">${a+1}</span> ${t}</span>`)}</div>`:Yo} ${e.length?Aa`<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=or(t.signifies,r.houseThemes);return Aa`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${a?Aa`<span class="themes">${a}</span>`:Yo}</td></tr>`})}</tbody></table>`:Yo}</div>`}};Fs.styles=[u,iy`.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}`],Fs=m([ly("roxy-kp-ruling-planets")],Fs);import{css as dy,html as Je,nothing as st}from"lit";import{customElement as cy,property as py}from"lit/decorators.js";var za=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),a=e.trigram;return Je`<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?Je`<span class="group">${this.t("{{direction}} group",{direction:j(t,"facing",A(e.group))})}</span>`:st}</header><div class="facts" part="details">${a?Je`<span><span class="lbl">${this.t("Trigram")}</span> <span lang="zh">${a.chinese??""}</span> ${a.symbol??""} <b>${a.english??""}</b> ${a.element??""}</span>`:st} ${a?.familyMember?Je`<span><span class="lbl">${this.t("Role")}</span>${a.familyMember}</span>`:st} ${"solarYear"in e&&typeof e.solarYear=="number"?Je`<span class="solar-year"><span class="lbl">${this.t("Year")}</span><b>${hr(t,String(e.solarYear),"year")}</b></span>`:st} ${"gender"in e&&e.gender?Je`<span class="formula-gender"><span class="lbl">${fe(t,"gender")}</span>${j(t,"gender",e.gender)}</span>`:st} ${"boundaryDate"in e&&e.boundaryDate?Je`<span>${this.t("Year boundary")} ${k(t,e.boundaryDate)}</span>`:st} ${"reassigned"in e&&e.reassigned?Je`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:st} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${Go.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?Tr(e.conventions,this.translator,this.effectiveLang()):st}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return st;let t=this.effectiveLang();return Je`${e.bestSector?Je`<span><span class="lbl">${this.t("Best")}</span><b>${j(t,"facing",e.bestSector)}</b></span>`:st} ${e.worstSector?Je`<span><span class="lbl">${this.t("Worst")}</span><b>${j(t,"facing",e.worstSector)}</b></span>`:st}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):j(e,"facing",t)}renderSector(e,t){let a=this.effectiveLang(),s=this.sectorHeading(a,t);if(t==="Center")return Je`<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 Je`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let i=o.nature==="auspicious";return Je`<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?Je`<span class="star-hanzi" lang="zh">${o.chinese}</span>`:st} <span class="domain">${o.domain??""}</span> ${typeof o.rank=="number"?Je`<span class="rank">${i?this.t("Rank"):this.t("Severity")} ${o.rank}</span>`:st}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return st;let a=this.effectiveLang(),s=t.map(o=>{let i=this.mode==="mansions"&&"reading"in o?o.reading:void 0;return!i||this.hideReadings?st:Je`<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===st)?st:Je`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};za.styles=[u,I,Oo,Ir,dy`.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([py({type:String,reflect:!0})],za.prototype,"mode",2),za=m([cy("roxy-kua-card")],za);import{css as my,html as Ma,nothing as Uo,svg as Zo}from"lit";import{customElement as hy}from"lit/decorators.js";var rl=320,Et=rl/2,br=128,gy=118,Sc=137,uy=152,yy=.95,fy={glyph:11},xy=fy.glyph;function vr(n,r){let e=n*Math.PI/180;return{x:Et+r*Math.sin(e),y:Et-r*Math.cos(e)}}var by=[{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"}],Hs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(this)}renderData(e){let t=e.bodies??[],a=e.birthDetails;return Ma`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Local space")}</h2>${a?Ma`<div class="meta">${H(this.effectiveLang(),a.date,a.time)}</div>`:Uo}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary?Ma`<p class="summary">${e.summary}</p>`:Uo} ${this.renderList(t)}</div>`}renderDial(e){return Ma`<svg viewBox="0 0 ${rl} ${rl}" 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="${Et}" cy="${Et}" r="${br}"/><circle class="dial" cx="${Et}" cy="${Et}" r="${br*.66}" stroke-width="0.5"/><circle class="dial" cx="${Et}" cy="${Et}" r="${br*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Et}" cy="${Et}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=vr(l,br),p=vr(l,br-(l%45===0?8:4));e.push(Zo`<line class="tick" x1=${p.x} y1=${p.y} x2=${c.x} y2=${c.y} />`)}let t=vr(0,br),a=vr(180,br),s=vr(90,br),o=vr(270,br),i=by.map(({az:l,source:c})=>{let p=vr(l,uy),d=l%90===0;return Zo`<text class=${`compass-label${d?" cardinal":""}`} x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Zo`
96
+ ${uc(d,o,h,n.holders.get(h)??[],n.letterFor,Cn+Xi+7)}
97
+ ${uc(d,i,x,n.holders.get(x)??[],n.letterFor,-(Cn+Xi+7))}
98
+ </g>`)})}return Dn`${ku()}${r.length>0?r:vu}`}var zs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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 Zt;let a=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return ct`<svg class="chart" part="chart" viewBox="${fc}" 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>${bc({rungs:t,holders:a,letterFor:vc})}</svg>`}renderData(e){let t=e.channels??[],a=e.gates??[],s=e.summary,o=s?.gapGates??[],i=t.some(l=>l.isCore);return ct`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2 class="title">Penta</h2>${typeof e.memberCount=="number"?ct`<span class="count">${e.memberCount} members</span>`:Zt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${fr([{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?Zt:ct`<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?ct`<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>`:Zt} ${this.renderGates(a)} ${t.length>0||a.length>0?ct`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Zt}</div>`}renderGroup(e,t,a){return t.length===0?Zt:ct`<div class="section" part="section channels"><h3>${e}</h3>${a&&!this.hideReadings?ct`<p class="note">${a}</p>`:Zt} ${t.map(s=>ct`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?ct`<span class="circuit">${s.circuit} circuit</span>`:Zt} </span><span class="badge ${s.defined?"defined":"open"}">${s.defined?"Defined":"Open"}</span> ${s.isCore?ct`<span class="badge core">Core</span>`:Zt} <span class="held">Gate ${s.gateA} held by ${el(s.gateAHeldBy)}. Gate ${s.gateB} held by ${el(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Zt;let t=e.filter(a=>a.filled).length;return ct`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Zt:ct`<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=>ct`<div class="row"><span class="gate-id">${a.gate}</span> <span class="cname">${a.gateName??""}</span> ${a.filled?ct`<span class="who">Held by ${el(a.heldBy)}</span>`:ct`<span class="badge gap">Gap</span>`}</div>`)}</div>`}};zs.styles=[u,Ne,Pr,Ru`.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}`],zs=m([Cu("roxy-hd-penta")],zs);var Du="ABCDE",vc=n=>Du[n]??String(n+1);function el(n){let r=(n??[]).map(vc);return r.length>0?r.join(", "):"nobody"}import{css as Tu,html as Ms,nothing as Ko}from"lit";import{customElement as Au}from"lit/decorators.js";var Es=class extends g{renderData(r){return zu(r)?this.renderType(r):this.renderProfile(r)}renderType(r){return Ms`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Type")}</h2>${r.type||r.profile?Ms`<div class="type-line">${[y(r,"type"),r.profile?this.t("Profile {{profile}}",{profile:r.profile}):""].filter(Boolean).join(" · ")}</div>`:Ko}</header>${fr([{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?Ms`<p class="lead">${r.typeDescription}</p>`:Ko} ${yo(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 Ms`<div class="wrap" part="card"><header class="head" part="header"><h2 class="title">${this.t("Profile")}</h2>${r.profile?Ms`<div class="type-line">${r.profile}</div>`:Ko}</header>${fr([{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?Ko:Ms`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${fo({personality:r.personalityKeynote,personalityLine:r.personalityLine,design:r.designKeynote,designLine:r.designLine},this.translator)}</section>`}</div>`}};Es.styles=[u,M,F,Pr,Tu`.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)}`],Es=m([Au("roxy-hd-type-card")],Es);function zu(n){return typeof n.type=="string"}import{css as Mu,html as rt,nothing as Mt}from"lit";import{customElement as Eu}from"lit/decorators.js";var Ps=class extends g{renderData(r){let e=[...r.arrows??[]].sort((t,a)=>Lc(t.position)-Lc(a.position));return rt`<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?rt`<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>`:Mt} ${this.renderReading(e,r.baseDescription)}</div>`}renderArrow(r){let e=r.direction==="left"?"←":"→",t=y(r,"baseName");return rt`<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?rt`<span class="layer">${y(r,"layer")}</span>`:Mt} <span class="labels">${[y(r,"directionLabel"),y(r,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof r.color=="number"?rt`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:r.color,tone:r.tone??"",base:r.base??""})}${t?`, ${t}`:""}</span>`:Mt} ${r.activation?.planet?rt`<span class="ctb">${[r.activation.planet,uo(r.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:Mt} ${r.confident===!1?rt`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:Mt}</div>`}renderReading(r,e){let t=r.filter(o=>o.description||o.colorMeaning);if(t.length===0||this.hideReadings)return Mt;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 rt`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...a].map(([o,i])=>rt`<div class="group">${o?rt`<p class="group-head">${y(i[0],"layer")}</p>`:Mt} ${i[0]?.layerDescription?rt`<p class="group-note">${i[0].layerDescription}</p>`:Mt} ${i.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?rt`<p class="footnote">${this.t("Base")}. ${e}</p>`:Mt}</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 rt`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(r,"name")}</span> ${B()} ${r.position?rt`<span class="interp-aside"><small>${y(r,"position")}</small></span>`:Mt}</summary><div class="interp-body">${r.description?rt`<p>${r.description}</p>`:Mt} ${s.length>0?rt`<dl class="facets">${s.map(o=>rt`<dt>${o.label}</dt><dd>${o.body}</dd>`)}</dl>`:Mt}</div></details>`}};Ps.styles=[u,M,F,Mu`.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}`],Ps=m([Eu("roxy-hd-variables")],Ps);function Lc(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}}import{css as Pu,html as Br,nothing as $c}from"lit";import{customElement as _u}from"lit/decorators.js";var Nu={udaya:"Rose",asta:"Set"},Iu={udaya:"rises",asta:"sets"},_s=class extends g{renderData(r){let e=r.grahas??[];return e.length?Br`<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=L(r.graha)??"";return Br`<article class="row"><div class="row-top"><span class="graha">${e?Br`<span class="glyph">${e}</span>`:$c}${r.graha} </span><span class="state ${r.visible?"visible":"invisible"}">${r.visible?this.t("Visible"):this.t("Invisible")} </span>${r.retrograde?Br`<span class="retro" title="${this.t("retrograde")}">R</span>`:$c}</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(Iu[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:H(this.effectiveLang(),e.datetime)};return Br`${r.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",a):this.t("Invisible until it {{event}} {{where}} on {{when}}",a)}`}return t?Br`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Nu[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:H(this.effectiveLang(),t.datetime)})}`:Br`${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 Br`${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}`}};_s.styles=[u,Pu`.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}`],_s=m([_u("roxy-heliacal-table")],_s);import{css as Gu,html as Ke,nothing as at}from"lit";import{customElement as Ou}from"lit/decorators.js";var Ns=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 Ke`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,a,s,o,i)} ${l?Ke`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${B()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:at}</article>`}renderHexagram(r,e,t,a,s,o,i){let l=t??this.derivedLines(e),c=new Set(a??[]),p=!this.hideReadings;return Ke`<div class="glyphs" part="chart">${e.symbol?Ke`<div class="symbol">${e.symbol}</div>`:at} ${l.length>0?Ke`<div class="lines" aria-hidden="true">${l.slice().reverse().map((d,h)=>{let x=l.length-1-h+1,v=c.has(x),b=d===6||d===8;return Ke`<div class="line ${`${b?"broken":"solid"}${v?" changing":""}`}">${b?Ke`<span class="seg"></span><span class="seg"></span>`:Ke`<span class="seg"></span>`}</div>`})}</div>`:at}</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?Ke`<time class="daily-date" part="details" datetime="${i}">${k(this.effectiveLang(),i)}</time>`:at}<p class="subtitle">${e.chinese?Ke`${e.chinese}`:at} ${e.pinyin?Ke`· ${e.pinyin}`:at}</p><div class="trigrams" part="details">${e.upperTrigram?Ke`<div>${this.t("Upper")} <span class="tri-glyph">${fi(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:at} ${e.lowerTrigram?Ke`<div>${this.t("Lower")} <span class="tri-glyph">${fi(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:at}</div>${e.judgment&&p?Ke`<p class="judgment">${e.judgment}</p>`:at} ${e.image&&p?Ke`<p class="image">${e.image}</p>`:at} ${o&&p?Ke`<p class="message">${o}</p>`:at} ${e.interpretation?.general&&p?Ke`<p>${e.interpretation.general}</p>`:at} ${c.size>0?Ke`<div class="changing" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((d,h)=>d-h).join(", ")})}</div>`:at} ${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"):at}renderLines(r,e,t){let a=r??[];if(a.length===0)return at;let s=e.size>0,o=s?a.filter(l=>e.has(l.position)):a;if(o.length===0)return at;let i=o.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Ke`<p class="line-meaning">${l.meaning}</p>`:at}));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):[]}};Ns.styles=[u,M,F,Gu`.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)}`],Ns=m([Ou("roxy-hexagram")],Ns);import{css as Bu,html as Tn,nothing as tl}from"lit";import{customElement as Fu}from"lit/decorators.js";var Is=class extends g{renderData(r){let e=r.dayHoras??[],t=r.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Tn`<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?Tn`<p class="subtitle">${k(this.effectiveLang(),r.date)}</p>`:tl}</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?tl:Tn`<div class="col"><p class="section-label">${r}</p>${e.map(t=>Tn`<div class="row"><span class="glyph" aria-hidden="true">${L(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${sr(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Tn`<span class="num">${t.number}</span>`:tl}</div>`)}</div>`}};Is.styles=[u,Bu`.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}}`],Is=m([Fu("roxy-hora-table")],Is);import{css as Hu,html as T,nothing as Y}from"lit";import{customElement as ju,property as wc}from"lit/decorators.js";var Ku={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Vu={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},qu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],Yu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Fr=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",a=P(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,o=this.effectiveLang(),i="date"in e&&e.date&&k(o,e.date)||"week"in e&&e.week&&k(o,e.week)||"month"in e&&e.month&&hr(o,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return T`<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(Ku[this.period])}</h2>${i?T`<div class="date">${i}</div>`:Y}</div>${s!==null?T`<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>`:Y}</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?Y:T`<div class="lucky" part="details">${l!==void 0?T`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:Y} ${c?T`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:Y} ${p.length?T`<span>${this.t("Lucky numbers")} <strong>${p.join(", ")}</strong></span>`:Y} ${d.length?T`<span>${this.t("Lucky days")} <strong>${d.join(", ")}</strong></span>`:Y} ${h.length?T`<span class="compat-wrap">${this.t("Best with")} <span class="compat">${h.map(x=>T`<span>${x}</span>`)}</span></span>`:Y}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return Y;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):Y;let a=this.paragraphs(e.overview);return T`${a.length?T`<div class="overview" part="section overview">${a}</div>`:Y}<div class="sections" part="section outlook">${qu.map(([s,o])=>{let i=this.paragraphs(e[s]);return i.length?T`<div class="section"><h3>${this.t(o)}</h3>${i}</div>`:Y})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?Y:T`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>T`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return Y;let t=this.effectiveLang();return T`<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(T`<time class="row-when" datetime="${a.at}">${hr(t,a.at,"time")}</time>`,this.renderEventBodies(a),T`<span class="kind">${this.t(Vu[a.type])}</span> <span>${this.t("House")} ${a.house}</span> ${a.sign?T`<span>${this.glyphName(P(a.sign),A(a.sign))}</span>`:Y} ${a.through?T`<span>${this.t("through {{date}}",{date:k(t,a.through)})}</span>`:Y}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(a=>this.glyphName(L(a),a));if(t.length===2&&e.aspect){let a=yt({type:e.aspect});return T`${t[0]} <span class="${Gt[a]??""}">${as(e.aspect)??e.aspect}</span> ${t[1]}`}return T`${t}`}renderYear(e){if(!("themes"in e))return Y;let t=this.effectiveLang();return T`${e.themes.length?T`<section part="section themes"><h3 class="block-title">${this.t("Themes")}</h3><ul class="rows">${e.themes.map(a=>this.renderRow(Ct(t,a.from,a.to),T`${this.glyphName(L(a.body),a.body)} ${this.glyphName(P(a.sign),A(a.sign))}`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${e.keyPeriods.length?T`<section part="section key-periods"><h3 class="block-title">${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(a=>this.renderRow(Ct(t,a.from,a.to),this.glyphName(L(a.body),a.body),T`<span>${this.t("House")} ${a.house}</span><span>${a.focus}</span>`))}</ul></section>`:Y} ${e.eclipses.length?T`<section part="section eclipses"><h3 class="block-title">${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(a=>this.renderRow(k(t,a.date),T`<span class="name">${a.kind}</span>`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${e.retrogrades.length?T`<section part="section retrogrades"><h3 class="block-title">${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(a=>this.renderRow(k(t,a.date),T`${this.glyphName(L(a.body),a.body)} <span>${a.direction}</span>`,T`<span>${this.t("House")} ${a.house}</span><span>${a.theme}</span>`))}</ul></section>`:Y} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return Y;let t=this.effectiveLang(),a=Yu.filter(([s])=>e[s]);return a.length===0?Y:T`<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?T`<div class="tile"><span class="tile-label">${this.t(o)}</span> <span class="tile-value">${hr(t,i.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:i.count})}</span></div>`:Y})}</div></section>`}renderRow(e,t,a,s){return T`<li class="row" part="label-track">${s?.when==="element"?e:T`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${a}</span></li>`}glyphName(e,t){return T`<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 Y;let o=P(t)??"";return T`<div class="sky" part="section sky">${t||a?T`<div class="moon-line">${t?T`<span><span class="lbl">${this.t("Moon")}</span> <span aria-hidden="true">${o}</span> <b>${t}</b></span>`:Y} ${a?T`<span><span class="lbl">${this.t("Phase")}</span> <b>${a}</b></span>`:Y}</div>`:Y} ${s.length?T`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(i=>T`<li>${i}</li>`)}</ul>`:Y}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],a=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&a.length===0?Y:T`${t.length&&!this.hideReadings?T`<section part="section week-by-week"><h3 class="block-title">${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>T`<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?T`<p class="week-advice">${s.advice}</p>`:Y}</div></div>`)}</div></section>`:Y} ${a.length?T`<section part="section key-dates"><h3 class="block-title">${this.t("Key dates")}</h3><dl class="dates" part="label-track">${a.map(s=>T`<div class="date-row"><dt>${k(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:Y}`}};Fr.styles=[u,Ir,Hu`.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([wc({type:String,reflect:!0})],Fr.prototype,"period",2),m([wc({type:String,reflect:!0})],Fr.prototype,"layout",2),Fr=m([ju("roxy-horoscope-card")],Fr);import{css as Uu,html as de,nothing as Wt}from"lit";import{customElement as Zu,state as Wu}from"lit/decorators.js";var Xu=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Vo=[1,2,3,4];function rl(n,r){return n?typeof r=="number"?`${n} ${r}`:n:""}function kc(n){return[...new Set(n.map(String))].join(" > ")}function Ju(n){return[...new Set(n??[])]}var Ta=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 de`<div class="wrap" part="card" aria-label="KP chart" tabindex="0"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?de`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?Ze(t.longitude):t.sign??""} </strong>${t.nakshatra?de`· ${rl(t.nakshatra,t.pada)}`:Wt} ${t.subLord?de`· sub lord ${t.subLord}`:Wt} ${typeof t.kpNumber=="number"?de`· KP ${t.kpNumber}`:Wt}</div>`:Wt} ${typeof e.meta?.ayanamsa=="number"?de`<div class="ayan">Ayanamsa: ${ra(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?de`· ${e.meta.houseSystem} houses`:Wt}</div>`:Wt}</header>${ot({items:Xu,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?de`<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=>de`<tr><td class="body">${t.name}${t.retrograde?de`<span class="retro">R</span>`:Wt}</td><td class="num">${typeof t.longitude=="number"?Ze(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${rl(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>`:de`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?de`<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=>de`<tr><td class="body num">${a.house}${this.renderThemes(vi(a.house,t))}</td><td class="num">${typeof a.longitude=="number"?Ze(a.longitude):a.sign??""}</td><td>${a.signLord??""}</td><td>${rl(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>`:de`<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?de`<p class="roxy-empty" role="status">No significators</p>`:de`${this.renderLevelLegend(a)} ${a.length?de`<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>${Vo.map(o=>de`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${a.map(o=>de`<tr><td class="body num">${o.house}${this.renderThemes(vi(o.house,t))}</td>${Vo.map(i=>this.renderCell(this.planetsAtLevel(o,i).join(", ")))}<td class="chain">${kc(o.all??[])}</td></tr>`)}</tbody></table>`:Wt} ${s.length?de`<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>${Vo.map(o=>de`<th scope="col">L${o}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(o=>de`<tr><td class="body">${o.planet}</td>${Vo.map(i=>this.renderCell(this.housesAtLevel(o,i).join(", ")))}<td class="chain">${kc(o.allHouses??[])}${this.renderThemes(or(Ju(o.allHouses),t))}</td></tr>`)}</tbody></table>`:Wt}`}renderThemes(e){return e?de`<span class="themes">${e}</span>`:Wt}renderCell(e){return e?de`<td>${e}</td>`:de`<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?Wt:de`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((a,s)=>a[0]-s[0]).map(([a,s])=>de`<li><b>L${a}</b>${s}</li>`)}</ul>`}};Ta.styles=[u,Ue,Uu`.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([Wu()],Ta.prototype,"activeTab",2),Ta=m([Zu("roxy-kp-chart")],Ta);import{css as Qu,html as ue,nothing as Gs}from"lit";import{customElement as ey}from"lit/decorators.js";var ty={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},ry={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},ay={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},sy={gain:"Gain",loss:"Loss"},ny={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Os=class extends g{renderData(r){return r.layers?ue`<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">${U(this.effectiveLang(),{ayanamsa:r.ayanamsa,ayanamsaDegrees:r.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(r){let e=this.effectiveLang();return ue`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${H(e,r.date)}</span></div><div class="verdict-row"><span class="verdict ${r.band}">${this.t(ty[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>${H(e,r.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${He(e,r.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${He(e,r.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(r){let e=r.significators,t=this.effectiveLang(),a=s=>ue`<div class="chips">${s.map(o=>ue`<span class="chip">${this.glyphName(o)}</span>`)}</div>`;return ue`<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?ue`<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=>ue`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${He(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:Gs}</section>`}renderLayer(r,e,t){let a=this.effectiveLang();return ue`<div class="block-head"><h3>${this.t(ay[r])}</h3><span class="evidence">${this.t("Weight")} ${ve(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 ue`<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=>ue`<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 ue`<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=>ue`<tr><td>${this.t(ny[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${H(e,t.startDate)}</td><td>${H(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${f(e,t.score,0)}</td><td class="num">${ve(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(r){return ue`<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=>ue`<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 ue`<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=>ue`<tr><td>${mt(e,t.from)}</td><td>${mt(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 Gs;let s=(o,i)=>ue`<span class="window ${i}"><span>${this.glyphName(o.subLord)}</span> <small>${sr(e,{start:o.from,end:o.to})}</small></span>`;return ue`<section class="block" part="section windows"><dl class="facts">${t?ue`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="chips">${s(t,"best")}</div></dd></div>`:Gs} ${a.length?ue`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="chips">${a.map(o=>s(o,"worst"))}</div></dd></div>`:Gs}</dl></section>`}glyphName(r,e=!1){let t=L(r);return ue`${t?ue`<span class="glyph" aria-hidden="true">${t}</span>`:Gs}${r}${e?ue`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:Gs}`}verdictChip(r){return ue`<span class="state ${r}">${this.t(ry[r])}</span>`}groupChip(r){return ue`<span class="chip">${this.t(sy[r])}</span>`}};Os.styles=[u,I,Qu`.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)}`],Os=m([ey("roxy-kp-finance-card")],Os);import{css as oy,html as qo,nothing as Sc}from"lit";import{customElement as iy}from"lit/decorators.js";var Bs=class extends g{renderData(r){let e=r.planets??[];return qo`<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"?qo`<span class="ayanamsa">Ayanamsa: ${f(this.effectiveLang(),r.ayanamsa,2)}°</span>`:Sc}</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=>qo`<tr><td class="planet">${t.planet} ${t.retrograde?qo`<span class="retro">R</span>`:Sc}</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>`}};Bs.styles=[u,oy`.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}`],Bs=m([iy("roxy-kp-planets-table")],Bs);import{css as ly,html as Aa,nothing as Yo}from"lit";import{customElement as dy}from"lit/decorators.js";var Fs=class extends g{renderData(r){let e=r.significators??[];return Aa`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${r.dayLord?Aa`<div class="day-lord">Day lord: <strong>${r.dayLord}</strong></div>`:Yo}</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?Aa`<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)=>Aa`<span class="rp" role="listitem"><span class="rank">${a+1}</span> ${t}</span>`)}</div>`:Yo} ${e.length?Aa`<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=or(t.signifies,r.houseThemes);return Aa`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${a?Aa`<span class="themes">${a}</span>`:Yo}</td></tr>`})}</tbody></table>`:Yo}</div>`}};Fs.styles=[u,ly`.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}`],Fs=m([dy("roxy-kp-ruling-planets")],Fs);import{css as cy,html as Je,nothing as st}from"lit";import{customElement as py,property as my}from"lit/decorators.js";var za=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),a=e.trigram;return Je`<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?Je`<span class="group">${this.t("{{direction}} group",{direction:j(t,"facing",A(e.group))})}</span>`:st}</header><div class="facts" part="details">${a?Je`<span><span class="lbl">${this.t("Trigram")}</span> <span lang="zh">${a.chinese??""}</span> ${a.symbol??""} <b>${a.english??""}</b> ${a.element??""}</span>`:st} ${a?.familyMember?Je`<span><span class="lbl">${this.t("Role")}</span>${a.familyMember}</span>`:st} ${"solarYear"in e&&typeof e.solarYear=="number"?Je`<span class="solar-year"><span class="lbl">${this.t("Year")}</span><b>${hr(t,String(e.solarYear),"year")}</b></span>`:st} ${"gender"in e&&e.gender?Je`<span class="formula-gender"><span class="lbl">${fe(t,"gender")}</span>${j(t,"gender",e.gender)}</span>`:st} ${"boundaryDate"in e&&e.boundaryDate?Je`<span>${this.t("Year boundary")} ${k(t,e.boundaryDate)}</span>`:st} ${"reassigned"in e&&e.reassigned?Je`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:st} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${Go.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?Tr(e.conventions,this.translator,this.effectiveLang()):st}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return st;let t=this.effectiveLang();return Je`${e.bestSector?Je`<span><span class="lbl">${this.t("Best")}</span><b>${j(t,"facing",e.bestSector)}</b></span>`:st} ${e.worstSector?Je`<span><span class="lbl">${this.t("Worst")}</span><b>${j(t,"facing",e.worstSector)}</b></span>`:st}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):j(e,"facing",t)}renderSector(e,t){let a=this.effectiveLang(),s=this.sectorHeading(a,t);if(t==="Center")return Je`<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 Je`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let i=o.nature==="auspicious";return Je`<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?Je`<span class="star-hanzi" lang="zh">${o.chinese}</span>`:st} <span class="domain">${o.domain??""}</span> ${typeof o.rank=="number"?Je`<span class="rank">${i?this.t("Rank"):this.t("Severity")} ${o.rank}</span>`:st}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return st;let a=this.effectiveLang(),s=t.map(o=>{let i=this.mode==="mansions"&&"reading"in o?o.reading:void 0;return!i||this.hideReadings?st:Je`<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===st)?st:Je`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};za.styles=[u,I,Oo,Ir,cy`.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([my({type:String,reflect:!0})],za.prototype,"mode",2),za=m([py("roxy-kua-card")],za);import{css as hy,html as Ma,nothing as Uo,svg as Zo}from"lit";import{customElement as gy}from"lit/decorators.js";var al=320,Et=al/2,br=128,uy=118,Rc=137,yy=152,fy=.95,xy={glyph:11},by=xy.glyph;function vr(n,r){let e=n*Math.PI/180;return{x:Et+r*Math.sin(e),y:Et-r*Math.cos(e)}}var vy=[{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"}],Hs=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(this)}renderData(e){let t=e.bodies??[],a=e.birthDetails;return Ma`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Local space")}</h2>${a?Ma`<div class="meta">${H(this.effectiveLang(),a.date,a.time)}</div>`:Uo}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary?Ma`<p class="summary">${e.summary}</p>`:Uo} ${this.renderList(t)}</div>`}renderDial(e){return Ma`<svg viewBox="0 0 ${al} ${al}" 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="${Et}" cy="${Et}" r="${br}"/><circle class="dial" cx="${Et}" cy="${Et}" r="${br*.66}" stroke-width="0.5"/><circle class="dial" cx="${Et}" cy="${Et}" r="${br*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Et}" cy="${Et}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=vr(l,br),p=vr(l,br-(l%45===0?8:4));e.push(Zo`<line class="tick" x1=${p.x} y1=${p.y} x2=${c.x} y2=${c.y} />`)}let t=vr(0,br),a=vr(180,br),s=vr(90,br),o=vr(270,br),i=vy.map(({az:l,source:c})=>{let p=vr(l,yy),d=l%90===0;return Zo`<text class=${`compass-label${d?" cardinal":""}`} x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Zo`
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=wt(yy*xy,Sc);return At(t,({b:s})=>s.azimuth,a).map(({item:s,displayLongitude:o})=>{let{b:i,i:l}=s,c=na(i.planet,l),p=i.aboveHorizon===!1,d=vr(i.azimuth,gy),h=vr(o,Sc),x=i.symbol||L(i.planet)||i.planet,v=`${i.altitude>0?"+":""}${Math.round(i.altitude)}°`;return Zo`<g>
101
+ ${e}${i}`}renderSpokes(e){let t=e.map((s,o)=>({b:s,i:o})),a=wt(fy*by,Rc);return At(t,({b:s})=>s.azimuth,a).map(({item:s,displayLongitude:o})=>{let{b:i,i:l}=s,c=na(i.planet,l),p=i.aboveHorizon===!1,d=vr(i.azimuth,uy),h=vr(o,Rc),x=i.symbol||L(i.planet)||i.planet,v=`${i.altitude>0?"+":""}${Math.round(i.altitude)}°`;return Zo`<g>
102
102
  <line class=${`spoke${p?" below":""}`} stroke=${c} x1=${Et} y1=${Et} 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:v})}</title></line>
103
103
  <text class=${`body-glyph${p?" below":""}`} fill=${c} x=${h.x} y=${h.y} text-anchor="middle" dominant-baseline="central">${x}</text>
104
- </g>`})}renderList(e){return e.length===0?Uo:Ma`<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=na(t.planet,a),o=t.aboveHorizon===!1;return Ma`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${s}`}"></span> ${t.symbol?Ma`${t.symbol}`:Uo}${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>`}};Hs.styles=[u,Ne,my`.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}`],Hs=m([hy("roxy-local-space-compass")],Hs);import{css as vy,html as Hr,nothing as al}from"lit";import{customElement as Ly,property as An,state as Ea}from"lit/decorators.js";var Qe=class extends Rr{constructor(){super(...arguments);this.endpoint=`${Vn}/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=Po(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&&Ua(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 El(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?Hr`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:Hr`<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?Hr`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:al} ${this.isOpen?Hr`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?Hr`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>Hr`<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?Hr`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:al}</div>${this.error?Hr`<p class="search-error" role="alert">${this.t(this.error)}</p>`:al}`}};Qe.styles=[u,Eo,vy`: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([An({type:String,attribute:"api-key"})],Qe.prototype,"apiKey",2),m([An({type:String,attribute:"publishable-key"})],Qe.prototype,"publishableKey",2),m([An({type:String})],Qe.prototype,"endpoint",2),m([An({type:String})],Qe.prototype,"placeholder",2),m([An({type:String,attribute:"default-value"})],Qe.prototype,"defaultValue",2),m([Ea()],Qe.prototype,"query",2),m([Ea()],Qe.prototype,"results",2),m([Ea()],Qe.prototype,"isOpen",2),m([Ea()],Qe.prototype,"isLoading",2),m([Ea()],Qe.prototype,"highlight",2),m([Ea()],Qe.prototype,"refusal",2),m([Ea()],Qe.prototype,"error",2),Qe=m([Ly("roxy-location-search")],Qe);import{css as $y,html as Xt,nothing as jr}from"lit";import{customElement as wy}from"lit/decorators.js";var Rc={forward:"Forward",reverse:"Backward"},js=class extends g{renderData(r){let e=this.effectiveLang();return Xt`<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?Xt`<span><span class="lbl">${this.t("Direction")}</span><b>${Rc[r.direction]?this.t(Rc[r.direction]):r.direction}</b></span>`:jr} ${typeof r.startAge=="number"?Xt`<span><span class="lbl">${this.t("Starts")}</span><b>${this.ageLabel(e,r.startAge,r.startAgeMonths)}</b></span>`:jr} ${r.boundaryTerm?Xt`<span><span class="lbl">${this.t("Counted to")}</span>${j(e,"boundaryTerm",r.boundaryTerm)}</span>`:jr} ${typeof r.daysToTerm=="number"?Xt`<span><span class="lbl">${this.t("Days")}</span>${z(e,r.daysToTerm)}</span>`:jr} ${r.gender?Xt`<span><span class="lbl">${this.t("Formula")}</span>${j(e,"gender",r.gender)}</span>`:jr}</div>${this.renderStrip(r,e)} ${this.renderAnnuals(r)} ${r.summary&&!this.hideReadings?Xt`<p class="summary" part="section summary">${r.summary}</p>`:jr} ${Tr(r.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(r,e,t){let a=z(r,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:a,months:z(r,t)}):this.t("{{years}} yrs",{years:a})}renderStrip(r,e){let t=r.luckPillars??[];return t.length===0?jr:Xt`<div class="strip-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(a=>Xt`<div class="pillar" part="pillar"><span class="ages">${this.t("{{start}} to {{end}}",{start:z(e,a.startAge??0),end:z(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?jr:Xt`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><div class="annuals">${e.map(t=>Xt`<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>`}};js.styles=[u,I,$y`.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}`],js=m([wy("roxy-luck-pillars")],js);import{css as ky,html as ce,nothing as ye}from"lit";import{customElement as Sy,property as Ry}from"lit/decorators.js";var Cy={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Dy={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Ty=13;function Cc(n){return"tzolkin"in n}var Pa=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),a=this.mode==="chart"&&Cc(e)?e:void 0,s=Cc(e)?e.tzolkin:e,o=s?.reading,i=o?.numberBand?Cy[o.numberBand]:void 0;return ce`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?ce`<div class="coefficient">${z(t,s.number)}</div>`:ye}<div><p class="lbl">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?ce`<span><span class="lbl">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:ye} ${s?.daySignKiche?ce`<span><span class="lbl">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:ye}</p></div></header><div class="facts" part="details">${e.date?ce`<span><span class="lbl">${this.t("Date")}</span><b>${k(t,e.date)}</b></span>`:ye} ${this.renderTrecena(t,s?.trecena)} ${a?this.renderHaabFact(t,a.haab):ye} ${a?.longCount?.formatted?ce`<span><span class="lbl">${this.t("Long Count")}</span><b>${a.longCount.formatted}</b></span>`:ye} ${a?.calendarRound?ce`<span><span class="lbl">${this.t("Calendar Round")}</span><b>${a.calendarRound}</b></span>`:ye} ${a?.yearBearer?.daySignName?ce`<span><span class="lbl">${this.t("Year Bearer")}</span><b>${z(t,a.yearBearer.number)} ${a.yearBearer.daySignName}</b></span>`:ye} ${a?.lordOfNight?.label?ce`<span><span class="lbl">${this.t("Lord of the Night")}</span><b>${a.lordOfNight.label}</b></span>`:ye} ${i?ce`<span><span class="lbl">${this.t("Character of the number")}</span><span class="band">${this.t(i)}</span></span>`:ye} ${e.conventions?.correlation?ce`<span><span class="lbl">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${j(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:ye}</div>${o?.keynote&&!this.hideReadings?ce`<p class="keynote" part="reading">${o.keynote}</p>`:ye} ${this.renderLists(o)} ${this.renderInterpretation(this.sections(a,o),"mayan-day")} ${this.renderCross(t,a?.cross)} ${a?.summary&&!this.hideReadings?ce`<p class="summary" part="reading">${a.summary}</p>`:ye}</article>`}renderTrecena(e,t){return t?ce`<span><span class="lbl">${this.t("Trecena")}</span><b>${z(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:z(e,t.dayOfTrecena),total:z(e,Ty)}):ye} ${t.rulingSignName?ce`· <span class="lbl">${this.t("Ruling sign")}</span>${t.rulingSignName}`:ye}</span>`:ye}renderHaabFact(e,t){return t?.monthName?ce`<span><span class="lbl">${this.t("Haab")}</span><b>${z(e,t.day)} ${t.monthName}</b> ${t.monthClassic?ce`(${t.monthClassic})`:ye} ${typeof t.dayOfYear=="number"?ce`· <span class="lbl">${this.t("Day of year")}</span>${z(e,t.dayOfYear)}`:ye}</span>`:ye}renderLists(e){let t=e?.strengths??[],a=e?.challenges??[];return this.hideReadings||t.length===0&&a.length===0?ye:ce`<div class="lists" part="section readings">${t.length>0?ce`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>ce`<li>${s}</li>`)}</ul></div>`:ye} ${a.length>0?ce`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${a.map(s=>ce`<li>${s}</li>`)}</ul></div>`:ye}</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=Dy[e??""];return t?this.t(t):w(e??"")}renderCross(e,t){let a=t??[];return a.length===0?ye:ce`<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=>ce`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${z(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${z(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?ce`(${s.daySignKiche})`:ye} ${s.reading&&!this.hideReadings?ce`<p part="reading">${s.reading}</p>`:ye}</td></tr>`)}</tbody></table></div></section>`}};Pa.styles=[u,F,Nr,ky`.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([Ry({type:String,reflect:!0})],Pa.prototype,"mode",2),Pa=m([Sy("roxy-mayan-day-sign")],Pa);import{css as Ay,html as Jt,nothing as Kr}from"lit";import{customElement as zy,property as My}from"lit/decorators.js";var _a=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=Ja(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Jt`<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):Kr}renderSingle(e){let t=e.meaning?.symbol||Dc(e.phase);return Jt`<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?Jt`<div class="date">${k(this.effectiveLang(),e.date)}</div>`:Kr}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Jt`<div><span>${this.t("Illumination")}</span> <strong>${ve(this.effectiveLang(),e.illumination,0)}</strong></div>`:Kr} ${typeof e.age=="number"?Jt`<div><span>${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:f(this.effectiveLang(),e.age,1)})}</strong></div>`:Kr} ${e.sign?Jt`<div><span>${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:Kr} ${typeof e.distance=="number"?Jt`<div><span>${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:f(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:Kr}</div>${e.meaning?.description&&!this.hideReadings?Jt`<p class="meaning">${e.meaning.description}</p>`:Kr} ${e.meaning?.keywords?.length&&!this.hideReadings?Jt`<div class="keywords">${e.meaning.keywords.map(a=>Jt`<span>${a}</span>`)}</div>`:Kr}</article>`}renderListItem(e){let t=Dc(e.phase);return Jt`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${k(this.effectiveLang(),e.date)}</span></div>`}};_a.styles=[u,Ay`.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([My({type:String,reflect:!0})],_a.prototype,"mode",2),_a=m([zy("roxy-moon-phase")],_a);function Dc(n){return Ul(n)??"🌙"}import{css as Ey,html as Qt,nothing as pr}from"lit";import{customElement as Py}from"lit/decorators.js";var Ks=class extends g{renderData(r){let e=r.remedies;return Qt`<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"?Qt`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:r.number})}</span>`:pr} ${r.range?Qt`<span class="range">${r.range}</span>`:pr}</header><dl class="facts" part="details">${r.lord?Qt`<div class="fact"><dt>${this.t("Lord")}</dt><dd>${r.lord}</dd></div>`:pr} ${r.deity?Qt`<div class="fact"><dt>${this.t("Deity")}</dt><dd>${r.deity}</dd></div>`:pr} ${r.symbol?Qt`<div class="fact"><dt>${this.t("Symbol")}</dt><dd>${r.symbol}</dd></div>`:pr}</dl>${r.characteristics&&!this.hideReadings?Qt`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${r.characteristics}</p></div>`:pr} ${e&&!this.hideReadings?Qt`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?Qt`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:pr} ${e.gemstones?Qt`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:pr} ${e.rituals?Qt`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:pr}</div></div>`:pr}</article>`}};Ks.styles=[u,Ey`.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)}`],Ks=m([Py("roxy-nakshatra-card")],Ks);import{css as Fy,html as _,nothing as ne,svg as _t}from"lit";import{css as _y,html as vt,nothing as Pt}from"lit";import{customElement as Ny}from"lit/decorators.js";var Vs=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 vt`<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?vt`<div part="details"><p class="birth-date">${H(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${o.map(i=>vt`<div><dt>${fe(this.effectiveLang(),i)}</dt><dd>${f(this.effectiveLang(),t[i],5)}</dd></div>`)}</dl></div>`:Pt}</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?vt`<th scope="col">${fe(this.effectiveLang(),"latitude")}</th>`:Pt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?vt`<th scope="col">${this.t("Sect")}</th>`:Pt}</tr></thead><tbody>${e.map(i=>{let l=L(i.name)??"",c=i.sect==="day"?this.t("Daytime"):i.sect==="night"?this.t("Night"):"",p=P(i.sign)??"",d=typeof i.speed=="number"?f(this.effectiveLang(),i.speed,6):"";return vt`<tr class="${i.isPoint?"point":""}"><td class="body">${l?vt`<span class="glyph">${l}</span>`:Pt}${i.label}</td><td>${p?vt`<span class="glyph">${p}</span>`:Pt}${i.signLabel??""}</td><td class="num">${typeof i.longitude=="number"?Ze(i.longitude,i.signLabel):""}</td><td class="num">${typeof i.longitude=="number"?`${f(this.effectiveLang(),i.longitude,5)}°`:Pt}</td>${a?vt`<td class="num">${typeof i.latitude=="number"?`${f(this.effectiveLang(),i.latitude,5)}°`:Pt}</td>`:Pt}<td class="num">${typeof i.house=="number"?i.house:""}</td><td class="dignity">${i.dignity?A(i.dignity):""}</td><td class="num">${d?vt`${d}${this.t("°/day")}`:Pt} ${i.isRetrograde?vt`<span class="retro">℞</span>`:Pt}</td>${s?vt`<td>${c}</td>`:Pt}</tr>`})}</tbody></table>${r.houses?.length?vt`<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=>vt`<tr><th scope="row">${f(this.effectiveLang(),i.number,0)}</th><td>${y(i,"sign")}</td><td>${Ze(i.longitude,y(i,"sign"))}</td><td>${f(this.effectiveLang(),i.longitude,5)}°</td></tr>`)}</tbody></table></details>`:Pt}</div>`}};Vs.styles=[u,ns,_y`.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}`],Vs=m([Ny("roxy-western-planets-table")],Vs);import{customElement as Hy,property as jy,state as Ky}from"lit/decorators.js";import{ifDefined as zc}from"lit/directives/if-defined.js";import{css as Iy}from"lit";var qs=Iy`.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}`,Tc=.3,Gy=.9,Ac=.5,Oy=1.8;function Ys(n){let{strength:r}=n;if(typeof r!="number"||!Number.isFinite(r))return;let e=Math.min(1,Math.max(0,r/100)),t=Tc+e*(Gy-Tc),a=Ac+e*(Oy-Ac);return`opacity:${t.toFixed(3)};stroke-width:${a.toFixed(3)}`}var Vr=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=By(this.host.renderRoot,t,this.size[e]);a!==this.size[e]&&(this.size[e]=a,r=!0)}r&&this.host.requestUpdate()}};function By(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 Mc={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},il=540,E=il/2,Us=220,sl=202,zn=174,Mn=144,Vy=232,nl=249,ol={glyph:14,degree:7},qy=.95,Yy=3.4,Uy=1.85,Zy=1.25,Wy=.9,Xy=28,Jy=13,Wo=84,qr=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.heading="Natal chart";this.view="wheel";this.type=new Vr(this,{glyph:[".planet-glyph",ol.glyph],degree:[".planet-deg",ol.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 _`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2>${e.birthDetails?_`<div class="meta">${H(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</div>`:ne}</header>${a.length>0?_`${ot({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?_`<span>${this.t("{{count}} aspects",{count:a.length})}</span>`:ne} ${this.hasCusps&&e.houseSystem?_`<span>${this.t("{{system}} houses",{system:e.houseSystem})}</span>`:_`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${a.length>0?_`<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>`:ne}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(a)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport(_`<svg viewBox="0 0 ${il} ${il}" 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="${E}" cy="${E}" r="${Us}" stroke-width="1.5"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${sl-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${zn}" stroke-width="1"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${Wo}" 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)=>[It(i),It(l)].sort().join("|"),o=new Map;for(let i of t)o.set(s(i.planet1,i.planet2),i);return a.length===0?_`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:_`<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=L(i.name)??i.label;return _`<th scope="col" title="${i.label}">${l}</th>`})}</tr></thead><tbody>${a.slice(1).map((i,l)=>{let c=L(i.name)??i.label;return _`<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 _`<td class="empty"></td>`;let h=yt(d),x=as(h)??y(d,"type",Ae(d)),v=Gt[h]??"aspect-other",b=f(this.effectiveLang(),d.orb,1);return _`<td class="${`cell ${v}`}" title="${`${i.label} ${y(d,"type",h)} ${p.label}${b?` (${this.t("Orb")} ${b}°)`:""}`}"><span class="asp">${x}</span></td>`})} ${a.slice(l+1,-1).map(()=>_`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),a=[{longitude:e,label:this.t("ASC")},{longitude:yn(e),label:this.t("DSC")}];t!==null&&(a.push({longitude:t,label:this.t("MC")}),a.push({longitude:yn(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&a.push({longitude:$t(s),label:this.t("PoF")});let o=this.data?.vertex?.longitude;return typeof o=="number"&&a.push({longitude:$t(o),label:this.t("Vtx")}),At(a,i=>i.longitude,wt(Xy,nl)).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=C(E,E,Us,s),l=C(E,E,Vy,s),c=C(E,E,nl,o),p=Math.abs(t-e)>.5,d=C(E,E,nl-8,o);return _t`
104
+ </g>`})}renderList(e){return e.length===0?Uo:Ma`<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=na(t.planet,a),o=t.aboveHorizon===!1;return Ma`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${s}`}"></span> ${t.symbol?Ma`${t.symbol}`:Uo}${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>`}};Hs.styles=[u,Ne,hy`.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}`],Hs=m([gy("roxy-local-space-compass")],Hs);import{css as Ly,html as Hr,nothing as sl}from"lit";import{customElement as $y,property as An,state as Ea}from"lit/decorators.js";var Qe=class extends Rr{constructor(){super(...arguments);this.endpoint=`${Vn}/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=Po(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&&Ua(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 Pl(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?Hr`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:Hr`<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?Hr`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:sl} ${this.isOpen?Hr`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?Hr`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>Hr`<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?Hr`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:sl}</div>${this.error?Hr`<p class="search-error" role="alert">${this.t(this.error)}</p>`:sl}`}};Qe.styles=[u,Eo,Ly`: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([An({type:String,attribute:"api-key"})],Qe.prototype,"apiKey",2),m([An({type:String,attribute:"publishable-key"})],Qe.prototype,"publishableKey",2),m([An({type:String})],Qe.prototype,"endpoint",2),m([An({type:String})],Qe.prototype,"placeholder",2),m([An({type:String,attribute:"default-value"})],Qe.prototype,"defaultValue",2),m([Ea()],Qe.prototype,"query",2),m([Ea()],Qe.prototype,"results",2),m([Ea()],Qe.prototype,"isOpen",2),m([Ea()],Qe.prototype,"isLoading",2),m([Ea()],Qe.prototype,"highlight",2),m([Ea()],Qe.prototype,"refusal",2),m([Ea()],Qe.prototype,"error",2),Qe=m([$y("roxy-location-search")],Qe);import{css as wy,html as Xt,nothing as jr}from"lit";import{customElement as ky}from"lit/decorators.js";var Cc={forward:"Forward",reverse:"Backward"},js=class extends g{renderData(r){let e=this.effectiveLang();return Xt`<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?Xt`<span><span class="lbl">${this.t("Direction")}</span><b>${Cc[r.direction]?this.t(Cc[r.direction]):r.direction}</b></span>`:jr} ${typeof r.startAge=="number"?Xt`<span><span class="lbl">${this.t("Starts")}</span><b>${this.ageLabel(e,r.startAge,r.startAgeMonths)}</b></span>`:jr} ${r.boundaryTerm?Xt`<span><span class="lbl">${this.t("Counted to")}</span>${j(e,"boundaryTerm",r.boundaryTerm)}</span>`:jr} ${typeof r.daysToTerm=="number"?Xt`<span><span class="lbl">${this.t("Days")}</span>${z(e,r.daysToTerm)}</span>`:jr} ${r.gender?Xt`<span><span class="lbl">${this.t("Formula")}</span>${j(e,"gender",r.gender)}</span>`:jr}</div>${this.renderStrip(r,e)} ${this.renderAnnuals(r)} ${r.summary&&!this.hideReadings?Xt`<p class="summary" part="section summary">${r.summary}</p>`:jr} ${Tr(r.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(r,e,t){let a=z(r,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:a,months:z(r,t)}):this.t("{{years}} yrs",{years:a})}renderStrip(r,e){let t=r.luckPillars??[];return t.length===0?jr:Xt`<div class="strip-wrap" part="chart" role="group" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(a=>Xt`<div class="pillar" part="pillar"><span class="ages">${this.t("{{start}} to {{end}}",{start:z(e,a.startAge??0),end:z(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?jr:Xt`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><div class="annuals">${e.map(t=>Xt`<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>`}};js.styles=[u,I,wy`.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}`],js=m([ky("roxy-luck-pillars")],js);import{css as Sy,html as ce,nothing as ye}from"lit";import{customElement as Ry,property as Cy}from"lit/decorators.js";var Dy={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Ty={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Ay=13;function Dc(n){return"tzolkin"in n}var Pa=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),a=this.mode==="chart"&&Dc(e)?e:void 0,s=Dc(e)?e.tzolkin:e,o=s?.reading,i=o?.numberBand?Dy[o.numberBand]:void 0;return ce`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?ce`<div class="coefficient">${z(t,s.number)}</div>`:ye}<div><p class="lbl">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?ce`<span><span class="lbl">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:ye} ${s?.daySignKiche?ce`<span><span class="lbl">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:ye}</p></div></header><div class="facts" part="details">${e.date?ce`<span><span class="lbl">${this.t("Date")}</span><b>${k(t,e.date)}</b></span>`:ye} ${this.renderTrecena(t,s?.trecena)} ${a?this.renderHaabFact(t,a.haab):ye} ${a?.longCount?.formatted?ce`<span><span class="lbl">${this.t("Long Count")}</span><b>${a.longCount.formatted}</b></span>`:ye} ${a?.calendarRound?ce`<span><span class="lbl">${this.t("Calendar Round")}</span><b>${a.calendarRound}</b></span>`:ye} ${a?.yearBearer?.daySignName?ce`<span><span class="lbl">${this.t("Year Bearer")}</span><b>${z(t,a.yearBearer.number)} ${a.yearBearer.daySignName}</b></span>`:ye} ${a?.lordOfNight?.label?ce`<span><span class="lbl">${this.t("Lord of the Night")}</span><b>${a.lordOfNight.label}</b></span>`:ye} ${i?ce`<span><span class="lbl">${this.t("Character of the number")}</span><span class="band">${this.t(i)}</span></span>`:ye} ${e.conventions?.correlation?ce`<span><span class="lbl">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${j(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:ye}</div>${o?.keynote&&!this.hideReadings?ce`<p class="keynote" part="reading">${o.keynote}</p>`:ye} ${this.renderLists(o)} ${this.renderInterpretation(this.sections(a,o),"mayan-day")} ${this.renderCross(t,a?.cross)} ${a?.summary&&!this.hideReadings?ce`<p class="summary" part="reading">${a.summary}</p>`:ye}</article>`}renderTrecena(e,t){return t?ce`<span><span class="lbl">${this.t("Trecena")}</span><b>${z(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:z(e,t.dayOfTrecena),total:z(e,Ay)}):ye} ${t.rulingSignName?ce`· <span class="lbl">${this.t("Ruling sign")}</span>${t.rulingSignName}`:ye}</span>`:ye}renderHaabFact(e,t){return t?.monthName?ce`<span><span class="lbl">${this.t("Haab")}</span><b>${z(e,t.day)} ${t.monthName}</b> ${t.monthClassic?ce`(${t.monthClassic})`:ye} ${typeof t.dayOfYear=="number"?ce`· <span class="lbl">${this.t("Day of year")}</span>${z(e,t.dayOfYear)}`:ye}</span>`:ye}renderLists(e){let t=e?.strengths??[],a=e?.challenges??[];return this.hideReadings||t.length===0&&a.length===0?ye:ce`<div class="lists" part="section readings">${t.length>0?ce`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>ce`<li>${s}</li>`)}</ul></div>`:ye} ${a.length>0?ce`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${a.map(s=>ce`<li>${s}</li>`)}</ul></div>`:ye}</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=Ty[e??""];return t?this.t(t):w(e??"")}renderCross(e,t){let a=t??[];return a.length===0?ye:ce`<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=>ce`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${z(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${z(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?ce`(${s.daySignKiche})`:ye} ${s.reading&&!this.hideReadings?ce`<p part="reading">${s.reading}</p>`:ye}</td></tr>`)}</tbody></table></div></section>`}};Pa.styles=[u,F,Nr,Sy`.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([Cy({type:String,reflect:!0})],Pa.prototype,"mode",2),Pa=m([Ry("roxy-mayan-day-sign")],Pa);import{css as zy,html as Jt,nothing as Kr}from"lit";import{customElement as My,property as Ey}from"lit/decorators.js";var _a=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=Ja(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Jt`<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):Kr}renderSingle(e){let t=e.meaning?.symbol||Tc(e.phase);return Jt`<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?Jt`<div class="date">${k(this.effectiveLang(),e.date)}</div>`:Kr}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Jt`<div><span>${this.t("Illumination")}</span> <strong>${ve(this.effectiveLang(),e.illumination,0)}</strong></div>`:Kr} ${typeof e.age=="number"?Jt`<div><span>${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:f(this.effectiveLang(),e.age,1)})}</strong></div>`:Kr} ${e.sign?Jt`<div><span>${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:Kr} ${typeof e.distance=="number"?Jt`<div><span>${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:f(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:Kr}</div>${e.meaning?.description&&!this.hideReadings?Jt`<p class="meaning">${e.meaning.description}</p>`:Kr} ${e.meaning?.keywords?.length&&!this.hideReadings?Jt`<div class="keywords">${e.meaning.keywords.map(a=>Jt`<span>${a}</span>`)}</div>`:Kr}</article>`}renderListItem(e){let t=Tc(e.phase);return Jt`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${k(this.effectiveLang(),e.date)}</span></div>`}};_a.styles=[u,zy`.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([Ey({type:String,reflect:!0})],_a.prototype,"mode",2),_a=m([My("roxy-moon-phase")],_a);function Tc(n){return Zl(n)??"🌙"}import{css as Py,html as Qt,nothing as pr}from"lit";import{customElement as _y}from"lit/decorators.js";var Ks=class extends g{renderData(r){let e=r.remedies;return Qt`<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"?Qt`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:r.number})}</span>`:pr} ${r.range?Qt`<span class="range">${r.range}</span>`:pr}</header><dl class="facts" part="details">${r.lord?Qt`<div class="fact"><dt>${this.t("Lord")}</dt><dd>${r.lord}</dd></div>`:pr} ${r.deity?Qt`<div class="fact"><dt>${this.t("Deity")}</dt><dd>${r.deity}</dd></div>`:pr} ${r.symbol?Qt`<div class="fact"><dt>${this.t("Symbol")}</dt><dd>${r.symbol}</dd></div>`:pr}</dl>${r.characteristics&&!this.hideReadings?Qt`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${r.characteristics}</p></div>`:pr} ${e&&!this.hideReadings?Qt`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?Qt`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:pr} ${e.gemstones?Qt`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:pr} ${e.rituals?Qt`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:pr}</div></div>`:pr}</article>`}};Ks.styles=[u,Py`.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)}`],Ks=m([_y("roxy-nakshatra-card")],Ks);import{css as Hy,html as _,nothing as ne,svg as _t}from"lit";import{css as Ny,html as vt,nothing as Pt}from"lit";import{customElement as Iy}from"lit/decorators.js";var Vs=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 vt`<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?vt`<div part="details"><p class="birth-date">${H(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${o.map(i=>vt`<div><dt>${fe(this.effectiveLang(),i)}</dt><dd>${f(this.effectiveLang(),t[i],5)}</dd></div>`)}</dl></div>`:Pt}</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?vt`<th scope="col">${fe(this.effectiveLang(),"latitude")}</th>`:Pt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?vt`<th scope="col">${this.t("Sect")}</th>`:Pt}</tr></thead><tbody>${e.map(i=>{let l=L(i.name)??"",c=i.sect==="day"?this.t("Daytime"):i.sect==="night"?this.t("Night"):"",p=P(i.sign)??"",d=typeof i.speed=="number"?f(this.effectiveLang(),i.speed,6):"";return vt`<tr class="${i.isPoint?"point":""}"><td class="body">${l?vt`<span class="glyph">${l}</span>`:Pt}${i.label}</td><td>${p?vt`<span class="glyph">${p}</span>`:Pt}${i.signLabel??""}</td><td class="num">${typeof i.longitude=="number"?Ze(i.longitude,i.signLabel):""}</td><td class="num">${typeof i.longitude=="number"?`${f(this.effectiveLang(),i.longitude,5)}°`:Pt}</td>${a?vt`<td class="num">${typeof i.latitude=="number"?`${f(this.effectiveLang(),i.latitude,5)}°`:Pt}</td>`:Pt}<td class="num">${typeof i.house=="number"?i.house:""}</td><td class="dignity">${i.dignity?A(i.dignity):""}</td><td class="num">${d?vt`${d}${this.t("°/day")}`:Pt} ${i.isRetrograde?vt`<span class="retro">℞</span>`:Pt}</td>${s?vt`<td>${c}</td>`:Pt}</tr>`})}</tbody></table>${r.houses?.length?vt`<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=>vt`<tr><th scope="row">${f(this.effectiveLang(),i.number,0)}</th><td>${y(i,"sign")}</td><td>${Ze(i.longitude,y(i,"sign"))}</td><td>${f(this.effectiveLang(),i.longitude,5)}°</td></tr>`)}</tbody></table></details>`:Pt}</div>`}};Vs.styles=[u,ns,Ny`.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}`],Vs=m([Iy("roxy-western-planets-table")],Vs);import{customElement as jy,property as Ky,state as Vy}from"lit/decorators.js";import{ifDefined as Mc}from"lit/directives/if-defined.js";import{css as Gy}from"lit";var qs=Gy`.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}`,Ac=.3,Oy=.9,zc=.5,By=1.8;function Ys(n){let{strength:r}=n;if(typeof r!="number"||!Number.isFinite(r))return;let e=Math.min(1,Math.max(0,r/100)),t=Ac+e*(Oy-Ac),a=zc+e*(By-zc);return`opacity:${t.toFixed(3)};stroke-width:${a.toFixed(3)}`}var Vr=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=Fy(this.host.renderRoot,t,this.size[e]);a!==this.size[e]&&(this.size[e]=a,r=!0)}r&&this.host.requestUpdate()}};function Fy(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 Ec={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},ll=540,E=ll/2,Us=220,nl=202,zn=174,Mn=144,qy=232,ol=249,il={glyph:14,degree:7},Yy=.95,Uy=3.4,Zy=1.85,Wy=1.25,Xy=.9,Jy=28,Qy=13,Wo=84,qr=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.heading="Natal chart";this.view="wheel";this.type=new Vr(this,{glyph:[".planet-glyph",il.glyph],degree:[".planet-deg",il.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 _`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t(this.heading)}</h2>${e.birthDetails?_`<div class="meta">${H(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</div>`:ne}</header>${a.length>0?_`${ot({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?_`<span>${this.t("{{count}} aspects",{count:a.length})}</span>`:ne} ${this.hasCusps&&e.houseSystem?_`<span>${this.t("{{system}} houses",{system:e.houseSystem})}</span>`:_`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${a.length>0?_`<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>`:ne}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(a)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport(_`<svg viewBox="0 0 ${ll} ${ll}" 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="${E}" cy="${E}" r="${Us}" stroke-width="1.5"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${nl-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${zn}" stroke-width="1"/><circle class="wheel-line" cx="${E}" cy="${E}" r="${Wo}" 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)=>[It(i),It(l)].sort().join("|"),o=new Map;for(let i of t)o.set(s(i.planet1,i.planet2),i);return a.length===0?_`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:_`<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=L(i.name)??i.label;return _`<th scope="col" title="${i.label}">${l}</th>`})}</tr></thead><tbody>${a.slice(1).map((i,l)=>{let c=L(i.name)??i.label;return _`<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 _`<td class="empty"></td>`;let h=yt(d),x=as(h)??y(d,"type",Ae(d)),v=Gt[h]??"aspect-other",b=f(this.effectiveLang(),d.orb,1);return _`<td class="${`cell ${v}`}" title="${`${i.label} ${y(d,"type",h)} ${p.label}${b?` (${this.t("Orb")} ${b}°)`:""}`}"><span class="asp">${x}</span></td>`})} ${a.slice(l+1,-1).map(()=>_`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),a=[{longitude:e,label:this.t("ASC")},{longitude:yn(e),label:this.t("DSC")}];t!==null&&(a.push({longitude:t,label:this.t("MC")}),a.push({longitude:yn(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&a.push({longitude:$t(s),label:this.t("PoF")});let o=this.data?.vertex?.longitude;return typeof o=="number"&&a.push({longitude:$t(o),label:this.t("Vtx")}),At(a,i=>i.longitude,wt(Jy,ol)).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=C(E,E,Us,s),l=C(E,E,qy,s),c=C(E,E,ol,o),p=Math.abs(t-e)>.5,d=C(E,E,ol-8,o);return _t`
105
105
  <g>
106
106
  <line class="angle-tick" x1=${i.x} y1=${i.y} x2=${l.x} y2=${l.y} />
107
107
  ${p?_t`<line class="angle-tick" x1=${l.x} y1=${l.y} x2=${d.x} y2=${d.y} />`:ne}
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=C(E,E,zn,s),i=C(E,E,Us,s);return _t`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}renderSigns(){return we.map((e,t)=>{let a=this.toAngle(t*30+15),s=C(E,E,sl,a);return _t`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${P(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((a,s)=>{let o=e[(s+1)%12],i=ro(a.longitude,o?o.longitude:a.longitude+30),l=C(E,E,zn-12,this.toAngle(i));return _t`<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=C(E,E,zn-12,o),l=s+1;return _t`<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?sl-14:Us-5,i=C(E,E,o,a),l=C(E,E,Us,a);e.push(_t`<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=C(E,E,zn+9,a);return _t`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Ot(t.longitude)}</text>`}):ne}renderPlanets(e){let t=this.type.size.degree>ol.degree,a=qy*this.type.size.glyph,s={width:a,height:a},o=x=>({width:((t?Uy:Yy)+(x?Zy:0))*this.type.size.degree,height:Wy*this.type.size.degree}),i=(x,v,b)=>{let S=o(x.isRetrograde===!0),N=Mn-ur(v,s,S,nr);return b===0?N:Math.min(N,Math.max(N-Jy,Wo+nr+ed(v,S)))},l=wt(a,Mn),c=o(!0),p=Math.max(l,wt(c.width,Mn-ur(90,s,c,nr))/2),d=At(e,x=>x.longitude,p),h=td(d,({item:x,displayLongitude:v},b)=>{let S=this.toAngle(v);return{...C(E,E,i(x,S,b),S),...o(x.isRetrograde===!0)}});return d.map((x,v)=>{let{item:b,longitude:S,displayLongitude:N}=x,ee=this.toAngle(S),Ye=this.toAngle(N),Sr=C(E,E,Mn,Ye),Ur=C(E,E,i(b,Ye,h[v]??0),Ye),Zr=C(E,E,Us-4,ee),Wr=C(E,E,Mn+8,Ye),pn=y(b,"name"),On=L(b.name)??pn,wl=b.isRetrograde===!0,kl=Ot(b.longitude),sp=t?`${Tt(b.longitude).degree}°`:kl,np=Math.abs(N-S)>.5;return _t`<g>
111
- ${np?_t`<line class="planet-leader" x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:ne}
112
- <text class="planet-glyph" x=${Sr.x} y=${Sr.y} text-anchor="middle" dominant-baseline="central"><title>${pn}${wl?` ${this.t("retrograde")}`:""} - ${kl} ${y(b,"sign")}</title>${On}</text>
113
- <text class="planet-deg" x=${Ur.x} y=${Ur.y} text-anchor="middle" dominant-baseline="central">${sp}${wl?_t`<tspan class="retro"> ℞</tspan>`:ne}</text>
114
- </g>`})}renderPositionDetails(e){return _`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${zc(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 ne;let a=Jn(e,"retrogradePlanets");return _`<div class="details" part="details">${e?.dominantElement||e?.dominantModality?_`<div class="pill-row">${e.dominantElement?_`<span class="pill">${this.t("Dominant element")}: ${y(e,"dominantElement")}</span>`:ne} ${e.dominantModality?_`<span class="pill">${this.t("Dominant modality")}: ${y(e,"dominantModality")}</span>`:ne}</div>`:ne} ${t?_`<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>`:ne} ${a.length>0?_`<div class="pill-row">${a.map(({value:s,label:o})=>{let i=L(s)??"";return _`<span class="pill pill--muted">${i} ${o} R</span>`})}</div>`:ne} ${t?.summary&&!this.hideReadings?_`<p class="summary">${t.summary}</p>`:ne} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return ne;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=we,l=this.data?.summary,c={};for(let v of t)c[v]={Cardinal:[],Fixed:[],Mutable:[]};let p=0;for(let v of e){let b=i.indexOf(A(v.sign??""));if(b<0)continue;let S=t[b%4],N=a[b%3],ee=L(v.name)??y(v,"name");c[S]?.[N]?.push(ee),p++}if(p===0)return ne;let d=v=>t.reduce((b,S)=>b+(c[S]?.[v]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([v,b])=>({label:s[A(v)]??v,count:b})),...Object.entries(l?.modalityDistribution??{}).map(([v,b])=>({label:o[A(v)]?.full??v,count:b}))],x=Object.values(l?.elementDistribution??{}).reduce((v,b)=>v+b,0);return _`${h.length?_`<section class="block" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p>${this.t("{{count}} planets",{count:x})}</p><div class="pill-row">${h.map(({label:v,count:b})=>_`<span class="pill">${v}: ${f(this.effectiveLang(),b,0)}</span>`)}</div></section>`:ne}<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(v=>_`<th scope="col" title="${o[v]?.full??v}">${o[v]?.abbr??v}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(v=>{let b=a.reduce((S,N)=>S+(c[v]?.[N]?.length??0),0);return _`<tr><th scope="row">${s[v]??v}</th>${a.map(S=>_`<td>${(c[v]?.[S]??[]).join(" ")}</td>`)}<td class="em-total">${b}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${a.map(v=>_`<td class="em-total">${d(v)}</td>`)}<td class="em-total">${p}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return ne;let t=[...e].sort((a,s)=>(Mc[a.kind]??9)-(Mc[s.kind]??9)||(s.tightness??0)-(a.tightness??0));return _`<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 _`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?_`<span class="pattern-tag">${e.element}</span>`:ne} ${e.modality?_`<span class="pattern-tag">${e.modality}</span>`:ne} ${e.dissociate?_`<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>`:ne} ${typeof e.tightness=="number"?_`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:ve(this.effectiveLang(),e.tightness,0)})}</span>`:ne}</div><div class="pattern-planets">${a.map(s=>{let o=L(s),i=!!e.apex&&s===e.apex;return _`<span class="${i?"planet-chip apex":"planet-chip"}">${o?_`<span aria-hidden="true">${o}</span>`:ne}${s}${i?_`<span class="apex-tag">${this.t("apex")}</span>`:ne}</span>`})}</div>${e.interpretation&&!this.hideReadings?_`<p class="pattern-interp">${e.interpretation}</p>`:ne}</div>`}renderAspectDetails(e){return e.length===0?ne:_`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${zc(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=L(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")} ${Ot(t.longitude)}`,body:i,extra:_`${l?_`<p>${l}</p>`:ne} ${Qr(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=It(s.name);o&&a.set(o,s.longitude)}return t.map(s=>{let o=a.get(It(s.planet1)),i=a.get(It(s.planet2));if(o===void 0||i===void 0)return ne;let l=C(E,E,Wo-2,this.toAngle(o)),c=C(E,E,Wo-2,this.toAngle(i)),p=yt(s),d=Gt[p]??"aspect-other",h=f(this.effectiveLang(),s.orb,1);return _t`<line class=${`aspect ${d}`} style=${Ys(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>`})}};qr.styles=[u,Ne,qs,Ue,M,F,Fy`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([jy({type:String})],qr.prototype,"heading",2),m([Ky()],qr.prototype,"view",2),qr=m([Hy("roxy-natal-chart")],qr);import{css as Qy,html as $,nothing as R}from"lit";import{customElement as ef,property as tf}from"lit/decorators.js";var rf=new Set([11,22,33]),af=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Na=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(sf[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 $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Xo(e.number,e.type))} ${e.meaning?.description&&a?$`<p class="meaning">${e.meaning.description}</p>`:R} ${e.calculation?$`<pre class="calc" part="calculation">${e.calculation}</pre>`:R} ${e.hasKarmicDebt&&e.karmicDebtNumber?$`<div class="karmic" part="section karmic-debt">${this.t("Karmic debt")} ${e.karmicDebtNumber}. ${a?nf(e.karmicDebtMeaning):""}</div>`:R} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let a=!this.hideReadings;return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Xo(e.number,e.type))} ${e.dailyMessage&&a?$`<p class="meaning">${e.dailyMessage}</p>`:R} ${e.meaning?.description&&a?$`<p class="meaning">${e.meaning.description}</p>`:R} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?$`<p class="meaning">${e.guidance}</p>`:R}<dl class="attrs" part="details">${this.attr(this.t("Date"),k(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),ll(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),ll(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?$`<p class="meaning">${e.focus}</p>`:R}<dl class="attrs" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),ll(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let a=!this.hideReadings;return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?$`<p class="label">${e.cycle}</p>`:R} ${e.forecast&&a?$`<p class="meaning">${e.forecast}</p>`:R} ${a?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):R} ${e.advice&&a?$`<p class="meaning">${e.advice}</p>`:R}</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 $`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="label">${t}</p>${e.profile?.name?$`<h2 class="title">${e.profile.name}</h2>`:R} ${e.profile?.birthdate?$`<p class="label">${k(this.effectiveLang(),e.profile.birthdate)}</p>`:R}</div>${e.summary&&c?$`<p class="meaning">${e.summary}</p>`:R} ${a.length>0?$`<div class="cores" part="details cores">${a.map(([p,d])=>$`<div class="item"><div class="core-head"><span class="core-key">${w(p)}</span> <strong>${d.number??""}</strong></div>${d.meaning?.title?$`<span class="core-title">${d.meaning.title}</span>`:R} ${Xo(d.number,d.type)?$`<span class="master">${this.t("Master")} ${d.number}</span>`:R}</div>`)}</div>`:R} ${this.renderInterpretation(a.map(([p,d])=>({label:w(p),aside:[d.number!=null?`${d.number}`:"",Xo(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?$`<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>`:R} ${i?$`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${i.title?$`<h4 class="sub-title">${[i.day?this.t("Day {{day}}",{day:i.day}):"",i.title].filter(Boolean).join(" · ")}</h4>`:R} ${i.description&&c?$`<p>${i.description}</p>`:R} ${this.renderReading(i,"numerology-birth-day-profile")}</section>`:R} ${s?this.renderInsights(s):R} ${o?$`<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>`:R}</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 $`${t?$`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?$`<div class="chips">${t.missingNumbers.map(d=>$`<span>${this.t("Missing")} ${d}</span>`)}</div>`:$`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?$`<div class="chips">${c.map(([d,h])=>$`<span>${d} x ${h}</span>`)}</div>`:R} ${this.renderInterpretation((t.lessons??[]).map(d=>({label:d.lesson??`Lesson ${d.number}`,aside:d.number!=null?`${d.number}`:"",body:d.description??"",extra:d.howToOvercome?$`<p><strong>${this.t("How to overcome")}.</strong> ${d.howToOvercome}</p>`:R})),"numerology-karmic-lessons","Lessons")}</section>`:R}${a?.hasKarmicDebt?$`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${a.debtNumbers?.length?$`<div class="chips">${a.debtNumbers.map(d=>$`<span>${this.t("Debt")} ${d}</span>`)}</div>`:R} ${this.renderInterpretation((a.meanings??[]).map(d=>({label:`${this.t("Karmic debt")} ${d.number}`,body:d.description??"",extra:$`${d.challenge?$`<p><strong>${this.t("Challenge")}.</strong> ${d.challenge}</p>`:R}${d.resolution?$`<p><strong>${this.t("Resolution")}.</strong> ${d.resolution}</p>`:R}`})),"numerology-karmic-debt","Debts")}</section>`:R}${s?$`<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?$`<p>${s.forecast}</p>`:R} ${p?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):R} ${s.advice&&p?$`<p>${s.advice}</p>`:R} ${s.personalMonth?$`<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>`:R}</section>`:R}${e.pinnacles?.length&&p?$`<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}`:"",Ec(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>`:R}${e.challenges?.length&&p?$`<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}`:"",Ec(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:$`${d.meaning?.lesson?$`<p><strong>${this.t("Lesson")}.</strong> ${d.meaning.lesson}</p>`:R}${d.meaning?.howToOvercome?$`<p><strong>${this.t("How to overcome")}.</strong> ${d.meaning.howToOvercome}</p>`:R}`})),"numerology-challenges","Obstacle periods")}</section>`:R}${o||i?$`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${o?$`<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?$`<p>${o.description}</p>`:R} ${typeof o.count=="number"?$`<p class="label">${this.t("Appears {{count}} times in the name",{count:o.count})}</p>`:R}</div>`:R} ${i?$`<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?$`<p>${i.description}</p>`:R} ${i.uniqueNumbers?.length?$`<p class="label">${this.t("Numbers present: {{list}}",{list:He(this.effectiveLang(),i.uniqueNumbers.map(String))})}</p>`:R}</div>`:R}</section>`:R}${l&&p?$`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:dl(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:dl(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:dl(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:R}`}renderHero(e,t,a,s=!1){return $`<div class="hero" part="header">${typeof t=="number"?$`<div class="numeral">${t}</div>`:R}<div><p class="label">${e}</p>${a?$`<h2 class="title">${a}</h2>`:R} ${s?$`<span class="master">${this.t("Master number")}</span>`:R}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return R;let a=af.map(([s,o])=>({label:o,body:e[s]??""}));return $`${e.keywords?.length?$`<div class="chips">${e.keywords.map(s=>$`<span>${s}</span>`)}</div>`:R}${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?R:$`<div class="lists">${t.map(([a,s])=>$`<div><h3>${this.t(a)}</h3><ul>${(s??[]).map(o=>$`<li>${o}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?R:$`<div class="attr"><dt>${e}</dt><dd>${t}</dd></div>`}};Na.styles=[u,M,F,Qy`.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([tf({type:String,reflect:!0})],Na.prototype,"type",2),Na=m([ef("roxy-numerology-card")],Na);var sf={"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 nf(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function Xo(n,r){return r==="master"||n!==void 0&&rf.has(n)}function ll(n,r){return[n!=null?`${n}`:"",r??""].filter(Boolean).join(" · ")}function Ec(n,r){return n==null?"":r==null?`ages ${n} onward`:`ages ${n} to ${r}`}function dl(n,r){return[n??"",r!=null?`${r}`:""].filter(Boolean).join(" · ")}import{css as of,html as Le,nothing as gt}from"lit";import{customElement as lf,property as df}from"lit/decorators.js";function cl(...n){return n.filter(Boolean).join(" · ")}function pl(...n){return n.filter(Boolean).join(", ")}var Ia=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 Le`<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?k(this.effectiveLang(),t.date):""}</span></header><table part="table"><tbody>${this.limbs(e,t).map(p=>this.renderLimbRow(p))} ${t?Le`${this.renderRow(this.t("Sunrise"),mt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),mt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),mt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),mt(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?Le`${this.renderRow(this.t("Sun"),this.formatLongitude(a.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(a.moonLongitude))}`:gt}</tbody></table>${t?this.renderTransitions(t.transitions):gt} ${c?Le`<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)}`:gt}</div>`}limbs(e,t){let a=e.tithi,s=e.nakshatra,o=e.yoga,i=e.karana,l=[{label:this.t("Tithi"),value:pl(a?.name,a?.paksha?`${a.paksha} paksha`:void 0),meta:cl(a?.rulingPlanet?`Ruled by ${a.rulingPlanet}`:void 0,a?.deity?`Deity ${a.deity}`:void 0,a?.element,typeof a?.percent=="number"?`${ve(this.effectiveLang(),a.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:pl(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:cl(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:pl(i?.name,i?.type),meta:i?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:hn(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return Le`<tr><th>${e.label}</th><td>${e.value}${e.meta?Le`<small>${e.meta}</small>`:gt}</td></tr>`}renderRow(e,t){return t?Le`<tr><th>${e}</th><td>${t}</td></tr>`:gt}renderTransitions(e){return e?Le`<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>`:gt}renderPeriodRows(e){return e.map(([t,a])=>{let s=sr(this.effectiveLang(),a);return s?Le`<tr><th>${t}</th><td>${s}</td></tr>`:gt})}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 gt;let t=this.formatSpan(e.startsAt,e.endsAt);return Le`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:Le`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return gt;let t=this.formatSpan(e.startsAt,e.endsAt);return Le`<tr><th>${this.t("Panchaka")}</th><td>${e.active?Le`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?Le`<small>${t}</small>`:gt}`:Le`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?gt:Le`<div class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</div><table part="table balams"><tbody>${e?Le`<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??"")}`:gt} ${t?Le`<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>`:gt}</tbody></table>`}renderChips(e,t){return e?.length?Le`<div class="chips">${e.map(a=>Le`<span class="chip ${t}">${a}</span>`)}</div>`:Le`<span class="quiet">${this.t("None")}</span>`}renderTransitionRow(e,t){if(!t?.endsAt)return gt;let a=mt(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 Le`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?Le`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:mt(this.effectiveLang(),e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:mt(this.effectiveLang(),e.changesAt)})}</td></tr>`:gt}formatSpan(e,t){let a=sr(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:k(this.effectiveLang(),t)})}formatRashi(e){return hn(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?cl(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=sr(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?Ze(e):""}};Ia.styles=[u,of`.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([df({type:String,reflect:!0})],Ia.prototype,"detail",2),Ia=m([lf("roxy-panchang-table")],Ia);import{css as cf,html as Te,nothing as Rt}from"lit";import{customElement as pf,property as mf}from"lit/decorators.js";var Ga=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),a=t.cols;return Te`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.heading||t.title}</h2>${t.badges.length?Te`<div class="badges" part="details">${t.badges.map(s=>Te`<span class="badge"><b>${s.label}</b> ${s.value}</span>`)}</div>`:Rt}</header>${t.summary&&!this.hideReadings?Te`<p class="summary">${t.summary}</p>`:Rt}<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?Te`<th scope="col">${this.t("Natal")}</th>`:Rt} ${a.house?Te`<th scope="col" class="num">${this.t("House")}</th>`:Rt} ${a.motion?Te`<th scope="col">${this.t("Motion")}</th>`:Rt} ${a.formula?Te`<th scope="col">${this.t("Formula")}</th>`:Rt}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,a))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let a=L(e.label);return Te`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${a?Te`<span class="glyph">${a}</span>`:Rt}${e.label}</td><td>${this.signCell(e.sign,e.degree)}</td>${t.natal?Te`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Te`—`}</td>`:Rt} ${t.house?Te`<td class="num">${e.house!=null?e.house:Te`—`}</td>`:Rt} ${t.motion?Te`<td>${e.speed!=null?Te`${f(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?Te`<span class="retro">℞</span>`:Rt}`:Te`—`}</td>`:Rt} ${t.formula?Te`<td class="formula">${e.formula??Te`—`}</td>`:Rt}</tr>`}signCell(e,t){let a=P(e);return Te`<span class="sign">${a?Te`<span class="sg">${a}</span>`:Rt}${Bt(t)} ${e}</span>`}signFromLongitude(e){let t=Tt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(a=>a.interpretation).map(a=>({label:`${L(a.label)??""} ${a.label}`.trim(),aside:`${a.sign} ${Bt(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:A(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:k(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:A(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:k(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}))]}}};Ga.styles=[u,M,F,cf`.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([mf({type:String})],Ga.prototype,"heading",2),Ga=m([pf("roxy-positions-table")],Ga);import{css as hf,html as Oa,nothing as Zs}from"lit";import{customElement as gf}from"lit/decorators.js";var Ws=class extends g{renderData(r){let e=P(r.profectedSign),t=L(r.lordOfYear),a=P(r.lordNatalPosition?.sign);return Oa`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Annual profection")}</h2>${r.targetDate?Oa`<span class="badge"><b>${this.t("For")}</b> ${k(this.effectiveLang(),r.targetDate)}</span>`:Zs}</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?Oa`<span class="sg">${e}</span>`:Zs}${r.profectedSign}</span></div></div><div class="lord" part="details"><span class="label">${this.t("Lord of the year")}</span> <span class="value">${t?Oa`${t}`:Zs}${r.lordOfYear}</span> ${r.lordNatalPosition?Oa`<span class="sub">${this.t("Natal")} ${a?Oa`<span>${a}</span>`:Zs}${this.t("{{sign}} · house {{house}}",{sign:r.lordNatalPosition.sign,house:r.lordNatalPosition.house})}</span>`:Zs}</div>${r.interpretation&&!this.hideReadings?Oa`<p class="interp">${r.interpretation}</p>`:Zs}</div>`}};Ws.styles=[u,hf`.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}`],Ws=m([gf("roxy-profection-card")],Ws);import{css as uf,html as Lr,nothing as En}from"lit";import{customElement as yf}from"lit/decorators.js";var _c=["name","english","title"],ff=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),xf=new Set(["id","symbol",..._c]),Pc=48;function bf(n){return w(n).toLowerCase().replace(/\s+/g,"-")}function vf(n){return Object.values(Qa(n)).filter(r=>typeof r=="string"||typeof r=="number").map(String).join(" · ")}var Xs=class extends g{renderData(r){let e=Qa(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,x)=>{if(h!=null){if(Array.isArray(h)){let v=h.filter(b=>b!=null).map(b=>typeof b=="object"?vf(b):String(b)).filter(b=>b.length>0);v.length>0&&i.push([d,v,v.some(b=>b.length>Pc)])}else if(typeof h=="string")ff.has(d)||h.length>Pc?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"&&x<2)for(let[v,b]of Object.entries(Qa(h)))c(`${d} ${v}`,b,x+1)}};for(let[d,h]of Object.entries(e))xf.has(d)||d==="keywords"&&Array.isArray(h)||c(d,h,0);let p=!this.hideReadings;return Lr`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${a?Lr`<span class="symbol" aria-hidden="true">${a}</span>`:En}<div><p class="label">${this.t("Reference")}</p><h2 class="name">${t}</h2></div></header>${s.length>0&&p?Lr`<div class="chips">${s.map(d=>Lr`<span>${d}</span>`)}</div>`:En} ${p?o.map(([d,h])=>Lr`<p class="prose"><span class="prose-label">${fe(this.effectiveLang(),d)}</span>${h}</p>`):En} ${l.length>0?Lr`<div class="facts-wrap" part="details"><dl class="facts">${l.map(([d,h])=>Lr`<div class="fact"><dt>${fe(this.effectiveLang(),d)}</dt><dd>${h}</dd></div>`)}</dl></div>`:En} ${i.map(([d,h,x])=>x&&!p?En:Lr`<div class="list" part="section ${bf(d)}"><h3>${fe(this.effectiveLang(),d)}</h3><div class="chips">${h.map(v=>Lr`<span>${v}</span>`)}</div></div>`)}</article>`}deriveTitle(r){for(let a of _c)if(typeof r[a]=="string")return r[a];let e=typeof r.type=="string"?w(r.type):"",t=r.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Xs.styles=[u,uf`.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}`],Xs=m([yf("roxy-reference-card")],Xs);import{css as Lf,html as er,nothing as Pn}from"lit";import{customElement as $f}from"lit/decorators.js";import{ifDefined as wf}from"lit/directives/if-defined.js";var Nc=n=>L(n)??"",Js=class extends g{renderData(r){let e=r.changes,t=["latitude","longitude"];return er`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${wf(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?er`<dl class="roxy-facts" part="details">${t.map(a=>er`<div><dt>${fe(this.effectiveLang(),a==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${f(this.effectiveLang(),r.relocation[a],5)}</dd></div>`)}</dl>`:Pn}<div class="move" part="details">${typeof e?.distanceKm=="number"?er`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:z(this.effectiveLang(),e.distanceKm),direction:e.direction?j(this.effectiveLang(),"direction",A(e.direction),e.direction):""})}</span>`:Pn} ${e?er`<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>`:Pn}</div>${r.interpretation?.summary&&!this.hideReadings?er`<p class="summary">${r.interpretation.summary}</p>`:Pn} ${e?.angularPlanets?.length?er`<div part="section angular-planets"><p class="block-label">${this.t("Angular planets here")}</p><div class="chips">${Jn(e,"angularPlanets").map(({value:a,label:s})=>er`<span class="chip">${Nc(a)} ${s}</span>`)}</div></div>`:Pn}<div part="section house-changes"><p class="block-label">${this.t("Planets that change house")}</p>${e?.planetsChangedHouse?.length?er`<ul class="moves-list">${e.planetsChangedHouse.map(a=>er`<li>${Nc(a.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(a,"planet"),from:a.natalHouse,to:a.relocatedHouse})}</li>`)}</ul>`:er`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</div></section></div>`}};Js.styles=[u,ns,Lf`.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}`],Js=m([$f("roxy-relocation-wheel")],Js);import{css as kf,html as Qs,nothing as Jo}from"lit";import{customElement as Sf}from"lit/decorators.js";var ml=[{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)"}],en=class extends g{renderData(r){if(!r.planets?.length)return this.renderEmpty();let e=[...r.planets].sort((t,a)=>t.relativeRank-a.relativeRank);return Qs`<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>${U(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")}">${ml.map(t=>Qs`<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=L(r.planet)??"",t=ml.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 Qs`<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?ml.map((c,p)=>{let d=t[p];if(d<=0)return Jo;let h=d/a*100;return Qs`<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>`}):Jo}</div>${this.renderPhala(r)}</div><div class="pills">${l?Qs`<span class="rupas-label">${l}</span>`:Jo} <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 Jo;let a=f(this.effectiveLang(),e,1)||"0",s=f(this.effectiveLang(),t,1)||"0";return Qs`<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>`}};en.styles=[u,I,kf`.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}}`],en=m([Sf("roxy-shadbala-table")],en);import{css as Rf,html as K,nothing as pe,svg as Yr}from"lit";import{customElement as Cf}from"lit/decorators.js";var Df=12,gl=680,X=gl/2,Qo=204,Tf=186,Ic=160,Gc=258,Af=212,hl=224,ei=86,Oc={glyph:18,degree:10},zf=1.3,Mf=1.85,Ef=1.25,Pf=.95,_f=.9,Bc=8,Fc=4,tn=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.type=new Vr(this,{glyph:[".p1",Oc.glyph],degree:[".planet-deg",Oc.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??[],x=o?.challenges??[],v=l.length>0&&c.length>0,b=[...i].sort((N,ee)=>(ee.strength??0)-(N.strength??0)),S=b.slice(0,Df);return K`<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"?K`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:p})}">${p} / 100</span>`:pe}</div>${this.renderPeople(t,a)} ${v?K`${this.viewport.renderChartViewport(K`<svg viewBox="0 0 ${gl} ${gl}" 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="${X}" cy="${X}" r="${Qo}" stroke-width="1.5"/><circle class="wheel-line" cx="${X}" cy="${X}" r="${Qo-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${X}" cy="${X}" r="${ei}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,i)} ${this.renderRing(l,Ic,(N,ee,Ye)=>Ic-ur(N,ee,Ye,nr),"p1",1)} ${this.renderRing(c,Gc,(N,ee,Ye)=>Gc+ur(N,ee,Ye,nr),"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>`:K`<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?K`<p class="summary">${d}</p>`:pe} ${S.length>0?K`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${S.map((N,ee)=>this.renderAspectCard(N,ee))}</section>`:pe} ${b.length>S.length?this.renderCatalog(b):pe} ${!this.hideReadings&&(h.length>0||x.length>0)?K`<div class="lists" part="section strengths-challenges">${h.length?K`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(N=>K`<li>${N}</li>`)}</ul></div>`:pe} ${x.length?K`<div><h3>${this.t("Challenges")}</h3><ul>${x.map(N=>K`<li>${N}</li>`)}</ul></div>`:pe}</div>`:pe}</div>`}renderPeople(e,t){let a=(o,i)=>{if(!o)return pe;let l=o.ascendant,p=[["Sun",o.sunSign??"",y(o,"sunSign")],["Moon",o.moonSign??"",y(o,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Bt(l.degree)}`:""]].filter(([,,d])=>d);return p.length===0?pe:K`<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,x])=>K`<span><span class="lbl">${this.t(d)}</span> <span aria-hidden="true">${P(h)??""}</span> ${x}</span>`)}</div></div>`},s=[a(e,1),a(t,2)].filter(o=>o!==pe);return s.length===0?pe:K`<div class="people">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return pe;let a=(i,l)=>i?.name||this.t("Person {{n}}",{n:l}),s=a(e,1),o=a(t,2);return K`<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 pe;let i=`overlay-${s}`;return K`<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=>K`<tr><td><span aria-hidden="true">${L(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?K`<span class="retro" title="${this.t("retrograde")}">℞</span>`:pe}</td><td><span aria-hidden="true">${P(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Bt(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 pe;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return typeof e.total!="number"&&t.length===0?pe:K`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?K`<span class="pill">${this.t("Total")}: ${e.total}</span>`:pe} <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])=>K`<span class="pill">${Ae({type:a})}: ${s}</span>`)}</div>`}renderAspectCard(e,t){let a=L(e.planet1)??"",s=L(e.planet2)??"",o=(e.interpretation??"neutral").toLowerCase(),i=e.meaning,l=K`<span class="interp-lead"><span aria-hidden="true" class="glyph">${a}</span>${y(e,"planet1")} <span class="asp-name ${o}">${y(e,"type",Ae(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${y(e,"planet2")}</span>`,c=K`<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?K`<div class="interp-card" part="reading"><div class="static-head">${l}${c}</div></div>`:K`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${l}${B()}${c}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return K`<div class="interp-body">${e.relationshipContext?K`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:pe} ${e.description?.short?K`<p>${e.description.short}</p>`:pe} ${e.description?.long&&e.description.long!==e.description.short?K`<p>${e.description.long}</p>`:pe} ${Qr(e.keywords)}</div>`}renderCatalog(e){return K`<details class="catalog"><summary>${B()} ${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=C(X,X,ei,a),o=C(X,X,Qo,a);return Yr`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderSigns(){return we.map((e,t)=>{let a=this.toAngle(t*30+15),s=C(X,X,Tf,a);return Yr`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${P(e)}</text>`})}renderRing(e,t,a,s,o){let i={width:zf*this.type.size.glyph,height:Pf*this.type.size.glyph},l=d=>({width:(Mf+(d.isRetrograde===!0?Ef:0))*this.type.size.degree,height:_f*this.type.size.degree}),c=wt(i.width,t);return At(e,d=>d.longitude,(d,h)=>Math.max(c,wt((l(d).width+l(h).width)/2,a(90,i,l(d))))).map(({item:d,longitude:h,displayLongitude:x})=>{let v=this.toAngle(x),b=C(X,X,t,v),S=C(X,X,a(v,i,l(d)),v),N=L(d.name)??y(d,"name"),ee=d.isRetrograde===!0,Ye=typeof d.house=="number"?` · ${this.t("House {{n}}",{n:d.house})}`:"",Sr=`${y(d,"name")}${ee?` ${this.t("retrograde")}`:""} - ${Ot(h)} ${y(d,"sign")}${Ye}`,Ur=Math.abs(x-h)>.5,Zr=C(X,X,t+(o===1?Bc:-Bc),this.toAngle(h)),Wr=C(X,X,t+(o===1?Fc:-Fc),v);return Yr`<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=C(E,E,zn,s),i=C(E,E,Us,s);return _t`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}renderSigns(){return we.map((e,t)=>{let a=this.toAngle(t*30+15),s=C(E,E,nl,a);return _t`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${P(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((a,s)=>{let o=e[(s+1)%12],i=ro(a.longitude,o?o.longitude:a.longitude+30),l=C(E,E,zn-12,this.toAngle(i));return _t`<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=C(E,E,zn-12,o),l=s+1;return _t`<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?nl-14:Us-5,i=C(E,E,o,a),l=C(E,E,Us,a);e.push(_t`<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=C(E,E,zn+9,a);return _t`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${Ot(t.longitude)}</text>`}):ne}renderPlanets(e){let t=this.type.size.degree>il.degree,a=Yy*this.type.size.glyph,s={width:a,height:a},o=x=>({width:((t?Zy:Uy)+(x?Wy:0))*this.type.size.degree,height:Xy*this.type.size.degree}),i=(x,v,b)=>{let S=o(x.isRetrograde===!0),N=Mn-ur(v,s,S,nr);return b===0?N:Math.min(N,Math.max(N-Qy,Wo+nr+td(v,S)))},l=wt(a,Mn),c=o(!0),p=Math.max(l,wt(c.width,Mn-ur(90,s,c,nr))/2),d=At(e,x=>x.longitude,p),h=rd(d,({item:x,displayLongitude:v},b)=>{let S=this.toAngle(v);return{...C(E,E,i(x,S,b),S),...o(x.isRetrograde===!0)}});return d.map((x,v)=>{let{item:b,longitude:S,displayLongitude:N}=x,ee=this.toAngle(S),Ye=this.toAngle(N),Sr=C(E,E,Mn,Ye),Ur=C(E,E,i(b,Ye,h[v]??0),Ye),Zr=C(E,E,Us-4,ee),Wr=C(E,E,Mn+8,Ye),pn=y(b,"name"),On=L(b.name)??pn,kl=b.isRetrograde===!0,Sl=Ot(b.longitude),np=t?`${Tt(b.longitude).degree}°`:Sl,op=Math.abs(N-S)>.5;return _t`<g>
111
+ ${op?_t`<line class="planet-leader" x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:ne}
112
+ <text class="planet-glyph" x=${Sr.x} y=${Sr.y} text-anchor="middle" dominant-baseline="central"><title>${pn}${kl?` ${this.t("retrograde")}`:""} - ${Sl} ${y(b,"sign")}</title>${On}</text>
113
+ <text class="planet-deg" x=${Ur.x} y=${Ur.y} text-anchor="middle" dominant-baseline="central">${np}${kl?_t`<tspan class="retro"> ℞</tspan>`:ne}</text>
114
+ </g>`})}renderPositionDetails(e){return _`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${Mc(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 ne;let a=Jn(e,"retrogradePlanets");return _`<div class="details" part="details">${e?.dominantElement||e?.dominantModality?_`<div class="pill-row">${e.dominantElement?_`<span class="pill">${this.t("Dominant element")}: ${y(e,"dominantElement")}</span>`:ne} ${e.dominantModality?_`<span class="pill">${this.t("Dominant modality")}: ${y(e,"dominantModality")}</span>`:ne}</div>`:ne} ${t?_`<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>`:ne} ${a.length>0?_`<div class="pill-row">${a.map(({value:s,label:o})=>{let i=L(s)??"";return _`<span class="pill pill--muted">${i} ${o} R</span>`})}</div>`:ne} ${t?.summary&&!this.hideReadings?_`<p class="summary">${t.summary}</p>`:ne} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return ne;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=we,l=this.data?.summary,c={};for(let v of t)c[v]={Cardinal:[],Fixed:[],Mutable:[]};let p=0;for(let v of e){let b=i.indexOf(A(v.sign??""));if(b<0)continue;let S=t[b%4],N=a[b%3],ee=L(v.name)??y(v,"name");c[S]?.[N]?.push(ee),p++}if(p===0)return ne;let d=v=>t.reduce((b,S)=>b+(c[S]?.[v]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([v,b])=>({label:s[A(v)]??v,count:b})),...Object.entries(l?.modalityDistribution??{}).map(([v,b])=>({label:o[A(v)]?.full??v,count:b}))],x=Object.values(l?.elementDistribution??{}).reduce((v,b)=>v+b,0);return _`${h.length?_`<section class="block" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p>${this.t("{{count}} planets",{count:x})}</p><div class="pill-row">${h.map(({label:v,count:b})=>_`<span class="pill">${v}: ${f(this.effectiveLang(),b,0)}</span>`)}</div></section>`:ne}<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(v=>_`<th scope="col" title="${o[v]?.full??v}">${o[v]?.abbr??v}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(v=>{let b=a.reduce((S,N)=>S+(c[v]?.[N]?.length??0),0);return _`<tr><th scope="row">${s[v]??v}</th>${a.map(S=>_`<td>${(c[v]?.[S]??[]).join(" ")}</td>`)}<td class="em-total">${b}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${a.map(v=>_`<td class="em-total">${d(v)}</td>`)}<td class="em-total">${p}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return ne;let t=[...e].sort((a,s)=>(Ec[a.kind]??9)-(Ec[s.kind]??9)||(s.tightness??0)-(a.tightness??0));return _`<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 _`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?_`<span class="pattern-tag">${e.element}</span>`:ne} ${e.modality?_`<span class="pattern-tag">${e.modality}</span>`:ne} ${e.dissociate?_`<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>`:ne} ${typeof e.tightness=="number"?_`<span class="pattern-tight">${this.t("{{percent}} tight",{percent:ve(this.effectiveLang(),e.tightness,0)})}</span>`:ne}</div><div class="pattern-planets">${a.map(s=>{let o=L(s),i=!!e.apex&&s===e.apex;return _`<span class="${i?"planet-chip apex":"planet-chip"}">${o?_`<span aria-hidden="true">${o}</span>`:ne}${s}${i?_`<span class="apex-tag">${this.t("apex")}</span>`:ne}</span>`})}</div>${e.interpretation&&!this.hideReadings?_`<p class="pattern-interp">${e.interpretation}</p>`:ne}</div>`}renderAspectDetails(e){return e.length===0?ne:_`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${Mc(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=L(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")} ${Ot(t.longitude)}`,body:i,extra:_`${l?_`<p>${l}</p>`:ne} ${Qr(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=It(s.name);o&&a.set(o,s.longitude)}return t.map(s=>{let o=a.get(It(s.planet1)),i=a.get(It(s.planet2));if(o===void 0||i===void 0)return ne;let l=C(E,E,Wo-2,this.toAngle(o)),c=C(E,E,Wo-2,this.toAngle(i)),p=yt(s),d=Gt[p]??"aspect-other",h=f(this.effectiveLang(),s.orb,1);return _t`<line class=${`aspect ${d}`} style=${Ys(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>`})}};qr.styles=[u,Ne,qs,Ue,M,F,Hy`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([Ky({type:String})],qr.prototype,"heading",2),m([Vy()],qr.prototype,"view",2),qr=m([jy("roxy-natal-chart")],qr);import{css as ef,html as $,nothing as R}from"lit";import{customElement as tf,property as rf}from"lit/decorators.js";var af=new Set([11,22,33]),sf=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Na=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(nf[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 $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Xo(e.number,e.type))} ${e.meaning?.description&&a?$`<p class="meaning">${e.meaning.description}</p>`:R} ${e.calculation?$`<pre class="calc" part="calculation">${e.calculation}</pre>`:R} ${e.hasKarmicDebt&&e.karmicDebtNumber?$`<div class="karmic" part="section karmic-debt">${this.t("Karmic debt")} ${e.karmicDebtNumber}. ${a?of(e.karmicDebtMeaning):""}</div>`:R} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let a=!this.hideReadings;return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Xo(e.number,e.type))} ${e.dailyMessage&&a?$`<p class="meaning">${e.dailyMessage}</p>`:R} ${e.meaning?.description&&a?$`<p class="meaning">${e.meaning.description}</p>`:R} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?$`<p class="meaning">${e.guidance}</p>`:R}<dl class="attrs" part="details">${this.attr(this.t("Date"),k(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),dl(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),dl(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?$`<p class="meaning">${e.focus}</p>`:R}<dl class="attrs" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),dl(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let a=!this.hideReadings;return $`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?$`<p class="label">${e.cycle}</p>`:R} ${e.forecast&&a?$`<p class="meaning">${e.forecast}</p>`:R} ${a?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):R} ${e.advice&&a?$`<p class="meaning">${e.advice}</p>`:R}</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 $`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="label">${t}</p>${e.profile?.name?$`<h2 class="title">${e.profile.name}</h2>`:R} ${e.profile?.birthdate?$`<p class="label">${k(this.effectiveLang(),e.profile.birthdate)}</p>`:R}</div>${e.summary&&c?$`<p class="meaning">${e.summary}</p>`:R} ${a.length>0?$`<div class="cores" part="details cores">${a.map(([p,d])=>$`<div class="item"><div class="core-head"><span class="core-key">${w(p)}</span> <strong>${d.number??""}</strong></div>${d.meaning?.title?$`<span class="core-title">${d.meaning.title}</span>`:R} ${Xo(d.number,d.type)?$`<span class="master">${this.t("Master")} ${d.number}</span>`:R}</div>`)}</div>`:R} ${this.renderInterpretation(a.map(([p,d])=>({label:w(p),aside:[d.number!=null?`${d.number}`:"",Xo(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?$`<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>`:R} ${i?$`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${i.title?$`<h4 class="sub-title">${[i.day?this.t("Day {{day}}",{day:i.day}):"",i.title].filter(Boolean).join(" · ")}</h4>`:R} ${i.description&&c?$`<p>${i.description}</p>`:R} ${this.renderReading(i,"numerology-birth-day-profile")}</section>`:R} ${s?this.renderInsights(s):R} ${o?$`<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>`:R}</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 $`${t?$`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?$`<div class="chips">${t.missingNumbers.map(d=>$`<span>${this.t("Missing")} ${d}</span>`)}</div>`:$`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?$`<div class="chips">${c.map(([d,h])=>$`<span>${d} x ${h}</span>`)}</div>`:R} ${this.renderInterpretation((t.lessons??[]).map(d=>({label:d.lesson??`Lesson ${d.number}`,aside:d.number!=null?`${d.number}`:"",body:d.description??"",extra:d.howToOvercome?$`<p><strong>${this.t("How to overcome")}.</strong> ${d.howToOvercome}</p>`:R})),"numerology-karmic-lessons","Lessons")}</section>`:R}${a?.hasKarmicDebt?$`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${a.debtNumbers?.length?$`<div class="chips">${a.debtNumbers.map(d=>$`<span>${this.t("Debt")} ${d}</span>`)}</div>`:R} ${this.renderInterpretation((a.meanings??[]).map(d=>({label:`${this.t("Karmic debt")} ${d.number}`,body:d.description??"",extra:$`${d.challenge?$`<p><strong>${this.t("Challenge")}.</strong> ${d.challenge}</p>`:R}${d.resolution?$`<p><strong>${this.t("Resolution")}.</strong> ${d.resolution}</p>`:R}`})),"numerology-karmic-debt","Debts")}</section>`:R}${s?$`<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?$`<p>${s.forecast}</p>`:R} ${p?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):R} ${s.advice&&p?$`<p>${s.advice}</p>`:R} ${s.personalMonth?$`<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>`:R}</section>`:R}${e.pinnacles?.length&&p?$`<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}`:"",Pc(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>`:R}${e.challenges?.length&&p?$`<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}`:"",Pc(d.startAge,d.endAge)].filter(Boolean).join(" · "),body:d.meaning?.description??"",extra:$`${d.meaning?.lesson?$`<p><strong>${this.t("Lesson")}.</strong> ${d.meaning.lesson}</p>`:R}${d.meaning?.howToOvercome?$`<p><strong>${this.t("How to overcome")}.</strong> ${d.meaning.howToOvercome}</p>`:R}`})),"numerology-challenges","Obstacle periods")}</section>`:R}${o||i?$`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${o?$`<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?$`<p>${o.description}</p>`:R} ${typeof o.count=="number"?$`<p class="label">${this.t("Appears {{count}} times in the name",{count:o.count})}</p>`:R}</div>`:R} ${i?$`<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?$`<p>${i.description}</p>`:R} ${i.uniqueNumbers?.length?$`<p class="label">${this.t("Numbers present: {{list}}",{list:He(this.effectiveLang(),i.uniqueNumbers.map(String))})}</p>`:R}</div>`:R}</section>`:R}${l&&p?$`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:cl(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:cl(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:cl(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:R}`}renderHero(e,t,a,s=!1){return $`<div class="hero" part="header">${typeof t=="number"?$`<div class="numeral">${t}</div>`:R}<div><p class="label">${e}</p>${a?$`<h2 class="title">${a}</h2>`:R} ${s?$`<span class="master">${this.t("Master number")}</span>`:R}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return R;let a=sf.map(([s,o])=>({label:o,body:e[s]??""}));return $`${e.keywords?.length?$`<div class="chips">${e.keywords.map(s=>$`<span>${s}</span>`)}</div>`:R}${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?R:$`<div class="lists">${t.map(([a,s])=>$`<div><h3>${this.t(a)}</h3><ul>${(s??[]).map(o=>$`<li>${o}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?R:$`<div class="attr"><dt>${e}</dt><dd>${t}</dd></div>`}};Na.styles=[u,M,F,ef`.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([rf({type:String,reflect:!0})],Na.prototype,"type",2),Na=m([tf("roxy-numerology-card")],Na);var nf={"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 of(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function Xo(n,r){return r==="master"||n!==void 0&&af.has(n)}function dl(n,r){return[n!=null?`${n}`:"",r??""].filter(Boolean).join(" · ")}function Pc(n,r){return n==null?"":r==null?`ages ${n} onward`:`ages ${n} to ${r}`}function cl(n,r){return[n??"",r!=null?`${r}`:""].filter(Boolean).join(" · ")}import{css as lf,html as Le,nothing as gt}from"lit";import{customElement as df,property as cf}from"lit/decorators.js";function pl(...n){return n.filter(Boolean).join(" · ")}function ml(...n){return n.filter(Boolean).join(", ")}var Ia=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 Le`<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?k(this.effectiveLang(),t.date):""}</span></header><table part="table"><tbody>${this.limbs(e,t).map(p=>this.renderLimbRow(p))} ${t?Le`${this.renderRow(this.t("Sunrise"),mt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),mt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),mt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),mt(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?Le`${this.renderRow(this.t("Sun"),this.formatLongitude(a.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(a.moonLongitude))}`:gt}</tbody></table>${t?this.renderTransitions(t.transitions):gt} ${c?Le`<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)}`:gt}</div>`}limbs(e,t){let a=e.tithi,s=e.nakshatra,o=e.yoga,i=e.karana,l=[{label:this.t("Tithi"),value:ml(a?.name,a?.paksha?`${a.paksha} paksha`:void 0),meta:pl(a?.rulingPlanet?`Ruled by ${a.rulingPlanet}`:void 0,a?.deity?`Deity ${a.deity}`:void 0,a?.element,typeof a?.percent=="number"?`${ve(this.effectiveLang(),a.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:ml(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:pl(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:ml(i?.name,i?.type),meta:i?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:hn(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return Le`<tr><th>${e.label}</th><td>${e.value}${e.meta?Le`<small>${e.meta}</small>`:gt}</td></tr>`}renderRow(e,t){return t?Le`<tr><th>${e}</th><td>${t}</td></tr>`:gt}renderTransitions(e){return e?Le`<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>`:gt}renderPeriodRows(e){return e.map(([t,a])=>{let s=sr(this.effectiveLang(),a);return s?Le`<tr><th>${t}</th><td>${s}</td></tr>`:gt})}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 gt;let t=this.formatSpan(e.startsAt,e.endsAt);return Le`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:Le`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return gt;let t=this.formatSpan(e.startsAt,e.endsAt);return Le`<tr><th>${this.t("Panchaka")}</th><td>${e.active?Le`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?Le`<small>${t}</small>`:gt}`:Le`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?gt:Le`<div class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</div><table part="table balams"><tbody>${e?Le`<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??"")}`:gt} ${t?Le`<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>`:gt}</tbody></table>`}renderChips(e,t){return e?.length?Le`<div class="chips">${e.map(a=>Le`<span class="chip ${t}">${a}</span>`)}</div>`:Le`<span class="quiet">${this.t("None")}</span>`}renderTransitionRow(e,t){if(!t?.endsAt)return gt;let a=mt(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 Le`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?Le`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:mt(this.effectiveLang(),e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:mt(this.effectiveLang(),e.changesAt)})}</td></tr>`:gt}formatSpan(e,t){let a=sr(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:k(this.effectiveLang(),t)})}formatRashi(e){return hn(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?pl(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=sr(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?Ze(e):""}};Ia.styles=[u,lf`.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([cf({type:String,reflect:!0})],Ia.prototype,"detail",2),Ia=m([df("roxy-panchang-table")],Ia);import{css as pf,html as Te,nothing as Rt}from"lit";import{customElement as mf,property as hf}from"lit/decorators.js";var Ga=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),a=t.cols;return Te`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.heading||t.title}</h2>${t.badges.length?Te`<div class="badges" part="details">${t.badges.map(s=>Te`<span class="badge"><b>${s.label}</b> ${s.value}</span>`)}</div>`:Rt}</header>${t.summary&&!this.hideReadings?Te`<p class="summary">${t.summary}</p>`:Rt}<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?Te`<th scope="col">${this.t("Natal")}</th>`:Rt} ${a.house?Te`<th scope="col" class="num">${this.t("House")}</th>`:Rt} ${a.motion?Te`<th scope="col">${this.t("Motion")}</th>`:Rt} ${a.formula?Te`<th scope="col">${this.t("Formula")}</th>`:Rt}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,a))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let a=L(e.label);return Te`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${a?Te`<span class="glyph">${a}</span>`:Rt}${e.label}</td><td>${this.signCell(e.sign,e.degree)}</td>${t.natal?Te`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Te`—`}</td>`:Rt} ${t.house?Te`<td class="num">${e.house!=null?e.house:Te`—`}</td>`:Rt} ${t.motion?Te`<td>${e.speed!=null?Te`${f(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?Te`<span class="retro">℞</span>`:Rt}`:Te`—`}</td>`:Rt} ${t.formula?Te`<td class="formula">${e.formula??Te`—`}</td>`:Rt}</tr>`}signCell(e,t){let a=P(e);return Te`<span class="sign">${a?Te`<span class="sg">${a}</span>`:Rt}${Bt(t)} ${e}</span>`}signFromLongitude(e){let t=Tt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(a=>a.interpretation).map(a=>({label:`${L(a.label)??""} ${a.label}`.trim(),aside:`${a.sign} ${Bt(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:A(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:k(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:A(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:k(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}))]}}};Ga.styles=[u,M,F,pf`.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([hf({type:String})],Ga.prototype,"heading",2),Ga=m([mf("roxy-positions-table")],Ga);import{css as gf,html as Oa,nothing as Zs}from"lit";import{customElement as uf}from"lit/decorators.js";var Ws=class extends g{renderData(r){let e=P(r.profectedSign),t=L(r.lordOfYear),a=P(r.lordNatalPosition?.sign);return Oa`<div class="wrap" part="card"><header part="header"><h2 class="title">${this.t("Annual profection")}</h2>${r.targetDate?Oa`<span class="badge"><b>${this.t("For")}</b> ${k(this.effectiveLang(),r.targetDate)}</span>`:Zs}</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?Oa`<span class="sg">${e}</span>`:Zs}${r.profectedSign}</span></div></div><div class="lord" part="details"><span class="label">${this.t("Lord of the year")}</span> <span class="value">${t?Oa`${t}`:Zs}${r.lordOfYear}</span> ${r.lordNatalPosition?Oa`<span class="sub">${this.t("Natal")} ${a?Oa`<span>${a}</span>`:Zs}${this.t("{{sign}} · house {{house}}",{sign:r.lordNatalPosition.sign,house:r.lordNatalPosition.house})}</span>`:Zs}</div>${r.interpretation&&!this.hideReadings?Oa`<p class="interp">${r.interpretation}</p>`:Zs}</div>`}};Ws.styles=[u,gf`.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}`],Ws=m([uf("roxy-profection-card")],Ws);import{css as yf,html as Lr,nothing as En}from"lit";import{customElement as ff}from"lit/decorators.js";var Nc=["name","english","title"],xf=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),bf=new Set(["id","symbol",...Nc]),_c=48;function vf(n){return w(n).toLowerCase().replace(/\s+/g,"-")}function Lf(n){return Object.values(Qa(n)).filter(r=>typeof r=="string"||typeof r=="number").map(String).join(" · ")}var Xs=class extends g{renderData(r){let e=Qa(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,x)=>{if(h!=null){if(Array.isArray(h)){let v=h.filter(b=>b!=null).map(b=>typeof b=="object"?Lf(b):String(b)).filter(b=>b.length>0);v.length>0&&i.push([d,v,v.some(b=>b.length>_c)])}else if(typeof h=="string")xf.has(d)||h.length>_c?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"&&x<2)for(let[v,b]of Object.entries(Qa(h)))c(`${d} ${v}`,b,x+1)}};for(let[d,h]of Object.entries(e))bf.has(d)||d==="keywords"&&Array.isArray(h)||c(d,h,0);let p=!this.hideReadings;return Lr`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${a?Lr`<span class="symbol" aria-hidden="true">${a}</span>`:En}<div><p class="label">${this.t("Reference")}</p><h2 class="name">${t}</h2></div></header>${s.length>0&&p?Lr`<div class="chips">${s.map(d=>Lr`<span>${d}</span>`)}</div>`:En} ${p?o.map(([d,h])=>Lr`<p class="prose"><span class="prose-label">${fe(this.effectiveLang(),d)}</span>${h}</p>`):En} ${l.length>0?Lr`<div class="facts-wrap" part="details"><dl class="facts">${l.map(([d,h])=>Lr`<div class="fact"><dt>${fe(this.effectiveLang(),d)}</dt><dd>${h}</dd></div>`)}</dl></div>`:En} ${i.map(([d,h,x])=>x&&!p?En:Lr`<div class="list" part="section ${vf(d)}"><h3>${fe(this.effectiveLang(),d)}</h3><div class="chips">${h.map(v=>Lr`<span>${v}</span>`)}</div></div>`)}</article>`}deriveTitle(r){for(let a of Nc)if(typeof r[a]=="string")return r[a];let e=typeof r.type=="string"?w(r.type):"",t=r.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Xs.styles=[u,yf`.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}`],Xs=m([ff("roxy-reference-card")],Xs);import{css as $f,html as er,nothing as Pn}from"lit";import{customElement as wf}from"lit/decorators.js";import{ifDefined as kf}from"lit/directives/if-defined.js";var Ic=n=>L(n)??"",Js=class extends g{renderData(r){let e=r.changes,t=["latitude","longitude"];return er`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${kf(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?er`<dl class="roxy-facts" part="details">${t.map(a=>er`<div><dt>${fe(this.effectiveLang(),a==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${f(this.effectiveLang(),r.relocation[a],5)}</dd></div>`)}</dl>`:Pn}<div class="move" part="details">${typeof e?.distanceKm=="number"?er`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:z(this.effectiveLang(),e.distanceKm),direction:e.direction?j(this.effectiveLang(),"direction",A(e.direction),e.direction):""})}</span>`:Pn} ${e?er`<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>`:Pn}</div>${r.interpretation?.summary&&!this.hideReadings?er`<p class="summary">${r.interpretation.summary}</p>`:Pn} ${e?.angularPlanets?.length?er`<div part="section angular-planets"><p class="block-label">${this.t("Angular planets here")}</p><div class="chips">${Jn(e,"angularPlanets").map(({value:a,label:s})=>er`<span class="chip">${Ic(a)} ${s}</span>`)}</div></div>`:Pn}<div part="section house-changes"><p class="block-label">${this.t("Planets that change house")}</p>${e?.planetsChangedHouse?.length?er`<ul class="moves-list">${e.planetsChangedHouse.map(a=>er`<li>${Ic(a.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(a,"planet"),from:a.natalHouse,to:a.relocatedHouse})}</li>`)}</ul>`:er`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</div></section></div>`}};Js.styles=[u,ns,$f`.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}`],Js=m([wf("roxy-relocation-wheel")],Js);import{css as Sf,html as Qs,nothing as Jo}from"lit";import{customElement as Rf}from"lit/decorators.js";var hl=[{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)"}],en=class extends g{renderData(r){if(!r.planets?.length)return this.renderEmpty();let e=[...r.planets].sort((t,a)=>t.relativeRank-a.relativeRank);return Qs`<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>${U(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")}">${hl.map(t=>Qs`<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=L(r.planet)??"",t=hl.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 Qs`<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?hl.map((c,p)=>{let d=t[p];if(d<=0)return Jo;let h=d/a*100;return Qs`<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>`}):Jo}</div>${this.renderPhala(r)}</div><div class="pills">${l?Qs`<span class="rupas-label">${l}</span>`:Jo} <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 Jo;let a=f(this.effectiveLang(),e,1)||"0",s=f(this.effectiveLang(),t,1)||"0";return Qs`<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>`}};en.styles=[u,I,Sf`.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}}`],en=m([Rf("roxy-shadbala-table")],en);import{css as Cf,html as K,nothing as pe,svg as Yr}from"lit";import{customElement as Df}from"lit/decorators.js";var Tf=12,ul=680,X=ul/2,Qo=204,Af=186,Gc=160,Oc=258,zf=212,gl=224,ei=86,Bc={glyph:18,degree:10},Mf=1.3,Ef=1.85,Pf=1.25,_f=.95,Nf=.9,Fc=8,Hc=4,tn=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.type=new Vr(this,{glyph:[".p1",Bc.glyph],degree:[".planet-deg",Bc.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??[],x=o?.challenges??[],v=l.length>0&&c.length>0,b=[...i].sort((N,ee)=>(ee.strength??0)-(N.strength??0)),S=b.slice(0,Tf);return K`<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"?K`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:p})}">${p} / 100</span>`:pe}</div>${this.renderPeople(t,a)} ${v?K`${this.viewport.renderChartViewport(K`<svg viewBox="0 0 ${ul} ${ul}" 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="${X}" cy="${X}" r="${Qo}" stroke-width="1.5"/><circle class="wheel-line" cx="${X}" cy="${X}" r="${Qo-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${X}" cy="${X}" r="${ei}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,i)} ${this.renderRing(l,Gc,(N,ee,Ye)=>Gc-ur(N,ee,Ye,nr),"p1",1)} ${this.renderRing(c,Oc,(N,ee,Ye)=>Oc+ur(N,ee,Ye,nr),"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>`:K`<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?K`<p class="summary">${d}</p>`:pe} ${S.length>0?K`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${S.map((N,ee)=>this.renderAspectCard(N,ee))}</section>`:pe} ${b.length>S.length?this.renderCatalog(b):pe} ${!this.hideReadings&&(h.length>0||x.length>0)?K`<div class="lists" part="section strengths-challenges">${h.length?K`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(N=>K`<li>${N}</li>`)}</ul></div>`:pe} ${x.length?K`<div><h3>${this.t("Challenges")}</h3><ul>${x.map(N=>K`<li>${N}</li>`)}</ul></div>`:pe}</div>`:pe}</div>`}renderPeople(e,t){let a=(o,i)=>{if(!o)return pe;let l=o.ascendant,p=[["Sun",o.sunSign??"",y(o,"sunSign")],["Moon",o.moonSign??"",y(o,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Bt(l.degree)}`:""]].filter(([,,d])=>d);return p.length===0?pe:K`<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,x])=>K`<span><span class="lbl">${this.t(d)}</span> <span aria-hidden="true">${P(h)??""}</span> ${x}</span>`)}</div></div>`},s=[a(e,1),a(t,2)].filter(o=>o!==pe);return s.length===0?pe:K`<div class="people">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return pe;let a=(i,l)=>i?.name||this.t("Person {{n}}",{n:l}),s=a(e,1),o=a(t,2);return K`<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 pe;let i=`overlay-${s}`;return K`<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=>K`<tr><td><span aria-hidden="true">${L(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?K`<span class="retro" title="${this.t("retrograde")}">℞</span>`:pe}</td><td><span aria-hidden="true">${P(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Bt(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 pe;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return typeof e.total!="number"&&t.length===0?pe:K`<div class="summary-pills" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?K`<span class="pill">${this.t("Total")}: ${e.total}</span>`:pe} <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])=>K`<span class="pill">${Ae({type:a})}: ${s}</span>`)}</div>`}renderAspectCard(e,t){let a=L(e.planet1)??"",s=L(e.planet2)??"",o=(e.interpretation??"neutral").toLowerCase(),i=e.meaning,l=K`<span class="interp-lead"><span aria-hidden="true" class="glyph">${a}</span>${y(e,"planet1")} <span class="asp-name ${o}">${y(e,"type",Ae(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${y(e,"planet2")}</span>`,c=K`<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?K`<div class="interp-card" part="reading"><div class="static-head">${l}${c}</div></div>`:K`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${l}${B()}${c}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return K`<div class="interp-body">${e.relationshipContext?K`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:pe} ${e.description?.short?K`<p>${e.description.short}</p>`:pe} ${e.description?.long&&e.description.long!==e.description.short?K`<p>${e.description.long}</p>`:pe} ${Qr(e.keywords)}</div>`}renderCatalog(e){return K`<details class="catalog"><summary>${B()} ${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=C(X,X,ei,a),o=C(X,X,Qo,a);return Yr`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${o.x} y2=${o.y} stroke-width="0.6" />`})}renderSigns(){return we.map((e,t)=>{let a=this.toAngle(t*30+15),s=C(X,X,Af,a);return Yr`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${P(e)}</text>`})}renderRing(e,t,a,s,o){let i={width:Mf*this.type.size.glyph,height:_f*this.type.size.glyph},l=d=>({width:(Ef+(d.isRetrograde===!0?Pf:0))*this.type.size.degree,height:Nf*this.type.size.degree}),c=wt(i.width,t);return At(e,d=>d.longitude,(d,h)=>Math.max(c,wt((l(d).width+l(h).width)/2,a(90,i,l(d))))).map(({item:d,longitude:h,displayLongitude:x})=>{let v=this.toAngle(x),b=C(X,X,t,v),S=C(X,X,a(v,i,l(d)),v),N=L(d.name)??y(d,"name"),ee=d.isRetrograde===!0,Ye=typeof d.house=="number"?` · ${this.t("House {{n}}",{n:d.house})}`:"",Sr=`${y(d,"name")}${ee?` ${this.t("retrograde")}`:""} - ${Ot(h)} ${y(d,"sign")}${Ye}`,Ur=Math.abs(x-h)>.5,Zr=C(X,X,t+(o===1?Fc:-Fc),this.toAngle(h)),Wr=C(X,X,t+(o===1?Hc:-Hc),v);return Yr`<g>
115
115
  ${Ur?Yr`<line class=${`leader ${s}`} x1=${Zr.x} y1=${Zr.y} x2=${Wr.x} y2=${Wr.y} />`:pe}
116
116
  <text class=${s} x=${b.x} y=${b.y} text-anchor="middle" dominant-baseline="central"><title>${Sr}</title>${N}<tspan class="person-tag" dy="-0.55em" dx="0.15em">${o}</tspan></text>
117
117
  <text class="planet-deg" x=${S.x} y=${S.y} text-anchor="middle" dominant-baseline="central">${Tt(h).degree}°${ee?Yr`<tspan class="retro"> ℞</tspan>`:pe}</text>
118
- </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((a,s)=>{let o=a?.ascendant;if(!o)return[];let i=we.findIndex(l=>l.toLowerCase()===o.sign.toLowerCase());return i<0?[]:[{longitude:i*30+o.degree,index:s+1}]});return At(t,a=>a.longitude,wt(34,hl)).map(({item:a,longitude:s,displayLongitude:o})=>{let i=this.toAngle(s),l=this.toAngle(o),c=C(X,X,Qo,i),p=C(X,X,Af,i),d=C(X,X,hl,l),h=C(X,X,hl-7,l);return Yr`<g>
118
+ </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((a,s)=>{let o=a?.ascendant;if(!o)return[];let i=we.findIndex(l=>l.toLowerCase()===o.sign.toLowerCase());return i<0?[]:[{longitude:i*30+o.degree,index:s+1}]});return At(t,a=>a.longitude,wt(34,gl)).map(({item:a,longitude:s,displayLongitude:o})=>{let i=this.toAngle(s),l=this.toAngle(o),c=C(X,X,Qo,i),p=C(X,X,zf,i),d=C(X,X,gl,l),h=C(X,X,gl-7,l);return Yr`<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?Yr`<line class="asc-tick" x1=${p.x} y1=${p.y} x2=${h.x} y2=${h.y} />`:pe}
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=A(i);for(let c of o)if(A(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 pe;let c=C(X,X,ei-2,this.toAngle(i)),p=C(X,X,ei-2,this.toAngle(l)),d=yt(o),h=Gt[d]??"aspect-other",x=f(this.effectiveLang(),o.orb,1);return Yr`<line class=${`aspect ${h}`} style=${Ys(o)} x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y}><title>${y(o,"planet1")} ${y(o,"type",Ae(o))} ${y(o,"planet2")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAspects(e){return K`<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?pe:K`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>K`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Ae(t))}</td><td class="orb">${f(this.effectiveLang(),t.orb,1)}</td><td>${f(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?pe:K`<td>${t.meaning?K`<details part="reading"><summary>${B()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:pe}</td>`}</tr>`)}</tbody></table>`}};tn.styles=[u,Ne,qs,M,F,Rf`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}`],tn=m([Cf("roxy-synastry-chart")],tn);import{css as Nf,html as tr,nothing as rn}from"lit";import{customElement as If,state as Gf}from"lit/decorators.js";function Ba(n,r){return j(n,"arcana",r,`${A(r)} Arcana`)}function _n(n,r){return j(n,"suit",r,A(r))}var Of=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Fa=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?Ba(o,t.arcana):"",t.suit?_n(o,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return tr`<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?tr`<p class="message">${e.dailyMessage}</p>`:rn} ${t.meaning&&l?tr`<p class="reading">${t.meaning}</p>`:rn} ${s.length>0&&l?tr`<div class="chips">${s.map(c=>tr`<span>${c}</span>`)}</div>`:rn} ${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 tr`<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?Ba(this.effectiveLang(),e.arcana):"",e.suit?_n(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>${ot({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?tr`<p class="reading">${a.description}</p>`:rn} ${s.length>0&&o?tr`<div class="chips">${s.map(i=>tr`<span>${i}</span>`)}</div>`:rn} ${this.renderGuidance(a,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,a){let s=`image ${a?"reversed":""}`;return e?tr`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:tr`<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 rn;let a=Of.map(([s,o])=>({label:this.t(o),body:e[s]??""}));return this.renderInterpretation(a,t,"Guidance")}};Fa.styles=[u,M,F,Ue,Nf`.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([Gf()],Fa.prototype,"orientation",2),Fa=m([If("roxy-tarot-card")],Fa);import{css as Bf,html as Nn,nothing as Ff}from"lit";import{customElement as Hf,property as jf}from"lit/decorators.js";var Ha=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 Nn`<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=>Nn`<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?Nn`<img class="art" src="${i.imageUrl}" alt="${i.name??this.t("Tarot card")}" loading="lazy">`:Nn`<div class="art" aria-hidden="true"></div>`}<p class="name">${i.name}</p><p class="meta">${Kf(o,i)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Nn`<div class="detail" part="detail">${this.openedRow}</div>`:Ff}</section>`}};Ha.styles=[u,Bf`.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([jf({type:String,reflect:!0})],Ha.prototype,"heading",2),Ha=m([Hf("roxy-tarot-catalog")],Ha);function Kf(n,r){let e=Ba(n,r.arcana);return r.suit?`${e} · ${_n(n,r.suit)}`:e}import{css as Vf,html as be,nothing as Lt}from"lit";import{customElement as qf,property as Yf}from"lit/decorators.js";function Uf(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var ja=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"):Uf(("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,x=i?.interpretation,v=i?.answer?i.answer.toLowerCase():"";return be`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${p}</h2>${d?be`<span class="question">"${d}"</span>`:Lt}</header>${t?be`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?be`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:be`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${c?.arcana?be`<p class="arcana">${Ba(this.effectiveLang(),c.arcana)}</p>`:Lt}</div><div class="meta" part="details"><div><span class="${`answer ${v}`}">${y(i,"answer")}</span> ${l?be`<small>· ${l}</small>`:Lt}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?be`<div class="chips">${c.keywords.map(b=>be`<span>${b}</span>`)}</div>`:Lt}</div></div>`:Lt} ${s.length>0?be`<div class="grid" part="section positions">${s.map(b=>be`<div class="card"><p class="label">${b.name??""}</p><div class="image" part="chart">${b.card?.imageUrl?be`<img src="${b.card.imageUrl}" alt="${b.card.name??this.t("Tarot card")}" class="${b.card.reversed?"reversed":""}">`:be`${b.card?.name??"?"}`}</div><p class="name">${b.card?.name??""} ${b.card?.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${b.interpretation&&!this.hideReadings?be`<p class="interp">${b.interpretation}</p>`:Lt}</div>`)}</div>`:Lt} ${o.length>0?be`<div class="grid" part="section cards">${o.map(b=>be`<div class="card"><div class="image" part="chart">${b.imageUrl?be`<img src="${b.imageUrl}" alt="${b.name??this.t("Tarot card")}" class="${b.reversed?"reversed":""}">`:be`${b.name??"?"}`}</div><p class="name">${b.name??""} ${b.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${b.meaning&&!this.hideReadings?be`<p class="interp">${b.meaning}</p>`:Lt}</div>`)}</div>`:Lt} ${h&&!this.hideReadings?be`<p class="reading">${h}</p>`:Lt} ${x&&!this.hideReadings?be`<p class="reading">${x}</p>`:Lt}</article>`}};ja.styles=[u,Vf`.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([Yf({type:String,reflect:!0})],ja.prototype,"spread",2),ja=m([qf("roxy-tarot-spread")],ja);import{css as Zf,html as Ve,nothing as Oe,svg as $r}from"lit";import{customElement as Wf,property as ul}from"lit/decorators.js";import{ifDefined as yl}from"lit/directives/if-defined.js";var xl=640,G=xl/2,Xf=212,Jf=226,In=204,Qf=186,fl=168,Hc=250,jc=142,Gn=78,ex=166,Kc={glyph:18,degree:10},tx=.95,rx=1.85,ax=1.25,sx=.9,nx=8,ox=4,ti=(n,r)=>L(n)??r,ri=n=>{let r=new Map;for(let e of n)r.set(A(e.name),e);return r},wr=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.heading="Transits";this.type=new Vr(this,{glyph:[".natal-glyph",Kc.glyph],degree:[".planet-deg",Kc.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=H(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 Ve`<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?Ve`<p class="subtitle">${[o,i].filter(Boolean).join(" · ")}</p>`:Oe}</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(Ve`<svg viewBox="0 0 ${xl} ${xl}" 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="${G}" cy="${G}" r="${In}" stroke-width="1.5"/><circle class="wheel-line" cx="${G}" cy="${G}" r="${fl}" stroke-width="0.8"/><circle class="wheel-line" cx="${G}" cy="${G}" r="${Gn}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,a)} ${this.renderRing(e,jc,(s,o,i)=>jc-ur(s,o,i,nr),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,Hc,(s,o,i)=>Hc+ur(s,o,i,nr),"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=C(G,G,s?fl:In-5,a),i=C(G,G,In,a);e.push($r`<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 we.map((e,t)=>{let a=this.toAngle(t*30),s=C(G,G,Gn,a),o=C(G,G,In,a);return $r`<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=C(G,G,Gn,o),l=C(G,G,fl,o),c=C(G,G,ex,this.toAngle(ro(t.longitude,s?.longitude??t.longitude+30)));return $r`<g>
122
+ </g>`})}renderInterAspectLines(e,t,a){let s=(o,i)=>{let l=A(i);for(let c of o)if(A(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 pe;let c=C(X,X,ei-2,this.toAngle(i)),p=C(X,X,ei-2,this.toAngle(l)),d=yt(o),h=Gt[d]??"aspect-other",x=f(this.effectiveLang(),o.orb,1);return Yr`<line class=${`aspect ${h}`} style=${Ys(o)} x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y}><title>${y(o,"planet1")} ${y(o,"type",Ae(o))} ${y(o,"planet2")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAspects(e){return K`<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?pe:K`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>K`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Ae(t))}</td><td class="orb">${f(this.effectiveLang(),t.orb,1)}</td><td>${f(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?pe:K`<td>${t.meaning?K`<details part="reading"><summary>${B()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:pe}</td>`}</tr>`)}</tbody></table>`}};tn.styles=[u,Ne,qs,M,F,Cf`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}`],tn=m([Df("roxy-synastry-chart")],tn);import{css as If,html as tr,nothing as rn}from"lit";import{customElement as Gf,state as Of}from"lit/decorators.js";function Ba(n,r){return j(n,"arcana",r,`${A(r)} Arcana`)}function _n(n,r){return j(n,"suit",r,A(r))}var Bf=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Fa=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?Ba(o,t.arcana):"",t.suit?_n(o,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return tr`<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?tr`<p class="message">${e.dailyMessage}</p>`:rn} ${t.meaning&&l?tr`<p class="reading">${t.meaning}</p>`:rn} ${s.length>0&&l?tr`<div class="chips">${s.map(c=>tr`<span>${c}</span>`)}</div>`:rn} ${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 tr`<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?Ba(this.effectiveLang(),e.arcana):"",e.suit?_n(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>${ot({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?tr`<p class="reading">${a.description}</p>`:rn} ${s.length>0&&o?tr`<div class="chips">${s.map(i=>tr`<span>${i}</span>`)}</div>`:rn} ${this.renderGuidance(a,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,a){let s=`image ${a?"reversed":""}`;return e?tr`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:tr`<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 rn;let a=Bf.map(([s,o])=>({label:this.t(o),body:e[s]??""}));return this.renderInterpretation(a,t,"Guidance")}};Fa.styles=[u,M,F,Ue,If`.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([Of()],Fa.prototype,"orientation",2),Fa=m([Gf("roxy-tarot-card")],Fa);import{css as Ff,html as Nn,nothing as Hf}from"lit";import{customElement as jf,property as Kf}from"lit/decorators.js";var Ha=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 Nn`<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=>Nn`<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?Nn`<img class="art" src="${i.imageUrl}" alt="${i.name??this.t("Tarot card")}" loading="lazy">`:Nn`<div class="art" aria-hidden="true"></div>`}<p class="name">${i.name}</p><p class="meta">${Vf(o,i)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Nn`<div class="detail" part="detail">${this.openedRow}</div>`:Hf}</section>`}};Ha.styles=[u,Ff`.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([Kf({type:String,reflect:!0})],Ha.prototype,"heading",2),Ha=m([jf("roxy-tarot-catalog")],Ha);function Vf(n,r){let e=Ba(n,r.arcana);return r.suit?`${e} · ${_n(n,r.suit)}`:e}import{css as qf,html as be,nothing as Lt}from"lit";import{customElement as Yf,property as Uf}from"lit/decorators.js";function Zf(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var ja=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"):Zf(("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,x=i?.interpretation,v=i?.answer?i.answer.toLowerCase():"";return be`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${p}</h2>${d?be`<span class="question">"${d}"</span>`:Lt}</header>${t?be`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?be`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:be`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${c?.arcana?be`<p class="arcana">${Ba(this.effectiveLang(),c.arcana)}</p>`:Lt}</div><div class="meta" part="details"><div><span class="${`answer ${v}`}">${y(i,"answer")}</span> ${l?be`<small>· ${l}</small>`:Lt}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?be`<div class="chips">${c.keywords.map(b=>be`<span>${b}</span>`)}</div>`:Lt}</div></div>`:Lt} ${s.length>0?be`<div class="grid" part="section positions">${s.map(b=>be`<div class="card"><p class="label">${b.name??""}</p><div class="image" part="chart">${b.card?.imageUrl?be`<img src="${b.card.imageUrl}" alt="${b.card.name??this.t("Tarot card")}" class="${b.card.reversed?"reversed":""}">`:be`${b.card?.name??"?"}`}</div><p class="name">${b.card?.name??""} ${b.card?.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${b.interpretation&&!this.hideReadings?be`<p class="interp">${b.interpretation}</p>`:Lt}</div>`)}</div>`:Lt} ${o.length>0?be`<div class="grid" part="section cards">${o.map(b=>be`<div class="card"><div class="image" part="chart">${b.imageUrl?be`<img src="${b.imageUrl}" alt="${b.name??this.t("Tarot card")}" class="${b.reversed?"reversed":""}">`:be`${b.name??"?"}`}</div><p class="name">${b.name??""} ${b.reversed?be`<small>${this.t("(reversed)")}</small>`:Lt}</p>${b.meaning&&!this.hideReadings?be`<p class="interp">${b.meaning}</p>`:Lt}</div>`)}</div>`:Lt} ${h&&!this.hideReadings?be`<p class="reading">${h}</p>`:Lt} ${x&&!this.hideReadings?be`<p class="reading">${x}</p>`:Lt}</article>`}};ja.styles=[u,qf`.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([Uf({type:String,reflect:!0})],ja.prototype,"spread",2),ja=m([Yf("roxy-tarot-spread")],ja);import{css as Wf,html as Ve,nothing as Oe,svg as $r}from"lit";import{customElement as Xf,property as yl}from"lit/decorators.js";import{ifDefined as fl}from"lit/directives/if-defined.js";var bl=640,G=bl/2,Jf=212,Qf=226,In=204,ex=186,xl=168,jc=250,Kc=142,Gn=78,tx=166,Vc={glyph:18,degree:10},rx=.95,ax=1.85,sx=1.25,nx=.9,ox=8,ix=4,ti=(n,r)=>L(n)??r,ri=n=>{let r=new Map;for(let e of n)r.set(A(e.name),e);return r},wr=class extends g{constructor(){super(...arguments);this.viewport=new ke(this);this.heading="Transits";this.type=new Vr(this,{glyph:[".natal-glyph",Vc.glyph],degree:[".planet-deg",Vc.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=H(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 Ve`<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?Ve`<p class="subtitle">${[o,i].filter(Boolean).join(" · ")}</p>`:Oe}</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(Ve`<svg viewBox="0 0 ${bl} ${bl}" 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="${G}" cy="${G}" r="${In}" stroke-width="1.5"/><circle class="wheel-line" cx="${G}" cy="${G}" r="${xl}" stroke-width="0.8"/><circle class="wheel-line" cx="${G}" cy="${G}" r="${Gn}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,a)} ${this.renderRing(e,Kc,(s,o,i)=>Kc-ur(s,o,i,nr),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,jc,(s,o,i)=>jc+ur(s,o,i,nr),"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=C(G,G,s?xl:In-5,a),i=C(G,G,In,a);e.push($r`<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 we.map((e,t)=>{let a=this.toAngle(t*30),s=C(G,G,Gn,a),o=C(G,G,In,a);return $r`<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=C(G,G,Gn,o),l=C(G,G,xl,o),c=C(G,G,tx,this.toAngle(ro(t.longitude,s?.longitude??t.longitude+30)));return $r`<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>`}):Oe}renderSigns(){return we.map((e,t)=>{let a=C(G,G,Qf,this.toAngle(t*30+15));return $r`<text class="sign-glyph" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${P(e)}</text>`})}renderRing(e,t,a,s,o,i){let l=tx*this.type.size.glyph,c={width:l,height:l},p=x=>({width:(rx+(x.isRetrograde===!0?ax:0))*this.type.size.degree,height:sx*this.type.size.degree}),d=wt(l,t);return At(e,x=>x.longitude,(x,v)=>Math.max(d,wt((p(x).width+p(v).width)/2,a(90,c,p(x))))).map(({item:x,longitude:v,displayLongitude:b})=>{let S=this.toAngle(b),N=C(G,G,t,S),ee=C(G,G,a(S,c,p(x)),S),Ye=x.isRetrograde===!0,Sr=`${Tt(v).degree}°`,Ur=y(x,"name"),Zr=`${o} ${Ur}${Ye?` ${this.t("retrograde")}`:""} - ${Ot(v)} ${y(x,"sign")}`,Wr=Math.abs(b-v)>.5,pn=C(G,G,t+i*nx,this.toAngle(v)),On=C(G,G,t+i*ox,S);return $r`<g>
125
+ </g>`}):Oe}renderSigns(){return we.map((e,t)=>{let a=C(G,G,ex,this.toAngle(t*30+15));return $r`<text class="sign-glyph" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${P(e)}</text>`})}renderRing(e,t,a,s,o,i){let l=rx*this.type.size.glyph,c={width:l,height:l},p=x=>({width:(ax+(x.isRetrograde===!0?sx:0))*this.type.size.degree,height:nx*this.type.size.degree}),d=wt(l,t);return At(e,x=>x.longitude,(x,v)=>Math.max(d,wt((p(x).width+p(v).width)/2,a(90,c,p(x))))).map(({item:x,longitude:v,displayLongitude:b})=>{let S=this.toAngle(b),N=C(G,G,t,S),ee=C(G,G,a(S,c,p(x)),S),Ye=x.isRetrograde===!0,Sr=`${Tt(v).degree}°`,Ur=y(x,"name"),Zr=`${o} ${Ur}${Ye?` ${this.t("retrograde")}`:""} - ${Ot(v)} ${y(x,"sign")}`,Wr=Math.abs(b-v)>.5,pn=C(G,G,t+i*ox,this.toAngle(v)),On=C(G,G,t+i*ix,S);return $r`<g>
126
126
  ${Wr?$r`<line class=${`leader ${s}`} x1=${pn.x} y1=${pn.y} x2=${On.x} y2=${On.y} />`:Oe}
127
127
  <text class=${s} x=${N.x} y=${N.y} text-anchor="middle" dominant-baseline="central"><title>${Zr}</title>${ti(x.name,Ur)}</text>
128
128
  <text class="planet-deg" x=${ee.x} y=${ee.y} text-anchor="middle" dominant-baseline="central">${Sr}${Ye?$r`<tspan class="retro"> ℞</tspan>`:Oe}</text>
129
- </g>`})}renderAspectLines(e,t,a){let s=ri(e),o=ri(t);return a.map(i=>{let l=o.get(A(i.planet1)),c=s.get(A(i.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return Oe;let p=C(G,G,Gn-2,this.toAngle(l.longitude)),d=C(G,G,Gn-2,this.toAngle(c.longitude)),h=yt(i),x=f(this.effectiveLang(),i.orb,1);return $r`<line class=${`aspect ${Gt[h]??"aspect-other"}`} style=${Ys(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")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return Oe;let t=$t(e);return[t,yn(t)].map((a,s)=>{let o=this.toAngle(a),i=C(G,G,In,o),l=C(G,G,Xf,o),c=C(G,G,Jf,o);return $r`<g>
129
+ </g>`})}renderAspectLines(e,t,a){let s=ri(e),o=ri(t);return a.map(i=>{let l=o.get(A(i.planet1)),c=s.get(A(i.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return Oe;let p=C(G,G,Gn-2,this.toAngle(l.longitude)),d=C(G,G,Gn-2,this.toAngle(c.longitude)),h=yt(i),x=f(this.effectiveLang(),i.orb,1);return $r`<line class=${`aspect ${Gt[h]??"aspect-other"}`} style=${Ys(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")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return Oe;let t=$t(e);return[t,yn(t)].map((a,s)=>{let o=this.toAngle(a),i=C(G,G,In,o),l=C(G,G,Jf,o),c=C(G,G,Qf,o);return $r`<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 Ve`<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?Ve`<span><span class="swatch swatch--harmonious"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch swatch--challenging"></span>${this.t("Challenging aspects")}</span>`:Oe} ${s?Ve`<span>${this.t("{{system}} houses",{system:s})}</span>`:Oe} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return Oe;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return Ve`<div part="details"><div class="summary-pills" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Ve`<span class="pill pill--muted">${this.t("Total")}: ${e.total}</span>`:Oe} <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])=>Ve`<span class="pill pill--muted">${Ae({type:a})}: ${s}</span>`)}</div>${e.strongest?this.renderStrongest(e.strongest):Oe}</div>`}renderStrongest(e){let t=y(e,"planet1"),a=y(e,"planet2");return Ve`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${ti(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="nature-badge ${(e.interpretation??"neutral").toLowerCase()}">${y(e,"type",Ae(e))}</span> <span aria-hidden="true" class="glyph">${ti(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 Oe;let s=ri(e),o=ri(t),i=e.length>0?e:t,l=p=>p?Ve`${P(p.sign)??""} ${Ot(p.longitude)} ${y(p,"sign")}${p.isRetrograde?Ve`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:Oe}`:Oe,c=p=>a?Ve`<td>${p&&Number.isFinite(p.house)?p.house:Oe}</td>`:Oe;return Ve`<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."):Oe}</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?Ve`<th scope="col">${this.t("Natal house")}</th>`:Oe}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${a?Ve`<th scope="col">${this.t("Transiting house")}</th>`:Oe}</tr></thead><tbody>${i.map(p=>{let d=A(p.name),h=y(p,"name");return Ve`<tr><th scope="row"><span aria-hidden="true" class="glyph">${ti(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 Ve`<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="${yl(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="${yl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?Oe:Ve`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${yl(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};wr.styles=[u,Ne,qs,M,Zf`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([ul({type:String})],wr.prototype,"heading",2),m([ul({type:Number})],wr.prototype,"ascendant",2),m([ul({type:Array})],wr.prototype,"houses",2),wr=m([Wf("roxy-transit-wheel")],wr);import{css as ix,html as Nt,nothing as bl}from"lit";import{customElement as lx,state as dx}from"lit/decorators.js";var Ka=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=[k(this.effectiveLang(),t),mt(this.effectiveLang(),a)].filter(Boolean).join(" "),c=o?.length??0,p=this.tab;return Nt`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2 class="title">${this.t("Transits")}</h2>${l?Nt`<p class="subtitle">${l}</p>`:bl}</div>${c>0?Nt`${ot({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"?Nt`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`:Nt`${i?this.renderSummaryPills(i):bl}<div class="overflow-scroll">${this.renderAspectsList(o??[])}</div>`}</div>`:Nt`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`}</div>`}renderSummaryPills(e){return Nt`<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 Nt`<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=L(t.name)??"",s=P(t.sign)??"",o=t.speed>=0?"↑":"↓";return Nt`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${a}</span> ${t.name} ${t.isRetrograde?Nt`<span class="retro-badge" aria-label="${this.t("retrograde")}">R</span>`:bl}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${t.sign}</div></td><td class="num">${Bt(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 Nt`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,a)=>{let s=L(t.transitPlanet)??"",o=L(t.natalPlanet)??"",i=(t.nature??"neutral").toLowerCase(),l=t.interpretation,c=Ae(t),p=t.isApplying?this.t("Applying"):this.t("Separating");return Nt`<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>${B()}</summary><div class="interp-body">${mn(l,this.translator)}</div></details>`})}</div>`}};Ka.styles=[u,Ue,M,gi,ix`.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([dx()],Ka.prototype,"tab",2),Ka=m([lx("roxy-transits-table")],Ka);import{css as cx,html as an,nothing as px}from"lit";import{customElement as mx}from"lit/decorators.js";var hx=[{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."}],sn=class extends g{renderData(r){let e=hx.filter(t=>r[t.key]?.length);return e.length?an`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2 class="title">${this.t("Upagrahas")}</h2>${U(this.effectiveLang(),r.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,r[t.key]))}</div>`:this.renderEmpty()}renderGroup(r,e){let t=an`<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=P(a.rashi)??"";return an`<tr><td class="name">${a.name}</td><td>${s?an`<span class="glyph">${s}</span>`:px}${a.rashi??""}</td><td class="num">${typeof a.longitude=="number"?Ze(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"?an`<section part="section time-based">${t}</section>`:an`<section part="section sun-based">${t}</section>`}};sn.styles=[u,I,cx`.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}`],sn=m([mx("roxy-upagraha-table")],sn);import{css as gx,html as me,nothing as $e,svg as nn}from"lit";import{customElement as ux,property as yx}from"lit/decorators.js";import{ifDefined as Vc}from"lit/directives/if-defined.js";var fx=["North","East","South","West"],xx={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},bx={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},vx={feet:"ft²",metres:"m²"},ai=.04,Lx=8,$x=.88;function qc(n){return"cells"in n}function wx(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 si(n,r){let e=((r?.x??0)-n.originX)/n.cellW,t=n.size-((r?.y??0)-n.originY)/n.cellH;return[Yc(e),Yc(t)]}function Yc(n){return Math.round(n*1e3)/1e3}var Va=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),a=qc(e)?e:void 0,s=this.mode==="entrance"&&!qc(e)?e:void 0,o=a?wx(a.cells??[]):kx(e.conventions?.grid);return me`<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?me`<span class="${`verdict verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:$e}</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?me`<p class="effect" part="reading">${s.effect}</p>`:$e} ${s?.reading&&!this.hideReadings?me`<p class="reading" part="reading">${s.reading}</p>`:$e} ${this.renderSources(a?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,a,s){if(!t)return $e;let o=t.size,i=`${-ai} ${-ai} ${o+ai*2} ${o+ai*2}`;return me`<div class="frame" part="chart">${fx.map(l=>me`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${j(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):$e} ${s?this.renderDoor(e,s):$e} ${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>Lx;return nn`<g>
132
+ </g>`})}renderLegend(e,t,a,s){return Ve`<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?Ve`<span><span class="swatch swatch--harmonious"></span>${this.t("Harmonious aspects")}</span> <span><span class="swatch swatch--challenging"></span>${this.t("Challenging aspects")}</span>`:Oe} ${s?Ve`<span>${this.t("{{system}} houses",{system:s})}</span>`:Oe} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return Oe;let t=Object.entries(e.byType??{}).sort((a,s)=>s[1]-a[1]);return Ve`<div part="details"><div class="summary-pills" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Ve`<span class="pill pill--muted">${this.t("Total")}: ${e.total}</span>`:Oe} <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])=>Ve`<span class="pill pill--muted">${Ae({type:a})}: ${s}</span>`)}</div>${e.strongest?this.renderStrongest(e.strongest):Oe}</div>`}renderStrongest(e){let t=y(e,"planet1"),a=y(e,"planet2");return Ve`<div class="strongest" part="details strongest"><span class="label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${ti(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="nature-badge ${(e.interpretation??"neutral").toLowerCase()}">${y(e,"type",Ae(e))}</span> <span aria-hidden="true" class="glyph">${ti(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 Oe;let s=ri(e),o=ri(t),i=e.length>0?e:t,l=p=>p?Ve`${P(p.sign)??""} ${Ot(p.longitude)} ${y(p,"sign")}${p.isRetrograde?Ve`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:Oe}`:Oe,c=p=>a?Ve`<td>${p&&Number.isFinite(p.house)?p.house:Oe}</td>`:Oe;return Ve`<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."):Oe}</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?Ve`<th scope="col">${this.t("Natal house")}</th>`:Oe}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${a?Ve`<th scope="col">${this.t("Transiting house")}</th>`:Oe}</tr></thead><tbody>${i.map(p=>{let d=A(p.name),h=y(p,"name");return Ve`<tr><th scope="row"><span aria-hidden="true" class="glyph">${ti(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 Ve`<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="${fl(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="${fl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?Oe:Ve`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${fl(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};wr.styles=[u,Ne,qs,M,Wf`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([yl({type:String})],wr.prototype,"heading",2),m([yl({type:Number})],wr.prototype,"ascendant",2),m([yl({type:Array})],wr.prototype,"houses",2),wr=m([Xf("roxy-transit-wheel")],wr);import{css as lx,html as Nt,nothing as vl}from"lit";import{customElement as dx,state as cx}from"lit/decorators.js";var Ka=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=[k(this.effectiveLang(),t),mt(this.effectiveLang(),a)].filter(Boolean).join(" "),c=o?.length??0,p=this.tab;return Nt`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2 class="title">${this.t("Transits")}</h2>${l?Nt`<p class="subtitle">${l}</p>`:vl}</div>${c>0?Nt`${ot({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"?Nt`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`:Nt`${i?this.renderSummaryPills(i):vl}<div class="overflow-scroll">${this.renderAspectsList(o??[])}</div>`}</div>`:Nt`<div class="overflow-scroll">${this.renderPlanetsTable(s)}</div>`}</div>`}renderSummaryPills(e){return Nt`<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 Nt`<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=L(t.name)??"",s=P(t.sign)??"",o=t.speed>=0?"↑":"↓";return Nt`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${a}</span> ${t.name} ${t.isRetrograde?Nt`<span class="retro-badge" aria-label="${this.t("retrograde")}">R</span>`:vl}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${t.sign}</div></td><td class="num">${Bt(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 Nt`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,a)=>{let s=L(t.transitPlanet)??"",o=L(t.natalPlanet)??"",i=(t.nature??"neutral").toLowerCase(),l=t.interpretation,c=Ae(t),p=t.isApplying?this.t("Applying"):this.t("Separating");return Nt`<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>${B()}</summary><div class="interp-body">${mn(l,this.translator)}</div></details>`})}</div>`}};Ka.styles=[u,Ue,M,gi,lx`.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([cx()],Ka.prototype,"tab",2),Ka=m([dx("roxy-transits-table")],Ka);import{css as px,html as an,nothing as mx}from"lit";import{customElement as hx}from"lit/decorators.js";var gx=[{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."}],sn=class extends g{renderData(r){let e=gx.filter(t=>r[t.key]?.length);return e.length?an`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2 class="title">${this.t("Upagrahas")}</h2>${U(this.effectiveLang(),r.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,r[t.key]))}</div>`:this.renderEmpty()}renderGroup(r,e){let t=an`<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=P(a.rashi)??"";return an`<tr><td class="name">${a.name}</td><td>${s?an`<span class="glyph">${s}</span>`:mx}${a.rashi??""}</td><td class="num">${typeof a.longitude=="number"?Ze(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"?an`<section part="section time-based">${t}</section>`:an`<section part="section sun-based">${t}</section>`}};sn.styles=[u,I,px`.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}`],sn=m([hx("roxy-upagraha-table")],sn);import{css as ux,html as me,nothing as $e,svg as nn}from"lit";import{customElement as yx,property as fx}from"lit/decorators.js";import{ifDefined as qc}from"lit/directives/if-defined.js";var xx=["North","East","South","West"],bx={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},vx={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Lx={feet:"ft²",metres:"m²"},ai=.04,$x=8,wx=.88;function Yc(n){return"cells"in n}function kx(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 si(n,r){let e=((r?.x??0)-n.originX)/n.cellW,t=n.size-((r?.y??0)-n.originY)/n.cellH;return[Uc(e),Uc(t)]}function Uc(n){return Math.round(n*1e3)/1e3}var Va=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),a=Yc(e)?e:void 0,s=this.mode==="entrance"&&!Yc(e)?e:void 0,o=a?kx(a.cells??[]):Sx(e.conventions?.grid);return me`<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?me`<span class="${`verdict verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:$e}</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?me`<p class="effect" part="reading">${s.effect}</p>`:$e} ${s?.reading&&!this.hideReadings?me`<p class="reading" part="reading">${s.reading}</p>`:$e} ${this.renderSources(a?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,a,s){if(!t)return $e;let o=t.size,i=`${-ai} ${-ai} ${o+ai*2} ${o+ai*2}`;return me`<div class="frame" part="chart">${xx.map(l=>me`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${j(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):$e} ${s?this.renderDoor(e,s):$e} ${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>$x;return nn`<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 @@ var op=Object.defineProperty;var ip=Object.getOwnPropertyDescriptor;var m=(n,r,e
138
138
  class="devata"
139
139
  x=${c+.5}
140
140
  y=${p+.68}
141
- textLength=${Vc(d?$x:void 0)}
142
- lengthAdjust=${Vc(d?"spacingAndGlyphs":void 0)}
141
+ textLength=${qc(d?wx:void 0)}
142
+ lengthAdjust=${qc(d?"spacingAndGlyphs":void 0)}
143
143
  >${i}</text
144
144
  >`:$e}
145
- </g>`}renderEmptyGrid(e){let t=[];for(let a=0;a<e;a++)for(let s=0;s<e;s++)t.push(nn`<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]=si(e,a.from),[i,l]=si(e,a.to);return nn`<line class="vamsa" x1=${s} y1=${o} x2=${i} y2=${l}></line>`})}renderBrahmasthan(e,t){let a=t??[];if(a.length<3)return $e;let s=a.map(o=>si(e,o).join(",")).join(" ");return nn`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let a=new Set(t?.atimarma??[]);return a.size===0?$e:(t?.cells??[]).filter(s=>s.square!=null&&a.has(s.square)).map(s=>{let[o,i]=si(e,s.center);return nn`<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?$e:me`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...a].map(([s,o])=>me`<li><b>${s}</b> ${o.sort((i,l)=>i-l).map(i=>z(e,i)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return me`<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 me`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${a?me`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:$e}</div>`}renderFacts(e,t,a,s){let o=t.conventions?.grid;return me`<div class="facts" part="details">${o?me`<span><span class="lbl">${fe(e,"grid")}</span><b>${j(e,"grid",o)}</b></span>`:$e} ${s?.pada!=null?me`<span><span class="lbl">${this.t("Pada")}</span><b>${z(e,s.pada)}</b></span>`:$e} ${s?.side?me`<span><span class="lbl">${this.t("Side")}</span><b>${j(e,"facing",s.side)}</b></span>`:$e} ${s?.startCorner?me`<span><span class="lbl">${this.t("Counted from")}</span>${j(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?me`· ${z(e,s.ordinalOnSide)}`:$e}</span>`:$e} ${s?.devata?.name?me`<span><span class="lbl">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?me`· ${this.t("Pada")} ${z(e,s.devata.padaCount)}`:$e}</span>`:$e} ${s?.recommendedPadas?.length?me`<span><span class="lbl">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(i=>z(e,i)).join(", ")}</span>`:$e} ${a?.brahmasthan?.area!=null?me`<span><span class="lbl">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,a.brahmasthan.area,a.conventions?.unit)}</b></span>`:$e} ${a?.marma?.areaEach!=null?me`<span><span class="lbl">${this.t("Area of one marma")}</span>${this.areaLabel(e,a.marma.areaEach,a.conventions?.unit)}</span>`:$e} ${a?.atimarma?.length?me`<span><span class="lbl">${this.t("Crossing points")}</span>${a.atimarma.map(i=>z(e,i)).join(", ")}</span>`:$e}</div>`}renderSources(e){return e.length===0?$e:me`<section part="section sources"><ul class="cites">${e.map(t=>me`<li>${$n(t)}</li>`)}</ul></section>`}areaLabel(e,t,a){let s=f(e,t,2);if(!a)return s;let o=vx[a]??`${a}²`;return me`<span title="${j(e,"unit",a)}">${s} ${o}</span>`}ringLabel(e){let t=xx[e];return t?this.t(t):w(e)}verdictLabel(e){let t=bx[e];return t?this.t(t):w(e)}};Va.styles=[u,gx`.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([yx({type:String,reflect:!0})],Va.prototype,"mode",2),Va=m([ux("roxy-vastu-mandala")],Va);function kx(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}}import{css as Sx,html as mr,nothing as on}from"lit";import{customElement as Rx}from"lit/decorators.js";var ln=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?H(this.effectiveLang(),r.datetime):"";return mr`<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?mr`<p class="subtitle">${this.t("Chart time {{when}}",{when:s})}</p>`:on}</div>${a.length>0?mr`<div part="section positions"><p class="section-label">${this.t("Sidereal positions")}</p><div class="mutual">${a.map(o=>mr`<span class="position"><strong>${o.name}</strong> ${typeof o.longitude=="number"?Ze(o.longitude):o.sign??""}</span>`)}</div></div>`:on} ${t.length>0?mr`<div part="section mutual-aspects"><p class="section-label">${this.t("Mutual aspects")}</p><div class="mutual">${t.map(o=>mr`<span class="mutual-pill">${o.planet1} ⟷ ${o.planet2} ${o.aspectType?mr`<span class="rel">${o.aspectType}</span>`:on}</span>`)}</div></div>`:on} ${e.length>0?mr`<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=>mr`<tr><td>${o.aspectingPlanet}</td><td><span class="kind">${o.aspectType}</span></td><td>${o.aspectedPlanet}</td><td>${typeof o.strength=="number"?mr`<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>`:on}</td><td class="num">${typeof o.orb=="number"?`${f(this.effectiveLang(),o.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:on}</div>`}};ln.styles=[u,Sx`.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}`],ln=m([Rx("roxy-vedic-aspects")],ln);import{css as Cx,html as Q,nothing as qe}from"lit";import{customElement as Dx}from"lit/decorators.js";var vl={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},Tx=Object.keys(vl),Uc=8,ni={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},Ax={day:"Day",finance:"Finance",natal:"Natal"},Zc={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},dn=class extends g{renderData(r){let e=r.grahas??[];return e.length?Q`<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 Q`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("Vedic daily")}</h2><span class="when">${Wn(this.effectiveLang(),r.dayStart,r.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${r.verdict}">${this.t(ni[r.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:r.evaluated})}</span></div>${e.size?Q`<div class="tally" part="legend">${Tx.filter(a=>e.get(a)).map(a=>Q`<span class="pill">${this.t(vl[a])} ${e.get(a)}</span>`)}</div>`:qe} ${r.subject?Q`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:r.subject.janmaRashi,nakshatra:r.subject.janmaNakshatra})}</p>`:qe} ${(r.degraded??[]).map(a=>Q`<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 qe;let t=(a,s)=>s?Q`<div class="fact"><dt>${a}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?Q`<span class="until">${this.t("until {{time}}",{time:H(this.effectiveLang(),s.validTo)})}</span>`:qe}</dd></div>`:qe;return Q`<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 Q`<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=L(t.graha)??"",s=this.theme(e,t.houseFromMoon);return Q`<tr><td>${a?Q`<span class="glyph">${a}</span>`:qe}${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(vl[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(r){if(!r||typeof r.number!="number")return qe;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:Uc,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)});return Q`<span class="kaksha" title="${t?`${a} · ${t}`:a}">${r.number}/${Uc} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(r){let e=r.tara??[],t=r.chandrabala??[];if(!e.length&&!t.length)return qe;let a=(s,o)=>Q`<small>${Wn(this.effectiveLang(),s,o)}</small>`;return Q`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?Q`<div class="chips">${e.map(s=>Q`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${a(s.validFrom,s.validTo)}</span>`)}</div>`:qe} ${t.length?Q`<div class="chips">${t.map(s=>Q`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?Q`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:qe} </span>${a(s.validFrom,s.validTo)}</span>`)}</div>`:qe}</section>`}renderFinance(r){let e=r.areas?.finance;if(!e)return qe;let t=r.houseThemes,a=s=>{let o=this.theme(t,s.house);return Q`<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?Q`<span class="note">${s.dashaLevels.map(i=>this.t(Zc[i])).join(", ")}</span>`:qe}</li>`};return Q`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(ni[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?Q`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:qe}</div><div class="lists">${e.drivers?.length?Q`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(a)}</ul></div>`:qe} ${e.cautions?.length?Q`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(a)}</ul></div>`:qe}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(r){return r?Q`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${r.band}">${this.t(ni[r.band])}</span> <span class="evidence">${r.score}</span></div><ul class="layers">${r.layers.map(e=>Q`<li><span>${this.t(Ax[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(ni[e.band])}</span></li>`)}</ul></div>`:qe}renderDasha(r){let e=r.dasha??[];return e.length?Q`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>Q`<span class="window"><span>${this.t(Zc[t.level])} · ${t.lord}</span> <small>${Wn(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:qe}renderProvenance(r){return r.frames?Q`<section class="block" part="section frame">${Zl(this.effectiveLang(),r.frames,this.translator)}</section>`:qe}};dn.styles=[u,I,Cx`.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)}`],dn=m([Dx("roxy-vedic-daily")],dn);import{html as Wc}from"lit";import{customElement as zx,property as Ll}from"lit/decorators.js";var kr=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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?$o(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 Wc`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${a}</h2>${U(this.effectiveLang(),e.frame,this.translator)} ${wo(t,this.translator)}</div>${So(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(Wc`<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>${ko(t,this.chartStyle,this.translator)}</svg>`,a,this.translator)}</div></div>`}};kr.styles=[u,Ne,I,Ro,Ue],m([Ll({type:String,reflect:!0,attribute:"chart-style"})],kr.prototype,"chartStyle",2),m([Ll({type:String,reflect:!0,attribute:"chart-reference"})],kr.prototype,"chartReference",2),m([Ll({type:String,reflect:!0,attribute:"lagna-override"})],kr.prototype,"lagnaOverride",2),kr=m([zx("roxy-vedic-kundli")],kr);import{css as Mx,html as he,nothing as Be}from"lit";import{customElement as Ex}from"lit/decorators.js";var Px=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Xc=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],cn=class extends g{orderedRows(){let r=this.data?.meta??{},e=new Set,t=[];for(let a of Px){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 he`<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>${U(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."):Be}</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=L(s.graha??a)??"",l=P(s.rashi)??"";return he`<tr class="${o?"lagna":""}"><td class="graha">${i?he`<span class="glyph">${i}</span>`:Be}${s.graha??a}</td><td>${l?he`<span class="glyph">${l}</span>`:Be}${s.rashi??""}</td><td class="num">${typeof s.longitude=="number"?Ze(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>${Xc.map(([c])=>he`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?he`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Be}</td>`)}<td>${s.isRetrograde?he`<span class="retro">R</span>`:Be}</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?Be:r.map((e,t)=>{let a=P(e.rashi)??"";return he`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${hn(e.planet,e.sanskritName)}</td><td>${a?he`<span class="glyph">${a}</span>`:Be}${e.rashi??""}</td><td class="num">${typeof e.longitude=="number"?Ze(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?he`<span class="retro">R</span>`:Be}</td></tr>`})}renderCombustion(){let r=this.data?.combustion??[];return r.length===0?Be:he`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>{let t=L(e.planet)??"",a=f(this.effectiveLang(),e.distanceFromSun,2),s=f(this.effectiveLang(),e.orb,1);return he`<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?Be:he`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>{let t=f(this.effectiveLang(),e.distance,2);return he`<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 Be;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?Be:he`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${B()}</summary><div class="panel-body">${e.map(([t,a,s])=>{let o=L(t)??"";return he`<div class="interp"><span class="planet">${o?`${o} `:""}${t}</span> ${a?.rashi?he`<p><span class="label">${this.t("Rashi.")}</span> ${a.rashi}</p>`:Be} ${a?.nakshatra?he`<p><span class="label">${this.t("Nakshatra.")}</span> ${a.nakshatra}</p>`:Be} ${Xc.map(([i,l])=>s?.[i]?.interpretation?he`<p><span class="label">${this.t(l)}</span> ${s[i].interpretation}</p>`:Be)}</div>`})}</div></details>`}renderHouses(){let r=(this.data?.houses??[]).filter(e=>e.name||e.description);return r.length===0?Be:he`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>he`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?he`<p class="desc">${e.description}</p>`:Be}</div>`)}</div></details>`}renderYogas(){let r=(this.data?.yogas??[]).filter(e=>e.present);return r.length===0?Be:he`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>he`<div class="bhava"><span class="name">${e.name} ${e.quality?he`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Be}</span> ${e.result?he`<p class="desc">${e.result}</p>`:Be}</div>`)}</div></details>`}};cn.styles=[u,I,M,Mx`.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)}`],cn=m([Ex("roxy-vedic-planets-table")],cn);import{css as _x,html as Fe,nothing as rr}from"lit";import{customElement as Nx,state as Ix}from"lit/decorators.js";function Jc(n){return n.suppressedBy||void 0}var Qc=["classical","asraya","dala","akriti","sankhya"];function ep(n){let r=Qc.indexOf(n.family);return r===-1?Qc.length:r}var Gx=[{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."}],qa=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Jc(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return rr;let a=[...t].sort((s,o)=>ep(s)-ep(o));return Fe`<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`<span class="${t}">${e}</span>`}renderFamilyChip(e){return e.family?Fe`<span class="family-chip" title="${this.t("Classical family")}">${A(e.family)}</span>`:rr}renderDetailCard(e){return Fe`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):rr} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?Fe`<p class="description">${e.description}</p>`:rr} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?rr:Fe`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Jc(e),[a,s]=e.present?["is-present","Present"]:t?["is-outranked",`Outranked by ${A(t)}`]:["is-absent","Not present"];return Fe`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):rr} ${this.renderFamilyChip(e)} <span class="present-badge ${a}">${s}</span></p>${e.description&&!this.hideReadings?Fe`<p class="description">${e.description}</p>`:rr} ${e.present?this.renderEffects(e.result):rr} ${e.evidence?Fe`<p class="evidence">${e.evidence}</p>`:rr}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let a=e;return Fe`<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`<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>${U(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?Gx.map(h=>this.renderVerdictGroup(h,p.filter(x=>this.verdictOf(x)===h.id))):Fe`<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`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${d!==void 0?Fe`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:rr}</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`<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`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${l!==void 0?Fe`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:rr}</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`<div class="yoga-chip">${c.name}</div>`):Fe`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return Fe`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};qa.styles=[u,I,_x`.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([Ix()],qa.prototype,"filter",2),qa=m([Nx("roxy-yoga-list")],qa);import{css as Ox,html as O,nothing as q}from"lit";import{customElement as Bx,property as Fx}from"lit/decorators.js";var oi={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},tp={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Ya=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?k(a,e.date):"";return O`<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?O`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:z(a,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:q}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?O`<p class="prose" part="section interpretation">${e.interpretation}</p>`:q} ${"conventions"in e?Tr(e.conventions,this.translator,this.effectiveLang()):q}</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?q:O`<div class="facts" part="details">${i?O`<span><span class="lbl">${this.t("Element")}</span><b>${i}</b></span>`:q} ${l?O`<span><span class="lbl">${this.t("Polarity")}</span>${l}</span>`:q} ${t.branch?O`<span><span class="lbl">${this.t("Branch")}</span>${t.branch}</span>`:q} ${a?O`<span><span class="lbl">${this.t("Pillar")}</span> <b>${a.stem??""}</b> ${a.branch??""}</span>`:q} ${s&&typeof s.start=="number"?O`<span><span class="lbl">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:q}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return q;let t="year"in e?e.year:void 0,a="benMingNian"in e?e.benMingNian:!1;return O`${O`<div class="facts" part="details"><span><span class="lbl">${this.t("Day")}</span><b>${e.relationship&&oi[e.relationship]?this.t(oi[e.relationship]):e.relationship??""}</b></span> ${t?O`<span><span class="lbl">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&oi[t.relationship]?this.t(oi[t.relationship]):t.relationship??""}</span>`:q} ${a?O`<span class="tag">${this.t("Ben Ming Nian")}</span>`:q}</div>`} ${this.hideReadings?q:O`${e.overview?O`<p class="prose" part="section overview">${e.overview}</p>`:q}<div class="sections" part="section outlook">${"love"in e&&e.love?O`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:q} ${"career"in e&&e.career?O`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:q} ${"advice"in e&&e.advice?O`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:q}</div>`} ${t?.note&&!this.hideReadings?O`<p class="prose" part="reading">${t.note}</p>`:q}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return q;let t=e;return O`${t.trine?O`<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?O`<span class="chips">${t.trine.members.map(a=>O`<span>${a}</span>`)}</span>`:q} ${t.trine.theme?O`<span>${t.trine.theme}</span>`:q}</div></section>`:q} ${this.renderPartners(t)} ${this.hideReadings?q:O`${t.summary?O`<p class="prose" part="section summary">${t.summary}</p>`:q} ${t.traits?.length?O`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><div class="chips">${t.traits.map(a=>O`<span>${a}</span>`)}</div></section>`:q} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?O`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:q}`}`}renderPartners(e){let a=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return a.length===0?q:O`<section part="section partners"><div class="partners">${a.map(([s,o])=>O`<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?O`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(a=>O`<li>${a}</li>`)}</ul></section>`:q}renderCompatibility(e){let t=e.signs?.first,a=e.signs?.second,s=typeof e.score=="number"?e.score:null;return O`<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?O`<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?O`<span class="tag">${tp[e.verdict]?this.t(tp[e.verdict]):e.verdict}</span>`:q}</div>`:q} ${e.sharedElement?O`<div class="facts" part="details"><span><span class="lbl">${this.t("Shared element")}</span><b>${y(e,"sharedElement")}</b></span></div>`:q} ${this.hideReadings?q:O`${e.summary?O`<p class="prose" part="section summary">${e.summary}</p>`:q} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?O`<p class="prose" part="reading">${e.advice}</p>`:q}`}</article>`}};Ya.styles=[u,I,Ox`.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([Fx({type:String,reflect:!0})],Ya.prototype,"mode",2),Ya=m([Bx("roxy-zodiac-card")],Ya);var rp={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 ap(n){let r=n.lastIndexOf(":"),e=r===-1?n:n.slice(r+1),t=rp[e];return t?{...t,toolName:e}:void 0}var $l=[{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 LS=$l.map(n=>n.slug);export{$l as ROXY_COMPONENTS,LS as ROXY_UI_COMPONENTS,Ui as ROXY_UI_VERSION,aa as RoxyAlmanacDay,es as RoxyAngelNumberCard,ts as RoxyAngelNumberLookup,ss as RoxyArudhaPadas,sa as RoxyAshtakavargaGrid,os as RoxyAspectsTable,cs as RoxyAstrocartographyMap,ps as RoxyBaziChart,ms as RoxyBhavChalitTable,hs as RoxyBhavaBalaTable,la as RoxyBiorhythmChart,ma as RoxyBodygraph,gs as RoxyCharaKarakas,us as RoxyChoghadiyaGrid,ua as RoxyCompatibilityCard,ys as RoxyCompoundNumber,fs as RoxyCrystalCard,fa as RoxyCrystalGrid,_r as RoxyDashaTimeline,ba as RoxyData,La as RoxyDivisionalChart,wa as RoxyDoshaCard,bs as RoxyDoshaConstitution,vs as RoxyDreamCard,Ls as RoxyDreamSearch,ie as RoxyEndpointForm,Sa as RoxyEphemerisTable,ws as RoxyFixedStars,Ca as RoxyFlyingStarChart,ks as RoxyForecastDigest,Ss as RoxyForecastTimeline,Rs as RoxyGematria,Cs as RoxyGocharaTable,Ts as RoxyGunaMilan,As as RoxyHdConnection,zs as RoxyHdPenta,Es as RoxyHdTypeCard,Ps as RoxyHdVariables,_s as RoxyHeliacalTable,Ns as RoxyHexagram,Is as RoxyHoraTable,Fr as RoxyHoroscopeCard,Ta as RoxyKpChart,Os as RoxyKpFinanceCard,Bs as RoxyKpPlanetsTable,Fs as RoxyKpRulingPlanets,za as RoxyKuaCard,Hs as RoxyLocalSpaceCompass,Qe as RoxyLocationSearch,js as RoxyLuckPillars,Pa as RoxyMayanDaySign,_a as RoxyMoonPhase,Ks as RoxyNakshatraCard,qr as RoxyNatalChart,Na as RoxyNumerologyCard,Ia as RoxyPanchangTable,Ga as RoxyPositionsTable,Ws as RoxyProfectionCard,Xs as RoxyReferenceCard,Js as RoxyRelocationWheel,en as RoxyShadbalaTable,tn as RoxySynastryChart,Fa as RoxyTarotCard,Ha as RoxyTarotCatalog,ja as RoxyTarotSpread,wr as RoxyTransitWheel,Ka as RoxyTransitsTable,sn as RoxyUpagrahaTable,Va as RoxyVastuMandala,ln as RoxyVedicAspects,dn as RoxyVedicDaily,kr as RoxyVedicKundli,cn as RoxyVedicPlanetsTable,Vs as RoxyWesternPlanetsTable,qa as RoxyYogaList,Ya as RoxyZodiacCard,ap as componentForTool,jn as expandCompact,bp as roxyDataScript,Ol as serializeRoxyData};
145
+ </g>`}renderEmptyGrid(e){let t=[];for(let a=0;a<e;a++)for(let s=0;s<e;s++)t.push(nn`<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]=si(e,a.from),[i,l]=si(e,a.to);return nn`<line class="vamsa" x1=${s} y1=${o} x2=${i} y2=${l}></line>`})}renderBrahmasthan(e,t){let a=t??[];if(a.length<3)return $e;let s=a.map(o=>si(e,o).join(",")).join(" ");return nn`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let a=new Set(t?.atimarma??[]);return a.size===0?$e:(t?.cells??[]).filter(s=>s.square!=null&&a.has(s.square)).map(s=>{let[o,i]=si(e,s.center);return nn`<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?$e:me`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...a].map(([s,o])=>me`<li><b>${s}</b> ${o.sort((i,l)=>i-l).map(i=>z(e,i)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return me`<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 me`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${a?me`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:$e}</div>`}renderFacts(e,t,a,s){let o=t.conventions?.grid;return me`<div class="facts" part="details">${o?me`<span><span class="lbl">${fe(e,"grid")}</span><b>${j(e,"grid",o)}</b></span>`:$e} ${s?.pada!=null?me`<span><span class="lbl">${this.t("Pada")}</span><b>${z(e,s.pada)}</b></span>`:$e} ${s?.side?me`<span><span class="lbl">${this.t("Side")}</span><b>${j(e,"facing",s.side)}</b></span>`:$e} ${s?.startCorner?me`<span><span class="lbl">${this.t("Counted from")}</span>${j(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?me`· ${z(e,s.ordinalOnSide)}`:$e}</span>`:$e} ${s?.devata?.name?me`<span><span class="lbl">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?me`· ${this.t("Pada")} ${z(e,s.devata.padaCount)}`:$e}</span>`:$e} ${s?.recommendedPadas?.length?me`<span><span class="lbl">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(i=>z(e,i)).join(", ")}</span>`:$e} ${a?.brahmasthan?.area!=null?me`<span><span class="lbl">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,a.brahmasthan.area,a.conventions?.unit)}</b></span>`:$e} ${a?.marma?.areaEach!=null?me`<span><span class="lbl">${this.t("Area of one marma")}</span>${this.areaLabel(e,a.marma.areaEach,a.conventions?.unit)}</span>`:$e} ${a?.atimarma?.length?me`<span><span class="lbl">${this.t("Crossing points")}</span>${a.atimarma.map(i=>z(e,i)).join(", ")}</span>`:$e}</div>`}renderSources(e){return e.length===0?$e:me`<section part="section sources"><ul class="cites">${e.map(t=>me`<li>${$n(t)}</li>`)}</ul></section>`}areaLabel(e,t,a){let s=f(e,t,2);if(!a)return s;let o=Lx[a]??`${a}²`;return me`<span title="${j(e,"unit",a)}">${s} ${o}</span>`}ringLabel(e){let t=bx[e];return t?this.t(t):w(e)}verdictLabel(e){let t=vx[e];return t?this.t(t):w(e)}};Va.styles=[u,ux`.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([fx({type:String,reflect:!0})],Va.prototype,"mode",2),Va=m([yx("roxy-vastu-mandala")],Va);function Sx(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}}import{css as Rx,html as mr,nothing as on}from"lit";import{customElement as Cx}from"lit/decorators.js";var ln=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?H(this.effectiveLang(),r.datetime):"";return mr`<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?mr`<p class="subtitle">${this.t("Chart time {{when}}",{when:s})}</p>`:on}</div>${a.length>0?mr`<div part="section positions"><p class="section-label">${this.t("Sidereal positions")}</p><div class="mutual">${a.map(o=>mr`<span class="position"><strong>${o.name}</strong> ${typeof o.longitude=="number"?Ze(o.longitude):o.sign??""}</span>`)}</div></div>`:on} ${t.length>0?mr`<div part="section mutual-aspects"><p class="section-label">${this.t("Mutual aspects")}</p><div class="mutual">${t.map(o=>mr`<span class="mutual-pill">${o.planet1} ⟷ ${o.planet2} ${o.aspectType?mr`<span class="rel">${o.aspectType}</span>`:on}</span>`)}</div></div>`:on} ${e.length>0?mr`<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=>mr`<tr><td>${o.aspectingPlanet}</td><td><span class="kind">${o.aspectType}</span></td><td>${o.aspectedPlanet}</td><td>${typeof o.strength=="number"?mr`<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>`:on}</td><td class="num">${typeof o.orb=="number"?`${f(this.effectiveLang(),o.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:on}</div>`}};ln.styles=[u,Rx`.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}`],ln=m([Cx("roxy-vedic-aspects")],ln);import{css as Dx,html as Q,nothing as qe}from"lit";import{customElement as Tx}from"lit/decorators.js";var Ll={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},Ax=Object.keys(Ll),Zc=8,ni={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},zx={day:"Day",finance:"Finance",natal:"Natal"},Wc={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},dn=class extends g{renderData(r){let e=r.grahas??[];return e.length?Q`<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 Q`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("Vedic daily")}</h2><span class="when">${Wn(this.effectiveLang(),r.dayStart,r.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${r.verdict}">${this.t(ni[r.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:r.evaluated})}</span></div>${e.size?Q`<div class="tally" part="legend">${Ax.filter(a=>e.get(a)).map(a=>Q`<span class="pill">${this.t(Ll[a])} ${e.get(a)}</span>`)}</div>`:qe} ${r.subject?Q`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:r.subject.janmaRashi,nakshatra:r.subject.janmaNakshatra})}</p>`:qe} ${(r.degraded??[]).map(a=>Q`<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 qe;let t=(a,s)=>s?Q`<div class="fact"><dt>${a}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?Q`<span class="until">${this.t("until {{time}}",{time:H(this.effectiveLang(),s.validTo)})}</span>`:qe}</dd></div>`:qe;return Q`<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 Q`<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=L(t.graha)??"",s=this.theme(e,t.houseFromMoon);return Q`<tr><td>${a?Q`<span class="glyph">${a}</span>`:qe}${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(Ll[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(r){if(!r||typeof r.number!="number")return qe;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:Zc,graha:r.lord,start:f(this.effectiveLang(),r.startDegree,2),end:f(this.effectiveLang(),r.endDegree,2)});return Q`<span class="kaksha" title="${t?`${a} · ${t}`:a}">${r.number}/${Zc} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(r){let e=r.tara??[],t=r.chandrabala??[];if(!e.length&&!t.length)return qe;let a=(s,o)=>Q`<small>${Wn(this.effectiveLang(),s,o)}</small>`;return Q`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?Q`<div class="chips">${e.map(s=>Q`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${a(s.validFrom,s.validTo)}</span>`)}</div>`:qe} ${t.length?Q`<div class="chips">${t.map(s=>Q`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?Q`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:qe} </span>${a(s.validFrom,s.validTo)}</span>`)}</div>`:qe}</section>`}renderFinance(r){let e=r.areas?.finance;if(!e)return qe;let t=r.houseThemes,a=s=>{let o=this.theme(t,s.house);return Q`<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?Q`<span class="note">${s.dashaLevels.map(i=>this.t(Wc[i])).join(", ")}</span>`:qe}</li>`};return Q`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(ni[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?Q`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:qe}</div><div class="lists">${e.drivers?.length?Q`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(a)}</ul></div>`:qe} ${e.cautions?.length?Q`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(a)}</ul></div>`:qe}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(r){return r?Q`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${r.band}">${this.t(ni[r.band])}</span> <span class="evidence">${r.score}</span></div><ul class="layers">${r.layers.map(e=>Q`<li><span>${this.t(zx[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(ni[e.band])}</span></li>`)}</ul></div>`:qe}renderDasha(r){let e=r.dasha??[];return e.length?Q`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>Q`<span class="window"><span>${this.t(Wc[t.level])} · ${t.lord}</span> <small>${Wn(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:qe}renderProvenance(r){return r.frames?Q`<section class="block" part="section frame">${Wl(this.effectiveLang(),r.frames,this.translator)}</section>`:qe}};dn.styles=[u,I,Dx`.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)}`],dn=m([Tx("roxy-vedic-daily")],dn);import{html as Xc}from"lit";import{customElement as Mx,property as $l}from"lit/decorators.js";var kr=class extends g{constructor(){super(...arguments);this.chartViewport=new ke(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?$o(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 Xc`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${a}</h2>${U(this.effectiveLang(),e.frame,this.translator)} ${wo(t,this.translator)}</div>${So(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(Xc`<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>${ko(t,this.chartStyle,this.translator)}</svg>`,a,this.translator)}</div></div>`}};kr.styles=[u,Ne,I,Ro,Ue],m([$l({type:String,reflect:!0,attribute:"chart-style"})],kr.prototype,"chartStyle",2),m([$l({type:String,reflect:!0,attribute:"chart-reference"})],kr.prototype,"chartReference",2),m([$l({type:String,reflect:!0,attribute:"lagna-override"})],kr.prototype,"lagnaOverride",2),kr=m([Mx("roxy-vedic-kundli")],kr);import{css as Ex,html as he,nothing as Be}from"lit";import{customElement as Px}from"lit/decorators.js";var _x=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Jc=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],cn=class extends g{orderedRows(){let r=this.data?.meta??{},e=new Set,t=[];for(let a of _x){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 he`<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>${U(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."):Be}</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=L(s.graha??a)??"",l=P(s.rashi)??"";return he`<tr class="${o?"lagna":""}"><td class="graha">${i?he`<span class="glyph">${i}</span>`:Be}${s.graha??a}</td><td>${l?he`<span class="glyph">${l}</span>`:Be}${s.rashi??""}</td><td class="num">${typeof s.longitude=="number"?Ze(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>${Jc.map(([c])=>he`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?he`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Be}</td>`)}<td>${s.isRetrograde?he`<span class="retro">R</span>`:Be}</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?Be:r.map((e,t)=>{let a=P(e.rashi)??"";return he`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${hn(e.planet,e.sanskritName)}</td><td>${a?he`<span class="glyph">${a}</span>`:Be}${e.rashi??""}</td><td class="num">${typeof e.longitude=="number"?Ze(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?he`<span class="retro">R</span>`:Be}</td></tr>`})}renderCombustion(){let r=this.data?.combustion??[];return r.length===0?Be:he`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>{let t=L(e.planet)??"",a=f(this.effectiveLang(),e.distanceFromSun,2),s=f(this.effectiveLang(),e.orb,1);return he`<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?Be:he`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>{let t=f(this.effectiveLang(),e.distance,2);return he`<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 Be;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?Be:he`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${B()}</summary><div class="panel-body">${e.map(([t,a,s])=>{let o=L(t)??"";return he`<div class="interp"><span class="planet">${o?`${o} `:""}${t}</span> ${a?.rashi?he`<p><span class="label">${this.t("Rashi.")}</span> ${a.rashi}</p>`:Be} ${a?.nakshatra?he`<p><span class="label">${this.t("Nakshatra.")}</span> ${a.nakshatra}</p>`:Be} ${Jc.map(([i,l])=>s?.[i]?.interpretation?he`<p><span class="label">${this.t(l)}</span> ${s[i].interpretation}</p>`:Be)}</div>`})}</div></details>`}renderHouses(){let r=(this.data?.houses??[]).filter(e=>e.name||e.description);return r.length===0?Be:he`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>he`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?he`<p class="desc">${e.description}</p>`:Be}</div>`)}</div></details>`}renderYogas(){let r=(this.data?.yogas??[]).filter(e=>e.present);return r.length===0?Be:he`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${r.length}</span>${B()}</summary><div class="panel-body">${r.map(e=>he`<div class="bhava"><span class="name">${e.name} ${e.quality?he`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Be}</span> ${e.result?he`<p class="desc">${e.result}</p>`:Be}</div>`)}</div></details>`}};cn.styles=[u,I,M,Ex`.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)}`],cn=m([Px("roxy-vedic-planets-table")],cn);import{css as Nx,html as Fe,nothing as rr}from"lit";import{customElement as Ix,state as Gx}from"lit/decorators.js";function Qc(n){return n.suppressedBy||void 0}var ep=["classical","asraya","dala","akriti","sankhya"];function tp(n){let r=ep.indexOf(n.family);return r===-1?ep.length:r}var Ox=[{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."}],qa=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Qc(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return rr;let a=[...t].sort((s,o)=>tp(s)-tp(o));return Fe`<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`<span class="${t}">${e}</span>`}renderFamilyChip(e){return e.family?Fe`<span class="family-chip" title="${this.t("Classical family")}">${A(e.family)}</span>`:rr}renderDetailCard(e){return Fe`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):rr} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?Fe`<p class="description">${e.description}</p>`:rr} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?rr:Fe`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Qc(e),[a,s]=e.present?["is-present","Present"]:t?["is-outranked",`Outranked by ${A(t)}`]:["is-absent","Not present"];return Fe`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):rr} ${this.renderFamilyChip(e)} <span class="present-badge ${a}">${s}</span></p>${e.description&&!this.hideReadings?Fe`<p class="description">${e.description}</p>`:rr} ${e.present?this.renderEffects(e.result):rr} ${e.evidence?Fe`<p class="evidence">${e.evidence}</p>`:rr}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let a=e;return Fe`<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`<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>${U(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?Ox.map(h=>this.renderVerdictGroup(h,p.filter(x=>this.verdictOf(x)===h.id))):Fe`<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`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${d!==void 0?Fe`<span class="count">${this.t("{{count}} total",{count:d})}</span>`:rr}</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`<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`<div class="wrap" part="card"><div class="head" part="header"><h2 class="title">${this.t("Yoga catalog")}</h2>${l!==void 0?Fe`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:rr}</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`<div class="yoga-chip">${c.name}</div>`):Fe`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return Fe`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};qa.styles=[u,I,Nx`.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([Gx()],qa.prototype,"filter",2),qa=m([Ix("roxy-yoga-list")],qa);import{css as Bx,html as O,nothing as q}from"lit";import{customElement as Fx,property as Hx}from"lit/decorators.js";var oi={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},rp={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Ya=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?k(a,e.date):"";return O`<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?O`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:z(a,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:q}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?O`<p class="prose" part="section interpretation">${e.interpretation}</p>`:q} ${"conventions"in e?Tr(e.conventions,this.translator,this.effectiveLang()):q}</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?q:O`<div class="facts" part="details">${i?O`<span><span class="lbl">${this.t("Element")}</span><b>${i}</b></span>`:q} ${l?O`<span><span class="lbl">${this.t("Polarity")}</span>${l}</span>`:q} ${t.branch?O`<span><span class="lbl">${this.t("Branch")}</span>${t.branch}</span>`:q} ${a?O`<span><span class="lbl">${this.t("Pillar")}</span> <b>${a.stem??""}</b> ${a.branch??""}</span>`:q} ${s&&typeof s.start=="number"?O`<span><span class="lbl">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:q}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return q;let t="year"in e?e.year:void 0,a="benMingNian"in e?e.benMingNian:!1;return O`${O`<div class="facts" part="details"><span><span class="lbl">${this.t("Day")}</span><b>${e.relationship&&oi[e.relationship]?this.t(oi[e.relationship]):e.relationship??""}</b></span> ${t?O`<span><span class="lbl">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&oi[t.relationship]?this.t(oi[t.relationship]):t.relationship??""}</span>`:q} ${a?O`<span class="tag">${this.t("Ben Ming Nian")}</span>`:q}</div>`} ${this.hideReadings?q:O`${e.overview?O`<p class="prose" part="section overview">${e.overview}</p>`:q}<div class="sections" part="section outlook">${"love"in e&&e.love?O`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:q} ${"career"in e&&e.career?O`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:q} ${"advice"in e&&e.advice?O`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:q}</div>`} ${t?.note&&!this.hideReadings?O`<p class="prose" part="reading">${t.note}</p>`:q}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return q;let t=e;return O`${t.trine?O`<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?O`<span class="chips">${t.trine.members.map(a=>O`<span>${a}</span>`)}</span>`:q} ${t.trine.theme?O`<span>${t.trine.theme}</span>`:q}</div></section>`:q} ${this.renderPartners(t)} ${this.hideReadings?q:O`${t.summary?O`<p class="prose" part="section summary">${t.summary}</p>`:q} ${t.traits?.length?O`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><div class="chips">${t.traits.map(a=>O`<span>${a}</span>`)}</div></section>`:q} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?O`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:q}`}`}renderPartners(e){let a=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return a.length===0?q:O`<section part="section partners"><div class="partners">${a.map(([s,o])=>O`<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?O`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(a=>O`<li>${a}</li>`)}</ul></section>`:q}renderCompatibility(e){let t=e.signs?.first,a=e.signs?.second,s=typeof e.score=="number"?e.score:null;return O`<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?O`<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?O`<span class="tag">${rp[e.verdict]?this.t(rp[e.verdict]):e.verdict}</span>`:q}</div>`:q} ${e.sharedElement?O`<div class="facts" part="details"><span><span class="lbl">${this.t("Shared element")}</span><b>${y(e,"sharedElement")}</b></span></div>`:q} ${this.hideReadings?q:O`${e.summary?O`<p class="prose" part="section summary">${e.summary}</p>`:q} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?O`<p class="prose" part="reading">${e.advice}</p>`:q}`}</article>`}};Ya.styles=[u,I,Bx`.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([Hx({type:String,reflect:!0})],Ya.prototype,"mode",2),Ya=m([Fx("roxy-zodiac-card")],Ya);var ap={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 sp(n){let r=n.lastIndexOf(":"),e=r===-1?n:n.slice(r+1),t=ap[e];return t?{...t,toolName:e}:void 0}var wl=[{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 $S=wl.map(n=>n.slug);export{wl as ROXY_COMPONENTS,$S as ROXY_UI_COMPONENTS,Zi as ROXY_UI_VERSION,aa as RoxyAlmanacDay,es as RoxyAngelNumberCard,ts as RoxyAngelNumberLookup,ss as RoxyArudhaPadas,sa as RoxyAshtakavargaGrid,os as RoxyAspectsTable,cs as RoxyAstrocartographyMap,ps as RoxyBaziChart,ms as RoxyBhavChalitTable,hs as RoxyBhavaBalaTable,la as RoxyBiorhythmChart,ma as RoxyBodygraph,gs as RoxyCharaKarakas,us as RoxyChoghadiyaGrid,ua as RoxyCompatibilityCard,ys as RoxyCompoundNumber,fs as RoxyCrystalCard,fa as RoxyCrystalGrid,_r as RoxyDashaTimeline,ba as RoxyData,La as RoxyDivisionalChart,wa as RoxyDoshaCard,bs as RoxyDoshaConstitution,vs as RoxyDreamCard,Ls as RoxyDreamSearch,ie as RoxyEndpointForm,Sa as RoxyEphemerisTable,ws as RoxyFixedStars,Ca as RoxyFlyingStarChart,ks as RoxyForecastDigest,Ss as RoxyForecastTimeline,Rs as RoxyGematria,Cs as RoxyGocharaTable,Ts as RoxyGunaMilan,As as RoxyHdConnection,zs as RoxyHdPenta,Es as RoxyHdTypeCard,Ps as RoxyHdVariables,_s as RoxyHeliacalTable,Ns as RoxyHexagram,Is as RoxyHoraTable,Fr as RoxyHoroscopeCard,Ta as RoxyKpChart,Os as RoxyKpFinanceCard,Bs as RoxyKpPlanetsTable,Fs as RoxyKpRulingPlanets,za as RoxyKuaCard,Hs as RoxyLocalSpaceCompass,Qe as RoxyLocationSearch,js as RoxyLuckPillars,Pa as RoxyMayanDaySign,_a as RoxyMoonPhase,Ks as RoxyNakshatraCard,qr as RoxyNatalChart,Na as RoxyNumerologyCard,Ia as RoxyPanchangTable,Ga as RoxyPositionsTable,Ws as RoxyProfectionCard,Xs as RoxyReferenceCard,Js as RoxyRelocationWheel,en as RoxyShadbalaTable,tn as RoxySynastryChart,Fa as RoxyTarotCard,Ha as RoxyTarotCatalog,ja as RoxyTarotSpread,wr as RoxyTransitWheel,Ka as RoxyTransitsTable,sn as RoxyUpagrahaTable,Va as RoxyVastuMandala,ln as RoxyVedicAspects,dn as RoxyVedicDaily,kr as RoxyVedicKundli,cn as RoxyVedicPlanetsTable,Vs as RoxyWesternPlanetsTable,qa as RoxyYogaList,Ya as RoxyZodiacCard,sp as componentForTool,jn as expandCompact,vp as roxyDataScript,Bl as serializeRoxyData};
146
146
  //# sourceMappingURL=index.js.map