@roxyapi/ui 0.17.0 → 0.18.0

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.
Files changed (87) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +3 -3
  3. package/components-catalog.json +126 -110
  4. package/dist/cdn/components/ashtakavarga-grid.js +1 -1
  5. package/dist/cdn/components/ashtakavarga-grid.js.map +2 -2
  6. package/dist/cdn/components/bodygraph.js +1 -1
  7. package/dist/cdn/components/bodygraph.js.map +2 -2
  8. package/dist/cdn/components/dasha-timeline.js +4 -4
  9. package/dist/cdn/components/dasha-timeline.js.map +4 -4
  10. package/dist/cdn/components/divisional-chart.js +1 -1
  11. package/dist/cdn/components/divisional-chart.js.map +2 -2
  12. package/dist/cdn/components/endpoint-form.js +1 -1
  13. package/dist/cdn/components/endpoint-form.js.map +2 -2
  14. package/dist/cdn/components/kp-chart.js +1 -1
  15. package/dist/cdn/components/kp-chart.js.map +2 -2
  16. package/dist/cdn/components/location-search.js +1 -1
  17. package/dist/cdn/components/location-search.js.map +2 -2
  18. package/dist/cdn/components/natal-chart.js +1 -1
  19. package/dist/cdn/components/natal-chart.js.map +2 -2
  20. package/dist/cdn/components/relocation-wheel.js +1 -1
  21. package/dist/cdn/components/relocation-wheel.js.map +2 -2
  22. package/dist/cdn/components/tarot-card.js +1 -1
  23. package/dist/cdn/components/tarot-card.js.map +2 -2
  24. package/dist/cdn/components/transits-table.js +1 -1
  25. package/dist/cdn/components/transits-table.js.map +2 -2
  26. package/dist/cdn/components/vedic-kundli.js +1 -1
  27. package/dist/cdn/components/vedic-kundli.js.map +2 -2
  28. package/dist/cdn/roxy-ui.js +74 -74
  29. package/dist/cdn/roxy-ui.js.map +3 -3
  30. package/dist/cdn/widgets.js +1 -1
  31. package/dist/components/ashtakavarga-grid.js +1 -1
  32. package/dist/components/ashtakavarga-grid.js.map +2 -2
  33. package/dist/components/bodygraph.js +1 -1
  34. package/dist/components/bodygraph.js.map +2 -2
  35. package/dist/components/dasha-timeline.d.ts +43 -8
  36. package/dist/components/dasha-timeline.d.ts.map +1 -1
  37. package/dist/components/dasha-timeline.js +1 -1
  38. package/dist/components/dasha-timeline.js.map +4 -4
  39. package/dist/components/divisional-chart.js +1 -1
  40. package/dist/components/divisional-chart.js.map +2 -2
  41. package/dist/components/endpoint-form.d.ts +3 -1
  42. package/dist/components/endpoint-form.d.ts.map +1 -1
  43. package/dist/components/endpoint-form.js +1 -1
  44. package/dist/components/endpoint-form.js.map +2 -2
  45. package/dist/components/kp-chart.js +1 -1
  46. package/dist/components/kp-chart.js.map +2 -2
  47. package/dist/components/location-search.d.ts.map +1 -1
  48. package/dist/components/location-search.js +1 -1
  49. package/dist/components/location-search.js.map +2 -2
  50. package/dist/components/natal-chart.js +1 -1
  51. package/dist/components/natal-chart.js.map +2 -2
  52. package/dist/components/relocation-wheel.js +1 -1
  53. package/dist/components/relocation-wheel.js.map +2 -2
  54. package/dist/components/tarot-card.js +1 -1
  55. package/dist/components/tarot-card.js.map +2 -2
  56. package/dist/components/transits-table.js +1 -1
  57. package/dist/components/transits-table.js.map +2 -2
  58. package/dist/components/vedic-kundli.js +1 -1
  59. package/dist/components/vedic-kundli.js.map +2 -2
  60. package/dist/generated/endpoint-bindings.d.ts.map +1 -1
  61. package/dist/index.cjs +42 -42
  62. package/dist/index.cjs.map +3 -3
  63. package/dist/index.js +50 -50
  64. package/dist/index.js.map +3 -3
  65. package/dist/manifest.d.ts.map +1 -1
  66. package/dist/manifest.json +45 -45
  67. package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
  68. package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
  69. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -0
  70. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -0
  71. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
  72. package/dist/types/index.d.ts +1 -1
  73. package/dist/types/index.d.ts.map +1 -1
  74. package/dist/types/types.gen.d.ts +642 -2
  75. package/dist/types/types.gen.d.ts.map +1 -1
  76. package/dist/utils/tablist.d.ts.map +1 -1
  77. package/dist/version.d.ts +1 -1
  78. package/package.json +1 -1
  79. package/src/components/dasha-timeline.ts +250 -50
  80. package/src/components/endpoint-form.ts +4 -2
  81. package/src/components/location-search.ts +8 -1
  82. package/src/generated/endpoint-bindings.ts +16 -0
  83. package/src/manifest.ts +4 -2
  84. package/src/types/index.ts +1 -1
  85. package/src/types/types.gen.ts +652 -2
  86. package/src/utils/tablist.ts +7 -1
  87. package/src/version.ts +1 -1
