@roxyapi/ui 0.18.3 → 0.18.5

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.
@@ -261,7 +261,7 @@ var RoxyUI_dasha_timeline=(()=>{var z=Object.defineProperty;var ge=Object.getOwn
261
261
  }
262
262
  `;var B="roxy-ui-tokens";function F(){if(typeof document>"u")return null;let o=document.getElementById(B);if(o)return o;let e=document.createElement("style");return e.id=B,e.textContent=xe,document.head.prepend(e),e}var K=globalThis,q=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ae=Symbol(),be=new WeakMap,R=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ae)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(q&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=be.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&be.set(t,e))}return e}toString(){return this.cssText}},ve=o=>new R(typeof o=="string"?o:o+"",void 0,ae),x=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,a,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+o[s+1],o[0]);return new R(t,o,ae)},$e=(o,e)=>{if(q)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),a=K.litNonce;a!==void 0&&r.setAttribute("nonce",a),r.textContent=t.cssText,o.appendChild(r)}},oe=q?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ve(t)})(o):o;var{is:Qe,defineProperty:et,getOwnPropertyDescriptor:tt,getOwnPropertyNames:rt,getOwnPropertySymbols:at,getPrototypeOf:ot}=Object,G=globalThis,we=G.trustedTypes,st=we?we.emptyScript:"",nt=G.reactiveElementPolyfillSupport,P=(o,e)=>o,N={toAttribute(o,e){switch(e){case Boolean:o=o?st:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Y=(o,e)=>!Qe(o,e),ke={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:Y};Symbol.metadata??=Symbol("metadata"),G.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ke){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&et(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:s}=tt(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:a,set(n){let l=a?.call(this);s?.call(this,n),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ke}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=ot(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,r=[...rt(t),...at(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(oe(a))}else e!==void 0&&t.push(oe(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $e(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,r);if(a!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:N).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,a=r._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let s=r.getPropertyOptions(a),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:N;this._$Em=a;let l=n.fromAttribute(t,s.type);this[a]=l??this._$Ej?.get(a)??l,this._$Em=null}}requestUpdate(e,t,r,a=!1,s){if(e!==void 0){let n=this.constructor;if(a===!1&&(s=this[e]),r??=n.getPropertyOptions(e),!((r.hasChanged??Y)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:a,wrapped:s},n){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,s]of this._$Ep)this[a]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[a,s]of r){let{wrapped:n}=s,l=this[a];n!==!0||this._$AL.has(a)||l===void 0||this.C(a,void 0,s,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[P("elementProperties")]=new Map,v[P("finalized")]=new Map,nt?.({ReactiveElement:v}),(G.reactiveElementVersions??=[]).push("2.1.2");var ce=globalThis,Se=o=>o,V=ce.trustedTypes,_e=V?V.createPolicy("lit-html",{createHTML:o=>o}):void 0,Re="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,Pe="?"+$,it=`<${Pe}>`,E=document,M=()=>E.createComment(""),O=o=>o===null||typeof o!="object"&&typeof o!="function",pe=Array.isArray,lt=o=>pe(o)||typeof o?.[Symbol.iterator]=="function",se=`[
263
263
  \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ae=/-->/g,Ee=/>/g,_=RegExp(`>|${se}(?:([^\\s"'>=/]+)(${se}*=${se}*(?:[^
264
- \f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,Te=/"/g,Ne=/^(?:script|style|textarea|title)$/i,ue=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=ue(1),Pt=ue(2),Nt=ue(3),D=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ce=new WeakMap,A=E.createTreeWalker(E,129);function Ue(o,e){if(!pe(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return _e!==void 0?_e.createHTML(e):e}var dt=(o,e)=>{let t=o.length-1,r=[],a,s=e===2?"<svg>":e===3?"<math>":"",n=U;for(let l=0;l<t;l++){let i=o[l],h,u,p=-1,g=0;for(;g<i.length&&(n.lastIndex=g,u=n.exec(i),u!==null);)g=n.lastIndex,n===U?u[1]==="!--"?n=Ae:u[1]!==void 0?n=Ee:u[2]!==void 0?(Ne.test(u[2])&&(a=RegExp("</"+u[2],"g")),n=_):u[3]!==void 0&&(n=_):n===_?u[0]===">"?(n=a??U,p=-1):u[1]===void 0?p=-2:(p=n.lastIndex-u[2].length,h=u[1],n=u[3]===void 0?_:u[3]==='"'?Te:De):n===Te||n===De?n=_:n===Ae||n===Ee?n=U:(n=_,a=void 0);let b=n===_&&o[l+1].startsWith("/>")?" ":"";s+=n===U?i+it:p>=0?(r.push(h),i.slice(0,p)+Re+i.slice(p)+$+b):i+$+(p===-2?l:b)}return[Ue(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},L=class o{constructor({strings:e,_$litType$:t},r){let a;this.parts=[];let s=0,n=0,l=e.length-1,i=this.parts,[h,u]=dt(e,t);if(this.el=o.createElement(h,r),A.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=A.nextNode())!==null&&i.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Re)){let g=u[n++],b=a.getAttribute(p).split($),j=/([.?@])?(.*)/.exec(g);i.push({type:1,index:s,name:j[2],strings:b,ctor:j[1]==="."?ie:j[1]==="?"?le:j[1]==="@"?de:C}),a.removeAttribute(p)}else p.startsWith($)&&(i.push({type:6,index:s}),a.removeAttribute(p));if(Ne.test(a.tagName)){let p=a.textContent.split($),g=p.length-1;if(g>0){a.textContent=V?V.emptyScript:"";for(let b=0;b<g;b++)a.append(p[b],M()),A.nextNode(),i.push({type:2,index:++s});a.append(p[g],M())}}}else if(a.nodeType===8)if(a.data===Pe)i.push({type:2,index:s});else{let p=-1;for(;(p=a.data.indexOf($,p+1))!==-1;)i.push({type:7,index:s}),p+=$.length-1}s++}}static createElement(e,t){let r=E.createElement("template");return r.innerHTML=e,r}};function T(o,e,t=o,r){if(e===D)return e;let a=r!==void 0?t._$Co?.[r]:t._$Cl,s=O(e)?void 0:e._$litDirective$;return a?.constructor!==s&&(a?._$AO?.(!1),s===void 0?a=void 0:(a=new s(o),a._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=a:t._$Cl=a),a!==void 0&&(e=T(o,a._$AS(o,e.values),a,r)),e}var ne=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??E).importNode(t,!0);A.currentNode=a;let s=A.nextNode(),n=0,l=0,i=r[0];for(;i!==void 0;){if(n===i.index){let h;i.type===2?h=new I(s,s.nextSibling,this,e):i.type===1?h=new i.ctor(s,i.name,i.strings,this,e):i.type===6&&(h=new he(s,this,e)),this._$AV.push(h),i=r[++l]}n!==i?.index&&(s=A.nextNode(),n++)}return A.currentNode=E,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},I=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,a){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),O(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):lt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(E.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,a=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=L.createElement(Ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===a)this._$AH.p(t);else{let s=new ne(a,this),n=s.u(this.options);s.p(t),this.T(n),this._$AH=s}}_$AC(e){let t=Ce.get(e.strings);return t===void 0&&Ce.set(e.strings,t=new L(e)),t}k(e){pe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,a=0;for(let s of e)a===t.length?t.push(r=new o(this.O(M()),this.O(M()),this,this.options)):r=t[a],r._$AI(s),a++;a<t.length&&(this._$AR(r&&r._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=Se(e).nextSibling;Se(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,a){let s=this.strings,n=!1;if(s===void 0)e=T(this,e,t,0),n=!O(e)||e!==this._$AH&&e!==D,n&&(this._$AH=e);else{let l=e,i,h;for(e=s[0],i=0;i<s.length-1;i++)h=T(this,l[r+i],t,i),h===D&&(h=this._$AH[i]),n||=!O(h)||h!==this._$AH[i],h===d?e=d:e!==d&&(e+=(h??"")+s[i+1]),this._$AH[i]=h}n&&!a&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ie=class extends C{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},le=class extends C{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},de=class extends C{constructor(e,t,r,a,s){super(e,t,r,a,s),this.type=5}_$AI(e,t=this){if((e=T(this,e,t,0)??d)===D)return;let r=this._$AH,a=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||a);a&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},he=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}};var ht=ce.litHtmlPolyfillSupport;ht?.(L,I),(ce.litHtmlVersions??=[]).push("3.3.3");var Me=(o,e,t)=>{let r=t?.renderBefore??e,a=r._$litPart$;if(a===void 0){let s=t?.renderBefore??null;r._$litPart$=a=new I(e.insertBefore(M(),s),s,void 0,t??{})}return a._$AI(o),a};var me=globalThis,w=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Me(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};w._$litElement$=!0,w.finalized=!0,me.litElementHydrateSupport?.({LitElement:w});var ct=me.litElementPolyfillSupport;ct?.({LitElement:w});(me.litElementVersions??=[]).push("4.2.2");var Oe=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};var pt={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:Y},ut=(o=pt,e,t)=>{let{kind:r,metadata:a}=t,s=globalThis.litPropertyMetadata.get(a);if(s===void 0&&globalThis.litPropertyMetadata.set(a,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),r==="accessor"){let{name:n}=t;return{set(l){let i=e.get.call(this);e.set.call(this,l),this.requestUpdate(n,i,o,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,o,l),l}}}if(r==="setter"){let{name:n}=t;return function(l){let i=this[n];e.call(this,l),this.requestUpdate(n,i,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function y(o){return(e,t)=>typeof t=="object"?ut(o,e,t):((r,a,s)=>{let n=a.hasOwnProperty(s);return a.constructor.createProperty(s,r),n?Object.getOwnPropertyDescriptor(a,s):void 0})(o,e,t)}function k(o){return y({...o,state:!0,attribute:!1})}var H=o=>o??d;var J=x`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var Z="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function Le(o){return!!o&&!o.startsWith("pk_")}function Ie(o,e={}){e.warn&&console.warn(Z),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:Z},bubbles:!0,composed:!0}))}var mt="https://roxyapi.com/api/v2",X=class{constructor(e){this.baseUrl=mt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let a=await r.json();if(t.signal.aborted)return;this.host.data=a}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,n]of Object.entries(e.query??{}))n!=null&&r.searchParams.set(s,String(n));let a={Accept:"application/json"};return this.publishableKey&&(a["X-API-Key"]=this.publishableKey),e.body!=null&&(a["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:a,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return Le(this.publishableKey)?(this.host.error=Z,Ie(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function He(o,e,t,r=[]){let a={...t},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,u)=>{let p=a[u];return delete a[u],encodeURIComponent(String(p??""))}),n=new Set(r),l={},i={};for(let[h,u]of Object.entries(a))u===void 0||u===""||(e==="GET"||n.has(h)?l[h]=u:i[h]=u);return{path:s,method:e,query:l,body:e==="POST"?i:void 0}}var ft="roxy-data";function yt(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var Q=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(yt(e)&&e.classList.contains(ft))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends w{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(He(this.endpoint,this.method,r.values,r.queryKeys??[]))};new Q(this),this.fetcher=new X(this)}static{this.styles=[J]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderResult(t){let r=this.sticky?c`${this.renderForm()}${this.renderData(t)}`:c`<div class="roxy-edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">Edit query</button></div>${this.renderData(t)}`;return this.showAttribution()?c`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">Spiritual data by RoxyAPI</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return c`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${H(this.specUrl)}" publishable-key="${H(this.publishableKey)}" submit-label="${H(this.submitLabel)}" lang="${H(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return this.lang||void 0}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return c`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=c`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?c`${r}${this.renderForm()}`:r}};m([y({attribute:!1})],f.prototype,"data",2),m([y({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),m([y({type:String})],f.prototype,"method",2),m([y({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),m([y({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),m([y({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),m([y({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),m([y({type:Boolean})],f.prototype,"remember",2),m([y({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),m([y({type:String})],f.prototype,"attribution",2),m([k()],f.prototype,"loading",2),m([k()],f.prototype,"error",2),m([k()],f.prototype,"selfFetched",2),m([k()],f.prototype,"editing",2),m([k()],f.prototype,"sticky",2);function je(){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 ze=x`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var gt=/^\d{4}-\d{2}-\d{2}$/,xt=/^\d{2}:\d{2}(:\d{2})?$/,bt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;function vt(o){let e=xt.test(o)?`1970-01-01T${o}`:bt.test(o)?o:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(o)}}function ee(o){if(typeof o!="string"||o.length===0)return"";let{d:e,timeZone:t}=vt(gt.test(o)?`${o}T00:00:00`:o);return Number.isNaN(e.getTime())?o:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric",timeZone:t})}function te(o,e=1){if(typeof o!="number"||!Number.isFinite(o))return"";let t=o.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var Be=x`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}`;function Fe(o,e,t="Reading"){let r=o.filter(a=>!!a.body);return r.length===0?d:c`<section class="block"><h3>${t}</h3>${r.map((a,s)=>c`<details class="interp-card" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${je()} ${a.aside?c`<span class="interp-aside"><small>${a.aside}</small></span>`:d}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??d}</div></details>`)}</section>`}var Ke=x`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function qe(o){let{items:e,active:t,onSelect:r,label:a,idPrefix:s,controls:n=!1}=o;return c`<div class="roxy-tablist" role="tablist" aria-label="${a}" @keydown="${i=>{if(i.key!=="ArrowRight"&&i.key!=="ArrowLeft")return;i.preventDefault();let h=e.findIndex(b=>b.id===t);if(h===-1)return;let u=i.key==="ArrowRight"?1:-1,p=e[(h+u+e.length)%e.length];if(!p)return;r(p.id);let g=i.currentTarget.getRootNode();requestAnimationFrame(()=>{g.querySelector(`#${s}-tab-${p.id}`)?.focus()})}}">${e.map(i=>c`<button type="button" class="roxy-tab" role="tab" id="${s}-tab-${i.id}" aria-selected="${t===i.id?"true":"false"}" aria-controls="${n&&t===i.id?`${s}-panel-${i.id}`:d}" tabindex="${t===i.id?"0":"-1"}" @click="${()=>r(i.id)}">${i.label}</button>`)}</div>`}function Ge(o){return"sookshmaDashas"in o?"Sookshma":"pratyantardashas"in o?"Pratyantardasha":"antardashas"in o?"Antardasha":"Mahadasha"}function fe(o){if("pratyantardashaPeriod"in o&&o.pratyantardashaPeriod)return{label:"Pratyantardasha",period:o.pratyantardashaPeriod};if("antardashaPeriod"in o&&o.antardashaPeriod)return{label:"Antardasha",period:o.antardashaPeriod};if("mahadashaPeriod"in o&&o.mahadashaPeriod)return{label:"Mahadasha",period:o.mahadashaPeriod}}function ye(o){if(!o)return"";let e=[];return o.years&&e.push(`${o.years}y`),o.months&&e.push(`${o.months}m`),o.days&&e.push(`${o.days}d`),e.length?e.join(" "):"0d"}function re(o){let e=o.startDate?ee(o.startDate):"",t=o.endDate?ee(o.endDate):"";return e&&t?`${e} to ${t}`:e||t}var S=class extends f{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderEmpty(){return c`<div class="roxy-empty" role="status">No dasha data</div>`}renderData(t){let r=this.collectPeriods(t),a=r.length?Math.max(...r.map(h=>h.durationYears)):0,s=this.readings(t,r),n=this.frameRows(t),l=[{id:"timeline",label:"Timeline"},...s.length?[{id:"readings",label:`Readings (${s.length})`}]:[],...n.length?[{id:"frame",label:"Chart"}]:[]],i=l.some(h=>h.id===this.view)?this.view:"timeline";return c`<div class="wrap" aria-label="Dasha timeline"><header class="head"><h2 class="title">${this.heading(t)}</h2>${this.renderLordChain(t)}</header>${this.renderParentMahadasha(t)} ${l.length>1?qe({items:l,active:i,onSelect:h=>{this.view=h},label:"Dasha views",idPrefix:"roxy-dasha",controls:!0}):d}<div id="roxy-dasha-panel-${i}" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${i}`:d}">${i==="timeline"?c`${this.period==="current"?this.renderCurrent(t):d} ${r.length>0?c`<div class="timeline" role="list">${r.map(h=>this.renderBar(h,a,wt(a)))}</div>`:d}`:d} ${i==="readings"?Fe(s,"roxy-dasha",s.length===1?"Reading":"Readings"):d} ${i==="frame"?this.renderFrame(n):d}</div></div>`}renderLordChain(t){let r=["mahadashaLord"in t?t.mahadashaLord:void 0,"antardashaLord"in t?t.antardashaLord:void 0,"pratyantardashaLord"in t?t.pratyantardashaLord:void 0].filter(Boolean);return r.length>1?c`<div class="nakshatra">${r.join(" \u203A ")}</div>`:"nakshatraName"in t&&t.nakshatraName?c`<div class="nakshatra">Moon nakshatra: ${t.nakshatraName} ${"nakshatraLord"in t&&t.nakshatraLord?c`(lord ${t.nakshatraLord})`:d}</div>`:d}frameRows(t){let r=[];if("nakshatraName"in t&&t.nakshatraName){let a="moonNakshatra"in t&&t.moonNakshatra?` (${t.moonNakshatra} of 27)`:"";r.push(["Moon nakshatra",`${t.nakshatraName}${a}`])}if("nakshatraLord"in t&&t.nakshatraLord&&r.push(["Nakshatra lord",t.nakshatraLord]),"moonLongitude"in t&&typeof t.moonLongitude=="number"&&r.push(["Moon longitude",`${te(t.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in t&&t.ayanamsaType){let a="ayanamsa"in t&&typeof t.ayanamsa=="number"?` (${te(t.ayanamsa,3)}\xB0)`:"";r.push(["Ayanamsa",`${t.ayanamsaType}${a}`])}if("birthDashaBalance"in t&&t.birthDashaBalance){let a="nakshatraLord"in t&&t.nakshatraLord?`${t.nakshatraLord} `:"";r.push(["Balance at birth",`${ye(t.birthDashaBalance)} of the opening ${a}mahadasha`])}return"totalYears"in t&&typeof t.totalYears=="number"&&r.push(["Cycle length",`${t.totalYears} years`]),r}renderFrame(t){return c`<dl class="frame">${t.map(([r,a])=>c`<div><dt>${r}</dt><dd>${a}</dd></div>`)}</dl>`}heading(t){let r=fe(t);return r?`${Ge(t)}s in ${r.period.planet} ${r.label}`:"mahadashas"in t?"Vimshottari Mahadasha":"mahadasha"in t?"Active dashas":this.period==="major"?"Vimshottari Mahadasha":"Active dashas"}renderParentMahadasha(t){let r=fe(t);if(!r)return d;let a=r.period,s=re(a),n=a.nominalStartDate?ee(a.nominalStartDate):"";return c`<p class="parent">Inside the <strong>${a.planet}</strong> ${r.label}${s?`, ${s}`:""} ${typeof a.durationYears=="number"?`(${te(a.durationYears,1)} years)`:""}. ${n?c`<br>It began ${n}, before birth, so only the sub-periods running after the birth date are listed.`:d}</p>`}readings(t,r){let a=[],s=fe(t);if(s?.period.interpretation&&a.push({label:`${s.period.planet} ${s.label}`,aside:re(s.period),body:s.period.interpretation}),"mahadasha"in t){let l=[["Mahadasha",t.mahadasha,t.remainingInMahadasha],["Antardasha",t.antardasha,t.remainingInAntardasha],["Pratyantardasha",t.pratyantardasha,t.remainingInPratyantardasha],["Sookshma",t.sookshmaDasha,t.remainingInSookshma]];for(let[i,h,u]of l){if(!h?.interpretation)continue;let p=ye(u);a.push({label:`${h.planet} ${i}`,aside:p?`${p} left`:re(h),body:h.interpretation})}}let n=r.find(l=>this.isCurrent(l));return n?.interpretation&&a.push({label:`${n.planet} ${Ge(t)}`,aside:re(n),body:n.interpretation}),a}renderCurrent(t){if(!("mahadasha"in t))return d;let r=[["Mahadasha",t.mahadasha,t.remainingInMahadasha],["Antardasha",t.antardasha,t.remainingInAntardasha],["Pratyantardasha",t.pratyantardasha,t.remainingInPratyantardasha],["Sookshma",t.sookshmaDasha,t.remainingInSookshma]];return c`<div class="current">${r.map(([a,s,n])=>{if(!s)return d;let l=ye(n);return c`<div><span>${a}</span> <strong>${s.planet}</strong> ${l?c`<small>${l} left</small>`:d}</div>`})}</div>`}collectPeriods(t){return"mahadashas"in t&&t.mahadashas?.length?t.mahadashas:"antardashas"in t&&t.antardashas?.length?t.antardashas:"pratyantardashas"in t&&t.pratyantardashas?.length?t.pratyantardashas:"sookshmaDashas"in t&&t.sookshmaDashas?.length?t.sookshmaDashas:[]}isCurrent(t){if(!t.startDate||!t.endDate)return!1;let r=Date.now(),a=Date.parse(t.startDate),s=Date.parse(t.endDate);return Number.isNaN(a)||Number.isNaN(s)?!1:r>=a&&r<s}progressIn(t){if(!t.startDate||!t.endDate)return-1;let r=Date.parse(t.startDate),a=Date.parse(t.endDate),s=Date.now();return Number.isNaN(r)||Number.isNaN(a)||s<r||s>=a||a<=r?-1:(s-r)/(a-r)}renderBar(t,r,a){let s=t.durationYears,n=r>0?s/r*100:0,l=this.isCurrent(t),i=l?this.progressIn(t):-1,h=l?"bar-track bar-now":"bar-track";return c`<div class="${l?"bar now":"bar"}" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${t.planet}</strong>${l?c`<span class="now-badge">Now</span>`:d} </span><span class="${h}"><span class="bar-fill" style="width:${n}%"></span> ${i>=0?c`<span class="bar-progress" style="left:${i*n}%" aria-hidden="true"></span>`:d} </span><span class="dates">${t.startDate?Ye(t.startDate,a):""} ${t.endDate?c`- ${Ye(t.endDate,a)}`:""}</span></div>`}};S.styles=[J,ze,Be,Ke,x`.wrap{gap:var(--roxy-space-md,1rem);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.nakshatra{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.current{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));display:grid}.current div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.current div strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.current div small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.parent{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.timeline{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:5rem 1fr 8rem;align-items:center;display:grid}.bar.now strong{color:var(--roxy-accent-ink,#b45309)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.bar-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent,#f59e0b);opacity:.45;height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-now .bar-fill{opacity:1}.bar-progress{background:var(--roxy-accent-ink,#b45309);width:2px;box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 35%, transparent);border-radius:2px;position:absolute;top:-2px;bottom:-2px}.dates{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right}[role=tabpanel]{padding-top:var(--roxy-space-md,1rem)}.frame{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));margin:0;display:grid}.frame dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}.frame dd{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;margin:0}.block{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem)}`],m([y({type:String,reflect:!0})],S.prototype,"period",2),m([k()],S.prototype,"view",2),S=m([Oe("roxy-dasha-timeline")],S);var $t=365.25;function wt(o){return o>=2?"year":o>=60/$t?"month":"day"}function Ye(o,e){if(e==="year"){let a=o.match(/^(\d{4})/);return a?a[1]:o}let t=new Date(o);if(Number.isNaN(t.getTime()))return o;let r=t.toLocaleString("en",{month:"short"});return e==="month"?`${r} ${t.getFullYear()}`:`${t.getDate()} ${r}`}F();return Xe(kt);})();
264
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,Te=/"/g,Ne=/^(?:script|style|textarea|title)$/i,ue=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=ue(1),Pt=ue(2),Nt=ue(3),D=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ce=new WeakMap,A=E.createTreeWalker(E,129);function Ue(o,e){if(!pe(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return _e!==void 0?_e.createHTML(e):e}var dt=(o,e)=>{let t=o.length-1,r=[],a,s=e===2?"<svg>":e===3?"<math>":"",n=U;for(let l=0;l<t;l++){let i=o[l],h,u,p=-1,g=0;for(;g<i.length&&(n.lastIndex=g,u=n.exec(i),u!==null);)g=n.lastIndex,n===U?u[1]==="!--"?n=Ae:u[1]!==void 0?n=Ee:u[2]!==void 0?(Ne.test(u[2])&&(a=RegExp("</"+u[2],"g")),n=_):u[3]!==void 0&&(n=_):n===_?u[0]===">"?(n=a??U,p=-1):u[1]===void 0?p=-2:(p=n.lastIndex-u[2].length,h=u[1],n=u[3]===void 0?_:u[3]==='"'?Te:De):n===Te||n===De?n=_:n===Ae||n===Ee?n=U:(n=_,a=void 0);let b=n===_&&o[l+1].startsWith("/>")?" ":"";s+=n===U?i+it:p>=0?(r.push(h),i.slice(0,p)+Re+i.slice(p)+$+b):i+$+(p===-2?l:b)}return[Ue(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},L=class o{constructor({strings:e,_$litType$:t},r){let a;this.parts=[];let s=0,n=0,l=e.length-1,i=this.parts,[h,u]=dt(e,t);if(this.el=o.createElement(h,r),A.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=A.nextNode())!==null&&i.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Re)){let g=u[n++],b=a.getAttribute(p).split($),j=/([.?@])?(.*)/.exec(g);i.push({type:1,index:s,name:j[2],strings:b,ctor:j[1]==="."?ie:j[1]==="?"?le:j[1]==="@"?de:C}),a.removeAttribute(p)}else p.startsWith($)&&(i.push({type:6,index:s}),a.removeAttribute(p));if(Ne.test(a.tagName)){let p=a.textContent.split($),g=p.length-1;if(g>0){a.textContent=V?V.emptyScript:"";for(let b=0;b<g;b++)a.append(p[b],M()),A.nextNode(),i.push({type:2,index:++s});a.append(p[g],M())}}}else if(a.nodeType===8)if(a.data===Pe)i.push({type:2,index:s});else{let p=-1;for(;(p=a.data.indexOf($,p+1))!==-1;)i.push({type:7,index:s}),p+=$.length-1}s++}}static createElement(e,t){let r=E.createElement("template");return r.innerHTML=e,r}};function T(o,e,t=o,r){if(e===D)return e;let a=r!==void 0?t._$Co?.[r]:t._$Cl,s=O(e)?void 0:e._$litDirective$;return a?.constructor!==s&&(a?._$AO?.(!1),s===void 0?a=void 0:(a=new s(o),a._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=a:t._$Cl=a),a!==void 0&&(e=T(o,a._$AS(o,e.values),a,r)),e}var ne=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??E).importNode(t,!0);A.currentNode=a;let s=A.nextNode(),n=0,l=0,i=r[0];for(;i!==void 0;){if(n===i.index){let h;i.type===2?h=new I(s,s.nextSibling,this,e):i.type===1?h=new i.ctor(s,i.name,i.strings,this,e):i.type===6&&(h=new he(s,this,e)),this._$AV.push(h),i=r[++l]}n!==i?.index&&(s=A.nextNode(),n++)}return A.currentNode=E,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},I=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,a){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),O(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):lt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(E.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,a=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=L.createElement(Ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===a)this._$AH.p(t);else{let s=new ne(a,this),n=s.u(this.options);s.p(t),this.T(n),this._$AH=s}}_$AC(e){let t=Ce.get(e.strings);return t===void 0&&Ce.set(e.strings,t=new L(e)),t}k(e){pe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,a=0;for(let s of e)a===t.length?t.push(r=new o(this.O(M()),this.O(M()),this,this.options)):r=t[a],r._$AI(s),a++;a<t.length&&(this._$AR(r&&r._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=Se(e).nextSibling;Se(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,a){let s=this.strings,n=!1;if(s===void 0)e=T(this,e,t,0),n=!O(e)||e!==this._$AH&&e!==D,n&&(this._$AH=e);else{let l=e,i,h;for(e=s[0],i=0;i<s.length-1;i++)h=T(this,l[r+i],t,i),h===D&&(h=this._$AH[i]),n||=!O(h)||h!==this._$AH[i],h===d?e=d:e!==d&&(e+=(h??"")+s[i+1]),this._$AH[i]=h}n&&!a&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ie=class extends C{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},le=class extends C{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},de=class extends C{constructor(e,t,r,a,s){super(e,t,r,a,s),this.type=5}_$AI(e,t=this){if((e=T(this,e,t,0)??d)===D)return;let r=this._$AH,a=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||a);a&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},he=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}};var ht=ce.litHtmlPolyfillSupport;ht?.(L,I),(ce.litHtmlVersions??=[]).push("3.3.3");var Me=(o,e,t)=>{let r=t?.renderBefore??e,a=r._$litPart$;if(a===void 0){let s=t?.renderBefore??null;r._$litPart$=a=new I(e.insertBefore(M(),s),s,void 0,t??{})}return a._$AI(o),a};var me=globalThis,w=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Me(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};w._$litElement$=!0,w.finalized=!0,me.litElementHydrateSupport?.({LitElement:w});var ct=me.litElementPolyfillSupport;ct?.({LitElement:w});(me.litElementVersions??=[]).push("4.2.2");var Oe=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};var pt={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:Y},ut=(o=pt,e,t)=>{let{kind:r,metadata:a}=t,s=globalThis.litPropertyMetadata.get(a);if(s===void 0&&globalThis.litPropertyMetadata.set(a,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),r==="accessor"){let{name:n}=t;return{set(l){let i=e.get.call(this);e.set.call(this,l),this.requestUpdate(n,i,o,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,o,l),l}}}if(r==="setter"){let{name:n}=t;return function(l){let i=this[n];e.call(this,l),this.requestUpdate(n,i,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function y(o){return(e,t)=>typeof t=="object"?ut(o,e,t):((r,a,s)=>{let n=a.hasOwnProperty(s);return a.constructor.createProperty(s,r),n?Object.getOwnPropertyDescriptor(a,s):void 0})(o,e,t)}function k(o){return y({...o,state:!0,attribute:!1})}var H=o=>o??d;var J=x`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var Z="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function Le(o){return!!o&&!o.startsWith("pk_")}function Ie(o,e={}){e.warn&&console.warn(Z),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:Z},bubbles:!0,composed:!0}))}var mt="https://roxyapi.com/api/v2",X=class{constructor(e){this.baseUrl=mt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await this.readError(r));let a=await r.json();if(t.signal.aborted)return;this.host.data=a}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,n]of Object.entries(e.query??{}))n!=null&&r.searchParams.set(s,String(n));let a={Accept:"application/json"};return this.publishableKey&&(a["X-API-Key"]=this.publishableKey),e.body!=null&&(a["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:a,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return Le(this.publishableKey)?(this.host.error=Z,Ie(this.host),!0):!1}async readError(e){try{let t=await e.json();if(t?.error)return t.error}catch{}return`Request failed (${e.status})`}};function He(o,e,t,r=[]){let a={...t},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,u)=>{let p=a[u];return delete a[u],encodeURIComponent(String(p??""))}),n=new Set(r),l={},i={};for(let[h,u]of Object.entries(a))u===void 0||u===""||(e==="GET"||n.has(h)?l[h]=u:i[h]=u);return{path:s,method:e,query:l,body:e==="POST"?i:void 0}}var ft="roxy-data";function yt(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var Q=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(yt(e)&&e.classList.contains(ft))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var f=class extends w{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(He(this.endpoint,this.method,r.values,r.queryKeys??[]))};new Q(this),this.fetcher=new X(this)}static{this.styles=[J]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?c`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderResult(t){let r=this.sticky?c`${this.renderForm()}${this.renderData(t)}`:c`<div class="roxy-edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">Edit query</button></div>${this.renderData(t)}`;return this.showAttribution()?c`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<div class="roxy-attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">Spiritual data by RoxyAPI</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return c`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${H(this.specUrl)}" publishable-key="${H(this.publishableKey)}" submit-label="${H(this.submitLabel)}" lang="${H(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}effectiveLang(){return this.lang||void 0}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return c`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(t){let r=c`<div class="roxy-error" role="alert">${t}</div>`;return this.endpoint?c`${r}${this.renderForm()}`:r}};m([y({attribute:!1})],f.prototype,"data",2),m([y({type:String,attribute:"data-endpoint"})],f.prototype,"endpoint",2),m([y({type:String})],f.prototype,"method",2),m([y({type:String,attribute:"publishable-key"})],f.prototype,"publishableKey",2),m([y({type:String,attribute:"base-url"})],f.prototype,"baseUrl",2),m([y({type:String,attribute:"spec-url"})],f.prototype,"specUrl",2),m([y({type:String,attribute:"submit-url"})],f.prototype,"submitUrl",2),m([y({type:Boolean})],f.prototype,"remember",2),m([y({type:String,attribute:"submit-label"})],f.prototype,"submitLabel",2),m([y({type:String})],f.prototype,"attribution",2),m([k()],f.prototype,"loading",2),m([k()],f.prototype,"error",2),m([k()],f.prototype,"selfFetched",2),m([k()],f.prototype,"editing",2),m([k()],f.prototype,"sticky",2);function je(){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 ze=x`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var gt=/^\d{4}-\d{2}-\d{2}$/,xt=/^\d{2}:\d{2}(:\d{2})?$/,bt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;function vt(o){let e=xt.test(o)?`1970-01-01T${o}`:bt.test(o)?o:null;return e?{d:new Date(`${e}Z`),timeZone:"UTC"}:{d:new Date(o)}}function ee(o){if(typeof o!="string"||o.length===0)return"";let{d:e,timeZone:t}=vt(gt.test(o)?`${o}T00:00:00`:o);return Number.isNaN(e.getTime())?o:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric",timeZone:t})}function te(o,e=1){if(typeof o!="number"||!Number.isFinite(o))return"";let t=o.toFixed(e);return t.includes(".")?t.replace(/\.?0+$/,""):t}var Be=x`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}`;function Fe(o,e,t="Reading"){let r=o.filter(a=>!!a.body);return r.length===0?d:c`<section class="block"><h3>${t}</h3>${r.map((a,s)=>c`<details class="interp-card" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${a.label}</span> ${je()} ${a.aside?c`<span class="interp-aside"><small>${a.aside}</small></span>`:d}</summary><div class="interp-body"><p>${a.body}</p>${a.extra??d}</div></details>`)}</section>`}var Ke=x`.roxy-tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);scrollbar-width:thin;gap:2px;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;flex-shrink:0;margin-bottom:-2px;font-family:inherit}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.roxy-tab:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:-2px;border-radius:4px}`;function qe(o){let{items:e,active:t,onSelect:r,label:a,idPrefix:s,controls:n=!1}=o;return c`<div class="roxy-tablist" role="tablist" aria-label="${a}" @keydown="${i=>{if(i.key!=="ArrowRight"&&i.key!=="ArrowLeft")return;i.preventDefault();let h=e.findIndex(b=>b.id===t);if(h===-1)return;let u=i.key==="ArrowRight"?1:-1,p=e[(h+u+e.length)%e.length];if(!p)return;r(p.id);let g=i.currentTarget.getRootNode();requestAnimationFrame(()=>{g.querySelector(`#${s}-tab-${p.id}`)?.focus()})}}">${e.map(i=>c`<button type="button" class="roxy-tab" role="tab" id="${s}-tab-${i.id}" aria-selected="${t===i.id?"true":"false"}" aria-controls="${n&&t===i.id?`${s}-panel-${i.id}`:d}" tabindex="${t===i.id?"0":"-1"}" @click="${()=>r(i.id)}">${i.label}</button>`)}</div>`}function Ge(o){return"sookshmaDashas"in o?"Sookshma":"pratyantardashas"in o?"Pratyantardasha":"antardashas"in o?"Antardasha":"Mahadasha"}function fe(o){if("pratyantardashaPeriod"in o&&o.pratyantardashaPeriod)return{label:"Pratyantardasha",period:o.pratyantardashaPeriod};if("antardashaPeriod"in o&&o.antardashaPeriod)return{label:"Antardasha",period:o.antardashaPeriod};if("mahadashaPeriod"in o&&o.mahadashaPeriod)return{label:"Mahadasha",period:o.mahadashaPeriod}}function ye(o){if(!o)return"";let e=[];return o.years&&e.push(`${o.years}y`),o.months&&e.push(`${o.months}m`),o.days&&e.push(`${o.days}d`),e.length?e.join(" "):"0d"}function re(o){let e=o.startDate?ee(o.startDate):"",t=o.endDate?ee(o.endDate):"";return e&&t?`${e} to ${t}`:e||t}var S=class extends f{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderEmpty(){return c`<div class="roxy-empty" role="status">No dasha data</div>`}renderData(t){let r=this.collectPeriods(t),a=r.length?Math.max(...r.map(h=>h.durationYears)):0,s=this.readings(t,r),n=this.frameRows(t),l=[{id:"timeline",label:"Timeline"},...s.length?[{id:"readings",label:`Readings (${s.length})`}]:[],...n.length?[{id:"frame",label:"Chart details"}]:[]],i=l.some(h=>h.id===this.view)?this.view:"timeline";return c`<div class="wrap" aria-label="Dasha timeline"><header class="head"><h2 class="title">${this.heading(t)}</h2>${this.renderLordChain(t)}</header>${this.renderParentMahadasha(t)} ${l.length>1?qe({items:l,active:i,onSelect:h=>{this.view=h},label:"Dasha views",idPrefix:"roxy-dasha",controls:!0}):d}<div id="roxy-dasha-panel-${i}" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${i}`:d}">${i==="timeline"?c`${this.period==="current"?this.renderCurrent(t):d} ${r.length>0?c`<div class="timeline" role="list">${r.map(h=>this.renderBar(h,a,wt(a)))}</div>`:d}`:d} ${i==="readings"?Fe(s,"roxy-dasha",s.length===1?"Reading":"Readings"):d} ${i==="frame"?this.renderFrame(n):d}</div></div>`}renderLordChain(t){let r=["mahadashaLord"in t?t.mahadashaLord:void 0,"antardashaLord"in t?t.antardashaLord:void 0,"pratyantardashaLord"in t?t.pratyantardashaLord:void 0].filter(Boolean);return r.length>1?c`<div class="nakshatra">${r.join(" \u203A ")}</div>`:"nakshatraName"in t&&t.nakshatraName?c`<div class="nakshatra">Moon nakshatra: ${t.nakshatraName} ${"nakshatraLord"in t&&t.nakshatraLord?c`(lord ${t.nakshatraLord})`:d}</div>`:d}frameRows(t){let r=[];if("nakshatraName"in t&&t.nakshatraName){let a="moonNakshatra"in t&&t.moonNakshatra?` (${t.moonNakshatra} of 27)`:"";r.push(["Moon nakshatra",`${t.nakshatraName}${a}`])}if("nakshatraLord"in t&&t.nakshatraLord&&r.push(["Nakshatra lord",t.nakshatraLord]),"moonLongitude"in t&&typeof t.moonLongitude=="number"&&r.push(["Moon longitude",`${te(t.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in t&&t.ayanamsaType){let a="ayanamsa"in t&&typeof t.ayanamsa=="number"?` (${te(t.ayanamsa,3)}\xB0)`:"";r.push(["Ayanamsa",`${t.ayanamsaType}${a}`])}if("birthDashaBalance"in t&&t.birthDashaBalance){let a="nakshatraLord"in t&&t.nakshatraLord?`${t.nakshatraLord} `:"";r.push(["Balance at birth",`${ye(t.birthDashaBalance)} of the opening ${a}mahadasha`])}return"totalYears"in t&&typeof t.totalYears=="number"&&r.push(["Cycle length",`${t.totalYears} years`]),r}renderFrame(t){return c`<dl class="frame">${t.map(([r,a])=>c`<div><dt>${r}</dt><dd>${a}</dd></div>`)}</dl>`}heading(t){let r=fe(t);return r?`${Ge(t)}s in ${r.period.planet} ${r.label}`:"mahadashas"in t?"Vimshottari Mahadasha":"mahadasha"in t?"Active dashas":this.period==="major"?"Vimshottari Mahadasha":"Active dashas"}renderParentMahadasha(t){let r=fe(t);if(!r)return d;let a=r.period,s=re(a),n=a.nominalStartDate?ee(a.nominalStartDate):"";return c`<p class="parent">Inside the <strong>${a.planet}</strong> ${r.label}${s?`, ${s}`:""} ${typeof a.durationYears=="number"?`(${te(a.durationYears,1)} years)`:""}. ${n?c`<br>It began ${n}, before birth, so only the sub-periods running after the birth date are listed.`:d}</p>`}readings(t,r){let a=[],s=fe(t);if(s?.period.interpretation&&a.push({label:`${s.period.planet} ${s.label}`,aside:re(s.period),body:s.period.interpretation}),"mahadasha"in t){let l=[["Mahadasha",t.mahadasha,t.remainingInMahadasha],["Antardasha",t.antardasha,t.remainingInAntardasha],["Pratyantardasha",t.pratyantardasha,t.remainingInPratyantardasha],["Sookshma",t.sookshmaDasha,t.remainingInSookshma]];for(let[i,h,u]of l){if(!h?.interpretation)continue;let p=ye(u);a.push({label:`${h.planet} ${i}`,aside:p?`${p} left`:re(h),body:h.interpretation})}}let n=r.find(l=>this.isCurrent(l));return n?.interpretation&&a.push({label:`${n.planet} ${Ge(t)}`,aside:re(n),body:n.interpretation}),a}renderCurrent(t){if(!("mahadasha"in t))return d;let r=[["Mahadasha",t.mahadasha,t.remainingInMahadasha],["Antardasha",t.antardasha,t.remainingInAntardasha],["Pratyantardasha",t.pratyantardasha,t.remainingInPratyantardasha],["Sookshma",t.sookshmaDasha,t.remainingInSookshma]];return c`<div class="current">${r.map(([a,s,n])=>{if(!s)return d;let l=ye(n);return c`<div><span>${a}</span> <strong>${s.planet}</strong> ${l?c`<small>${l} left</small>`:d}</div>`})}</div>`}collectPeriods(t){return"mahadashas"in t&&t.mahadashas?.length?t.mahadashas:"antardashas"in t&&t.antardashas?.length?t.antardashas:"pratyantardashas"in t&&t.pratyantardashas?.length?t.pratyantardashas:"sookshmaDashas"in t&&t.sookshmaDashas?.length?t.sookshmaDashas:[]}isCurrent(t){if(!t.startDate||!t.endDate)return!1;let r=Date.now(),a=Date.parse(t.startDate),s=Date.parse(t.endDate);return Number.isNaN(a)||Number.isNaN(s)?!1:r>=a&&r<s}progressIn(t){if(!t.startDate||!t.endDate)return-1;let r=Date.parse(t.startDate),a=Date.parse(t.endDate),s=Date.now();return Number.isNaN(r)||Number.isNaN(a)||s<r||s>=a||a<=r?-1:(s-r)/(a-r)}renderBar(t,r,a){let s=t.durationYears,n=r>0?s/r*100:0,l=this.isCurrent(t),i=l?this.progressIn(t):-1,h=l?"bar-track bar-now":"bar-track";return c`<div class="${l?"bar now":"bar"}" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${t.planet}</strong>${l?c`<span class="now-badge">Now</span>`:d} </span><span class="${h}"><span class="bar-fill" style="width:${n}%"></span> ${i>=0?c`<span class="bar-progress" style="left:${i*n}%" aria-hidden="true"></span>`:d} </span><span class="dates">${t.startDate?Ye(t.startDate,a):""} ${t.endDate?c`- ${Ye(t.endDate,a)}`:""}</span></div>`}};S.styles=[J,ze,Be,Ke,x`.wrap{gap:var(--roxy-space-md,1rem);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.nakshatra{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}.current{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));display:grid}.current div span:first-child{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.current div strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.current div small{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);display:block}.parent{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);border-left:2px solid var(--roxy-border,#e4e4e7);padding-left:var(--roxy-space-sm,.5rem);margin:0}.timeline{gap:var(--roxy-space-xs,.25rem);display:grid}.bar{gap:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);grid-template-columns:5rem 1fr 8rem;align-items:center;display:grid}.bar.now strong{color:var(--roxy-accent-ink,#b45309)}.now-badge{font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-accent-ink,#b45309);text-transform:uppercase;letter-spacing:.06em;margin-left:.4em;display:inline-block}.bar-track{background:var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);height:14px;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent,#f59e0b);opacity:.45;height:100%;transition:width var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));display:block}.bar-now .bar-fill{opacity:1}.bar-progress{background:var(--roxy-accent-ink,#b45309);width:2px;box-shadow:0 0 0 2px color-mix(in srgb, var(--roxy-accent,#f59e0b) 35%, transparent);border-radius:2px;position:absolute;top:-2px;bottom:-2px}.dates{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);font-variant-numeric:tabular-nums;text-align:right}[role=tabpanel]{padding-top:var(--roxy-space-md,1rem)}.frame{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));margin:0;display:grid}.frame dt{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em}.frame dd{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);font-variant-numeric:tabular-nums;margin:0}.block{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);background:var(--roxy-surface,#fff);padding:var(--roxy-space-md,1rem)}`],m([y({type:String,reflect:!0})],S.prototype,"period",2),m([k()],S.prototype,"view",2),S=m([Oe("roxy-dasha-timeline")],S);var $t=365.25;function wt(o){return o>=2?"year":o>=60/$t?"month":"day"}function Ye(o,e){if(e==="year"){let a=o.match(/^(\d{4})/);return a?a[1]:o}let t=new Date(o);if(Number.isNaN(t.getTime()))return o;let r=t.toLocaleString("en",{month:"short"});return e==="month"?`${r} ${t.getFullYear()}`:`${t.getDate()} ${r}`}F();return Xe(kt);})();
265
265
  /*! Bundled license information:
266
266
 
267
267
  @lit/reactive-element/css-tag.js: