@roxyapi/ui 0.15.0 → 0.15.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/AGENTS.md +1 -1
- package/README.md +1 -1
- package/components-catalog.json +2 -2
- package/dist/cdn/components/kp-chart.js +1 -1
- package/dist/cdn/components/kp-chart.js.map +2 -2
- package/dist/cdn/roxy-ui.js +2 -2
- package/dist/cdn/roxy-ui.js.map +2 -2
- package/dist/components/kp-chart.d.ts +4 -3
- package/dist/components/kp-chart.d.ts.map +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-chart.js.map +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/manifest.d.ts.map +1 -1
- package/dist/types/types.gen.d.ts +13 -1
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/kp-chart.ts +5 -3
- package/src/manifest.ts +3 -2
- package/src/types/types.gen.ts +13 -1
- package/src/version.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -69,7 +69,7 @@ Use the table below for the formal endpoint to component mapping.
|
|
|
69
69
|
| `<roxy-compatibility-card>` | Cross | POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility | Score card with category breakdown |
|
|
70
70
|
| `<roxy-vedic-kundli>` | Vedic | POST /vedic-astrology/birth-chart | South, North, or East Indian kundli with degree detail and optional Chandra Lagna view |
|
|
71
71
|
| `<roxy-divisional-chart>` | Vedic | POST /vedic-astrology/{divisional-chart,navamsa} | Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa |
|
|
72
|
-
| `<roxy-kp-chart>` | Vedic (KP) | POST /vedic-astrology/kp/chart | Ascendant, cusps, and
|
|
72
|
+
| `<roxy-kp-chart>` | Vedic (KP) | POST /vedic-astrology/kp/chart | Ascendant, cusps, planets and nodes with KP stellar hierarchy |
|
|
73
73
|
| `<roxy-vedic-planets-table>` | Vedic | POST /vedic-astrology/birth-chart | Degree, nakshatra, pada, lord, bhava, avastha columns |
|
|
74
74
|
| `<roxy-kp-planets-table>` | Vedic (KP) | POST /vedic-astrology/kp/planets | Sub-lord and sub-sub-lord columns |
|
|
75
75
|
| `<roxy-kp-ruling-planets>` | Vedic (KP) | POST /vedic-astrology/kp/ruling-planets | Day lord, Moon/Lagna hierarchies, ruling planets, significators |
|
package/README.md
CHANGED
|
@@ -618,7 +618,7 @@ Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK
|
|
|
618
618
|
| `<roxy-compatibility-card>` | Cross | POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility | Score card with category breakdown |
|
|
619
619
|
| `<roxy-vedic-kundli>` | Vedic | POST /vedic-astrology/birth-chart | South, North, or East Indian kundli with degree detail and optional Chandra Lagna view |
|
|
620
620
|
| `<roxy-divisional-chart>` | Vedic | POST /vedic-astrology/{divisional-chart,navamsa} | Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa |
|
|
621
|
-
| `<roxy-kp-chart>` | Vedic (KP) | POST /vedic-astrology/kp/chart | Ascendant, cusps, and
|
|
621
|
+
| `<roxy-kp-chart>` | Vedic (KP) | POST /vedic-astrology/kp/chart | Ascendant, cusps, planets and nodes with KP stellar hierarchy |
|
|
622
622
|
| `<roxy-vedic-planets-table>` | Vedic | POST /vedic-astrology/birth-chart | Degree, nakshatra, pada, lord, bhava, avastha columns |
|
|
623
623
|
| `<roxy-kp-planets-table>` | Vedic (KP) | POST /vedic-astrology/kp/planets | Sub-lord and sub-sub-lord columns |
|
|
624
624
|
| `<roxy-kp-ruling-planets>` | Vedic (KP) | POST /vedic-astrology/kp/ruling-planets | Day lord, Moon/Lagna hierarchies, ruling planets, significators |
|
package/components-catalog.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.
|
|
2
|
+
"version": "0.15.1",
|
|
3
3
|
"generated": "scripts/sync-catalog.ts",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
"pascal": "RoxyKpChart",
|
|
340
340
|
"slug": "kp-chart",
|
|
341
341
|
"domain": "Vedic (KP)",
|
|
342
|
-
"renders": "Ascendant, cusps, and
|
|
342
|
+
"renders": "Ascendant, cusps, planets and nodes with KP stellar hierarchy",
|
|
343
343
|
"endpointLabel": "POST /vedic-astrology/kp/chart",
|
|
344
344
|
"endpoints": [
|
|
345
345
|
{
|
|
@@ -255,7 +255,7 @@ var RoxyUI_kp_chart=(()=>{var K=Object.defineProperty;var me=Object.getOwnProper
|
|
|
255
255
|
}
|
|
256
256
|
`;var j="roxy-ui-tokens";function q(){if(typeof document>"u")return null;let s=document.getElementById(j);if(s)return s;let e=document.createElement("style");return e.id=j,e.textContent=fe,document.head.prepend(e),e}var z=globalThis,B=z.ShadowRoot&&(z.ShadyCSS===void 0||z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ee=Symbol(),ye=new WeakMap,R=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ee)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(B&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ye.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ye.set(t,e))}return e}toString(){return this.cssText}},ge=s=>new R(typeof s=="string"?s:s+"",void 0,ee),S=(s,...e)=>{let t=s.length===1?s[0]:e.reduce((r,o,n)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[n+1],s[0]);return new R(t,s,ee)},be=(s,e)=>{if(B)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),o=z.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,s.appendChild(r)}},te=B?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ge(t)})(s):s;var{is:Ge,defineProperty:We,getOwnPropertyDescriptor:Fe,getOwnPropertyNames:Ve,getOwnPropertySymbols:Ye,getPrototypeOf:Je}=Object,G=globalThis,xe=G.trustedTypes,Ze=xe?xe.emptyScript:"",Xe=G.reactiveElementPolyfillSupport,P=(s,e)=>s,L={toAttribute(s,e){switch(e){case Boolean:s=s?Ze:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},W=(s,e)=>!Ge(s,e),ve={attribute:!0,type:String,converter:L,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),G.litPropertyMetadata??=new WeakMap;var x=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ve){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(e,r,t);o!==void 0&&We(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){let{get:o,set:n}=Fe(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:o,set(i){let d=o?.call(this);n?.call(this,i),this.requestUpdate(e,d,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ve}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Je(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,r=[...Ve(t),...Ye(t)];for(let o of r)this.createProperty(o,t[o])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,o]of t)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let o=this._$Eu(t,r);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let o of r)t.unshift(te(o))}else e!==void 0&&t.push(te(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return be(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(o!==void 0&&r.reflect===!0){let n=(r.converter?.toAttribute!==void 0?r.converter:L).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let n=r.getPropertyOptions(o),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:L;this._$Em=o;let d=i.fromAttribute(t,n.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(e,t,r,o=!1,n){if(e!==void 0){let i=this.constructor;if(o===!1&&(n=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??W)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:o,wrapped:n},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),n!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),o===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,n]of r){let{wrapped:i}=n,d=this[o];i!==!0||this._$AL.has(o)||d===void 0||this.C(o,void 0,n,d)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[P("elementProperties")]=new Map,x[P("finalized")]=new Map,Xe?.({ReactiveElement:x}),(G.reactiveElementVersions??=[]).push("2.1.2");var le=globalThis,$e=s=>s,F=le.trustedTypes,Se=F?F.createPolicy("lit-html",{createHTML:s=>s}):void 0,Te="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,Ce="?"+v,Qe=`<${Ce}>`,_=document,M=()=>_.createComment(""),O=s=>s===null||typeof s!="object"&&typeof s!="function",de=Array.isArray,et=s=>de(s)||typeof s?.[Symbol.iterator]=="function",re=`[
|
|
257
257
|
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,we=/-->/g,Ae=/>/g,w=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^
|
|
258
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),_e=/'/g,ke=/"/g,Re=/^(?:script|style|textarea|title)$/i,ce=s=>(e,...t)=>({_$litType$:s,strings:e,values:t}),l=ce(1),$t=ce(2),St=ce(3),k=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ee=new WeakMap,A=_.createTreeWalker(_,129);function Pe(s,e){if(!de(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Se!==void 0?Se.createHTML(e):e}var tt=(s,e)=>{let t=s.length-1,r=[],o,n=e===2?"<svg>":e===3?"<math>":"",i=N;for(let d=0;d<t;d++){let a=s[d],u,p,h=-1,y=0;for(;y<a.length&&(i.lastIndex=y,p=i.exec(a),p!==null);)y=i.lastIndex,i===N?p[1]==="!--"?i=we:p[1]!==void 0?i=Ae:p[2]!==void 0?(Re.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=w):p[3]!==void 0&&(i=w):i===w?p[0]===">"?(i=o??N,h=-1):p[1]===void 0?h=-2:(h=i.lastIndex-p[2].length,u=p[1],i=p[3]===void 0?w:p[3]==='"'?ke:_e):i===ke||i===_e?i=w:i===we||i===Ae?i=N:(i=w,o=void 0);let b=i===w&&s[d+1].startsWith("/>")?" ":"";n+=i===N?a+Qe:h>=0?(r.push(u),a.slice(0,h)+Te+a.slice(h)+v+b):a+v+(h===-2?d:b)}return[Pe(s,n+(s[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},U=class s{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let n=0,i=0,d=e.length-1,a=this.parts,[u,p]=tt(e,t);if(this.el=s.createElement(u,r),A.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=A.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(Te)){let y=p[i++],b=o.getAttribute(h).split(v),I=/([.?@])?(.*)/.exec(y);a.push({type:1,index:n,name:I[2],strings:b,ctor:I[1]==="."?se:I[1]==="?"?ne:I[1]==="@"?ie:C}),o.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(Re.test(o.tagName)){let h=o.textContent.split(v),y=h.length-1;if(y>0){o.textContent=F?F.emptyScript:"";for(let b=0;b<y;b++)o.append(h[b],M()),A.nextNode(),a.push({type:2,index:++n});o.append(h[y],M())}}}else if(o.nodeType===8)if(o.data===Ce)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:n}),h+=v.length-1}n++}}static createElement(e,t){let r=_.createElement("template");return r.innerHTML=e,r}};function T(s,e,t=s,r){if(e===k)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,n=O(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(s),o._$AT(s,t,r)),r!==void 0?(t._$Co??=[])[r]=o:t._$Cl=o),o!==void 0&&(e=T(s,o._$AS(s,e.values),o,r)),e}var oe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,o=(e?.creationScope??_).importNode(t,!0);A.currentNode=o;let n=A.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new H(n,n.nextSibling,this,e):a.type===1?u=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(u=new ae(n,this,e)),this._$AV.push(u),a=r[++d]}i!==a?.index&&(n=A.nextNode(),i++)}return A.currentNode=_,o}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},H=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),O(e)?e===c||e==null||e===""?(this._$AH!==c&&this._$AR(),this._$AH=c):e!==this._$AH&&e!==k&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):et(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==c&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=U.createElement(Pe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let n=new oe(o,this),i=n.u(this.options);n.p(t),this.T(i),this._$AH=n}}_$AC(e){let t=Ee.get(e.strings);return t===void 0&&Ee.set(e.strings,t=new U(e)),t}k(e){de(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,o=0;for(let n of e)o===t.length?t.push(r=new s(this.O(M()),this.O(M()),this,this.options)):r=t[o],r._$AI(n),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=$e(e).nextSibling;$e(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,n){this.type=1,this._$AH=c,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(e,t=this,r,o){let n=this.strings,i=!1;if(n===void 0)e=T(this,e,t,0),i=!O(e)||e!==this._$AH&&e!==k,i&&(this._$AH=e);else{let d=e,a,u;for(e=n[0],a=0;a<n.length-1;a++)u=T(this,d[r+a],t,a),u===k&&(u=this._$AH[a]),i||=!O(u)||u!==this._$AH[a],u===c?e=c:e!==c&&(e+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!o&&this.j(e)}j(e){e===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},se=class extends C{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===c?void 0:e}},ne=class extends C{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==c)}},ie=class extends C{constructor(e,t,r,o,n){super(e,t,r,o,n),this.type=5}_$AI(e,t=this){if((e=T(this,e,t,0)??c)===k)return;let r=this._$AH,o=e===c&&r!==c||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==c&&(r===c||o);o&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ae=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}};var rt=le.litHtmlPolyfillSupport;rt?.(U,H),(le.litHtmlVersions??=[]).push("3.3.2");var Le=(s,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let n=t?.renderBefore??null;r._$litPart$=o=new H(e.insertBefore(M(),n),n,void 0,t??{})}return o._$AI(s),o};var he=globalThis,$=class extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Le(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return k}};$._$litElement$=!0,$.finalized=!0,he.litElementHydrateSupport?.({LitElement:$});var ot=he.litElementPolyfillSupport;ot?.({LitElement:$});(he.litElementVersions??=[]).push("4.2.2");var Ne=s=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(s,e)}):customElements.define(s,e)};var st={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:W},nt=(s=st,e,t)=>{let{kind:r,metadata:o}=t,n=globalThis.litPropertyMetadata.get(o);if(n===void 0&&globalThis.litPropertyMetadata.set(o,n=new Map),r==="setter"&&((s=Object.create(s)).wrapped=!0),n.set(t.name,s),r==="accessor"){let{name:i}=t;return{set(d){let a=e.get.call(this);e.set.call(this,d),this.requestUpdate(i,a,s,!0,d)},init(d){return d!==void 0&&this.C(i,void 0,s,d),d}}}if(r==="setter"){let{name:i}=t;return function(d){let a=this[i];e.call(this,d),this.requestUpdate(i,a,s,!0,d)}}throw Error("Unsupported decorator location: "+r)};function g(s){return(e,t)=>typeof t=="object"?nt(s,e,t):((r,o,n)=>{let i=o.hasOwnProperty(n);return o.constructor.createProperty(n,r),i?Object.getOwnPropertyDescriptor(o,n):void 0})(s,e,t)}function D(s){return g({...s,state:!0,attribute:!1})}var Me=s=>s??c;var Y=S`:host{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([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;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(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var it="https://roxyapi.com/api/v2",J=class{constructor(e){this.baseUrl=it;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let o=await r.json();if(t.signal.aborted)return;this.host.data=o}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[n,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(n,String(i));let o={Accept:"application/json"};return this.publishableKey&&(o["X-API-Key"]=this.publishableKey),e.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:o,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){let e=this.publishableKey;return!e||e.startsWith("pk_")?!1:(this.host.error="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.",this.host.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key"},bubbles:!0,composed:!0})),!0)}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function Oe(s,e,t,r=[]){let o={...t},n=`/${s.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,p)=>{let h=o[p];return delete o[p],encodeURIComponent(String(h??""))}),i=new Set(r),d={},a={};for(let[u,p]of Object.entries(o))p===void 0||p===""||(e==="GET"||i.has(u)?d[u]=p:a[u]=p);return{path:n,method:e,query:d,body:e==="POST"?a:void 0}}var at="roxy-data";function lt(s){return s.nodeName==="SCRIPT"&&s.getAttribute("type")==="application/json"}var Z=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(lt(e)&&e.classList.contains(at))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends ${constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.onFormSubmit=t=>{let r=t.detail;this.remember&&this.writeRemembered(r.values),this.fetcher.run(Oe(this.endpoint,this.method,r.values,r.queryKeys??[]))};new Z(this),this.fetcher=new J(this)}static{this.styles=[Y]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.renderData(this.data):this.renderNoData()}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return l`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Me(this.specUrl)}" .initialValues="${this.remember?this.readRemembered():void 0}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return l`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=l`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?l`${r}${this.renderForm()}`:r}};m([g({attribute:!1})],f.prototype,"data",2),m([g({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),m([g({type:String})],f.prototype,"method",2),m([g({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),m([g({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),m([g({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),m([g({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),m([g({type:Boolean})],f.prototype,"remember",2),m([D()],f.prototype,"loading",2),m([D()],f.prototype,"error",2);var ue=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Ar=ue.map(s=>s.toLowerCase());function dt(s){let e=s%360;return e<0?e+360:e}function ct(s){let e=dt(s),t=Math.floor(e/30)%12,r=e%30,o=Math.floor(r),n=(r-o)*60,i=Math.floor(n),d=Math.round((n-i)*60);return{sign:ue[t]??"Aries",signIndex:t,degree:o,minute:i,second:d}}function X(s){let{sign:e,degree:t,minute:r}=ct(s);return`${t}\xB0 ${e} ${String(r).padStart(2,"0")}'`}function Ue(s,e=1){if(typeof s!="number"||!Number.isFinite(s))return"";let t=s.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var He=S`.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 De(s){let{items:e,active:t,onSelect:r,label:o,idPrefix:n,controls:i=!1}=s;return l`<div class="roxy-tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let u=e.findIndex(b=>b.id===t);if(u===-1)return;let p=a.key==="ArrowRight"?1:-1,h=e[(u+p+e.length)%e.length];if(!h)return;r(h.id);let y=a.currentTarget.getRootNode();requestAnimationFrame(()=>{y.querySelector(`#${n}-tab-${h.id}`)?.focus()})}}">${e.map(a=>l`<button type="button" class="roxy-tab" role="tab" id="${n}-tab-${a.id}" aria-selected="${t===a.id?"true":"false"}" aria-controls="${i&&t===a.id?`${n}-panel-${a.id}`:c}" tabindex="${t===a.id?"0":"-1"}" @click="${()=>r(a.id)}">${a.label}</button>`)}</div>`}var ht=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Q=[1,2,3,4];function pe(s,e){return s?typeof e=="number"?`${s} ${e}`:s:""}function Ie(s){return[...new Set(s.map(String))].join(" > ")}var E=class extends f{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let t=this.data;if(!t)return[];let r=(t.planets??[]).map(n=>({name:n.planet,longitude:n.longitude,house:n.house,nakshatra:n.nakshatra,pada:n.pada,starLord:n.starLord,subLord:n.subLord,subSubLord:n.subSubLord,kpNumber:n.kpNumber,retrograde:n.retrograde})),o=t.nodes;for(let[n,i]of[["Rahu",o?.rahu],["Ketu",o?.ketu]])i&&r.push({name:n,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,retrograde:!0});return r}renderEmpty(){return l`<div class="roxy-empty" role="status">No KP chart data</div>`}renderData(t){let r=t.ascendant;return l`<div class="wrap" aria-label="KP chart" tabindex="0"><header class="head"><h2 class="title">KP chart</h2>${r?l`<div class="asc">Ascendant: <strong>${typeof r.longitude=="number"?X(r.longitude):r.sign??""} </strong>${r.nakshatra?l`· ${pe(r.nakshatra,r.pada)}`:c} ${r.subLord?l`· sub lord ${r.subLord}`:c} ${typeof r.kpNumber=="number"?l`· KP ${r.kpNumber}`:c}</div>`:c} ${typeof t.meta?.ayanamsa=="number"?l`<div class="ayan">${t.meta.ayanamsaType??"Ayanamsa"}: ${Ue(t.meta.ayanamsa,4)}° ${t.meta.houseSystem?l`· ${t.meta.houseSystem} houses`:c}</div>`:c}</header>${De({items:ht,active:this.activeTab,onSelect:o=>{this.activeTab=o},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let t=this.bodies();return t.length?l`<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">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>${t.map(r=>l`<tr><td class="body">${r.name}${r.retrograde?l`<span class="retro">R</span>`:c}</td><td class="num">${typeof r.longitude=="number"?X(r.longitude):""}</td><td class="num">${typeof r.house=="number"?r.house:""}</td><td>${pe(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`:l`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let t=this.data?.cusps??[];return t.length?l`<table role="table"><caption class="roxy-sr-only">KP Placidus cusps: each house cusp with 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>${t.map(r=>l`<tr><td class="body num">${r.house}</td><td class="num">${typeof r.longitude=="number"?X(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${pe(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`:l`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let t=this.data?.significators,r=t?.houseWise??[],o=t?.planetWise??[];return!r.length&&!o.length?l`<p class="roxy-empty" role="status">No significators</p>`:l`${this.renderLevelLegend(r)} ${r.length?l`<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 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>${Q.map(n=>l`<th scope="col">L${n}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(n=>l`<tr><td class="body num">${n.house}</td>${Q.map(i=>this.renderCell(this.planetsAtLevel(n,i).join(", ")))}<td class="chain">${Ie(n.all??[])}</td></tr>`)}</tbody></table>`:c} ${o.length?l`<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 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>${Q.map(n=>l`<th scope="col">L${n}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${o.map(n=>l`<tr><td class="body">${n.planet}</td>${Q.map(i=>this.renderCell(this.housesAtLevel(n,i).join(", ")))}<td class="chain">${Ie(n.allHouses??[])}</td></tr>`)}</tbody></table>`:c}`}renderCell(t){return t?l`<td>${t}</td>`:l`<td class="empty-cell">none</td>`}planetsAtLevel(t,r){return(t.significators??[]).filter(o=>o.level===r).flatMap(o=>o.planets??[])}housesAtLevel(t,r){return(t.signifies??[]).filter(o=>o.level===r).flatMap(o=>o.houses??[])}renderLevelLegend(t){let r=new Map;for(let o of t)for(let n of o.significators??[])n.description&&!r.has(n.level)&&r.set(n.level,n.description);return r.size===0?c:l`<ul class="legend" aria-label="Significator levels">${[...r.entries()].sort((o,n)=>o[0]-n[0]).map(([o,n])=>l`<li><b>L${o}</b>${n}</li>`)}</ul>`}};E.styles=[Y,He,S`.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(--roxy-warning-fg,#9a3412);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)}`],m([D()],E.prototype,"activeTab",2),E=m([Ne("roxy-kp-chart")],E);q();return Be(ut);})();
|
|
258
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),_e=/'/g,ke=/"/g,Re=/^(?:script|style|textarea|title)$/i,ce=s=>(e,...t)=>({_$litType$:s,strings:e,values:t}),l=ce(1),$t=ce(2),St=ce(3),k=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ee=new WeakMap,A=_.createTreeWalker(_,129);function Pe(s,e){if(!de(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Se!==void 0?Se.createHTML(e):e}var tt=(s,e)=>{let t=s.length-1,r=[],o,n=e===2?"<svg>":e===3?"<math>":"",i=N;for(let d=0;d<t;d++){let a=s[d],u,p,h=-1,y=0;for(;y<a.length&&(i.lastIndex=y,p=i.exec(a),p!==null);)y=i.lastIndex,i===N?p[1]==="!--"?i=we:p[1]!==void 0?i=Ae:p[2]!==void 0?(Re.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=w):p[3]!==void 0&&(i=w):i===w?p[0]===">"?(i=o??N,h=-1):p[1]===void 0?h=-2:(h=i.lastIndex-p[2].length,u=p[1],i=p[3]===void 0?w:p[3]==='"'?ke:_e):i===ke||i===_e?i=w:i===we||i===Ae?i=N:(i=w,o=void 0);let b=i===w&&s[d+1].startsWith("/>")?" ":"";n+=i===N?a+Qe:h>=0?(r.push(u),a.slice(0,h)+Te+a.slice(h)+v+b):a+v+(h===-2?d:b)}return[Pe(s,n+(s[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},U=class s{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let n=0,i=0,d=e.length-1,a=this.parts,[u,p]=tt(e,t);if(this.el=s.createElement(u,r),A.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=A.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(Te)){let y=p[i++],b=o.getAttribute(h).split(v),I=/([.?@])?(.*)/.exec(y);a.push({type:1,index:n,name:I[2],strings:b,ctor:I[1]==="."?se:I[1]==="?"?ne:I[1]==="@"?ie:C}),o.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(Re.test(o.tagName)){let h=o.textContent.split(v),y=h.length-1;if(y>0){o.textContent=F?F.emptyScript:"";for(let b=0;b<y;b++)o.append(h[b],M()),A.nextNode(),a.push({type:2,index:++n});o.append(h[y],M())}}}else if(o.nodeType===8)if(o.data===Ce)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:n}),h+=v.length-1}n++}}static createElement(e,t){let r=_.createElement("template");return r.innerHTML=e,r}};function T(s,e,t=s,r){if(e===k)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,n=O(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(s),o._$AT(s,t,r)),r!==void 0?(t._$Co??=[])[r]=o:t._$Cl=o),o!==void 0&&(e=T(s,o._$AS(s,e.values),o,r)),e}var oe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,o=(e?.creationScope??_).importNode(t,!0);A.currentNode=o;let n=A.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new H(n,n.nextSibling,this,e):a.type===1?u=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(u=new ae(n,this,e)),this._$AV.push(u),a=r[++d]}i!==a?.index&&(n=A.nextNode(),i++)}return A.currentNode=_,o}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},H=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),O(e)?e===c||e==null||e===""?(this._$AH!==c&&this._$AR(),this._$AH=c):e!==this._$AH&&e!==k&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):et(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==c&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=U.createElement(Pe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let n=new oe(o,this),i=n.u(this.options);n.p(t),this.T(i),this._$AH=n}}_$AC(e){let t=Ee.get(e.strings);return t===void 0&&Ee.set(e.strings,t=new U(e)),t}k(e){de(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,o=0;for(let n of e)o===t.length?t.push(r=new s(this.O(M()),this.O(M()),this,this.options)):r=t[o],r._$AI(n),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=$e(e).nextSibling;$e(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,n){this.type=1,this._$AH=c,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(e,t=this,r,o){let n=this.strings,i=!1;if(n===void 0)e=T(this,e,t,0),i=!O(e)||e!==this._$AH&&e!==k,i&&(this._$AH=e);else{let d=e,a,u;for(e=n[0],a=0;a<n.length-1;a++)u=T(this,d[r+a],t,a),u===k&&(u=this._$AH[a]),i||=!O(u)||u!==this._$AH[a],u===c?e=c:e!==c&&(e+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!o&&this.j(e)}j(e){e===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},se=class extends C{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===c?void 0:e}},ne=class extends C{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==c)}},ie=class extends C{constructor(e,t,r,o,n){super(e,t,r,o,n),this.type=5}_$AI(e,t=this){if((e=T(this,e,t,0)??c)===k)return;let r=this._$AH,o=e===c&&r!==c||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==c&&(r===c||o);o&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ae=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}};var rt=le.litHtmlPolyfillSupport;rt?.(U,H),(le.litHtmlVersions??=[]).push("3.3.2");var Le=(s,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let n=t?.renderBefore??null;r._$litPart$=o=new H(e.insertBefore(M(),n),n,void 0,t??{})}return o._$AI(s),o};var he=globalThis,$=class extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Le(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return k}};$._$litElement$=!0,$.finalized=!0,he.litElementHydrateSupport?.({LitElement:$});var ot=he.litElementPolyfillSupport;ot?.({LitElement:$});(he.litElementVersions??=[]).push("4.2.2");var Ne=s=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(s,e)}):customElements.define(s,e)};var st={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:W},nt=(s=st,e,t)=>{let{kind:r,metadata:o}=t,n=globalThis.litPropertyMetadata.get(o);if(n===void 0&&globalThis.litPropertyMetadata.set(o,n=new Map),r==="setter"&&((s=Object.create(s)).wrapped=!0),n.set(t.name,s),r==="accessor"){let{name:i}=t;return{set(d){let a=e.get.call(this);e.set.call(this,d),this.requestUpdate(i,a,s,!0,d)},init(d){return d!==void 0&&this.C(i,void 0,s,d),d}}}if(r==="setter"){let{name:i}=t;return function(d){let a=this[i];e.call(this,d),this.requestUpdate(i,a,s,!0,d)}}throw Error("Unsupported decorator location: "+r)};function g(s){return(e,t)=>typeof t=="object"?nt(s,e,t):((r,o,n)=>{let i=o.hasOwnProperty(n);return o.constructor.createProperty(n,r),i?Object.getOwnPropertyDescriptor(o,n):void 0})(s,e,t)}function D(s){return g({...s,state:!0,attribute:!1})}var Me=s=>s??c;var Y=S`:host{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([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;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(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var it="https://roxyapi.com/api/v2",J=class{constructor(e){this.baseUrl=it;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let o=await r.json();if(t.signal.aborted)return;this.host.data=o}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[n,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(n,String(i));let o={Accept:"application/json"};return this.publishableKey&&(o["X-API-Key"]=this.publishableKey),e.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:o,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){let e=this.publishableKey;return!e||e.startsWith("pk_")?!1:(this.host.error="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.",this.host.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key"},bubbles:!0,composed:!0})),!0)}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function Oe(s,e,t,r=[]){let o={...t},n=`/${s.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(u,p)=>{let h=o[p];return delete o[p],encodeURIComponent(String(h??""))}),i=new Set(r),d={},a={};for(let[u,p]of Object.entries(o))p===void 0||p===""||(e==="GET"||i.has(u)?d[u]=p:a[u]=p);return{path:n,method:e,query:d,body:e==="POST"?a:void 0}}var at="roxy-data";function lt(s){return s.nodeName==="SCRIPT"&&s.getAttribute("type")==="application/json"}var Z=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(lt(e)&&e.classList.contains(at))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends ${constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.onFormSubmit=t=>{let r=t.detail;this.remember&&this.writeRemembered(r.values),this.fetcher.run(Oe(this.endpoint,this.method,r.values,r.queryKeys??[]))};new Z(this),this.fetcher=new J(this)}static{this.styles=[Y]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.renderData(this.data):this.renderNoData()}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return l`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Me(this.specUrl)}" .initialValues="${this.remember?this.readRemembered():void 0}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return l`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=l`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?l`${r}${this.renderForm()}`:r}};m([g({attribute:!1})],f.prototype,"data",2),m([g({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),m([g({type:String})],f.prototype,"method",2),m([g({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),m([g({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),m([g({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),m([g({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),m([g({type:Boolean})],f.prototype,"remember",2),m([D()],f.prototype,"loading",2),m([D()],f.prototype,"error",2);var ue=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Ar=ue.map(s=>s.toLowerCase());function dt(s){let e=s%360;return e<0?e+360:e}function ct(s){let e=dt(s),t=Math.floor(e/30)%12,r=e%30,o=Math.floor(r),n=(r-o)*60,i=Math.floor(n),d=Math.round((n-i)*60);return{sign:ue[t]??"Aries",signIndex:t,degree:o,minute:i,second:d}}function X(s){let{sign:e,degree:t,minute:r}=ct(s);return`${t}\xB0 ${e} ${String(r).padStart(2,"0")}'`}function Ue(s,e=1){if(typeof s!="number"||!Number.isFinite(s))return"";let t=s.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var He=S`.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 De(s){let{items:e,active:t,onSelect:r,label:o,idPrefix:n,controls:i=!1}=s;return l`<div class="roxy-tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let u=e.findIndex(b=>b.id===t);if(u===-1)return;let p=a.key==="ArrowRight"?1:-1,h=e[(u+p+e.length)%e.length];if(!h)return;r(h.id);let y=a.currentTarget.getRootNode();requestAnimationFrame(()=>{y.querySelector(`#${n}-tab-${h.id}`)?.focus()})}}">${e.map(a=>l`<button type="button" class="roxy-tab" role="tab" id="${n}-tab-${a.id}" aria-selected="${t===a.id?"true":"false"}" aria-controls="${i&&t===a.id?`${n}-panel-${a.id}`:c}" tabindex="${t===a.id?"0":"-1"}" @click="${()=>r(a.id)}">${a.label}</button>`)}</div>`}var ht=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Q=[1,2,3,4];function pe(s,e){return s?typeof e=="number"?`${s} ${e}`:s:""}function Ie(s){return[...new Set(s.map(String))].join(" > ")}var E=class extends f{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let t=this.data;if(!t)return[];let r=(t.planets??[]).map(n=>({name:n.planet,longitude:n.longitude,house:n.house,nakshatra:n.nakshatra,pada:n.pada,starLord:n.starLord,subLord:n.subLord,subSubLord:n.subSubLord,kpNumber:n.kpNumber,retrograde:n.retrograde})),o=t.nodes;for(let[n,i]of[["Rahu",o?.rahu],["Ketu",o?.ketu]])i&&r.push({name:n,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,kpNumber:i.kpNumber,retrograde:!0});return r}renderEmpty(){return l`<div class="roxy-empty" role="status">No KP chart data</div>`}renderData(t){let r=t.ascendant;return l`<div class="wrap" aria-label="KP chart" tabindex="0"><header class="head"><h2 class="title">KP chart</h2>${r?l`<div class="asc">Ascendant: <strong>${typeof r.longitude=="number"?X(r.longitude):r.sign??""} </strong>${r.nakshatra?l`· ${pe(r.nakshatra,r.pada)}`:c} ${r.subLord?l`· sub lord ${r.subLord}`:c} ${typeof r.kpNumber=="number"?l`· KP ${r.kpNumber}`:c}</div>`:c} ${typeof t.meta?.ayanamsa=="number"?l`<div class="ayan">${t.meta.ayanamsaType??"Ayanamsa"}: ${Ue(t.meta.ayanamsa,4)}° ${t.meta.houseSystem?l`· ${t.meta.houseSystem} houses`:c}</div>`:c}</header>${De({items:ht,active:this.activeTab,onSelect:o=>{this.activeTab=o},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let t=this.bodies();return t.length?l`<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">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>${t.map(r=>l`<tr><td class="body">${r.name}${r.retrograde?l`<span class="retro">R</span>`:c}</td><td class="num">${typeof r.longitude=="number"?X(r.longitude):""}</td><td class="num">${typeof r.house=="number"?r.house:""}</td><td>${pe(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`:l`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let t=this.data?.cusps??[];return t.length?l`<table role="table"><caption class="roxy-sr-only">KP Placidus cusps: each house cusp with 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>${t.map(r=>l`<tr><td class="body num">${r.house}</td><td class="num">${typeof r.longitude=="number"?X(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${pe(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`:l`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let t=this.data?.significators,r=t?.houseWise??[],o=t?.planetWise??[];return!r.length&&!o.length?l`<p class="roxy-empty" role="status">No significators</p>`:l`${this.renderLevelLegend(r)} ${r.length?l`<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 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>${Q.map(n=>l`<th scope="col">L${n}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(n=>l`<tr><td class="body num">${n.house}</td>${Q.map(i=>this.renderCell(this.planetsAtLevel(n,i).join(", ")))}<td class="chain">${Ie(n.all??[])}</td></tr>`)}</tbody></table>`:c} ${o.length?l`<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 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>${Q.map(n=>l`<th scope="col">L${n}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${o.map(n=>l`<tr><td class="body">${n.planet}</td>${Q.map(i=>this.renderCell(this.housesAtLevel(n,i).join(", ")))}<td class="chain">${Ie(n.allHouses??[])}</td></tr>`)}</tbody></table>`:c}`}renderCell(t){return t?l`<td>${t}</td>`:l`<td class="empty-cell">none</td>`}planetsAtLevel(t,r){return(t.significators??[]).filter(o=>o.level===r).flatMap(o=>o.planets??[])}housesAtLevel(t,r){return(t.signifies??[]).filter(o=>o.level===r).flatMap(o=>o.houses??[])}renderLevelLegend(t){let r=new Map;for(let o of t)for(let n of o.significators??[])n.description&&!r.has(n.level)&&r.set(n.level,n.description);return r.size===0?c:l`<ul class="legend" aria-label="Significator levels">${[...r.entries()].sort((o,n)=>o[0]-n[0]).map(([o,n])=>l`<li><b>L${o}</b>${n}</li>`)}</ul>`}};E.styles=[Y,He,S`.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(--roxy-warning-fg,#9a3412);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)}`],m([D()],E.prototype,"activeTab",2),E=m([Ne("roxy-kp-chart")],E);q();return Be(ut);})();
|
|
259
259
|
/*! Bundled license information:
|
|
260
260
|
|
|
261
261
|
@lit/reactive-element/css-tag.js:
|