@@ -261,7 +261,7 @@ var RoxyUI_relocation_wheel=(()=>{var te=Object.defineProperty;var Ue=Object.get
261
261
  }
262
262
  `;var re="roxy-ui-tokens";function oe(){if(typeof document>"u")return null;let a=document.getElementById(re);if(a)return a;let e=document.createElement("style");return e.id=re,e.textContent=Ie,document.head.prepend(e),e}var se=globalThis,ne=se.ShadowRoot&&(se.ShadyCSS===void 0||se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ge=Symbol(),De=new WeakMap,K=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ge)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(ne&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=De.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&De.set(t,e))}return e}toString(){return this.cssText}},He=a=>new K(typeof a=="string"?a:a+"",void 0,ge),A=(a,...e)=>{let t=a.length===1?a[0]:e.reduce((r,o,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+a[s+1],a[0]);return new K(t,a,ge)},ze=(a,e)=>{if(ne)a.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),o=se.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,a.appendChild(r)}},ye=ne?a=>a:a=>a instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return He(t)})(a):a;var{is:vt,defineProperty:$t,getOwnPropertyDescriptor:wt,getOwnPropertyNames:At,getOwnPropertySymbols:St,getPrototypeOf:kt}=Object,ae=globalThis,je=ae.trustedTypes,_t=je?je.emptyScript:"",Et=ae.reactiveElementPolyfillSupport,F=(a,e)=>a,B={toAttribute(a,e){switch(e){case Boolean:a=a?_t:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,e){let t=a;switch(e){case Boolean:t=a!==null;break;case Number:t=a===null?null:Number(a);break;case Object:case Array:try{t=JSON.parse(a)}catch{t=null}}return t}},ie=(a,e)=>!vt(a,e),qe={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:ie};Symbol.metadata??=Symbol("metadata"),ae.litPropertyMetadata??=new WeakMap;var E=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=qe){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&&$t(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){let{get:o,set:s}=wt(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:o,set(n){let l=o?.call(this);s?.call(this,n),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qe}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;let e=kt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){let t=this.properties,r=[...At(t),...St(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(ye(o))}else e!==void 0&&t.push(ye(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 ze(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 s=(r.converter?.toAttribute!==void 0?r.converter:B).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:B;this._$Em=o;let l=n.fromAttribute(t,s.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(e,t,r,o=!1,s){if(e!==void 0){let n=this.constructor;if(o===!1&&(s=this[e]),r??=n.getPropertyOptions(e),!((r.hasChanged??ie)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:o,wrapped:s},n){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==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,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:n}=s,l=this[o];n!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,s,l)}}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){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[F("elementProperties")]=new Map,E[F("finalized")]=new Map,Et?.({ReactiveElement:E}),(ae.reactiveElementVersions??=[]).push("2.1.2");var Ae=globalThis,Ge=a=>a,le=Ae.trustedTypes,Ke=le?le.createPolicy("lit-html",{createHTML:a=>a}):void 0,Je="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,Ze="?"+C,Tt=`<${Ze}>`,O=document,Y=()=>O.createComment(""),W=a=>a===null||typeof a!="object"&&typeof a!="function",Se=Array.isArray,Ct=a=>Se(a)||typeof a?.[Symbol.iterator]=="function",xe=`[
263
263
  \f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,Be=/>/g,N=RegExp(`>|${xe}(?:([^\\s"'>=/]+)(${xe}*=${xe}*(?:[^
264
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ve=/'/g,Ye=/"/g,Xe=/^(?:script|style|textarea|title)$/i,ke=a=>(e,...t)=>({_$litType$:a,strings:e,values:t}),c=ke(1),S=ke(2),Wt=ke(3),U=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),We=new WeakMap,L=O.createTreeWalker(O,129);function Qe(a,e){if(!Se(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ke!==void 0?Ke.createHTML(e):e}var Rt=(a,e)=>{let t=a.length-1,r=[],o,s=e===2?"<svg>":e===3?"<math>":"",n=V;for(let l=0;l<t;l++){let i=a[l],p,u,h=-1,g=0;for(;g<i.length&&(n.lastIndex=g,u=n.exec(i),u!==null);)g=n.lastIndex,n===V?u[1]==="!--"?n=Fe:u[1]!==void 0?n=Be:u[2]!==void 0?(Xe.test(u[2])&&(o=RegExp("</"+u[2],"g")),n=N):u[3]!==void 0&&(n=N):n===N?u[0]===">"?(n=o??V,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,p=u[1],n=u[3]===void 0?N:u[3]==='"'?Ye:Ve):n===Ye||n===Ve?n=N:n===Fe||n===Be?n=V:(n=N,o=void 0);let y=n===N&&a[l+1].startsWith("/>")?" ":"";s+=n===V?i+Tt:h>=0?(r.push(p),i.slice(0,h)+Je+i.slice(h)+C+y):i+C+(h===-2?l:y)}return[Qe(a,s+(a[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},J=class a{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,n=0,l=e.length-1,i=this.parts,[p,u]=Rt(e,t);if(this.el=a.createElement(p,r),L.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=L.nextNode())!==null&&i.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(Je)){let g=u[n++],y=o.getAttribute(h).split(C),$=/([.?@])?(.*)/.exec(g);i.push({type:1,index:s,name:$[2],strings:y,ctor:$[1]==="."?be:$[1]==="?"?ve:$[1]==="@"?$e:H}),o.removeAttribute(h)}else h.startsWith(C)&&(i.push({type:6,index:s}),o.removeAttribute(h));if(Xe.test(o.tagName)){let h=o.textContent.split(C),g=h.length-1;if(g>0){o.textContent=le?le.emptyScript:"";for(let y=0;y<g;y++)o.append(h[y],Y()),L.nextNode(),i.push({type:2,index:++s});o.append(h[g],Y())}}}else if(o.nodeType===8)if(o.data===Ze)i.push({type:2,index:s});else{let h=-1;for(;(h=o.data.indexOf(C,h+1))!==-1;)i.push({type:7,index:s}),h+=C.length-1}s++}}static createElement(e,t){let r=O.createElement("template");return r.innerHTML=e,r}};function D(a,e,t=a,r){if(e===U)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,s=W(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),s===void 0?o=void 0:(o=new s(a),o._$AT(a,t,r)),r!==void 0?(t._$Co??=[])[r]=o:t._$Cl=o),o!==void 0&&(e=D(a,o._$AS(a,e.values),o,r)),e}var fe=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??O).importNode(t,!0);L.currentNode=o;let s=L.nextNode(),n=0,l=0,i=r[0];for(;i!==void 0;){if(n===i.index){let p;i.type===2?p=new Z(s,s.nextSibling,this,e):i.type===1?p=new i.ctor(s,i.name,i.strings,this,e):i.type===6&&(p=new we(s,this,e)),this._$AV.push(p),i=r[++l]}n!==i?.index&&(s=L.nextNode(),n++)}return L.currentNode=O,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++}},Z=class a{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=d,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=D(this,e,t),W(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ct(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!==d&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(O.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=J.createElement(Qe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let s=new fe(o,this),n=s.u(this.options);s.p(t),this.T(n),this._$AH=s}}_$AC(e){let t=We.get(e.strings);return t===void 0&&We.set(e.strings,t=new J(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,o=0;for(let s of e)o===t.length?t.push(r=new a(this.O(Y()),this.O(Y()),this,this.options)):r=t[o],r._$AI(s),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=Ge(e).nextSibling;Ge(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,o){let s=this.strings,n=!1;if(s===void 0)e=D(this,e,t,0),n=!W(e)||e!==this._$AH&&e!==U,n&&(this._$AH=e);else{let l=e,i,p;for(e=s[0],i=0;i<s.length-1;i++)p=D(this,l[r+i],t,i),p===U&&(p=this._$AH[i]),n||=!W(p)||p!==this._$AH[i],p===d?e=d:e!==d&&(e+=(p??"")+s[i+1]),this._$AH[i]=p}n&&!o&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},be=class extends H{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},ve=class extends H{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},$e=class extends H{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){if((e=D(this,e,t,0)??d)===U)return;let r=this._$AH,o=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||o);o&&this.element.removeEventListener(this.name,this,r),s&&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)}},we=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){D(this,e)}};var Pt=Ae.litHtmlPolyfillSupport;Pt?.(J,Z),(Ae.litHtmlVersions??=[]).push("3.3.3");var et=(a,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let s=t?.renderBefore??null;r._$litPart$=o=new Z(e.insertBefore(Y(),s),s,void 0,t??{})}return o._$AI(a),o};var _e=globalThis,R=class extends E{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=et(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};R._$litElement$=!0,R.finalized=!0,_e.litElementHydrateSupport?.({LitElement:R});var Mt=_e.litElementPolyfillSupport;Mt?.({LitElement:R});(_e.litElementVersions??=[]).push("4.2.2");var ce=a=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var Nt={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:ie},Lt=(a=Nt,e,t)=>{let{kind:r,metadata:o}=t,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),s.set(t.name,a),r==="accessor"){let{name:n}=t;return{set(l){let i=e.get.call(this);e.set.call(this,l),this.requestUpdate(n,i,a,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,a,l),l}}}if(r==="setter"){let{name:n}=t;return function(l){let i=this[n];e.call(this,l),this.requestUpdate(n,i,a,!0,l)}}throw Error("Unsupported decorator location: "+r)};function w(a){return(e,t)=>typeof t=="object"?Lt(a,e,t):((r,o,s)=>{let n=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),n?Object.getOwnPropertyDescriptor(o,s):void 0})(a,e,t)}function P(a){return w({...a,state:!0,attribute:!1})}var k={Sun:"\u2609",Moon:"\u263D",Mercury:"\u263F",Venus:"\u2640",Earth:"\u2641",Mars:"\u2642",Jupiter:"\u2643",Saturn:"\u2644",Uranus:"\u2645",Neptune:"\u2646",Pluto:"\u2647",Rahu:"\u260A",Ketu:"\u260B",Ascendant:"Asc",Lagna:"La",NorthNode:"\u260A",SouthNode:"\u260B","North node":"\u260A","South node":"\u260B",Chiron:"\u26B7",Lilith:"\u26B8","Black moon lilith":"\u26B8"};var tt={Aries:"\u2648",Taurus:"\u2649",Gemini:"\u264A",Cancer:"\u264B",Leo:"\u264C",Virgo:"\u264D",Libra:"\u264E",Scorpio:"\u264F",Sagittarius:"\u2650",Capricorn:"\u2651",Aquarius:"\u2652",Pisces:"\u2653"};var X=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Ee={conjunction:"\u260C",opposition:"\u260D",trine:"\u25B3",square:"\u25A1",sextile:"\u2731",quincunx:"\u22BB",semisextile:"\u22BC"};var Q=a=>a??d;var z=A`: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}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%{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}.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}:host{font-variant-emoji:text}`;var pe="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function rt(a){return!!a&&!a.startsWith("pk_")}function ot(a,e={}){e.warn&&console.warn(pe),a.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:pe},bubbles:!0,composed:!0}))}var Ot="https://roxyapi.com/api/v2",he=class{constructor(e){this.baseUrl=Ot;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[s,n]of Object.entries(e.query??{}))n!=null&&r.searchParams.set(s,String(n));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(){return rt(this.publishableKey)?(this.host.error=pe,ot(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function st(a,e,t,r=[]){let o={...t},s=`/${a.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,u)=>{let h=o[u];return delete o[u],encodeURIComponent(String(h??""))}),n=new Set(r),l={},i={};for(let[p,u]of Object.entries(o))u===void 0||u===""||(e==="GET"||n.has(p)?l[p]=u:i[p]=u);return{path:s,method:e,query:l,body:e==="POST"?i:void 0}}var Ut="roxy-data";function It(a){return a.nodeName==="SCRIPT"&&a.getAttribute("type")==="application/json"}var ue=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(It(e)&&e.classList.contains(Ut))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends R{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(st(this.endpoint,this.method,r.values,r.queryKeys??[]))};new ue(this),this.fetcher=new he(this)}static{this.styles=[z]}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.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderResult(t){let r=this.sticky?c`${this.renderForm()}${this.renderData(t)}`:c`<div class="roxy-edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">Edit query</button></div>${this.renderData(t)}`;return this.showAttribution()?c`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">Spiritual data by RoxyAPI</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return c`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Q(this.specUrl)}" publishable-key="${Q(this.publishableKey)}" submit-label="${Q(this.submitLabel)}" lang="${Q(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return this.lang||void 0}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 c`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=c`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?c`${r}${this.renderForm()}`:r}};x([w({attribute:!1})],f.prototype,"data",2),x([w({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),x([w({type:String})],f.prototype,"method",2),x([w({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),x([w({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),x([w({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),x([w({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),x([w({type:Boolean})],f.prototype,"remember",2),x([w({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),x([w({type:String})],f.prototype,"attribution",2),x([P()],f.prototype,"loading",2),x([P()],f.prototype,"error",2),x([P()],f.prototype,"selfFetched",2),x([P()],f.prototype,"editing",2),x([P()],f.prototype,"sticky",2);function _(a){let e=a%360;return e<0?e+360:e}function Te(a){let e=_(a),t=Math.floor(e/30)%12,r=e%30,o=Math.floor(r),s=(r-o)*60,n=Math.floor(s),l=Math.round((s-n)*60);return{sign:X[t]??"Aries",signIndex:t,degree:o,minute:n,second:l}}function Ce(a){return _(a+180)}function nt(a,e){let t=_(a),r=_(e)-t;return r<0&&(r+=360),_(t+r/2)}function b(a,e,t,r){let o=r*Math.PI/180;return{x:a+t*Math.cos(o),y:e+t*Math.sin(o)}}function at(){return c`<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 it=A`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}}`;function me(a,e=1){if(typeof a!="number"||!Number.isFinite(a))return"";let t=a.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var Re={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function Pe(a){return(a.type??"").toLowerCase().replace(/_/g,"-")}var lt=A`.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}`;function ct(a,e,t="Reading"){let r=a.filter(o=>!!o.body);return r.length===0?d:c`<section class="block"><h3>${t}</h3>${r.map((o,s)=>c`<details class="interp-card" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${at()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:d}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??d}</div></details>`)}</section>`}function v(a){return a?a.charAt(0).toUpperCase()+a.slice(1).toLowerCase():""}var dt=A`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:4px}`;function pt(a){let{items:e,active:t,onSelect:r,label:o,idPrefix:s,controls:n=!1}=a;return c`<div class="roxy-tablist" role="tablist" aria-label="${o}" @keydown="${i=>{if(i.key!=="ArrowRight"&&i.key!=="ArrowLeft")return;i.preventDefault();let p=e.findIndex(y=>y.id===t);if(p===-1)return;let u=i.key==="ArrowRight"?1:-1,h=e[(p+u+e.length)%e.length];if(!h)return;r(h.id);let g=i.currentTarget.getRootNode();requestAnimationFrame(()=>{g.querySelector(`#${s}-tab-${h.id}`)?.focus()})}}">${e.map(i=>c`<button type="button" class="roxy-tab" role="tab" id="${s}-tab-${i.id}" aria-selected="${t===i.id?"true":"false"}" aria-controls="${n&&t===i.id?`${s}-panel-${i.id}`:d}" tabindex="${t===i.id?"0":"-1"}" @click="${()=>r(i.id)}">${i.label}</button>`)}</div>`}var ht={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Ne=420,m=Ne/2,j=164,Me=146,ee=120,q=96,Dt=178,Ht=196,M=class extends f{constructor(){super(...arguments);this.houseSystem="placidus";this.heading="Natal chart";this.view="wheel"}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let t=this.data?.midheaven?.longitude;return typeof t=="number"?t:null}toAngle(t){return 180+this.getAscendant()-t}renderEmpty(){return c`<div class="roxy-empty" role="status">No chart data</div>`}renderData(t){let r=this.getPlanets(),o=t.aspects??[],s=this.view;return c`<div class="wrap"><header><h2 class="title">${this.heading}</h2>${t.birthDetails?c`<div class="meta">${[t.birthDetails.date,t.birthDetails.time].filter(Boolean).join(" \xB7 ")}</div>`:d}</header>${o.length>0?c`${pt({items:[{id:"wheel",label:"Wheel"},{id:"grid",label:"Aspect grid"}],active:s,onSelect:n=>{this.view=n},label:"Natal chart views",idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(r,o):this.renderAspectGrid(r,o)}</div>`:this.renderWheel(r,o)}<div class="legend"><span>${r.length} planets</span> ${o.length>0?c`<span>${o.length} aspects</span>`:d} ${t.houseSystem?c`<span>${t.houseSystem} houses</span>`:d} ${o.length>0?c`<span><span class="legend-swatch" style="background:var(--roxy-success)"></span>harmonious</span> <span><span class="legend-swatch" style="background:var(--roxy-danger)"></span>challenging</span>`:d}</div>${this.renderDetails()} ${this.renderPatterns()} ${this.renderInterpretations()}</div>`}renderWheel(t,r){return c`<svg viewBox="0 0 ${Ne} ${Ne}" role="img" aria-label="Natal chart wheel with twelve houses, planets, and aspects"><title>Natal chart wheel</title><desc>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="${m}" cy="${m}" r="${j}" stroke-width="1.5"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${Me-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${ee}" stroke-width="1"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${q-16}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(t,r)} ${this.renderPlanets(t)} ${this.renderAngles()}</svg>`}renderAspectGrid(t,r){let o=t.map(n=>v(n.name)),s=new Map;for(let n of r){let l=[v(n.planet1),v(n.planet2)].sort().join("|");s.set(l,n)}return o.length===0?c`<p class="roxy-empty" role="status">No planets to grid</p>`:c`<div class="grid-scroll"><table class="aspect-grid"><caption class="roxy-sr-only">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>${o.slice(0,-1).map(n=>{let l=k[n]??n.slice(0,2);return c`<th scope="col" title="${n}">${l}</th>`})}</tr></thead><tbody>${o.slice(1).map((n,l)=>{let i=k[n]??n.slice(0,2);return c`<tr><th scope="row" title="${n}">${i}</th>${o.slice(0,l+1).map(p=>{let u=s.get([n,p].sort().join("|"));if(!u)return c`<td class="empty"></td>`;let h=Pe(u),g=Ee[h]??Ee[h.replace(/-/g,"")]??h.slice(0,3),y=Re[h]??"aspect-other",$=me(u.orb,1);return c`<td class="${`cell ${y}`}" title="${`${n} ${h} ${p}${$?` (orb ${$}\xB0)`:""}`}"><span class="asp">${g}</span></td>`})} ${o.slice(l+1,-1).map(()=>c`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let t=this.getAscendant(),r=this.getMidheaven(),o=[this.renderAngleMark(t,"ASC"),this.renderAngleMark(Ce(t),"DSC")];r!==null&&(o.push(this.renderAngleMark(r,"MC")),o.push(this.renderAngleMark(Ce(r),"IC")));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&o.push(this.renderAngleMark(_(s),"PoF"));let n=this.data?.vertex?.longitude;return typeof n=="number"&&o.push(this.renderAngleMark(_(n),"Vtx")),o}renderAngleMark(t,r){let o=this.toAngle(t),s=b(m,m,j,o),n=b(m,m,Dt,o),l=b(m,m,Ht,o);return S`
264
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ve=/'/g,Ye=/"/g,Xe=/^(?:script|style|textarea|title)$/i,ke=a=>(e,...t)=>({_$litType$:a,strings:e,values:t}),c=ke(1),S=ke(2),Wt=ke(3),U=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),We=new WeakMap,L=O.createTreeWalker(O,129);function Qe(a,e){if(!Se(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ke!==void 0?Ke.createHTML(e):e}var Rt=(a,e)=>{let t=a.length-1,r=[],o,s=e===2?"<svg>":e===3?"<math>":"",n=V;for(let l=0;l<t;l++){let i=a[l],p,u,h=-1,g=0;for(;g<i.length&&(n.lastIndex=g,u=n.exec(i),u!==null);)g=n.lastIndex,n===V?u[1]==="!--"?n=Fe:u[1]!==void 0?n=Be:u[2]!==void 0?(Xe.test(u[2])&&(o=RegExp("</"+u[2],"g")),n=N):u[3]!==void 0&&(n=N):n===N?u[0]===">"?(n=o??V,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,p=u[1],n=u[3]===void 0?N:u[3]==='"'?Ye:Ve):n===Ye||n===Ve?n=N:n===Fe||n===Be?n=V:(n=N,o=void 0);let y=n===N&&a[l+1].startsWith("/>")?" ":"";s+=n===V?i+Tt:h>=0?(r.push(p),i.slice(0,h)+Je+i.slice(h)+C+y):i+C+(h===-2?l:y)}return[Qe(a,s+(a[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},J=class a{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,n=0,l=e.length-1,i=this.parts,[p,u]=Rt(e,t);if(this.el=a.createElement(p,r),L.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=L.nextNode())!==null&&i.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(Je)){let g=u[n++],y=o.getAttribute(h).split(C),$=/([.?@])?(.*)/.exec(g);i.push({type:1,index:s,name:$[2],strings:y,ctor:$[1]==="."?be:$[1]==="?"?ve:$[1]==="@"?$e:H}),o.removeAttribute(h)}else h.startsWith(C)&&(i.push({type:6,index:s}),o.removeAttribute(h));if(Xe.test(o.tagName)){let h=o.textContent.split(C),g=h.length-1;if(g>0){o.textContent=le?le.emptyScript:"";for(let y=0;y<g;y++)o.append(h[y],Y()),L.nextNode(),i.push({type:2,index:++s});o.append(h[g],Y())}}}else if(o.nodeType===8)if(o.data===Ze)i.push({type:2,index:s});else{let h=-1;for(;(h=o.data.indexOf(C,h+1))!==-1;)i.push({type:7,index:s}),h+=C.length-1}s++}}static createElement(e,t){let r=O.createElement("template");return r.innerHTML=e,r}};function D(a,e,t=a,r){if(e===U)return e;let o=r!==void 0?t._$Co?.[r]:t._$Cl,s=W(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),s===void 0?o=void 0:(o=new s(a),o._$AT(a,t,r)),r!==void 0?(t._$Co??=[])[r]=o:t._$Cl=o),o!==void 0&&(e=D(a,o._$AS(a,e.values),o,r)),e}var fe=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??O).importNode(t,!0);L.currentNode=o;let s=L.nextNode(),n=0,l=0,i=r[0];for(;i!==void 0;){if(n===i.index){let p;i.type===2?p=new Z(s,s.nextSibling,this,e):i.type===1?p=new i.ctor(s,i.name,i.strings,this,e):i.type===6&&(p=new we(s,this,e)),this._$AV.push(p),i=r[++l]}n!==i?.index&&(s=L.nextNode(),n++)}return L.currentNode=O,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++}},Z=class a{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,o){this.type=2,this._$AH=d,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=D(this,e,t),W(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ct(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!==d&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(O.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=J.createElement(Qe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(t);else{let s=new fe(o,this),n=s.u(this.options);s.p(t),this.T(n),this._$AH=s}}_$AC(e){let t=We.get(e.strings);return t===void 0&&We.set(e.strings,t=new J(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,o=0;for(let s of e)o===t.length?t.push(r=new a(this.O(Y()),this.O(Y()),this,this.options)):r=t[o],r._$AI(s),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=Ge(e).nextSibling;Ge(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,o,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,o){let s=this.strings,n=!1;if(s===void 0)e=D(this,e,t,0),n=!W(e)||e!==this._$AH&&e!==U,n&&(this._$AH=e);else{let l=e,i,p;for(e=s[0],i=0;i<s.length-1;i++)p=D(this,l[r+i],t,i),p===U&&(p=this._$AH[i]),n||=!W(p)||p!==this._$AH[i],p===d?e=d:e!==d&&(e+=(p??"")+s[i+1]),this._$AH[i]=p}n&&!o&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},be=class extends H{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},ve=class extends H{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},$e=class extends H{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){if((e=D(this,e,t,0)??d)===U)return;let r=this._$AH,o=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||o);o&&this.element.removeEventListener(this.name,this,r),s&&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)}},we=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){D(this,e)}};var Pt=Ae.litHtmlPolyfillSupport;Pt?.(J,Z),(Ae.litHtmlVersions??=[]).push("3.3.3");var et=(a,e,t)=>{let r=t?.renderBefore??e,o=r._$litPart$;if(o===void 0){let s=t?.renderBefore??null;r._$litPart$=o=new Z(e.insertBefore(Y(),s),s,void 0,t??{})}return o._$AI(a),o};var _e=globalThis,R=class extends E{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=et(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};R._$litElement$=!0,R.finalized=!0,_e.litElementHydrateSupport?.({LitElement:R});var Mt=_e.litElementPolyfillSupport;Mt?.({LitElement:R});(_e.litElementVersions??=[]).push("4.2.2");var ce=a=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var Nt={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:ie},Lt=(a=Nt,e,t)=>{let{kind:r,metadata:o}=t,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),s.set(t.name,a),r==="accessor"){let{name:n}=t;return{set(l){let i=e.get.call(this);e.set.call(this,l),this.requestUpdate(n,i,a,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,a,l),l}}}if(r==="setter"){let{name:n}=t;return function(l){let i=this[n];e.call(this,l),this.requestUpdate(n,i,a,!0,l)}}throw Error("Unsupported decorator location: "+r)};function w(a){return(e,t)=>typeof t=="object"?Lt(a,e,t):((r,o,s)=>{let n=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),n?Object.getOwnPropertyDescriptor(o,s):void 0})(a,e,t)}function P(a){return w({...a,state:!0,attribute:!1})}var k={Sun:"\u2609",Moon:"\u263D",Mercury:"\u263F",Venus:"\u2640",Earth:"\u2641",Mars:"\u2642",Jupiter:"\u2643",Saturn:"\u2644",Uranus:"\u2645",Neptune:"\u2646",Pluto:"\u2647",Rahu:"\u260A",Ketu:"\u260B",Ascendant:"Asc",Lagna:"La",NorthNode:"\u260A",SouthNode:"\u260B","North node":"\u260A","South node":"\u260B",Chiron:"\u26B7",Lilith:"\u26B8","Black moon lilith":"\u26B8"};var tt={Aries:"\u2648",Taurus:"\u2649",Gemini:"\u264A",Cancer:"\u264B",Leo:"\u264C",Virgo:"\u264D",Libra:"\u264E",Scorpio:"\u264F",Sagittarius:"\u2650",Capricorn:"\u2651",Aquarius:"\u2652",Pisces:"\u2653"};var X=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Ee={conjunction:"\u260C",opposition:"\u260D",trine:"\u25B3",square:"\u25A1",sextile:"\u2731",quincunx:"\u22BB",semisextile:"\u22BC"};var Q=a=>a??d;var z=A`: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}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%{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}.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}:host{font-variant-emoji:text}`;var pe="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function rt(a){return!!a&&!a.startsWith("pk_")}function ot(a,e={}){e.warn&&console.warn(pe),a.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:pe},bubbles:!0,composed:!0}))}var Ot="https://roxyapi.com/api/v2",he=class{constructor(e){this.baseUrl=Ot;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[s,n]of Object.entries(e.query??{}))n!=null&&r.searchParams.set(s,String(n));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(){return rt(this.publishableKey)?(this.host.error=pe,ot(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function st(a,e,t,r=[]){let o={...t},s=`/${a.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,u)=>{let h=o[u];return delete o[u],encodeURIComponent(String(h??""))}),n=new Set(r),l={},i={};for(let[p,u]of Object.entries(o))u===void 0||u===""||(e==="GET"||n.has(p)?l[p]=u:i[p]=u);return{path:s,method:e,query:l,body:e==="POST"?i:void 0}}var Ut="roxy-data";function It(a){return a.nodeName==="SCRIPT"&&a.getAttribute("type")==="application/json"}var ue=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(It(e)&&e.classList.contains(Ut))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends R{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(st(this.endpoint,this.method,r.values,r.queryKeys??[]))};new ue(this),this.fetcher=new he(this)}static{this.styles=[z]}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.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderResult(t){let r=this.sticky?c`${this.renderForm()}${this.renderData(t)}`:c`<div class="roxy-edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">Edit query</button></div>${this.renderData(t)}`;return this.showAttribution()?c`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">Spiritual data by RoxyAPI</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return c`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Q(this.specUrl)}" publishable-key="${Q(this.publishableKey)}" submit-label="${Q(this.submitLabel)}" lang="${Q(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return this.lang||void 0}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 c`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=c`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?c`${r}${this.renderForm()}`:r}};x([w({attribute:!1})],f.prototype,"data",2),x([w({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),x([w({type:String})],f.prototype,"method",2),x([w({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),x([w({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),x([w({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),x([w({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),x([w({type:Boolean})],f.prototype,"remember",2),x([w({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),x([w({type:String})],f.prototype,"attribution",2),x([P()],f.prototype,"loading",2),x([P()],f.prototype,"error",2),x([P()],f.prototype,"selfFetched",2),x([P()],f.prototype,"editing",2),x([P()],f.prototype,"sticky",2);function _(a){let e=a%360;return e<0?e+360:e}function Te(a){let e=_(a),t=Math.floor(e/30)%12,r=e%30,o=Math.floor(r),s=(r-o)*60,n=Math.floor(s),l=Math.round((s-n)*60);return{sign:X[t]??"Aries",signIndex:t,degree:o,minute:n,second:l}}function Ce(a){return _(a+180)}function nt(a,e){let t=_(a),r=_(e)-t;return r<0&&(r+=360),_(t+r/2)}function b(a,e,t,r){let o=r*Math.PI/180;return{x:a+t*Math.cos(o),y:e+t*Math.sin(o)}}function at(){return c`<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 it=A`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}}`;function me(a,e=1){if(typeof a!="number"||!Number.isFinite(a))return"";let t=a.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var Re={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function Pe(a){return(a.type??"").toLowerCase().replace(/_/g,"-")}var lt=A`.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}`;function ct(a,e,t="Reading"){let r=a.filter(o=>!!o.body);return r.length===0?d:c`<section class="block"><h3>${t}</h3>${r.map((o,s)=>c`<details class="interp-card" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${at()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:d}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??d}</div></details>`)}</section>`}function v(a){return a?a.charAt(0).toUpperCase()+a.slice(1).toLowerCase():""}var dt=A`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function pt(a){let{items:e,active:t,onSelect:r,label:o,idPrefix:s,controls:n=!1}=a;return c`<div class="roxy-tablist" role="tablist" aria-label="${o}" @keydown="${i=>{if(i.key!=="ArrowRight"&&i.key!=="ArrowLeft")return;i.preventDefault();let p=e.findIndex(y=>y.id===t);if(p===-1)return;let u=i.key==="ArrowRight"?1:-1,h=e[(p+u+e.length)%e.length];if(!h)return;r(h.id);let g=i.currentTarget.getRootNode();requestAnimationFrame(()=>{g.querySelector(`#${s}-tab-${h.id}`)?.focus()})}}">${e.map(i=>c`<button type="button" class="roxy-tab" role="tab" id="${s}-tab-${i.id}" aria-selected="${t===i.id?"true":"false"}" aria-controls="${n&&t===i.id?`${s}-panel-${i.id}`:d}" tabindex="${t===i.id?"0":"-1"}" @click="${()=>r(i.id)}">${i.label}</button>`)}</div>`}var ht={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Ne=420,m=Ne/2,j=164,Me=146,ee=120,q=96,Dt=178,Ht=196,M=class extends f{constructor(){super(...arguments);this.houseSystem="placidus";this.heading="Natal chart";this.view="wheel"}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let t=this.data?.midheaven?.longitude;return typeof t=="number"?t:null}toAngle(t){return 180+this.getAscendant()-t}renderEmpty(){return c`<div class="roxy-empty" role="status">No chart data</div>`}renderData(t){let r=this.getPlanets(),o=t.aspects??[],s=this.view;return c`<div class="wrap"><header><h2 class="title">${this.heading}</h2>${t.birthDetails?c`<div class="meta">${[t.birthDetails.date,t.birthDetails.time].filter(Boolean).join(" \xB7 ")}</div>`:d}</header>${o.length>0?c`${pt({items:[{id:"wheel",label:"Wheel"},{id:"grid",label:"Aspect grid"}],active:s,onSelect:n=>{this.view=n},label:"Natal chart views",idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(r,o):this.renderAspectGrid(r,o)}</div>`:this.renderWheel(r,o)}<div class="legend"><span>${r.length} planets</span> ${o.length>0?c`<span>${o.length} aspects</span>`:d} ${t.houseSystem?c`<span>${t.houseSystem} houses</span>`:d} ${o.length>0?c`<span><span class="legend-swatch" style="background:var(--roxy-success)"></span>harmonious</span> <span><span class="legend-swatch" style="background:var(--roxy-danger)"></span>challenging</span>`:d}</div>${this.renderDetails()} ${this.renderPatterns()} ${this.renderInterpretations()}</div>`}renderWheel(t,r){return c`<svg viewBox="0 0 ${Ne} ${Ne}" role="img" aria-label="Natal chart wheel with twelve houses, planets, and aspects"><title>Natal chart wheel</title><desc>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="${m}" cy="${m}" r="${j}" stroke-width="1.5"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${Me-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${ee}" stroke-width="1"/><circle class="wheel-line" cx="${m}" cy="${m}" r="${q-16}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(t,r)} ${this.renderPlanets(t)} ${this.renderAngles()}</svg>`}renderAspectGrid(t,r){let o=t.map(n=>v(n.name)),s=new Map;for(let n of r){let l=[v(n.planet1),v(n.planet2)].sort().join("|");s.set(l,n)}return o.length===0?c`<p class="roxy-empty" role="status">No planets to grid</p>`:c`<div class="grid-scroll"><table class="aspect-grid"><caption class="roxy-sr-only">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>${o.slice(0,-1).map(n=>{let l=k[n]??n.slice(0,2);return c`<th scope="col" title="${n}">${l}</th>`})}</tr></thead><tbody>${o.slice(1).map((n,l)=>{let i=k[n]??n.slice(0,2);return c`<tr><th scope="row" title="${n}">${i}</th>${o.slice(0,l+1).map(p=>{let u=s.get([n,p].sort().join("|"));if(!u)return c`<td class="empty"></td>`;let h=Pe(u),g=Ee[h]??Ee[h.replace(/-/g,"")]??h.slice(0,3),y=Re[h]??"aspect-other",$=me(u.orb,1);return c`<td class="${`cell ${y}`}" title="${`${n} ${h} ${p}${$?` (orb ${$}\xB0)`:""}`}"><span class="asp">${g}</span></td>`})} ${o.slice(l+1,-1).map(()=>c`<td class="empty"></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let t=this.getAscendant(),r=this.getMidheaven(),o=[this.renderAngleMark(t,"ASC"),this.renderAngleMark(Ce(t),"DSC")];r!==null&&(o.push(this.renderAngleMark(r,"MC")),o.push(this.renderAngleMark(Ce(r),"IC")));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&o.push(this.renderAngleMark(_(s),"PoF"));let n=this.data?.vertex?.longitude;return typeof n=="number"&&o.push(this.renderAngleMark(_(n),"Vtx")),o}renderAngleMark(t,r){let o=this.toAngle(t),s=b(m,m,j,o),n=b(m,m,Dt,o),l=b(m,m,Ht,o);return S`
265
265
  <g>
266
266
  <line class="angle-tick" x1=${s.x} y1=${s.y} x2=${n.x} y2=${n.y} />
267
267
  <text class="angle-marker" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${r}</text>