@roxyapi/ui 1.1.1 → 1.1.2
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 +5 -5
- package/README.md +3 -3
- package/THEMING.md +3 -3
- package/components-catalog.json +258 -158
- package/dist/cdn/components/almanac-day.js +3 -205
- package/dist/cdn/components/angel-number-card.js +3 -205
- package/dist/cdn/components/angel-number-lookup.js +3 -205
- package/dist/cdn/components/arudha-padas.js +3 -205
- package/dist/cdn/components/ashtakavarga-grid.js +3 -205
- package/dist/cdn/components/aspects-table.js +3 -205
- package/dist/cdn/components/astrocartography-map.js +3 -205
- package/dist/cdn/components/bazi-chart.js +3 -205
- package/dist/cdn/components/bhav-chalit-table.js +2 -204
- package/dist/cdn/components/bhava-bala-table.js +3 -205
- package/dist/cdn/components/biorhythm-chart.js +3 -205
- package/dist/cdn/components/bodygraph.js +7 -209
- package/dist/cdn/components/chara-karakas.js +3 -205
- package/dist/cdn/components/choghadiya-grid.js +3 -205
- package/dist/cdn/components/compatibility-card.js +2 -204
- package/dist/cdn/components/compound-number.js +3 -205
- package/dist/cdn/components/crystal-card.js +3 -205
- package/dist/cdn/components/crystal-grid.js +3 -205
- package/dist/cdn/components/dasha-timeline.js +3 -205
- package/dist/cdn/components/data.js +3 -205
- package/dist/cdn/components/divisional-chart.js +13 -215
- package/dist/cdn/components/dosha-card.js +3 -205
- package/dist/cdn/components/dosha-constitution.js +3 -205
- package/dist/cdn/components/dream-card.js +3 -205
- package/dist/cdn/components/dream-search.js +3 -205
- package/dist/cdn/components/endpoint-form.js +3 -205
- package/dist/cdn/components/ephemeris-table.js +2 -204
- package/dist/cdn/components/fixed-stars.js +2 -204
- package/dist/cdn/components/flying-star-chart.js +2 -204
- package/dist/cdn/components/forecast-digest.js +3 -205
- package/dist/cdn/components/forecast-timeline.js +3 -205
- package/dist/cdn/components/gematria.js +3 -205
- package/dist/cdn/components/gochara-table.js +3 -205
- package/dist/cdn/components/guna-milan.js +3 -205
- package/dist/cdn/components/hd-connection.js +5 -207
- package/dist/cdn/components/hd-penta.js +5 -207
- package/dist/cdn/components/hd-type-card.js +3 -205
- package/dist/cdn/components/hd-variables.js +3 -205
- package/dist/cdn/components/heliacal-table.js +3 -205
- package/dist/cdn/components/hexagram.js +3 -205
- package/dist/cdn/components/hora-table.js +3 -205
- package/dist/cdn/components/horoscope-card.js +3 -205
- package/dist/cdn/components/kp-chart.js +3 -205
- package/dist/cdn/components/kp-finance-card.js +3 -205
- package/dist/cdn/components/kp-planets-table.js +3 -205
- package/dist/cdn/components/kp-ruling-planets.js +3 -205
- package/dist/cdn/components/kua-card.js +3 -205
- package/dist/cdn/components/local-space-compass.js +8 -210
- package/dist/cdn/components/location-search.js +3 -205
- package/dist/cdn/components/luck-pillars.js +3 -205
- package/dist/cdn/components/mayan-day-sign.js +3 -205
- package/dist/cdn/components/moon-phase.js +3 -205
- package/dist/cdn/components/nakshatra-card.js +3 -205
- package/dist/cdn/components/natal-chart.js +6 -208
- package/dist/cdn/components/numerology-card.js +3 -205
- package/dist/cdn/components/panchang-table.js +3 -205
- package/dist/cdn/components/positions-table.js +3 -205
- package/dist/cdn/components/profection-card.js +3 -205
- package/dist/cdn/components/reference-card.js +3 -205
- package/dist/cdn/components/relocation-wheel.js +6 -208
- package/dist/cdn/components/shadbala-table.js +3 -205
- package/dist/cdn/components/synastry-chart.js +7 -209
- package/dist/cdn/components/tarot-card.js +3 -205
- package/dist/cdn/components/tarot-catalog.js +3 -205
- package/dist/cdn/components/tarot-spread.js +3 -205
- package/dist/cdn/components/transit-wheel.js +8 -210
- package/dist/cdn/components/transits-table.js +3 -205
- package/dist/cdn/components/upagraha-table.js +2 -204
- package/dist/cdn/components/vastu-mandala.js +4 -206
- package/dist/cdn/components/vedic-aspects.js +2 -204
- package/dist/cdn/components/vedic-daily.js +3 -205
- package/dist/cdn/components/vedic-kundli.js +10 -212
- package/dist/cdn/components/vedic-planets-table.js +3 -205
- package/dist/cdn/components/western-planets-table.js +2 -204
- package/dist/cdn/components/yoga-list.js +3 -205
- package/dist/cdn/components/zodiac-card.js +2 -204
- package/dist/cdn/locales/de.js +1 -1
- package/dist/cdn/roxy-ui.js +49 -251
- package/dist/components/almanac-day.js +1 -203
- package/dist/components/angel-number-card.js +1 -203
- package/dist/components/angel-number-lookup.js +1 -203
- package/dist/components/arudha-padas.js +1 -203
- package/dist/components/ashtakavarga-grid.js +1 -203
- package/dist/components/aspects-table.js +1 -203
- package/dist/components/astrocartography-map.js +6 -208
- package/dist/components/bazi-chart.js +1 -203
- package/dist/components/bhav-chalit-table.js +1 -203
- package/dist/components/bhava-bala-table.js +1 -203
- package/dist/components/biorhythm-chart.js +1 -203
- package/dist/components/bodygraph.js +3 -205
- package/dist/components/chara-karakas.js +1 -203
- package/dist/components/choghadiya-grid.js +1 -203
- package/dist/components/compatibility-card.js +1 -203
- package/dist/components/compound-number.js +1 -203
- package/dist/components/crystal-card.js +1 -203
- package/dist/components/crystal-grid.js +1 -203
- package/dist/components/dasha-timeline.js +1 -203
- package/dist/components/data.js +1 -203
- package/dist/components/divisional-chart.js +45 -247
- package/dist/components/dosha-card.js +1 -203
- package/dist/components/dosha-constitution.js +1 -203
- package/dist/components/dream-card.js +1 -203
- package/dist/components/dream-search.js +1 -203
- package/dist/components/endpoint-form.js +1 -203
- package/dist/components/ephemeris-table.js +1 -203
- package/dist/components/fixed-stars.js +1 -203
- package/dist/components/flying-star-chart.js +1 -203
- package/dist/components/forecast-digest.js +1 -203
- package/dist/components/forecast-timeline.js +1 -203
- package/dist/components/gematria.js +1 -203
- package/dist/components/gochara-table.js +1 -203
- package/dist/components/guna-milan.js +1 -203
- package/dist/components/hd-connection.js +3 -205
- package/dist/components/hd-penta.js +5 -207
- package/dist/components/hd-type-card.js +1 -203
- package/dist/components/hd-variables.js +1 -203
- package/dist/components/heliacal-table.js +1 -203
- package/dist/components/hexagram.d.ts +1 -1
- package/dist/components/hexagram.js +1 -203
- package/dist/components/hora-table.js +1 -203
- package/dist/components/horoscope-card.js +1 -203
- package/dist/components/kp-chart.js +1 -203
- package/dist/components/kp-finance-card.js +1 -203
- package/dist/components/kp-planets-table.js +1 -203
- package/dist/components/kp-ruling-planets.js +1 -203
- package/dist/components/kua-card.js +1 -203
- package/dist/components/local-space-compass.js +4 -206
- package/dist/components/location-search.js +1 -203
- package/dist/components/luck-pillars.js +1 -203
- package/dist/components/mayan-day-sign.js +1 -203
- package/dist/components/moon-phase.js +1 -203
- package/dist/components/nakshatra-card.js +1 -203
- package/dist/components/natal-chart.d.ts +1 -1
- package/dist/components/natal-chart.js +5 -207
- package/dist/components/numerology-card.js +1 -203
- package/dist/components/panchang-table.js +1 -203
- package/dist/components/positions-table.js +1 -203
- package/dist/components/profection-card.js +1 -203
- package/dist/components/reference-card.js +1 -203
- package/dist/components/relocation-wheel.js +3 -205
- package/dist/components/shadbala-table.js +1 -203
- package/dist/components/synastry-chart.js +6 -208
- package/dist/components/tarot-card.js +1 -203
- package/dist/components/tarot-catalog.js +1 -203
- package/dist/components/tarot-spread.js +1 -203
- package/dist/components/transit-wheel.js +8 -210
- package/dist/components/transits-table.js +1 -203
- package/dist/components/upagraha-table.js +1 -203
- package/dist/components/vastu-mandala.js +6 -208
- package/dist/components/vedic-aspects.js +1 -203
- package/dist/components/vedic-daily.js +1 -203
- package/dist/components/vedic-kundli.js +15 -217
- package/dist/components/vedic-planets-table.js +1 -203
- package/dist/components/western-planets-table.js +1 -203
- package/dist/components/yoga-list.js +1 -203
- package/dist/components/zodiac-card.js +1 -203
- package/dist/forms.json +1 -1
- package/dist/index.cjs +49 -251
- package/dist/index.js +50 -252
- package/dist/locales/de.js +1 -1
- package/dist/schemas/post--astrology-lilith.json +1 -1
- package/dist/schemas/post--astrology-progressions.json +1 -1
- package/dist/schemas/post--kabbalah-birth-profile.json +1 -1
- package/dist/schemas/post--numerology-chart.json +1 -1
- package/dist/schemas/post--vedic-astrology-daily.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha-sookshma.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-chart.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-cusps.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-daily-finance.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-horary.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-planets.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-ruling-planets-interval.json +1 -1
- package/dist/schemas/post--vedic-astrology-kp-ruling-planets.json +1 -1
- package/dist/schemas/post--vedic-astrology-transit.json +1 -1
- package/dist/styles/palettes.d.ts +4 -0
- package/dist/styles/themes/celeste.css +1 -115
- package/dist/styles/themes/eucalyptus.css +1 -121
- package/dist/styles/themes/kiln.css +1 -121
- package/dist/styles/themes/moonlit.css +1 -121
- package/dist/styles/themes/practitioner.css +1 -170
- package/dist/styles/tokens-css.d.ts +1 -1
- package/dist/styles/tokens.css +1 -202
- package/dist/types/types.gen.d.ts +48 -36
- package/dist/utils/string.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,208 +1,6 @@
|
|
|
1
|
-
var RoxyUI_dasha_timeline=(()=>{var
|
|
2
|
-
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Nt=/-->/g,Ut=/>/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Mt=/"/g,zt=/^(?:script|style|textarea|title)$/i,gt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),c=gt(1),kr=gt(2),$r=gt(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Gt=new WeakMap,T=A.createTreeWalker(A,129);function Kt(r,t){if(!ft(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ft!==void 0?Ft.createHTML(t):t}var Ve=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",a=I;for(let d=0;d<e;d++){let i=r[d],h,p,u=-1,x=0;for(;x<i.length&&(a.lastIndex=x,p=a.exec(i),p!==null);)x=a.lastIndex,a===I?p[1]==="!--"?a=Nt:p[1]!==void 0?a=Ut:p[2]!==void 0?(zt.test(p[2])&&(o=RegExp("</"+p[2],"g")),a=E):p[3]!==void 0&&(a=E):a===E?p[0]===">"?(a=o??I,u=-1):p[1]===void 0?u=-2:(u=a.lastIndex-p[2].length,h=p[1],a=p[3]===void 0?E:p[3]==='"'?Mt:It):a===Mt||a===It?a=E:a===Nt||a===Ut?a=I:(a=E,o=void 0);let v=a===E&&r[d+1].startsWith("/>")?" ":"";s+=a===I?i+qe:u>=0?(n.push(h),i.slice(0,u)+jt+i.slice(u)+k+v):i+k+(u===-2?d:v)}return[Kt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,a=0,d=t.length-1,i=this.parts,[h,p]=Ve(t,e);if(this.el=r.createElement(h,n),T.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=T.nextNode())!==null&&i.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(jt)){let x=p[a++],v=o.getAttribute(u).split(k),K=/([.?@])?(.*)/.exec(x);i.push({type:1,index:s,name:K[2],strings:v,ctor:K[1]==="."?ht:K[1]==="?"?pt:K[1]==="@"?ut:D}),o.removeAttribute(u)}else u.startsWith(k)&&(i.push({type:6,index:s}),o.removeAttribute(u));if(zt.test(o.tagName)){let u=o.textContent.split(k),x=u.length-1;if(x>0){o.textContent=Z?Z.emptyScript:"";for(let v=0;v<x;v++)o.append(u[v],M()),T.nextNode(),i.push({type:2,index:++s});o.append(u[x],M())}}}else if(o.nodeType===8)if(o.data===Ht)i.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf(k,u+1))!==-1;)i.push({type:7,index:s}),u+=k.length-1}s++}}static createElement(t,e){let n=A.createElement("template");return n.innerHTML=t,n}};function O(r,t,e=r,n){if(t===P)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=G(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=O(r,o._$AS(r,t.values),o,n)),t}var ct=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,o=(t?.creationScope??A).importNode(e,!0);T.currentNode=o;let s=T.nextNode(),a=0,d=0,i=n[0];for(;i!==void 0;){if(a===i.index){let h;i.type===2?h=new H(s,s.nextSibling,this,t):i.type===1?h=new i.ctor(s,i.name,i.strings,this,t):i.type===6&&(h=new mt(s,this,t)),this._$AV.push(h),i=n[++d]}a!==i?.index&&(s=T.nextNode(),a++)}return T.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),G(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ye(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(Kt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ct(o,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new j(t)),e}k(t){ft(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(M()),this.O(M()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let n=Lt(t).nextSibling;Lt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,a=!1;if(s===void 0)t=O(this,t,e,0),a=!G(t)||t!==this._$AH&&t!==P,a&&(this._$AH=t);else{let d=t,i,h;for(t=s[0],i=0;i<s.length-1;i++)h=O(this,d[n+i],e,i),h===P&&(h=this._$AH[i]),a||=!G(h)||h!==this._$AH[i],h===l?t=l:t!==l&&(t+=(h??"")+s[i+1]),this._$AH[i]=h}a&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},pt=class extends D{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ut=class extends D{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??l)===P)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},mt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var We=yt.litHtmlPolyfillSupport;We?.(j,H),(yt.litHtmlVersions??=[]).push("3.3.3");var Bt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(M(),s),s,void 0,e??{})}return o._$AI(r),o};var xt=globalThis,$=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};$._$litElement$=!0,$.finalized=!0,xt.litElementHydrateSupport?.({LitElement:$});var Ze=xt.litElementPolyfillSupport;Ze?.({LitElement:$});(xt.litElementVersions??=[]).push("4.2.2");var Je={attribute:!0,type:String,converter:U,reflect:!1,hasChanged:W},Xe=(r=Je,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=!0),s.set(e.name,r),n==="accessor"){let{name:a}=e;return{set(d){let i=t.get.call(this);t.set.call(this,d),this.requestUpdate(a,i,r,!0,d)},init(d){return d!==void 0&&this.C(a,void 0,r,d),d}}}if(n==="setter"){let{name:a}=e;return function(d){let i=this[a];t.call(this,d),this.requestUpdate(a,i,r,!0,d)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?Xe(r,t,e):((n,o,s)=>{let a=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),a?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function b(r){return f({...r,state:!0,attribute:!1})}var qt=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}];var _=r=>r??l;var Yt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function vt(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var Qe={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function bt(r){let t=r.toLowerCase();return Yt.find(e=>e.toLowerCase()===t)}function Vt(r){let t=vt(r);if(!t)return;let e=bt(t);if(e)return e;let n=t.toLowerCase().split("-"),o=n[0];if(o==="zh"){let s=n.find(a=>a==="hans"||a==="hant")??Qe[n[1]??""];return s?bt(`zh-${s}`):void 0}return bt(o)}var Wt=`/**
|
|
4
|
-
* Roxy UI design tokens: every colour, size, space, radius, font and duration a component reads.
|
|
5
|
-
*
|
|
6
|
-
* Two tiers. BASES are the few values a host tunes: fonts, base text size and its scale ratio, the
|
|
7
|
-
* space unit, the base radius, motion, and the colour bases (bg, fg, accent and the four status
|
|
8
|
-
* colours). Every other token DERIVES from them with calc() or color-mix(), so dark mode reassigns
|
|
9
|
-
* the colour bases only and one font token restyles every heading. A host may still set any
|
|
10
|
-
* derived token directly, and its value wins.
|
|
11
|
-
*
|
|
12
|
-
* Delivery: a global light-DOM stylesheet (linked, or injected by the CDN bundle). Custom properties
|
|
13
|
-
* inherit through the shadow boundary, so a token set on any light-DOM ancestor reaches every
|
|
14
|
-
* component. The :host selectors apply only if this sheet is adopted into a shadow root.
|
|
15
|
-
*
|
|
16
|
-
* Light is the default. Dark applies under prefers-color-scheme: dark, or [data-theme="dark"] or
|
|
17
|
-
* .dark on the element or any ancestor; [data-theme="light"] or .light opts back into light. An
|
|
18
|
-
* explicit choice wins over the OS because those blocks come later in source order.
|
|
19
|
-
*
|
|
20
|
-
* A derivation is computed where it is declared, so the derived block also matches every theme
|
|
21
|
-
* trigger: a base reassigned on :root or on an element carrying data-theme, .light or .dark
|
|
22
|
-
* re-derives everything below it.
|
|
23
|
-
*
|
|
24
|
-
* Font: --roxy-font-sans is unset by default, so every component inherits the host page font; any
|
|
25
|
-
* value set by the host or a preset replaces it, and --roxy-font-display follows it until set.
|
|
26
|
-
*
|
|
27
|
-
* Motion: --roxy-motion-duration defaults to 200ms and prefers-reduced-motion forces 0ms.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/*
|
|
31
|
-
* Two mechanisms keep the host page in charge of every token, and both are load bearing.
|
|
32
|
-
*
|
|
33
|
-
* Every rule sits in the roxy.tokens cascade layer, and an unlayered declaration beats a layered
|
|
34
|
-
* one at ANY specificity, so a plain \`:root { --roxy-accent: #8b5cf6 }\` on the host page wins, and
|
|
35
|
-
* so does the same line inside a layer of its own, because this statement registers ours first
|
|
36
|
-
* and the CDN bundle injects this sheet at the top of <head>. A host that links this file after its
|
|
37
|
-
* own CSS orders the layers itself: \`@layer roxy, base, components, utilities;\` before either sheet.
|
|
38
|
-
*
|
|
39
|
-
* Every selector is ALSO wrapped in :where(), which has ZERO specificity, so a host declaration
|
|
40
|
-
* still wins wherever a layer cannot decide it, under every dark signal alike.
|
|
41
|
-
*
|
|
42
|
-
* The theme presets in styles/themes/*.css write into roxy.theme; both files declare this order,
|
|
43
|
-
* so either one loading alone still ranks a preset above these defaults.
|
|
44
|
-
*/
|
|
45
|
-
@layer roxy.tokens, roxy.theme;
|
|
46
|
-
|
|
47
|
-
@layer roxy.tokens {
|
|
48
|
-
/* Bases, light. Also the mode-specific derivations: accent ink and status inks mix toward black. */
|
|
49
|
-
:where(:root, :host) {
|
|
50
|
-
/* A real inherited property: native controls, popups and scrollbars follow it. */
|
|
51
|
-
color-scheme: light;
|
|
52
|
-
|
|
53
|
-
--roxy-bg: #ffffff;
|
|
54
|
-
--roxy-fg: #0a0a0a;
|
|
55
|
-
--roxy-accent: #4a6297;
|
|
56
|
-
--roxy-success: #16a34a;
|
|
57
|
-
--roxy-warning: #ea580c;
|
|
58
|
-
--roxy-danger: #dc2626;
|
|
59
|
-
--roxy-info: #0284c7;
|
|
60
|
-
|
|
61
|
-
/* Accent and status inks: 70 percent toward black reads at AA on the card and on a tint of the base. */
|
|
62
|
-
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
63
|
-
--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
|
|
64
|
-
--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
|
|
65
|
-
--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
|
|
66
|
-
--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
|
|
67
|
-
|
|
68
|
-
/* Unset on purpose: a component inherits the host page font until a host or preset sets one. */
|
|
69
|
-
--roxy-font-sans: initial;
|
|
70
|
-
--roxy-font-mono:
|
|
71
|
-
ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
|
|
72
|
-
"Liberation Mono", monospace;
|
|
73
|
-
|
|
74
|
-
--roxy-text-base: 1rem;
|
|
75
|
-
--roxy-text-scale: 1.15;
|
|
76
|
-
--roxy-weight-normal: 400;
|
|
77
|
-
--roxy-weight-bold: 600;
|
|
78
|
-
--roxy-leading-tight: 1.25;
|
|
79
|
-
--roxy-leading-normal: 1.5;
|
|
80
|
-
--roxy-tracking-tight: -0.01em;
|
|
81
|
-
--roxy-tracking-normal: 0em;
|
|
82
|
-
|
|
83
|
-
--roxy-space-unit: 0.25rem;
|
|
84
|
-
--roxy-radius: 6px;
|
|
85
|
-
|
|
86
|
-
--roxy-motion-duration: 200ms;
|
|
87
|
-
--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* Derived roles, identical in every mode, restated on every theme trigger so they follow its bases. */
|
|
91
|
-
:where(:root, :host, [data-theme], .light, .dark) {
|
|
92
|
-
/* Flat: the card is the page colour, separated by a hairline. */
|
|
93
|
-
--roxy-surface: var(--roxy-bg);
|
|
94
|
-
--roxy-primary: var(--roxy-fg);
|
|
95
|
-
--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));
|
|
96
|
-
--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));
|
|
97
|
-
--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));
|
|
98
|
-
--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);
|
|
99
|
-
--roxy-heat: var(--roxy-danger);
|
|
100
|
-
|
|
101
|
-
--roxy-font-display: var(--roxy-font-sans);
|
|
102
|
-
|
|
103
|
-
--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));
|
|
104
|
-
--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));
|
|
105
|
-
--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));
|
|
106
|
-
--roxy-text-xl: calc(
|
|
107
|
-
var(--roxy-text-lg) *
|
|
108
|
-
var(--roxy-text-scale) *
|
|
109
|
-
var(--roxy-text-scale)
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
--roxy-space-xs: var(--roxy-space-unit);
|
|
113
|
-
--roxy-space-sm: calc(var(--roxy-space-unit) * 2);
|
|
114
|
-
--roxy-space-md: calc(var(--roxy-space-unit) * 4);
|
|
115
|
-
--roxy-space-lg: calc(var(--roxy-space-unit) * 6);
|
|
116
|
-
--roxy-space-xl: calc(var(--roxy-space-unit) * 10);
|
|
117
|
-
--roxy-line-thick: calc(var(--roxy-space-unit) / 2);
|
|
118
|
-
--roxy-touch: calc(var(--roxy-space-unit) * 11);
|
|
119
|
-
|
|
120
|
-
--roxy-radius-sm: calc(var(--roxy-radius) / 2);
|
|
121
|
-
--roxy-radius-md: var(--roxy-radius);
|
|
122
|
-
--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);
|
|
123
|
-
--roxy-radius-full: 9999px;
|
|
124
|
-
|
|
125
|
-
/* Flat surfaces cast nothing; only a floating layer (a popup, an enlarged chart) lifts. */
|
|
126
|
-
--roxy-shadow-sm: none;
|
|
127
|
-
--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);
|
|
128
|
-
--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* Bases, dark, by system preference. Inks mix toward white so they read on a dark card. */
|
|
132
|
-
@media (prefers-color-scheme: dark) {
|
|
133
|
-
:where(:root, :host) {
|
|
134
|
-
color-scheme: dark;
|
|
135
|
-
--roxy-bg: #0a0a0a;
|
|
136
|
-
--roxy-fg: #fafafa;
|
|
137
|
-
--roxy-accent: #92aade;
|
|
138
|
-
--roxy-success: #22c55e;
|
|
139
|
-
--roxy-warning: #fb923c;
|
|
140
|
-
--roxy-danger: #ef4444;
|
|
141
|
-
--roxy-info: #38bdf8;
|
|
142
|
-
|
|
143
|
-
--roxy-accent-ink: var(--roxy-accent);
|
|
144
|
-
--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
|
|
145
|
-
--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
|
|
146
|
-
--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
|
|
147
|
-
--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* Explicit light: beats the OS dark block when the host chooses light. */
|
|
152
|
-
:where(
|
|
153
|
-
:root[data-theme="light"],
|
|
154
|
-
[data-theme="light"],
|
|
155
|
-
:root.light,
|
|
156
|
-
.light,
|
|
157
|
-
:host([data-theme="light"])
|
|
158
|
-
) {
|
|
159
|
-
color-scheme: light;
|
|
160
|
-
--roxy-bg: #ffffff;
|
|
161
|
-
--roxy-fg: #0a0a0a;
|
|
162
|
-
--roxy-accent: #4a6297;
|
|
163
|
-
--roxy-success: #16a34a;
|
|
164
|
-
--roxy-warning: #ea580c;
|
|
165
|
-
--roxy-danger: #dc2626;
|
|
166
|
-
--roxy-info: #0284c7;
|
|
167
|
-
|
|
168
|
-
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
169
|
-
--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
|
|
170
|
-
--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
|
|
171
|
-
--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
|
|
172
|
-
--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Explicit dark: a .dark class or data-theme="dark" on any ancestor themes every component below it. */
|
|
176
|
-
:where(
|
|
177
|
-
:root[data-theme="dark"],
|
|
178
|
-
[data-theme="dark"],
|
|
179
|
-
:root.dark,
|
|
180
|
-
.dark,
|
|
181
|
-
:host([data-theme="dark"])
|
|
182
|
-
) {
|
|
183
|
-
color-scheme: dark;
|
|
184
|
-
--roxy-bg: #0a0a0a;
|
|
185
|
-
--roxy-fg: #fafafa;
|
|
186
|
-
--roxy-accent: #92aade;
|
|
187
|
-
--roxy-success: #22c55e;
|
|
188
|
-
--roxy-warning: #fb923c;
|
|
189
|
-
--roxy-danger: #ef4444;
|
|
190
|
-
--roxy-info: #38bdf8;
|
|
191
|
-
|
|
192
|
-
--roxy-accent-ink: var(--roxy-accent);
|
|
193
|
-
--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
|
|
194
|
-
--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
|
|
195
|
-
--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
|
|
196
|
-
--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
@media (prefers-reduced-motion: reduce) {
|
|
200
|
-
:where(:root, :host) {
|
|
201
|
-
--roxy-motion-duration: 0ms;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
`;var X="roxy-ui-tokens";function Q(){if(typeof document>"u")return null;let r=document.getElementById(X);if(r)return r;let t=document.createElement("style");return t.id=X,t.textContent=Wt,document.head.prepend(t),t}function Zt(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Jt(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var Xt="__ROXY_UI_I18N__";function Qt(){let r=globalThis,t=r[Xt];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[Xt]=e,e}function tr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function te(r,t,e){return tr(er(r,t)??t,e)}function er(r,t){if(!r)return;let{catalogs:e}=Qt(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[Zt(t)]}function ee(r){let{listeners:t}=Qt();return t.add(r),()=>{t.delete(r)}}var tt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ee(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var et=class extends ${constructor(){super();this.translator=(e,n)=>this.t(e,n);new tt(this)}connectedCallback(){super.connectedCallback(),Q()}t(e,n){return te(this.effectiveLang(),e,n)}effectiveLang(){return vt(this)}};var re=g`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var rr=g`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);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);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,rt=[rr,re];var nr="__cols",or="__rows";function sr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function nt(r){if(Array.isArray(r)){let s=!1,a=r.map(d=>{let i=nt(d);return i!==d&&(s=!0),i});return s?a:r}if(!sr(r))return r;let t=r[nr],e=r[or];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let a={};return t.forEach((d,i)=>{a[d]=nt(s[i])}),a});let n=!1,o={};for(let[s,a]of Object.entries(r)){let d=nt(a);d!==a&&(n=!0),o[s]=d}return n?o:r}function ne(r){return nt(r)}function oe(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var ar="pk_live_YOUR_KEY",se={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function ae(r){if(r)return r===ar?se.sample:r.startsWith("pk_")?void 0:se.secret}function ie(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var de="https://roxyapi.com/api/v2";async function ir(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:!1}}var le={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},L=class extends Error{constructor(e,n=null,o=!0){super(e);this.issues=n;this.worded=o}};function ce(r){return r.submitUrl?void 0:ae(r.publishableKey)}async function St(r,t,e){let n=ce(r);if(n)throw new L(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:dr(t,r.submitContext),signal:e}):await lr(r,t,e);if(!o.ok){let s=await ir(o);throw new L(s.message,s.issues,s.worded)}return await o.json()}function dr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function lr(r,t,e){let n=new URL(`${r.baseUrl??de}${t.path}`,document.baseURI);for(let[s,a]of Object.entries(t.query??{}))a!=null&&n.searchParams.set(s,String(a));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var ot=class{constructor(t){this.baseUrl=de;this.worded=!0;this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=!0;let e=ce(this);if(e){this.host.error=e.message,ie(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let o=await St(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof L&&(this.host.issues=o.issues),this.worded=o instanceof L&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=!1)}}};function he(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,p)=>{let u=o[p];return delete o[p],encodeURIComponent(String(u??""))}),a=new Set(n),d={},i={};for(let[h,p]of Object.entries(o))p===void 0||p===""||(t==="GET"||a.has(h)?d[h]=p:i[h]=p);return{path:s,method:t,query:d,body:t==="POST"?i:void 0}}function pe(){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 ue=g`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var me=g`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@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);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function ye(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${pe()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var cr="roxy-data";function hr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var st=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(hr(t)&&t.classList.contains(cr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends et{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=!0,this.moreError=null;try{let s=await St(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let a=s[n];this.data={...this.data,...s,[n]:[...o,...Array.isArray(a)?a:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(o.values),this.fetchFresh(he(n.endpoint,n.method,o.values,o.queryKeys??[]))};new st(this),this.fetcher=new ot(this)}static{this.styles=[rt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=ne(this.data);n!==this.data&&(this.data=n)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:oe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:!0,composed:!0})),customElements.get("roxy-data")?c`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(o=>o.trim().toLowerCase()).filter(o=>/^[a-z][a-z0-9-]*$/.test(o));if(e.length===0)return l;let n=e.map(o=>`[part~="${o}"],roxy-endpoint-form::part(${o}){display:none!important}`).join("");return c`<style>${n}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?l:ye(e,n,this.t(o??"Reading"))}renderResult(e){let n=c`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?c`${n}${this.renderAttribution()}`:n}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?l:c`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Vt(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([f({attribute:!1})],y.prototype,"data",2),m([f({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([f({type:String})],y.prototype,"method",2),m([f({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([f({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([f({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([f({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([f({attribute:"submit-context",converter:le})],y.prototype,"submitContext",2),m([f({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([f({type:Boolean})],y.prototype,"remember",2),m([f({type:Boolean,attribute:"hide-readings",reflect:!0})],y.prototype,"hideReadings",2),m([f({type:String,attribute:"hide-sections",reflect:!0})],y.prototype,"hideSections",2),m([f({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([f({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([f({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var fe=r=>t=>{customElements.get(r)||customElements.define(r,t)};var ge=g`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;var wt=/^\d{4}-\d{2}-\d{2}$/,pr=/^\d{4}-\d{2}$/,we=/^\d{2}:\d{2}(:\d{2})?$/,ur=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,xe=new Map;function z(r){if(!r)return["en"];let t=xe.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return xe.set(r,e),[e,"en"]}var be=new Map;function ke(r){let t=r??"",e=be.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(z(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return be.set(t,o),o}function kt(r,t){return r&&t?`${r} - ${t}`:r||t}function $t(r){let t=we.test(r)?`1970-01-01T${r}`:wt.test(r)?`${r}T00:00:00`:pr.test(r)?`${r}-01T00:00:00`:ur.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function R(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=$t(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(z(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function $e(r,t,e){return kt(R(r,t),R(r,e))}function ve(r,t,e){if(typeof t!="string"||t.length===0)return"";if(e==="year")return t.match(/^(\d{4})/)?.[1]??t;let{d:n,timeZone:o}=$t(t);return Number.isNaN(n.getTime())?t:n.toLocaleString(z(r),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?ke(r):{},timeZone:o})}function Ee(r,t,e,n){return kt(ve(r,t,n),ve(r,e,n))}function C(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(z(r),{maximumFractionDigits:e})}var mr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Te(r,t,e){let n=typeof t=="string"?mr[t]??Jt(t):"",o=typeof e=="number"?`${C(r,e,2)}°`:"";return n&&o?`${n} (${o})`:n||o}function Se(r,t,e,n=!1){let o=typeof t=="string"&&wt.test(t)&&typeof e=="string"&&we.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(wt.test(o))return R(r,o);let{d:s,timeZone:a}=$t(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(z(r),{month:"short",day:"numeric",year:"numeric",...ke(r),...n?{second:"2-digit"}:{},timeZone:a})}function Ae(r,t,e){return kt(Se(r,t),Se(r,e))}function Pe(r,t){return!t||!r?.length?"":r.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var _e=g`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function Re(r){let{items:t,active:e,onSelect:n,label:o,idPrefix:s,controls:a=!1}=r;return c`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${o}" @keydown="${i=>{if(i.key!=="ArrowRight"&&i.key!=="ArrowLeft")return;i.preventDefault();let h=t.findIndex(v=>v.id===e);if(h===-1)return;let p=i.key==="ArrowRight"?1:-1,u=t[(h+p+t.length)%t.length];if(!u)return;n(u.id);let x=i.currentTarget.getRootNode();requestAnimationFrame(()=>{x.querySelector(`#${s}-tab-${u.id}`)?.focus()})}}">${t.map(i=>c`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${i.id}" aria-selected="${e===i.id?"true":"false"}" aria-controls="${a?`${s}-panel-${i.id}`:l}" tabindex="${e===i.id?"0":"-1"}" @click="${()=>n(i.id)}">${i.label}</button>`)}</div>${a?t.filter(i=>i.id!==e).map(i=>c`<div role="tabpanel" id="${s}-panel-${i.id}" aria-labelledby="${s}-tab-${i.id}" hidden></div>`):l}`}function Ce(r){return"pranaDashas"in r?"Prana":"sookshmaDashas"in r?"Sookshma":"pratyantardashas"in r?"Pratyantardasha":"antardashas"in r?"Antardasha":"Mahadasha"}function Et(r){if("sookshmaPeriod"in r&&r.sookshmaPeriod)return{source:"Sookshma",period:r.sookshmaPeriod};if("pratyantardashaPeriod"in r&&r.pratyantardashaPeriod)return{source:"Pratyantardasha",period:r.pratyantardashaPeriod};if("antardashaPeriod"in r&&r.antardashaPeriod)return{source:"Antardasha",period:r.antardashaPeriod};if("mahadashaPeriod"in r&&r.mahadashaPeriod)return{source:"Mahadasha",period:r.mahadashaPeriod}}function Tt(r){if(!r)return"";let t=[];return r.years&&t.push(`${r.years}y`),r.months&&t.push(`${r.months}m`),r.days&&t.push(`${r.days}d`),t.length?t.join(" "):"0d"}function Oe(r,t){return Pe(r?.strongHouses?.length?r.strongHouses:r?.signifiedHouses,t)}function at(r,t){let e=R(r,t.startDate);return e&&e===R(r,t.endDate)?Ae(r,t.startDate,t.endDate):$e(r,t.startDate,t.endDate)}var w=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let n=this.collectPeriods(e),o=n.length?Math.max(...n.map(p=>p.durationYears)):0,s=fr(n.length?Math.min(...n.map(p=>p.durationYears)):0),a=this.hideReadings?[]:this.readings(e,n),d=this.frameRows(e),i=[{id:"timeline",label:this.t("Timeline")},...a.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:a.length})}]:[],...d.length?[{id:"frame",label:this.t("Chart details")}]:[]],h=i.some(p=>p.id===this.view)?this.view:"timeline";return c`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${i.length>1?Re({items:i,active:h,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):l}<div id="roxy-dasha-panel-${h}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${i.length>1?`roxy-dasha-tab-${h}`:l}">${h==="timeline"?c`${this.period==="current"?this.renderCurrent(e):l} ${n.length>0?c`<div class="timeline" part="chart timeline" role="list">${n.map(p=>this.renderBar(p,o,s,e.houseThemes))}</div>`:l}`:l} ${h==="readings"?this.renderReadings(a):l} ${h==="frame"?this.renderFrame(d):l}</div></div>`}renderLordChain(e){let n=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return n.length>1?c`<div class="nakshatra">${n.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?c`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:l}frameRows(e){let n=[];if("nakshatraName"in e&&e.nakshatraName){let o="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";n.push(["Moon nakshatra",`${e.nakshatraName}${o}`])}if("nakshatraLord"in e&&e.nakshatraLord&&n.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&n.push(["Moon longitude",`${C(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&n.push(["Ayanamsa",Te(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let o="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";n.push(["Balance at birth",`${Tt(e.birthDashaBalance)} of the opening ${o}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&n.push(["Cycle length",`${e.totalYears} years`]),n}renderFrame(e){return c`<dl class="roxy-facts" part="details frame">${e.map(([n,o])=>c`<div><dt>${n}</dt><dd>${o}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let n=Et(e);return n?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ce(e)),planet:n.period.planet,parent:this.t(n.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let n=Et(e);if(!n)return l;let o=n.period,s=at(this.effectiveLang(),o),a=o.nominalStartDate?R(this.effectiveLang(),o.nominalStartDate):"";return c`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:o.planet,level:this.t(n.source),span:s?`, ${s}`:"",duration:typeof o.durationYears=="number"?` (${yr(this.effectiveLang(),o.durationYears)})`:""})} ${a?c`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:a})}`:l}</p>`}readings(e,n){let o=[],s=Et(e);if(s?.period.interpretation&&o.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:at(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let d=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[i,h,p]of d){if(!h?.interpretation)continue;let u=Tt(p);o.push({label:this.t("{{planet}} {{level}}",{planet:h.planet,level:this.t(i)}),aside:u?this.t("{{balance}} left",{balance:u}):at(this.effectiveLang(),h),body:h.interpretation})}}let a=n.find(d=>this.isCurrent(d));return a?.interpretation&&o.push({label:`${a.planet} ${Ce(e)}`,aside:at(this.effectiveLang(),a),body:a.interpretation}),o}renderCurrent(e){if(!("mahadasha"in e))return l;let n=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return c`<div class="current" part="details current">${n.map(([o,s,a])=>{if(!s)return l;let d=Tt(a),i=Oe(s.significators,e.houseThemes);return c`<div><span class="roxy-label">${this.t(o)}</span> <strong>${s.planet}</strong> ${d?c`<small>${this.t("{{balance}} left",{balance:d})}</small>`:l} ${i?c`<small class="houses">${this.t("Signifies {{houses}}",{houses:i})}</small>`:l}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let n=Date.now(),o=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(o)||Number.isNaN(s)?!1:n>=o&&n<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let n=Date.parse(e.startDate),o=Date.parse(e.endDate),s=Date.now();return Number.isNaN(n)||Number.isNaN(o)||s<n||s>=o||o<=n?-1:(s-n)/(o-n)}renderBar(e,n,o,s){let a=e.durationYears,d=n>0?a/n*100:0,i=this.isCurrent(e),h=i?this.progressIn(e):-1,p=i?"bar-track bar-now":"bar-track",u=Oe(e.significators,s),x=["bar",i?"now":"",o==="time"?"fine":""].filter(Boolean).join(" ");return c`<div class="${x}" part="label-track" role="listitem" aria-current="${i?"time":"false"}"><span><strong>${e.planet}</strong>${i?c`<span class="now-badge">${this.t("Now")}</span>`:l} </span><span class="${p}"><span class="bar-fill" style="width:${d}%"></span> ${h>=0?c`<span class="bar-progress" style="left:${h*d}%" aria-hidden="true"></span>`:l} </span><span class="dates">${Ee(this.effectiveLang(),e.startDate,e.endDate,o)} </span>${u?c`<span class="houses">${this.t("Signifies {{houses}}",{houses:u})}</span>`:l}</div>`}};w.endpoints=qt,w.styles=[rt,ue,ge,me,_e,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([f({type:String,reflect:!0})],w.prototype,"period",2),m([b()],w.prototype,"view",2),w=m([fe("roxy-dasha-timeline")],w);var At=365.25;function yr(r,t){if(t>=1)return`${C(r,t,1)} years`;let e=t*At;if(e>=1)return`${C(r,e,e>=10?0:1)} days`;let n=e*24;return n>=1?`${C(r,n,1)} hours`:`${C(r,n*60,0)} minutes`}function fr(r){return r>=2?"year":r>=60/At?"month":r>=1/At?"day":"time"}return Ue(gr);})();
|
|
1
|
+
var RoxyUI_dasha_timeline=(()=>{var q=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var De=Object.prototype.hasOwnProperty;var Fe=(r,t)=>{for(var e in t)q(r,e,{get:t[e],enumerable:!0})},Ne=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Le(t))!De.call(r,o)&&o!==e&&q(r,o,{get:()=>t[o],enumerable:!(n=Pt(t,o))||n.enumerable});return r};var Ue=r=>Ne(q({},"__esModule",{value:!0}),r),m=(r,t,e,n)=>{for(var o=n>1?void 0:n?Pt(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(o=(n?i(t,e,o):i(o))||o);return n&&o&&q(t,e,o),o};var gr={};Fe(gr,{ROXY_UI_TOKENS_STYLE_ID:()=>X,RoxyDashaTimeline:()=>w,injectRoxyTokens:()=>Q});var B=globalThis,Y=B.ShadowRoot&&(B.ShadyCSS===void 0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,at=Symbol(),_t=new WeakMap,F=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==at)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Y&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=_t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&_t.set(e,t))}return t}toString(){return this.cssText}},Rt=r=>new F(typeof r=="string"?r:r+"",void 0,at),g=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((n,o,s)=>n+(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)+r[s+1],r[0]);return new F(e,r,at)},Ct=(r,t)=>{if(Y)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),o=B.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,r.appendChild(n)}},dt=Y?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return Rt(e)})(r):r;var{is:Ie,defineProperty:Me,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:je,getOwnPropertySymbols:He,getPrototypeOf:ze}=Object,V=globalThis,Ot=V.trustedTypes,Ke=Ot?Ot.emptyScript:"",qe=V.reactiveElementPolyfillSupport,N=(r,t)=>r,U={toAttribute(r,t){switch(t){case Boolean:r=r?Ke:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},W=(r,t)=>!Ie(r,t),Lt={attribute:!0,type:String,converter:U,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),V.litPropertyMetadata??=new WeakMap;var S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,e);o!==void 0&&Me(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){let{get:o,set:s}=Ge(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Lt}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;let t=ze(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(N("properties"))){let e=this.properties,n=[...je(e),...He(e)];for(let o of n)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,o]of e)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let o=this._$Eu(e,n);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)e.unshift(dt(o))}else t!==void 0&&e.push(dt(t));return e}static _$Eu(t,e){let n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.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(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ct(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:U).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=n.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:U;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,n,o=!1,s){if(t!==void 0){let i=this.constructor;if(o===!1&&(s=this[t]),n??=i.getPropertyOptions(t),!((n.hasChanged??W)(s,e)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:o,wrapped:s},i){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!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 n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:i}=s,d=this[o];i!==!0||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[N("elementProperties")]=new Map,S[N("finalized")]=new Map,qe?.({ReactiveElement:S}),(V.reactiveElementVersions??=[]).push("2.1.2");var yt=globalThis,Dt=r=>r,Z=yt.trustedTypes,Ft=Z?Z.createPolicy("lit-html",{createHTML:r=>r}):void 0,jt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,Ht="?"+$,Be=`<${Ht}>`,A=document,M=()=>A.createComment(""),G=r=>r===null||typeof r!="object"&&typeof r!="function",ft=Array.isArray,Ye=r=>ft(r)||typeof r?.[Symbol.iterator]=="function",lt=`[
|
|
2
|
+
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Nt=/-->/g,Ut=/>/g,k=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Mt=/"/g,zt=/^(?:script|style|textarea|title)$/i,gt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),c=gt(1),$r=gt(2),Er=gt(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Gt=new WeakMap,T=A.createTreeWalker(A,129);function Kt(r,t){if(!ft(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ft!==void 0?Ft.createHTML(t):t}var Ve=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=I;for(let d=0;d<e;d++){let a=r[d],h,p,u=-1,x=0;for(;x<a.length&&(i.lastIndex=x,p=i.exec(a),p!==null);)x=i.lastIndex,i===I?p[1]==="!--"?i=Nt:p[1]!==void 0?i=Ut:p[2]!==void 0?(zt.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=k):p[3]!==void 0&&(i=k):i===k?p[0]===">"?(i=o??I,u=-1):p[1]===void 0?u=-2:(u=i.lastIndex-p[2].length,h=p[1],i=p[3]===void 0?k:p[3]==='"'?Mt:It):i===Mt||i===It?i=k:i===Nt||i===Ut?i=I:(i=k,o=void 0);let v=i===k&&r[d+1].startsWith("/>")?" ":"";s+=i===I?a+Be:u>=0?(n.push(h),a.slice(0,u)+jt+a.slice(u)+$+v):a+$+(u===-2?d:v)}return[Kt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[h,p]=Ve(t,e);if(this.el=r.createElement(h,n),T.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(jt)){let x=p[i++],v=o.getAttribute(u).split($),K=/([.?@])?(.*)/.exec(x);a.push({type:1,index:s,name:K[2],strings:v,ctor:K[1]==="."?ht:K[1]==="?"?pt:K[1]==="@"?ut:L}),o.removeAttribute(u)}else u.startsWith($)&&(a.push({type:6,index:s}),o.removeAttribute(u));if(zt.test(o.tagName)){let u=o.textContent.split($),x=u.length-1;if(x>0){o.textContent=Z?Z.emptyScript:"";for(let v=0;v<x;v++)o.append(u[v],M()),T.nextNode(),a.push({type:2,index:++s});o.append(u[x],M())}}}else if(o.nodeType===8)if(o.data===Ht)a.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf($,u+1))!==-1;)a.push({type:7,index:s}),u+=$.length-1}s++}}static createElement(t,e){let n=A.createElement("template");return n.innerHTML=t,n}};function O(r,t,e=r,n){if(t===P)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=G(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=O(r,o._$AS(r,t.values),o,n)),t}var ct=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,o=(t?.creationScope??A).importNode(e,!0);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=n[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new H(s,s.nextSibling,this,t):a.type===1?h=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(h=new mt(s,this,t)),this._$AV.push(h),a=n[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),G(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ye(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(Kt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ct(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new j(t)),e}k(t){ft(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(M()),this.O(M()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let n=Dt(t).nextSibling;Dt(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,i=!1;if(s===void 0)t=O(this,t,e,0),i=!G(t)||t!==this._$AH&&t!==P,i&&(this._$AH=t);else{let d=t,a,h;for(t=s[0],a=0;a<s.length-1;a++)h=O(this,d[n+a],e,a),h===P&&(h=this._$AH[a]),i||=!G(h)||h!==this._$AH[a],h===l?t=l:t!==l&&(t+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},pt=class extends L{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ut=class extends L{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??l)===P)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},mt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var We=yt.litHtmlPolyfillSupport;We?.(j,H),(yt.litHtmlVersions??=[]).push("3.3.3");var qt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(M(),s),s,void 0,e??{})}return o._$AI(r),o};var xt=globalThis,E=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};E._$litElement$=!0,E.finalized=!0,xt.litElementHydrateSupport?.({LitElement:E});var Ze=xt.litElementPolyfillSupport;Ze?.({LitElement:E});(xt.litElementVersions??=[]).push("4.2.2");var Je={attribute:!0,type:String,converter:U,reflect:!1,hasChanged:W},Xe=(r=Je,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=!0),s.set(e.name,r),n==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,r,!0,d)},init(d){return d!==void 0&&this.C(i,void 0,r,d),d}}}if(n==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,r,!0,d)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?Xe(r,t,e):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function b(r){return f({...r,state:!0,attribute:!1})}var Bt=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}];var _=r=>r??l;var Yt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function vt(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var Qe={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function bt(r){let t=r.toLowerCase();return Yt.find(e=>e.toLowerCase()===t)}function Vt(r){let t=vt(r);if(!t)return;let e=bt(t);if(e)return e;let n=t.toLowerCase().split("-"),o=n[0];if(o==="zh"){let s=n.find(i=>i==="hans"||i==="hant")??Qe[n[1]??""];return s?bt(`zh-${s}`):void 0}return bt(o)}var Wt='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black)}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var X="roxy-ui-tokens";function Q(){if(typeof document>"u")return null;let r=document.getElementById(X);if(r)return r;let t=document.createElement("style");return t.id=X,t.textContent=Wt,document.head.prepend(t),t}function Zt(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function Jt(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var Xt="__ROXY_UI_I18N__";function Qt(){let r=globalThis,t=r[Xt];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[Xt]=e,e}function tr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function te(r,t,e){return tr(er(r,t)??t,e)}function er(r,t){if(!r)return;let{catalogs:e}=Qt(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[Zt(t)]}function ee(r){let{listeners:t}=Qt();return t.add(r),()=>{t.delete(r)}}var tt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ee(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var et=class extends E{constructor(){super();this.translator=(e,n)=>this.t(e,n);new tt(this)}connectedCallback(){super.connectedCallback(),Q()}t(e,n){return te(this.effectiveLang(),e,n)}effectiveLang(){return vt(this)}};var re=g`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var rr=g`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);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);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,rt=[rr,re];var nr="__cols",or="__rows";function sr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function nt(r){if(Array.isArray(r)){let s=!1,i=r.map(d=>{let a=nt(d);return a!==d&&(s=!0),a});return s?i:r}if(!sr(r))return r;let t=r[nr],e=r[or];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=nt(s[a])}),i});let n=!1,o={};for(let[s,i]of Object.entries(r)){let d=nt(i);d!==i&&(n=!0),o[s]=d}return n?o:r}function ne(r){return nt(r)}function oe(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var ir="pk_live_YOUR_KEY",se={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function ie(r){if(r)return r===ir?se.sample:r.startsWith("pk_")?void 0:se.secret}function ae(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var de="https://roxyapi.com/api/v2";async function ar(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:!1}}var le={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},D=class extends Error{constructor(e,n=null,o=!0){super(e);this.issues=n;this.worded=o}};function ce(r){return r.submitUrl?void 0:ie(r.publishableKey)}async function St(r,t,e){let n=ce(r);if(n)throw new D(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:dr(t,r.submitContext),signal:e}):await lr(r,t,e);if(!o.ok){let s=await ar(o);throw new D(s.message,s.issues,s.worded)}return await o.json()}function dr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function lr(r,t,e){let n=new URL(`${r.baseUrl??de}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&n.searchParams.set(s,String(i));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var ot=class{constructor(t){this.baseUrl=de;this.worded=!0;this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=!0;let e=ce(this);if(e){this.host.error=e.message,ae(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let o=await St(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.signal.aborted||o?.name==="AbortError")return;o instanceof D&&(this.host.issues=o.issues),this.worded=o instanceof D&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=!1)}}};function he(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,p)=>{let u=o[p];return delete o[p],encodeURIComponent(String(u??""))}),i=new Set(n),d={},a={};for(let[h,p]of Object.entries(o))p===void 0||p===""||(t==="GET"||i.has(h)?d[h]=p:a[h]=p);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function pe(){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 ue=g`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var me=g`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@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);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function ye(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${pe()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var cr="roxy-data";function hr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var st=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(hr(t)&&t.classList.contains(cr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends et{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=!0,this.moreError=null;try{let s=await St(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[n];this.data={...this.data,...s,[n]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let n=this.selfFetch();if(!n)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(o.values),this.fetchFresh(he(n.endpoint,n.method,o.values,o.queryKeys??[]))};new st(this),this.fetcher=new ot(this)}static{this.styles=[rt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=ne(this.data);n!==this.data&&(this.data=n)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:oe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},bubbles:!0,composed:!0})),customElements.get("roxy-data")?c`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(o=>o.trim().toLowerCase()).filter(o=>/^[a-z][a-z0-9-]*$/.test(o));if(e.length===0)return l;let n=e.map(o=>`[part~="${o}"],roxy-endpoint-form::part(${o}){display:none!important}`).join("");return c`<style>${n}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,n,o){return this.hideReadings?l:ye(e,n,this.t(o??"Reading"))}renderResult(e){let n=c`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?c`${n}${this.renderAttribution()}`:n}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?l:c`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Vt(this)}}).then(()=>n.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([f({attribute:!1})],y.prototype,"data",2),m([f({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([f({type:String})],y.prototype,"method",2),m([f({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([f({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([f({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([f({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([f({attribute:"submit-context",converter:le})],y.prototype,"submitContext",2),m([f({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([f({type:Boolean})],y.prototype,"remember",2),m([f({type:Boolean,attribute:"hide-readings",reflect:!0})],y.prototype,"hideReadings",2),m([f({type:String,attribute:"hide-sections",reflect:!0})],y.prototype,"hideSections",2),m([f({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([f({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([f({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var fe=r=>t=>{customElements.get(r)||customElements.define(r,t)};var ge=g`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;var wt=/^\d{4}-\d{2}-\d{2}$/,pr=/^\d{4}-\d{2}$/,we=/^\d{2}:\d{2}(:\d{2})?$/,ur=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,xe=new Map;function z(r){if(!r)return["en"];let t=xe.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return xe.set(r,e),[e,"en"]}var be=new Map;function $e(r){let t=r??"",e=be.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(z(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return be.set(t,o),o}function $t(r,t){return r&&t?`${r} - ${t}`:r||t}function Et(r){let t=we.test(r)?`1970-01-01T${r}`:wt.test(r)?`${r}T00:00:00`:pr.test(r)?`${r}-01T00:00:00`:ur.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function R(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=Et(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(z(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ee(r,t,e){return $t(R(r,t),R(r,e))}function ve(r,t,e){if(typeof t!="string"||t.length===0)return"";if(e==="year")return t.match(/^(\d{4})/)?.[1]??t;let{d:n,timeZone:o}=Et(t);return Number.isNaN(n.getTime())?t:n.toLocaleString(z(r),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?$e(r):{},timeZone:o})}function ke(r,t,e,n){return $t(ve(r,t,n),ve(r,e,n))}function C(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(z(r),{maximumFractionDigits:e})}var mr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Te(r,t,e){let n=typeof t=="string"?mr[t]??Jt(t):"",o=typeof e=="number"?`${C(r,e,2)}°`:"";return n&&o?`${n} (${o})`:n||o}function Se(r,t,e,n=!1){let o=typeof t=="string"&&wt.test(t)&&typeof e=="string"&&we.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(wt.test(o))return R(r,o);let{d:s,timeZone:i}=Et(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(z(r),{month:"short",day:"numeric",year:"numeric",...$e(r),...n?{second:"2-digit"}:{},timeZone:i})}function Ae(r,t,e){return $t(Se(r,t),Se(r,e))}function Pe(r,t){return!t||!r?.length?"":r.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var _e=g`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function Re(r){let{items:t,active:e,onSelect:n,label:o,idPrefix:s,controls:i=!1}=r;return c`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let h=t.findIndex(v=>v.id===e);if(h===-1)return;let p=a.key==="ArrowRight"?1:-1,u=t[(h+p+t.length)%t.length];if(!u)return;n(u.id);let x=a.currentTarget.getRootNode();requestAnimationFrame(()=>{x.querySelector(`#${s}-tab-${u.id}`)?.focus()})}}">${t.map(a=>c`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${a.id}" aria-selected="${e===a.id?"true":"false"}" aria-controls="${i?`${s}-panel-${a.id}`:l}" tabindex="${e===a.id?"0":"-1"}" @click="${()=>n(a.id)}">${a.label}</button>`)}</div>${i?t.filter(a=>a.id!==e).map(a=>c`<div role="tabpanel" id="${s}-panel-${a.id}" aria-labelledby="${s}-tab-${a.id}" hidden></div>`):l}`}function Ce(r){return"pranaDashas"in r?"Prana":"sookshmaDashas"in r?"Sookshma":"pratyantardashas"in r?"Pratyantardasha":"antardashas"in r?"Antardasha":"Mahadasha"}function kt(r){if("sookshmaPeriod"in r&&r.sookshmaPeriod)return{source:"Sookshma",period:r.sookshmaPeriod};if("pratyantardashaPeriod"in r&&r.pratyantardashaPeriod)return{source:"Pratyantardasha",period:r.pratyantardashaPeriod};if("antardashaPeriod"in r&&r.antardashaPeriod)return{source:"Antardasha",period:r.antardashaPeriod};if("mahadashaPeriod"in r&&r.mahadashaPeriod)return{source:"Mahadasha",period:r.mahadashaPeriod}}function Tt(r){if(!r)return"";let t=[];return r.years&&t.push(`${r.years}y`),r.months&&t.push(`${r.months}m`),r.days&&t.push(`${r.days}d`),t.length?t.join(" "):"0d"}function Oe(r,t){return Pe(r?.strongHouses?.length?r.strongHouses:r?.signifiedHouses,t)}function it(r,t){let e=R(r,t.startDate);return e&&e===R(r,t.endDate)?Ae(r,t.startDate,t.endDate):Ee(r,t.startDate,t.endDate)}var w=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let n=this.collectPeriods(e),o=n.length?Math.max(...n.map(p=>p.durationYears)):0,s=fr(n.length?Math.min(...n.map(p=>p.durationYears)):0),i=this.hideReadings?[]:this.readings(e,n),d=this.frameRows(e),a=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...d.length?[{id:"frame",label:this.t("Chart details")}]:[]],h=a.some(p=>p.id===this.view)?this.view:"timeline";return c`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${a.length>1?Re({items:a,active:h,onSelect:p=>{this.view=p},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):l}<div id="roxy-dasha-panel-${h}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${a.length>1?`roxy-dasha-tab-${h}`:l}">${h==="timeline"?c`${this.period==="current"?this.renderCurrent(e):l} ${n.length>0?c`<div class="timeline" part="chart timeline" role="list">${n.map(p=>this.renderBar(p,o,s,e.houseThemes))}</div>`:l}`:l} ${h==="readings"?this.renderReadings(i):l} ${h==="frame"?this.renderFrame(d):l}</div></div>`}renderLordChain(e){let n=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return n.length>1?c`<div class="nakshatra">${n.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?c`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:l}frameRows(e){let n=[];if("nakshatraName"in e&&e.nakshatraName){let o="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";n.push(["Moon nakshatra",`${e.nakshatraName}${o}`])}if("nakshatraLord"in e&&e.nakshatraLord&&n.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&n.push(["Moon longitude",`${C(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&n.push(["Ayanamsa",Te(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let o="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";n.push(["Balance at birth",`${Tt(e.birthDashaBalance)} of the opening ${o}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&n.push(["Cycle length",`${e.totalYears} years`]),n}renderFrame(e){return c`<dl class="roxy-facts" part="details frame">${e.map(([n,o])=>c`<div><dt>${n}</dt><dd>${o}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let n=kt(e);return n?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ce(e)),planet:n.period.planet,parent:this.t(n.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let n=kt(e);if(!n)return l;let o=n.period,s=it(this.effectiveLang(),o),i=o.nominalStartDate?R(this.effectiveLang(),o.nominalStartDate):"";return c`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:o.planet,level:this.t(n.source),span:s?`, ${s}`:"",duration:typeof o.durationYears=="number"?` (${yr(this.effectiveLang(),o.durationYears)})`:""})} ${i?c`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:l}</p>`}readings(e,n){let o=[],s=kt(e);if(s?.period.interpretation&&o.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:it(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let d=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[a,h,p]of d){if(!h?.interpretation)continue;let u=Tt(p);o.push({label:this.t("{{planet}} {{level}}",{planet:h.planet,level:this.t(a)}),aside:u?this.t("{{balance}} left",{balance:u}):it(this.effectiveLang(),h),body:h.interpretation})}}let i=n.find(d=>this.isCurrent(d));return i?.interpretation&&o.push({label:`${i.planet} ${Ce(e)}`,aside:it(this.effectiveLang(),i),body:i.interpretation}),o}renderCurrent(e){if(!("mahadasha"in e))return l;let n=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return c`<div class="current" part="details current">${n.map(([o,s,i])=>{if(!s)return l;let d=Tt(i),a=Oe(s.significators,e.houseThemes);return c`<div><span class="roxy-label">${this.t(o)}</span> <strong>${s.planet}</strong> ${d?c`<small>${this.t("{{balance}} left",{balance:d})}</small>`:l} ${a?c`<small class="houses">${this.t("Signifies {{houses}}",{houses:a})}</small>`:l}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let n=Date.now(),o=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(o)||Number.isNaN(s)?!1:n>=o&&n<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let n=Date.parse(e.startDate),o=Date.parse(e.endDate),s=Date.now();return Number.isNaN(n)||Number.isNaN(o)||s<n||s>=o||o<=n?-1:(s-n)/(o-n)}renderBar(e,n,o,s){let i=e.durationYears,d=n>0?i/n*100:0,a=this.isCurrent(e),h=a?this.progressIn(e):-1,p=a?"bar-track bar-now":"bar-track",u=Oe(e.significators,s),x=["bar",a?"now":"",o==="time"?"fine":""].filter(Boolean).join(" ");return c`<div class="${x}" part="label-track" role="listitem" aria-current="${a?"time":"false"}"><span><strong>${e.planet}</strong>${a?c`<span class="now-badge">${this.t("Now")}</span>`:l} </span><span class="${p}"><span class="bar-fill" style="width:${d}%"></span> ${h>=0?c`<span class="bar-progress" style="left:${h*d}%" aria-hidden="true"></span>`:l} </span><span class="dates">${ke(this.effectiveLang(),e.startDate,e.endDate,o)} </span>${u?c`<span class="houses">${this.t("Signifies {{houses}}",{houses:u})}</span>`:l}</div>`}};w.endpoints=Bt,w.styles=[rt,ue,ge,me,_e,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([f({type:String,reflect:!0})],w.prototype,"period",2),m([b()],w.prototype,"view",2),w=m([fe("roxy-dasha-timeline")],w);var At=365.25;function yr(r,t){if(t>=1)return`${C(r,t,1)} years`;let e=t*At;if(e>=1)return`${C(r,e,e>=10?0:1)} days`;let n=e*24;return n>=1?`${C(r,n,1)} hours`:`${C(r,n*60,0)} minutes`}function fr(r){return r>=2?"year":r>=60/At?"month":r>=1/At?"day":"time"}return Ue(gr);})();
|
|
206
4
|
/*! Bundled license information:
|
|
207
5
|
|
|
208
6
|
@lit/reactive-element/css-tag.js:
|