@roxyapi/ui 1.6.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/components-catalog.json +1 -1
  2. package/dist/cdn/components/almanac-day.js +2 -2
  3. package/dist/cdn/components/angel-number-card.js +3 -3
  4. package/dist/cdn/components/angel-number-lookup.js +2 -2
  5. package/dist/cdn/components/arudha-padas.js +2 -2
  6. package/dist/cdn/components/ashtakavarga-grid.js +1 -1
  7. package/dist/cdn/components/aspects-table.js +2 -2
  8. package/dist/cdn/components/astrocartography-map.js +1 -1
  9. package/dist/cdn/components/bazi-chart.js +2 -2
  10. package/dist/cdn/components/bhav-chalit-table.js +2 -2
  11. package/dist/cdn/components/bhava-bala-table.js +3 -3
  12. package/dist/cdn/components/biorhythm-chart.js +2 -2
  13. package/dist/cdn/components/bodygraph.js +3 -3
  14. package/dist/cdn/components/chara-karakas.js +2 -2
  15. package/dist/cdn/components/choghadiya-grid.js +1 -1
  16. package/dist/cdn/components/compatibility-card.js +2 -2
  17. package/dist/cdn/components/compound-number.js +2 -2
  18. package/dist/cdn/components/crystal-card.js +1 -1
  19. package/dist/cdn/components/crystal-grid.js +1 -1
  20. package/dist/cdn/components/dasha-timeline.js +2 -2
  21. package/dist/cdn/components/data.js +1 -1
  22. package/dist/cdn/components/divisional-chart.js +1 -1
  23. package/dist/cdn/components/dosha-card.js +2 -2
  24. package/dist/cdn/components/dosha-constitution.js +2 -2
  25. package/dist/cdn/components/dream-card.js +1 -1
  26. package/dist/cdn/components/dream-search.js +2 -2
  27. package/dist/cdn/components/endpoint-form.js +2 -2
  28. package/dist/cdn/components/ephemeris-table.js +1 -1
  29. package/dist/cdn/components/fixed-stars.js +1 -1
  30. package/dist/cdn/components/flying-star-chart.js +2 -2
  31. package/dist/cdn/components/forecast-digest.js +1 -1
  32. package/dist/cdn/components/forecast-timeline.js +1 -1
  33. package/dist/cdn/components/gematria.js +1 -1
  34. package/dist/cdn/components/gochara-table.js +2 -2
  35. package/dist/cdn/components/guna-milan.js +3 -3
  36. package/dist/cdn/components/hd-connection.js +1 -1
  37. package/dist/cdn/components/hd-penta.js +15 -15
  38. package/dist/cdn/components/hd-type-card.js +1 -1
  39. package/dist/cdn/components/hd-variables.js +1 -1
  40. package/dist/cdn/components/heliacal-table.js +2 -2
  41. package/dist/cdn/components/hexagram.js +1 -1
  42. package/dist/cdn/components/hora-table.js +1 -1
  43. package/dist/cdn/components/horoscope-card.js +3 -3
  44. package/dist/cdn/components/kp-chart.js +3 -3
  45. package/dist/cdn/components/kp-finance-card.js +2 -2
  46. package/dist/cdn/components/kp-planets-table.js +3 -3
  47. package/dist/cdn/components/kp-ruling-planets.js +1 -1
  48. package/dist/cdn/components/kua-card.js +3 -3
  49. package/dist/cdn/components/local-space-compass.js +1 -1
  50. package/dist/cdn/components/location-search.js +1 -1
  51. package/dist/cdn/components/luck-pillars.js +3 -3
  52. package/dist/cdn/components/mayan-day-sign.js +1 -1
  53. package/dist/cdn/components/moon-phase.js +2 -2
  54. package/dist/cdn/components/nakshatra-card.js +1 -1
  55. package/dist/cdn/components/natal-chart.js +17 -17
  56. package/dist/cdn/components/numerology-card.js +2 -2
  57. package/dist/cdn/components/panchang-table.js +2 -2
  58. package/dist/cdn/components/positions-table.js +1 -1
  59. package/dist/cdn/components/profection-card.js +2 -2
  60. package/dist/cdn/components/reference-card.js +1 -1
  61. package/dist/cdn/components/relocation-wheel.js +17 -17
  62. package/dist/cdn/components/report.js +1 -1
  63. package/dist/cdn/components/shadbala-table.js +1 -1
  64. package/dist/cdn/components/synastry-chart.js +1 -1
  65. package/dist/cdn/components/tarot-card.js +2 -2
  66. package/dist/cdn/components/tarot-catalog.js +2 -2
  67. package/dist/cdn/components/tarot-spread.js +3 -3
  68. package/dist/cdn/components/transit-wheel.js +1 -1
  69. package/dist/cdn/components/transits-table.js +2 -2
  70. package/dist/cdn/components/upagraha-table.js +3 -3
  71. package/dist/cdn/components/vastu-mandala.js +2 -2
  72. package/dist/cdn/components/vedic-aspects.js +2 -2
  73. package/dist/cdn/components/vedic-daily.js +2 -2
  74. package/dist/cdn/components/vedic-kundli.js +1 -1
  75. package/dist/cdn/components/vedic-planets-table.js +1 -1
  76. package/dist/cdn/components/western-planets-table.js +1 -1
  77. package/dist/cdn/components/yoga-list.js +2 -2
  78. package/dist/cdn/components/zodiac-card.js +2 -2
  79. package/dist/cdn/locales/de.js +1 -1
  80. package/dist/cdn/locales/es.js +1 -1
  81. package/dist/cdn/locales/fr.js +1 -1
  82. package/dist/cdn/locales/hi.js +1 -1
  83. package/dist/cdn/locales/pt.js +1 -1
  84. package/dist/cdn/locales/ru.js +1 -1
  85. package/dist/cdn/locales/tr.js +1 -1
  86. package/dist/cdn/roxy-ui.js +85 -85
  87. package/dist/charts.cjs +13 -13
  88. package/dist/charts.js +10 -10
  89. package/dist/components/almanac-day.js +1 -1
  90. package/dist/components/angel-number-card.js +1 -1
  91. package/dist/components/angel-number-lookup.js +1 -1
  92. package/dist/components/arudha-padas.js +1 -1
  93. package/dist/components/ashtakavarga-grid.js +1 -1
  94. package/dist/components/aspects-table.js +1 -1
  95. package/dist/components/astrocartography-map.js +2 -2
  96. package/dist/components/bazi-chart.js +1 -1
  97. package/dist/components/bhav-chalit-table.js +1 -1
  98. package/dist/components/bhava-bala-table.js +1 -1
  99. package/dist/components/biorhythm-chart.js +1 -1
  100. package/dist/components/bodygraph.js +1 -1
  101. package/dist/components/chara-karakas.js +1 -1
  102. package/dist/components/choghadiya-grid.js +1 -1
  103. package/dist/components/compatibility-card.js +1 -1
  104. package/dist/components/compound-number.js +1 -1
  105. package/dist/components/crystal-card.js +1 -1
  106. package/dist/components/crystal-grid.js +1 -1
  107. package/dist/components/dasha-timeline.js +1 -1
  108. package/dist/components/data.js +1 -1
  109. package/dist/components/divisional-chart.js +1 -1
  110. package/dist/components/dosha-card.js +1 -1
  111. package/dist/components/dosha-constitution.js +1 -1
  112. package/dist/components/dream-card.js +1 -1
  113. package/dist/components/dream-search.js +1 -1
  114. package/dist/components/endpoint-form.js +1 -1
  115. package/dist/components/ephemeris-table.js +1 -1
  116. package/dist/components/fixed-stars.js +1 -1
  117. package/dist/components/flying-star-chart.js +1 -1
  118. package/dist/components/forecast-digest.js +1 -1
  119. package/dist/components/forecast-timeline.js +1 -1
  120. package/dist/components/gematria.js +1 -1
  121. package/dist/components/gochara-table.js +1 -1
  122. package/dist/components/guna-milan.js +1 -1
  123. package/dist/components/hd-connection.js +1 -1
  124. package/dist/components/hd-penta.js +1 -1
  125. package/dist/components/hd-type-card.js +1 -1
  126. package/dist/components/hd-variables.js +1 -1
  127. package/dist/components/heliacal-table.js +1 -1
  128. package/dist/components/hexagram.js +1 -1
  129. package/dist/components/hora-table.js +1 -1
  130. package/dist/components/horoscope-card.d.ts +24 -8
  131. package/dist/components/horoscope-card.js +1 -1
  132. package/dist/components/kp-chart.js +1 -1
  133. package/dist/components/kp-finance-card.js +1 -1
  134. package/dist/components/kp-planets-table.js +1 -1
  135. package/dist/components/kp-ruling-planets.js +1 -1
  136. package/dist/components/kua-card.js +1 -1
  137. package/dist/components/local-space-compass.js +2 -2
  138. package/dist/components/location-search.js +1 -1
  139. package/dist/components/luck-pillars.js +1 -1
  140. package/dist/components/mayan-day-sign.js +1 -1
  141. package/dist/components/moon-phase.js +1 -1
  142. package/dist/components/nakshatra-card.js +1 -1
  143. package/dist/components/natal-chart.d.ts +5 -0
  144. package/dist/components/natal-chart.js +14 -14
  145. package/dist/components/numerology-card.js +1 -1
  146. package/dist/components/panchang-table.js +1 -1
  147. package/dist/components/positions-table.js +1 -1
  148. package/dist/components/profection-card.js +1 -1
  149. package/dist/components/reference-card.js +1 -1
  150. package/dist/components/relocation-wheel.js +15 -15
  151. package/dist/components/report.js +1 -1
  152. package/dist/components/shadbala-table.js +1 -1
  153. package/dist/components/synastry-chart.js +1 -1
  154. package/dist/components/tarot-card.js +1 -1
  155. package/dist/components/tarot-catalog.js +1 -1
  156. package/dist/components/tarot-spread.d.ts +2 -0
  157. package/dist/components/tarot-spread.js +1 -1
  158. package/dist/components/transit-wheel.js +8 -8
  159. package/dist/components/transits-table.js +1 -1
  160. package/dist/components/upagraha-table.js +1 -1
  161. package/dist/components/vastu-mandala.js +2 -2
  162. package/dist/components/vedic-aspects.js +1 -1
  163. package/dist/components/vedic-daily.js +1 -1
  164. package/dist/components/vedic-kundli.js +2 -2
  165. package/dist/components/vedic-planets-table.js +1 -1
  166. package/dist/components/western-planets-table.d.ts +1 -0
  167. package/dist/components/western-planets-table.js +1 -1
  168. package/dist/components/yoga-list.js +1 -1
  169. package/dist/components/zodiac-card.js +1 -1
  170. package/dist/forms.json +1 -1
  171. package/dist/i18n/chrome-strings.d.ts +1 -1
  172. package/dist/index.cjs +111 -111
  173. package/dist/index.js +95 -95
  174. package/dist/locales/de.js +1 -1
  175. package/dist/locales/es.js +1 -1
  176. package/dist/locales/fr.js +1 -1
  177. package/dist/locales/hi.js +1 -1
  178. package/dist/locales/pt.js +1 -1
  179. package/dist/locales/ru.js +1 -1
  180. package/dist/locales/tr.js +1 -1
  181. package/dist/manifest.json +1 -1
  182. package/dist/schemas/get--astrology-horoscope-sign-daily.json +1 -1
  183. package/dist/schemas/get--astrology-horoscope-sign-monthly.json +1 -1
  184. package/dist/schemas/get--astrology-horoscope-sign-weekly.json +1 -1
  185. package/dist/schemas/post--astrology-aspect-patterns.json +1 -1
  186. package/dist/types/types.gen.d.ts +407 -63
  187. package/dist/utils/base-element.d.ts +2 -1
  188. package/dist/utils/format.d.ts +2 -0
  189. package/dist/utils/interp-accordion.d.ts +2 -2
  190. package/dist/utils/string.d.ts +2 -0
  191. package/dist/utils/tarot.d.ts +2 -0
  192. package/dist/version.d.ts +1 -1
  193. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- var Qm=Object.defineProperty;var eg=Object.getOwnPropertyDescriptor;var m=(n,a,e,t)=>{for(var r=t>1?void 0:t?eg(a,e):a,s=n.length-1,i;s>=0;s--)(i=n[s])&&(r=(t?i(a,e,r):i(r))||r);return t&&r&&Qm(a,e,r),r};import{css as Kg,html as oe,nothing as we}from"lit";import{property as Vg}from"lit/decorators.js";var uc=[{endpoint:"chinese-astrology/calendar/day/{date}",method:"GET",attrs:{mode:"day"}},{endpoint:"chinese-astrology/calendar/monthly",method:"GET",attrs:{mode:"month"}},{endpoint:"chinese-astrology/calendar/auspicious-days",method:"POST",attrs:{mode:"auspicious"}}],fc=[{endpoint:"angel-numbers/numbers/{number}",method:"GET"},{endpoint:"angel-numbers/daily",method:"POST"}],xc=[{endpoint:"angel-numbers/lookup",method:"GET"}],bc=[{endpoint:"vedic-astrology/arudha",method:"POST"}],vc=[{endpoint:"vedic-astrology/ashtakavarga",method:"POST"}],Lc=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}],$c=[{endpoint:"astrology/astrocartography",method:"POST"}],wc=[{endpoint:"chinese-astrology/bazi/chart",method:"POST"}],kc=[{endpoint:"vedic-astrology/bhav-chalit",method:"POST"}],Sc=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}],Rc=[{endpoint:"biorhythm/daily",method:"POST",attrs:{mode:"daily"}},{endpoint:"biorhythm/forecast",method:"POST",attrs:{mode:"forecast"}},{endpoint:"biorhythm/critical-days",method:"POST",attrs:{mode:"critical-days"}}],Cc=[{endpoint:"human-design/bodygraph",method:"POST"}],Tc=[{endpoint:"vedic-astrology/chara-karakas",method:"POST"}],Ec=[{endpoint:"vedic-astrology/panchang/choghadiya",method:"POST"}],Dc=[{endpoint:"astrology/compatibility-score",method:"POST",attrs:{mode:"astrology"}},{endpoint:"numerology/compatibility",method:"POST",attrs:{mode:"numerology"}},{endpoint:"biorhythm/compatibility",method:"POST",attrs:{mode:"biorhythm"}}],Ac=[{endpoint:"numerology/compound-number/{number}",method:"GET"}],Pc=[{endpoint:"crystals/{id}",method:"GET"}],Mc=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}],_c=[{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"}}],Nc=[{endpoint:"vedic-astrology/divisional-chart",method:"POST"},{endpoint:"vedic-astrology/navamsa",method:"POST"}],zc=[{endpoint:"vedic-astrology/dosha/manglik",method:"POST",attrs:{type:"manglik"}},{endpoint:"vedic-astrology/dosha/kalsarpa",method:"POST",attrs:{type:"kalsarpa"}},{endpoint:"vedic-astrology/dosha/sadhesati",method:"POST",attrs:{type:"sadhesati"}}],Oc=[{endpoint:"ayurveda/constitution",method:"POST"}],Gc=[{endpoint:"dreams/symbols/{id}",method:"GET"}],Ic=[{endpoint:"dreams/symbols",method:"GET"}],Fc=[{endpoint:"astrology/planets/monthly",method:"POST"},{endpoint:"vedic-astrology/planetary-positions/monthly",method:"POST"}],Bc=[{endpoint:"astrology/fixed-stars",method:"POST"}],Hc=[{endpoint:"feng-shui/flying-stars/natal",method:"POST",attrs:{mode:"natal"}},{endpoint:"feng-shui/flying-stars/annual/{year}",method:"GET",attrs:{mode:"annual"}}],jc=[{endpoint:"forecast/digest",method:"POST"}],Kc=[{endpoint:"forecast/timeline",method:"POST"},{endpoint:"forecast/significant-dates",method:"POST"},{endpoint:"forecast/transits",method:"POST"}],Vc=[{endpoint:"kabbalah/gematria",method:"POST"}],Uc=[{endpoint:"vedic-astrology/transit",method:"POST"}],qc=[{endpoint:"vedic-astrology/compatibility",method:"POST"}],Yc=[{endpoint:"human-design/connection",method:"POST"}],Wc=[{endpoint:"human-design/penta",method:"POST"}],Zc=[{endpoint:"human-design/type",method:"POST"},{endpoint:"human-design/profile",method:"POST"}],Xc=[{endpoint:"human-design/variables",method:"POST"}],Jc=[{endpoint:"vedic-astrology/heliacal",method:"POST"}],Qc=[{endpoint:"iching/hexagrams/random",method:"GET"},{endpoint:"iching/hexagrams/{number}",method:"GET"},{endpoint:"iching/hexagrams/lookup",method:"GET"},{endpoint:"iching/cast",method:"GET"},{endpoint:"iching/daily",method:"POST"},{endpoint:"iching/daily/cast",method:"POST"}],ed=[{endpoint:"vedic-astrology/panchang/hora",method:"POST"}],td=[{endpoint:"astrology/horoscope/{sign}/daily",method:"GET",attrs:{period:"daily"}},{endpoint:"astrology/horoscope/{sign}/weekly",method:"GET",attrs:{period:"weekly"}},{endpoint:"astrology/horoscope/{sign}/monthly",method:"GET",attrs:{period:"monthly"}},{endpoint:"astrology/horoscope/{sign}/yearly",method:"GET",attrs:{period:"yearly"}}],ad=[{endpoint:"vedic-astrology/kp/chart",method:"POST"}],rd=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}],sd=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}],nd=[{endpoint:"vedic-astrology/kp/ruling-planets",method:"POST"}],id=[{endpoint:"feng-shui/kua",method:"POST",attrs:{mode:"kua"}},{endpoint:"feng-shui/eight-mansions",method:"POST",attrs:{mode:"mansions"}}],od=[{endpoint:"astrology/local-space",method:"POST"}],ld=[{endpoint:"chinese-astrology/bazi/luck-pillars",method:"POST"}],cd=[{endpoint:"mesoamerican-astrology/mayan/tzolkin",method:"POST",attrs:{mode:"day"}},{endpoint:"mesoamerican-astrology/mayan/chart",method:"POST",attrs:{mode:"chart"}}],dd=[{endpoint:"astrology/moon-phase/current",method:"GET",attrs:{mode:"current"}},{endpoint:"astrology/moon-phase/upcoming",method:"GET",attrs:{mode:"upcoming"}},{endpoint:"astrology/moon-phase/calendar/{year}/{month}",method:"GET",attrs:{mode:"calendar"}}],pd=[{endpoint:"vedic-astrology/nakshatras/{id}",method:"GET"}],hd=[{endpoint:"astrology/natal-chart",method:"POST"}],md=[{endpoint:"numerology/life-path",method:"POST",attrs:{type:"life-path"}},{endpoint:"numerology/expression",method:"POST",attrs:{type:"expression"}},{endpoint:"numerology/soul-urge",method:"POST",attrs:{type:"soul-urge"}},{endpoint:"numerology/personality",method:"POST",attrs:{type:"personality"}},{endpoint:"numerology/birth-day",method:"POST",attrs:{type:"birth-day"}},{endpoint:"numerology/maturity",method:"POST",attrs:{type:"maturity"}},{endpoint:"numerology/daily",method:"POST",attrs:{type:"daily"}},{endpoint:"numerology/personal-day",method:"POST",attrs:{type:"personal-day"}},{endpoint:"numerology/personal-month",method:"POST",attrs:{type:"personal-month"}},{endpoint:"numerology/personal-year",method:"POST",attrs:{type:"personal-year"}},{endpoint:"numerology/chart",method:"POST",attrs:{type:"chart"}}],gd=[{endpoint:"vedic-astrology/panchang/detailed",method:"POST",attrs:{detail:"detailed"}},{endpoint:"vedic-astrology/panchang/basic",method:"POST",attrs:{detail:"basic"}}],yd=[{endpoint:"astrology/asteroids",method:"POST"},{endpoint:"astrology/lilith",method:"POST"},{endpoint:"astrology/progressions",method:"POST"},{endpoint:"astrology/solar-arc",method:"POST"},{endpoint:"astrology/arabic-lots",method:"POST"}],ud=[{endpoint:"astrology/profections",method:"POST"}],fd=[{endpoint:"astrology/signs/{id}",method:"GET"},{endpoint:"astrology/planet-meanings/{id}",method:"GET"},{endpoint:"vedic-astrology/rashis/{id}",method:"GET"},{endpoint:"iching/trigrams/{id}",method:"GET"},{endpoint:"human-design/gates/{number}",method:"GET"},{endpoint:"human-design/centers/{id}",method:"GET"},{endpoint:"numerology/meanings/{number}",method:"GET"},{endpoint:"vedic-astrology/avasthas/{id}",method:"GET"}],xd=[{endpoint:"astrology/relocation-chart",method:"POST"}],bd=[{endpoint:"reports/natal",method:"POST",attrs:{report:"natal"}},{endpoint:"reports/synastry",method:"POST",attrs:{report:"synastry"}},{endpoint:"reports/kundli",method:"POST",attrs:{report:"kundli"}},{endpoint:"reports/matchmaking",method:"POST",attrs:{report:"matchmaking"}},{endpoint:"reports/yearly-forecast",method:"POST",attrs:{report:"yearly-forecast"}},{endpoint:"reports/human-design",method:"POST",attrs:{report:"human-design"}},{endpoint:"reports/bazi",method:"POST",attrs:{report:"bazi"}},{endpoint:"reports/numerology",method:"POST",attrs:{report:"numerology"}},{endpoint:"reports/tarot",method:"POST",attrs:{report:"tarot"}}],vd=[{endpoint:"vedic-astrology/shadbala",method:"POST"}],Ld=[{endpoint:"astrology/synastry",method:"POST"}],$d=[{endpoint:"tarot/daily",method:"POST"},{endpoint:"tarot/cards/{id}",method:"GET"}],wd=[{endpoint:"tarot/cards",method:"GET"}],kd=[{endpoint:"tarot/spreads/three-card",method:"POST",attrs:{spread:"three-card"}},{endpoint:"tarot/spreads/celtic-cross",method:"POST",attrs:{spread:"celtic-cross"}},{endpoint:"tarot/spreads/love",method:"POST",attrs:{spread:"love"}},{endpoint:"tarot/spreads/career",method:"POST",attrs:{spread:"career"}},{endpoint:"tarot/spreads/custom",method:"POST",attrs:{spread:"custom"}},{endpoint:"tarot/yes-no",method:"POST",attrs:{spread:"yes-no"}},{endpoint:"tarot/draw",method:"POST",attrs:{spread:"draw"}}],Sd=[{endpoint:"astrology/transit-aspects",method:"POST"}],Rd=[{endpoint:"astrology/transits",method:"POST"}],Cd=[{endpoint:"vedic-astrology/upagraha",method:"POST"}],Td=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}],Ed=[{endpoint:"vedic-astrology/aspects",method:"POST"}],Dd=[{endpoint:"vedic-astrology/daily",method:"POST"}],Ad=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Pd=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Md=[{endpoint:"astrology/natal-chart",method:"POST"}],_d=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}],Nd=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];import{html as ht,nothing as Ya}from"lit";import{property as Ze,state as ca}from"lit/decorators.js";import{ifDefined as tn}from"lit/directives/if-defined.js";var zd=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function An(n){if(n.lang)return n.lang;if(typeof document>"u")return;let a=n.closest?.("[lang]")?.getAttribute("lang");return a||document.documentElement.lang||void 0}function Od(n){return!n||n.toLowerCase().split("-")[0]==="en"}var tg={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Bo(n,a){let e=n.toLowerCase();return a.find(t=>t.toLowerCase()===e)}function ci(n,a=zd){let e=An(n);if(!e)return;let t=Bo(e,a);if(t)return t;let r=e.toLowerCase().split("-"),s=r[0];if(s==="zh"){let i=r.find(o=>o==="hans"||o==="hant")??tg[r[1]??""];return i?Bo(`zh-${i}`,a):void 0}return Bo(s,a)}import{html as lg,LitElement as cg,nothing as dg}from"lit";var Fd="symbols";var ag={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},Ho='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Gd='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Id='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',di={"fraunces-jost":{name:"Fraunces with Jost",sans:Ho,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:Ho,display:Ho},geist:{name:"Geist",sans:Gd,display:Gd},system:{name:"System",sans:Id,display:Id}};function Bd(n){let{sans:a,display:e}=di[n];return Object.keys(ag).filter(t=>`${a} ${e}`.includes(`"${t}"`))}var Hd=["practitioner","eucalyptus","kiln","moonlit","celeste"];var Pn="1.6.2";var rg=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,sg=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function pi(n,a){if(!a)return;let e=new URL(a);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let t=(rg.exec(e.pathname)??sg.exec(e.pathname))?.[1];if(t!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${t}`}var ng="color-mix(in oklab, var(--roxy-accent) 70%, black)",ig="var(--roxy-accent)",og="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",jo=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Ko(n){if(!n||!jo.test(n))return;let a=n.slice(1).toLowerCase();return`#${a.length===3?a.replace(/./g,"$&$&"):a}`}function hi(n){return n!==void 0&&Object.hasOwn(di,n)}function jd(n){return Hd.includes(n)}function Kd(n){let a=[];return n.brandColor&&jo.test(n.brandColor)&&a.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&jo.test(n.brandAccent)&&a.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${ng},${ig})`,`--roxy-ring:${og}`),a.join(";")}function Vd(n,a){if(hi(a))return a;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let r=n.shadowRoot?.firstElementChild,s=r?.localName==="style"?r:null;s?.sheet&&(s.sheet.disabled=true);let i,o,l;try{let c=globalThis.getComputedStyle(n),d=h=>c.getPropertyValue(h).trim();i=d("--roxy-font-sans"),o=d("--roxy-font-display"),l=d("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||o))return hi(l)?l:void 0}function Ud(n){let{sans:a,display:e}=di[n];return`--roxy-font:${n};--roxy-font-sans:${a};--roxy-font-display:${e}`}var qd=pi(Pn,globalThis.document?.currentScript?.src||import.meta.url);function Yd(n,a){if(typeof document>"u"||a===void 0)return;let e=`roxy-ui-font-${n}`;if(document.getElementById(e))return;let t=document.createElement("link");t.id=e,t.rel="stylesheet",t.href=`${a}/styles/fonts/${n}.css`,document.head.append(t)}function Wd(n,a=qd){Bd(n).length>0&&Yd(n,a)}function Zd(n=qd){Yd(Fd,n)}var Xd='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var Jd="roxy-ui-tokens";function Qd(){if(typeof document>"u")return null;let n=document.getElementById(Jd);if(n)return n;let a=document.createElement("style");return a.id=Jd,a.textContent=Xd,document.head.prepend(a),a}function ft(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function M(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function R(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,a=>a.toUpperCase())}function mi(n){return typeof n=="string"&&/^https?:\/\//.test(n)}var ep="__ROXY_UI_I18N__";function Vo(){let n=globalThis,a=n[ep];if(a)return a;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[ep]=e,e}function Uo(n,a){return a?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in a?String(a[t]??""):e):n}function gi(n,a,e){return Uo(qo(n,a)??a,e)}function qo(n,a){if(!n)return;let{catalogs:e}=Vo(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[ft(a)]}function tp(n){if(!n)return;let{fieldLabels:a}=Vo(),e=n.toLowerCase();return a[e]??a[e.split("-")[0]]}function Xs(n,a){return tp(n)?.fields[a]}function ap(n,a,e){return tp(n)?.enums[`${a}.${e}`]}function rp(n){let{listeners:a}=Vo();return a.add(n),()=>{a.delete(n)}}var yi=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){this.unsubscribe=rp(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Va=class extends cg{constructor(){super();this.translator=(e,t)=>this.t(e,t);new yi(this)}connectedCallback(){super.connectedCallback(),Qd()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&Zd()}fontDeclarations(e){let t=Vd(this,e);return t?(Wd(t),Ud(t)):""}renderFontStyle(){let e=this.fontDeclarations();return e?lg`<style>:host{${e}}</style>`:dg}t(e,t){return gi(this.effectiveLang(),e,t)}effectiveLang(){return An(this)}};import{css as yg}from"lit";import{css as pg,html as hg,nothing as mg}from"lit";var sp=pg`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function Fe(n){return n?hg`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:mg}import{css as gg}from"lit";var np=gg`: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 ug=yg`: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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,u=[ug,np,sp];var fg="__cols",xg="__rows";function bg(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function ui(n){if(Array.isArray(n)){let s=false,i=n.map(o=>{let l=ui(o);return l!==o&&(s=true),l});return s?i:n}if(!bg(n))return n;let a=n[fg],e=n[xg];if(Array.isArray(a)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return a.forEach((o,l)=>{i[o]=ui(s[l])}),i});let t=false,r={};for(let[s,i]of Object.entries(n)){let o=ui(i);o!==i&&(t=true),r[s]=o}return t?r:n}function fi(n){return ui(n)}function ip(n,a){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([t,r])=>a[t]===r))??n[0]}var vg="pk_live_YOUR_KEY",op={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 zr(n){if(n)return n===vg?op.sample:n.startsWith("pk_")?void 0:op.secret}function Js(n,a,e={}){e.warn&&console.warn(a.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:a.reason,message:a.message},bubbles:true,composed:true}))}var en="https://roxyapi.com/api/v2";async function lp(n){return(await cp(n)).message}async function cp(n){try{let a=await n.json();if(a?.error){let e=a.code==="validation_error"&&Array.isArray(a.issues)?a.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:a.error,issues:e?.length?e:null,worded:true,...a.code?{code:a.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var bi={fromAttribute:n=>{if(n!=null){try{let a=JSON.parse(n);if(a&&typeof a=="object"&&!Array.isArray(a))return a}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Qs=class extends Error{constructor(e,t=null,r=true,s,i){super(e);this.issues=t;this.worded=r;this.status=s;this.code=i}};function Yo(n){return n.submitUrl?void 0:zr(n.publishableKey)}function Wo(n){return!!(n.submitUrl||n.publishableKey&&!Yo(n))}async function Ua(n,a,e){let t=Yo(n);if(t)throw new Qs(t.message);let r=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Lg(a,n.submitContext),signal:e}):await $g(n,a,e);if(!r.ok){let s=await cp(r);throw new Qs(s.message,s.issues,s.worded,r.status,s.code)}return await r.json()}function Lg(n,a){return JSON.stringify(a?{...n,context:a}:n)}function $g(n,a,e){let t=new URL(`${n.baseUrl??en}${a.path}`,document.baseURI);for(let[s,i]of Object.entries(a.query??{}))i!=null&&t.searchParams.set(s,String(i));let r={Accept:"application/json"};return n.publishableKey&&(r["X-API-Key"]=n.publishableKey),a.body!=null&&(r["Content-Type"]="application/json"),fetch(t,{method:a.method??"GET",headers:r,body:a.body!=null?JSON.stringify(a.body):void 0,signal:e})}var xi=class{constructor(a){this.baseUrl=en;this.worded=true;this.failure={};this.host=a,a.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(a){this.worded=true,this.failure={};let e=Yo(this);if(e){this.host.error=e.message,Js(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let r=await Ua(this,a,t.signal);if(t.signal.aborted)return;this.host.data=r}catch(r){if(t.signal.aborted||r?.name==="AbortError")return;r instanceof Qs&&(this.host.issues=r.issues,this.failure={status:r.status,code:r.code}),this.worded=r instanceof Qs&&r.worded,this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=false)}}};function dp(n,a,e,t=[]){let r={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,d)=>{let h=r[d];return delete r[d],encodeURIComponent(String(h??""))}),i=new Set(t),o={},l={};for(let[c,d]of Object.entries(r))d===void 0||d===""||(a==="GET"||i.has(c)?o[c]=d:l[c]=d);return{path:s,method:a,query:o,body:a==="POST"?l:void 0}}import{css as Sg,html as qa,nothing as Or}from"lit";import{css as wg,html as kg}from"lit";function j(){return kg`<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 z=wg`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 K=Sg`.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 Gr(n){return n?.length?qa`<div class="interp-keywords roxy-chips">${n.map(a=>qa`<span class="roxy-chip">${a}</span>`)}</div>`:Or}function Mn(n,a){if(!n)return Or;let e=(t,r)=>r?qa`<p><strong>${a(t)}</strong> ${r}</p>`:Or;return qa`${n.summary?qa`<p>${n.summary}</p>`:Or} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Gr(n.keywords)}`}function pp(n,a,e){let t=n.filter(r=>!!r.body);return t.length===0?Or:qa`<section class="block" part="section readings"><h3>${e}</h3>${t.map((r,s)=>qa`<details class="interp-card" part="reading" name="${a}" ?open="${s===0}"><summary><span class="interp-lead">${Fe(r.glyph)} ${r.label}</span> ${j()} ${r.aside?qa`<span class="interp-aside"><small>${r.aside}</small></span>`:Or}</summary><div class="interp-body"><p>${r.body}</p>${r.extra??Or}</div></details>`)}</section>`}var hp="roxy-data";function mp(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Rg(n){return`<script type="application/json" class="${hp}">${mp(n)}<\/script>`}function Cg(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var vi=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){if(this.host.data!=null)return;let a=this.read();a!==void 0&&(this.host.data=a,this.host.requestUpdate())}read(){let a=this.findInlineScript();return a?this.parse(a.textContent):void 0}findInlineScript(){for(let a of Array.from(this.host.children))if(Cg(a)&&a.classList.contains(hp))return a;return null}parse(a){if(a?.trim())try{return JSON.parse(a)}catch{return}}};var g=class extends Va{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,r=this.listRows();if(!(!e||!t||!r)){this.moreLoading=true,this.moreError=null;try{let s=await Ua(this.fetcher,{...e,query:{...e.query,offset:r.length}});if(this.lastRequest!==e)return;let i=s[t];this.data={...this.data,...s,[t]:[...r,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let t=this.selfFetch();if(!t)return;let r=e.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(r.values),this.fetchFresh(dp(t.endpoint,t.method,{...r.values,...this.ownRequest()},r.queryKeys??[]))};new vi(this),this.fetcher=new xi(this)}static{this.styles=[u]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=fi(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:ip(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return ht`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:true,composed:true})),customElements.get("roxy-data")?ht`<roxy-data .data="${e}" lang="${tn(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),t=[Kd(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!t)return Ya;let r=(t?`:host{${t}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return ht`<style>${r}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?ht`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,r){return this.hideReadings?Ya:pp(e,t,this.t(r??"Reading"))}renderResult(e){let t=ht`<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()?ht`${t}${this.renderAttribution()}`:t}renderWithForm(e){return ht`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Ya:this.renderErrorBanner(this.error):this.data==null?Ya:this.showAttribution()?ht`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Ya:e.length>=t?Ya:ht`<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?ht`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Ya}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let r=this.effectiveLang();r&&t.setAttribute("lang",r),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:ci(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return ht`<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(Ya):this.renderEmpty()}renderForm(){let e=this.selfFetch();return ht`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${tn(this.specUrl)}" publishable-key="${tn(this.publishableKey)}" location-url="${tn(this.locationUrl)}" submit-label="${tn(this.submitLabel)}" lang="${tn(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 ht`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return ht`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let t=!!this.selfFetch();if(t&&this.issues)return this.renderForm();let r=this.renderErrorBanner(e);return t?ht`${r}${this.renderForm()}`:r}renderErrorBanner(e){return ht`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([Ze({attribute:false})],g.prototype,"data",2),m([Ze({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([Ze({type:String})],g.prototype,"method",2),m([Ze({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([Ze({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([Ze({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([Ze({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([Ze({attribute:"submit-context",converter:bi})],g.prototype,"submitContext",2),m([Ze({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([Ze({type:Boolean})],g.prototype,"remember",2),m([Ze({type:Boolean,attribute:"hide-readings",reflect:true})],g.prototype,"hideReadings",2),m([Ze({type:String,attribute:"hide-sections",reflect:true})],g.prototype,"hideSections",2),m([Ze({type:String,attribute:"brand-color"})],g.prototype,"brandColor",2),m([Ze({type:String,attribute:"brand-accent"})],g.prototype,"brandAccent",2),m([Ze({type:String})],g.prototype,"font",2),m([Ze({type:String})],g.prototype,"hemisphere",2),m([Ze({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([Ze({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([Ze({type:String})],g.prototype,"attribution",2),m([ca()],g.prototype,"loading",2),m([ca()],g.prototype,"error",2),m([ca()],g.prototype,"issues",2),m([ca()],g.prototype,"selfFetched",2),m([ca()],g.prototype,"editing",2),m([ca()],g.prototype,"sticky",2),m([ca()],g.prototype,"openedRow",2),m([ca()],g.prototype,"openedRowId",2),m([ca()],g.prototype,"moreLoading",2),m([ca()],g.prototype,"moreError",2);var x=n=>a=>{customElements.get(n)||customElements.define(n,a)};var Li=/^\d{4}-\d{2}-\d{2}$/,Tg=/^\d{4}-\d{2}$/,up=/^\d{2}:\d{2}(:\d{2})?$/,Eg=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,gp=new Map;function xt(n){if(!n)return["en"];let a=gp.get(n);if(a)return[a,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return gp.set(n,e),[e,"en"]}var yp=new Map;function $i(n){let a=n??"",e=yp.get(a);if(e)return e;let r={hour:new Intl.DateTimeFormat(xt(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return yp.set(a,r),r}function _n(n,a){return n&&a?`${n} - ${a}`:n||a}function Fr(n){let a=up.test(n)?`1970-01-01T${n}`:Li.test(n)?`${n}T00:00:00`:Tg.test(n)?`${n}-01T00:00:00`:Eg.test(n)?n.replace(" ","T"):null;return a?{d:new Date(`${a}Z`),timeZone:"UTC"}:{d:new Date(n)}}function Dt(n,a){if(typeof a!="string"||a.length===0||Li.test(a))return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleTimeString(xt(n),{...$i(n),timeZone:t})}function C(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(xt(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function da(n,a){return a?_n(Dt(n,a.start),Dt(n,a.end)):""}function Lt(n,a,e){return _n(C(n,a),C(n,e))}function Wa(n,a,e){if(typeof a!="string"||a.length===0)return"";if(e==="year")return a.match(/^(\d{4})/)?.[1]??a;let{d:t,timeZone:r}=Fr(a);return Number.isNaN(t.getTime())?a:t.toLocaleString(xt(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?$i(n):{},timeZone:r})}function fp(n,a,e,t){return _n(Wa(n,a,t),Wa(n,e,t))}function Ir(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(xt(n),{month:"short",day:"numeric",timeZone:t})}function xp(n,a,e){let t=Ir(n,a),r=Ir(n,e);return t===r?t:_n(t,r)}function bp(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(xt(n),{weekday:"short",day:"numeric",timeZone:t})}function an(n,a,e){return typeof a!="number"||!Number.isFinite(a)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(a,e-1,1,12)).toLocaleDateString(xt(n),{month:"long",year:"numeric",timeZone:"UTC"})}function wi(n,a){return typeof a!="number"||!Number.isInteger(a)||a<1||a>12?"":new Date(Date.UTC(2e3,a-1,1,12)).toLocaleDateString(xt(n),{month:"long",timeZone:"UTC"})}function _(n,a){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(xt(n),{maximumFractionDigits:0})}function Xe(n,a){let e=a.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(xt(n),{style:"long",type:"conjunction"}).format(e)}function b(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(xt(n),{maximumFractionDigits:e})}function ue(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":(a/100).toLocaleString(xt(n),{style:"percent",maximumFractionDigits:e})}function $t(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Te(n){return M($t(n))}var Dg={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Br(n,a,e){let t=typeof a=="string"?Dg[a]??R(a):"",r=typeof e=="number"?`${b(n,e,2)}\xB0`:"";return t&&r?`${t} (${r})`:t||r}function U(n,a,e,t=false){let r=typeof a=="string"&&Li.test(a)&&typeof e=="string"&&up.test(e)?`${a}T${e}`:a;if(typeof r!="string"||r.length===0)return"";if(Li.test(r))return C(n,r);let{d:s,timeZone:i}=Fr(r);return Number.isNaN(s.getTime())?r:s.toLocaleString(xt(n),{month:"short",day:"numeric",year:"numeric",...$i(n),...t?{second:"2-digit"}:{},timeZone:i})}function rn(n,a,e){return _n(U(n,a),U(n,e))}function vp(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleString(xt(n),{month:"short",day:"numeric",year:"numeric",...$i(n),timeZone:"UTC",timeZoneName:"short"})}function Lp(){try{return new Intl.DateTimeFormat(xt(void 0)).resolvedOptions().timeZone}catch{return}}function Zo(n,a){if(!(typeof a!="string"||!a))return a===n?void 0:a}function Nn(n,a){let e=typeof n=="string"?n:"",t=Zo(e,a);return e?t?`${e} (${t})`:e:t??""}function re(n,a,e){return Xs(n,a)??e??R(a)}function F(n,a,e,t){return ap(n,a,e)??t??R(e)}var ki="Localized";function y(n,a,e){let t=n,r=t?.[`${a}${ki}`];if(typeof r=="string"&&r!=="")return r;if(e!==void 0)return e;let s=t?.[a];return typeof s=="string"?s:""}function Si(n,a){let e=n,t=e?.[a];if(!Array.isArray(t))return[];let r=e?.[`${a}${ki}`],s=Array.isArray(r)?r:[];return t.map((i,o)=>{let l=s[o];return{value:String(i),label:typeof l=="string"&&l!==""?l:String(i)}})}function sn(n){let a;for(let e of Object.keys(n)){if(!e.endsWith(ki))continue;let t=e.slice(0,-ki.length);if(t===""||!(t in n))continue;a??={...n};let r=n[e];r!=null&&r!==""&&(a[t]=r),delete a[e]}return a??n}var pa="http://www.w3.org/2000/svg",Ri=class{constructor(a){this.markup=a}};function Ag(n){return String(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Xo(n){return n==null?"":n instanceof Ri?n.markup:typeof n=="string"||typeof n=="number"?Ag(n):n.map(Xo).join("")}function k(n,...a){let e=n[0]??"";return a.forEach((t,r)=>{e+=e.endsWith("=")?`"${Xo(t)}"`:Xo(t),e+=n[r+1]??""}),new Ri(e)}function ha(n){return(a,e)=>gi(n,a,e)}var Pg=24,nn=29.530588853,Mg=Date.UTC(2e3,0,6,18,14),_g=864e5,Ng=n=>(1-Math.cos(n*Math.PI/180))/2*100,wp=n=>({illumination:Ng(n),waxing:n<180});function zn(n){if(!(typeof n!="number"||!Number.isInteger(n)||n<1||n>30))return wp(12*(n-.5))}function kp(n){let a=Date.parse(`${n}T12:00:00Z`);return!n||Number.isNaN(a)?void 0:((a-Mg)/_g%nn+nn)%nn/nn*360}function el(n){let a=kp(n);return a===void 0?void 0:a<180}function Sp(n){let a=kp(n);return a===void 0?void 0:wp(Math.round(a/90)%4*90)}function zg(n){let a=n;return()=>(a=(a*9301+49297)%233280,a/233280)}function Rp(n,a,e,t,r,s){let o=zg(s),l=Math.cos(r),c=Math.sin(r),d=Array.from({length:14},(v,L)=>{let $=L/14*Math.PI*2,D=.9+o()*.16,V=Math.cos($)*e*D,Ie=Math.sin($)*t*D;return[n+V*l-Ie*c,a+V*c+Ie*l]}),h=v=>d[(v+14)%14],p=v=>v.toFixed(3),f=`M${p(h(0)[0])} ${p(h(0)[1])}`;for(let v=0;v<14;v++){let[L,$,D,V]=[h(v-1),h(v),h(v+1),h(v+2)];f+=`C${p($[0]+(D[0]-L[0])/6)} ${p($[1]+(D[1]-L[1])/6)} ${p(D[0]-(V[0]-$[0])/6)} ${p(D[1]-(V[1]-$[1])/6)} ${p(D[0])} ${p(D[1])}`}return`${f}Z`}var Cp=[[-.36,-.42,.27,.21,.3,11],[-.6,-.02,.2,.42,.15,23],[.04,-.44,.16,.15,0,37],[.26,-.14,.2,.16,-.4,41],[.66,-.34,.1,.08,.2,53],[.52,.12,.11,.17,.1,67],[-.24,.36,.18,.12,-.2,71],[-.52,.34,.08,.08,0,83],[.33,.26,.07,.07,0,97],[-.08,-.12,.12,.08,.5,101]],Jo=Cp.map(([n,a,e,t,r,s])=>Rp(n,a,e,t,r,s)).join(""),Tp=k`<circle class="moon-limb moon-limb-1" r="0.95"></circle><circle class="moon-limb moon-limb-2" r="0.985"></circle>`,Og=Cp.map(([n,a,e,t,r,s])=>Rp(n,a,e*1.22,t*1.22,r,s+3)).join("");function Qo(n,a){let e=Math.abs(1-2*n).toFixed(4),t=n<.5;return a?`M0 -1A1 1 0 0 1 0 1A${e} 1 0 0 ${t?0:1} 0 -1Z`:`M0 -1A1 1 0 0 0 0 1A${e} 1 0 0 ${t?1:0} 0 -1Z`}var $p=.004;function Gg(n,a,e,t){let r=a>$p,s=t&&r&&a<1-$p?[.012,.006].map((i,o)=>k`<path class="moon-soft moon-soft-${o+1}" d=${Qo(Math.min(1,a+i),e)}></path>`):[];return k`<circle class="moon-shade" r="1"></circle>${t?k`<path class="moon-earthshine" d=${Jo} clip-path=${`url(#${n}-disc)`}></path>`:""}${s}${r?k`<path class="moon-lit" d=${Qo(a,e)}></path>`:""}${t&&r?k`<g clip-path=${`url(#${n}-lit)`}><path class="moon-halo" d=${Og}></path><path class="moon-mare" d=${Jo}></path><circle class="moon-crater" cx="-0.16" cy="0.72" r="0.035"></circle>${Tp}</g>`:""}`}function Ig(n,a,e){return a==="solar"?k`<circle class="moon-corona" r="1.1"></circle><circle class="moon-corona moon-corona-outer" r="1.18"></circle><circle class="moon-shade" r="1"></circle>`:k`<circle class="moon-copper" r="1"></circle>${e?k`<path class="moon-copper-mare" d=${Jo} clip-path=${`url(#${n}-disc)`}></path><g class="moon-copper-limb">${Tp}</g>`:""}`}function Fg(n,a){let e=ha(n.lang);if(n.eclipse==="lunar")return e("Lunar eclipse");if(n.eclipse==="solar")return e("Solar eclipse");let t=n.lang,r=ue(t,a,0);return n.waxing?e("{{percent}} illuminated, waxing",{percent:r}):e("{{percent}} illuminated, waning",{percent:r})}function Ep(n){let a=Math.min(1,Math.max(0,n.illumination/100)),e=n.size>=Pg,t=`roxy-moon-${Math.round(a*1e4)}${n.waxing?"x":"n"}${n.eclipse??""}${e?"d":""}`,r=[e?k`<clipPath id=${`${t}-disc`}><circle r="1"></circle></clipPath>`:"",e&&!n.eclipse?k`<clipPath id=${`${t}-lit`}><path d=${Qo(a,n.waxing)}></path></clipPath>`:""],s=n.eclipse?Ig(t,n.eclipse,e):Gg(t,a,n.waxing,e);return k`<svg xmlns=${pa} class="roxy-moon" viewBox="-1.2 -1.2 2.4 2.4" width=${n.size} height=${n.size} role="img" aria-label=${Fg(n,a*100)}><defs>${r}</defs>${n.hemisphere==="south"?k`<g transform="rotate(180)">`:k`<g>`}${s}<circle class=${e?"moon-rim":"moon-rim moon-rim-small"} r="1"></circle></g></svg>`.markup}import{css as Bg,html as Hg}from"lit";import{unsafeHTML as jg}from"lit/directives/unsafe-html.js";import{css as On}from"lit";var Dp=On`:where(.natal-wheel) .wheel-line,:where(.natal-wheel) .tick{fill:none;stroke:var(--roxy-border)}:where(.natal-wheel) .tick-major{stroke:var(--roxy-secondary)}:where(.natal-wheel) .sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}:where(.natal-wheel) .planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}:where(.natal-wheel) .planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}:where(.natal-wheel) .planet-deg .retro{fill:var(--roxy-danger-fg)}:where(.natal-wheel) .planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}:where(.natal-wheel) .house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}:where(.natal-wheel) .cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}:where(.natal-wheel) .angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}:where(.natal-wheel) .angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){:where(.natal-wheel) .sign-glyph,:where(.natal-wheel) .planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}:where(.natal-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}:where(.natal-wheel) .house-num{font-size:calc(var(--roxy-text-base) * .75)}}`,Ap=On`:where(.synastry-wheel) .wheel-line{fill:none;stroke:var(--roxy-border)}:where(.synastry-wheel) .p1{--_person:var(--roxy-accent-ink)}:where(.synastry-wheel) .p2{--_person:var(--roxy-fg)}:where(.synastry-wheel) .sign{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}:where(.synastry-wheel) text.p1,:where(.synastry-wheel) text.p2{fill:var(--_person);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}:where(.synastry-wheel) .person-tag,:where(.synastry-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .625)}:where(.synastry-wheel) .planet-deg{fill:var(--roxy-muted)}:where(.synastry-wheel) .planet-deg .retro{fill:var(--roxy-danger-fg)}:where(.synastry-wheel) .leader{stroke:var(--_person);stroke-width:.5px;opacity:.7}@container (width<=480px){:where(.synastry-wheel) .sign,:where(.synastry-wheel) text.p1,:where(.synastry-wheel) text.p2{font-size:calc(var(--roxy-text-base) * 1.75)}:where(.synastry-wheel) .person-tag,:where(.synastry-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .9375)}}:where(.synastry-wheel) .asc-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}:where(.synastry-wheel) .asc-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}`,Ci=On`:where(.kundli) .line{fill:#0000;stroke:var(--roxy-border)}:where(.kundli) .sign-text{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans);text-transform:uppercase}:where(.kundli) .rashi-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans)}:where(.kundli) .house-num{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .planet-text{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .centre-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .lagna-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans);text-transform:uppercase}:where(.kundli) .lagna-bg{fill:color-mix(in srgb, var(--roxy-accent) 14%, transparent)}:where(.kundli) .lagna-slash{stroke:var(--roxy-accent);stroke-linecap:round;opacity:.7}`,Ti=On`:where(.bodygraph) .bg-body{fill:color-mix(in srgb, var(--roxy-secondary) 8%, transparent);stroke:var(--roxy-border);stroke-width:1px}:where(.bodygraph) .bg-channel{stroke:var(--roxy-border);stroke-width:5px;stroke-linecap:round}:where(.bodygraph) .bg-half{stroke-width:5px;stroke-linecap:round}:where(.bodygraph) .bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}:where(.bodygraph) .bg-center{fill:var(--_mask,var(--roxy-bg));stroke:var(--roxy-secondary);stroke-width:1.8px}:where(.bodygraph) .bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}:where(.bodygraph){--_gold:color-mix(in oklch, var(--roxy-warning) 60%, var(--roxy-success));--_gold-ink:color-mix(in oklch, var(--roxy-warning-fg) 60%, var(--roxy-success-fg));--_center-gold:light-dark(color-mix(in oklab, var(--_gold) 40%, var(--roxy-bg)),color-mix(in oklab, var(--_gold) 50%, var(--_gold-ink)));--_center-green:light-dark(color-mix(in oklab, var(--roxy-success) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-success-fg)));--_center-red:light-dark(color-mix(in oklab, var(--roxy-danger) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-danger-fg)));--_center-brown:light-dark(color-mix(in oklab, color-mix(in oklab, var(--roxy-warning-fg) 75%, var(--roxy-fg)) 45%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-warning-fg) 50%, var(--roxy-secondary)))}:where(.bodygraph) .bg-center.bg-gold.defined,:where(.bodygraph) .legend .swatch.bg-gold{fill:var(--_center-gold);background:var(--_center-gold)}:where(.bodygraph) .bg-center.bg-green.defined,:where(.bodygraph) .legend .swatch.bg-green{fill:var(--_center-green);background:var(--_center-green)}:where(.bodygraph) .bg-center.bg-red.defined,:where(.bodygraph) .legend .swatch.bg-red{fill:var(--_center-red);background:var(--_center-red)}:where(.bodygraph) .bg-center.bg-brown.defined,:where(.bodygraph) .legend .swatch.bg-brown{fill:var(--_center-brown);background:var(--_center-brown)}:where(.bodygraph) .bg-gate-dot{fill:var(--_mask,var(--roxy-bg));stroke:var(--roxy-border);stroke-width:1px}:where(.bodygraph) .bg-gate-dot.on{stroke:var(--_mask,var(--roxy-bg))}:where(.bodygraph) .bg-center-name{color:var(--roxy-muted);fill:currentColor;font-weight:var(--roxy-weight-bold);text-transform:uppercase;pointer-events:none}:where(.bodygraph) .bg-center-name.defined{color:light-dark(var(--roxy-fg),var(--roxy-bg))}:where(.bodygraph) .bg-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .50625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.bodygraph) .bg-gate.on{fill:var(--src-ink,var(--_mask,var(--roxy-bg)))}:where(.bodygraph) .bg-half.src-left{stroke:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .bg-half.src-right{stroke:var(--src-right,var(--roxy-fg))}:where(.bodygraph) .bg-gate-dot.on.src-left{fill:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .bg-gate-dot.on.src-right{fill:var(--src-right,var(--roxy-fg))}:where(.bodygraph) .legend .swatch.src-left{background:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .legend .swatch.src-right{background:var(--src-right,var(--roxy-fg))}`,Pp=On`:where(.roxy-moon) .moon-shade{fill:var(--roxy-moon-shade)}:where(.roxy-moon) .moon-earthshine{fill:var(--roxy-moon-lit);opacity:.05}:where(.roxy-moon) .moon-soft{fill:var(--roxy-moon-lit)}:where(.roxy-moon) .moon-soft-1{opacity:.18}:where(.roxy-moon) .moon-soft-2{opacity:.34}:where(.roxy-moon) .moon-lit{fill:var(--roxy-moon-lit)}:where(.roxy-moon) .moon-limb{fill:none;stroke:var(--roxy-moon-mare)}:where(.roxy-moon) .moon-limb-1{stroke-width:.1px;opacity:.18}:where(.roxy-moon) .moon-limb-2{stroke-width:.03px;opacity:.3}:where(.roxy-moon) .moon-halo{fill:var(--roxy-moon-mare);opacity:.22}:where(.roxy-moon) .moon-mare{fill:var(--roxy-moon-mare);opacity:.38}:where(.roxy-moon) .moon-crater{fill:none;stroke:var(--roxy-moon-mare);stroke-width:.012px}:where(.roxy-moon) .moon-copper{fill:var(--roxy-moon-eclipse)}:where(.roxy-moon) .moon-copper-limb .moon-limb{stroke:var(--roxy-moon-shade)}:where(.roxy-moon) .moon-copper-mare{fill:var(--roxy-moon-shade);opacity:.3}:where(.roxy-moon) .moon-corona{fill:none;stroke:var(--roxy-moon-corona);stroke-width:.05px}:where(.roxy-moon) .moon-corona-outer{stroke-width:.02px;opacity:.45}:where(.roxy-moon) .moon-rim{fill:none;stroke:var(--roxy-moon-rim);stroke-width:.012px}:where(.roxy-moon) .moon-rim-small{stroke-width:.04px}`;var Za=[Pp,Bg`.moon-mark{vertical-align:middle;flex-shrink:0;display:inline-flex}`];function Wt(n,a,e,t){return Hg`<span class="moon-mark">${jg(Ep({...a,size:e,eclipse:t,hemisphere:n.hemisphere,lang:An(n)}))}</span>`}var Ug=28,qg=20;function Mp(n){return!("days"in n)}var Xa=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&Mp(e)?oe`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:Mp(e)?we:oe`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?oe`<span class="lunar">${Lt(t,e.startDate,e.endDate)}</span>`:we} ${"year"in e&&typeof e.year=="number"?oe`<span class="lunar">${an(t,e.year,e.month)||e.year}</span>`:we} ${typeof e.total=="number"?oe`<span class="lunar">${this.t("{{count}} days",{count:_(t,e.total)})}</span>`:we}</header>${"avoidAnimal"in e&&e.avoidAnimal?oe`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Avoiding")}</span><b>${R(y(e,"avoidAnimal"))}</b></span></div>`:we} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(r=>this.renderDayRow(r,t))}</ul></section></article>`}renderDayCard(e,t){let r=e.dayOfficer,s=zn(e.lunar?.day);return oe`<header class="head" part="header"><h2 class="title" id="almanac-title">${C(t,e.date)}</h2>${e.lunar?oe`<span class="lunar">${s?Wt(this,s,Ug):we}${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:we} ${r?.name?oe`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${y(r,"name")} <span lang="zh">${r.chinese??""}</span></span>`:we}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${r?.meaning&&!this.hideReadings?oe`<p class="meaning" part="reading">${r.meaning}</p>`:we} ${this.renderMansion(e)}`}renderPillars(e){let r=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return r.length===0&&!e.clashAnimal?we:oe`<div class="facts" part="details">${r.map(([s,i])=>oe`<span><span class="roxy-label">${this.t(s)}</span> <b lang="zh">${i?.chinese??""}</b> ${i?.naYin??""}</span>`)} ${e.clashAnimal?oe`<span><span class="roxy-label">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:we}</div>`}renderLists(e,t){let r=e.favours??[],s=e.avoids??[];return r.length===0&&s.length===0?we:oe`<div class="lists" part="section activities">${r.length?oe`<div class="list"><h3>${this.t("Favours")}</h3><div class="roxy-chips chips-favour">${r.map(i=>oe`<span class="roxy-chip">${F(t,"activity",i)}</span>`)}</div></div>`:we} ${s.length?oe`<div class="list"><h3>${this.t("Avoids")}</h3><div class="roxy-chips chips-avoid">${s.map(i=>oe`<span class="roxy-chip">${F(t,"activity",i)}</span>`)}</div></div>`:we}</div>`}renderMansion(e){let t=e.mansion;return t?.name?oe`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Mansion")}</span><b>${y(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?oe`<span>${R(t.palace)}</span>`:we} ${t.planet?oe`<span>${t.planet}</span>`:we} ${t.animal?oe`<span>${y(t,"animal")}</span>`:we}</div>`:we}renderSolarTerms(e,t){let r="solarTerms"in e?e.solarTerms??[]:[];return r.length===0?we:oe`<div class="terms" part="details">${r.map(s=>oe`<span>${Ir(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let r=e.dayOfficer,s=e.favours??[],i=zn(e.lunar?.day);return oe`<li class="day" part="label-track"><span class="day-date">${Ir(t,e.date)}</span><div class="day-body">${i?Wt(this,i,qg):we} <span lang="zh">${e.dayPillar?.chinese??""}</span> ${r?.name?oe`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${y(r,"name")}</span>`:we} ${s.length?oe`<span class="roxy-chips chips-favour">${s.map(o=>oe`<span class="roxy-chip">${F(t,"activity",o)}</span>`)}</span>`:we} ${e.clashAnimal?oe`<span class="roxy-label">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:we}</div></li>`}};Xa.endpoints=uc,Xa.styles=[u,Za,Kg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.list h3{margin:0}.list h3{margin-block-end:var(--roxy-space-xs)}.lunar{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.lunar .moon-mark{margin-inline-end:var(--roxy-space-xs)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}:is(.tag-auspicious,.chips-favour>*){color:var(--roxy-success-fg)}:is(.tag-inauspicious,.chips-avoid>*){color:var(--roxy-danger-fg)}.tag-neutral{color:var(--roxy-info-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin:0;padding-block-start:var(--roxy-space-md)}.days{margin:0;padding:0;list-style:none;display:grid}.day{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);display:grid}.day:first-child{border-block-start:0;padding-block-start:0}.day-date{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.day-body{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.terms{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}`],m([Vg({type:String,reflect:true})],Xa.prototype,"mode",2),Xa=m([x("roxy-almanac-day")],Xa);import{css as Wg,html as Ft,nothing as ma}from"lit";var Yg=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Ei(n,a,e,t){let r=[];if(a)for(let s of Yg){let i=a[s.key];i&&r.push({label:n(s.source),body:i})}return e&&r.push({label:n("Biblical"),body:e}),t&&r.push({label:n("Shadow"),body:t}),r}var Zg={positive:"success",cautionary:"danger",neutral:"info"},Hr=class extends g{renderData(a){let e=(a.energy??"").toLowerCase(),t=a.keywords??[],r=a.actionSteps??[];return Ft`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${a.number??""}`}"><div class="hero" part="header">${a.number?Ft`<div class="numeral">${a.number}</div>`:ma}<div><p class="roxy-label">${this.t("Angel number")}</p>${a.title?Ft`<h2>${a.title}</h2>`:ma}</div></div>${a.coreMessage&&!this.hideReadings?Ft`<p>${a.coreMessage}</p>`:ma}<ul class="badges roxy-chips" part="details">${a.type?Ft`<li>${a.type}</li>`:ma} ${typeof a.digitRoot=="number"?Ft`<li>${this.t("Digit root")} ${a.digitRoot}</li>`:ma} ${a.energy?Ft`<li class="roxy-chip" data-tone="${Zg[e]??ma}">${a.energy}</li>`:ma}</ul>${t.length>0&&!this.hideReadings?Ft`<ul class="roxy-chips">${t.map(s=>Ft`<li>${s}</li>`)}</ul>`:ma} ${this.renderSections(a)} ${a.affirmation&&!this.hideReadings?Ft`<p class="affirmation">${a.affirmation}</p>`:ma} ${r.length>0&&!this.hideReadings?Ft`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${r.map(s=>Ft`<li>${s}</li>`)}</ul></div>`:ma}</article>`}renderSections(a){return this.renderInterpretation(Ei(this.translator,a.meaning,a.biblical,a.shadow),"angel-meaning","Reading")}};Hr.endpoints=fc,Hr.styles=[u,K,Wg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);font-style:italic}.steps h3{margin-block-end:var(--roxy-space-xs)}.steps ul{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}`],Hr=m([x("roxy-angel-number-card")],Hr);import{css as Xg,html as fe,nothing as Ee}from"lit";var Jg={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},Qg={positive:"success",cautionary:"warning"},jr=class extends g{renderData(a){let e=a.knownMeaning,t=a.digitRootMeaning,r=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return fe`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:a.number??""})}"><div class="hero" part="header">${a.number?fe`<div class="numeral">${a.number}</div>`:Ee}<div>${e?.title?fe`<p class="roxy-label">${this.t("Number analysis")}</p>`:Ee}<h2>${r}</h2></div></div><ul class="badges roxy-chips" part="details">${a.type?fe`<li>${a.type}</li>`:Ee} ${typeof a.digits=="number"?fe`<li>${this.t("{{count}} digits",{count:a.digits})}</li>`:Ee} ${typeof a.uniqueDigits=="number"?fe`<li>${this.t("{{count}} unique",{count:a.uniqueDigits})}</li>`:Ee} ${typeof a.digitRoot=="number"?fe`<li>${this.t("Digit root {{n}}",{n:a.digitRoot})}</li>`:Ee} ${a.isPalindrome?fe`<li class="roxy-chip" data-tone="info">${this.t("Palindrome")}</li>`:Ee} ${a.isRepeating?fe`<li class="roxy-chip" data-tone="info">${this.t("Repeating")}</li>`:Ee} ${e?.energy?fe`<li class="roxy-chip" data-tone="${Qg[e.energy]??Ee}">${this.t(Jg[e.energy]??"Neutral energy")}</li>`:Ee}</ul>${a.contextNote?fe`<div class="context" part="section context"><p class="roxy-label">${this.t("Where you saw it")}</p><p>${a.contextNote}</p></div>`:Ee} ${e&&!this.hideReadings?fe`<div class="section" part="section known-meaning"><p class="roxy-label">${this.t("Known angel number")}</p>${e.coreMessage?fe`<p>${e.coreMessage}</p>`:Ee} ${e.keywords&&e.keywords.length>0?fe`<ul class="roxy-chips">${e.keywords.map(i=>fe`<li>${i}</li>`)}</ul>`:Ee} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?fe`<p><em>${e.affirmation}</em></p>`:Ee} ${s.length>0?fe`<p class="roxy-label">${this.t("What to do next")}</p><ol class="steps">${s.map(i=>fe`<li>${i}</li>`)}</ol>`:Ee}</div>`:Ee} ${t&&!this.hideReadings?fe`<div class="section" part="section digit-root"><p class="roxy-label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?fe`<h3>${t.title}</h3>`:Ee} ${t.coreMessage?fe`<p>${t.coreMessage}</p>`:Ee} ${e?Ee:this.renderRootMeaning(t)}</div>`:Ee}</article>`}renderMeaning(a,e,t,r){return this.renderInterpretation(Ei(this.translator,a,t,r),e,"Reading")}renderRootMeaning(a){return fe`${a.keywords&&a.keywords.length>0?fe`<ul class="roxy-chips">${a.keywords.map(e=>fe`<li>${e}</li>`)}</ul>`:Ee}${this.renderMeaning(a.meaning,"lookup-root")}${a.affirmation?fe`<p><em>${a.affirmation}</em></p>`:Ee}`}};jr.endpoints=xc,jr.styles=[u,z,K,Xg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.context{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.steps{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.section{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.section p{font-size:var(--roxy-text-sm)}`],jr=m([x("roxy-angel-number-lookup")],jr);import{css as gy,html as er,nothing as In}from"lit";var ey=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),ty=n=>n.replace(ey,"$&\uFE0E"),Di=n=>Object.fromEntries(Object.entries(n).map(([a,e])=>[a,ty(e)])),on=(n,a)=>a?n[ft(a)]:void 0,ay=Di({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),w=n=>on(ay,n),ry={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},_p=n=>on(ry,n),sy=Di({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"}),N=n=>on(sy,n),ny={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},Ai=n=>on(ny,n),ke=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],iy=Di({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"}),ln=n=>on(iy,n),oy=Di({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"}),Ja=n=>on(oy,n),ly=19904,cy=64,Np=n=>typeof n=="number"&&Number.isInteger(n)&&n>=1&&n<=cy?String.fromCodePoint(ly+n-1):void 0,De="\u211E",zp="\u27F7",Op="\u2605";import{css as dy}from"lit";var se=dy`.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}`;import{css as py,html as Gn,nothing as Pi}from"lit";var I=py`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function Q(n,a,e){if(!a?.ayanamsa)return Pi;let t=Br(n,a.ayanamsa);if(!t)return Pi;let r=typeof a.ayanamsaDegrees=="number"?b(n,a.ayanamsaDegrees,4):void 0;return Gn`<p class="roxy-frame">${r===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:t,degrees:r})}</p>`}function Qa(n,a,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?Pi:Gn`<p class="roxy-frame">${t.map(([r,s,i],o)=>Gn`${o>0?" \xB7 ":""}${a(r)}: <span class="roxy-frame-deg" title="${i}">${F(e,s,i)}</span>`)}</p>`}function Gp(n,a,e){let t=Object.values(a??{}).filter(r=>!!r?.ayanamsa);return t.length===0?Pi:Gn`<div class="roxy-frame">${t.map(r=>{let s=Br(n,r.ayanamsa),i=typeof r.ayanamsaDegrees=="number"?b(n,r.ayanamsaDegrees,4):void 0,o=r.governs?.length?r.governs.join(", "):"";return Gn`<p class="roxy-frame">${i===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:s,degrees:i})}${o?e(", governs {{sections}}",{sections:o}):""}</p>`})}</div>`}import{css as my}from"lit";import{css as hy}from"lit";var ga=hy`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border);padding-block:var(--roxy-space-sm)}table.stacked tr:last-child{border-bottom:0}table.stacked td{padding:calc(var(--roxy-space-unit) / 2) 0;white-space:normal;border:0}table.stacked td:empty{display:none}table.stacked td[data-inline]{width:auto;margin-inline-end:var(--roxy-space-md);display:inline-block}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted)}}`;var Mi=[ga,my`.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lead-row td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.name{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.lead-row :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.meaning{min-width:24ch}.meaning strong{display:block}.meaning p{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}@container (width<=30rem){table.stacked tr{padding-inline:var(--roxy-space-md)}table.stacked tbody tr.lead-row{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}table.stacked tbody tr.lead-row td:first-child{box-shadow:none}}`];var yy=new Set(["a1","a12"]),Kr=class extends g{renderData(a){let e=a.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(r=>r.exceptionApplied).length;return er`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2>${this.t("Arudha padas")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Lagna")}</dt><dd>${a.lagnaRashi??""}</dd></div><div><dt>${this.t("Arudha Lagna")}</dt><dd>${a.arudhaLagna??""}</dd></div><div><dt>${this.t("Upapada")}</dt><dd>${a.upapada??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Arudha padas")}"><table class="stacked" role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(r=>this.renderRow(r))}</tbody></table></div>${t>0?er`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:In}</div>`}renderRow(a){let e=r=>N(r)??"",t=r=>{let s=e(r);return er`${s?er`<span class="glyph roxy-glyph">${s}</span>`:In}${r??""}`};return er`<tr class="${yy.has(a.id)?"lead-row":""}"><td class="name">${a.name??""}${a.abbreviation?er`<span class="abbr">${a.abbreviation}</span>`:In}</td><td data-inline data-label="${this.t("Bhava")}">${a.house??""}</td><td data-inline data-label="${this.t("Bhava rashi")}">${t(a.bhavaRashi)}</td><td data-inline data-label="${this.t("Lord")}">${a.lord??""}</td><td data-inline data-label="${this.t("Lord rashi")}">${t(a.lordRashi)}</td><td data-inline data-label="${this.t("Pada rashi")}">${t(a.rashi)} ${a.exceptionApplied?er`<span class="exception">${this.t("Moved")}</span>`:In}</td><td data-inline data-label="${this.t("From Lagna")}">${a.houseFromLagna??""}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?er`<p>${a.significations}</p>`:In}</td></tr>`}};Kr.endpoints=bc,Kr.styles=[u,I,se,...Mi,gy`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.exception{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.note{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Kr=m([x("roxy-arudha-padas")],Kr);import{css as fy,html as ze,nothing as Fp}from"lit";import{state as xy}from"lit/decorators.js";import{css as uy,html as tl,nothing as Ip}from"lit";var et=uy`.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 mt(n){let{items:a,active:e,onSelect:t,label:r,idPrefix:s,controls:i=false}=n;return tl`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${r}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=a.findIndex(f=>f.id===e);if(c===-1)return;let d=l.key==="ArrowRight"?1:-1,h=a[(c+d+a.length)%a.length];if(!h)return;t(h.id);let p=l.currentTarget.getRootNode();requestAnimationFrame(()=>{p.querySelector(`#${s}-tab-${h.id}`)?.focus()})}}">${a.map(l=>tl`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${i?`${s}-panel-${l.id}`:Ip}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${i?a.filter(l=>l.id!==e).map(l=>tl`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Ip}`}var by=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],tr=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return ze`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?ze`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Fp} ${Q(this.effectiveLang(),e.frame,this.translator)}</div>${mt({items:by.map(({id:r,source:s})=>({id:r,label:this.t(s)})),active:this.activeTab,onSelect:r=>{this.activeTab=r},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:true})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return ze`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>ze`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Sarvashtakavarga")}"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=t.bindus[s]??0;return ze`<tr><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${N(r)??""}</span> ${r}</div></td><td class="${`bindu-cell ${this.sarvaTier(i)}`}">${i}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:ze`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?ze`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.","Bhinnashtakavarga")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:ze`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,r=this.data?.reducedSarvashtakavarga;return!t?.length&&!r?ze`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:ze`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.","Reduced",r)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,r,s,i){return t.length?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t(s)}"><table class="bhinna-table"><caption class="roxy-sr-only">${r}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>ze`<th scope="col" class="roxy-glyph" title="${o}">${N(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>ze`<tr><td>${o.planet}</td>${o.bindus.map(l=>ze`<td class="${`bindu-cell ${this.bhinnaTier(l)}`}">${l}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${i?ze`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,l)=>ze`<td>${i.bindus[l]??0}</td>`)}<td>${i.total}</td></tr></tfoot>`:Fp}</table></div>`:ze`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Shodhya Pinda")}"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>ze`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:ze`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};tr.endpoints=vc,tr.styles=[u,I,et,fy`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){text-align:center}:is(th,td):first-child{text-align:start}.glyph{font-size:var(--roxy-text-base);line-height:1}.planet-cell{align-items:center;gap:var(--roxy-space-xs);white-space:nowrap;display:flex}.total-row td{font-weight:var(--roxy-weight-bold);border-block-start:var(--roxy-line-thick) solid var(--roxy-border);border-block-end:0}.bindu-cell{min-width:3ch;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;color:var(--roxy-fg)}.tier-1{background:color-mix(in srgb, var(--roxy-heat) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-scale{gap:1px;display:flex}.legend-swatch{block-size:.75lh;inline-size:2ch}.legend-note{flex:24ch}.bhinna-table :is(th,td):first-child{min-width:8ch}@container (width<=480px){.bhinna-table :is(th,td){padding:var(--roxy-space-xs);font-size:var(--roxy-text-xs)}.bhinna-table :is(th,td):first-child{min-width:6ch}.bindu-cell{min-width:2ch}}`],m([xy()],tr.prototype,"activeTab",2),tr=m([x("roxy-ashtakavarga-grid")],tr);import{css as wy,html as de,nothing as Oe}from"lit";var vy=new Set(["conjunction","sextile","square","trine","opposition"]);function Da(n){return vy.has($t(n))}function Be(n){return`aspect-${$t(n)}`}var Bp=.3,Ly=.9,Hp=.5,$y=1.8;function cn(n){let{strength:a}=n;if(typeof a!="number"||!Number.isFinite(a))return;let e=Math.min(1,Math.max(0,a/100)),t=Bp+e*(Ly-Bp),r=Hp+e*($y-Hp);return`opacity:${t.toFixed(3)};stroke-width:${r.toFixed(3)}`}import{css as jp}from"lit";var Aa=jp`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,dn=[jp`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,Aa];function ky(n,a,e){if(n.include?.length){let t={bodies:Xe(a,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var Kp={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Vr=class extends g{renderData(a){let e="aspects"in a?a.aspects??[]:[],t="patterns"in a?a.patterns??[]:[],r="summary"in a?a.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=U(this.effectiveLang(),"transitDate"in a?a.transitDate:"date"in a?a.date:"","time"in a?a.time:void 0,true),i="timezone"in a?a.timezone:void 0,o="options"in a?a.options:void 0;return de`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?de`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" \xB7 ")}</p>`:Oe} ${typeof i=="number"&&Number.isFinite(i)?de`<dl class="roxy-facts" part="details"><div><dt>${re(this.effectiveLang(),"timezone")}</dt><dd>${b(this.effectiveLang(),i,5)}</dd></div></dl>`:Oe}</div>${r?this.renderSummary(r):Oe} ${r&&"strongest"in r&&r.strongest?this.renderStrongest(r.strongest):Oe} ${e.length>0?de`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>de`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:Oe} ${t.length>0?de`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...t].sort((l,c)=>(Kp[l.kind]??9)-(Kp[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</section>`:Oe} ${o?de`<p class="provenance">${ky(o,this.effectiveLang(),this.translator)}</p>`:Oe}</div>`}renderSummary(a){let e="totalAspects"in a?a.totalAspects:a.total,t=Object.entries(a.byType??{}).sort((r,s)=>s[1]-r[1]);return de`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?de`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e})}</span>`:Oe} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:a.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:a.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:a.neutral})}</span> ${t.map(([r,s])=>de`<span>${this.t("{{label}}: {{value}}",{label:Te({type:r}),value:s})}</span>`)}</p>`}renderStrongest(a){let e=w(a.planet1)??"",t=w(a.planet2)??"";return de`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph roxy-glyph">${e}</span>${y(a,"planet1")} <span class="asp-name ${Be(a)}">${y(a,"type",Te(a))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${t}</span>${y(a,"planet2")} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:a.isApplying?this.t("Applying"):this.t("Separating"),orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span></div>`}renderAspect(a,e){let t=w(a.planet1)??"",r=w(a.planet2)??"",s=Te(a),i=a.isApplying?this.t("Applying"):this.t("Separating"),o="meaning"in a?a.meaning:void 0,l="transitInterpretation"in a?a.transitInterpretation:void 0,c="aspectInterpretation"in a?a.aspectInterpretation:void 0,d=!!(o||l||c),h=de`<span aria-hidden="true" class="glyph roxy-glyph">${t}</span>${y(a,"planet1")} <span class="asp-name ${Be(a)}">${y(a,"type",s)}</span> <span aria-hidden="true" class="glyph roxy-glyph">${r}</span>${y(a,"planet2")} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:i,orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span>`;return!d||this.hideReadings?de`<div class="interp-card" part="reading"><div class="static-head">${h}</div></div>`:de`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${h}${j()}</summary><div class="interp-body" part="readings">${o?this.renderMeaning(o):Oe} ${l?this.renderTransit(l):Oe} ${c?Mn(c,this.translator):Oe}</div></details>`}renderMeaning(a){return de`${a.description?.short?de`<p>${a.description.short}</p>`:Oe} ${a.description?.long&&a.description.long!==a.description.short?de`<p>${a.description.long}</p>`:Oe} ${Gr(a.keywords)}`}renderTransit(a){return Mn(a,this.translator)}renderPattern(a){let e=a.planets??[],t=a.apex?[...e].sort((r,s)=>+(s===a.apex)-+(r===a.apex)):e;return de`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${a.name??a.kind??this.t("Pattern")}</span> ${a.element?de`<span class="roxy-chip">${a.element}</span>`:Oe} ${a.modality?de`<span class="roxy-chip">${a.modality}</span>`:Oe} ${a.dissociate?de`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:Oe} ${typeof a.tightness=="number"?de`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:ue(this.effectiveLang(),a.tightness,0)})}</span>`:Oe}</div>${t.length?de`<ul class="roxy-chips">${t.map(r=>{let s=w(r),i=!!a.apex&&r===a.apex;return de`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?de`<span class="roxy-glyph" aria-hidden="true">${s}</span>`:Oe}${r}${i?de`<span>${this.t("apex")}</span>`:Oe}</li>`})}</ul>`:Oe} ${a.interpretation&&!this.hideReadings?de`<p class="pattern-interp">${a.interpretation}</p>`:Oe}</div>`}};Vr.endpoints=Lc,Vr.styles=[u,se,z,K,Aa,wy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Vr=m([x("roxy-aspects-table")],Vr);import{css as Ey,html as Ma,nothing as pn,svg as Xt}from"lit";import{css as Sy,html as Vp,nothing as Ry}from"lit";var Ae=class{constructor(a){this.host=a;this.state="closed";this.zoom=1;this.pressedBy="";this.press=a2=>{this.pressedBy=a2.pointerType};this.openOnMouse=a2=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(a2.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};a.addController(this)}hostUpdated(){let a=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!a)this.reset();else if(a.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",a.open||a.showModal());let e=a.querySelector(".roxy-chart-scroll");a.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(a){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=a===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=a===0?1:Math.min(3,Math.max(1,this.zoom+a)),this.host.requestUpdate()}renderChartViewport(a,e,t){return Vp`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${a}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?Vp`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${a}</div></div>`:Ry}</dialog></div>`}},He=Sy`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function At(n){let a=n%360;return a<0?a+360:a}function Bt(n){let a=At(n),e=Math.floor(a/30)%12,t=a%30,r=Math.floor(t),s=(t-r)*60,i=Math.floor(s),o=Math.round((s-i)*60);return{sign:ke[e]??"Aries",signIndex:e,degree:r,minute:i,second:o}}function tt(n,a){let{sign:e,degree:t,minute:r}=Bt(n);return`${t}\xB0 ${a||e} ${String(r).padStart(2,"0")}'`}function Ht(n){return Zt(At(n)%30)}function al(n){let a=Math.floor(n);return{degree:a,minute:Math.floor((n-a)*60)}}function Zt(n){let{degree:a,minute:e}=al(n);return`${a}\xB0${String(e).padStart(2,"0")}'`}function Fn(n){return At(n+180)}function _i(n,a){let e=At(n),t=At(a)-e;return t<0&&(t+=360),At(e+t/2)}function jt(n,a,e){let t=n.filter(c=>Number.isFinite(a(c))).map(c=>{let d=At(a(c));return{item:c,longitude:d,displayLongitude:d}}).sort((c,d)=>c.longitude-d.longitude),r=t.length;if(r<2)return t;let s=0,i=-1;for(let c=0;c<r;c++){let d=t[(c+r-1)%r],p=(t[c].longitude-d.longitude+360)%360;p>i&&(i=p,s=c)}let o=t[s],l=o.longitude;for(let c=1;c<r;c++){let d=t[(s+c)%r],h=typeof e=="function"?e(o.item,d.item):e,p=d.longitude+(s+c>=r?360:0);l=Math.max(p,l+h),d.displayLongitude=At(l),o=d}return t}var ya=2;function Up(n,a){let e=n*Math.PI/180;return a.width/2*Math.abs(Math.cos(e))+a.height/2*Math.abs(Math.sin(e))}function Pa(n,a,e,t){let r=n*Math.PI/180,s=(i,o)=>o>1e-9?(i+t)/o:Number.POSITIVE_INFINITY;return Math.min(s((a.width+e.width)/2,Math.abs(Math.cos(r))),s((a.height+e.height)/2,Math.abs(Math.sin(r))))}var Cy=(n,a)=>Math.abs(n.x-a.x)<(n.width+a.width)/2&&Math.abs(n.y-a.y)<(n.height+a.height)/2;function qp(n,a){let e=[],t=r=>e.reduce((s,i)=>Cy(r,i)?Math.max(s,Math.min((r.width+i.width)/2-Math.abs(r.x-i.x),(r.height+i.height)/2-Math.abs(r.y-i.y))):s,0);return[...n].map((r,s)=>({point:r,index:s})).sort((r,s)=>r.point.displayLongitude-s.point.displayLongitude).reduce((r,{point:s,index:i})=>{let o=a(s,0),l=a(s,1),c=t(o)===0||t(o)<=t(l)?0:1;return e.push(c===0?o:l),r[i]=c,r},[])}var Pt={minute:3.4,whole:1.85,retrograde:1.25,ink:.9};function Mt(n,a){return a>0?n/a*(180/Math.PI):0}function E(n,a,e,t){let r=t*Math.PI/180;return{x:n+e*Math.cos(r),y:a+e*Math.sin(r)}}var Ty={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Yp=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Ur(n,a=0){return Ty[M(n)]??Yp[a%Yp.length]??"var(--roxy-accent)"}var Wp="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var Ni=360,hn=180,mn=n=>n+180,gn=n=>90-n,Dy=9,Zp=23.44,Xp=66.56,Jp=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"E":"W"}`,Qp=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"N":"S"}`;function Ay(n){let a=[],e=[],t=null;for(let r of n)t!==null&&Math.abs(r.longitude-t)>180&&(e.length&&a.push(e),e=[]),e.push(`${mn(r.longitude)},${gn(r.latitude)}`),t=r.longitude;return e.length&&a.push(e),a.filter(r=>r.length>1).map(r=>r.join(" "))}var eh={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},qr=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}updated(e){super.updated(e);for(let t of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof t.getBBox!="function")continue;let{x:r,y:s,width:i,height:o}=t.getBBox();t.setAttribute("viewBox",[r-1,s-1,i+2,o+2].join(" "))}}renderData(e){let t=e.lines??[],r=e.birthDetails;return Ma`<div class="wrap" part="card"><header part="header"><h2>${this.t("Astrocartography")}</h2>${r?Ma`<p class="roxy-label">${U(this.effectiveLang(),r.date,r.time)} · ${Qp(Math.round(r.latitude))} ${Jp(Math.round(r.longitude))}</p>`:pn}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,r),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?Ma`<p class="summary">${e.summary}</p>`:pn} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return Ma`<svg viewBox="0 0 ${Ni} ${hn}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${Ni}" height="${hn}"/><path class="land" d="${Wp}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?Xt`<text class="birthplace roxy-glyph" x=${mn(t.longitude)} y=${gn(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>${Op}</text>`:pn}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let i=mn(s),o=s===0;e.push(Xt`<line class=${o?"grat-axis":"grat"} x1=${i} y1="0" x2=${i} y2=${hn} />`),e.push(Xt`<text class="axis-label" x=${i} y=${hn-2} text-anchor="middle">${Jp(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let i=gn(s),o=s===0;t.push(Xt`<line class=${o?"grat-axis":"grat"} x1="0" y1=${i} x2=${Ni} y2=${i} />`),t.push(Xt`<text class="axis-label" x="2" y=${i-1}>${Qp(s)}</text>`)}let r=[Zp,-Zp,Xp,-Xp].map(s=>Xt`<line class="grat-ref" x1="0" y1=${gn(s)} x2=${Ni} y2=${gn(s)} />`);return Xt`${e}${t}${r}`}renderBodyLines(e){let t=e.map((d,h)=>{let p=y(d,"planet");return{line:d,name:p,color:Ur(d.planet,h),glyph:w(d.planet)??p}}),r=d=>d.reduce((h,p)=>Math.abs(p.latitude)<Math.abs(h.latitude)?p:h,d[0]??{latitude:0,longitude:0}),s=d=>new Map(jt(t,h=>d(h)+180,Dy).map(({item:h,displayLongitude:p})=>[h,p-180])),i=s(d=>d.line.mc.longitude),o=s(d=>d.line.ic.longitude),l=s(d=>r(d.line.ascendant.points??[]).longitude),c=s(d=>r(d.line.descendant.points??[]).longitude);return t.map(d=>{let{line:h,name:p,color:f,glyph:v}=d,L=$=>$.get(d)??0;return Xt`${[this.renderMeridian(h.mc.longitude,L(i),f,v,p,"mc",false),this.renderMeridian(h.ic.longitude,L(o),f,v,p,"ic",true),this.renderCurve(h.ascendant.points,{longitude:L(l),latitude:r(h.ascendant.points??[]).latitude},f,v,p,"ascendant",false),this.renderCurve(h.descendant.points,{longitude:L(c),latitude:r(h.descendant.points??[]).latitude},f,v,p,"descendant",true)]}`})}renderMeridian(e,t,r,s,i,o,l){let c=mn(e),d=o==="ic"?hn-16:9;return Xt`<g>
2
- <line class=${`acg-line${l?" dashed":""}`} stroke=${r} x1=${c} y1="0" x2=${c} y2=${hn}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(eh[o]??"MC")})}</title></line>
3
- <text class="acg-glyph roxy-glyph" fill=${r} x=${mn(t)} y=${d} text-anchor="middle" dominant-baseline="central">${s}</text>
4
- </g>`}renderCurve(e,t,r,s,i,o,l){let c=Ay(e??[]);return c.length===0?pn:Xt`<g>
5
- ${c.map(d=>Xt`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${r} points=${d}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(eh[o]??"MC")})}</title></polyline>`)}
6
- <text class="acg-glyph roxy-glyph" fill=${r} x=${mn(t.longitude)} y=${gn(t.latitude)} text-anchor="middle" dominant-baseline="central">${s}</text>
7
- </g>`}renderLegend(e){return e.length===0?pn:Ma`<div class="legend" part="legend">${e.map((t,r)=>{let s=Ur(t.planet,r);return Ma`<span class="legend-item"><span class="legend-swatch" style="${`border-block-start-color: ${s}`}"></span> ${Fe(w(t.planet))}${y(t,"planet")}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?pn:Ma`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,r)=>{let s=Ur(t.planet,r),i=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return Ma`<details class="interp-card" part="reading" name="acg-lines" ?open="${r===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${Fe(w(t.planet))}${y(t,"planet")} </span>${j()}</summary><div class="interp-body">${i.filter(([,o])=>o).map(([o,l])=>Ma`<p class="interp-line"><span class="code">${o}</span>${l}</p>`)}</div></details>`})}</section>`}};qr.endpoints=$c,qr.styles=[u,He,z,K,Ey`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg{border-radius:var(--roxy-radius-sm);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border) 12%, transparent);stroke:var(--roxy-border);stroke-width:.8px}.land{fill:var(--roxy-secondary);opacity:.13}.grat{stroke:var(--roxy-border);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .3125)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:calc(var(--roxy-text-base) * .5);font-weight:var(--roxy-weight-bold)}.birthplace{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .5625)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.legend-swatch{inline-size:var(--roxy-space-md);border-block-start:var(--roxy-line-thick) solid;block-size:0}.legend-note{width:100%}.summary,.interp-line{font-size:var(--roxy-text-sm)}.interp-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0;align-self:center}.interp-line .code{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}`],qr=m([x("roxy-astrocartography-map")],qr);import{css as _y,html as je,nothing as bt}from"lit";import{css as Py}from"lit";var My=new Set(["wood","fire","earth","metal","water"]);function wt(n){let a=ft(n??"");return My.has(a)?`element-${a}`:""}var ua=Py`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var Ny={year:"Year",month:"Month",day:"Day",hour:"Hour"},th={harmonious:"Harmonious",challenging:"Challenging"},ah={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},rh={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},Yr=class extends g{renderData(a){let e=this.effectiveLang(),t=U(e,a.birthData?.date,a.birthData?.time);return je`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?je`<span class="born">${t}</span>`:bt} ${a.zodiacAnimal?je`<span class="roxy-chip animal">${y(a,"zodiacAnimal")}</span>`:bt}</header><div class="pillars-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(a.pillars??[]).map(r=>this.renderPillar(r))}</div></div>${this.renderDayMaster(a)} ${this.renderElements(a)} ${this.renderInteractions(a)} ${a.summary&&!this.hideReadings?je`<p class="summary" part="section summary">${a.summary}</p>`:bt} ${Qa(a.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(a){let e=Ny[a.position],t=a.position==="day";return je`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos roxy-label">${e?this.t(e):R(a.position)}</span> <span class="god">${y(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} <span class="element-word ${wt(a.stem?.element)}">${y(a.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${y(a.branch,"animal")}</span> ${a.hiddenStems?.length?je`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${a.hiddenStems.map(r=>je`<li><span lang="zh">${r.stem?.chinese??""}</span> <span class="role">${r.role}</span> ${y(r.tenGod,"name")}</li>`)}</ul>`:bt} ${a.naYin?je`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${a.naYin}</span>`:bt}</div>`}renderDayMaster(a){let e=a.dayMaster;return e?je`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b class="element-word ${wt(e.element)}">${y(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?je`<p part="reading">${e.nature}</p>`:bt}</div></section>`:bt}renderElements(a){let e=a.fiveElements??[];if(e.length===0)return bt;let t=this.effectiveLang(),r=e.reduce((s,i)=>s+(i.count??0),0)||1;return je`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>je`<div class="element ${wt(s.element)}" part="label-track"><span class="element-word">${y(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/r*100}%"></span></span> <span class="element-count">${_(t,s.count??0)} ${s.level&&rh[s.level]?this.t(rh[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?je`<p class="element-reading" part="reading">${s.reading}</p>`:bt}</div>`)}</div></section>`}renderInteractions(a){let e=a.interactions??[];return e.length===0?bt:je`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>je`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&ah[t.type]?this.t(ah[t.type]):R(t.type??"")}</b> ${t.quality?je`<span class="roxy-chip tag tag-${t.quality}">${t.quality&&th[t.quality]?this.t(th[t.quality]):t.quality}</span>`:bt} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?je`<span>${t.transformsTo}</span>`:bt} ${t.variety?je`<span>${t.variety}</span>`:bt} ${t.type==="punishment"&&typeof t.complete=="boolean"?je`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:bt}</div>${t.meaning&&!this.hideReadings?je`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:bt}</li>`)}</ul></section>`}};Yr.endpoints=wc,Yr.styles=[u,I,ua,_y`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.born{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.animal{margin-inline-start:auto}.pillars-wrap{min-width:0;overflow-x:auto}.pillars{grid-template-columns:repeat(4,minmax(12ch,1fr));display:grid}.pillar{gap:var(--roxy-space-xs);padding:var(--roxy-space-sm);border-block-start:var(--roxy-line-thick) solid transparent;text-align:center;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.pillar-self{border-block-start-color:var(--roxy-accent)}.pillar-self .pos{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 2);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.nayin,.hidden .role{color:var(--roxy-muted)}.romanised,.nayin{font-size:var(--roxy-text-xs)}.rule{inline-size:100%;margin:calc(var(--roxy-space-unit) / 2) 0;border:0;border-block-start:1px solid var(--roxy-border)}.hidden{gap:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);text-align:start;margin:0;padding:0;list-style:none;display:grid}.nayin{text-align:start}.master{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.master .hanzi{font-size:calc(var(--roxy-text-base) * 1.5)}.master p{color:var(--roxy-secondary);flex-basis:100%;margin:0}.elements{gap:var(--roxy-space-xs);display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:grid}.element-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.25lh;overflow:hidden}:where(.element){--_element:var(--roxy-accent)}.element-fill{background:var(--_element);height:100%;display:block}.element-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.element-reading,.interaction-meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);margin:0}.element-reading{grid-column:1/-1}:is(.master p,.element-reading,.interaction-meaning){border-block-start:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{gap:calc(var(--roxy-space-unit) / 2);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.interaction:first-child{border-block-start:0;padding-block-start:0}.interaction-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.tag-harmonious{color:var(--roxy-success-fg)}.tag-challenging{color:var(--roxy-danger-fg)}.summary{margin:0}`],Yr=m([x("roxy-bazi-chart")],Yr);import{css as zy,html as Wr,nothing as zi}from"lit";function fa(n,a){return!a||!n?.length?"":n.map(e=>a[String(e)]?.[0]).filter(Boolean).join(", ")}function rl(n,a){return!a||typeof n!="number"?"":(a[String(n)]??[]).join(", ")}var Zr=class extends g{renderData(a){let e=a.grahas??[],t=a.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let r=e.filter(i=>i.moved),s=a.movedCount??r.length;return Wr`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header>${r.length?Wr`<div class="moved-list" part="table moved">${r.map(i=>this.renderMoved(i,a.houseThemes))}</div>`:zi} ${t.length?Wr`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Bhava cusps and occupants")}"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(i=>this.renderBhavaRow(i))}</tbody></table></div></details>`:zi}</div>`}renderMoved(a,e){let t=w(a.graha)??"",r=typeof a.bhava=="number"?fa([a.bhava],e):"";return Wr`<div class="moved-row"><span class="graha">${t?Wr`<span class="glyph roxy-glyph">${t}</span>`:zi}${a.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:a.rashiHouse??"",to:a.bhava??""})} </span>${r?Wr`<span class="themes">${r}</span>`:zi}</div>`}renderBhavaRow(a){let e=(a.grahas??[]).join(", ");return Wr`<tr><td class="num">${a.house}</td><td>${a.rashi}</td><td class="num">${b(this.effectiveLang(),a.start,2)}°</td><td class="num">${b(this.effectiveLang(),a.madhya,2)}°</td><td class="num">${b(this.effectiveLang(),a.end,2)}°</td><td class="num">${b(this.effectiveLang(),a.span,2)}°</td><td class="occupants">${e}</td></tr>`}};Zr.endpoints=kc,Zr.styles=[u,I,zy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.lede{margin:0}.lede{font-size:var(--roxy-text-sm)}.moved-row{align-items:baseline;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.shift{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary)}summary{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}`],Zr=m([x("roxy-bhav-chalit-table")],Zr);import{css as Oy,html as Xr,nothing as Oi}from"lit";var sh=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],Jr=class extends g{renderData(a){let e=a.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(r=>r.totalVirupas??0),1);return Xr`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${a.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:a.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(r=>this.renderBhava(r,t,a.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${sh.map(r=>Xr`<div class="legend-row"><span class="swatch" style="background:${r.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(r.source)})}</div>`)}</div></div>`}renderBhava(a,e,t){let r=typeof a.house=="number"?fa([a.house],t):"";return Xr`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:a.house})}</span> <span class="rashi">${a.rashi}</span> ${a.lord?Xr`<span class="lord">${this.t("lord {{graha}}",{graha:a.lord})}</span>`:Oi} <span class="total">${this.t("{{value}} rupas",{value:b(this.effectiveLang(),a.totalRupas,2)})} ${typeof a.rank=="number"?Xr`<span class="rank">#${a.rank}</span>`:Oi}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:b(this.effectiveLang(),a.totalVirupas,1)})}">${sh.map(s=>{let i=Math.max(0,a[s.key]??0);return i>0?Xr`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:b(this.effectiveLang(),i,1)})}"></span>`:Oi})}</div>${r?Xr`<p class="themes">${r}</p>`:Oi}</article>`}};Jr.endpoints=Sc,Jr.styles=[u,I,Oy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.subtitle,.themes{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.row{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row:last-child{border-block-end:0}.row-top{align-items:baseline;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.house{min-width:9ch;font-weight:var(--roxy-weight-bold)}.rashi{color:var(--roxy-secondary)}.lord{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);margin-inline-start:auto}.rank{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:var(--roxy-space-xs)}.bar{border-radius:var(--roxy-radius-full);background:color-mix(in srgb, var(--roxy-border) 55%, transparent);block-size:.5lh;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);display:flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:1.5ch}`],Jr=m([x("roxy-bhava-bala-table")],Jr);import{css as Gy,html as Le,nothing as kt,svg as nh}from"lit";import{property as Iy}from"lit/decorators.js";var Bn=["physical","emotional","intellectual","intuitive"],Gi={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function ar(n,a){let e=Gi[n];return e?a(e):R(n)}var Ii={physical:"var(--roxy-danger)",emotional:"var(--roxy-info)",intellectual:"var(--roxy-success)",intuitive:"color-mix(in oklab, var(--roxy-info) 50%, var(--roxy-danger))",aesthetic:"var(--roxy-warning)",awareness:"color-mix(in oklab, var(--roxy-danger) 70%, var(--roxy-info))",spiritual:"color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-info))",passion:"color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-warning))",mastery:"var(--roxy-accent)",wisdom:"var(--roxy-muted)"},Fy={ascending:"ascending through zero",descending:"descending through zero"},By={double:"Double day",triple:"Triple day"},rr=class extends g{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},r=Object.entries(t).map(([i,o])=>{let l=typeof o=="number"?o:0,c=Math.abs(l)>1?l/100:l;return[i,c]}),s=e.spotlight;return Le`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2>${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?Le`<span class="roxy-chip">${R(e.overallPhase)}</span>`:kt} ${typeof e.energyRating=="number"?Le`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:kt}</div></header>${s?Le`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${Ii[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${ar(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?Le`<span class="energy">${ue(this.effectiveLang(),s.value,0)}</span>`:kt} ${s.phase?Le`<span class="roxy-chip">${R(s.phase)}</span>`:kt}</div>${s.message&&!this.hideReadings?Le`<p>${s.message}</p>`:kt}</div>`:kt}<div class="bars" part="chart bars" role="list">${r.map(([i,o])=>{let l=Math.abs(o)*50,c=Ii[i]??"var(--roxy-accent)";return Le`<div class="bar" role="listitem"><span>${ar(i,d=>this.t(d))}</span> <span class="track"><span class="fill ${o<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${ue(this.effectiveLang(),o*100,0)}</span></div>`})}</div>${this.hideReadings?kt:Le`${e.dailyMessage?Le`<p>${e.dailyMessage}</p>`:kt} ${e.advice?Le`<p>${e.advice}</p>`:kt}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return Le`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let r=600,s=160,i=r/Math.max(t.length-1,1),o=e.summary;return Le`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${Lt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${r} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${r}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${Bn.map(l=>{let c=t.map((h,p)=>{let f=h[l]??0,v=p*i,L=s/2-f/100*(s/2-8);return`${v.toFixed(2)},${L.toFixed(2)}`}).join(" "),d=Ii[l]??"var(--roxy-secondary)";return nh`<polyline points=${c} fill="none" stroke=${d} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?nh`<circle cx=${(c*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[C(this.effectiveLang(),l.date),Xe(this.effectiveLang(),(l.criticalCycles??[]).map(d=>ar(d,h=>this.t(h)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" \xB7 ")}</title></circle>`:kt)}</svg><div class="forecast-axis" part="legend"><span>${C(this.effectiveLang(),t[0]?.date)}</span><span>${C(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${Bn.map(l=>Le`<span class="key"><span class="dot" style="${`background: ${Ii[l]}`}"></span>${this.t(Gi[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${o?Le`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),C(this.effectiveLang(),o.bestDay))} ${this.stat(this.t("Worst day"),C(this.effectiveLang(),o.worstDay))} ${this.stat(this.t("Average energy"),typeof o.averageEnergy=="number"?`${o.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof o.criticalDayCount=="number"?`${o.criticalDayCount}`:"")}</dl>`:kt} ${this.renderForecastData(e)} ${o?.periodAdvice&&!this.hideReadings?Le`<p>${o.periodAdvice}</p>`:kt}</section>`}renderForecastData(e){let t=this.effectiveLang();return Le`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${j()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${Bn.map(r=>Le`<th scope="col">${this.t(Gi[r])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(r=>Le`<tr><th scope="row"><time datetime="${r.date}">${C(t,r.date)}</time></th>${Bn.map(s=>Le`<td>${ue(t,r[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:r.energyRating})}</td><td>${b(t,r.daysSinceBirth,0)}</td><td>${r.isCritical?Xe(t,r.criticalCycles.map(s=>ar(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],r=e.doubleCriticalDays??[],s=t.map(i=>({label:C(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?ar(i.cycle,o=>this.t(o)):"",this.severityName(i.severity)].filter(Boolean).join(" \xB7 "),body:i.advisory??"",extra:Le`<p class="crit-meta">${[i.direction?this.t(Fy[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" \xB7 ")}</p>`}));return Le`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2>${this.t("Critical days")}</h2><span class="energy">${Lt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="roxy-facts" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),r.length?`${r.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?C(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${r.length>0?Le`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:Xe(this.effectiveLang(),r.map(i=>C(this.effectiveLang(),i)||i))})}</p>`:kt} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=By[e];return t?this.t(t):""}stat(e,t){return t?Le`<div><dt>${e}</dt><dd>${t}</dd></div>`:kt}};rr.endpoints=Rc,rr.styles=[u,z,se,K,Gy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.head-meta{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.energy{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.spotlight{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm)}.bars{gap:var(--roxy-space-xs);display:grid}.bar{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,16ch) minmax(0,1fr) 7ch;display:grid}.track{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.7lh;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}svg{width:100%;max-width:var(--roxy-chart-max-width,37.5rem);height:auto;display:block}.legend{gap:var(--roxy-space-md);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.key{align-items:center;gap:var(--roxy-space-xs);text-transform:capitalize;display:inline-flex}.dot{border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.dot.critical{background:var(--roxy-danger)}.roxy-facts{margin:0}.roxy-facts dd{font-weight:var(--roxy-weight-bold)}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.forecast-scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}.forecast-table{width:100%}.forecast-table th,.forecast-table td{text-align:end;white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:start}.forecast-axis{justify-content:space-between;gap:var(--roxy-space-sm);width:100%;max-width:var(--roxy-chart-max-width,37.5rem);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:flex}.crit-note{border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.crit-meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([Iy({type:String,reflect:true})],rr.prototype,"mode",2),rr=m([x("roxy-biorhythm-chart")],rr);import{css as du,html as X,nothing as le}from"lit";import{state as pu}from"lit/decorators.js";import{unsafeHTML as hu}from"lit/directives/unsafe-html.js";var hh=14,Hy=86,mh=0,jy=102,sr=6,gh=(Hy-hh)*sr,Ky=(jy-mh)*sr;function es(n,a){return{x:(n-hh)*sr,y:(a-mh)*sr}}var A=50,Hi=n=>2*A-n,Hn=1.02*sr,Vy=1.15*sr,Ke=2.87,St=4.4,ih=5.65,sl={head:{64:[A-Ke,11.2],61:[A,11.2],63:[A+Ke,11.2]},ajna:{47:[A-Ke,18],24:[A,18],4:[A+Ke,18],17:[A-Ke,20.6],11:[A+Ke,20.6],43:[A,25.3]},throat:{62:[A-Ke,32.4],23:[A,32.4],56:[A+Ke,32.4],16:[A-St,34.7],35:[A+St,34.7],20:[A-St,37.3],12:[A+St,37.3],45:[A+St,39.6],31:[A-Ke,41.9],8:[A,41.9],33:[A+Ke,41.9]},g:{1:[A,47.7],7:[A-Ke,50.3],13:[A+Ke,50.3],10:[A-ih,53.4],25:[A+ih,53.4],15:[A-Ke,56.8],46:[A+Ke,56.8],2:[A,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[A-Ke,72.7],14:[A,72.7],29:[A+Ke,72.7],34:[A-St,75.4],27:[A-St,79],59:[A+St,79],42:[A-Ke,81.7],3:[A,81.7],9:[A+Ke,81.7]},"solar-plexus":{},root:{53:[A-Ke,90.2],60:[A,90.2],52:[A+Ke,90.2],54:[A-St,92.6],19:[A+St,92.6],38:[A-St,95.3],39:[A+St,95.3],58:[A-St,98.1],41:[A+St,98.1]}},Uy={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function qy(){let n={},a={};for(let[e,[t,r]]of Object.entries(sl.spleen))sl["solar-plexus"][Uy[Number(e)]]=[Hi(t),r];for(let[e,t]of Object.entries(sl))for(let[r,[s,i]]of Object.entries(t))n[Number(r)]=es(s,i),a[Number(r)]=e;return{points:n,centerOf:a}}var{points:ll,centerOf:jn}=qy(),tw=gh/2;function Qr(n){return n.map(([a,e])=>es(a,e))}function nl(n,a,e){return Qr([[A-n,a],[A+n,a],[A+n,e],[A-n,e]])}var il=5.9,oh=[[18.3,68.3],[18.3,82],[30.3,75.15]],ol=[20,84.4],lh=12*sr,Yy=[63.2,67.9],Wy=13.1*sr,cl=[{id:"head",label:"Head",color:"gold",points:Qr([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:Qr([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:nl(il,31,43.3)},{id:"g",label:"G",color:"gold",points:Qr([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:Qr([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:es(...Yy),room:Wy}},{id:"spleen",label:"Spleen",color:"brown",points:Qr(oh),caption:{at:es(...ol),room:lh}},{id:"sacral",label:"Sacral",color:"red",points:nl(il,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:Qr(oh.map(([n,a])=>[Hi(n),a])),caption:{at:es(Hi(ol[0]),ol[1]),room:lh}},{id:"root",label:"Root",color:"brown",points:nl(il,88.5,99.8)}],Zy=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],Xy=Jy();function Jy(){let n=Hi,a=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${Fi(a[0])}`];for(let t=1;t+2<a.length;t+=3)e.push(`C ${Fi(a[t])} ${Fi(a[t+1])} ${Fi(a[t+2])}`);e.push(`L ${Bi(a[a.length-1],n)}`);for(let t=a.length-3;t>=1;t-=3)e.push(`C ${Bi(a[t+1],n)} ${Bi(a[t],n)} ${Bi(a[t-1],n)}`);return e.push("Z"),e.join(" ")}function Fi([n,a]){let e=es(n,a);return`${e.x} ${e.y}`}function Bi([n,a],e){let t=es(e(n),a);return`${t.x} ${t.y}`}function Qy(n){return n.map(a=>`${a.x},${a.y}`).join(" ")}function yh(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function eu(){return k`<path class="bg-body" d=${Xy} />`}function tu(n){let a=[];for(let[e,t]of Zy){let r=ll[e],s=ll[t];if(!r||!s)continue;a.push(k`<line class="bg-channel" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} />`);let i={x:(r.x+s.x)/2,y:(r.y+s.y)/2};for(let[o,l]of[[e,r],[t,s]]){let c=n.get(o);if(!c)continue;let d=yh(c);a.push(k`<line class="bg-half ${d==="both"?"src-left":d}" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`),d==="both"&&a.push(k`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`)}}return a}function au(n,a,e){return cl.flatMap(t=>{let r=n.has(t.id),s=`bg-center bg-${t.color}${r?" defined":""}`,i=a?.get(t.id)||t.label;return[k`<polygon class=${s} points=${Qy(t.points)}><title>${i}: ${r?e.defined:e.open}</title></polygon>`,t.caption?ch(i,t.caption.at,"bg-caption",t.caption.room):ch(i,dh(t.points),r?`defined bg-${t.color}`:"",su(t.points,dh(t.points).y)*.86)]})}function ch(n,a,e,t){let r=n.split(/\s+/).filter(Boolean),s=r.reduce((c,d)=>Math.max(c,d.length),0),i=Math.min(Vy,t/Math.max(1,s*ru)),o=i*1.05,l=a.y-o*(r.length-1)/2;return k`<text class="bg-center-name ${e}" style=${`font-size:${i}px`} x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${r.map((c,d)=>k`<tspan x=${a.x} y=${l+d*o}>${c}</tspan>`)}</text>`}var ru=.66;function su(n,a){let e=[];for(let t=0;t<n.length;t++){let r=n[t],s=n[(t+1)%n.length];if(r.y===s.y)continue;let i=Math.min(r.y,s.y),o=Math.max(r.y,s.y);a<i||a>o||e.push(r.x+(a-r.y)/(s.y-r.y)*(s.x-r.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function dh(n){let a=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/a,y:n.reduce((e,t)=>e+t.y,0)/a}}function ph(n,a){return`M ${n.x} ${n.y-Hn} A ${Hn} ${Hn} 0 0 ${a} ${n.x} ${n.y+Hn} Z`}function nu(n,a){let e=[];for(let[t,r]of Object.entries(ll)){let s=Number(t),i=n.get(s),o=i?yh(i):"",l=a.get(s);e.push(k`<g class="bg-gate-node">
8
- ${o==="both"?[k`<path class="bg-gate-dot on src-left" d=${ph(r,0)} />`,k`<path class="bg-gate-dot on src-right" d=${ph(r,1)} />`]:k`<circle class="bg-gate-dot ${o&&`on ${o}`}" cx=${r.x} cy=${r.y} r=${Hn} />`}
1
+ var ig=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var m=(n,a,e,t)=>{for(var r=t>1?void 0:t?og(a,e):a,s=n.length-1,i;s>=0;s--)(i=n[s])&&(r=(t?i(a,e,r):i(r))||r);return t&&r&&ig(a,e,r),r};import{css as Jg,html as oe,nothing as ke}from"lit";import{property as Qg}from"lit/decorators.js";var Lc=[{endpoint:"chinese-astrology/calendar/day/{date}",method:"GET",attrs:{mode:"day"}},{endpoint:"chinese-astrology/calendar/monthly",method:"GET",attrs:{mode:"month"}},{endpoint:"chinese-astrology/calendar/auspicious-days",method:"POST",attrs:{mode:"auspicious"}}],$c=[{endpoint:"angel-numbers/numbers/{number}",method:"GET"},{endpoint:"angel-numbers/daily",method:"POST"}],wc=[{endpoint:"angel-numbers/lookup",method:"GET"}],kc=[{endpoint:"vedic-astrology/arudha",method:"POST"}],Sc=[{endpoint:"vedic-astrology/ashtakavarga",method:"POST"}],Rc=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}],Cc=[{endpoint:"astrology/astrocartography",method:"POST"}],Tc=[{endpoint:"chinese-astrology/bazi/chart",method:"POST"}],Ec=[{endpoint:"vedic-astrology/bhav-chalit",method:"POST"}],Dc=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}],Ac=[{endpoint:"biorhythm/daily",method:"POST",attrs:{mode:"daily"}},{endpoint:"biorhythm/forecast",method:"POST",attrs:{mode:"forecast"}},{endpoint:"biorhythm/critical-days",method:"POST",attrs:{mode:"critical-days"}}],Pc=[{endpoint:"human-design/bodygraph",method:"POST"}],Mc=[{endpoint:"vedic-astrology/chara-karakas",method:"POST"}],_c=[{endpoint:"vedic-astrology/panchang/choghadiya",method:"POST"}],Nc=[{endpoint:"astrology/compatibility-score",method:"POST",attrs:{mode:"astrology"}},{endpoint:"numerology/compatibility",method:"POST",attrs:{mode:"numerology"}},{endpoint:"biorhythm/compatibility",method:"POST",attrs:{mode:"biorhythm"}}],zc=[{endpoint:"numerology/compound-number/{number}",method:"GET"}],Oc=[{endpoint:"crystals/{id}",method:"GET"}],Ic=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}],Gc=[{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"}}],Fc=[{endpoint:"vedic-astrology/divisional-chart",method:"POST"},{endpoint:"vedic-astrology/navamsa",method:"POST"}],Bc=[{endpoint:"vedic-astrology/dosha/manglik",method:"POST",attrs:{type:"manglik"}},{endpoint:"vedic-astrology/dosha/kalsarpa",method:"POST",attrs:{type:"kalsarpa"}},{endpoint:"vedic-astrology/dosha/sadhesati",method:"POST",attrs:{type:"sadhesati"}}],Hc=[{endpoint:"ayurveda/constitution",method:"POST"}],jc=[{endpoint:"dreams/symbols/{id}",method:"GET"}],Kc=[{endpoint:"dreams/symbols",method:"GET"}],Vc=[{endpoint:"astrology/planets/monthly",method:"POST"},{endpoint:"vedic-astrology/planetary-positions/monthly",method:"POST"}],Uc=[{endpoint:"astrology/fixed-stars",method:"POST"}],qc=[{endpoint:"feng-shui/flying-stars/natal",method:"POST",attrs:{mode:"natal"}},{endpoint:"feng-shui/flying-stars/annual/{year}",method:"GET",attrs:{mode:"annual"}}],Yc=[{endpoint:"forecast/digest",method:"POST"}],Wc=[{endpoint:"forecast/timeline",method:"POST"},{endpoint:"forecast/significant-dates",method:"POST"},{endpoint:"forecast/transits",method:"POST"}],Zc=[{endpoint:"kabbalah/gematria",method:"POST"}],Xc=[{endpoint:"vedic-astrology/transit",method:"POST"}],Jc=[{endpoint:"vedic-astrology/compatibility",method:"POST"}],Qc=[{endpoint:"human-design/connection",method:"POST"}],ed=[{endpoint:"human-design/penta",method:"POST"}],td=[{endpoint:"human-design/type",method:"POST"},{endpoint:"human-design/profile",method:"POST"}],ad=[{endpoint:"human-design/variables",method:"POST"}],rd=[{endpoint:"vedic-astrology/heliacal",method:"POST"}],sd=[{endpoint:"iching/hexagrams/random",method:"GET"},{endpoint:"iching/hexagrams/{number}",method:"GET"},{endpoint:"iching/hexagrams/lookup",method:"GET"},{endpoint:"iching/cast",method:"GET"},{endpoint:"iching/daily",method:"POST"},{endpoint:"iching/daily/cast",method:"POST"}],nd=[{endpoint:"vedic-astrology/panchang/hora",method:"POST"}],id=[{endpoint:"astrology/horoscope/{sign}/daily",method:"GET",attrs:{period:"daily"}},{endpoint:"astrology/horoscope/{sign}/weekly",method:"GET",attrs:{period:"weekly"}},{endpoint:"astrology/horoscope/{sign}/monthly",method:"GET",attrs:{period:"monthly"}},{endpoint:"astrology/horoscope/{sign}/yearly",method:"GET",attrs:{period:"yearly"}}],od=[{endpoint:"vedic-astrology/kp/chart",method:"POST"}],ld=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}],cd=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}],dd=[{endpoint:"vedic-astrology/kp/ruling-planets",method:"POST"}],pd=[{endpoint:"feng-shui/kua",method:"POST",attrs:{mode:"kua"}},{endpoint:"feng-shui/eight-mansions",method:"POST",attrs:{mode:"mansions"}}],hd=[{endpoint:"astrology/local-space",method:"POST"}],md=[{endpoint:"chinese-astrology/bazi/luck-pillars",method:"POST"}],gd=[{endpoint:"mesoamerican-astrology/mayan/tzolkin",method:"POST",attrs:{mode:"day"}},{endpoint:"mesoamerican-astrology/mayan/chart",method:"POST",attrs:{mode:"chart"}}],yd=[{endpoint:"astrology/moon-phase/current",method:"GET",attrs:{mode:"current"}},{endpoint:"astrology/moon-phase/upcoming",method:"GET",attrs:{mode:"upcoming"}},{endpoint:"astrology/moon-phase/calendar/{year}/{month}",method:"GET",attrs:{mode:"calendar"}}],ud=[{endpoint:"vedic-astrology/nakshatras/{id}",method:"GET"}],fd=[{endpoint:"astrology/natal-chart",method:"POST"}],xd=[{endpoint:"numerology/life-path",method:"POST",attrs:{type:"life-path"}},{endpoint:"numerology/expression",method:"POST",attrs:{type:"expression"}},{endpoint:"numerology/soul-urge",method:"POST",attrs:{type:"soul-urge"}},{endpoint:"numerology/personality",method:"POST",attrs:{type:"personality"}},{endpoint:"numerology/birth-day",method:"POST",attrs:{type:"birth-day"}},{endpoint:"numerology/maturity",method:"POST",attrs:{type:"maturity"}},{endpoint:"numerology/daily",method:"POST",attrs:{type:"daily"}},{endpoint:"numerology/personal-day",method:"POST",attrs:{type:"personal-day"}},{endpoint:"numerology/personal-month",method:"POST",attrs:{type:"personal-month"}},{endpoint:"numerology/personal-year",method:"POST",attrs:{type:"personal-year"}},{endpoint:"numerology/chart",method:"POST",attrs:{type:"chart"}}],bd=[{endpoint:"vedic-astrology/panchang/detailed",method:"POST",attrs:{detail:"detailed"}},{endpoint:"vedic-astrology/panchang/basic",method:"POST",attrs:{detail:"basic"}}],vd=[{endpoint:"astrology/asteroids",method:"POST"},{endpoint:"astrology/lilith",method:"POST"},{endpoint:"astrology/progressions",method:"POST"},{endpoint:"astrology/solar-arc",method:"POST"},{endpoint:"astrology/arabic-lots",method:"POST"}],Ld=[{endpoint:"astrology/profections",method:"POST"}],$d=[{endpoint:"astrology/signs/{id}",method:"GET"},{endpoint:"astrology/planet-meanings/{id}",method:"GET"},{endpoint:"vedic-astrology/rashis/{id}",method:"GET"},{endpoint:"iching/trigrams/{id}",method:"GET"},{endpoint:"human-design/gates/{number}",method:"GET"},{endpoint:"human-design/centers/{id}",method:"GET"},{endpoint:"numerology/meanings/{number}",method:"GET"},{endpoint:"vedic-astrology/avasthas/{id}",method:"GET"}],wd=[{endpoint:"astrology/relocation-chart",method:"POST"}],kd=[{endpoint:"reports/natal",method:"POST",attrs:{report:"natal"}},{endpoint:"reports/synastry",method:"POST",attrs:{report:"synastry"}},{endpoint:"reports/kundli",method:"POST",attrs:{report:"kundli"}},{endpoint:"reports/matchmaking",method:"POST",attrs:{report:"matchmaking"}},{endpoint:"reports/yearly-forecast",method:"POST",attrs:{report:"yearly-forecast"}},{endpoint:"reports/human-design",method:"POST",attrs:{report:"human-design"}},{endpoint:"reports/bazi",method:"POST",attrs:{report:"bazi"}},{endpoint:"reports/numerology",method:"POST",attrs:{report:"numerology"}},{endpoint:"reports/tarot",method:"POST",attrs:{report:"tarot"}}],Sd=[{endpoint:"vedic-astrology/shadbala",method:"POST"}],Rd=[{endpoint:"astrology/synastry",method:"POST"}],Cd=[{endpoint:"tarot/daily",method:"POST"},{endpoint:"tarot/cards/{id}",method:"GET"}],Td=[{endpoint:"tarot/cards",method:"GET"}],Ed=[{endpoint:"tarot/spreads/three-card",method:"POST",attrs:{spread:"three-card"}},{endpoint:"tarot/spreads/celtic-cross",method:"POST",attrs:{spread:"celtic-cross"}},{endpoint:"tarot/spreads/love",method:"POST",attrs:{spread:"love"}},{endpoint:"tarot/spreads/career",method:"POST",attrs:{spread:"career"}},{endpoint:"tarot/spreads/custom",method:"POST",attrs:{spread:"custom"}},{endpoint:"tarot/yes-no",method:"POST",attrs:{spread:"yes-no"}},{endpoint:"tarot/draw",method:"POST",attrs:{spread:"draw"}}],Dd=[{endpoint:"astrology/transit-aspects",method:"POST"}],Ad=[{endpoint:"astrology/transits",method:"POST"}],Pd=[{endpoint:"vedic-astrology/upagraha",method:"POST"}],Md=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}],_d=[{endpoint:"vedic-astrology/aspects",method:"POST"}],Nd=[{endpoint:"vedic-astrology/daily",method:"POST"}],zd=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Od=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Id=[{endpoint:"astrology/natal-chart",method:"POST"}],Gd=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}],Fd=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];import{html as ht,nothing as Wa}from"lit";import{property as Ze,state as ca}from"lit/decorators.js";import{ifDefined as tn}from"lit/directives/if-defined.js";var Bd=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Pn(n){if(n.lang)return n.lang;if(typeof document>"u")return;let a=n.closest?.("[lang]")?.getAttribute("lang");return a||document.documentElement.lang||void 0}function Hd(n){return!n||n.toLowerCase().split("-")[0]==="en"}var lg={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Uo(n,a){let e=n.toLowerCase();return a.find(t=>t.toLowerCase()===e)}function hi(n,a=Bd){let e=Pn(n);if(!e)return;let t=Uo(e,a);if(t)return t;let r=e.toLowerCase().split("-"),s=r[0];if(s==="zh"){let i=r.find(o=>o==="hans"||o==="hant")??lg[r[1]??""];return i?Uo(`zh-${i}`,a):void 0}return Uo(s,a)}import{html as yg,LitElement as ug,nothing as fg}from"lit";var Vd="symbols";var cg={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},qo='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',jd='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Kd='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mi={"fraunces-jost":{name:"Fraunces with Jost",sans:qo,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:qo,display:qo},geist:{name:"Geist",sans:jd,display:jd},system:{name:"System",sans:Kd,display:Kd}};function Ud(n){let{sans:a,display:e}=mi[n];return Object.keys(cg).filter(t=>`${a} ${e}`.includes(`"${t}"`))}var qd=["practitioner","eucalyptus","kiln","moonlit","celeste"];var Mn="1.8.0";var dg=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,pg=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function gi(n,a){if(!a)return;let e=new URL(a);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let t=(dg.exec(e.pathname)??pg.exec(e.pathname))?.[1];if(t!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${t}`}var hg="color-mix(in oklab, var(--roxy-accent) 70%, black)",mg="var(--roxy-accent)",gg="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Yo=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Wo(n){if(!n||!Yo.test(n))return;let a=n.slice(1).toLowerCase();return`#${a.length===3?a.replace(/./g,"$&$&"):a}`}function yi(n){return n!==void 0&&Object.hasOwn(mi,n)}function Yd(n){return qd.includes(n)}function Wd(n){let a=[];return n.brandColor&&Yo.test(n.brandColor)&&a.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Yo.test(n.brandAccent)&&a.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${hg},${mg})`,`--roxy-ring:${gg}`),a.join(";")}function Zd(n,a){if(yi(a))return a;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let r=n.shadowRoot?.firstElementChild,s=r?.localName==="style"?r:null;s?.sheet&&(s.sheet.disabled=true);let i,o,l;try{let c=globalThis.getComputedStyle(n),d=p=>c.getPropertyValue(p).trim();i=d("--roxy-font-sans"),o=d("--roxy-font-display"),l=d("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||o))return yi(l)?l:void 0}function Xd(n){let{sans:a,display:e}=mi[n];return`--roxy-font:${n};--roxy-font-sans:${a};--roxy-font-display:${e}`}var Jd=gi(Mn,globalThis.document?.currentScript?.src||import.meta.url);function Qd(n,a){if(typeof document>"u"||a===void 0)return;let e=`roxy-ui-font-${n}`;if(document.getElementById(e))return;let t=document.createElement("link");t.id=e,t.rel="stylesheet",t.href=`${a}/styles/fonts/${n}.css`,document.head.append(t)}function ep(n,a=Jd){Ud(n).length>0&&Qd(n,a)}function tp(n=Jd){Qd(Vd,n)}var ap='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var rp="roxy-ui-tokens";function sp(){if(typeof document>"u")return null;let n=document.getElementById(rp);if(n)return n;let a=document.createElement("style");return a.id=rp,a.textContent=ap,document.head.prepend(a),a}function xt(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function D(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function R(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,a=>a.toUpperCase())}function _n(n){return(n??"").split(/\n\s*\n/).map(a=>a.trim()).filter(Boolean)}function ui(n){return typeof n=="string"&&/^https?:\/\//.test(n)}var np="__ROXY_UI_I18N__";function Zo(){let n=globalThis,a=n[np];if(a)return a;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[np]=e,e}function Xo(n,a){return a?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in a?String(a[t]??""):e):n}function fi(n,a,e){return Xo(Jo(n,a)??a,e)}function Jo(n,a){if(!n)return;let{catalogs:e}=Zo(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[xt(a)]}function ip(n){if(!n)return;let{fieldLabels:a}=Zo(),e=n.toLowerCase();return a[e]??a[e.split("-")[0]]}function Xs(n,a){return ip(n)?.fields[a]}function op(n,a,e){return ip(n)?.enums[`${a}.${e}`]}function lp(n){let{listeners:a}=Zo();return a.add(n),()=>{a.delete(n)}}var xi=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){this.unsubscribe=lp(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Ua=class extends ug{constructor(){super();this.translator=(e,t)=>this.t(e,t);new xi(this)}connectedCallback(){super.connectedCallback(),sp()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&tp()}fontDeclarations(e){let t=Zd(this,e);return t?(ep(t),Xd(t)):""}renderFontStyle(){let e=this.fontDeclarations();return e?yg`<style>:host{${e}}</style>`:fg}t(e,t){return fi(this.effectiveLang(),e,t)}effectiveLang(){return Pn(this)}};import{css as $g}from"lit";import{css as xg,html as bg,nothing as vg}from"lit";var cp=xg`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function Fe(n){return n?bg`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:vg}import{css as Lg}from"lit";var dp=Lg`: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 wg=$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);letter-spacing:var(--roxy-tracking-normal);word-spacing: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(:focus){outline:none!important}: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}`,f=[wg,dp,cp];var kg="__cols",Sg="__rows";function Rg(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function bi(n){if(Array.isArray(n)){let s=false,i=n.map(o=>{let l=bi(o);return l!==o&&(s=true),l});return s?i:n}if(!Rg(n))return n;let a=n[kg],e=n[Sg];if(Array.isArray(a)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return a.forEach((o,l)=>{i[o]=bi(s[l])}),i});let t=false,r={};for(let[s,i]of Object.entries(n)){let o=bi(i);o!==i&&(t=true),r[s]=o}return t?r:n}function vi(n){return bi(n)}function pp(n,a){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([t,r])=>a[t]===r))??n[0]}var Cg="pk_live_YOUR_KEY",hp={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 Or(n){if(n)return n===Cg?hp.sample:n.startsWith("pk_")?void 0:hp.secret}function Js(n,a,e={}){e.warn&&console.warn(a.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:a.reason,message:a.message},bubbles:true,composed:true}))}var en="https://roxyapi.com/api/v2";async function mp(n){return(await gp(n)).message}async function gp(n){try{let a=await n.json();if(a?.error){let e=a.code==="validation_error"&&Array.isArray(a.issues)?a.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:a.error,issues:e?.length?e:null,worded:true,...a.code?{code:a.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var $i={fromAttribute:n=>{if(n!=null){try{let a=JSON.parse(n);if(a&&typeof a=="object"&&!Array.isArray(a))return a}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Qs=class extends Error{constructor(e,t=null,r=true,s,i){super(e);this.issues=t;this.worded=r;this.status=s;this.code=i}};function Qo(n){return n.submitUrl?void 0:Or(n.publishableKey)}function el(n){return!!(n.submitUrl||n.publishableKey&&!Qo(n))}async function qa(n,a,e){let t=Qo(n);if(t)throw new Qs(t.message);let r=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Tg(a,n.submitContext),signal:e}):await Eg(n,a,e);if(!r.ok){let s=await gp(r);throw new Qs(s.message,s.issues,s.worded,r.status,s.code)}return await r.json()}function Tg(n,a){return JSON.stringify(a?{...n,context:a}:n)}function Eg(n,a,e){let t=new URL(`${n.baseUrl??en}${a.path}`,document.baseURI);for(let[s,i]of Object.entries(a.query??{}))i!=null&&t.searchParams.set(s,String(i));let r={Accept:"application/json"};return n.publishableKey&&(r["X-API-Key"]=n.publishableKey),a.body!=null&&(r["Content-Type"]="application/json"),fetch(t,{method:a.method??"GET",headers:r,body:a.body!=null?JSON.stringify(a.body):void 0,signal:e})}var Li=class{constructor(a){this.baseUrl=en;this.worded=true;this.failure={};this.host=a,a.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(a){this.worded=true,this.failure={};let e=Qo(this);if(e){this.host.error=e.message,Js(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let r=await qa(this,a,t.signal);if(t.signal.aborted)return;this.host.data=r}catch(r){if(t.signal.aborted||r?.name==="AbortError")return;r instanceof Qs&&(this.host.issues=r.issues,this.failure={status:r.status,code:r.code}),this.worded=r instanceof Qs&&r.worded,this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=false)}}};function yp(n,a,e,t=[]){let r={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,d)=>{let p=r[d];return delete r[d],encodeURIComponent(String(p??""))}),i=new Set(t),o={},l={};for(let[c,d]of Object.entries(r))d===void 0||d===""||(a==="GET"||i.has(c)?o[c]=d:l[c]=d);return{path:s,method:a,query:o,body:a==="POST"?l:void 0}}import{css as Pg,html as Ya,nothing as Ir}from"lit";import{css as Dg,html as Ag}from"lit";function V(){return Ag`<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 z=Dg`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 F=Pg`.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 Da(n){return n?.length?Ya`<div class="interp-keywords roxy-chips">${n.map(a=>Ya`<span class="roxy-chip">${a}</span>`)}</div>`:Ir}function Nn(n,a){if(!n)return Ir;let e=(t,r)=>r?Ya`<p><strong>${a(t)}</strong> ${r}</p>`:Ir;return Ya`${n.summary?Ya`<p>${n.summary}</p>`:Ir} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Da(n.keywords)}`}function up(n,a,e,t=false){let r=n.filter(s=>!!s.body);return r.length===0?Ir:Ya`<section class="block" part="section readings"><h3>${e}</h3>${r.map((s,i)=>Ya`<details class="interp-card" part="reading" name="${a}" ?open="${i===0&&!t}"><summary><span class="interp-lead">${Fe(s.glyph)} ${s.label}</span> ${V()} ${s.aside?Ya`<span class="interp-aside"><small>${s.aside}</small></span>`:Ir}</summary><div class="interp-body"><p>${s.body}</p>${s.extra??Ir}</div></details>`)}</section>`}var fp="roxy-data";function xp(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Mg(n){return`<script type="application/json" class="${fp}">${xp(n)}<\/script>`}function _g(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var wi=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){if(this.host.data!=null)return;let a=this.read();a!==void 0&&(this.host.data=a,this.host.requestUpdate())}read(){let a=this.findInlineScript();return a?this.parse(a.textContent):void 0}findInlineScript(){for(let a of Array.from(this.host.children))if(_g(a)&&a.classList.contains(fp))return a;return null}parse(a){if(a?.trim())try{return JSON.parse(a)}catch{return}}};var g=class extends Ua{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,r=this.listRows();if(!(!e||!t||!r)){this.moreLoading=true,this.moreError=null;try{let s=await qa(this.fetcher,{...e,query:{...e.query,offset:r.length}});if(this.lastRequest!==e)return;let i=s[t];this.data={...this.data,...s,[t]:[...r,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let t=this.selfFetch();if(!t)return;let r=e.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(r.values),this.fetchFresh(yp(t.endpoint,t.method,{...r.values,...this.ownRequest()},r.queryKeys??[]))};new wi(this),this.fetcher=new Li(this)}static{this.styles=[f]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=vi(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:pp(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return ht`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:true,composed:true})),customElements.get("roxy-data")?ht`<roxy-data .data="${e}" lang="${tn(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),t=[Wd(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!t)return Wa;let r=(t?`:host{${t}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return ht`<style>${r}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?ht`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,r,s=false){return this.hideReadings?Wa:up(e,t,this.t(r??"Reading"),s)}renderResult(e){let t=ht`<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()?ht`${t}${this.renderAttribution()}`:t}renderWithForm(e){return ht`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Wa:this.renderErrorBanner(this.error):this.data==null?Wa:this.showAttribution()?ht`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Wa:e.length>=t?Wa:ht`<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?ht`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Wa}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let r=this.effectiveLang();r&&t.setAttribute("lang",r),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:hi(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return ht`<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(Wa):this.renderEmpty()}renderForm(){let e=this.selfFetch();return ht`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${tn(this.specUrl)}" publishable-key="${tn(this.publishableKey)}" location-url="${tn(this.locationUrl)}" submit-label="${tn(this.submitLabel)}" lang="${tn(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 ht`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return ht`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let t=!!this.selfFetch();if(t&&this.issues)return this.renderForm();let r=this.renderErrorBanner(e);return t?ht`${r}${this.renderForm()}`:r}renderErrorBanner(e){return ht`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([Ze({attribute:false})],g.prototype,"data",2),m([Ze({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),m([Ze({type:String})],g.prototype,"method",2),m([Ze({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),m([Ze({type:String,attribute:"base-url"})],g.prototype,"baseUrl",2),m([Ze({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),m([Ze({type:String,attribute:"submit-url"})],g.prototype,"submitUrl",2),m([Ze({attribute:"submit-context",converter:$i})],g.prototype,"submitContext",2),m([Ze({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),m([Ze({type:Boolean})],g.prototype,"remember",2),m([Ze({type:Boolean,attribute:"hide-readings",reflect:true})],g.prototype,"hideReadings",2),m([Ze({type:String,attribute:"hide-sections",reflect:true})],g.prototype,"hideSections",2),m([Ze({type:String,attribute:"brand-color"})],g.prototype,"brandColor",2),m([Ze({type:String,attribute:"brand-accent"})],g.prototype,"brandAccent",2),m([Ze({type:String})],g.prototype,"font",2),m([Ze({type:String})],g.prototype,"hemisphere",2),m([Ze({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),m([Ze({type:String,attribute:"error-message"})],g.prototype,"errorMessage",2),m([Ze({type:String})],g.prototype,"attribution",2),m([ca()],g.prototype,"loading",2),m([ca()],g.prototype,"error",2),m([ca()],g.prototype,"issues",2),m([ca()],g.prototype,"selfFetched",2),m([ca()],g.prototype,"editing",2),m([ca()],g.prototype,"sticky",2),m([ca()],g.prototype,"openedRow",2),m([ca()],g.prototype,"openedRowId",2),m([ca()],g.prototype,"moreLoading",2),m([ca()],g.prototype,"moreError",2);var x=n=>a=>{customElements.get(n)||customElements.define(n,a)};var ki=/^\d{4}-\d{2}-\d{2}$/,Ng=/^\d{4}-\d{2}$/,Lp=/^\d{2}:\d{2}(:\d{2})?$/,zg=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,bp=new Map;function bt(n){if(!n)return["en"];let a=bp.get(n);if(a)return[a,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return bp.set(n,e),[e,"en"]}var vp=new Map;function Si(n){let a=n??"",e=vp.get(a);if(e)return e;let r={hour:new Intl.DateTimeFormat(bt(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return vp.set(a,r),r}function zn(n,a){return n&&a?`${n} - ${a}`:n||a}function Fr(n){let a=Lp.test(n)?`1970-01-01T${n}`:ki.test(n)?`${n}T00:00:00`:Ng.test(n)?`${n}-01T00:00:00`:zg.test(n)?n.replace(" ","T"):null;return a?{d:new Date(`${a}Z`),timeZone:"UTC"}:{d:new Date(n)}}var Og=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)(?:Z|[+-]\d{2}:?\d{2})$/;function an(n){return n?.match(Og)?.[1]??n}function Dt(n,a){if(typeof a!="string"||a.length===0||ki.test(a))return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleTimeString(bt(n),{...Si(n),timeZone:t})}function C(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(bt(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function da(n,a){return a?zn(Dt(n,a.start),Dt(n,a.end)):""}function vt(n,a,e){return zn(C(n,a),C(n,e))}function Za(n,a,e){if(typeof a!="string"||a.length===0)return"";if(e==="year")return a.match(/^(\d{4})/)?.[1]??a;let{d:t,timeZone:r}=Fr(a);return Number.isNaN(t.getTime())?a:t.toLocaleString(bt(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?Si(n):{},timeZone:r})}function $p(n,a,e,t){return zn(Za(n,a,t),Za(n,e,t))}function Gr(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(bt(n),{month:"short",day:"numeric",timeZone:t})}function wp(n,a,e){let t=Gr(n,a),r=Gr(n,e);return t===r?t:zn(t,r)}function kp(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(bt(n),{weekday:"short",day:"numeric",timeZone:t})}function rn(n,a,e){return typeof a!="number"||!Number.isFinite(a)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(a,e-1,1,12)).toLocaleDateString(bt(n),{month:"long",year:"numeric",timeZone:"UTC"})}function Ri(n,a){return typeof a!="number"||!Number.isInteger(a)||a<1||a>12?"":new Date(Date.UTC(2e3,a-1,1,12)).toLocaleDateString(bt(n),{month:"long",timeZone:"UTC"})}function _(n,a){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(bt(n),{maximumFractionDigits:0})}function Xe(n,a){let e=a.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(bt(n),{style:"long",type:"conjunction"}).format(e)}function b(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(bt(n),{maximumFractionDigits:e})}function fe(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":(a/100).toLocaleString(bt(n),{style:"percent",maximumFractionDigits:e})}function wt(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Ee(n){return D(wt(n))}var Ig={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Br(n,a,e){let t=typeof a=="string"?Ig[a]??R(a):"",r=typeof e=="number"?`${b(n,e,2)}\xB0`:"";return t&&r?`${t} (${r})`:t||r}function q(n,a,e,t=false){let r=typeof a=="string"&&ki.test(a)&&typeof e=="string"&&Lp.test(e)?`${a}T${e}`:a;if(typeof r!="string"||r.length===0)return"";if(ki.test(r))return C(n,r);let{d:s,timeZone:i}=Fr(r);return Number.isNaN(s.getTime())?r:s.toLocaleString(bt(n),{month:"short",day:"numeric",year:"numeric",...Si(n),...t?{second:"2-digit"}:{},timeZone:i})}function sn(n,a,e){return zn(q(n,a),q(n,e))}function Sp(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e}=Fr(a);return Number.isNaN(e.getTime())?a:e.toLocaleString(bt(n),{month:"short",day:"numeric",year:"numeric",...Si(n),timeZone:"UTC",timeZoneName:"short"})}function Rp(){try{return new Intl.DateTimeFormat(bt(void 0)).resolvedOptions().timeZone}catch{return}}function tl(n,a){if(!(typeof a!="string"||!a))return a===n?void 0:a}function On(n,a){let e=typeof n=="string"?n:"",t=tl(e,a);return e?t?`${e} (${t})`:e:t??""}function re(n,a,e){return Xs(n,a)??e??R(a)}function B(n,a,e,t){return op(n,a,e)??t??R(e)}var Ci="Localized";function y(n,a,e){let t=n,r=t?.[`${a}${Ci}`];if(typeof r=="string"&&r!=="")return r;if(e!==void 0)return e;let s=t?.[a];return typeof s=="string"?s:""}function Ti(n,a){let e=n,t=e?.[a];if(!Array.isArray(t))return[];let r=e?.[`${a}${Ci}`],s=Array.isArray(r)?r:[];return t.map((i,o)=>{let l=s[o];return{value:String(i),label:typeof l=="string"&&l!==""?l:String(i)}})}function nn(n){let a;for(let e of Object.keys(n)){if(!e.endsWith(Ci))continue;let t=e.slice(0,-Ci.length);if(t===""||!(t in n))continue;a??={...n};let r=n[e];r!=null&&r!==""&&(a[t]=r),delete a[e]}return a??n}var pa="http://www.w3.org/2000/svg",Ei=class{constructor(a){this.markup=a}};function Gg(n){return String(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function al(n){return n==null?"":n instanceof Ei?n.markup:typeof n=="string"||typeof n=="number"?Gg(n):n.map(al).join("")}function k(n,...a){let e=n[0]??"";return a.forEach((t,r)=>{e+=e.endsWith("=")?`"${al(t)}"`:al(t),e+=n[r+1]??""}),new Ei(e)}function ha(n){return(a,e)=>fi(n,a,e)}var Fg=24,on=29.530588853,Bg=Date.UTC(2e3,0,6,18,14),Hg=864e5,jg=n=>(1-Math.cos(n*Math.PI/180))/2*100,Tp=n=>({illumination:jg(n),waxing:n<180});function In(n){if(!(typeof n!="number"||!Number.isInteger(n)||n<1||n>30))return Tp(12*(n-.5))}function Ep(n){let a=Date.parse(`${n}T12:00:00Z`);return!n||Number.isNaN(a)?void 0:((a-Bg)/Hg%on+on)%on/on*360}function nl(n){let a=Ep(n);return a===void 0?void 0:a<180}function Dp(n){let a=Ep(n);return a===void 0?void 0:Tp(Math.round(a/90)%4*90)}function Kg(n){let a=n;return()=>(a=(a*9301+49297)%233280,a/233280)}function Ap(n,a,e,t,r,s){let o=Kg(s),l=Math.cos(r),c=Math.sin(r),d=Array.from({length:14},(v,L)=>{let $=L/14*Math.PI*2,P=.9+o()*.16,U=Math.cos($)*e*P,Ge=Math.sin($)*t*P;return[n+U*l-Ge*c,a+U*c+Ge*l]}),p=v=>d[(v+14)%14],h=v=>v.toFixed(3),u=`M${h(p(0)[0])} ${h(p(0)[1])}`;for(let v=0;v<14;v++){let[L,$,P,U]=[p(v-1),p(v),p(v+1),p(v+2)];u+=`C${h($[0]+(P[0]-L[0])/6)} ${h($[1]+(P[1]-L[1])/6)} ${h(P[0]-(U[0]-$[0])/6)} ${h(P[1]-(U[1]-$[1])/6)} ${h(P[0])} ${h(P[1])}`}return`${u}Z`}var Pp=[[-.36,-.42,.27,.21,.3,11],[-.6,-.02,.2,.42,.15,23],[.04,-.44,.16,.15,0,37],[.26,-.14,.2,.16,-.4,41],[.66,-.34,.1,.08,.2,53],[.52,.12,.11,.17,.1,67],[-.24,.36,.18,.12,-.2,71],[-.52,.34,.08,.08,0,83],[.33,.26,.07,.07,0,97],[-.08,-.12,.12,.08,.5,101]],rl=Pp.map(([n,a,e,t,r,s])=>Ap(n,a,e,t,r,s)).join(""),Mp=k`<circle class="moon-limb moon-limb-1" r="0.95"></circle><circle class="moon-limb moon-limb-2" r="0.985"></circle>`,Vg=Pp.map(([n,a,e,t,r,s])=>Ap(n,a,e*1.22,t*1.22,r,s+3)).join("");function sl(n,a){let e=Math.abs(1-2*n).toFixed(4),t=n<.5;return a?`M0 -1A1 1 0 0 1 0 1A${e} 1 0 0 ${t?0:1} 0 -1Z`:`M0 -1A1 1 0 0 0 0 1A${e} 1 0 0 ${t?1:0} 0 -1Z`}var Cp=.004;function Ug(n,a,e,t){let r=a>Cp,s=t&&r&&a<1-Cp?[.012,.006].map((i,o)=>k`<path class="moon-soft moon-soft-${o+1}" d=${sl(Math.min(1,a+i),e)}></path>`):[];return k`<circle class="moon-shade" r="1"></circle>${t?k`<path class="moon-earthshine" d=${rl} clip-path=${`url(#${n}-disc)`}></path>`:""}${s}${r?k`<path class="moon-lit" d=${sl(a,e)}></path>`:""}${t&&r?k`<g clip-path=${`url(#${n}-lit)`}><path class="moon-halo" d=${Vg}></path><path class="moon-mare" d=${rl}></path><circle class="moon-crater" cx="-0.16" cy="0.72" r="0.035"></circle>${Mp}</g>`:""}`}function qg(n,a,e){return a==="solar"?k`<circle class="moon-corona" r="1.1"></circle><circle class="moon-corona moon-corona-outer" r="1.18"></circle><circle class="moon-shade" r="1"></circle>`:k`<circle class="moon-copper" r="1"></circle>${e?k`<path class="moon-copper-mare" d=${rl} clip-path=${`url(#${n}-disc)`}></path><g class="moon-copper-limb">${Mp}</g>`:""}`}function Yg(n,a){let e=ha(n.lang);if(n.eclipse==="lunar")return e("Lunar eclipse");if(n.eclipse==="solar")return e("Solar eclipse");let t=n.lang,r=fe(t,a,0);return n.waxing?e("{{percent}} illuminated, waxing",{percent:r}):e("{{percent}} illuminated, waning",{percent:r})}function _p(n){let a=Math.min(1,Math.max(0,n.illumination/100)),e=n.size>=Fg,t=`roxy-moon-${Math.round(a*1e4)}${n.waxing?"x":"n"}${n.eclipse??""}${e?"d":""}`,r=[e?k`<clipPath id=${`${t}-disc`}><circle r="1"></circle></clipPath>`:"",e&&!n.eclipse?k`<clipPath id=${`${t}-lit`}><path d=${sl(a,n.waxing)}></path></clipPath>`:""],s=n.eclipse?qg(t,n.eclipse,e):Ug(t,a,n.waxing,e);return k`<svg xmlns=${pa} class="roxy-moon" viewBox="-1.2 -1.2 2.4 2.4" width=${n.size} height=${n.size} role="img" aria-label=${Yg(n,a*100)}><defs>${r}</defs>${n.hemisphere==="south"?k`<g transform="rotate(180)">`:k`<g>`}${s}<circle class=${e?"moon-rim":"moon-rim moon-rim-small"} r="1"></circle></g></svg>`.markup}import{css as Wg,html as Zg}from"lit";import{unsafeHTML as Xg}from"lit/directives/unsafe-html.js";import{css as Gn}from"lit";var Np=Gn`:where(.natal-wheel) .wheel-line,:where(.natal-wheel) .tick{fill:none;stroke:var(--roxy-border)}:where(.natal-wheel) .tick-major{stroke:var(--roxy-secondary)}:where(.natal-wheel) .sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}:where(.natal-wheel) .planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}:where(.natal-wheel) .planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}:where(.natal-wheel) .planet-deg .retro{fill:var(--roxy-danger-fg)}:where(.natal-wheel) .planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}:where(.natal-wheel) .house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}:where(.natal-wheel) .cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}:where(.natal-wheel) .angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}:where(.natal-wheel) .angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){:where(.natal-wheel) .sign-glyph,:where(.natal-wheel) .planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}:where(.natal-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}:where(.natal-wheel) .house-num{font-size:calc(var(--roxy-text-base) * .75)}}`,zp=Gn`:where(.synastry-wheel) .wheel-line{fill:none;stroke:var(--roxy-border)}:where(.synastry-wheel) .p1{--_person:var(--roxy-accent-ink)}:where(.synastry-wheel) .p2{--_person:var(--roxy-fg)}:where(.synastry-wheel) .sign{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}:where(.synastry-wheel) text.p1,:where(.synastry-wheel) text.p2{fill:var(--_person);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}:where(.synastry-wheel) .person-tag,:where(.synastry-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .625)}:where(.synastry-wheel) .planet-deg{fill:var(--roxy-muted)}:where(.synastry-wheel) .planet-deg .retro{fill:var(--roxy-danger-fg)}:where(.synastry-wheel) .leader{stroke:var(--_person);stroke-width:.5px;opacity:.7}@container (width<=480px){:where(.synastry-wheel) .sign,:where(.synastry-wheel) text.p1,:where(.synastry-wheel) text.p2{font-size:calc(var(--roxy-text-base) * 1.75)}:where(.synastry-wheel) .person-tag,:where(.synastry-wheel) .planet-deg{font-size:calc(var(--roxy-text-base) * .9375)}}:where(.synastry-wheel) .asc-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}:where(.synastry-wheel) .asc-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}`,Di=Gn`:where(.kundli) .line{fill:#0000;stroke:var(--roxy-border)}:where(.kundli) .sign-text{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans);text-transform:uppercase}:where(.kundli) .rashi-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans)}:where(.kundli) .house-num{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .planet-text{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .centre-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.kundli) .lagna-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans);text-transform:uppercase}:where(.kundli) .lagna-bg{fill:color-mix(in srgb, var(--roxy-accent) 14%, transparent)}:where(.kundli) .lagna-slash{stroke:var(--roxy-accent);stroke-linecap:round;opacity:.7}`,Ai=Gn`:where(.bodygraph) .bg-body{fill:color-mix(in srgb, var(--roxy-secondary) 8%, transparent);stroke:var(--roxy-border);stroke-width:1px}:where(.bodygraph) .bg-channel{stroke:var(--roxy-border);stroke-width:5px;stroke-linecap:round}:where(.bodygraph) .bg-half{stroke-width:5px;stroke-linecap:round}:where(.bodygraph) .bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}:where(.bodygraph) .bg-center{fill:var(--_mask,var(--roxy-bg));stroke:var(--roxy-secondary);stroke-width:1.8px}:where(.bodygraph) .bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}:where(.bodygraph){--_gold:color-mix(in oklch, var(--roxy-warning) 60%, var(--roxy-success));--_gold-ink:color-mix(in oklch, var(--roxy-warning-fg) 60%, var(--roxy-success-fg));--_center-gold:light-dark(color-mix(in oklab, var(--_gold) 40%, var(--roxy-bg)),color-mix(in oklab, var(--_gold) 50%, var(--_gold-ink)));--_center-green:light-dark(color-mix(in oklab, var(--roxy-success) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-success-fg)));--_center-red:light-dark(color-mix(in oklab, var(--roxy-danger) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-danger-fg)));--_center-brown:light-dark(color-mix(in oklab, color-mix(in oklab, var(--roxy-warning-fg) 75%, var(--roxy-fg)) 45%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-warning-fg) 50%, var(--roxy-secondary)))}:where(.bodygraph) .bg-center.bg-gold.defined,:where(.bodygraph) .legend .swatch.bg-gold{fill:var(--_center-gold);background:var(--_center-gold)}:where(.bodygraph) .bg-center.bg-green.defined,:where(.bodygraph) .legend .swatch.bg-green{fill:var(--_center-green);background:var(--_center-green)}:where(.bodygraph) .bg-center.bg-red.defined,:where(.bodygraph) .legend .swatch.bg-red{fill:var(--_center-red);background:var(--_center-red)}:where(.bodygraph) .bg-center.bg-brown.defined,:where(.bodygraph) .legend .swatch.bg-brown{fill:var(--_center-brown);background:var(--_center-brown)}:where(.bodygraph) .bg-gate-dot{fill:var(--_mask,var(--roxy-bg));stroke:var(--roxy-border);stroke-width:1px}:where(.bodygraph) .bg-gate-dot.on{stroke:var(--_mask,var(--roxy-bg))}:where(.bodygraph) .bg-center-name{color:var(--roxy-muted);fill:currentColor;font-weight:var(--roxy-weight-bold);text-transform:uppercase;pointer-events:none}:where(.bodygraph) .bg-center-name.defined{color:light-dark(var(--roxy-fg),var(--roxy-bg))}:where(.bodygraph) .bg-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .50625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}:where(.bodygraph) .bg-gate.on{fill:var(--src-ink,var(--_mask,var(--roxy-bg)))}:where(.bodygraph) .bg-half.src-left{stroke:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .bg-half.src-right{stroke:var(--src-right,var(--roxy-fg))}:where(.bodygraph) .bg-gate-dot.on.src-left{fill:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .bg-gate-dot.on.src-right{fill:var(--src-right,var(--roxy-fg))}:where(.bodygraph) .legend .swatch.src-left{background:var(--src-left,var(--roxy-danger))}:where(.bodygraph) .legend .swatch.src-right{background:var(--src-right,var(--roxy-fg))}`,Op=Gn`:where(.roxy-moon) .moon-shade{fill:var(--roxy-moon-shade)}:where(.roxy-moon) .moon-earthshine{fill:var(--roxy-moon-lit);opacity:.05}:where(.roxy-moon) .moon-soft{fill:var(--roxy-moon-lit)}:where(.roxy-moon) .moon-soft-1{opacity:.18}:where(.roxy-moon) .moon-soft-2{opacity:.34}:where(.roxy-moon) .moon-lit{fill:var(--roxy-moon-lit)}:where(.roxy-moon) .moon-limb{fill:none;stroke:var(--roxy-moon-mare)}:where(.roxy-moon) .moon-limb-1{stroke-width:.1px;opacity:.18}:where(.roxy-moon) .moon-limb-2{stroke-width:.03px;opacity:.3}:where(.roxy-moon) .moon-halo{fill:var(--roxy-moon-mare);opacity:.22}:where(.roxy-moon) .moon-mare{fill:var(--roxy-moon-mare);opacity:.38}:where(.roxy-moon) .moon-crater{fill:none;stroke:var(--roxy-moon-mare);stroke-width:.012px}:where(.roxy-moon) .moon-copper{fill:var(--roxy-moon-eclipse)}:where(.roxy-moon) .moon-copper-limb .moon-limb{stroke:var(--roxy-moon-shade)}:where(.roxy-moon) .moon-copper-mare{fill:var(--roxy-moon-shade);opacity:.3}:where(.roxy-moon) .moon-corona{fill:none;stroke:var(--roxy-moon-corona);stroke-width:.05px}:where(.roxy-moon) .moon-corona-outer{stroke-width:.02px;opacity:.45}:where(.roxy-moon) .moon-rim{fill:none;stroke:var(--roxy-moon-rim);stroke-width:.012px}:where(.roxy-moon) .moon-rim-small{stroke-width:.04px}`;var Xa=[Op,Wg`.moon-mark{vertical-align:middle;flex-shrink:0;display:inline-flex}`];function Wt(n,a,e,t){return Zg`<span class="moon-mark">${Xg(_p({...a,size:e,eclipse:t,hemisphere:n.hemisphere,lang:Pn(n)}))}</span>`}var ey=28,ty=20;function Ip(n){return!("days"in n)}var Ja=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&Ip(e)?oe`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:Ip(e)?ke:oe`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?oe`<span class="lunar">${vt(t,e.startDate,e.endDate)}</span>`:ke} ${"year"in e&&typeof e.year=="number"?oe`<span class="lunar">${rn(t,e.year,e.month)||e.year}</span>`:ke} ${typeof e.total=="number"?oe`<span class="lunar">${this.t("{{count}} days",{count:_(t,e.total)})}</span>`:ke}</header>${"avoidAnimal"in e&&e.avoidAnimal?oe`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Avoiding")}</span><b>${R(y(e,"avoidAnimal"))}</b></span></div>`:ke} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(r=>this.renderDayRow(r,t))}</ul></section></article>`}renderDayCard(e,t){let r=e.dayOfficer,s=In(e.lunar?.day);return oe`<header class="head" part="header"><h2 class="title" id="almanac-title">${C(t,e.date)}</h2>${e.lunar?oe`<span class="lunar">${s?Wt(this,s,ey):ke}${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:ke} ${r?.name?oe`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${y(r,"name")} <span lang="zh">${r.chinese??""}</span></span>`:ke}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${r?.meaning&&!this.hideReadings?oe`<p class="meaning" part="reading">${r.meaning}</p>`:ke} ${this.renderMansion(e)}`}renderPillars(e){let r=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return r.length===0&&!e.clashAnimal?ke:oe`<div class="facts" part="details">${r.map(([s,i])=>oe`<span><span class="roxy-label">${this.t(s)}</span> <b lang="zh">${i?.chinese??""}</b> ${i?.naYin??""}</span>`)} ${e.clashAnimal?oe`<span><span class="roxy-label">${this.t("Clash")}</span><b>${y(e,"clashAnimal")}</b></span>`:ke}</div>`}renderLists(e,t){let r=e.favours??[],s=e.avoids??[];return r.length===0&&s.length===0?ke:oe`<div class="lists" part="section activities">${r.length?oe`<div class="list"><h3>${this.t("Favours")}</h3><div class="roxy-chips chips-favour">${r.map(i=>oe`<span class="roxy-chip">${B(t,"activity",i)}</span>`)}</div></div>`:ke} ${s.length?oe`<div class="list"><h3>${this.t("Avoids")}</h3><div class="roxy-chips chips-avoid">${s.map(i=>oe`<span class="roxy-chip">${B(t,"activity",i)}</span>`)}</div></div>`:ke}</div>`}renderMansion(e){let t=e.mansion;return t?.name?oe`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Mansion")}</span><b>${y(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?oe`<span>${R(t.palace)}</span>`:ke} ${t.planet?oe`<span>${t.planet}</span>`:ke} ${t.animal?oe`<span>${y(t,"animal")}</span>`:ke}</div>`:ke}renderSolarTerms(e,t){let r="solarTerms"in e?e.solarTerms??[]:[];return r.length===0?ke:oe`<div class="terms" part="details">${r.map(s=>oe`<span>${Gr(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let r=e.dayOfficer,s=e.favours??[],i=In(e.lunar?.day);return oe`<li class="day" part="label-track"><span class="day-date">${Gr(t,e.date)}</span><div class="day-body">${i?Wt(this,i,ty):ke} <span lang="zh">${e.dayPillar?.chinese??""}</span> ${r?.name?oe`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${y(r,"name")}</span>`:ke} ${s.length?oe`<span class="roxy-chips chips-favour">${s.map(o=>oe`<span class="roxy-chip">${B(t,"activity",o)}</span>`)}</span>`:ke} ${e.clashAnimal?oe`<span class="roxy-label">${this.t("Clash")} ${y(e,"clashAnimal")}</span>`:ke}</div></li>`}};Ja.endpoints=Lc,Ja.styles=[f,Xa,Jg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.list h3{margin:0}.list h3{margin-block-end:var(--roxy-space-xs)}.lunar{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.lunar .moon-mark{margin-inline-end:var(--roxy-space-xs)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}:is(.tag-auspicious,.chips-favour>*){color:var(--roxy-success-fg)}:is(.tag-inauspicious,.chips-avoid>*){color:var(--roxy-danger-fg)}.tag-neutral{color:var(--roxy-info-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin:0;padding-block-start:var(--roxy-space-md)}.days{margin:0;padding:0;list-style:none;display:grid}.day{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);display:grid}.day:first-child{border-block-start:0;padding-block-start:0}.day-date{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.day-body{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.terms{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}`],m([Qg({type:String,reflect:true})],Ja.prototype,"mode",2),Ja=m([x("roxy-almanac-day")],Ja);import{css as ry,html as Bt,nothing as ma}from"lit";var ay=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function Pi(n,a,e,t){let r=[];if(a)for(let s of ay){let i=a[s.key];i&&r.push({label:n(s.source),body:i})}return e&&r.push({label:n("Biblical"),body:e}),t&&r.push({label:n("Shadow"),body:t}),r}var sy={positive:"success",cautionary:"danger",neutral:"info"},Hr=class extends g{renderData(a){let e=(a.energy??"").toLowerCase(),t=a.keywords??[],r=a.actionSteps??[];return Bt`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${a.number??""}`}"><div class="hero" part="header">${a.number?Bt`<div class="numeral">${a.number}</div>`:ma}<div><p class="roxy-label">${this.t("Angel number")}</p>${a.title?Bt`<h2>${a.title}</h2>`:ma}</div></div>${a.coreMessage&&!this.hideReadings?Bt`<p>${a.coreMessage}</p>`:ma}<ul class="badges roxy-chips" part="details">${a.type?Bt`<li>${a.type}</li>`:ma} ${typeof a.digitRoot=="number"?Bt`<li>${this.t("Digit root")} ${a.digitRoot}</li>`:ma} ${a.energy?Bt`<li class="roxy-chip" data-tone="${sy[e]??ma}">${a.energy}</li>`:ma}</ul>${t.length>0&&!this.hideReadings?Bt`<ul class="roxy-chips">${t.map(s=>Bt`<li>${s}</li>`)}</ul>`:ma} ${this.renderSections(a)} ${a.affirmation&&!this.hideReadings?Bt`<p class="affirmation">${a.affirmation}</p>`:ma} ${r.length>0&&!this.hideReadings?Bt`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${r.map(s=>Bt`<li>${s}</li>`)}</ul></div>`:ma}</article>`}renderSections(a){return this.renderInterpretation(Pi(this.translator,a.meaning,a.biblical,a.shadow),"angel-meaning","Reading")}};Hr.endpoints=$c,Hr.styles=[f,F,ry`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);font-style:italic}.steps h3{margin-block-end:var(--roxy-space-xs)}.steps ul{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}`],Hr=m([x("roxy-angel-number-card")],Hr);import{css as ny,html as xe,nothing as De}from"lit";var iy={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},oy={positive:"success",cautionary:"warning"},jr=class extends g{renderData(a){let e=a.knownMeaning,t=a.digitRootMeaning,r=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return xe`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:a.number??""})}"><div class="hero" part="header">${a.number?xe`<div class="numeral">${a.number}</div>`:De}<div>${e?.title?xe`<p class="roxy-label">${this.t("Number analysis")}</p>`:De}<h2>${r}</h2></div></div><ul class="badges roxy-chips" part="details">${a.type?xe`<li>${a.type}</li>`:De} ${typeof a.digits=="number"?xe`<li>${this.t("{{count}} digits",{count:a.digits})}</li>`:De} ${typeof a.uniqueDigits=="number"?xe`<li>${this.t("{{count}} unique",{count:a.uniqueDigits})}</li>`:De} ${typeof a.digitRoot=="number"?xe`<li>${this.t("Digit root {{n}}",{n:a.digitRoot})}</li>`:De} ${a.isPalindrome?xe`<li class="roxy-chip" data-tone="info">${this.t("Palindrome")}</li>`:De} ${a.isRepeating?xe`<li class="roxy-chip" data-tone="info">${this.t("Repeating")}</li>`:De} ${e?.energy?xe`<li class="roxy-chip" data-tone="${oy[e.energy]??De}">${this.t(iy[e.energy]??"Neutral energy")}</li>`:De}</ul>${a.contextNote?xe`<div class="context" part="section context"><p class="roxy-label">${this.t("Where you saw it")}</p><p>${a.contextNote}</p></div>`:De} ${e&&!this.hideReadings?xe`<div class="section" part="section known-meaning"><p class="roxy-label">${this.t("Known angel number")}</p>${e.coreMessage?xe`<p>${e.coreMessage}</p>`:De} ${e.keywords&&e.keywords.length>0?xe`<ul class="roxy-chips">${e.keywords.map(i=>xe`<li>${i}</li>`)}</ul>`:De} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?xe`<p><em>${e.affirmation}</em></p>`:De} ${s.length>0?xe`<p class="roxy-label">${this.t("What to do next")}</p><ol class="steps">${s.map(i=>xe`<li>${i}</li>`)}</ol>`:De}</div>`:De} ${t&&!this.hideReadings?xe`<div class="section" part="section digit-root"><p class="roxy-label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?xe`<h3>${t.title}</h3>`:De} ${t.coreMessage?xe`<p>${t.coreMessage}</p>`:De} ${e?De:this.renderRootMeaning(t)}</div>`:De}</article>`}renderMeaning(a,e,t,r){return this.renderInterpretation(Pi(this.translator,a,t,r),e,"Reading")}renderRootMeaning(a){return xe`${a.keywords&&a.keywords.length>0?xe`<ul class="roxy-chips">${a.keywords.map(e=>xe`<li>${e}</li>`)}</ul>`:De}${this.renderMeaning(a.meaning,"lookup-root")}${a.affirmation?xe`<p><em>${a.affirmation}</em></p>`:De}`}};jr.endpoints=wc,jr.styles=[f,z,F,ny`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.context{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.steps{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.section{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.section p{font-size:var(--roxy-text-sm)}`],jr=m([x("roxy-angel-number-lookup")],jr);import{css as $y,html as tr,nothing as Bn}from"lit";var ly=new RegExp("(?![\\d#*])\\p{Emoji}","gu"),cy=n=>n.replace(ly,"$&\uFE0E"),Mi=n=>Object.fromEntries(Object.entries(n).map(([a,e])=>[a,cy(e)])),ln=(n,a)=>a?n[xt(a)]:void 0,dy=Mi({sun:"\u2609",moon:"\u263D",mercury:"\u263F",venus:"\u2640",earth:"\u2641",mars:"\u2642",jupiter:"\u2643",saturn:"\u2644",uranus:"\u2645",neptune:"\u2646",pluto:"\u2BD3",rahu:"\u260A",ketu:"\u260B",ascendant:"Asc",midheaven:"MC","part of fortune":"\u2297",vertex:"Vx",lagna:"La","north node":"\u260A","south node":"\u260B",chiron:"\u26B7",lilith:"\u26B8","black moon lilith":"\u26B8"}),w=n=>ln(dy,n),py={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},Gp=n=>ln(py,n),hy=Mi({aries:"\u2648",taurus:"\u2649",gemini:"\u264A",cancer:"\u264B",leo:"\u264C",virgo:"\u264D",libra:"\u264E",scorpio:"\u264F",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653"}),N=n=>ln(hy,n),my={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},_i=n=>ln(my,n),Se=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],gy=Mi({conjunction:"\u260C",semisextile:"\u26BA","semi sextile":"\u26BA",semisquare:"\u2220","semi square":"\u2220",sextile:"\u26B9",square:"\u25A1",trine:"\u25B3",sesquiquadrate:"\u26BC",quincunx:"\u26BB",opposition:"\u260D"}),cn=n=>ln(gy,n),yy=Mi({heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637"}),Qa=n=>ln(yy,n),uy=19904,fy=64,Fp=n=>typeof n=="number"&&Number.isInteger(n)&&n>=1&&n<=fy?String.fromCodePoint(uy+n-1):void 0,be="\u211E",Bp="\u27F7",Hp="\u2605";import{css as xy}from"lit";var se=xy`.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}`;import{css as by,html as Fn,nothing as Ni}from"lit";var G=by`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function Q(n,a,e){if(!a?.ayanamsa)return Ni;let t=Br(n,a.ayanamsa);if(!t)return Ni;let r=typeof a.ayanamsaDegrees=="number"?b(n,a.ayanamsaDegrees,4):void 0;return Fn`<p class="roxy-frame">${r===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:t,degrees:r})}</p>`}function er(n,a,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?Ni:Fn`<p class="roxy-frame">${t.map(([r,s,i],o)=>Fn`${o>0?" \xB7 ":""}${a(r)}: <span class="roxy-frame-deg" title="${i}">${B(e,s,i)}</span>`)}</p>`}function jp(n,a,e){let t=Object.values(a??{}).filter(r=>!!r?.ayanamsa);return t.length===0?Ni:Fn`<div class="roxy-frame">${t.map(r=>{let s=Br(n,r.ayanamsa),i=typeof r.ayanamsaDegrees=="number"?b(n,r.ayanamsaDegrees,4):void 0,o=r.governs?.length?r.governs.join(", "):"";return Fn`<p class="roxy-frame">${i===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:s,degrees:i})}${o?e(", governs {{sections}}",{sections:o}):""}</p>`})}</div>`}import{css as Ly}from"lit";import{css as vy}from"lit";var ga=vy`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border);padding-block:var(--roxy-space-sm)}table.stacked tr:last-child{border-bottom:0}table.stacked td{padding:calc(var(--roxy-space-unit) / 2) 0;white-space:normal;border:0}table.stacked td:empty{display:none}table.stacked td[data-inline]{width:auto;margin-inline-end:var(--roxy-space-md);display:inline-block}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted)}}`;var zi=[ga,Ly`.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lead-row td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.name{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.lead-row :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.meaning{min-width:24ch}.meaning strong{display:block}.meaning p{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}@container (width<=30rem){table.stacked tr{padding-inline:var(--roxy-space-md)}table.stacked tbody tr.lead-row{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}table.stacked tbody tr.lead-row td:first-child{box-shadow:none}}`];var wy=new Set(["a1","a12"]),Kr=class extends g{renderData(a){let e=a.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(r=>r.exceptionApplied).length;return tr`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2>${this.t("Arudha padas")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Lagna")}</dt><dd>${a.lagnaRashi??""}</dd></div><div><dt>${this.t("Arudha Lagna")}</dt><dd>${a.arudhaLagna??""}</dd></div><div><dt>${this.t("Upapada")}</dt><dd>${a.upapada??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Arudha padas")}"><table class="stacked" role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(r=>this.renderRow(r))}</tbody></table></div>${t>0?tr`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:Bn}</div>`}renderRow(a){let e=r=>N(r)??"",t=r=>{let s=e(r);return tr`${s?tr`<span class="glyph roxy-glyph">${s}</span>`:Bn}${r??""}`};return tr`<tr class="${wy.has(a.id)?"lead-row":""}"><td class="name">${a.name??""}${a.abbreviation?tr`<span class="abbr">${a.abbreviation}</span>`:Bn}</td><td data-inline data-label="${this.t("Bhava")}">${a.house??""}</td><td data-inline data-label="${this.t("Bhava rashi")}">${t(a.bhavaRashi)}</td><td data-inline data-label="${this.t("Lord")}">${a.lord??""}</td><td data-inline data-label="${this.t("Lord rashi")}">${t(a.lordRashi)}</td><td data-inline data-label="${this.t("Pada rashi")}">${t(a.rashi)} ${a.exceptionApplied?tr`<span class="exception">${this.t("Moved")}</span>`:Bn}</td><td data-inline data-label="${this.t("From Lagna")}">${a.houseFromLagna??""}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?tr`<p>${a.significations}</p>`:Bn}</td></tr>`}};Kr.endpoints=kc,Kr.styles=[f,G,se,...zi,$y`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.exception{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.note{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Kr=m([x("roxy-arudha-padas")],Kr);import{css as Sy,html as ze,nothing as Vp}from"lit";import{state as Ry}from"lit/decorators.js";import{css as ky,html as il,nothing as Kp}from"lit";var et=ky`.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 mt(n){let{items:a,active:e,onSelect:t,label:r,idPrefix:s,controls:i=false}=n;return il`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${r}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=a.findIndex(u=>u.id===e);if(c===-1)return;let d=l.key==="ArrowRight"?1:-1,p=a[(c+d+a.length)%a.length];if(!p)return;t(p.id);let h=l.currentTarget.getRootNode();requestAnimationFrame(()=>{h.querySelector(`#${s}-tab-${p.id}`)?.focus()})}}">${a.map(l=>il`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${i?`${s}-panel-${l.id}`:Kp}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${i?a.filter(l=>l.id!==e).map(l=>il`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Kp}`}var Cy=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],ar=class extends g{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return ze`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?ze`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Vp} ${Q(this.effectiveLang(),e.frame,this.translator)}</div>${mt({items:Cy.map(({id:r,source:s})=>({id:r,label:this.t(s)})),active:this.activeTab,onSelect:r=>{this.activeTab=r},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:true})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return ze`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>ze`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Sarvashtakavarga")}"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=t.bindus[s]??0;return ze`<tr><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${N(r)??""}</span> ${r}</div></td><td class="${`bindu-cell ${this.sarvaTier(i)}`}">${i}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:ze`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?ze`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.","Bhinnashtakavarga")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:ze`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,r=this.data?.reducedSarvashtakavarga;return!t?.length&&!r?ze`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:ze`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.","Reduced",r)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,r,s,i){return t.length?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t(s)}"><table class="bhinna-table"><caption class="roxy-sr-only">${r}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>ze`<th scope="col" class="roxy-glyph" title="${o}">${N(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>ze`<tr><td>${o.planet}</td>${o.bindus.map(l=>ze`<td class="${`bindu-cell ${this.bhinnaTier(l)}`}">${l}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${i?ze`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,l)=>ze`<td>${i.bindus[l]??0}</td>`)}<td>${i.total}</td></tr></tfoot>`:Vp}</table></div>`:ze`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?ze`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Shodhya Pinda")}"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>ze`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:ze`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};ar.endpoints=Sc,ar.styles=[f,G,et,Sy`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){text-align:center}:is(th,td):first-child{text-align:start}.glyph{font-size:var(--roxy-text-base);line-height:1}.planet-cell{align-items:center;gap:var(--roxy-space-xs);white-space:nowrap;display:flex}.total-row td{font-weight:var(--roxy-weight-bold);border-block-start:var(--roxy-line-thick) solid var(--roxy-border);border-block-end:0}.bindu-cell{min-width:3ch;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;color:var(--roxy-fg)}.tier-1{background:color-mix(in srgb, var(--roxy-heat) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-scale{gap:1px;display:flex}.legend-swatch{block-size:.75lh;inline-size:2ch}.legend-note{flex:24ch}.bhinna-table :is(th,td):first-child{min-width:8ch}@container (width<=480px){.bhinna-table :is(th,td){padding:var(--roxy-space-xs);font-size:var(--roxy-text-xs)}.bhinna-table :is(th,td):first-child{min-width:6ch}.bindu-cell{min-width:2ch}}`],m([Ry()],ar.prototype,"activeTab",2),ar=m([x("roxy-ashtakavarga-grid")],ar);import{css as Ay,html as de,nothing as Oe}from"lit";var Ty=new Set(["conjunction","sextile","square","trine","opposition"]);function Aa(n){return Ty.has(wt(n))}function Be(n){return`aspect-${wt(n)}`}var Up=.3,Ey=.9,qp=.5,Dy=1.8;function dn(n){let{strength:a}=n;if(typeof a!="number"||!Number.isFinite(a))return;let e=Math.min(1,Math.max(0,a/100)),t=Up+e*(Ey-Up),r=qp+e*(Dy-qp);return`opacity:${t.toFixed(3)};stroke-width:${r.toFixed(3)}`}import{css as Yp}from"lit";var Pa=Yp`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,pn=[Yp`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,Pa];function Py(n,a,e){if(n.include?.length){let t={bodies:Xe(a,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var Wp={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Vr=class extends g{renderData(a){let e="aspects"in a?a.aspects??[]:[],t="patterns"in a?a.patterns??[]:[],r="summary"in a?a.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=q(this.effectiveLang(),"transitDate"in a?a.transitDate:"date"in a?a.date:"","time"in a?a.time:void 0,true),i="timezone"in a?a.timezone:void 0,o="options"in a?a.options:void 0;return de`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?de`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" \xB7 ")}</p>`:Oe} ${typeof i=="number"&&Number.isFinite(i)?de`<dl class="roxy-facts" part="details"><div><dt>${re(this.effectiveLang(),"timezone")}</dt><dd>${b(this.effectiveLang(),i,5)}</dd></div></dl>`:Oe}</div>${r?this.renderSummary(r):Oe} ${r&&"strongest"in r&&r.strongest?this.renderStrongest(r.strongest):Oe} ${e.length>0?de`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>de`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:Oe} ${t.length>0?de`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...t].sort((l,c)=>(Wp[l.kind]??9)-(Wp[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</section>`:Oe} ${o?de`<p class="provenance">${Py(o,this.effectiveLang(),this.translator)}</p>`:Oe}</div>`}renderSummary(a){let e="totalAspects"in a?a.totalAspects:a.total,t=Object.entries(a.byType??{}).sort((r,s)=>s[1]-r[1]);return de`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?de`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e})}</span>`:Oe} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:a.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:a.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:a.neutral})}</span> ${t.map(([r,s])=>de`<span>${this.t("{{label}}: {{value}}",{label:Ee({type:r}),value:s})}</span>`)}</p>`}renderStrongest(a){let e=w(a.planet1)??"",t=w(a.planet2)??"";return de`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph roxy-glyph">${e}</span>${y(a,"planet1")} <span class="asp-name ${Be(a)}">${y(a,"type",Ee(a))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${t}</span>${y(a,"planet2")} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:a.isApplying?this.t("Applying"):this.t("Separating"),orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span></div>`}renderAspect(a,e){let t=w(a.planet1)??"",r=w(a.planet2)??"",s=Ee(a),i=a.isApplying?this.t("Applying"):this.t("Separating"),o="meaning"in a?a.meaning:void 0,l="transitInterpretation"in a?a.transitInterpretation:void 0,c="aspectInterpretation"in a?a.aspectInterpretation:void 0,d=!!(o||l||c),p=de`<span aria-hidden="true" class="glyph roxy-glyph">${t}</span>${y(a,"planet1")} <span class="asp-name ${Be(a)}">${y(a,"type",s)}</span> <span aria-hidden="true" class="glyph roxy-glyph">${r}</span>${y(a,"planet2")} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:i,orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span>`;return!d||this.hideReadings?de`<div class="interp-card" part="reading"><div class="static-head">${p}</div></div>`:de`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${p}${V()}</summary><div class="interp-body" part="readings">${o?this.renderMeaning(o):Oe} ${l?this.renderTransit(l):Oe} ${c?Nn(c,this.translator):Oe}</div></details>`}renderMeaning(a){return de`${a.description?.short?de`<p>${a.description.short}</p>`:Oe} ${a.description?.long&&a.description.long!==a.description.short?de`<p>${a.description.long}</p>`:Oe} ${Da(a.keywords)}`}renderTransit(a){return Nn(a,this.translator)}renderPattern(a){let e=a.planets??[],t=a.apex?[...e].sort((r,s)=>+(s===a.apex)-+(r===a.apex)):e;return de`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${a.name??a.kind??this.t("Pattern")}</span> ${a.element?de`<span class="roxy-chip">${a.element}</span>`:Oe} ${a.modality?de`<span class="roxy-chip">${a.modality}</span>`:Oe} ${a.dissociate?de`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:Oe} ${typeof a.tightness=="number"?de`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:fe(this.effectiveLang(),a.tightness,0)})}</span>`:Oe}</div>${t.length?de`<ul class="roxy-chips">${t.map(r=>{let s=w(r),i=!!a.apex&&r===a.apex;return de`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?de`<span class="roxy-glyph" aria-hidden="true">${s}</span>`:Oe}${r}${i?de`<span>${this.t("apex")}</span>`:Oe}</li>`})}</ul>`:Oe} ${a.interpretation&&!this.hideReadings?de`<p class="pattern-interp">${a.interpretation}</p>`:Oe}</div>`}};Vr.endpoints=Rc,Vr.styles=[f,se,z,F,Pa,Ay`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Vr=m([x("roxy-aspects-table")],Vr);import{css as Oy,html as _a,nothing as hn,svg as Xt}from"lit";import{css as My,html as Zp,nothing as _y}from"lit";var Ae=class{constructor(a){this.host=a;this.state="closed";this.zoom=1;this.pressedBy="";this.press=a2=>{this.pressedBy=a2.pointerType};this.openOnMouse=a2=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(a2.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};a.addController(this)}hostUpdated(){let a=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!a)this.reset();else if(a.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",a.open||a.showModal());let e=a.querySelector(".roxy-chart-scroll");a.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(a){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=a===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=a===0?1:Math.min(3,Math.max(1,this.zoom+a)),this.host.requestUpdate()}renderChartViewport(a,e,t){return Zp`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${a}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?Zp`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${a}</div></div>`:_y}</dialog></div>`}},He=My`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function At(n){let a=n%360;return a<0?a+360:a}function Ht(n){let a=At(n),e=Math.floor(a/30)%12,t=a%30,r=Math.floor(t),s=(t-r)*60,i=Math.floor(s),o=Math.round((s-i)*60);return{sign:Se[e]??"Aries",signIndex:e,degree:r,minute:i,second:o}}function tt(n,a){let{sign:e,degree:t,minute:r}=Ht(n);return`${t}\xB0 ${a||e} ${String(r).padStart(2,"0")}'`}function Pt(n){return Zt(At(n)%30)}function ol(n){let a=Math.floor(n);return{degree:a,minute:Math.floor((n-a)*60)}}function Zt(n){let{degree:a,minute:e}=ol(n);return`${a}\xB0${String(e).padStart(2,"0")}'`}function Hn(n){return At(n+180)}function Oi(n,a){let e=At(n),t=At(a)-e;return t<0&&(t+=360),At(e+t/2)}function jt(n,a,e){let t=n.filter(c=>Number.isFinite(a(c))).map(c=>{let d=At(a(c));return{item:c,longitude:d,displayLongitude:d}}).sort((c,d)=>c.longitude-d.longitude),r=t.length;if(r<2)return t;let s=0,i=-1;for(let c=0;c<r;c++){let d=t[(c+r-1)%r],h=(t[c].longitude-d.longitude+360)%360;h>i&&(i=h,s=c)}let o=t[s],l=o.longitude;for(let c=1;c<r;c++){let d=t[(s+c)%r],p=typeof e=="function"?e(o.item,d.item):e,h=d.longitude+(s+c>=r?360:0);l=Math.max(h,l+p),d.displayLongitude=At(l),o=d}return t}var ya=2;function Xp(n,a){let e=n*Math.PI/180;return a.width/2*Math.abs(Math.cos(e))+a.height/2*Math.abs(Math.sin(e))}function Ma(n,a,e,t){let r=n*Math.PI/180,s=(i,o)=>o>1e-9?(i+t)/o:Number.POSITIVE_INFINITY;return Math.min(s((a.width+e.width)/2,Math.abs(Math.cos(r))),s((a.height+e.height)/2,Math.abs(Math.sin(r))))}var Ny=(n,a)=>Math.abs(n.x-a.x)<(n.width+a.width)/2&&Math.abs(n.y-a.y)<(n.height+a.height)/2;function Jp(n,a){let e=[],t=r=>e.reduce((s,i)=>Ny(r,i)?Math.max(s,Math.min((r.width+i.width)/2-Math.abs(r.x-i.x),(r.height+i.height)/2-Math.abs(r.y-i.y))):s,0);return[...n].map((r,s)=>({point:r,index:s})).sort((r,s)=>r.point.displayLongitude-s.point.displayLongitude).reduce((r,{point:s,index:i})=>{let o=a(s,0),l=a(s,1),c=t(o)===0||t(o)<=t(l)?0:1;return e.push(c===0?o:l),r[i]=c,r},[])}var Mt={minute:3.4,whole:1.85,retrograde:1.25,ink:.9};function _t(n,a){return a>0?n/a*(180/Math.PI):0}function A(n,a,e,t){let r=t*Math.PI/180;return{x:n+e*Math.cos(r),y:a+e*Math.sin(r)}}var zy={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Qp=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Ur(n,a=0){return zy[D(n)]??Qp[a%Qp.length]??"var(--roxy-accent)"}var eh="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var Ii=360,mn=180,gn=n=>n+180,yn=n=>90-n,Iy=9,th=23.44,ah=66.56,rh=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"E":"W"}`,sh=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"N":"S"}`;function Gy(n){let a=[],e=[],t=null;for(let r of n)t!==null&&Math.abs(r.longitude-t)>180&&(e.length&&a.push(e),e=[]),e.push(`${gn(r.longitude)},${yn(r.latitude)}`),t=r.longitude;return e.length&&a.push(e),a.filter(r=>r.length>1).map(r=>r.join(" "))}var nh={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},qr=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}updated(e){super.updated(e);for(let t of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof t.getBBox!="function")continue;let{x:r,y:s,width:i,height:o}=t.getBBox();t.setAttribute("viewBox",[r-1,s-1,i+2,o+2].join(" "))}}renderData(e){let t=e.lines??[],r=e.birthDetails;return _a`<div class="wrap" part="card"><header part="header"><h2>${this.t("Astrocartography")}</h2>${r?_a`<p class="roxy-label">${q(this.effectiveLang(),r.date,r.time)} · ${sh(Math.round(r.latitude))} ${rh(Math.round(r.longitude))}</p>`:hn}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,r),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?_a`<p class="summary">${e.summary}</p>`:hn} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return _a`<svg viewBox="0 0 ${Ii} ${mn}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${Ii}" height="${mn}"/><path class="land" d="${eh}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?Xt`<text class="birthplace roxy-glyph" x=${gn(t.longitude)} y=${yn(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>${Hp}</text>`:hn}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let i=gn(s),o=s===0;e.push(Xt`<line class=${o?"grat-axis":"grat"} x1=${i} y1="0" x2=${i} y2=${mn} />`),e.push(Xt`<text class="axis-label" x=${i} y=${mn-2} text-anchor="middle">${rh(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let i=yn(s),o=s===0;t.push(Xt`<line class=${o?"grat-axis":"grat"} x1="0" y1=${i} x2=${Ii} y2=${i} />`),t.push(Xt`<text class="axis-label" x="2" y=${i-1}>${sh(s)}</text>`)}let r=[th,-th,ah,-ah].map(s=>Xt`<line class="grat-ref" x1="0" y1=${yn(s)} x2=${Ii} y2=${yn(s)} />`);return Xt`${e}${t}${r}`}renderBodyLines(e){let t=e.map((d,p)=>{let h=y(d,"planet");return{line:d,name:h,color:Ur(d.planet,p),glyph:w(d.planet)??h}}),r=d=>d.reduce((p,h)=>Math.abs(h.latitude)<Math.abs(p.latitude)?h:p,d[0]??{latitude:0,longitude:0}),s=d=>new Map(jt(t,p=>d(p)+180,Iy).map(({item:p,displayLongitude:h})=>[p,h-180])),i=s(d=>d.line.mc.longitude),o=s(d=>d.line.ic.longitude),l=s(d=>r(d.line.ascendant.points??[]).longitude),c=s(d=>r(d.line.descendant.points??[]).longitude);return t.map(d=>{let{line:p,name:h,color:u,glyph:v}=d,L=$=>$.get(d)??0;return Xt`${[this.renderMeridian(p.mc.longitude,L(i),u,v,h,"mc",false),this.renderMeridian(p.ic.longitude,L(o),u,v,h,"ic",true),this.renderCurve(p.ascendant.points,{longitude:L(l),latitude:r(p.ascendant.points??[]).latitude},u,v,h,"ascendant",false),this.renderCurve(p.descendant.points,{longitude:L(c),latitude:r(p.descendant.points??[]).latitude},u,v,h,"descendant",true)]}`})}renderMeridian(e,t,r,s,i,o,l){let c=gn(e),d=o==="ic"?mn-16:9;return Xt`<g>
2
+ <line class=${`acg-line${l?" dashed":""}`} stroke=${r} x1=${c} y1="0" x2=${c} y2=${mn}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(nh[o]??"MC")})}</title></line>
3
+ <text class="acg-glyph roxy-glyph" fill=${r} x=${gn(t)} y=${d} text-anchor="middle" dominant-baseline="central">${s}</text>
4
+ </g>`}renderCurve(e,t,r,s,i,o,l){let c=Gy(e??[]);return c.length===0?hn:Xt`<g>
5
+ ${c.map(d=>Xt`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${r} points=${d}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(nh[o]??"MC")})}</title></polyline>`)}
6
+ <text class="acg-glyph roxy-glyph" fill=${r} x=${gn(t.longitude)} y=${yn(t.latitude)} text-anchor="middle" dominant-baseline="central">${s}</text>
7
+ </g>`}renderLegend(e){return e.length===0?hn:_a`<div class="legend" part="legend">${e.map((t,r)=>{let s=Ur(t.planet,r);return _a`<span class="legend-item"><span class="legend-swatch" style="${`border-block-start-color: ${s}`}"></span> ${Fe(w(t.planet))}${y(t,"planet")}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?hn:_a`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,r)=>{let s=Ur(t.planet,r),i=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return _a`<details class="interp-card" part="reading" name="acg-lines" ?open="${r===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${Fe(w(t.planet))}${y(t,"planet")} </span>${V()}</summary><div class="interp-body">${i.filter(([,o])=>o).map(([o,l])=>_a`<p class="interp-line"><span class="code">${o}</span>${l}</p>`)}</div></details>`})}</section>`}};qr.endpoints=Cc,qr.styles=[f,He,z,F,Oy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg{border-radius:var(--roxy-radius-sm);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border) 12%, transparent);stroke:var(--roxy-border);stroke-width:.8px}.land{fill:var(--roxy-secondary);opacity:.13}.grat{stroke:var(--roxy-border);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .3125)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:calc(var(--roxy-text-base) * .5);font-weight:var(--roxy-weight-bold)}.birthplace{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .5625)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.legend-swatch{inline-size:var(--roxy-space-md);border-block-start:var(--roxy-line-thick) solid;block-size:0}.legend-note{width:100%}.summary,.interp-line{font-size:var(--roxy-text-sm)}.interp-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0;align-self:center}.interp-line .code{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}`],qr=m([x("roxy-astrocartography-map")],qr);import{css as Hy,html as je,nothing as Lt}from"lit";import{css as Fy}from"lit";var By=new Set(["wood","fire","earth","metal","water"]);function kt(n){let a=xt(n??"");return By.has(a)?`element-${a}`:""}var ua=Fy`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var jy={year:"Year",month:"Month",day:"Day",hour:"Hour"},ih={harmonious:"Harmonious",challenging:"Challenging"},oh={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},lh={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},Yr=class extends g{renderData(a){let e=this.effectiveLang(),t=q(e,a.birthData?.date,a.birthData?.time);return je`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?je`<span class="born">${t}</span>`:Lt} ${a.zodiacAnimal?je`<span class="roxy-chip animal">${y(a,"zodiacAnimal")}</span>`:Lt}</header><div class="pillars-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(a.pillars??[]).map(r=>this.renderPillar(r))}</div></div>${this.renderDayMaster(a)} ${this.renderElements(a)} ${this.renderInteractions(a)} ${a.summary&&!this.hideReadings?je`<p class="summary" part="section summary">${a.summary}</p>`:Lt} ${er(a.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(a){let e=jy[a.position],t=a.position==="day";return je`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos roxy-label">${e?this.t(e):R(a.position)}</span> <span class="god">${y(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} <span class="element-word ${kt(a.stem?.element)}">${y(a.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${y(a.branch,"animal")}</span> ${a.hiddenStems?.length?je`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${a.hiddenStems.map(r=>je`<li><span lang="zh">${r.stem?.chinese??""}</span> <span class="role">${r.role}</span> ${y(r.tenGod,"name")}</li>`)}</ul>`:Lt} ${a.naYin?je`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${a.naYin}</span>`:Lt}</div>`}renderDayMaster(a){let e=a.dayMaster;return e?je`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b class="element-word ${kt(e.element)}">${y(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?je`<p part="reading">${e.nature}</p>`:Lt}</div></section>`:Lt}renderElements(a){let e=a.fiveElements??[];if(e.length===0)return Lt;let t=this.effectiveLang(),r=e.reduce((s,i)=>s+(i.count??0),0)||1;return je`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>je`<div class="element ${kt(s.element)}" part="label-track"><span class="element-word">${y(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/r*100}%"></span></span> <span class="element-count">${_(t,s.count??0)} ${s.level&&lh[s.level]?this.t(lh[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?je`<p class="element-reading" part="reading">${s.reading}</p>`:Lt}</div>`)}</div></section>`}renderInteractions(a){let e=a.interactions??[];return e.length===0?Lt:je`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>je`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&oh[t.type]?this.t(oh[t.type]):R(t.type??"")}</b> ${t.quality?je`<span class="roxy-chip tag tag-${t.quality}">${t.quality&&ih[t.quality]?this.t(ih[t.quality]):t.quality}</span>`:Lt} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?je`<span>${t.transformsTo}</span>`:Lt} ${t.variety?je`<span>${t.variety}</span>`:Lt} ${t.type==="punishment"&&typeof t.complete=="boolean"?je`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:Lt}</div>${t.meaning&&!this.hideReadings?je`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:Lt}</li>`)}</ul></section>`}};Yr.endpoints=Tc,Yr.styles=[f,G,ua,Hy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.born{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.animal{margin-inline-start:auto}.pillars-wrap{min-width:0;overflow-x:auto}.pillars{grid-template-columns:repeat(4,minmax(12ch,1fr));display:grid}.pillar{gap:var(--roxy-space-xs);padding:var(--roxy-space-sm);border-block-start:var(--roxy-line-thick) solid transparent;text-align:center;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.pillar-self{border-block-start-color:var(--roxy-accent)}.pillar-self .pos{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 2);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.nayin,.hidden .role{color:var(--roxy-muted)}.romanised,.nayin{font-size:var(--roxy-text-xs)}.rule{inline-size:100%;margin:calc(var(--roxy-space-unit) / 2) 0;border:0;border-block-start:1px solid var(--roxy-border)}.hidden{gap:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);text-align:start;margin:0;padding:0;list-style:none;display:grid}.nayin{text-align:start}.master{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.master .hanzi{font-size:calc(var(--roxy-text-base) * 1.5)}.master p{color:var(--roxy-secondary);flex-basis:100%;margin:0}.elements{gap:var(--roxy-space-xs);display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:grid}.element-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.25lh;overflow:hidden}:where(.element){--_element:var(--roxy-accent)}.element-fill{background:var(--_element);height:100%;display:block}.element-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.element-reading,.interaction-meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);margin:0}.element-reading{grid-column:1/-1}:is(.master p,.element-reading,.interaction-meaning){border-block-start:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{gap:calc(var(--roxy-space-unit) / 2);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.interaction:first-child{border-block-start:0;padding-block-start:0}.interaction-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.tag-harmonious{color:var(--roxy-success-fg)}.tag-challenging{color:var(--roxy-danger-fg)}.summary{margin:0}`],Yr=m([x("roxy-bazi-chart")],Yr);import{css as Ky,html as Wr,nothing as Gi}from"lit";function fa(n,a){return!a||!n?.length?"":n.map(e=>a[String(e)]?.[0]).filter(Boolean).join(", ")}function ll(n,a){return!a||typeof n!="number"?"":(a[String(n)]??[]).join(", ")}var Zr=class extends g{renderData(a){let e=a.grahas??[],t=a.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let r=e.filter(i=>i.moved),s=a.movedCount??r.length;return Wr`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header>${r.length?Wr`<div class="moved-list" part="table moved">${r.map(i=>this.renderMoved(i,a.houseThemes))}</div>`:Gi} ${t.length?Wr`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Bhava cusps and occupants")}"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(i=>this.renderBhavaRow(i))}</tbody></table></div></details>`:Gi}</div>`}renderMoved(a,e){let t=w(a.graha)??"",r=typeof a.bhava=="number"?fa([a.bhava],e):"";return Wr`<div class="moved-row"><span class="graha">${t?Wr`<span class="glyph roxy-glyph">${t}</span>`:Gi}${a.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:a.rashiHouse??"",to:a.bhava??""})} </span>${r?Wr`<span class="themes">${r}</span>`:Gi}</div>`}renderBhavaRow(a){let e=(a.grahas??[]).join(", ");return Wr`<tr><td class="num">${a.house}</td><td>${a.rashi}</td><td class="num">${b(this.effectiveLang(),a.start,2)}°</td><td class="num">${b(this.effectiveLang(),a.madhya,2)}°</td><td class="num">${b(this.effectiveLang(),a.end,2)}°</td><td class="num">${b(this.effectiveLang(),a.span,2)}°</td><td class="occupants">${e}</td></tr>`}};Zr.endpoints=Ec,Zr.styles=[f,G,Ky`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.lede{margin:0}.lede{font-size:var(--roxy-text-sm)}.moved-row{align-items:baseline;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.shift{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary)}summary{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}`],Zr=m([x("roxy-bhav-chalit-table")],Zr);import{css as Vy,html as Xr,nothing as Fi}from"lit";var ch=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],Jr=class extends g{renderData(a){let e=a.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(r=>r.totalVirupas??0),1);return Xr`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${a.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:a.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(r=>this.renderBhava(r,t,a.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${ch.map(r=>Xr`<div class="legend-row"><span class="swatch" style="background:${r.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(r.source)})}</div>`)}</div></div>`}renderBhava(a,e,t){let r=typeof a.house=="number"?fa([a.house],t):"";return Xr`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:a.house})}</span> <span class="rashi">${a.rashi}</span> ${a.lord?Xr`<span class="lord">${this.t("lord {{graha}}",{graha:a.lord})}</span>`:Fi} <span class="total">${this.t("{{value}} rupas",{value:b(this.effectiveLang(),a.totalRupas,2)})} ${typeof a.rank=="number"?Xr`<span class="rank">#${a.rank}</span>`:Fi}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:b(this.effectiveLang(),a.totalVirupas,1)})}">${ch.map(s=>{let i=Math.max(0,a[s.key]??0);return i>0?Xr`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:b(this.effectiveLang(),i,1)})}"></span>`:Fi})}</div>${r?Xr`<p class="themes">${r}</p>`:Fi}</article>`}};Jr.endpoints=Dc,Jr.styles=[f,G,Vy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.subtitle,.themes{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.row{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row:last-child{border-block-end:0}.row-top{align-items:baseline;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.house{min-width:9ch;font-weight:var(--roxy-weight-bold)}.rashi{color:var(--roxy-secondary)}.lord{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);margin-inline-start:auto}.rank{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:var(--roxy-space-xs)}.bar{border-radius:var(--roxy-radius-full);background:color-mix(in srgb, var(--roxy-border) 55%, transparent);block-size:.5lh;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);display:flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:1.5ch}`],Jr=m([x("roxy-bhava-bala-table")],Jr);import{css as Uy,html as we,nothing as St,svg as dh}from"lit";import{property as qy}from"lit/decorators.js";var jn=["physical","emotional","intellectual","intuitive"],Bi={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function rr(n,a){let e=Bi[n];return e?a(e):R(n)}var Hi={physical:"var(--roxy-danger)",emotional:"var(--roxy-info)",intellectual:"var(--roxy-success)",intuitive:"color-mix(in oklab, var(--roxy-info) 50%, var(--roxy-danger))",aesthetic:"var(--roxy-warning)",awareness:"color-mix(in oklab, var(--roxy-danger) 70%, var(--roxy-info))",spiritual:"color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-info))",passion:"color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-warning))",mastery:"var(--roxy-accent)",wisdom:"var(--roxy-muted)"},Yy={ascending:"ascending through zero",descending:"descending through zero"},Wy={double:"Double day",triple:"Triple day"},sr=class extends g{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},r=Object.entries(t).map(([i,o])=>{let l=typeof o=="number"?o:0,c=Math.abs(l)>1?l/100:l;return[i,c]}),s=e.spotlight;return we`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2>${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?we`<span class="roxy-chip">${R(e.overallPhase)}</span>`:St} ${typeof e.energyRating=="number"?we`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:St}</div></header>${s?we`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${Hi[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${rr(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?we`<span class="energy">${fe(this.effectiveLang(),s.value,0)}</span>`:St} ${s.phase?we`<span class="roxy-chip">${R(s.phase)}</span>`:St}</div>${s.message&&!this.hideReadings?we`<p>${s.message}</p>`:St}</div>`:St}<div class="bars" part="chart bars" role="list">${r.map(([i,o])=>{let l=Math.abs(o)*50,c=Hi[i]??"var(--roxy-accent)";return we`<div class="bar" role="listitem"><span>${rr(i,d=>this.t(d))}</span> <span class="track"><span class="fill ${o<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${fe(this.effectiveLang(),o*100,0)}</span></div>`})}</div>${this.hideReadings?St:we`${e.dailyMessage?we`<p>${e.dailyMessage}</p>`:St} ${e.advice?we`<p>${e.advice}</p>`:St}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return we`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let r=600,s=160,i=r/Math.max(t.length-1,1),o=e.summary;return we`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${vt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${r} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${r}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${jn.map(l=>{let c=t.map((p,h)=>{let u=p[l]??0,v=h*i,L=s/2-u/100*(s/2-8);return`${v.toFixed(2)},${L.toFixed(2)}`}).join(" "),d=Hi[l]??"var(--roxy-secondary)";return dh`<polyline points=${c} fill="none" stroke=${d} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?dh`<circle cx=${(c*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[C(this.effectiveLang(),l.date),Xe(this.effectiveLang(),(l.criticalCycles??[]).map(d=>rr(d,p=>this.t(p)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" \xB7 ")}</title></circle>`:St)}</svg><div class="forecast-axis" part="legend"><span>${C(this.effectiveLang(),t[0]?.date)}</span><span>${C(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${jn.map(l=>we`<span class="key"><span class="dot" style="${`background: ${Hi[l]}`}"></span>${this.t(Bi[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${o?we`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),C(this.effectiveLang(),o.bestDay))} ${this.stat(this.t("Worst day"),C(this.effectiveLang(),o.worstDay))} ${this.stat(this.t("Average energy"),typeof o.averageEnergy=="number"?`${o.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof o.criticalDayCount=="number"?`${o.criticalDayCount}`:"")}</dl>`:St} ${this.renderForecastData(e)} ${o?.periodAdvice&&!this.hideReadings?we`<p>${o.periodAdvice}</p>`:St}</section>`}renderForecastData(e){let t=this.effectiveLang();return we`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${V()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${jn.map(r=>we`<th scope="col">${this.t(Bi[r])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(r=>we`<tr><th scope="row"><time datetime="${r.date}">${C(t,r.date)}</time></th>${jn.map(s=>we`<td>${fe(t,r[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:r.energyRating})}</td><td>${b(t,r.daysSinceBirth,0)}</td><td>${r.isCritical?Xe(t,r.criticalCycles.map(s=>rr(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],r=e.doubleCriticalDays??[],s=t.map(i=>({label:C(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?rr(i.cycle,o=>this.t(o)):"",this.severityName(i.severity)].filter(Boolean).join(" \xB7 "),body:i.advisory??"",extra:we`<p class="crit-meta">${[i.direction?this.t(Yy[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" \xB7 ")}</p>`}));return we`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2>${this.t("Critical days")}</h2><span class="energy">${vt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="roxy-facts" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),r.length?`${r.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?C(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${r.length>0?we`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:Xe(this.effectiveLang(),r.map(i=>C(this.effectiveLang(),i)||i))})}</p>`:St} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=Wy[e];return t?this.t(t):""}stat(e,t){return t?we`<div><dt>${e}</dt><dd>${t}</dd></div>`:St}};sr.endpoints=Ac,sr.styles=[f,z,se,F,Uy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.head-meta{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.energy{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.spotlight{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm)}.bars{gap:var(--roxy-space-xs);display:grid}.bar{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,16ch) minmax(0,1fr) 7ch;display:grid}.track{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.7lh;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}svg{width:100%;max-width:var(--roxy-chart-max-width,37.5rem);height:auto;display:block}.legend{gap:var(--roxy-space-md);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.key{align-items:center;gap:var(--roxy-space-xs);text-transform:capitalize;display:inline-flex}.dot{border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.dot.critical{background:var(--roxy-danger)}.roxy-facts{margin:0}.roxy-facts dd{font-weight:var(--roxy-weight-bold)}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.forecast-scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}.forecast-table{width:100%}.forecast-table th,.forecast-table td{text-align:end;white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:start}.forecast-axis{justify-content:space-between;gap:var(--roxy-space-sm);width:100%;max-width:var(--roxy-chart-max-width,37.5rem);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:flex}.crit-note{border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.crit-meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([qy({type:String,reflect:true})],sr.prototype,"mode",2),sr=m([x("roxy-biorhythm-chart")],sr);import{css as xu,html as J,nothing as le}from"lit";import{state as bu}from"lit/decorators.js";import{unsafeHTML as vu}from"lit/directives/unsafe-html.js";var fh=14,Zy=86,xh=0,Xy=102,nr=6,bh=(Zy-fh)*nr,Jy=(Xy-xh)*nr;function es(n,a){return{x:(n-fh)*nr,y:(a-xh)*nr}}var M=50,Vi=n=>2*M-n,Kn=1.02*nr,Qy=1.15*nr,Ke=2.87,Rt=4.4,ph=5.65,cl={head:{64:[M-Ke,11.2],61:[M,11.2],63:[M+Ke,11.2]},ajna:{47:[M-Ke,18],24:[M,18],4:[M+Ke,18],17:[M-Ke,20.6],11:[M+Ke,20.6],43:[M,25.3]},throat:{62:[M-Ke,32.4],23:[M,32.4],56:[M+Ke,32.4],16:[M-Rt,34.7],35:[M+Rt,34.7],20:[M-Rt,37.3],12:[M+Rt,37.3],45:[M+Rt,39.6],31:[M-Ke,41.9],8:[M,41.9],33:[M+Ke,41.9]},g:{1:[M,47.7],7:[M-Ke,50.3],13:[M+Ke,50.3],10:[M-ph,53.4],25:[M+ph,53.4],15:[M-Ke,56.8],46:[M+Ke,56.8],2:[M,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[M-Ke,72.7],14:[M,72.7],29:[M+Ke,72.7],34:[M-Rt,75.4],27:[M-Rt,79],59:[M+Rt,79],42:[M-Ke,81.7],3:[M,81.7],9:[M+Ke,81.7]},"solar-plexus":{},root:{53:[M-Ke,90.2],60:[M,90.2],52:[M+Ke,90.2],54:[M-Rt,92.6],19:[M+Rt,92.6],38:[M-Rt,95.3],39:[M+Rt,95.3],58:[M-Rt,98.1],41:[M+Rt,98.1]}},eu={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function tu(){let n={},a={};for(let[e,[t,r]]of Object.entries(cl.spleen))cl["solar-plexus"][eu[Number(e)]]=[Vi(t),r];for(let[e,t]of Object.entries(cl))for(let[r,[s,i]]of Object.entries(t))n[Number(r)]=es(s,i),a[Number(r)]=e;return{points:n,centerOf:a}}var{points:ml,centerOf:Vn}=tu(),pw=bh/2;function Qr(n){return n.map(([a,e])=>es(a,e))}function dl(n,a,e){return Qr([[M-n,a],[M+n,a],[M+n,e],[M-n,e]])}var pl=5.9,hh=[[18.3,68.3],[18.3,82],[30.3,75.15]],hl=[20,84.4],mh=12*nr,au=[63.2,67.9],ru=13.1*nr,gl=[{id:"head",label:"Head",color:"gold",points:Qr([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:Qr([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:dl(pl,31,43.3)},{id:"g",label:"G",color:"gold",points:Qr([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:Qr([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:es(...au),room:ru}},{id:"spleen",label:"Spleen",color:"brown",points:Qr(hh),caption:{at:es(...hl),room:mh}},{id:"sacral",label:"Sacral",color:"red",points:dl(pl,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:Qr(hh.map(([n,a])=>[Vi(n),a])),caption:{at:es(Vi(hl[0]),hl[1]),room:mh}},{id:"root",label:"Root",color:"brown",points:dl(pl,88.5,99.8)}],su=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],nu=iu();function iu(){let n=Vi,a=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${ji(a[0])}`];for(let t=1;t+2<a.length;t+=3)e.push(`C ${ji(a[t])} ${ji(a[t+1])} ${ji(a[t+2])}`);e.push(`L ${Ki(a[a.length-1],n)}`);for(let t=a.length-3;t>=1;t-=3)e.push(`C ${Ki(a[t+1],n)} ${Ki(a[t],n)} ${Ki(a[t-1],n)}`);return e.push("Z"),e.join(" ")}function ji([n,a]){let e=es(n,a);return`${e.x} ${e.y}`}function Ki([n,a],e){let t=es(e(n),a);return`${t.x} ${t.y}`}function ou(n){return n.map(a=>`${a.x},${a.y}`).join(" ")}function vh(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function lu(){return k`<path class="bg-body" d=${nu} />`}function cu(n){let a=[];for(let[e,t]of su){let r=ml[e],s=ml[t];if(!r||!s)continue;a.push(k`<line class="bg-channel" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} />`);let i={x:(r.x+s.x)/2,y:(r.y+s.y)/2};for(let[o,l]of[[e,r],[t,s]]){let c=n.get(o);if(!c)continue;let d=vh(c);a.push(k`<line class="bg-half ${d==="both"?"src-left":d}" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`),d==="both"&&a.push(k`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`)}}return a}function du(n,a,e){return gl.flatMap(t=>{let r=n.has(t.id),s=`bg-center bg-${t.color}${r?" defined":""}`,i=a?.get(t.id)||t.label;return[k`<polygon class=${s} points=${ou(t.points)}><title>${i}: ${r?e.defined:e.open}</title></polygon>`,t.caption?gh(i,t.caption.at,"bg-caption",t.caption.room):gh(i,yh(t.points),r?`defined bg-${t.color}`:"",hu(t.points,yh(t.points).y)*.86)]})}function gh(n,a,e,t){let r=n.split(/\s+/).filter(Boolean),s=r.reduce((c,d)=>Math.max(c,d.length),0),i=Math.min(Qy,t/Math.max(1,s*pu)),o=i*1.05,l=a.y-o*(r.length-1)/2;return k`<text class="bg-center-name ${e}" style=${`font-size:${i}px`} x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${r.map((c,d)=>k`<tspan x=${a.x} y=${l+d*o}>${c}</tspan>`)}</text>`}var pu=.66;function hu(n,a){let e=[];for(let t=0;t<n.length;t++){let r=n[t],s=n[(t+1)%n.length];if(r.y===s.y)continue;let i=Math.min(r.y,s.y),o=Math.max(r.y,s.y);a<i||a>o||e.push(r.x+(a-r.y)/(s.y-r.y)*(s.x-r.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function yh(n){let a=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/a,y:n.reduce((e,t)=>e+t.y,0)/a}}function uh(n,a){return`M ${n.x} ${n.y-Kn} A ${Kn} ${Kn} 0 0 ${a} ${n.x} ${n.y+Kn} Z`}function mu(n,a){let e=[];for(let[t,r]of Object.entries(ml)){let s=Number(t),i=n.get(s),o=i?vh(i):"",l=a.get(s);e.push(k`<g class="bg-gate-node">
8
+ ${o==="both"?[k`<path class="bg-gate-dot on src-left" d=${uh(r,0)} />`,k`<path class="bg-gate-dot on src-right" d=${uh(r,1)} />`]:k`<circle class="bg-gate-dot ${o&&`on ${o}`}" cx=${r.x} cy=${r.y} r=${Kn} />`}
9
9
  <text class="bg-gate ${i?"on":""}" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${s}</text>
10
10
  ${l?k`<title>${l}</title>`:""}
11
- </g>`)}return e}var dl=`0 0 ${gh} ${Ky}`;function pl(n){return k`
12
- ${eu()}
13
- ${tu(n.gateSources)}
14
- ${au(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
- ${nu(n.gateSources,n.gateTitles)}
16
- `}function hl(n,a){return n==="design"?a("Design"):n==="personality"?a("Personality"):n??""}function iu(n){let a=new Map;for(let e of n){if(e.gate==null)continue;let t=a.get(e.gate);t?t.push(e):a.set(e.gate,[e])}return a}function ml(n){return n.planet?w(n.planet)??y(n,"planet"):""}function ou(n,a){let e=new Map;for(let[t,r]of n){let s=r.map(i=>[ml(i),`${t}${i.line!=null?`.${i.line}`:""}`,hl(i.side,a)].filter(Boolean).join(" "));e.set(t,[a("Gate {{gate}}",{gate:t}),y(r[0],"gateName"),...s].filter(Boolean).join(" \xB7 "))}return e}function gl(n){return new Map(n.map(a=>[a.id,y(a,"name")]))}function uh(n,a={}){let e=ha(a.lang),t=n.centers??[],r=iu(n.gates??[]);return k`<svg class="chart bodygraph" xmlns=${pa} part="chart" viewBox=${dl} preserveAspectRatio="xMidYMid meet" role="img" aria-label=${e("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}><title>${e("Human Design bodygraph")}</title><desc>${e("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${pl({definedCenters:new Set(t.filter(s=>s.defined).map(s=>s.id)),gateSources:new Map([...r].map(([s,i])=>[s,{left:i.some(o=>o.side==="design"),right:i.some(o=>o.side==="personality")}])),gateTitles:ou(r,e),centerNames:gl(t),stateWords:{defined:e("Defined"),open:e("Open")}})}</svg>`.markup}import{css as lu}from"lit";var ji=lu`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg));margin-inline:calc(-1 * var(--roxy-space-lg))}}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend .swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-secondary);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.legend .swatch.source{border-radius:var(--roxy-radius-full);border-color:#0000}`;import{css as cu,html as nr,nothing as ts}from"lit";var ir=[se,cu`.roxy-facts{margin:0}.lead{font-size:var(--roxy-text-sm);margin:0}.keynotes{gap:var(--roxy-space-xs);margin:0;display:grid}.keynotes dd{margin:0}`];function _a(n){let a=n.filter(e=>!!e.value);return a.length===0?ts:nr`<dl class="roxy-facts" part="facts">${a.map(e=>nr`<div part="fact"><dt>${e.label}</dt><dd>${e.value}</dd></div>`)}</dl>`}function Ki(n,a,e){return!n&&!a?ts:nr`<div class="themes roxy-chips" part="themes">${n?nr`<span class="roxy-chip" data-tone="success">${e("Signature: {{value}}",{value:n})}</span>`:ts} ${a?nr`<span class="roxy-chip" data-tone="danger">${e("Not-self: {{value}}",{value:a})}</span>`:ts}</div>`}function Vi(n,a){return!n?.personality&&!n?.design?ts:nr`<dl class="keynotes" part="keynotes">${n.personality?nr`<dt>${a("Line {{line}} \xB7 Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:ts} ${n.design?nr`<dt>${a("Line {{line}} \xB7 Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:ts}</dl>`}var mu=["gold","green","brown","red"],or=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.side="personality"}renderData(e){let t=e.centers??[],r=gl(t);return X`<div class="wrap bodygraph" part="card"><header class="head" part="header"><div><h2>${this.t("Bodygraph")}</h2>${e.designInstantUtc?X`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${vp(this.effectiveLang(),e.designInstantUtc)}</time></div>`:le}</div>${e.type||e.profile?X`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" \xB7 ")}</div>`:le}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(hu(uh(e,{lang:this.effectiveLang()})),this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,r)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],r)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}renderSummary(e,t){let r=e.incarnationCross;return X`<div class="summary" part="details">${_a([{label:this.t("Type"),value:y(e,"type")},{label:this.t("Strategy"),value:y(e,"strategy")},{label:this.t("Authority"),value:y(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:y(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?X`<p class="lead">${e.typeDescription}</p>`:le} ${r?.name?X`<p class="cross">${r.name} ${r.gates?.length?X`<span class="gates">(${r.gates.join(", ")})</span>`:le}</p>`:le} ${Ki(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=mu.map(r=>[r,cl.filter(s=>s.color===r).map(s=>e.get(s.id)||s.label).join(", ")]);return X`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-left"></span>${this.t("Design")} <span class="swatch source src-right"></span>${this.t("Personality")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([r,s])=>X`<span><span class="swatch bg-${r} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,r=[{label:this.t("Strategy"),aside:y(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:y(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:Vi(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:y(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?y(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(r,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return le;let r=new Map;for(let i of e){let o=i.circuit??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return X`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...r].map(([i,o])=>X`<div class="group">${i?X`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(o[0],"circuit")})}</p>`:le} ${o[0]?.circuitDescription?X`<p class="group-note">${o[0].circuitDescription}</p>`:le} ${o.map(l=>X`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${y(l,"name")}</span> </span>${j()} <span class="interp-aside"><span class="roxy-chips">${(l.centers??[]).map(c=>X`<span class="roxy-chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?X`<p>${l.description}</p>`:le}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return le;let t=e.filter(r=>r.defined).length;return X`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((r,s)=>X`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(r,"name")}</span> ${j()} <span class="interp-aside"><span class="roxy-chips"><span class="roxy-chip ${r.defined?"on":""}">${r.defined?this.t("Defined"):this.t("Open")}</span> ${r.motor?X`<span class="roxy-chip">${this.t("Motor")}</span>`:le} ${r.awareness?X`<span class="roxy-chip">${this.t("Awareness")}</span>`:le}</span></span></summary><div class="interp-body">${r.theme?X`<p>${r.theme}</p>`:le} ${!r.defined&&r.notSelfQuestion?X`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${r.notSelfQuestion}</dd></dl>`:le} ${r.biology?X`<p class="footnote">${this.t("Biology")}. ${r.biology}</p>`:le} ${r.gates?.length?X`<p class="footnote">${this.t("Gates {{gates}}",{gates:r.gates.join(", ")})}</p>`:le}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return le;let r=t.filter(d=>d.side==="personality"),s=t.filter(d=>d.side==="design"),i=r.length>0&&s.length>0,o=this.side,l=i?o==="design"?s:r:t,c=i?e.sides?.[o]:void 0;return X`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${i?mt({items:[{id:"personality",label:`${this.t("Personality")} (${r.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:o,onSelect:d=>{this.side=d},label:this.t("Chart sides"),idPrefix:"hd",controls:true}):le}<div id="${i?`hd-panel-${o}`:le}" part="panel" role="${i?"tabpanel":le}" aria-labelledby="${i?`hd-tab-${o}`:le}">${c?X`<p class="side-note">${c}</p>`:le} ${l.map((d,h)=>this.renderGate(d,h===0))}</div></section>`}renderGate(e,t){let r=ml(e),s=y(e,"planet"),i=e.ichingHexagram;return X`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${r?X`<span class="glyph roxy-glyph" aria-hidden="true">${r}</span>`:le} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${j()} ${s?X`<span class="interp-aside"><small>${s}</small></span>`:le}</summary><div class="interp-body">${e.gateDescription?X`<p>${e.gateDescription}</p>`:le} ${e.lineMeaning?X`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:le} ${e.planetDescription?X`<p class="footnote">${s}. ${e.planetDescription}</p>`:le} ${i?.number?X`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:le}</div></details>`}};or.endpoints=Cc,or.styles=[u,He,et,z,K,ir,Ti,ji,du`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.layout{align-items:start;gap:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.summary{gap:var(--roxy-space-md);display:grid}.cross{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm)}.cross .gates{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.legend-row{flex-basis:100%}.legend-row .swatch:not(:first-child){margin-inline-start:var(--roxy-space-md)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.side-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note,.side-note{margin-block-end:var(--roxy-space-sm)}.side-note{padding-block-start:var(--roxy-space-sm)}.roxy-chip.on{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.glyph{color:var(--roxy-accent-ink)}`],m([pu()],or.prototype,"side",2),or=m([x("roxy-bodygraph")],or);import{css as gu,html as as,nothing as Kn}from"lit";var yu={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},rs=class extends g{renderData(a){let e=a.karakas??[];return e.length?as`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2>${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip roxy-chip">${a.scheme??""}</span> ${a.scheme?yu[a.scheme]??"":""}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Atmakaraka")}</dt><dd>${a.atmakaraka??""}</dd></div><div><dt>${this.t("Darakaraka")}</dt><dd>${a.darakaraka??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Chara karakas")}"><table class="stacked" role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,r)=>this.renderRow(t,r===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(a,e){let t=w(a.graha)??"",r=N(a.rashi)??"";return as`<tr class="${e?"lead-row":""}"><td class="name">${a.name??""}${a.abbreviation?as`<span class="abbr">${a.abbreviation}</span>`:Kn}</td><td data-inline data-label="${this.t("Graha")}">${t?as`<span class="glyph roxy-glyph">${t}</span>`:Kn}${a.graha??""}</td><td data-inline data-label="${this.t("Rashi")}">${r?as`<span class="glyph roxy-glyph">${r}</span>`:Kn}${a.rashi??""}</td><td data-inline data-label="${this.t("Degree")}">${b(this.effectiveLang(),a.degreeInRashi,2)}</td><td data-inline data-label="${this.t("Ranked on")}">${b(this.effectiveLang(),a.rankingDegree,2)} ${a.isReversed?as`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:Kn}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?as`<p>${a.significations}</p>`:Kn}</td></tr>`}};rs.endpoints=Tc,rs.styles=[u,I,se,...Mi,gu`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);display:grid}h2,p{margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.scheme-chip{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.reversed{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],rs=m([x("roxy-chara-karakas")],rs);import{css as uu,html as lr,nothing as Ui}from"lit";var ss=class extends g{isCurrent(a){let e=Date.now(),t=Date.parse(a.start),r=Date.parse(a.end);return Number.isNaN(t)||Number.isNaN(r)?false:e>=t&&e<r}renderTile(a){let e=a.effect==="Good"?"good":a.effect==="Bad"?"bad":"neutral",t=this.isCurrent(a),r=w(a.lord)??"",s=da(this.effectiveLang(),a),i=e==="good"?this.t("Favourable"):e==="bad"?this.t("Unfavourable"):"";return lr`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${a.name}${t?lr`<span class="now-badge">${this.t("Now")}</span>`:Ui} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${r?lr`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:Ui} ${a.lord} ${i?lr`<span aria-hidden="true">·</span><span class="tile-effect">${i}</span>`:Ui}</span></div>`}renderData(a){let{date:e,dayChoghadiya:t,nightChoghadiya:r}=a;return lr`<div class="wrap" part="card"><div class="header" part="header"><h2>${this.t("Choghadiya")}</h2>${e?lr`<p class="roxy-label">${C(this.effectiveLang(),e)}</p>`:Ui}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):lr`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${r&&r.length>0?r.map(s=>this.renderTile(s)):lr`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};ss.endpoints=Ec,ss.styles=[u,uu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs);display:grid}h2,h3,p{margin:0}.cho-grid{gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}@container (width>=40rem){.cho-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.period-heading{margin-block-end:var(--roxy-space-xs)}.cho-tile{align-items:center;gap:0 var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr) auto;display:grid}.cho-tile:last-child{border-block-end:0}.cho-tile.now{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-sm)}.now-badge{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-sm)}.tile-name{min-width:0;font-weight:var(--roxy-weight-bold);overflow-wrap:anywhere;grid-column:1}.good :is(.tile-name,.tile-effect){color:var(--roxy-success-fg)}.bad :is(.tile-name,.tile-effect){color:var(--roxy-danger-fg)}.tile-time{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;grid-area:1/2/3;align-self:center}.tile-lord{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;grid-column:1;display:flex}`],ss=m([x("roxy-choghadiya-grid")],ss);import{css as fu,html as Pe,nothing as at}from"lit";import{property as xu}from"lit/decorators.js";var bu=["sun","moon","venus","mars"],fh=["fire","earth","air","water"],xh={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},vu={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},cr=class extends g{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[r,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[r]=s);return t}return{}}renderData(e){let t=e.overallScore,r=this.getBreakdown(),s="rating"in e?e.rating:void 0,i="archetype"in e?e.archetype:void 0,o="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,d="strengths"in e?e.strengths:void 0,h="challenges"in e?e.challenges:void 0,p="keyAspects"in e?e.keyAspects:void 0,f=!this.hideReadings,v=this.t(xh[this.mode]??xh.astrology);return Pe`<article class="card" part="card" aria-label="${v}"><div class="head" part="header"><h2>${v}</h2><div>${typeof t=="number"?Pe`<div class="score">${Math.round(t)}</div>`:at} ${s?Pe`<div class="rating">${s}</div>`:at}</div></div>${Object.keys(r).length>0?Pe`<div role="list" part="details breakdown">${Object.entries(r).map(([L,$])=>Pe`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${L}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,$))}%"></span></span> <span>${Math.round($)}</span></div>`)}</div>`:at} ${i?Pe`<p><span class="archetype">${i.label}</span> ${i.description&&f?Pe`· ${i.description}`:at}</p>`:at} ${l&&f?Pe`<p>${l}</p>`:at} ${c&&f?Pe`<p class="body">${c}</p>`:at} ${o&&f?Pe`<p class="body">${o}</p>`:at} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${f&&((d?.length??0)>0||(h?.length??0)>0)?Pe`<div class="lists" part="section strengths-challenges">${d?.length?Pe`<div><h3>${this.t("Strengths")}</h3><ul>${d.map(L=>Pe`<li>${L}</li>`)}</ul></div>`:at} ${h?.length?Pe`<div><h3>${this.t("Challenges")}</h3><ul>${h.map(L=>Pe`<li>${L}</li>`)}</ul></div>`:at}</div>`:at} ${p?.length?Pe`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul>${p.slice(0,6).map(L=>Pe`<li>${Lu(this.effectiveLang(),L,f)}</li>`)}</ul></div></div>`:at}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Pe`<p class="counts" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Pe`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:at} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`:at}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return at;let r=e?.persons,s=bu.map(i=>{let o=t[i];if(!o)return null;let l=c=>{let d=M((c==="person1"?o.person1Sign:o.person2Sign)??""),h=r?.[c]?.[i]?.degree,p=typeof h=="number"?` ${Math.round(h)}\xB0`:"";return`${d}${p}`};return{glyph:w(i),label:M(i),aside:Xe(this.effectiveLang(),[l("person1"),l("person2")]),body:o.description??""}}).filter(i=>i!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return at;let t=e.person1,r=e.person2,s=Math.max(1,...fh.map(o=>Math.max(t?.[o]??0,r?.[o]??0))),i=e.sharedElement?.toLowerCase();return Pe`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row el-head"><span></span> <span class="roxy-label">${this.t("Person 1")}</span> <span class="roxy-label">${this.t("Person 2")}</span></div>${fh.map(o=>{let l=t?.[o]??0,c=r?.[o]??0;return Pe`<div class="${o===i?"el-row shared":"el-row"}"><span class="el-name">${o}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?Pe`<p class="shared-note">${e.description}</p>`:at}</section>`}renderSubScores(){let e=this.data;if(!e)return at;let t=[];if("lifePath"in e){let r=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,i]of r)i&&t.push({label:this.t(s),aside:[Xe(this.effectiveLang(),[String(i.person1),String(i.person2)]),ue(this.effectiveLang(),i.compatibility,0)].filter(Boolean).join(" \xB7 "),body:i.description??""})}if("cycles"in e&&e.cycles)for(let[r,s]of Object.entries(e.cycles))s&&t.push({label:ar(r,i=>this.t(i)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:ue(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(vu[s.phase]):""].filter(Boolean).join(" \xB7 "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};cr.endpoints=Dc,cr.styles=[u,z,K,fu`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.head h2{text-transform:capitalize}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.rating{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.bar-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:14ch minmax(0,1fr) 4ch;display:grid}.bar,.el-bar .track{block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-row>span:last-child{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}.archetype{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}p.body{font-size:var(--roxy-text-sm)}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.block>h3{margin-block-end:var(--roxy-space-sm)}.elements{gap:var(--roxy-space-sm);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:8ch minmax(0,1fr) minmax(0,1fr);display:grid}.el-row .el-name{text-transform:capitalize}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold)}.el-head span:nth-child(2){text-align:end}.el-bar{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{flex:auto;display:flex}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-secondary)}.shared-note{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-sm)}`],m([xu({type:String,reflect:true})],cr.prototype,"mode",2),cr=m([x("roxy-compatibility-card")],cr);function Lu(n,a,e){let t=$t(a),r=typeof a.orb=="number"?` (orb ${b(n,a.orb,1)}\xB0)`:"",s=[a.planet1,t,a.planet2].filter(Boolean).join(" ");return a.description&&e?`${s}${r} \xB7 ${a.description}`:`${s}${r}`}import{css as $u,html as qi,nothing as Yi}from"lit";var bh={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},wu={fortunate:"success",unfortunate:"danger",mixed:"warning"},ns=class extends g{renderData(a){let e=_(this.effectiveLang(),a.number);return qi`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="roxy-label">${this.t("Compound number")}</p>${a.name?qi`<h2>${a.name}</h2>`:Yi}</div></header><ul class="badges roxy-chips" part="details"><li>${this.t("Root number {{n}}",{n:_(this.effectiveLang(),a.root)})}</li><li class="roxy-chip" data-tone="${wu[a.nature]??Yi}">${bh[a.nature]?this.t(bh[a.nature]):R(a.nature)}</li>${typeof a.sameAs=="number"?qi`<li>${this.t("Same meaning as {{n}}",{n:_(this.effectiveLang(),a.sameAs)})}</li>`:Yi}</ul>${a.meaning&&!this.hideReadings?qi`<p part="section readings">${a.meaning}</p>`:Yi}</article>`}};ns.endpoints=Ac,ns.styles=[u,$u`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.hero>div{min-width:0}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.badges>li{font-variant-numeric:tabular-nums}`],ns=m([x("roxy-compound-number")],ns);import{css as Cu,html as Rt,nothing as xa}from"lit";var ku={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},Su=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),Ru={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function Wi(n){let a=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let o=Ru[i];if(o){e.push(o);continue}let l=ku[i]??(Su.has(i)?i:"");l&&a.push(l)}let[t,r]=a;if(!t)return"var(--roxy-border, #e4e4e7)";let s=r?`color-mix(in srgb, ${t}, ${r})`:t;for(let[i,o]of e)s=`color-mix(in srgb, ${s} ${o}%, ${i})`;return s}var is=class extends g{renderData(a){let e=a.colors??[],t=a.keywords??[],r=a.pairsWith??[],s=wi(this.effectiveLang(),a.birthMonth)||void 0,i=a.name??this.t("Crystal");return Rt`<article class="wrap" part="card" aria-label="${i}"><div class="hero" part="header">${a.imageUrl?Rt`<img class="photo" part="chart" src="${a.imageUrl}" alt="${i}" loading="lazy">`:xa}<div><h2>${a.name}</h2>${a.description&&!this.hideReadings?Rt`<p class="desc">${a.description}</p>`:xa}</div></div><dl class="roxy-facts" part="details">${this.attr(this.t("Planet"),a.planet)} ${this.attr(this.t("Hardness"),typeof a.hardness=="number"?this.t("{{value}} Mohs",{value:b(this.effectiveLang(),a.hardness)}):void 0)} ${this.attr(this.t("Vibration"),a.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),a.chakras)} ${this.list(this.t("Zodiac"),a.zodiacSigns)} ${this.list(this.t("Elements"),a.elements)} ${e.length?Rt`<div><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(o=>Rt`<span class="color"><span class="dot" style="${`background:${Wi(o)}`}"></span>${o}</span>`)}</div></dd></div>`:xa}</dl>${this.renderMeaning(a.meaning)} ${t.length&&!this.hideReadings?Rt`<section part="section keywords"><h3>${this.t("Keywords")}</h3><ul class="chips roxy-chips">${t.map(o=>Rt`<li>${o}</li>`)}</ul></section>`:xa} ${a.affirmation&&!this.hideReadings?Rt`<p class="affirmation">${a.affirmation}</p>`:xa} ${r.length?Rt`<section part="section pairs-with"><h3>${this.t("Pairs with")}</h3><ul class="chips roxy-chips">${r.map(o=>Rt`<li>${String(o).replace(/-/g," ")}</li>`)}</ul></section>`:xa}</article>`}attr(a,e){return e==null||e===""?xa:Rt`<div><dt>${a}</dt><dd>${e}</dd></div>`}list(a,e){return e?.length?Rt`<div><dt>${a}</dt><dd>${e.join(", ")}</dd></div>`:xa}renderMeaning(a){if(!a||this.hideReadings)return xa;let t=[[this.t("Spiritual"),a.spiritual],[this.t("Emotional"),a.emotional],[this.t("Physical"),a.physical]].filter(([,r])=>!!r);return t.length===0?xa:Rt`<div class="meaning" part="section meaning">${t.map(([r,s])=>Rt`<h3>${r}</h3><p>${s}</p>`)}</div>`}};is.endpoints=Pc,is.styles=[u,se,Cu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:flex-start;gap:var(--roxy-space-md);display:flex}.photo{border-radius:var(--roxy-radius-md);object-fit:cover;background:var(--roxy-border);flex:none;block-size:4lh;inline-size:4lh}.hero h2{margin-block-end:var(--roxy-space-xs)}.desc,.meaning p{font-size:var(--roxy-text-sm)}.colors{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.color{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);text-transform:capitalize;display:inline-flex}.dot{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.meaning h3,section>h3{margin-block-end:var(--roxy-space-xs)}.meaning p{margin-block-end:var(--roxy-space-sm)}.chips>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`],is=m([x("roxy-crystal-card")],is);import{css as Tu,html as os,nothing as vh}from"lit";import{property as Eu}from"lit/decorators.js";var dr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return os`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(i=>os`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?os`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:os`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?os`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:Xe(this.effectiveLang(),i.colors)})}">${i.colors.map(o=>os`<span class="swatch" style="${`background:${Wi(o)}`}" title="${o}"></span>`)}</div>`:vh}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?os`<div class="detail" part="detail">${this.openedRow}</div>`:vh}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:wi(this.effectiveLang(),e.month)}):this.t("Crystals")}};dr.endpoints=Mc,dr.styles=[u,Tu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],m([Eu({type:String,reflect:true})],dr.prototype,"heading",2),dr=m([x("roxy-crystal-grid")],dr);import{css as Du,html as ot,nothing as lt}from"lit";import{property as Au,state as Pu}from"lit/decorators.js";function Lh(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function yl(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function ul(n){if(!n)return"";let a=[];return n.years&&a.push(`${n.years}y`),n.months&&a.push(`${n.months}m`),n.days&&a.push(`${n.days}d`),a.length?a.join(" "):"0d"}function $h(n,a){return fa(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,a)}function Zi(n,a){let e=C(n,a.startDate);return e&&e===C(n,a.endDate)?rn(n,a.startDate,a.endDate):Lt(n,a.startDate,a.endDate)}var Na=class extends g{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),r=t.length?Math.max(...t.map(d=>d.durationYears)):0,s=_u(t.length?Math.min(...t.map(d=>d.durationYears)):0),i=this.hideReadings?[]:this.readings(e,t),o=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...o.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(d=>d.id===this.view)?this.view:"timeline";return ot`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?mt({items:l,active:c,onSelect:d=>{this.view=d},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:true}):lt}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:lt}">${c==="timeline"?ot`${this.period==="current"?this.renderCurrent(e):lt} ${t.length>0?ot`<div class="timeline" part="chart timeline" role="list">${t.map(d=>this.renderBar(d,r,s,e.houseThemes))}</div>`:lt}`:lt} ${c==="readings"?this.renderReadings(i):lt} ${c==="frame"?this.renderFrame(o):lt}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?ot`<div class="nakshatra">${t.join(" \u203A ")}</div>`:"nakshatraName"in e&&e.nakshatraName?ot`<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>`:lt}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let r="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${r}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${b(this.effectiveLang(),e.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",Br(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let r="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${ul(e.birthDashaBalance)} of the opening ${r}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return ot`<dl class="roxy-facts" part="details frame">${e.map(([t,r])=>ot`<div><dt>${t}</dt><dd>${r}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=yl(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Lh(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=yl(e);if(!t)return lt;let r=t.period,s=Zi(this.effectiveLang(),r),i=r.nominalStartDate?C(this.effectiveLang(),r.nominalStartDate):"";return ot`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:r.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof r.durationYears=="number"?` (${Mu(this.effectiveLang(),r.durationYears)})`:""})} ${i?ot`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:lt}</p>`}readings(e,t){let r=[],s=yl(e);if(s?.period.interpretation&&r.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Zi(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let o=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,d]of o){if(!c?.interpretation)continue;let h=ul(d);r.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:h?this.t("{{balance}} left",{balance:h}):Zi(this.effectiveLang(),c),body:c.interpretation})}}let i=t.find(o=>this.isCurrent(o));return i?.interpretation&&r.push({label:`${i.planet} ${Lh(e)}`,aside:Zi(this.effectiveLang(),i),body:i.interpretation}),r}renderCurrent(e){if(!("mahadasha"in e))return lt;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return ot`<div class="current" part="details current">${t.map(([r,s,i])=>{if(!s)return lt;let o=ul(i),l=$h(s.significators,e.houseThemes);return ot`<div><span class="roxy-label">${this.t(r)}</span> <strong>${s.planet}</strong> ${o?ot`<small>${this.t("{{balance}} left",{balance:o})}</small>`:lt} ${l?ot`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:lt}</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 false;let t=Date.now(),r=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(r)||Number.isNaN(s)?false:t>=r&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),r=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(r)||s<t||s>=r||r<=t?-1:(s-t)/(r-t)}renderBar(e,t,r,s){let i=e.durationYears,o=t>0?i/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,d=l?"bar-track bar-now":"bar-track",h=$h(e.significators,s),p=["bar",l?"now":"",r==="time"?"fine":""].filter(Boolean).join(" ");return ot`<div class="${p}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?ot`<span class="now-badge">${this.t("Now")}</span>`:lt} </span><span class="${d}"><span class="bar-fill" style="width:${o}%"></span> ${c>=0?ot`<span class="bar-progress" style="left:${c*o}%" aria-hidden="true"></span>`:lt} </span><span class="dates">${fp(this.effectiveLang(),e.startDate,e.endDate,r)} </span>${h?ot`<span class="houses">${this.t("Signifies {{houses}}",{houses:h})}</span>`:lt}</div>`}};Na.endpoints=_c,Na.styles=[u,z,se,K,et,Du`.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([Au({type:String,reflect:true})],Na.prototype,"period",2),m([Pu()],Na.prototype,"view",2),Na=m([x("roxy-dasha-timeline")],Na);var fl=365.25;function Mu(n,a){if(a>=1)return`${b(n,a,1)} years`;let e=a*fl;if(e>=1)return`${b(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${b(n,t,1)} hours`:`${b(n,t*60,0)} minutes`}function _u(n){return n>=2?"year":n>=60/fl?"month":n>=1/fl?"day":"time"}import{css as Nu,html as q,nothing as za}from"lit";import{property as zu}from"lit/decorators.js";import{ifDefined as wh}from"lit/directives/if-defined.js";var kh=["title","name","label","heading","overview","summary"],Ou=80,Gu=80,Iu=3,Fu=["imageUrl","image","icon","symbol"],Bu=["imageUrl","image"],Hu=["affirmation","mantra","motto","quote"],ju=new Set(["seed"]),Ku=new Set(["id","slug","key"]),Vu=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),Uu=(n,a)=>n==="symbol"&&typeof a=="string"&&!new RegExp("\\p{L}","u").test(a),qu=8,Sh=1,Yu=12,Wu=n=>n.toLowerCase().replace(/[_-]/g,""),Rh=n=>/^(has|is)([A-Z_]|$)/.test(n),Zu=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,Xu=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,Ju=6;function Qu(n,a){if(!Number.isInteger(a))return false;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function ls(n){return n===null||["string","number","boolean"].includes(typeof n)}function xl(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(ls))}function Ch(n){if(n==null)return true;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return false;let a=Object.values(n);return a.length===0||a.every(Ch)}var cs=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=Ju?q`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:q`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?za:ls(e)?q`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?q`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(ls)?this.renderChips(e):e.every(r=>r!==null&&typeof r=="object"&&!Array.isArray(r))?this.renderObjectArray(e):q`<ol>${e.map(r=>q`<li>${this.renderValue(r)}</li>`)}</ol>`}renderChips(e){return q`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>q`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(p=>this.suppress(p)),r=this.collectKeys(t),s=new Set(r.filter(p=>t.some(f=>typeof f[p]=="string"&&Array.from(f[p]).length>Gu))),i=new Set(r.filter(p=>s.has(p)||t.some(f=>xl(f[p]??null)))),o=s.size>0||i.size>0&&i.size<r.length,l=p=>o?i.has(p)?"col-wide":"col-tight":"",c=i.size>0&&r.length>Iu,d=t.length>Yu;return q`<div class="${c?"roxy-collection":d&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?za:"0"}">${c?q`${d?q`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:za} ${t.map(p=>q`<div class="roxy-record" role="listitem">${this.renderField(p)}</div>`)}`:q`<table class="${s.size?"roxy-table stacked prose":i.size?"roxy-table stacked":"roxy-table"}" role="table">${d?q`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:za}<thead><tr>${r.map(p=>q`<th class="${l(p)}">${re(this.effectiveLang(),p)}</th>`)}</tr></thead><tbody>${t.map(p=>q`<tr>${r.map(f=>q`<td class="${l(f)}" data-label="${re(this.effectiveLang(),f)}">${this.renderCell(p[f],f)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=sn(e),r=kh.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s,i])=>{let o=Wu(s);return ju.has(o)||Uu(s,i)||r&&Ku.has(o)?false:!Vu.has(o)}))}renderObject(e){let t=this.suppress(e),r=kh.find(h=>typeof t[h]=="string"&&t[h].length<=Ou),s=Fu.find(h=>typeof t[h]=="string"&&t[h].startsWith("http")),i=r!=="summary"&&typeof t.summary=="string"?"summary":null,o=Hu.find(h=>typeof t[h]=="string"),l=Object.entries(t).filter(([h,p])=>h!==r&&h!==i&&h!==o&&!Bu.includes(h)&&!Ch(p)),c=l.filter(([,h])=>!xl(h)),d=l.filter(([,h])=>xl(h));return q`${s?q`<img class="roxy-image" src="${String(t[s])}" alt="${r?String(t[r]):this.t("illustration")}" loading="lazy">`:za} ${r?this.depth===0?q`<h2 class="roxy-title" part="header">${t[r]}</h2>`:q`<h3 class="roxy-title" part="header">${t[r]}</h3>`:za} ${i?q`<p class="roxy-summary">${t[i]}</p>`:za} ${o?q`<blockquote class="roxy-quote">${t[o]}</blockquote>`:za} ${c.length>0?q`<dl class="roxy-rows" part="details label-track">${c.map(([h,p])=>q`<dt>${re(this.effectiveLang(),h)}</dt><dd>${this.renderField(p,h)}</dd>`)}</dl>`:za} ${d.map(([h,p])=>this.renderSection(h,p))}`}renderSection(e,t){let r=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),i=re(this.effectiveLang(),e);return r>qu||this.depth>=Sh?q`<details class="roxy-section" ?open="${this.depth<Sh}"><summary>${i}</summary>${s}</details>`:q`<div class="roxy-section">${this.depth===0?q`<h3>${i}</h3>`:q`<h4>${i}</h4>`} ${s}</div>`}renderField(e,t){return e==null?"":e===true&&t!==void 0&&Rh(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:ls(e)?q`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(ls)?this.renderChips(e):q`<roxy-data bare lang="${wh(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===true&&t!==void 0&&Rh(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:ls(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(ls)?e.filter(r=>r!==null).map(r=>this.formatScalar(r)).join(", "):q`<roxy-data bare lang="${wh(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return mi(e)?q`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&Qu(t,e)?String(e):b(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):Zu.test(e)?U(this.effectiveLang(),e):Xu.test(e)?R(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let r of e)for(let s of Object.keys(r))t.add(s);return Array.from(t)}};cs.styles=[u,Nu`.roxy-card{padding:var(--roxy-space-md)}.roxy-card a{color:var(--roxy-accent-ink)}:is(h2,h3,h4,p,dl){margin:0}:is(h2,h3).roxy-title{margin-block-end:var(--roxy-space-sm)}.roxy-summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-md)}dl.roxy-rows{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:fit-content(25%) minmax(0,1fr);display:grid}dl.roxy-rows dd{word-break:break-word;margin:0}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:20lh}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm)}table.roxy-table{width:100%}table.roxy-table caption{text-align:start}table.roxy-table th{white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{max-width:100%;height:auto;border-radius:var(--roxy-radius-md);margin-block-end:var(--roxy-space-md)}.roxy-section{margin-block-start:var(--roxy-space-md)}.roxy-section>:is(h3,h4,summary){font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-xs)}blockquote.roxy-quote{margin:var(--roxy-space-md) 0;border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`,ga],m([zu({attribute:false})],cs.prototype,"depth",2),cs=m([x("roxy-data")],cs);import{css as wf,html as Un,nothing as Cl}from"lit";import{property as kf}from"lit/decorators.js";import{unsafeHTML as Sf}from"lit/directives/unsafe-html.js";import{html as Vn,nothing as Rl}from"lit";var _t=400,ce=20,gt=_t-2*ce,Ge=_t/2,Th=Object.fromEntries(ke.map(n=>[n.toLowerCase(),n])),vl="\u02B3",Ll="\u1D9C",$l="\u02B7";function bl(n){return ke.indexOf(n)}function ef(n){let a=_p(n.graha)??n.graha,e=`${n.isRetrograde?vl:""}${n.combust?Ll:""}${n.war?$l:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${a}${e}`;let{degree:t}=Bt(n.longitude);return`${a} ${t}\xB0${e}`}function tf(n,a,e){let t=[M(n.graha)],r=n.natalReference===true;if(r&&t.push(e("in {{sign}}",{sign:a})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Bt(n.longitude),i=String(s.minute).padStart(2,"0");t.push(r?`D1: ${s.degree}\xB0${i}' ${s.sign}`:`${s.degree}\xB0${i}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${r?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" \xB7 ")}function wl(n,a,e,t,r,s){let i=t-(n.length-1)*r/2;return n.map((o,l)=>{let c=i+l*r;return k`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${ef(o)}<title>${tf(o,a,s)}</title></text>`})}function Ji(n,a={}){let{divisionLabel:e,lagnaOverride:t,states:r,natalReference:s}=a,i=new Set((r?.combustion??[]).map(h=>(h.planet??"").toLowerCase())),o=new Map;for(let h of r?.planetaryWar??[])!h.planet1||!h.planet2||(o.set(h.planet1.toLowerCase(),{opponent:h.planet2,winner:h.winner}),o.set(h.planet2.toLowerCase(),{opponent:h.planet1,winner:h.winner}));let l={};for(let h of ke)l[h.toLowerCase()]=[];let c=t?Th[t.toLowerCase()]??"":"",d=c;for(let[h,p]of Object.entries(n??{})){let f=(p?.rashi??"").toLowerCase();if(h==="Lagna"||p?.graha==="Lagna"){c||(d=Th[f]??"");continue}if(!f||!(f in l))continue;let v=p.graha??h,L=v.toLowerCase();l[f]?.push({graha:v,natalReference:s,longitude:p.longitude,nakshatra:p.nakshatra,isRetrograde:p.isRetrograde,awastha:p.awastha,deeptadi:p.deeptadi,combust:i.has(L)||void 0,war:o.get(L)})}return{lagnaSign:d,placements:l,divisionLabel:e}}var ds=gt/4,af={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function rf(n){let a=af[n]??{col:0,row:0};return{x:ce+a.col*ds,y:ce+a.row*ds,w:ds,h:ds}}function sf(n){let a=ce,e=ce+ds,t=ce+2*ds,r=ce+3*ds,s=_t-ce;return k`
11
+ </g>`)}return e}var yl=`0 0 ${bh} ${Jy}`;function ul(n){return k`
12
+ ${lu()}
13
+ ${cu(n.gateSources)}
14
+ ${du(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
+ ${mu(n.gateSources,n.gateTitles)}
16
+ `}function fl(n,a){return n==="design"?a("Design"):n==="personality"?a("Personality"):n??""}function gu(n){let a=new Map;for(let e of n){if(e.gate==null)continue;let t=a.get(e.gate);t?t.push(e):a.set(e.gate,[e])}return a}function xl(n){return n.planet?w(n.planet)??y(n,"planet"):""}function yu(n,a){let e=new Map;for(let[t,r]of n){let s=r.map(i=>[xl(i),`${t}${i.line!=null?`.${i.line}`:""}`,fl(i.side,a)].filter(Boolean).join(" "));e.set(t,[a("Gate {{gate}}",{gate:t}),y(r[0],"gateName"),...s].filter(Boolean).join(" \xB7 "))}return e}function bl(n){return new Map(n.map(a=>[a.id,y(a,"name")]))}function Lh(n,a={}){let e=ha(a.lang),t=n.centers??[],r=gu(n.gates??[]);return k`<svg class="chart bodygraph" xmlns=${pa} part="chart" viewBox=${yl} preserveAspectRatio="xMidYMid meet" role="img" aria-label=${e("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}><title>${e("Human Design bodygraph")}</title><desc>${e("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${ul({definedCenters:new Set(t.filter(s=>s.defined).map(s=>s.id)),gateSources:new Map([...r].map(([s,i])=>[s,{left:i.some(o=>o.side==="design"),right:i.some(o=>o.side==="personality")}])),gateTitles:yu(r,e),centerNames:bl(t),stateWords:{defined:e("Defined"),open:e("Open")}})}</svg>`.markup}import{css as uu}from"lit";var Ui=uu`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg));margin-inline:calc(-1 * var(--roxy-space-lg))}}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend .swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-secondary);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.legend .swatch.source{border-radius:var(--roxy-radius-full);border-color:#0000}`;import{css as fu,html as ir,nothing as ts}from"lit";var or=[se,fu`.roxy-facts{margin:0}.lead{font-size:var(--roxy-text-sm);margin:0}.keynotes{gap:var(--roxy-space-xs);margin:0;display:grid}.keynotes dd{margin:0}`];function Na(n){let a=n.filter(e=>!!e.value);return a.length===0?ts:ir`<dl class="roxy-facts" part="facts">${a.map(e=>ir`<div part="fact"><dt>${e.label}</dt><dd>${e.value}</dd></div>`)}</dl>`}function qi(n,a,e){return!n&&!a?ts:ir`<div class="themes roxy-chips" part="themes">${n?ir`<span class="roxy-chip" data-tone="success">${e("Signature: {{value}}",{value:n})}</span>`:ts} ${a?ir`<span class="roxy-chip" data-tone="danger">${e("Not-self: {{value}}",{value:a})}</span>`:ts}</div>`}function Yi(n,a){return!n?.personality&&!n?.design?ts:ir`<dl class="keynotes" part="keynotes">${n.personality?ir`<dt>${a("Line {{line}} \xB7 Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:ts} ${n.design?ir`<dt>${a("Line {{line}} \xB7 Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:ts}</dl>`}var Lu=["gold","green","brown","red"],lr=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.side="personality"}renderData(e){let t=e.centers??[],r=bl(t);return J`<div class="wrap bodygraph" part="card"><header class="head" part="header"><div><h2>${this.t("Bodygraph")}</h2>${e.designInstantUtc?J`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${Sp(this.effectiveLang(),e.designInstantUtc)}</time></div>`:le}</div>${e.type||e.profile?J`<div class="type-line">${[y(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" \xB7 ")}</div>`:le}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(vu(Lh(e,{lang:this.effectiveLang()})),this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,r)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],r)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}renderSummary(e,t){let r=e.incarnationCross;return J`<div class="summary" part="details">${Na([{label:this.t("Type"),value:y(e,"type")},{label:this.t("Strategy"),value:y(e,"strategy")},{label:this.t("Authority"),value:y(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:y(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?J`<p class="lead">${e.typeDescription}</p>`:le} ${r?.name?J`<p class="cross">${r.name} ${r.gates?.length?J`<span class="gates">(${r.gates.join(", ")})</span>`:le}</p>`:le} ${qi(e.signature?y(e,"signature"):void 0,e.notSelf?y(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=Lu.map(r=>[r,gl.filter(s=>s.color===r).map(s=>e.get(s.id)||s.label).join(", ")]);return J`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-left"></span>${this.t("Design")} <span class="swatch source src-right"></span>${this.t("Personality")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([r,s])=>J`<span><span class="swatch bg-${r} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,r=[{label:this.t("Strategy"),aside:y(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:y(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:Yi(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:y(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?y(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(r,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return le;let r=new Map;for(let i of e){let o=i.circuit??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return J`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...r].map(([i,o])=>J`<div class="group">${i?J`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:y(o[0],"circuit")})}</p>`:le} ${o[0]?.circuitDescription?J`<p class="group-note">${o[0].circuitDescription}</p>`:le} ${o.map(l=>J`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${y(l,"name")}</span> </span>${V()} <span class="interp-aside"><span class="roxy-chips">${(l.centers??[]).map(c=>J`<span class="roxy-chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?J`<p>${l.description}</p>`:le}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return le;let t=e.filter(r=>r.defined).length;return J`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((r,s)=>J`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${y(r,"name")}</span> ${V()} <span class="interp-aside"><span class="roxy-chips"><span class="roxy-chip ${r.defined?"on":""}">${r.defined?this.t("Defined"):this.t("Open")}</span> ${r.motor?J`<span class="roxy-chip">${this.t("Motor")}</span>`:le} ${r.awareness?J`<span class="roxy-chip">${this.t("Awareness")}</span>`:le}</span></span></summary><div class="interp-body">${r.theme?J`<p>${r.theme}</p>`:le} ${!r.defined&&r.notSelfQuestion?J`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${r.notSelfQuestion}</dd></dl>`:le} ${r.biology?J`<p class="footnote">${this.t("Biology")}. ${r.biology}</p>`:le} ${r.gates?.length?J`<p class="footnote">${this.t("Gates {{gates}}",{gates:r.gates.join(", ")})}</p>`:le}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return le;let r=t.filter(d=>d.side==="personality"),s=t.filter(d=>d.side==="design"),i=r.length>0&&s.length>0,o=this.side,l=i?o==="design"?s:r:t,c=i?e.sides?.[o]:void 0;return J`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${i?mt({items:[{id:"personality",label:`${this.t("Personality")} (${r.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:o,onSelect:d=>{this.side=d},label:this.t("Chart sides"),idPrefix:"hd",controls:true}):le}<div id="${i?`hd-panel-${o}`:le}" part="panel" role="${i?"tabpanel":le}" aria-labelledby="${i?`hd-tab-${o}`:le}">${c?J`<p class="side-note">${c}</p>`:le} ${l.map((d,p)=>this.renderGate(d,p===0))}</div></section>`}renderGate(e,t){let r=xl(e),s=y(e,"planet"),i=e.ichingHexagram;return J`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${r?J`<span class="glyph roxy-glyph" aria-hidden="true">${r}</span>`:le} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${y(e,"gateName")}</span> </span>${V()} ${s?J`<span class="interp-aside"><small>${s}</small></span>`:le}</summary><div class="interp-body">${e.gateDescription?J`<p>${e.gateDescription}</p>`:le} ${e.lineMeaning?J`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:le} ${e.planetDescription?J`<p class="footnote">${s}. ${e.planetDescription}</p>`:le} ${i?.number?J`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:le}</div></details>`}};lr.endpoints=Pc,lr.styles=[f,He,et,z,F,or,Ai,Ui,xu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.layout{align-items:start;gap:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.summary{gap:var(--roxy-space-md);display:grid}.cross{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm)}.cross .gates{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.legend-row{flex-basis:100%}.legend-row .swatch:not(:first-child){margin-inline-start:var(--roxy-space-md)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.side-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note,.side-note{margin-block-end:var(--roxy-space-sm)}.side-note{padding-block-start:var(--roxy-space-sm)}.roxy-chip.on{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.glyph{color:var(--roxy-accent-ink)}`],m([bu()],lr.prototype,"side",2),lr=m([x("roxy-bodygraph")],lr);import{css as $u,html as as,nothing as Un}from"lit";var wu={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},rs=class extends g{renderData(a){let e=a.karakas??[];return e.length?as`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2>${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip roxy-chip">${a.scheme??""}</span> ${a.scheme?wu[a.scheme]??"":""}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Atmakaraka")}</dt><dd>${a.atmakaraka??""}</dd></div><div><dt>${this.t("Darakaraka")}</dt><dd>${a.darakaraka??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Chara karakas")}"><table class="stacked" role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,r)=>this.renderRow(t,r===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(a,e){let t=w(a.graha)??"",r=N(a.rashi)??"";return as`<tr class="${e?"lead-row":""}"><td class="name">${a.name??""}${a.abbreviation?as`<span class="abbr">${a.abbreviation}</span>`:Un}</td><td data-inline data-label="${this.t("Graha")}">${t?as`<span class="glyph roxy-glyph">${t}</span>`:Un}${a.graha??""}</td><td data-inline data-label="${this.t("Rashi")}">${r?as`<span class="glyph roxy-glyph">${r}</span>`:Un}${a.rashi??""}</td><td data-inline data-label="${this.t("Degree")}">${b(this.effectiveLang(),a.degreeInRashi,2)}</td><td data-inline data-label="${this.t("Ranked on")}">${b(this.effectiveLang(),a.rankingDegree,2)} ${a.isReversed?as`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:Un}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?as`<p>${a.significations}</p>`:Un}</td></tr>`}};rs.endpoints=Mc,rs.styles=[f,G,se,...zi,$u`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);display:grid}h2,p{margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.scheme-chip{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.reversed{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],rs=m([x("roxy-chara-karakas")],rs);import{css as ku,html as cr,nothing as Wi}from"lit";var ss=class extends g{isCurrent(a){let e=Date.now(),t=Date.parse(a.start),r=Date.parse(a.end);return Number.isNaN(t)||Number.isNaN(r)?false:e>=t&&e<r}renderTile(a){let e=a.effect==="Good"?"good":a.effect==="Bad"?"bad":"neutral",t=this.isCurrent(a),r=w(a.lord)??"",s=da(this.effectiveLang(),a),i=e==="good"?this.t("Favourable"):e==="bad"?this.t("Unfavourable"):"";return cr`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${a.name}${t?cr`<span class="now-badge">${this.t("Now")}</span>`:Wi} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${r?cr`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:Wi} ${a.lord} ${i?cr`<span aria-hidden="true">·</span><span class="tile-effect">${i}</span>`:Wi}</span></div>`}renderData(a){let{date:e,dayChoghadiya:t,nightChoghadiya:r}=a;return cr`<div class="wrap" part="card"><div class="header" part="header"><h2>${this.t("Choghadiya")}</h2>${e?cr`<p class="roxy-label">${C(this.effectiveLang(),e)}</p>`:Wi}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):cr`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${r&&r.length>0?r.map(s=>this.renderTile(s)):cr`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};ss.endpoints=_c,ss.styles=[f,ku`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs);display:grid}h2,h3,p{margin:0}.cho-grid{gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}@container (width>=40rem){.cho-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.period-heading{margin-block-end:var(--roxy-space-xs)}.cho-tile{align-items:center;gap:0 var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr) auto;display:grid}.cho-tile:last-child{border-block-end:0}.cho-tile.now{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-sm)}.now-badge{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-sm)}.tile-name{min-width:0;font-weight:var(--roxy-weight-bold);overflow-wrap:anywhere;grid-column:1}.good :is(.tile-name,.tile-effect){color:var(--roxy-success-fg)}.bad :is(.tile-name,.tile-effect){color:var(--roxy-danger-fg)}.tile-time{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;grid-area:1/2/3;align-self:center}.tile-lord{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;grid-column:1;display:flex}`],ss=m([x("roxy-choghadiya-grid")],ss);import{css as Su,html as Pe,nothing as at}from"lit";import{property as Ru}from"lit/decorators.js";var Cu=["sun","moon","venus","mars"],$h=["fire","earth","air","water"],wh={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},Tu={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},dr=class extends g{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[r,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[r]=s);return t}return{}}renderData(e){let t=e.overallScore,r=this.getBreakdown(),s="rating"in e?e.rating:void 0,i="archetype"in e?e.archetype:void 0,o="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,d="strengths"in e?e.strengths:void 0,p="challenges"in e?e.challenges:void 0,h="keyAspects"in e?e.keyAspects:void 0,u=!this.hideReadings,v=this.t(wh[this.mode]??wh.astrology);return Pe`<article class="card" part="card" aria-label="${v}"><div class="head" part="header"><h2>${v}</h2><div>${typeof t=="number"?Pe`<div class="score">${Math.round(t)}</div>`:at} ${s?Pe`<div class="rating">${s}</div>`:at}</div></div>${Object.keys(r).length>0?Pe`<div role="list" part="details breakdown">${Object.entries(r).map(([L,$])=>Pe`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${L}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,$))}%"></span></span> <span>${Math.round($)}</span></div>`)}</div>`:at} ${i?Pe`<p><span class="archetype">${i.label}</span> ${i.description&&u?Pe`· ${i.description}`:at}</p>`:at} ${l&&u?Pe`<p>${l}</p>`:at} ${c&&u?Pe`<p class="body">${c}</p>`:at} ${o&&u?Pe`<p class="body">${o}</p>`:at} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${u&&((d?.length??0)>0||(p?.length??0)>0)?Pe`<div class="lists" part="section strengths-challenges">${d?.length?Pe`<div><h3>${this.t("Strengths")}</h3><ul>${d.map(L=>Pe`<li>${L}</li>`)}</ul></div>`:at} ${p?.length?Pe`<div><h3>${this.t("Challenges")}</h3><ul>${p.map(L=>Pe`<li>${L}</li>`)}</ul></div>`:at}</div>`:at} ${h?.length?Pe`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul>${h.slice(0,6).map(L=>Pe`<li>${Eu(this.effectiveLang(),L,u)}</li>`)}</ul></div></div>`:at}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Pe`<p class="counts" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Pe`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:at} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`:at}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return at;let r=e?.persons,s=Cu.map(i=>{let o=t[i];if(!o)return null;let l=c=>{let d=D((c==="person1"?o.person1Sign:o.person2Sign)??""),p=r?.[c]?.[i]?.degree,h=typeof p=="number"?` ${Math.round(p)}\xB0`:"";return`${d}${h}`};return{glyph:w(i),label:D(i),aside:Xe(this.effectiveLang(),[l("person1"),l("person2")]),body:o.description??""}}).filter(i=>i!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return at;let t=e.person1,r=e.person2,s=Math.max(1,...$h.map(o=>Math.max(t?.[o]??0,r?.[o]??0))),i=e.sharedElement?.toLowerCase();return Pe`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row el-head"><span></span> <span class="roxy-label">${this.t("Person 1")}</span> <span class="roxy-label">${this.t("Person 2")}</span></div>${$h.map(o=>{let l=t?.[o]??0,c=r?.[o]??0;return Pe`<div class="${o===i?"el-row shared":"el-row"}"><span class="el-name">${o}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?Pe`<p class="shared-note">${e.description}</p>`:at}</section>`}renderSubScores(){let e=this.data;if(!e)return at;let t=[];if("lifePath"in e){let r=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,i]of r)i&&t.push({label:this.t(s),aside:[Xe(this.effectiveLang(),[String(i.person1),String(i.person2)]),fe(this.effectiveLang(),i.compatibility,0)].filter(Boolean).join(" \xB7 "),body:i.description??""})}if("cycles"in e&&e.cycles)for(let[r,s]of Object.entries(e.cycles))s&&t.push({label:rr(r,i=>this.t(i)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:fe(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(Tu[s.phase]):""].filter(Boolean).join(" \xB7 "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};dr.endpoints=Nc,dr.styles=[f,z,F,Su`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.head h2{text-transform:capitalize}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.rating{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.bar-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:14ch minmax(0,1fr) 4ch;display:grid}.bar,.el-bar .track{block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-row>span:last-child{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}.archetype{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}p.body{font-size:var(--roxy-text-sm)}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.block>h3{margin-block-end:var(--roxy-space-sm)}.elements{gap:var(--roxy-space-sm);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:8ch minmax(0,1fr) minmax(0,1fr);display:grid}.el-row .el-name{text-transform:capitalize}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold)}.el-head span:nth-child(2){text-align:end}.el-bar{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{flex:auto;display:flex}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-secondary)}.shared-note{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-sm)}`],m([Ru({type:String,reflect:true})],dr.prototype,"mode",2),dr=m([x("roxy-compatibility-card")],dr);function Eu(n,a,e){let t=wt(a),r=typeof a.orb=="number"?` (orb ${b(n,a.orb,1)}\xB0)`:"",s=[a.planet1,t,a.planet2].filter(Boolean).join(" ");return a.description&&e?`${s}${r} \xB7 ${a.description}`:`${s}${r}`}import{css as Du,html as Zi,nothing as Xi}from"lit";var kh={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},Au={fortunate:"success",unfortunate:"danger",mixed:"warning"},ns=class extends g{renderData(a){let e=_(this.effectiveLang(),a.number);return Zi`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="roxy-label">${this.t("Compound number")}</p>${a.name?Zi`<h2>${a.name}</h2>`:Xi}</div></header><ul class="badges roxy-chips" part="details"><li>${this.t("Root number {{n}}",{n:_(this.effectiveLang(),a.root)})}</li><li class="roxy-chip" data-tone="${Au[a.nature]??Xi}">${kh[a.nature]?this.t(kh[a.nature]):R(a.nature)}</li>${typeof a.sameAs=="number"?Zi`<li>${this.t("Same meaning as {{n}}",{n:_(this.effectiveLang(),a.sameAs)})}</li>`:Xi}</ul>${a.meaning&&!this.hideReadings?Zi`<p part="section readings">${a.meaning}</p>`:Xi}</article>`}};ns.endpoints=zc,ns.styles=[f,Du`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.hero>div{min-width:0}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.badges>li{font-variant-numeric:tabular-nums}`],ns=m([x("roxy-compound-number")],ns);import{css as Nu,html as Ct,nothing as xa}from"lit";var Pu={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},Mu=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),_u={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function Ji(n){let a=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let o=_u[i];if(o){e.push(o);continue}let l=Pu[i]??(Mu.has(i)?i:"");l&&a.push(l)}let[t,r]=a;if(!t)return"var(--roxy-border, #e4e4e7)";let s=r?`color-mix(in srgb, ${t}, ${r})`:t;for(let[i,o]of e)s=`color-mix(in srgb, ${s} ${o}%, ${i})`;return s}var is=class extends g{renderData(a){let e=a.colors??[],t=a.keywords??[],r=a.pairsWith??[],s=Ri(this.effectiveLang(),a.birthMonth)||void 0,i=a.name??this.t("Crystal");return Ct`<article class="wrap" part="card" aria-label="${i}"><div class="hero" part="header">${a.imageUrl?Ct`<img class="photo" part="chart" src="${a.imageUrl}" alt="${i}" loading="lazy">`:xa}<div><h2>${a.name}</h2>${a.description&&!this.hideReadings?Ct`<p class="desc">${a.description}</p>`:xa}</div></div><dl class="roxy-facts" part="details">${this.attr(this.t("Planet"),a.planet)} ${this.attr(this.t("Hardness"),typeof a.hardness=="number"?this.t("{{value}} Mohs",{value:b(this.effectiveLang(),a.hardness)}):void 0)} ${this.attr(this.t("Vibration"),a.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),a.chakras)} ${this.list(this.t("Zodiac"),a.zodiacSigns)} ${this.list(this.t("Elements"),a.elements)} ${e.length?Ct`<div><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(o=>Ct`<span class="color"><span class="dot" style="${`background:${Ji(o)}`}"></span>${o}</span>`)}</div></dd></div>`:xa}</dl>${this.renderMeaning(a.meaning)} ${t.length&&!this.hideReadings?Ct`<section part="section keywords"><h3>${this.t("Keywords")}</h3><ul class="chips roxy-chips">${t.map(o=>Ct`<li>${o}</li>`)}</ul></section>`:xa} ${a.affirmation&&!this.hideReadings?Ct`<p class="affirmation">${a.affirmation}</p>`:xa} ${r.length?Ct`<section part="section pairs-with"><h3>${this.t("Pairs with")}</h3><ul class="chips roxy-chips">${r.map(o=>Ct`<li>${String(o).replace(/-/g," ")}</li>`)}</ul></section>`:xa}</article>`}attr(a,e){return e==null||e===""?xa:Ct`<div><dt>${a}</dt><dd>${e}</dd></div>`}list(a,e){return e?.length?Ct`<div><dt>${a}</dt><dd>${e.join(", ")}</dd></div>`:xa}renderMeaning(a){if(!a||this.hideReadings)return xa;let t=[[this.t("Spiritual"),a.spiritual],[this.t("Emotional"),a.emotional],[this.t("Physical"),a.physical]].filter(([,r])=>!!r);return t.length===0?xa:Ct`<div class="meaning" part="section meaning">${t.map(([r,s])=>Ct`<h3>${r}</h3><p>${s}</p>`)}</div>`}};is.endpoints=Oc,is.styles=[f,se,Nu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:flex-start;gap:var(--roxy-space-md);display:flex}.photo{border-radius:var(--roxy-radius-md);object-fit:cover;background:var(--roxy-border);flex:none;block-size:4lh;inline-size:4lh}.hero h2{margin-block-end:var(--roxy-space-xs)}.desc,.meaning p{font-size:var(--roxy-text-sm)}.colors{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.color{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);text-transform:capitalize;display:inline-flex}.dot{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.meaning h3,section>h3{margin-block-end:var(--roxy-space-xs)}.meaning p{margin-block-end:var(--roxy-space-sm)}.chips>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`],is=m([x("roxy-crystal-card")],is);import{css as zu,html as os,nothing as Sh}from"lit";import{property as Ou}from"lit/decorators.js";var pr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return os`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(i=>os`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?os`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:os`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?os`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:Xe(this.effectiveLang(),i.colors)})}">${i.colors.map(o=>os`<span class="swatch" style="${`background:${Ji(o)}`}" title="${o}"></span>`)}</div>`:Sh}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?os`<div class="detail" part="detail">${this.openedRow}</div>`:Sh}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:Ri(this.effectiveLang(),e.month)}):this.t("Crystals")}};pr.endpoints=Ic,pr.styles=[f,zu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],m([Ou({type:String,reflect:true})],pr.prototype,"heading",2),pr=m([x("roxy-crystal-grid")],pr);import{css as Iu,html as ot,nothing as lt}from"lit";import{property as Gu,state as Fu}from"lit/decorators.js";function Rh(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function vl(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function Ll(n){if(!n)return"";let a=[];return n.years&&a.push(`${n.years}y`),n.months&&a.push(`${n.months}m`),n.days&&a.push(`${n.days}d`),a.length?a.join(" "):"0d"}function Ch(n,a){return fa(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,a)}function Qi(n,a){let e=C(n,a.startDate);return e&&e===C(n,a.endDate)?sn(n,a.startDate,a.endDate):vt(n,a.startDate,a.endDate)}var za=class extends g{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),r=t.length?Math.max(...t.map(d=>d.durationYears)):0,s=Hu(t.length?Math.min(...t.map(d=>d.durationYears)):0),i=this.hideReadings?[]:this.readings(e,t),o=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...o.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(d=>d.id===this.view)?this.view:"timeline";return ot`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?mt({items:l,active:c,onSelect:d=>{this.view=d},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:true}):lt}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:lt}">${c==="timeline"?ot`${this.period==="current"?this.renderCurrent(e):lt} ${t.length>0?ot`<div class="timeline" part="chart timeline" role="list">${t.map(d=>this.renderBar(d,r,s,e.houseThemes))}</div>`:lt}`:lt} ${c==="readings"?this.renderReadings(i):lt} ${c==="frame"?this.renderFrame(o):lt}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?ot`<div class="nakshatra">${t.join(" \u203A ")}</div>`:"nakshatraName"in e&&e.nakshatraName?ot`<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>`:lt}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let r="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${r}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${b(this.effectiveLang(),e.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",Br(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let r="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${Ll(e.birthDashaBalance)} of the opening ${r}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return ot`<dl class="roxy-facts" part="details frame">${e.map(([t,r])=>ot`<div><dt>${t}</dt><dd>${r}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=vl(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Rh(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=vl(e);if(!t)return lt;let r=t.period,s=Qi(this.effectiveLang(),r),i=r.nominalStartDate?C(this.effectiveLang(),r.nominalStartDate):"";return ot`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:r.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof r.durationYears=="number"?` (${Bu(this.effectiveLang(),r.durationYears)})`:""})} ${i?ot`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:lt}</p>`}readings(e,t){let r=[],s=vl(e);if(s?.period.interpretation&&r.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Qi(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let o=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,d]of o){if(!c?.interpretation)continue;let p=Ll(d);r.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:p?this.t("{{balance}} left",{balance:p}):Qi(this.effectiveLang(),c),body:c.interpretation})}}let i=t.find(o=>this.isCurrent(o));return i?.interpretation&&r.push({label:`${i.planet} ${Rh(e)}`,aside:Qi(this.effectiveLang(),i),body:i.interpretation}),r}renderCurrent(e){if(!("mahadasha"in e))return lt;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return ot`<div class="current" part="details current">${t.map(([r,s,i])=>{if(!s)return lt;let o=Ll(i),l=Ch(s.significators,e.houseThemes);return ot`<div><span class="roxy-label">${this.t(r)}</span> <strong>${s.planet}</strong> ${o?ot`<small>${this.t("{{balance}} left",{balance:o})}</small>`:lt} ${l?ot`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:lt}</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 false;let t=Date.now(),r=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(r)||Number.isNaN(s)?false:t>=r&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),r=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(r)||s<t||s>=r||r<=t?-1:(s-t)/(r-t)}renderBar(e,t,r,s){let i=e.durationYears,o=t>0?i/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,d=l?"bar-track bar-now":"bar-track",p=Ch(e.significators,s),h=["bar",l?"now":"",r==="time"?"fine":""].filter(Boolean).join(" ");return ot`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?ot`<span class="now-badge">${this.t("Now")}</span>`:lt} </span><span class="${d}"><span class="bar-fill" style="width:${o}%"></span> ${c>=0?ot`<span class="bar-progress" style="left:${c*o}%" aria-hidden="true"></span>`:lt} </span><span class="dates">${$p(this.effectiveLang(),e.startDate,e.endDate,r)} </span>${p?ot`<span class="houses">${this.t("Signifies {{houses}}",{houses:p})}</span>`:lt}</div>`}};za.endpoints=Gc,za.styles=[f,z,se,F,et,Iu`.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([Gu({type:String,reflect:true})],za.prototype,"period",2),m([Fu()],za.prototype,"view",2),za=m([x("roxy-dasha-timeline")],za);var $l=365.25;function Bu(n,a){if(a>=1)return`${b(n,a,1)} years`;let e=a*$l;if(e>=1)return`${b(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${b(n,t,1)} hours`:`${b(n,t*60,0)} minutes`}function Hu(n){return n>=2?"year":n>=60/$l?"month":n>=1/$l?"day":"time"}import{css as ju,html as Y,nothing as Oa}from"lit";import{property as Ku}from"lit/decorators.js";import{ifDefined as Th}from"lit/directives/if-defined.js";var Eh=["title","name","label","heading","overview","summary"],Vu=80,Uu=80,qu=3,Yu=["imageUrl","image","icon","symbol"],Wu=["imageUrl","image"],Zu=["affirmation","mantra","motto","quote"],Xu=new Set(["seed"]),Ju=new Set(["id","slug","key"]),Qu=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),ef=(n,a)=>n==="symbol"&&typeof a=="string"&&!new RegExp("\\p{L}","u").test(a),tf=8,Dh=1,af=12,rf=n=>n.toLowerCase().replace(/[_-]/g,""),Ah=n=>/^(has|is)([A-Z_]|$)/.test(n),sf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,nf=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,of=6;function lf(n,a){if(!Number.isInteger(a))return false;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function ls(n){return n===null||["string","number","boolean"].includes(typeof n)}function wl(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(ls))}function Ph(n){if(n==null)return true;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return false;let a=Object.values(n);return a.length===0||a.every(Ph)}var cs=class extends g{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=of?Y`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:Y`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?Oa:ls(e)?Y`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?Y`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(ls)?this.renderChips(e):e.every(r=>r!==null&&typeof r=="object"&&!Array.isArray(r))?this.renderObjectArray(e):Y`<ol>${e.map(r=>Y`<li>${this.renderValue(r)}</li>`)}</ol>`}renderChips(e){return Y`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>Y`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(h=>this.suppress(h)),r=this.collectKeys(t),s=new Set(r.filter(h=>t.some(u=>typeof u[h]=="string"&&Array.from(u[h]).length>Uu))),i=new Set(r.filter(h=>s.has(h)||t.some(u=>wl(u[h]??null)))),o=s.size>0||i.size>0&&i.size<r.length,l=h=>o?i.has(h)?"col-wide":"col-tight":"",c=i.size>0&&r.length>qu,d=t.length>af;return Y`<div class="${c?"roxy-collection":d&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?Oa:"0"}">${c?Y`${d?Y`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:Oa} ${t.map(h=>Y`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:Y`<table class="${s.size?"roxy-table stacked prose":i.size?"roxy-table stacked":"roxy-table"}" role="table">${d?Y`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:Oa}<thead><tr>${r.map(h=>Y`<th class="${l(h)}">${re(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>Y`<tr>${r.map(u=>Y`<td class="${l(u)}" data-label="${re(this.effectiveLang(),u)}">${this.renderCell(h[u],u)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=nn(e),r=Eh.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s,i])=>{let o=rf(s);return Xu.has(o)||ef(s,i)||r&&Ju.has(o)?false:!Qu.has(o)}))}renderObject(e){let t=this.suppress(e),r=Eh.find(p=>typeof t[p]=="string"&&t[p].length<=Vu),s=Yu.find(p=>typeof t[p]=="string"&&t[p].startsWith("http")),i=r!=="summary"&&typeof t.summary=="string"?"summary":null,o=Zu.find(p=>typeof t[p]=="string"),l=Object.entries(t).filter(([p,h])=>p!==r&&p!==i&&p!==o&&!Wu.includes(p)&&!Ph(h)),c=l.filter(([,p])=>!wl(p)),d=l.filter(([,p])=>wl(p));return Y`${s?Y`<img class="roxy-image" src="${String(t[s])}" alt="${r?String(t[r]):this.t("illustration")}" loading="lazy">`:Oa} ${r?this.depth===0?Y`<h2 class="roxy-title" part="header">${t[r]}</h2>`:Y`<h3 class="roxy-title" part="header">${t[r]}</h3>`:Oa} ${i?Y`<p class="roxy-summary">${t[i]}</p>`:Oa} ${o?Y`<blockquote class="roxy-quote">${t[o]}</blockquote>`:Oa} ${c.length>0?Y`<dl class="roxy-rows" part="details label-track">${c.map(([p,h])=>Y`<dt>${re(this.effectiveLang(),p)}</dt><dd>${this.renderField(h,p)}</dd>`)}</dl>`:Oa} ${d.map(([p,h])=>this.renderSection(p,h))}`}renderSection(e,t){let r=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),i=re(this.effectiveLang(),e);return r>tf||this.depth>=Dh?Y`<details class="roxy-section" ?open="${this.depth<Dh}"><summary>${i}</summary>${s}</details>`:Y`<div class="roxy-section">${this.depth===0?Y`<h3>${i}</h3>`:Y`<h4>${i}</h4>`} ${s}</div>`}renderField(e,t){return e==null?"":e===true&&t!==void 0&&Ah(t)?Y`<span class="roxy-chip">${this.t("Yes")}</span>`:ls(e)?Y`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(ls)?this.renderChips(e):Y`<roxy-data bare lang="${Th(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===true&&t!==void 0&&Ah(t)?Y`<span class="roxy-chip">${this.t("Yes")}</span>`:ls(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(ls)?e.filter(r=>r!==null).map(r=>this.formatScalar(r)).join(", "):Y`<roxy-data bare lang="${Th(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return ui(e)?Y`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&lf(t,e)?String(e):b(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):sf.test(e)?q(this.effectiveLang(),e):nf.test(e)?R(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let r of e)for(let s of Object.keys(r))t.add(s);return Array.from(t)}};cs.styles=[f,ju`.roxy-card{padding:var(--roxy-space-md)}.roxy-card a{color:var(--roxy-accent-ink)}:is(h2,h3,h4,p,dl){margin:0}:is(h2,h3).roxy-title{margin-block-end:var(--roxy-space-sm)}.roxy-summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-md)}dl.roxy-rows{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:fit-content(25%) minmax(0,1fr);display:grid}dl.roxy-rows dd{word-break:break-word;margin:0}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:20lh}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm)}table.roxy-table{width:100%}table.roxy-table caption{text-align:start}table.roxy-table th{white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{max-width:100%;height:auto;border-radius:var(--roxy-radius-md);margin-block-end:var(--roxy-space-md)}.roxy-section{margin-block-start:var(--roxy-space-md)}.roxy-section>:is(h3,h4,summary){font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-xs)}blockquote.roxy-quote{margin:var(--roxy-space-md) 0;border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`,ga],m([Ku({attribute:false})],cs.prototype,"depth",2),cs=m([x("roxy-data")],cs);import{css as Af,html as Yn,nothing as Pl}from"lit";import{property as Pf}from"lit/decorators.js";import{unsafeHTML as Mf}from"lit/directives/unsafe-html.js";import{html as qn,nothing as Al}from"lit";var Nt=400,ce=20,gt=Nt-2*ce,Ie=Nt/2,Mh=Object.fromEntries(Se.map(n=>[n.toLowerCase(),n])),Sl="\u02B3",Rl="\u1D9C",Cl="\u02B7";function kl(n){return Se.indexOf(n)}function cf(n){let a=Gp(n.graha)??n.graha,e=`${n.isRetrograde?Sl:""}${n.combust?Rl:""}${n.war?Cl:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${a}${e}`;let{degree:t}=Ht(n.longitude);return`${a} ${t}\xB0${e}`}function df(n,a,e){let t=[D(n.graha)],r=n.natalReference===true;if(r&&t.push(e("in {{sign}}",{sign:a})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Ht(n.longitude),i=String(s.minute).padStart(2,"0");t.push(r?`D1: ${s.degree}\xB0${i}' ${s.sign}`:`${s.degree}\xB0${i}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${r?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" \xB7 ")}function Tl(n,a,e,t,r,s){let i=t-(n.length-1)*r/2;return n.map((o,l)=>{let c=i+l*r;return k`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${cf(o)}<title>${df(o,a,s)}</title></text>`})}function to(n,a={}){let{divisionLabel:e,lagnaOverride:t,states:r,natalReference:s}=a,i=new Set((r?.combustion??[]).map(p=>(p.planet??"").toLowerCase())),o=new Map;for(let p of r?.planetaryWar??[])!p.planet1||!p.planet2||(o.set(p.planet1.toLowerCase(),{opponent:p.planet2,winner:p.winner}),o.set(p.planet2.toLowerCase(),{opponent:p.planet1,winner:p.winner}));let l={};for(let p of Se)l[p.toLowerCase()]=[];let c=t?Mh[t.toLowerCase()]??"":"",d=c;for(let[p,h]of Object.entries(n??{})){let u=(h?.rashi??"").toLowerCase();if(p==="Lagna"||h?.graha==="Lagna"){c||(d=Mh[u]??"");continue}if(!u||!(u in l))continue;let v=h.graha??p,L=v.toLowerCase();l[u]?.push({graha:v,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:i.has(L)||void 0,war:o.get(L)})}return{lagnaSign:d,placements:l,divisionLabel:e}}var ds=gt/4,pf={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function hf(n){let a=pf[n]??{col:0,row:0};return{x:ce+a.col*ds,y:ce+a.row*ds,w:ds,h:ds}}function mf(n){let a=ce,e=ce+ds,t=ce+2*ds,r=ce+3*ds,s=Nt-ce;return k`
17
17
  <rect class="line" x=${a} y=${a} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
18
18
  <line class="line" x1=${a} y1=${e} x2=${s} y2=${e} stroke-width="1" />
19
19
  <line class="line" x1=${a} y1=${r} x2=${s} y2=${r} stroke-width="1" />
@@ -23,8 +23,8 @@ var Qm=Object.defineProperty;var eg=Object.getOwnPropertyDescriptor;var m=(n,a,e
23
23
  <line class="line" x1=${r} y1=${t} x2=${s} y2=${t} stroke-width="1" />
24
24
  <line class="line" x1=${t} y1=${a} x2=${t} y2=${e} stroke-width="1" />
25
25
  <line class="line" x1=${t} y1=${r} x2=${t} y2=${s} stroke-width="1" />
26
- ${n?k`<text class="centre-label" x=${Ge} y=${Ge} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
27
- `}function kl(n,a){let e=bl(a),t=bl(n);return e===-1||t===-1?0:(t-e+12)%12+1}function nf(n,a,e,t,r){let s=rf(n),i=s.x+s.w/2,o=s.y+s.h/2,l=Ai(n)??n,c=14;return k`
26
+ ${n?k`<text class="centre-label" x=${Ie} y=${Ie} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
27
+ `}function El(n,a){let e=kl(a),t=kl(n);return e===-1||t===-1?0:(t-e+12)%12+1}function gf(n,a,e,t,r){let s=hf(n),i=s.x+s.w/2,o=s.y+s.h/2,l=_i(n)??n,c=14;return k`
28
28
  <g class=${e?"cell lagna":"cell"}>
29
29
  ${e?k`
30
30
  <rect class="lagna-bg" x=${s.x} y=${s.y} width=${s.w} height=${s.h} />
@@ -33,27 +33,27 @@ var Qm=Object.defineProperty;var eg=Object.getOwnPropertyDescriptor;var m=(n,a,e
33
33
  <text class="sign-text" x=${s.x+6} y=${s.y+12} text-anchor="start" dominant-baseline="central">${l}</text>
34
34
  ${t>0?k`<text class="house-num" x=${s.x+s.w-6} y=${s.y+12} text-anchor="end" dominant-baseline="central">${t}</text>`:""}
35
35
  ${e?k`<text class="lagna-marker" x=${i} y=${s.y+26} text-anchor="middle" dominant-baseline="central">${r("ASC")}</text>`:""}
36
- ${a.length?wl(a,n,i,o+4,14,r):""}
36
+ ${a.length?Tl(a,n,i,o+4,14,r):""}
37
37
  </g>
38
- `}function Eh(n,a){let e=n.lagnaSign.toLowerCase();return k`
39
- ${sf(n.divisionLabel)}
40
- ${ke.map(t=>nf(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,kl(t,n.lagnaSign),a))}
41
- `}var Ah={tl:{x:ce,y:ce},tr:{x:_t-ce,y:ce},br:{x:_t-ce,y:_t-ce},bl:{x:ce,y:_t-ce},top:{x:Ge,y:ce},right:{x:_t-ce,y:Ge},bottom:{x:Ge,y:_t-ce},left:{x:ce,y:Ge},tlMid:{x:Ge-gt/4,y:Ge-gt/4},trMid:{x:Ge+gt/4,y:Ge-gt/4},brMid:{x:Ge+gt/4,y:Ge+gt/4},blMid:{x:Ge-gt/4,y:Ge+gt/4}};function Ph(n){let a=n.reduce((t,r)=>t+r.x,0)/n.length,e=n.reduce((t,r)=>t+r.y,0)/n.length;return{x:a,y:e}}var of=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,a])=>{let e=a.map(t=>t==="centre"?{x:Ge,y:Ge}:Ah[t]);return[n,{centre:Ph(e),floor:Math.max(...e.map(t=>t.y))}]})),Dh=12,lf=16,cf=8;function df(n){let{tl:a,tr:e,br:t,bl:r,top:s,right:i,bottom:o,left:l}=Ah;return k`
38
+ `}function _h(n,a){let e=n.lagnaSign.toLowerCase();return k`
39
+ ${mf(n.divisionLabel)}
40
+ ${Se.map(t=>gf(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,El(t,n.lagnaSign),a))}
41
+ `}var zh={tl:{x:ce,y:ce},tr:{x:Nt-ce,y:ce},br:{x:Nt-ce,y:Nt-ce},bl:{x:ce,y:Nt-ce},top:{x:Ie,y:ce},right:{x:Nt-ce,y:Ie},bottom:{x:Ie,y:Nt-ce},left:{x:ce,y:Ie},tlMid:{x:Ie-gt/4,y:Ie-gt/4},trMid:{x:Ie+gt/4,y:Ie-gt/4},brMid:{x:Ie+gt/4,y:Ie+gt/4},blMid:{x:Ie-gt/4,y:Ie+gt/4}};function Oh(n){let a=n.reduce((t,r)=>t+r.x,0)/n.length,e=n.reduce((t,r)=>t+r.y,0)/n.length;return{x:a,y:e}}var yf=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,a])=>{let e=a.map(t=>t==="centre"?{x:Ie,y:Ie}:zh[t]);return[n,{centre:Oh(e),floor:Math.max(...e.map(t=>t.y))}]})),Nh=12,uf=16,ff=8;function xf(n){let{tl:a,tr:e,br:t,bl:r,top:s,right:i,bottom:o,left:l}=zh;return k`
42
42
  <rect class="line" x=${a.x} y=${a.y} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
43
43
  <polygon class="line" points="${s.x},${s.y} ${i.x},${i.y} ${o.x},${o.y} ${l.x},${l.y}" stroke-width="1" fill="none" />
44
44
  <line class="line" x1=${a.x} y1=${a.y} x2=${t.x} y2=${t.y} stroke-width="1" />
45
45
  <line class="line" x1=${e.x} y1=${e.y} x2=${r.x} y2=${r.y} stroke-width="1" />
46
- ${n?k`<text class="centre-label" x=${Ge} y=${Ge} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
47
- `}function pf(n,a,e,t,r,s){let i=of[n];if(!i)return k``;let o=i.centre,l=Math.min(14,Math.abs(o.y-Ge)*.45+6),c=(t.length-1)*Dh,d=Math.max(o.y+8-c/2,o.y-l+lf),h=Math.max(0,d+c-(i.floor-cf)),p=o.y-l-h,f=d-h+c/2,v=r?`${a} \xB7 ${Ai(e)??e}`:`${a}`;return k`
46
+ ${n?k`<text class="centre-label" x=${Ie} y=${Ie} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
47
+ `}function bf(n,a,e,t,r,s){let i=yf[n];if(!i)return k``;let o=i.centre,l=Math.min(14,Math.abs(o.y-Ie)*.45+6),c=(t.length-1)*Nh,d=Math.max(o.y+8-c/2,o.y-l+uf),p=Math.max(0,d+c-(i.floor-ff)),h=o.y-l-p,u=d-p+c/2,v=r?`${a} \xB7 ${_i(e)??e}`:`${a}`;return k`
48
48
  <g class=${r?"cell lagna":"cell"}>
49
- <text class="rashi-num" x=${o.x} y=${p} text-anchor="middle" dominant-baseline="central">${v}</text>
50
- ${r?k`<text class="lagna-marker" x=${o.x} y=${p-12} text-anchor="middle" dominant-baseline="central">${s("ASC")}</text>`:""}
51
- ${t.length?wl(t,e,o.x,f,Dh,s):""}
49
+ <text class="rashi-num" x=${o.x} y=${h} text-anchor="middle" dominant-baseline="central">${v}</text>
50
+ ${r?k`<text class="lagna-marker" x=${o.x} y=${h-12} text-anchor="middle" dominant-baseline="central">${s("ASC")}</text>`:""}
51
+ ${t.length?Tl(t,e,o.x,u,Nh,s):""}
52
52
  </g>
53
- `}function hf(n,a){return k`
54
- ${df(n.divisionLabel)}
55
- ${ke.map((e,t)=>{let r=kl(e,n.lagnaSign);return pf(r,t+1,e,n.placements[e.toLowerCase()]??[],r===1,a)})}
56
- `}var Xi=gt/3;function mf(){let n=ce,a=ce+Xi,e=ce+2*Xi,t=_t-ce,$={Aries:[{x:a,y:n},{x:e,y:n},{x:e,y:a},{x:a,y:a}],Taurus:[{x:n,y:n},{x:a,y:n},{x:a,y:a}],Gemini:[{x:n,y:n},{x:a,y:a},{x:n,y:a}],Cancer:[{x:n,y:a},{x:a,y:a},{x:a,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:a,y:e},{x:n,y:t}],Virgo:[{x:a,y:e},{x:a,y:t},{x:n,y:t}],Libra:[{x:a,y:e},{x:e,y:e},{x:e,y:t},{x:a,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:a},{x:t,y:a},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:a},{x:e,y:a}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:a}]},D={};for(let[V,Ie]of Object.entries($))D[V]={points:[...Ie],centroid:Ph(Ie)};return D}var gf=mf();function yf(n){let a=ce,e=ce+Xi,t=ce+2*Xi,r=_t-ce;return k`
53
+ `}function vf(n,a){return k`
54
+ ${xf(n.divisionLabel)}
55
+ ${Se.map((e,t)=>{let r=El(e,n.lagnaSign);return bf(r,t+1,e,n.placements[e.toLowerCase()]??[],r===1,a)})}
56
+ `}var eo=gt/3;function Lf(){let n=ce,a=ce+eo,e=ce+2*eo,t=Nt-ce,$={Aries:[{x:a,y:n},{x:e,y:n},{x:e,y:a},{x:a,y:a}],Taurus:[{x:n,y:n},{x:a,y:n},{x:a,y:a}],Gemini:[{x:n,y:n},{x:a,y:a},{x:n,y:a}],Cancer:[{x:n,y:a},{x:a,y:a},{x:a,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:a,y:e},{x:n,y:t}],Virgo:[{x:a,y:e},{x:a,y:t},{x:n,y:t}],Libra:[{x:a,y:e},{x:e,y:e},{x:e,y:t},{x:a,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:a},{x:t,y:a},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:a},{x:e,y:a}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:a}]},P={};for(let[U,Ge]of Object.entries($))P[U]={points:[...Ge],centroid:Oh(Ge)};return P}var $f=Lf();function wf(n){let a=ce,e=ce+eo,t=ce+2*eo,r=Nt-ce;return k`
57
57
  <rect class="line" x=${a} y=${a} width=${gt} height=${gt} stroke-width="1.5" fill="none" />
58
58
  <line class="line" x1=${a} y1=${e} x2=${e} y2=${e} stroke-width="1" />
59
59
  <line class="line" x1=${t} y1=${e} x2=${r} y2=${e} stroke-width="1" />
@@ -67,96 +67,96 @@ var Qm=Object.defineProperty;var eg=Object.getOwnPropertyDescriptor;var m=(n,a,e
67
67
  <line class="line" x1=${r} y1=${a} x2=${t} y2=${e} stroke-width="1" />
68
68
  <line class="line" x1=${r} y1=${r} x2=${t} y2=${t} stroke-width="1" />
69
69
  <line class="line" x1=${a} y1=${r} x2=${e} y2=${t} stroke-width="1" />
70
- ${n?k`<text class="centre-label" x=${Ge} y=${Ge} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
71
- `}function uf(n,a,e,t,r){let s=gf[n];if(!s)return k``;let{centroid:i,points:o}=s,l=Ai(n)??n,c=o.map(d=>`${d.x},${d.y}`).join(" ");return k`
70
+ ${n?k`<text class="centre-label" x=${Ie} y=${Ie} text-anchor="middle" dominant-baseline="central">${n}</text>`:""}
71
+ `}function kf(n,a,e,t,r){let s=$f[n];if(!s)return k``;let{centroid:i,points:o}=s,l=_i(n)??n,c=o.map(d=>`${d.x},${d.y}`).join(" ");return k`
72
72
  <g class=${e?"cell lagna":"cell"}>
73
73
  ${e?k`<polygon class="lagna-bg" points=${c} />`:""}
74
74
  <text class="sign-text" x=${i.x} y=${i.y-16} text-anchor="middle" dominant-baseline="central">${l}</text>
75
75
  ${t>0?k`<text class="house-num" x=${i.x+18} y=${i.y-16} text-anchor="start" dominant-baseline="central">${t}</text>`:""}
76
76
  ${e?k`<text class="lagna-marker" x=${i.x} y=${i.y-30} text-anchor="middle" dominant-baseline="central">${r("ASC")}</text>`:""}
77
- ${a.length?wl(a,n,i.x,i.y+4,12,r):""}
77
+ ${a.length?Tl(a,n,i.x,i.y+4,12,r):""}
78
78
  </g>
79
- `}function ff(n,a){let e=n.lagnaSign.toLowerCase();return k`
80
- ${yf(n.divisionLabel)}
81
- ${ke.map(t=>uf(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,kl(t,n.lagnaSign),a))}
82
- `}function Sl(n){return bl(n.lagnaSign)!==-1}function xf(n,a,e){if(a==="north"&&!Sl(n))return Eh(n,e);switch(a){case"north":return hf(n,e);case"east":return ff(n,e);default:return Eh(n,e)}}function Qi(n,a={}){let e=ha(a.lang);return k`<svg class="kundli" xmlns=${pa} viewBox=${`0 0 ${_t} ${_t}`} preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label=${a.label??e("Vedic birth chart with twelve sign houses")}><title>${a.title??e("Vedic kundli")}</title>${xf(n,a.style??"north",e)}</svg>`.markup}var bf=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}];function vf(n,a){let e=Object.values(n.placements).flat(),t=[];return e.some(r=>r.isRetrograde)&&t.push(`${vl} ${a("retrograde")}`),e.some(r=>r.combust)&&t.push(`${Ll} ${a("combust")}`),e.some(r=>r.war)&&t.push(`${$l} ${a("planetary war")}`),t.length===0?Rl:Vn`<p class="roxy-frame">${t.join(" \xB7 ")}</p>`}function Lf(n){return Vn`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function eo(n,a){let e=[];Sl(n)||e.push(Lf(a));let t=vf(n,a);return t!==Rl&&e.push(t),e}function to(n,a,e){return mt({items:bf.map(({id:t,source:r})=>({id:t,label:e(r)})),active:n,onSelect:a,label:e("Kundli style"),idPrefix:"kundli",controls:true})}function Mh(n,a,e,t){return Vn`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${j()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${a} ${t("Sign")}</th><th scope="col">D${a} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([r,s])=>Vn`<tr><th scope="row">${s.graha??r}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?Vn`<span>${tt(s.longitude)}</span><small>${b(e,s.longitude,12)}°</small>`:Rl}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}import{css as $f}from"lit";var ao=$f`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm);overflow-x:auto}.kundli-reference-table{width:100%}.kundli-reference-table :is(th,td){white-space:nowrap}.kundli-reference-table small{color:var(--roxy-secondary);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,35rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}`;var Rf={number:9,name:"Navamsa"},_h=n=>"division"in n&&n.division?n.division:Rf,pr=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=_h(this.data),t=`D${e.number} ${e.name}`;return Ji(this.data.chart.meta,{divisionLabel:t,natalReference:true})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=_h(e),{vargottama:s}=e;return Un`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${r.number} ${r.name} ${Zo(r.name,r.sanskritName)?Un`<span class="division-meta">· ${r.sanskritName}</span>`:Cl}</h2>${r.significance?Un`<p class="significance">${r.significance}</p>`:Cl} ${Q(this.effectiveLang(),e.frame,this.translator)} ${eo(t,this.translator)}</div>${to(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Sf(Qi(t,{style:this.chartStyle,lang:this.effectiveLang(),label:this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${r.number} ${r.name}`}),title:`D${r.number} ${r.name}`})),`D${r.number} ${r.name}`,this.translator)}</div>${Mh(e.chart.meta,r.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?Un`<div class="vargottama-row" part="details"><span class="roxy-label">${this.t("Vargottama")}:</span><ul class="roxy-chips" aria-label="${this.t("Vargottama planets")}">${s.map(i=>Un`<li>${Fe(w(i))} ${i}</li>`)}</ul></div>`:Cl}</div>`}};pr.endpoints=Nc,pr.styles=[u,He,I,Ci,ao,z,et,wf`.division-meta{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);color:var(--roxy-muted)}.significance{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)}.vargottama-row{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}`],m([kf({type:String,reflect:true,attribute:"chart-style"})],pr.prototype,"chartStyle",2),pr=m([x("roxy-divisional-chart")],pr);import{css as Cf,html as Jt,nothing as ps}from"lit";import{property as Tf}from"lit/decorators.js";var Ef={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},hr=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,r=Ef[this.type]??this.type,s=(e.severity??"").toLowerCase(),i=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,o=i*33;return Jt`<article class="card" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="${`badge roxy-chip ${t?"present":"absent"}`}" data-tone="${t?"danger":"success"}">${t?this.t("Present"):this.t("Absent")} </span>${Q(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Jt`<p class="subtype"><span class="subtype-label roxy-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:ps} ${e.severity?Jt`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${i}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" data-tier="${i}" style="width:${o}%"></span></div>`:ps} ${e.description&&!this.hideReadings?Jt`<p class="description">${e.description}</p>`:ps} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Jt`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(l=>Jt`<li>${l}</li>`)}</ul></div>`:ps} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Jt`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(l=>Jt`<li>${l}</li>`)}</ul></div>`:ps}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return ps;let t=[];for(let[r,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Jt`<div><h3>${r}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[i,o]of Object.entries(s))typeof o=="string"&&o.length>0&&t.push(Jt`<div><h3>${i}</h3><p>${o}</p></div>`);return t.length===0?ps:Jt`<div class="effects" part="section effects">${t}</div>`}};hr.endpoints=zc,hr.styles=[u,I,Cf`.card{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-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}h2{text-transform:capitalize}.subtype{font-size:var(--roxy-text-sm)}.subtype-label{margin-inline-end:var(--roxy-space-sm)}.badge{font-weight:var(--roxy-weight-bold)}.severity-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;inline-size:100%;overflow:hidden}.severity-fill{background:var(--roxy-warning);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.severity-fill[data-tier="3"]{background:var(--roxy-danger)}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}h3{margin-block-end:var(--roxy-space-xs)}ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.effects{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.effects p{font-size:var(--roxy-text-sm)}`],m([Tf({type:String,reflect:true})],hr.prototype,"type",2),hr=m([x("roxy-dosha-card")],hr);import{css as Pf,html as Me,nothing as yt}from"lit";var Df=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function qn(n){if(!n.text)return"";let a=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=a;e&&(t=a?Df.test(e.trim())?`${a}.${e}`:`${a}, ${e}`:e);let r=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[R(n.text),t].filter(Boolean).join(" "),r,n.basis].filter(Boolean).join(" \xB7 ")}import{css as Af}from"lit";var mr=Af`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var Mf=["vata","pitta","kapha"],_f={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function Nf(n){return n.split("-").map(M).join("-")}function zf(n,a){return Xe(n,(a??"").split(" ").filter(Boolean).map(M))}var hs=class extends g{renderData(a){let e=this.effectiveLang(),t=a.composite;return Me`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?Me`<span class="type">${Nf(t.type)}</span>`:yt}</header>${this.renderBar(e,a)}<div class="facts" part="details">${t?.dominant?Me`<span><span class="roxy-label">${this.t("Dominant")}</span><b>${M(t.dominant)}</b></span>`:yt} ${t?.secondary?Me`<span><span class="roxy-label">${this.t("Secondary")}</span><b>${M(t.secondary)}</b></span>`:yt} ${a.lagnaSign?Me`<span><span class="roxy-label">${this.t("Lagna")}</span><b>${M(a.lagnaSign)}</b></span>`:yt} ${a.moonSign?Me`<span><span class="roxy-label">${this.t("Moon sign")}</span><b>${M(a.moonSign)}</b></span>`:yt}</div>${this.renderFactors(e,a.factors)} ${this.renderRanking(e,a.strengthRanking)} ${this.renderPlanetDoshas(a.planetDoshas)} ${a.summary&&!this.hideReadings?Me`<p class="summary" part="section readings">${a.summary}</p>`:yt} ${Q(e,a.frame,this.translator)} ${a.meta?.disclaimer?Me`<p class="disclaimer" part="disclaimer">${a.meta.disclaimer}</p>`:yt}</article>`}renderBar(a,e){let t=e.composite,r=Mf.map(i=>({humour:i,value:t?.[i]??0}));return r.reduce((i,o)=>i+o.value,0)<=0?yt:Me`<div part="chart"><div class="bar" role="img" aria-label="${r.map(i=>`${M(i.humour)} ${ue(a,i.value,0)}`).join(", ")}">${r.filter(i=>i.value>0).map(i=>Me`<div class="${`seg seg-${i.humour}`}" style="${`flex: ${i.value} 0 0`}"></div>`)}</div><p class="shares">${r.map(i=>Me`<span><span class="${`swatch seg-${i.humour}`}"></span>${M(i.humour)} <b>${ue(a,i.value,0)}</b></span>`)}</p></div>`}renderFactors(a,e){let t=e??[];return t.length===0?yt:Me`<section part="section factors"><h3>${this.t("Factors")}</h3><ul class="rows">${t.map(r=>Me`<li class="row" part="label-track"><span class="roxy-label">${this.factorLabel(r.id)}</span><div><span>${zf(a,r.input)}</span> ${r.doshas?.length?Me`· ${r.doshas.map(s=>M(s)).join(", ")}`:yt} ${typeof r.weight=="number"?Me`· <span class="roxy-label">${this.t("Weight")}</span>${b(a,r.weight,2)}`:yt} ${this.renderCitation(r.source)}</div></li>`)}</ul></section>`}factorLabel(a){let e=_f[a??""];return e?this.t(e):R(a??"")}renderCitation(a){let e=qn(a??{});return e?Me`<div class="cite"><p><span class="roxy-label">${this.t("Source")}</span>${e}</p>${a?.note?Me`<details class="note"><summary>${this.t("Note on the source")}${j()}</summary><p>${a.note}</p></details>`:yt}</div>`:yt}renderRanking(a,e){let t=e??[];return t.length===0?yt:Me`<section part="section ranking"><h3>${this.t("Shadbala")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Shadbala")}"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(r=>Me`<tr class="${r.strong?"is-strong":""}"><td>${_(a,r.rank)}</td><td>${r.graha??""}</td><td>${this.t("{{value}} virupas",{value:b(a,r.totalVirupas,2)})}</td><td>${r.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(a){let e=a??[];return e.length===0?yt:Me`<section part="section planet-humours"><h3>${this.t("Planetary humours")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Planetary humours")}"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>Me`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(r=>M(r)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" \xB7 ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(a){let e=new Set;for(let t of a)for(let r of[t.doshaSource,t.dhatuSource]){let s=qn(r??{});s&&e.add(s)}return e.size===0?yt:Me`<p class="cite"><span class="roxy-label">${this.t("Source")}</span>${[...e].join(" \xB7 ")}</p>`}};hs.endpoints=Oc,hs.styles=[u,I,z,mr,Pf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.type{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold)}.bar{width:100%;min-width:0;border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);block-size:1lh;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info) 45%, var(--roxy-surface))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger) 45%, var(--roxy-surface))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success) 45%, var(--roxy-surface))}.shares,.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.swatch{block-size:.5lh;inline-size:.5lh;border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.shares b,.facts b{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.facts .roxy-label,.row>div .roxy-label,.cite .roxy-label{margin-inline-end:var(--roxy-space-xs)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.cite{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.cite .roxy-label{font-size:inherit}.cite .note summary{align-items:center;gap:var(--roxy-space-xs);width:fit-content;color:var(--roxy-secondary);display:flex}.cite .note p{margin-block-start:calc(var(--roxy-space-unit) / 2)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tr.is-strong td{font-weight:var(--roxy-weight-bold)}.summary{font-size:var(--roxy-text-sm)}.disclaimer{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);padding-inline-start:var(--roxy-space-md)}`],hs=m([x("roxy-dosha-constitution")],hs);import{css as Of,html as ro,nothing as Tl}from"lit";var ms=class extends g{renderData(a){return ro`<article class="card" part="card" aria-label="${a.name??this.t("Dream symbol")}"><header class="head" part="header">${a.letter?ro`<span class="letter" aria-hidden="true">${a.letter}</span>`:Tl}<div><p class="roxy-label">${this.t("Dream symbol")}</p>${a.name?ro`<h2>${a.name}</h2>`:Tl}</div></header>${a.meaning?ro`<p>${a.meaning}</p>`:Tl}</article>`}};ms.endpoints=Gc,ms.styles=[u,Of`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.letter{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:2lh;inline-size:2lh;color:var(--roxy-accent-ink);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);text-transform:uppercase;flex:none;justify-content:center;align-items:center;display:inline-flex}`],ms=m([x("roxy-dream-card")],ms);import{css as Gf,html as so,nothing as Nh}from"lit";var gs=class extends g{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let r=typeof e.total=="number"?e.total:t.length;return so`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2>${this.t("Dream symbols")}</h2><span class="count">${r===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:r})}</span></header><ul class="grid" part="section symbols">${t.map(s=>so`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?so`<span class="letter" aria-hidden="true">${s.letter}</span>`:Nh} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?so`<div class="detail" part="detail">${this.openedRow}</div>`:Nh}</section>`}};gs.endpoints=Ic,gs.styles=[u,Gf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm);width:100%;padding:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;display:flex}.result[aria-pressed=true],.result:hover{border-color:var(--roxy-accent)}.result[aria-pressed=true] .name{color:var(--roxy-accent-ink)}.detail{margin-block-start:var(--roxy-space-md)}.letter{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);text-transform:uppercase;flex:none}.name{font-size:var(--roxy-text-sm)}`],gs=m([x("roxy-dream-search")],gs);import{css as Jf,html as W,nothing as rt}from"lit";import{property as Qt,state as ba}from"lit/decorators.js";import{ifDefined as va}from"lit/directives/if-defined.js";import{live as Qf}from"lit/directives/live.js";var Oa={accent:"Accent color",afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",colors:"Brand colors",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",font:"Typeface",footer:"Footer line",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",logo:"Logo URL",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",primary:"Primary color",q:"Search",question:"Your question",readings:"Include readings",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",size:"Paper size",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var zh={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:true}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:true}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:true}},"GET /crystals":{color:{path:"/crystals/colors",lang:true},planet:{path:"/crystals/planets",lang:true}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:true}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:true}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:true}}},Oh={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Kt=(n,a)=>`${n}.${a}`;function io(n){let a=/^(.+)\.(\d+)$/.exec(n);return a?{key:a[1],index:Number(a[2])}:null}function oo(n,a=Uo,e=t=>Oa[t]??R(t)){let t=io(n);return t?a("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):a(R(n))}function Ih(n,a){let e=a.key??a.name;if(Bh(e))return Xs(n,e);if(!a.label)return Xs(n,a.name);let t=Object.keys(Oa).find(r=>Oa[r]===a.label);return qo(n,a.label)??(t?Xs(n,t):void 0)}function Fh(n,a,e){let t=Kt(a,0);return n.filter(r=>r.group===t).map(r=>({...r,key:`${Kt(a,e)}.${r.name}`,group:Kt(a,e)}))}function Al(n){return n.length<=(lo(n)?30:12)?"tiles":"select"}function lo(n){return n.every(a=>a.length<=2)}var If=["format","branding","readings"],Ff=["latitude","longitude","timezone"],Gh=["latitude","longitude"];function Bh(n){let a=n.match(/^(.+?)(Latitude|Longitude)$/);return a?{group:a[1],leaf:a[2].toLowerCase()}:null}var Bf=ke.map(n=>n.toLowerCase());function gr(n,a){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?a[e]:void 0}return n}}function Hh(n){let a=n.anyOf??n.oneOf;return!a||a.length===0?n:a.find(e=>Array.isArray(e.enum))??a.find(e=>Dl(e)&&Dl(e)!=="null")??a[0]??n}function Dl(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let a=n.type.filter(e=>e!=="null");return a.length===1?a[0]:void 0}function Hf(n){let a=Hh(n),e=Dl(a);return Array.isArray(a.enum)?Al(a.enum):e==="boolean"?"toggle":a.format==="date"?"date":a.format==="time"?"time":a.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function jh(n){if(n.length!==12)return false;let a=new Set(n.map(e=>e.toLowerCase()));return Bf.every(e=>a.has(e))}function no(n,a,e){let t=Hh(a);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Hf(a)??"text",required:e.required,description:t.description??a.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:a.default??t.default,example:a.example??t.example}}function El(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function Kh(n,a,e,t=n.requestBody?"POST":"GET"){let r=[],s=[],i=false,o,l=n.requestBody?.content?.["application/json"]?.schema,c=gr(l,a),d=c?.["x-required-any-of"],h=(n["x-request-cost"]??1)>1;if(c?.properties){let p=El(c);for(let[f,v]of Object.entries(c.properties)){if(h&&If.includes(f))continue;let L=gr(v,a)??{},$=L.type==="array"?gr(L.items,a):void 0;if($?.type==="object"&&$.properties){let D=Math.max(1,L.minItems??1),V=El($);s.push({key:f,min:D,max:L.maxItems??D});for(let Ie=0;Ie<D;Ie++)for(let[vt,la]of Object.entries($.properties)){let Ea=gr(la,a)??{};r.push(no(vt,Ea,{key:`${Kt(f,Ie)}.${vt}`,group:Kt(f,Ie),required:p.has(f)&&V.has(vt)}))}}else if(L.type==="object"&&L.properties){let D=El(L);for(let[V,Ie]of Object.entries(L.properties)){let vt=gr(Ie,a)??{};vt.type==="array"&&gr(vt.items,a)?.type==="object"||r.push(no(V,vt,{key:`${f}.${V}`,group:f,required:p.has(f)&&D.has(V)}))}}else{let D=Bh(f),V=no(D?.leaf??f,L,{key:f,group:D?.group,required:p.has(f)});D&&(V.label=`${R(D.group)} ${D.leaf}`),r.push(V)}}}for(let p of n.parameters??[]){if(p.in!=="path"&&p.in!=="query")continue;if(p.name==="lang"&&p.in==="query"){i=true,o=gr(p.schema,a)?.enum?.filter(L=>typeof L=="string");continue}let f=gr(p.schema,a)??{},v=no(p.name,f,{key:p.name,required:!!p.required,inQuery:p.in==="query"});if(p.in==="path"&&v.enum&&/^(id|identifier|slug)$/i.test(Oa[v.name]??R(v.name))){let L=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(p.description??v.description??"")?.[1]?.trim();L&&(v.label=L)}r.push(v)}for(let p of r)!p.group&&!p.label&&r.some(f=>f.group&&f.name===p.name)&&(p.label=jf(p));return Pl({title:Kf(n.summary,e),fields:r,hasLang:i,...o?.length?{langs:o}:{},...s.length>0?{repeats:s}:{},...d?{requiredAnyOf:d}:{}},t,e)}function jf(n){let e=(Oa[n.name]??R(n.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(n.description??"")?.[1];return t?Oa[t.toLowerCase()+n.name.replace(/^./,r=>r.toUpperCase())]:void 0}function Pl(n,a,e){let t=`${a.toUpperCase()} /${e.replace(/^\//,"")}`,r=zh[t]??{},s=Oh[t]??{},i=n.fields.map(p=>{let f={...p};return delete f.role,delete f.city,delete f.viewerZone,delete f.moment,delete f.fold,{...f,...r[p.key]&&{source:r[p.key]},...s[p.key]&&{disabledWhen:s[p.key]}}}),o=[...new Set(i.map(p=>p.group))].map(p=>p===void 0?{}:{key:p,label:oo(p)}),l=o.filter(p=>Gh.every(f=>i.some(v=>v.group===p.key&&v.name===f)));for(let[p,f]of l.entries()){let v=i.filter($=>$.group===f.key),L=v.find($=>$.name==="timezone")??(p===0?i.find($=>!$.group&&$.name==="timezone"):void 0);f.location={fields:[...v.filter($=>Gh.includes($.name)).map($=>$.key),...L?[L.key]:[]],required:v.some($=>Ff.includes($.name)&&$.required)}}for(let p of i)p.name==="seed"?p.role="seed":(p.name==="limit"||p.name==="offset")&&!p.required?p.role="hidden-default":l.some(f=>f.location?.fields.includes(p.key))?p.role="location":p.name==="timezone"&&(p.city=true,!p.group&&!p.required&&(p.viewerZone=true));let c=o.filter(p=>p.key!==void 0&&(p.location||i.some(f=>f.group===p.key&&f.required))),d=i.some(p=>!p.group&&!p.role&&p.required)||c.length>0||l.some(p=>p.key===void 0);for(let p of o)p.key!==void 0&&d&&!c.includes(p)&&(p.fold=true);let h=p=>c.length>0&&p.default===void 0&&(p.kind==="date"||p.kind==="time"||p.kind==="datetime");for(let p of i)p.group?o.find(f=>f.key===p.group)?.fold&&(p.fold=true):!p.role&&d&&!p.required?h(p)?p.moment=true:p.fold=true:!p.role&&!d&&p.default!==void 0&&(p.fold=true);return{...n,fields:i,groups:o,opensOnLoad:Vf(n,a)}}function Vh(n,a){let e=n.filter(t=>t.moment);return e.some(t=>t.kind==="time"||t.kind==="datetime")&&e.every(t=>a[t.key]===void 0||a[t.key]==="")}function Kf(n,a){let e=n?.split(" - ")[0]?.trim();return e||R(a.split("/").pop()??"")}function Vf(n,a){return a.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function Uh(n,a=[]){if(a.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function qh(n,a){let e=pi(n,a);return e&&`${e}/schemas`}function Yh(n,a){let e=a.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function Uf(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let a=Object.values(n),e=a.find(Array.isArray);return e||(a.find(r=>!!r&&typeof r=="object"&&Object.values(r).every(s=>typeof s=="number"))??null)}function Ml(n,a="id"){let e=Uf(n);if(!e)return[];if(!Array.isArray(e)){let r=Object.keys(e),s=r.length>0&&r.every(o=>/^[a-z]$/.test(o));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:r).map(o=>({value:o,label:s?o.toUpperCase():o,disabled:!e[o]}))}let t=[];for(let r of e){if(typeof r=="string"){t.push({value:r,label:r});continue}if(!r||typeof r!="object")continue;let s=r,i=s.id??s[a]??s.number;if(i==null)continue;let o=String(i),l=s.name??s.english;t.push({value:o,label:typeof l=="string"?l:o})}return t}function Wh(n){let a=n?.total;return typeof a=="number"?a:void 0}import{css as Yf,html as yn,nothing as _l}from"lit";import{ifDefined as Nl}from"lit/directives/if-defined.js";import{css as qf}from"lit";var co=qf`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function po(n,a){let e,t=((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...r)},a)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var Wf=10,Zf=10,zl=new Map;function Zh(n,a,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&a?{lang:a}:{},...e}}function Gl(n,a,e,t){let r=JSON.stringify([n.submitUrl??n.baseUrl,a.path,e,t]),s=zl.get(r);return s||(s=Xf(n,a,e,t).catch(i=>{throw zl.delete(r),i}),zl.set(r,s)),s}async function Xf(n,a,e,t){let r=[];for(let s=0;s<Zf;s++){let i=await Ua(n,{path:a.path,method:"GET",query:Zh(a,t,r.length?{offset:r.length}:{})}),o=Ml(i,e);r.push(...o);let l=Wh(i);if(!a.limit||l===void 0||r.length>=l||!o.length)break}return r}var Ol=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),ho=class{constructor(a,e,t,r,s){this.host=a;this.source=e;this.field=t;this.context=r;this.onPick=s;this.query="";this.options=[];this.open=false;this.highlight=-1;this.loading=false;this.error=null;this.search=po(a2=>{this.searchServer(a2)},250);a.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(a){this.query=a,this.error=null,this.source.search?a.trim().length<2?this.close():this.search(a):this.filter(a),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=false,this.highlight=-1,this.host.requestUpdate()}pick(a){this.query=a.label,this.close(),this.onPick(a)}keydown(a){let e=this.options.length;if(a.key==="Escape"){this.close();return}if(a.key==="ArrowDown"&&!this.open){a.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(a.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(a.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(a.key==="Home")this.highlight=0;else if(a.key==="End")this.highlight=e-1;else if(a.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;a.preventDefault(),this.host.requestUpdate()}}async filter(a){let{route:e,lang:t}=this.context();this.loading=true,this.host.requestUpdate();try{let r=await Gl(e,this.source,this.field,t);if(a!==this.query)return;let s=Ol(a.trim());this.show(r.filter(i=>Ol(i.label).includes(s)||Ol(i.value).includes(s)))}catch(r){this.fail(r)}finally{this.loading=false,this.host.requestUpdate()}}async searchServer(a){let{route:e,lang:t}=this.context(),r=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=true,this.host.requestUpdate();try{let i=await Ua(e,{path:this.source.path,method:"GET",query:Zh({...this.source,limit:Wf},t,{[r]:a})},s.signal);if(s.signal.aborted)return;this.show(Ml(i,this.field))}catch(i){if(s.signal.aborted)return;this.fail(i)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=false,this.host.requestUpdate())}}show(a){this.options=a,this.open=true,this.highlight=a.length?0:-1}fail(a){this.options=[],this.open=false,this.error=a instanceof Error?a.message:String(a)}};function Xh(n,a,e,t={}){let r=`${a}-listbox`;return yn`<div class="picker"><input id="${a}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${r}" aria-autocomplete="list" aria-labelledby="${Nl(t.labelledby)}" aria-describedby="${Nl(t.describedby)}" aria-invalid="${Nl(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${a}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?yn`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:_l} ${n.open?yn`<ul id="${r}" class="results" role="listbox">${n.options.length===0?yn`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,i)=>yn`<li id="${`${a}-opt-${i}`}" class="option" role="option" aria-selected="${n.highlight===i?"true":"false"}" @mousedown="${o=>o.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:_l}</div>${n.error?yn`<small class="field-error" role="alert">${n.error}</small>`:_l}`}var Jh=[co,Yf`.picker{position:relative}`];var Qh=`${en}/openapi.json`,em=qh(Pn,globalThis.document?.currentScript?.src||import.meta.url),Il=new Map,mo=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},go=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function ex(n){let a=Il.get(n);return a||(a=fetch(n).then(async e=>{if(!e.ok)throw new mo(e.status);return await e.json()}).catch(e=>{throw Il.delete(n),e}),Il.set(n,a)),a}function tx(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var tm=n=>/\bbirth/i.test(n?.description??""),am=n=>n.key===`${n.group}.${n.name}`;function ax(n){let a=n.trim();if(!a)return[];try{let e=JSON.parse(a);if(Array.isArray(e))return e}catch{}return a.split(",").map(e=>e.trim()).filter(Boolean)}var pe=class extends Va{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=false;this.fullPages=false;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=false;this.repeats=[];this.formTitle="";this.hasLang=false;this.values={};this.loaded=false;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=false,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=true,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||Qh,message:e instanceof Error?e.message:String(e)},bubbles:true,composed:true}))}}specErrorMessage(e){return e instanceof mo?this.t("HTTP error {{status}}",{status:e.status}):e instanceof go?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(Qh)}async modelFromSpec(e){let t=await ex(e),r=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[r]?.[this.method.toLowerCase()];if(!s)throw new go(this.method,r);return Kh(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){if(!em)return null;try{let e=await fetch(`${em}/${Yh(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Pl(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??false,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang,this.langs=e.langs;let t={};for(let r of e.fields){let s=r.viewerZone?void 0:this.fullPages&&r.name==="limit"&&this.roleOf(r)==="hidden-default"?r.max??r.default:r.default;s!==void 0&&(t[r.key]=s);let i=r.group&&am(r)?this.initialValues?.[r.group]?.[r.name]:this.initialValues?.[r.key];i!==void 0&&(t[r.key]=i)}this.values=this.withoutDisabled(t),this.loaded=true,this.loadChoices(),this.autoload&&this.opensOnLoad&&Wo(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!Wo(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let r=new ho(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));r.query=String(this.values[t.key]??""),this.pickers.set(t.key,r);continue}this.choices={...this.choices,[t.key]:"loading"},Gl(this.route,t.source,t.name,this.requestLang()).then(r=>{this.choices={...this.choices,[t.key]:r}},()=>{let{[t.key]:r,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(r=>this.serverIssues?.some(s=>s.path===r));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let r=e.disabledWhen;return!!r&&t[r.field]===r.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?zr(this.publishableKey):void 0;t&&Js(this,t,{warn:true})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let r=this.fields.find(s=>s.key===t.path);return!!r&&this.roleOf(r)==="location"&&this.cityGroup(r)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(t=>W`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?W`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:rt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return rt;let t=r=>{let s=this.fields.find(o=>o.key===r);if(s)return this.fieldLabel(s);let i=this.groupKeys().find(o=>o===r);return i?this.groupName(i):this.fieldText({name:r.split(".")[0]??r})};return W`<div part="validation-error" class="validation-error" role="alert">${e.map(r=>W`<div><strong>${t(r.path)}</strong> ${r.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(r=>r.group===e);return t.find(r=>r.name==="latitude")??t.find(r=>r.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??false}get soleChoice(){if(this.groupKeys().some(r=>this.groupHasLocation(r))||this.groupKeys().some(r=>r!==void 0))return null;let e=this.fields.filter(r=>r.required&&this.isRendered(r)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return true;if(!this.opensOnLoad)return false;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(r=>r.value);return this.isFilter(e)&&!lo(t)?"select":this.choices[e.key]?Al(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(r=>({value:r,label:this.optionText(e.name,r)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Vh(this.fields,this.values)?this.t("Show right now"):this.t(Uh(this.endpoint,this.fields))}requestLang(e){return ci(this,e)}fieldText(e){let t=this.requestLang();return e.label?Ih(t,e)??e.label:re(t,e.name,Oa[e.name])}optionText(e,t){return F(this.requestLang(),e,t)}onLocationFor(e){return t=>{let r=this.groups.find(i=>i.key===e)?.location?.fields??[],s={};for(let i of r){let o=this.fields.find(l=>l.key===i)?.name;o&&(s[i]=t[o])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,t){let r={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(r[s.key]=void 0);this.setValues(r)}onTilesKeyDown(e){return t=>{let r=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(r.length===0)return;let s=r.indexOf(this.values[e.key]),i;if(t.key==="Home")i=0;else if(t.key==="End")i=r.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")i=s===-1?0:(s+1)%r.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")i=s===-1?r.length-1:(s-1+r.length)%r.length;else return;t.preventDefault();let o=r[i];if(o===void 0)return;this.chooseOption(e,o);let l=t.currentTarget,c=this.choicesOf(e).findIndex(d=>d.value===o);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:true,composed:true}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(i=>i.path));let t={};for(let i of this.fields){let o=this.values[i.key];if(i.name==="seed"&&(o===void 0||o==="")&&(o=tx()),i.viewerZone&&(o===void 0||o==="")&&(o=Lp()??i.default),o===void 0||o==="")continue;i.kind==="array"&&typeof o=="string"&&(o=ax(o));let l=i.group?io(i.group):null;if(l){let c=t[l.key]??[],d=c[l.index]??{};d[i.name]=o,c[l.index]=d,t[l.key]=c}else if(i.group&&am(i)){let c=t[i.group]??{};c[i.name]=o,t[i.group]=c}else t[i.key]=o}let r=this.fields.filter(i=>i.inQuery).map(i=>i.name),s=this.requestLang(this.langs);this.hasLang&&s&&(t.lang=s,r.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:r,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:true,composed:true}))}collectMissing(){let e=[],t=[],r=new Set;for(let s of this.fields){if(!s.required)continue;let i=this.roleOf(s)==="location";if(!this.isRendered(s)&&!i)continue;let o=this.values[s.key];if(!(o!==void 0&&o!=="")){if(e.push(s.key),i){r.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of r)t.push(this.locationLabel(s));return{keys:e,labels:t}}get readsEnglish(){return Od(this.effectiveLang())}renderTitle(){return this.readsEnglish?W`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:rt}reqMark(e){return e.required?W`<span class="req" aria-hidden="true">*</span>`:rt}description(e){if(!e.description||!this.readsEnglish)return rt;if(e.description.length<=120)return W`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return W`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${j()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,r=!!e.enum&&jh(e.enum),s=this.choicesOf(e),i=lo(s.map(c=>c.value)),o=s.findIndex(c=>c.value===this.values[e.key]),l=o===-1?s.findIndex(c=>!c.disabled):o;return W`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${i?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,d)=>{let h=this.values[e.key]===c.value,p=r?N(c.value):void 0;return W`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${h?"true":"false"}" tabindex="${d===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${p?W`<span class="tile-glyph roxy-glyph" aria-hidden="true">${p}</span>`:rt} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return W`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${va(this.issueFor(e)?"true":void 0)}" aria-describedby="${va(this.issueFor(e)?`${t}-error`:void 0)}" .value="${Qf(this.values[e.key]??"")}" @change="${r=>this.chooseOption(e,r.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(r=>W`<option value="${r.value}" ?selected="${this.values[e.key]===r.value}" ?disabled="${!!r.disabled}">${r.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let r=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key&&this.readsEnglish,i=this.issueFor(e);return W`<div part="field" class="field">${s?rt:W`<label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${Xh(t,r,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:i?`${r}-error`:void 0,invalid:!!i})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,r=this.values[e.key]===true;return W`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${r?"true":"false"}" @click="${()=>this.pickChoice(e,!r)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,r=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.example!=null?String(e.example):"",i=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(s)?s:"";return W`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${va(this.issueFor(e)?"true":void 0)}" aria-describedby="${va(this.issueFor(e)?`${t}-error`:void 0)}" min="${va(e.min)}" max="${va(e.max)}" step="${e.kind==="number"?"any":rt}" placeholder="${i||rt}" .value="${this.values[e.key]??""}" @input="${o=>{let l=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let r=this.choices[e.key];return r==="loading"?W`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:r||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return oo(e,(t,r)=>this.t(t,r),t=>this.fieldText({name:t}))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&io(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),r=Fh(this.fields,e,t),s=this.groups.find(o=>o.key===Kt(e,0));if(s){let o=l=>l.replace(`${Kt(e,0)}.`,`${Kt(e,t)}.`);this.groups=[...this.groups,{...s,key:Kt(e,t),label:oo(Kt(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(o)}}}]}let i={...this.values};for(let o of r)o.default!==void 0&&(i[o.key]=o.default);this.values=i,this.fields=[...this.fields,...r]}removeRecord(e){let t=Kt(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let r={...this.values};for(let s of Object.keys(r))s.startsWith(`${t}.`)&&delete r[s];this.values=r}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?rt:W`<div class="repeat-controls">${t<e.max?W`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:rt} ${t>e.min?W`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:rt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):tm(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return W`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?W`<span class="req" aria-hidden="true">*</span>`:rt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return W`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.pickChoice(e,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let r=e?this.t("{{group}} city",{group:this.groupName(e)}):tm(this.placeField(e))?this.t("City of birth"):void 0;return W`<roxy-location-search endpoint="${va(this.locationUrl||void 0)}" publishable-key="${va(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${va(this.effectiveLang())}" placeholder="${va(r)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(r=>r.group===e&&this.isRendered(r));return W`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):rt}<div class="fields">${t.map(r=>this.renderField(r))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){return W`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){if(!this.loaded)return W`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return W`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=zr(this.publishableKey);if(e)return W`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(d=>!d.group&&this.isRendered(d)),r=this.groupKeys().filter(d=>d!==void 0),s=t.filter(d=>!d.fold),i=t.filter(d=>d.fold),o=r.filter(d=>!this.groups.find(h=>h.key===d)?.fold),l=r.filter(d=>this.groups.find(h=>h.key===d)?.fold),c=i.length>0||l.length>0;return W`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?W`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:rt} ${this.renderIssueSummary()}<div class="fields">${s.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):rt} ${o.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${c?W`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...i.map(h=>h.key),...l].some(h=>d.path===h||d.path.startsWith(`${h}.`)))}"><summary>${this.t("Advanced")}${j()}</summary><div class="fields">${i.map(d=>this.renderField(d))}</div>${l.map(d=>this.groupCard(d))}</details>`:rt} ${this.selfSubmits?rt:W`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let r=Number(t);return Number.isFinite(r)?r:void 0}return t}}};pe.styles=[u,z,Jh,Jf`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],m([Qt({type:String,attribute:"data-endpoint"})],pe.prototype,"endpoint",2),m([Qt({type:String})],pe.prototype,"method",2),m([Qt({type:String,attribute:"spec-url"})],pe.prototype,"specUrl",2),m([Qt({type:String,attribute:"submit-label"})],pe.prototype,"submitLabel",2),m([Qt({type:String,attribute:"publishable-key"})],pe.prototype,"publishableKey",2),m([Qt({type:String,attribute:"location-url"})],pe.prototype,"locationUrl",2),m([Qt({attribute:false})],pe.prototype,"initialValues",2),m([Qt({attribute:false})],pe.prototype,"serverIssues",2),m([Qt({attribute:false})],pe.prototype,"apiRoute",2),m([Qt({attribute:false})],pe.prototype,"autoload",2),m([Qt({attribute:false})],pe.prototype,"fullPages",2),m([ba()],pe.prototype,"choices",2),m([ba()],pe.prototype,"clearedIssues",2),m([ba()],pe.prototype,"fields",2),m([ba()],pe.prototype,"repeats",2),m([ba()],pe.prototype,"formTitle",2),m([ba()],pe.prototype,"hasLang",2),m([ba()],pe.prototype,"values",2),m([ba()],pe.prototype,"loaded",2),m([ba()],pe.prototype,"specError",2),m([ba()],pe.prototype,"validationErrors",2),pe=m([x("roxy-endpoint-form")],pe);import{css as rx,html as st,nothing as yo}from"lit";import{property as sx}from"lit/decorators.js";var nx="12:00 UTC",yr=class extends g{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),r=this.effectiveLang();return st`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2><p class="month roxy-label"><span>${an(r,t.year,t.month)}</span><span>${nx}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" tabindex="0" aria-label="${this.t("Daily positions")}">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?yo:st`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>st`<li class="signkey-item"><span class="signkey-glyph roxy-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=w(e.name);return st`<div class="track" role="listitem"><span class="body-name">${t?st`<span class="glyph roxy-glyph" aria-hidden="true">${t}</span>`:yo}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?st`<span class="chips roxy-chips">${e.ingresses.map(r=>this.renderIngressChip(r))} ${e.retrogrades.map(r=>this.renderRetrogradeChip(r))}</span>`:yo}</div>`}renderPosition(e){let{degree:t,minute:r}=al(e.degreeInSign),s=N(e.sign),i=y(e,"sign");return st`<span class="pos" title="${i}">${t}${s?st`<span class="sg roxy-glyph" aria-hidden="true">${s}</span>`:st`<span class="sg">${i}</span>`}${String(r).padStart(2,"0")}</span>`}renderIngressChip(e){let t=N(e.sign),r=Ir(this.effectiveLang(),e.date);return st`<span class="roxy-chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:r})}"><span aria-hidden="true">→</span>${Fe(t)}${e.signLabel} <span class="chip-date">${r}</span></span>`}renderRetrogradeChip(e){let t=xp(this.effectiveLang(),e.start,e.end);return st`<span class="roxy-chip chip--retro" data-tone="danger"><span class="roxy-glyph" aria-hidden="true">${De}</span>${this.t("Retrograde {{range}}",{range:t})}</span>`}renderGrid(e){let t=this.effectiveLang();return st`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(r=>{let s=w(r.name);return st`<th scope="col" title="${r.label}">${s?st`<span class="glyph roxy-glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${r.label}</span>`:r.label}</th>`})}</tr></thead><tbody>${e.rows.map(r=>st`<tr><th scope="row" class="day">${bp(t,r.date)}</th>${r.cells.map((s,i)=>this.renderCell(s,e.bodies[i],r.date))}</tr>`)}</tbody></table>`}renderCell(e,t,r){if(!e)return st`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(r)?"ingress":"",t?.stationDates.has(r)?"station":""].filter(Boolean).join(" ");return st`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?st`<span class="retro-mark roxy-glyph" aria-label="${this.t("retrograde")}">${De}</span>`:yo}</td>`}toViewModel(e){let t=[],r=new Map;for(let o of e.days)for(let l of o.positions){let c=r.get(l.planet);c||(c=[],r.set(l.planet,c),t.push(l.planet)),c.push({date:o.date,p:l})}let s=[];for(let o of t){let l=r.get(o),c=l?.[0],d=l?.[l.length-1];if(!l||!c||!d)continue;let h=[],p=[],f=new Set,v=new Set;for(let L=0;L<l.length;L++){let $=l[L],D=l[L-1];if(!$||(D&&$.p.sign!==D.p.sign&&(h.push({date:$.date,sign:$.p.sign,signLabel:y($.p,"sign")}),f.add($.date)),D&&$.p.isRetrograde!==D.p.isRetrograde&&v.add($.date),!$.p.isRetrograde))continue;let V=p[p.length-1];V&&D?.p.isRetrograde?V.end=$.date:p.push({start:$.date,end:$.date})}s.push({name:o,label:y(d.p,"planet"),first:c.p,last:d.p,ingresses:h,retrogrades:p,ingressDates:f,stationDates:v})}let i=e.days.map(o=>{let l=new Map(o.positions.map(c=>[c.planet,c]));return{date:o.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:i,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let i of s.positions){let o=String(i.sign??"").toLowerCase();o&&!t.has(o)&&t.set(o,y(i,"sign"))}let r=[];for(let s of ke){let i=t.get(s.toLowerCase()),o=N(s);i&&o&&r.push({sign:s,label:i,glyph:o})}return r}};yr.endpoints=Fc,yr.styles=[u,rx`:host{overflow-x:clip}.wrap{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,h3,p{margin:0}header,section{gap:var(--roxy-space-sm);display:grid}.month{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.signkey{gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.signkey-item{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);white-space:nowrap;display:inline-flex}.signkey-glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.track{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:var(--roxy-space-xs);min-inline-size:16ch;font-weight:var(--roxy-weight-bold);display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink)}.span{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;display:inline-flex}.arrow{color:var(--roxy-muted)}.chips{margin-inline-start:auto}.chip-date{color:var(--roxy-muted)}.scroll{min-width:0;overflow-x:auto}table{font-size:var(--roxy-text-xs)}:is(th,td){white-space:nowrap}thead th .glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}th.day{z-index:1;background:var(--roxy-bg);color:var(--roxy-fg);border-inline-end:1px solid var(--roxy-border);position:sticky;left:0}thead th.day{z-index:2}.sg{margin-inline:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-variant-numeric:normal}.retro-mark{font-weight:var(--roxy-weight-bold);margin-inline-start:calc(var(--roxy-space-unit) / 2)}td.retro,td.retro .sg{color:var(--roxy-danger-fg)}td.ingress{box-shadow:inset var(--roxy-line-thick) 0 var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}td.station{border-block-start:var(--roxy-line-thick) solid var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}`],m([sx({type:String})],yr.prototype,"heading",2),yr=m([x("roxy-ephemeris-table")],yr);import{css as ix,html as ea,nothing as Yn}from"lit";var ys=class extends g{renderData(a){let e=a.conjunctions??[],t=a.stars??[];return ea`<div class="wrap" part="card"><header part="header"><h2>${this.t("Fixed stars")}</h2>${typeof a.orb=="number"?ea`<p class="roxy-label">${this.t("Orb")} ${b(this.effectiveLang(),a.orb,1)}°</p>`:Yn}</header>${a.summary&&!this.hideReadings?ea`<p class="summary">${a.summary}</p>`:Yn} ${e.length?ea`<section part="section conjunctions"><h3>${this.t("Conjunctions to the chart")}</h3>${e.map((r,s)=>ea`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:y(r,"point"),star:r.star})}</span> ${j()} <span class="interp-aside"><small>${this.t("orb {{value}}\xB0",{value:b(this.effectiveLang(),r.orb,2)})}</small></span></summary>${r.interpretation&&!this.hideReadings?ea`<div class="interp-body"><p>${r.interpretation}</p></div>`:Yn}</details>`)}</section>`:ea`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):Yn}</div>`}renderCatalog(a){return ea`<details class="catalog"><summary>${j()} ${this.t("Star catalog ({{count}})",{count:a.length})}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Precessed positions for the chart date")}"><table><caption class="roxy-label">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${a.map(e=>{let t=N(e.sign);return ea`<tr><td>${e.name}</td><td>${t?ea`<span class="sg roxy-glyph">${t}</span>`:Yn}${Zt(e.degree)} ${e.sign}</td><td class="num">${b(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><ul class="kw roxy-chips">${(e.keywords??[]).map(r=>ea`<li>${r}</li>`)}</ul></td></tr>`})}</tbody></table></div></details>`}};ys.endpoints=Bc,ys.styles=[u,z,K,ix`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.summary{font-size:var(--roxy-text-sm)}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}section>h3{margin-block-end:var(--roxy-space-sm)}.interp-lead .point{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);display:flex}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.sg{color:var(--roxy-secondary);margin-inline-end:var(--roxy-space-xs)}.kw{max-inline-size:32ch}`],ys=m([x("roxy-fixed-stars")],ys);import{css as lx,html as ne,nothing as he}from"lit";import{property as cx}from"lit/decorators.js";var uo=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as ox}from"lit";var fo=ox`.plate-heading{font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-bold);hyphens:manual}@container (width<=30rem){.plate-heading{font-size:calc(var(--roxy-text-xs) / var(--roxy-text-scale) / var(--roxy-text-scale))}}`;var xo={forward:"Forward",reverse:"Backward"};function us(n){return"mountainCenterStar"in n}var ur=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),r=this.mode!=="annual"&&us(e);return ne`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${us(e)?r?ne`<span class="period">${this.t("Period {{n}}",{n:_(t,e.period??0)})}</span>`:he:ne`<span class="period">${e.year??""}</span>`}</header>${us(e)?r?this.renderNatalFacts(e,t):he:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${uo.map(s=>this.renderPalace(e,s))}</div>${r?ne`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:he} ${r&&us(e)?this.renderStructure(e):he} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return ne`<div class="facts" part="details">${e.facing?ne`<span><span class="roxy-label">${this.t("Facing")}</span> <b>${F(t,"facing",e.facing.label??"")}</b></span>`:he} ${e.sitting?ne`<span><span class="roxy-label">${this.t("Sitting")}</span> <b>${F(t,"facing",e.sitting.label??"")}</b></span>`:he} ${typeof e.facingDegrees=="number"?ne`<span>${_(t,e.facingDegrees)}°</span>`:he} ${e.mountainFlight?ne`<span><span class="roxy-label">${this.t("Mountain star")}</span> ${xo[e.mountainFlight]?this.t(xo[e.mountainFlight]):e.mountainFlight}</span>`:he} ${e.waterFlight?ne`<span><span class="roxy-label">${this.t("Water star")}</span> ${xo[e.waterFlight]?this.t(xo[e.waterFlight]):e.waterFlight}</span>`:he} ${e.straddling?ne`<span><b>${this.t("Straddling")}</b></span>`:he}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?he:ne`<div class="facts" part="details">${typeof e.centerStar=="number"?ne`<span><span class="roxy-label">${this.t("Center")}</span> <b>${_(t,e.centerStar)}</b></span>`:he} ${e.changeoverDate?ne`<span>${C(t,e.changeoverDate)}</span>`:he}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):F(e,"facing",t)}renderPalace(e,t){let r=this.effectiveLang(),s=this.paletteHeading(r,t),i=(e.palaces??[]).find(d=>d.palace===t),o=this.mode!=="annual"&&us(e);if(!i)return ne`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(o&&us(e)){let d=i;return ne`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${d.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${d.water??""}</span> <span class="star" title="${this.t("Period star")}">${d.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${d.combination?ne`<span class="combo">${y(d.combination,"name")}</span>`:he}</div>`}let c=i;return ne`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${y(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?ne`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?ne`<p class="structure" part="reading">${t.meaning}</p>`:he}</section>`:he}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return he;let r=this.effectiveLang(),s=this.mode!=="annual"&&us(e),i=t.map(o=>{let l=this.paletteHeading(r,o.palace??"");if(s){let d=o;return!d.reading&&!d.combination?he:ne`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body">${d.combination?ne`<span>${y(d.combination,"name")}</span>`:he} ${d.reading&&!this.hideReadings?ne`<p part="reading">${d.reading}</p>`:he}</div></li>`}let c=o;return ne`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?ne`<span class="element-word ${wt(c.element)}">${y(c,"element")}</span>`:he}<dl class="star-facts">${c.nature?ne`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:he} ${c.enhancer?ne`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:he} ${c.remedy?ne`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:he}</dl>${c.meaning&&!this.hideReadings?ne`<p part="reading">${c.meaning}</p>`:he}</div></li>`});return i.every(o=>o===he)?he:ne`<section part="section palaces"><ul class="rows">${i}</ul></section>`}};ur.endpoints=Hc,ur.styles=[u,ua,fo,mr,lx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.period{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.palace{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);grid-template-columns:1fr 1fr;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent) 8%, var(--roxy-surface))}.mountain,.water{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.mountain{color:var(--roxy-info-fg);text-align:start}.water{color:var(--roxy-accent-ink);text-align:end}.star,.palace-name,.combo{text-align:center;grid-column:1/-1}.star{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.combo{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-mountain{background:var(--roxy-info)}.swatch-water{background:var(--roxy-accent)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}.star-facts{gap:var(--roxy-space-xs) var(--roxy-space-md);margin:var(--roxy-space-xs) 0 0;font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs);display:flex}.star-facts dt{color:var(--roxy-secondary);font-size:inherit}.star-facts dd{margin:0}.structure{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}`],m([cx({type:String,reflect:true})],ur.prototype,"mode",2),ur=m([x("roxy-flying-star-chart")],ur);import{css as dx,html as fr,nothing as rm}from"lit";var fs=class extends g{renderData(a){let e=a.windows??[];if(e.length===0)return this.renderEmpty();let t=Lt(this.effectiveLang(),a.startDate,a.endDate);return fr`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2>${this.t("Forecast digest")}</h2>${t?fr`<p class="subtitle">${t}</p>`:rm}</div>${e.map(r=>this.renderWindow(r))}</div>`}windowLabel(a){return a===1?this.t("Next 24 hours"):typeof a=="number"?this.t("Next {{count}} days",{count:a}):this.t("Window")}renderWindow(a){let e=[...a.top??[]].sort((s,i)=>(i.significance??0)-(s.significance??0)),t=a.byDomain??{},r=Object.entries(t);return fr`<section class="window" part="section window"><div class="window-head" part="details"><h3>${this.windowLabel(a.days)}</h3><span class="window-count">${this.t("{{count}} events",{count:a.count??0})}</span></div>${r.length>0?fr`<div class="domains" part="legend">${r.map(([s,i])=>fr`<span class="domain-chip"><span class="swatch sw-${s}"></span>${R(s)} ${i}</span>`)}</div>`:rm} ${e.length>0?fr`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:fr`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=this.hideReadings||a.description==null?R(a.type??""):a.description;return fr`<div class="event" part="label-track" role="listitem"><span class="event-date">${C(this.effectiveLang(),a.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:b(this.effectiveLang(),e,0)})}"><span class="sig-fill ${a.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};fs.endpoints=jc,fs.styles=[u,dx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.window{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.window:first-of-type{border-block-start:0;padding-block-start:0}.window-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.window-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.domains{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.domain-chip{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:inline-flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:.6lh;display:inline-block}.sw-western,.sig-fill.western{background:var(--roxy-accent)}.sw-vedic,.sig-fill.vedic{background:var(--roxy-info)}.sw-biorhythm,.sig-fill.biorhythm{background:var(--roxy-success)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);display:grid}.event-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-tight)}.sig{block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);grid-column:2;overflow:hidden}.sig-fill{height:100%;display:block}.quiet{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}`],fs=m([x("roxy-forecast-digest")],fs);import{css as px,html as Nt,nothing as un}from"lit";var hx={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},sm=20,mx=["western","vedic","biorhythm"],xs=class extends g{renderData(a){let e=a.events??[],t=this.groupByDate(e),r=mx.filter(s=>e.some(i=>i.domain===s));return Nt`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2>${this.t("Forecast timeline")}</h2>${a.startDate&&a.endDate?Nt`<div class="range">${Lt(this.effectiveLang(),a.startDate,a.endDate)} · ${this.t("{{count}} events",{count:a.count??e.length})}</div>`:un}</header>${r.length?Nt`<div class="legend" part="legend">${r.map(s=>Nt`<span><span class="swatch swatch-${s}"></span>${hx[s]}</span>`)}</div>`:un} ${t.length?Nt`<div class="days" part="section events" role="list">${t.map(([s,i])=>this.renderDay(s,i))}</div>`:Nt`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(a){let e=new Map;for(let t of a){let r=t.date??"",s=e.get(r)??[];s.push(t),e.set(r,s)}return[...e.entries()]}renderDay(a,e){return Nt`<div class="day" role="listitem"><div class="day-date">${C(this.effectiveLang(),a)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=Math.max(0,Math.min(100,e));return Nt`<div class="event"><span class="dot dot-${a.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderMoon(a)}${this.renderHeadline(a)}</div>${a.description&&!this.hideReadings?Nt`<p class="event-desc">${a.description}</p>`:un}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${a.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(a){let e=a.body?R(a.body):"",t=a.target?R(a.target):"",r=$t({type:a.aspect}),s=r?ln(a.aspect)??Te({type:a.aspect}):"",i=typeof a.orb=="number"?b(this.effectiveLang(),a.orb,1):"",o=this.typeQualifier(a);return r&&t?Nt`<strong>${e}</strong> <span class="${`${Be({type:a.aspect})} roxy-glyph`}">${s}</span> <strong>${t}</strong>${i?Nt`<span class="kind">${this.t("orb {{value}}\xB0",{value:i})}</span>`:un}`:Nt`<strong>${e||R(a.type??"")}</strong>${o?Nt`<span class="kind">${o}</span>`:un}`}renderMoon(a){if(a.type==="lunar-phase"&&a.phase)return Wt(this,{illumination:a.phase==="full-moon"?100:0,waxing:true},sm);if(a.type!=="eclipse")return un;let e=ft(a.body)==="sun";return Wt(this,{illumination:e?0:100,waxing:true},sm,e?"solar":"lunar")}typeQualifier(a){return a.type==="sign-ingress"&&a.target?`enters ${R(a.target)}`:a.type==="retrograde-station"&&a.station?a.station:a.type==="eclipse"?[a.kind,"eclipse"].filter(Boolean).join(" "):a.type==="critical-day"?"critical day":a.type==="dasha-change"&&a.target?`dasha ${R(a.target)}`:R(a.type??"")}};xs.endpoints=Kc,xs.styles=[u,Aa,Za,px`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend .swatch{block-size:.6lh;inline-size:.6lh;border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-western,.dot-western,.sig-fill-western{background:var(--roxy-accent)}.swatch-vedic,.dot-vedic,.sig-fill-vedic{background:var(--roxy-info)}.swatch-biorhythm,.dot-biorhythm,.sig-fill-biorhythm{background:var(--roxy-success)}.day{gap:var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:9ch minmax(0,1fr);display:grid}.day:first-of-type{border-block-start:0}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;padding-block-start:calc(var(--roxy-space-unit) / 2)}.events{gap:var(--roxy-space-sm);display:grid}.event{align-items:start;gap:var(--roxy-space-sm);grid-template-columns:.4lh minmax(0,1fr);display:grid}.dot{block-size:.4lh;inline-size:.4lh;border-radius:var(--roxy-radius-full);margin-block-start:var(--roxy-space-xs)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm)}.event-line .moon-mark{margin-inline-end:var(--roxy-space-xs)}.event-line .kind{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.event-desc{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.sig{align-items:center;gap:var(--roxy-space-xs);margin-block-start:var(--roxy-space-xs);display:flex}.sig-track{max-inline-size:16ch;block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);flex:1;overflow:hidden}.sig-fill{height:100%;display:block}.sig-val{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],xs=m([x("roxy-forecast-timeline")],xs);import{css as gx,html as te,nothing as _e}from"lit";import{ifDefined as yx}from"lit/directives/if-defined.js";var bs=class extends g{renderData(a){let e=this.effectiveLang(),t=a.chosen,r=a.input?.text??a.input?.textHebrew??"";return te`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 id="gematria-title">${r?`${this.t("Gematria")} \xB7 ${r}`:this.t("Gematria")}</h2>${t?.hebrew?te`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:_e} ${this.chosenForm(a)?.romanization?te`<span class="roman">${this.chosenForm(a)?.romanization}</span>`:_e} ${t?.rule?te`<p class="rule">${t.rule}</p>`:_e}</header>${this.renderLetters(e,this.chosenForm(a)?.letters)} ${this.renderValues(e,a.values,this.t("Cipher values"))} ${this.renderForms(e,a)} ${this.renderTransformations(e,a.transformations)} ${this.renderLatin(e,a.latinValues)} ${this.renderMatches(e,a.matches)} ${this.renderConventions(a.conventions)}</article>`}chosenForm(a){let e=a.hebrewForms??[];return e.find(t=>t.hebrew===a.chosen?.hebrew)??e[0]}renderLetters(a,e){let t=e??[];return t.length===0?_e:te`<section part="section letters"><h3>${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(r=>te`<div class="${`letter${r.isFinal?" is-final":""}`}" dir="ltr" title="${yx(r.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${r.glyph??""}</span> <span class="name">${r.name??""}</span> <span class="num">${_(a,r.value)}</span></div>`)}</div>${t.some(r=>r.isFinal)?te`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:_e}</section>`}renderValues(a,e,t){let r=(e??[]).filter(i=>typeof i.value=="number");if(r.length===0)return _e;let s=r.some(i=>(i.alternateValues??[]).length>0);return te`<section part="section values"><h3>${t}</h3><div class="scroll" tabindex="0" role="region" aria-label="${t}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?te`<th>${this.t("Also published")}</th>`:_e}</tr></thead><tbody>${r.map(i=>te`<tr><td>${R(i.id??"")}</td><td class="num">${_(a,i.value)}</td>${s?te`<td class="num">${(i.alternateValues??[]).map(o=>_(a,o)).join(", ")}</td>`:_e}</tr>`)}</tbody></table></div>${this.renderProvenance(r)}</section>`}renderProvenance(a){let e=new Map;for(let t of a)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?_e:te`<p class="provenance"><span class="roxy-label">${this.t("Tradition")}</span> ${[...e].map(([t,r],s)=>te`${s>0?" \xB7 ":""}${R(t)}${mi(r)?te`<a class="src" href="${r}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:_e}`)}</p>`}renderForms(a,e){let t=e.hebrewForms??[];return t.length<2?_e:te`<section part="section spellings"><h3>${this.t("Spellings")}</h3><ul class="forms">${t.map(r=>te`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${r.hebrew??""}</span> ${r.hebrew===e.chosen?.hebrew?te`<span class="chosen roxy-chip" data-tone="success">${this.t("Chosen")}</span>`:_e}</div><span class="roman">${r.romanization??""}</span> ${r.rule?te`<p class="rule">${r.rule}</p>`:_e} ${this.renderFormTotals(a,r)}</li>`)}</ul></section>`}renderFormTotals(a,e){let t=(e.values??[]).find(r=>typeof r.value=="number");return t?te`<p class="rule"><span class="roxy-label">${R(t.id??"")}</span> ${_(a,t.value)}</p>`:_e}renderTransformations(a,e){let t=e??[];return t.length===0?_e:te`<section part="section substitutions"><h3>${this.t("Substitutions")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Substitutions")}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td>${R(r.id??"")}</td><td>${r.output?te`<span lang="he" dir="rtl">${r.output}</span>`:_e} ${r.outputRomanization?te`<span class="roman">${r.outputRomanization}</span>`:_e}</td><td class="num">${_(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(a,e){let t=e??[];return t.length===0?_e:te`<section part="section latin-ciphers"><h3>${this.t("Latin ciphers")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Latin ciphers")}"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td data-label="${this.t("Cipher")}">${R(r.id??"")} ${r.lineage?te`<p class="lineage">${r.lineage}</p>`:_e}</td><td class="num" data-label="${this.t("Value")}">${_(a,r.value)}</td><td data-label="${this.t("Tradition")}">${R(r.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(a,e){let t=e??[];return t.length===0?_e:te`<section part="section matches"><h3>${this.t("Equal values")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Equal values")}"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${r.hebrew??""}</span> <span class="roman">${r.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${r.meaning??""} ${r.note&&!this.hideReadings?te`<p class="match-note" part="reading">${r.note}</p>`:_e}</td><td class="num" data-label="${this.t("Value")}">${_(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(a){let e=this.effectiveLang(),t=[];for(let r of["transliteration","misparGadol"]){let s=a?.[r];s&&t.push([re(e,r),F(e,r,s)])}return t.length===0?_e:te`<p class="provenance">${t.map(([r,s],i)=>te`${i>0?" \xB7 ":""}<span class="roxy-label">${r}</span>${s}`)}</p>`}};bs.endpoints=Vc,bs.styles=[u,ga,gx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{justify-items:start;gap:calc(var(--roxy-space-unit) / 2);min-width:0;display:grid}.hebrew{font-size:calc(var(--roxy-text-xl) * 1.3);font-weight:var(--roxy-weight-bold);line-height:1.4}.roman{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.rule{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.provenance .roxy-label,.rule .roxy-label{font-size:inherit;margin-inline-end:var(--roxy-space-xs)}.src{margin-inline-start:var(--roxy-space-xs)}.letters{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.letter{justify-items:center;gap:calc(var(--roxy-space-unit) / 2);min-inline-size:5ch;padding:var(--roxy-space-xs) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);display:grid}.letter .glyph{font-size:var(--roxy-text-lg);line-height:1.3}.letter .name{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.letter .num{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.letter.is-final{border-color:var(--roxy-accent)}.legend{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.legend .swatch{block-size:.6lh;inline-size:.6lh;border:1px solid var(--roxy-accent);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.lineage,.match-note{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);white-space:normal;margin-block-start:calc(var(--roxy-space-unit) / 2)}a{color:var(--roxy-accent-ink)}.forms{gap:var(--roxy-space-md);margin:0;padding:0;list-style:none;display:grid}.form{gap:var(--roxy-space-xs);min-width:0;border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.form:first-child{border-block-start:0;padding-block-start:0}`],bs=m([x("roxy-gematria")],bs);import{css as ux,html as ta,nothing as vs}from"lit";var nm=8,Ls=class extends g{renderData(a){let e=a.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=a.keyTransits??[],r=a.natalPlanets?.find(s=>s.name==="Moon")?.sign;return ta`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2>${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:U(this.effectiveLang(),a.transitDatetime),birth:U(this.effectiveLang(),a.birthDatetime)})}</p>${r?ta`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:r})}</p>`:vs} ${Q(this.effectiveLang(),a.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?ta`<section class="key" part="section key-transits"><h3>${this.t("Key transits")}</h3>${t.map(s=>ta`<p class="key-item">${s.description}</p>`)}</section>`:vs}</div>`}renderPlanet(a){let e=w(a.name)??"",t=typeof a.longitude=="number"?Ht(a.longitude):void 0;return ta`<article class="row"><div class="row-top"><span class="graha">${e?ta`<span class="glyph roxy-glyph">${e}</span>`:vs}${a.name} </span><span class="pos">${t?`${a.sign} ${t}`:a.sign} </span>${typeof a.houseFromMoon=="number"?ta`<span class="house moon roxy-chip">${this.t("house {{n}} from the Moon",{n:a.houseFromMoon})}</span>`:vs} ${typeof a.natalHouse=="number"?ta`<span class="house lagna roxy-chip">${this.t("house {{n}} from the Lagna",{n:a.natalHouse})}</span>`:vs}</div>${this.renderKaksha(a.kaksha)} ${this.renderContacts(this.t("Drishti"),a.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),a.aspectsToNatal)}</article>`}renderContacts(a,e){return e?.length?ta`<p class="aspects"><span class="contact-label">${a}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}\xB0)",{aspect:Te({type:t.aspectType}),planet:t.natalPlanet,orb:b(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Te({type:t.aspectType}),planet:t.natalPlanet})).join(" \xB7 ")}</p>`:vs}renderKaksha(a){if(!a||typeof a.number!="number")return vs;let e=a.number,t=a.bindu===true?"yes":a.bindu===false?"no":"",r=nm,s=a.lord&&typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:e,total:r,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):a.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:r,graha:a.lord}):typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:e,total:r,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:r}),i=a.bindu===null||a.bindu===void 0?"":typeof a.binduCount=="number"?a.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):a.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return ta`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:r})}">${Array.from({length:nm},(o,l)=>ta`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${i?`${s} \xB7 ${i}`:s}</p>`}};Ls.endpoints=Uc,Ls.styles=[u,I,ux`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,h3,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.pos{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.house.moon{border-color:var(--roxy-accent);color:var(--roxy-fg)}.contact-label{font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}.kaksha-bar{block-size:.4lh;margin-block:var(--roxy-space-xs);grid-template-columns:repeat(8,minmax(0,1fr));gap:1px;display:grid}.seg{background:var(--roxy-border);border-radius:var(--roxy-radius-sm)}.seg.here{background:var(--roxy-muted)}.seg.here.yes{background:var(--roxy-success)}.seg.here.no{background:var(--roxy-warning)}.aspects{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.key{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);display:grid}.key-item{font-size:var(--roxy-text-sm)}`],Ls=m([x("roxy-gochara-table")],Ls);import{css as fx,html as La,nothing as fn}from"lit";var xx={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},$s=class extends g{renderData(a){let e=(a.breakdown??[]).filter(c=>c?.category!==void 0),t=a.total??0,r=a.maxScore??36,s=t/r*100,i=s>=70?"high":s>=50?"mid":"low",o=s*2.827,l=(100-s)*2.827;return La`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${b(this.effectiveLang(),a.total,1)}</span> <span class="over">/ ${a.maxScore}</span> ${typeof a.percentage=="number"?La`<small class="pct">${ue(this.effectiveLang(),a.percentage,1)}</small>`:fn}</div><div class="verdict-wrap">${typeof a.isCompatible=="boolean"?La`<span class="verdict roxy-chip ${a.isCompatible?"yes":"no"}" data-tone="${a.isCompatible?"success":"danger"}">${a.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:fn} ${a.recommendation&&!this.hideReadings?La`<span class="recommendation">${a.recommendation}</span>`:fn}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="${r}" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45"/><circle class="ring-fill" data-band="${i}" cx="50" cy="50" r="45" stroke-dasharray="${o},${l}" transform="rotate(-90 50 50)"/></svg></div></div>${e.length>0?La`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(c=>{let d=c.score??0,h=c.maxScore??bx(c.category),p=h?d/h*100:0;return La`<tr><td>${c.category} ${c.description?La`<small>${c.description}</small>`:fn}</td><td class="classification" data-label="${this.t("Person 1")}">${c.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${c.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${p}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${b(this.effectiveLang(),d,1)} / ${h}</td></tr>`})}</tbody></table></div>`:fn} ${(a.doshas?.length??0)>0||(a.doshaCancellations?.length??0)>0?La`<ul class="tags roxy-chips" part="details">${a.doshas?.map(c=>La`<li class="dosha roxy-chip" data-tone="danger">${c}</li>`)} ${a.doshaCancellations?.map(c=>La`<li class="cancel roxy-chip" data-tone="success" title="${c.reason}">${this.t("{{dosha}} cancelled",{dosha:c.dosha})}</li>`)}</ul>`:fn} ${Q(this.effectiveLang(),a.frame,this.translator)}</article>`}};$s.endpoints=qc,$s.styles=[u,I,ga,fx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:var(--roxy-space-md);display:flex}.score-info{flex:1;min-width:0}.table-scroll{min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.total{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.over,.pct{color:var(--roxy-muted)}.pct{font-size:var(--roxy-text-sm);margin-inline-start:var(--roxy-space-sm)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs);text-align:end;display:grid}.verdict{font-weight:var(--roxy-weight-bold)}.recommendation{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.score-ring{flex-shrink:0;block-size:5lh;inline-size:5lh}.score-ring svg{block-size:100%;inline-size:100%;display:block}.ring-track,.ring-fill{fill:none;stroke-width:8px}.ring-track{stroke:var(--roxy-border)}.ring-fill{stroke:var(--roxy-danger);stroke-linecap:round}.ring-fill[data-band=mid]{stroke:var(--roxy-warning)}.ring-fill[data-band=high]{stroke:var(--roxy-success)}table{width:100%}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}td.classification{color:var(--roxy-secondary);white-space:nowrap}:is(th,td).score{text-align:end}td.score{font-weight:var(--roxy-weight-bold)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-bar{gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr)}.verdict-wrap{text-align:start;justify-items:start}}.mini-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;overflow:hidden}.mini-bar>span{background:var(--roxy-accent);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}`],$s=m([x("roxy-guna-milan")],$s);function bx(n){return n&&xx[n.toLowerCase()]||1}import{css as vx,html as aa,nothing as Ga}from"lit";import{unsafeHTML as Lx}from"lit/directives/unsafe-html.js";var ws=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderChart(e,t,r){let s=new Set(r?e.personAGates:(e.channels??[]).flatMap(p=>p.personAGates??[])),i=new Set(r?e.personBGates:(e.channels??[]).flatMap(p=>p.personBGates??[])),o=new Map;for(let p of new Set([...s,...i]))o.set(p,{left:s.has(p),right:i.has(p)});let l=new Set((e.centers??[]).filter(p=>p.defined).map(p=>p.id)),c=new Map((e.centers??[]).map(p=>[p.id,p.name])),d=new Map;for(let p of e.channels??[])d.set(p.gateA,p.name),d.set(p.gateB,p.name);let h=new Map;for(let[p,f]of o){let v=[f.left&&"A",f.right&&"B"].filter(Boolean).join(" + ");h.set(p,[`Gate ${p}`,d.get(p),v].filter(Boolean).join(" \xB7 "))}return aa`${Lx(k`<svg class="chart bodygraph" part="chart" viewBox=${dl} preserveAspectRatio="xMidYMid meet" role="img" aria-label=${t}><title>${t}</title>${pl({definedCenters:l,gateSources:o,gateTitles:h,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg>`.markup)} ${r?Ga:aa`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),r=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],i=e.centers??[],o=i.filter(l=>l.defined).length;return aa`<div class="wrap bodygraph" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2>Connection</h2>${typeof e.totalChannels=="number"?aa`<span class="count">${e.totalChannels} channels</span>`:Ga}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,r,t),r,this.translator)} ${_a([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?R(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:i.length>0?`${o}/${i.length}`:void 0}])} ${this.hideReadings?Ga:aa`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(i)} ${this.renderChannels(s,i)}</div>`}renderDynamics(e){if(!e)return Ga;let t=[{label:"Electromagnetic",aside:bo(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:bo(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:bo(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:bo(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ga:aa`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ga:aa`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],s=r.includes("A"),i=r.includes("B"),o=!!t.defined&&!s&&!i;return aa`<div class="row"><span class="cname">${t.name??R(String(t.id??""))}</span> <span class="roxy-chip ${o?"together":""}" data-tone="${t.defined&&!o?"success":Ga}">${t.defined?o?"Only together":"Defined":"Open"} </span><span class="who">${$x(!!t.defined,s,i)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ga;let r=new Map(t.map(i=>[String(i.id??""),i.name??""])),s=i=>r.get(i)||R(i);return aa`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(i=>aa`<tr><td>${i.name??""}</td><td class="gates">${i.gateA}-${i.gateB}</td><td>${(i.centers??[]).map(s).join(" to ")}</td><td>${i.circuit??""}</td><td>${i.dynamic?aa`<span class="roxy-chip">${i.dynamic}</span>`:Ga}</td><td class="held">${im(i.personAGates)}</td><td class="held">${im(i.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};ws.endpoints=Yc,ws.styles=[u,z,K,ir,Ti,ji,He,vx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-end:var(--roxy-space-sm)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.cname{flex:1;min-width:16ch}.roxy-chip.together{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.who{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:var(--roxy-info-fg);--src-right:var(--roxy-warning-fg);--src-ink:var(--roxy-bg)}`],ws=m([x("roxy-hd-connection")],ws);function bo(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function im(n){let a=n??[];return a.length>0?a.join(", "):"Neither"}function $x(n,a,e){return a&&e?"Defined in both charts":a?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}import{css as Ex,html as ut,nothing as Vt}from"lit";import{nothing as wx,svg as Zn}from"lit";var Bl=360,kx=470,Hl=8,cm=Bl-Hl*2,Lo=48,Wn=15,Fl=7,om=16,vo=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],dm=`0 0 ${Bl} ${kx}`;function Sx(n,a){return Hl+cm*(n*2+1)/(a*2)}function pm(n){return jn[n.gateA]==="throat"||jn[n.gateB]==="throat"}function Rx(n){return(pm(n)?jn[n.gateA]==="throat":jn[n.gateA]==="g")?n.gateA:n.gateB}function Cx(){return vo.map(n=>Zn`<g>
83
- <rect class="pn-bar" x=${Hl} y=${n.y} width=${cm} height=${Lo} rx="10" />
84
- <text class="pn-bar-label" x=${Bl/2} y=${n.y+Lo/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
- </g>`)}function Tx(n,a,e,t){return e.map((r,s)=>Zn`<g>
86
- <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*om} cy=${a} r=${Fl} />
87
- <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*om} y=${a} text-anchor="middle" dominant-baseline="central">${t(r)}</text>
88
- </g>`)}function lm(n,a,e,t,r,s){let i=t.length>0;return Zn`<g>
89
- <circle class="pn-gate-dot ${i?"on":""}" cx=${n} cy=${a} r=${Wn} />
79
+ `}function Sf(n,a){let e=n.lagnaSign.toLowerCase();return k`
80
+ ${wf(n.divisionLabel)}
81
+ ${Se.map(t=>kf(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,El(t,n.lagnaSign),a))}
82
+ `}function Dl(n){return kl(n.lagnaSign)!==-1}function Rf(n,a,e){if(a==="north"&&!Dl(n))return _h(n,e);switch(a){case"north":return vf(n,e);case"east":return Sf(n,e);default:return _h(n,e)}}function ao(n,a={}){let e=ha(a.lang);return k`<svg class="kundli" xmlns=${pa} viewBox=${`0 0 ${Nt} ${Nt}`} preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label=${a.label??e("Vedic birth chart with twelve sign houses")}><title>${a.title??e("Vedic kundli")}</title>${Rf(n,a.style??"north",e)}</svg>`.markup}var Cf=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}];function Tf(n,a){let e=Object.values(n.placements).flat(),t=[];return e.some(r=>r.isRetrograde)&&t.push(`${Sl} ${a("retrograde")}`),e.some(r=>r.combust)&&t.push(`${Rl} ${a("combust")}`),e.some(r=>r.war)&&t.push(`${Cl} ${a("planetary war")}`),t.length===0?Al:qn`<p class="roxy-frame">${t.join(" \xB7 ")}</p>`}function Ef(n){return qn`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function ro(n,a){let e=[];Dl(n)||e.push(Ef(a));let t=Tf(n,a);return t!==Al&&e.push(t),e}function so(n,a,e){return mt({items:Cf.map(({id:t,source:r})=>({id:t,label:e(r)})),active:n,onSelect:a,label:e("Kundli style"),idPrefix:"kundli",controls:true})}function Ih(n,a,e,t){return qn`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${V()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${a} ${t("Sign")}</th><th scope="col">D${a} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([r,s])=>qn`<tr><th scope="row">${s.graha??r}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?qn`<span>${tt(s.longitude)}</span><small>${b(e,s.longitude,12)}°</small>`:Al}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}import{css as Df}from"lit";var no=Df`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm);overflow-x:auto}.kundli-reference-table{width:100%}.kundli-reference-table :is(th,td){white-space:nowrap}.kundli-reference-table small{color:var(--roxy-secondary);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,35rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}`;var _f={number:9,name:"Navamsa"},Gh=n=>"division"in n&&n.division?n.division:_f,hr=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=Gh(this.data),t=`D${e.number} ${e.name}`;return to(this.data.chart.meta,{divisionLabel:t,natalReference:true})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=Gh(e),{vargottama:s}=e;return Yn`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${r.number} ${r.name} ${tl(r.name,r.sanskritName)?Yn`<span class="division-meta">· ${r.sanskritName}</span>`:Pl}</h2>${r.significance?Yn`<p class="significance">${r.significance}</p>`:Pl} ${Q(this.effectiveLang(),e.frame,this.translator)} ${ro(t,this.translator)}</div>${so(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Mf(ao(t,{style:this.chartStyle,lang:this.effectiveLang(),label:this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${r.number} ${r.name}`}),title:`D${r.number} ${r.name}`})),`D${r.number} ${r.name}`,this.translator)}</div>${Ih(e.chart.meta,r.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?Yn`<div class="vargottama-row" part="details"><span class="roxy-label">${this.t("Vargottama")}:</span><ul class="roxy-chips" aria-label="${this.t("Vargottama planets")}">${s.map(i=>Yn`<li>${Fe(w(i))} ${i}</li>`)}</ul></div>`:Pl}</div>`}};hr.endpoints=Fc,hr.styles=[f,He,G,Di,no,z,et,Af`.division-meta{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);color:var(--roxy-muted)}.significance{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)}.vargottama-row{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}`],m([Pf({type:String,reflect:true,attribute:"chart-style"})],hr.prototype,"chartStyle",2),hr=m([x("roxy-divisional-chart")],hr);import{css as Nf,html as Jt,nothing as ps}from"lit";import{property as zf}from"lit/decorators.js";var Of={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},mr=class extends g{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,r=Of[this.type]??this.type,s=(e.severity??"").toLowerCase(),i=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,o=i*33;return Jt`<article class="card" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="${`badge roxy-chip ${t?"present":"absent"}`}" data-tone="${t?"danger":"success"}">${t?this.t("Present"):this.t("Absent")} </span>${Q(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Jt`<p class="subtype"><span class="subtype-label roxy-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:ps} ${e.severity?Jt`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${i}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" data-tier="${i}" style="width:${o}%"></span></div>`:ps} ${e.description&&!this.hideReadings?Jt`<p class="description">${e.description}</p>`:ps} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Jt`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(l=>Jt`<li>${l}</li>`)}</ul></div>`:ps} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Jt`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(l=>Jt`<li>${l}</li>`)}</ul></div>`:ps}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return ps;let t=[];for(let[r,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Jt`<div><h3>${r}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[i,o]of Object.entries(s))typeof o=="string"&&o.length>0&&t.push(Jt`<div><h3>${i}</h3><p>${o}</p></div>`);return t.length===0?ps:Jt`<div class="effects" part="section effects">${t}</div>`}};mr.endpoints=Bc,mr.styles=[f,G,Nf`.card{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-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}h2{text-transform:capitalize}.subtype{font-size:var(--roxy-text-sm)}.subtype-label{margin-inline-end:var(--roxy-space-sm)}.badge{font-weight:var(--roxy-weight-bold)}.severity-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;inline-size:100%;overflow:hidden}.severity-fill{background:var(--roxy-warning);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.severity-fill[data-tier="3"]{background:var(--roxy-danger)}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}h3{margin-block-end:var(--roxy-space-xs)}ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.effects{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.effects p{font-size:var(--roxy-text-sm)}`],m([zf({type:String,reflect:true})],mr.prototype,"type",2),mr=m([x("roxy-dosha-card")],mr);import{css as Ff,html as Me,nothing as yt}from"lit";var If=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Wn(n){if(!n.text)return"";let a=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=a;e&&(t=a?If.test(e.trim())?`${a}.${e}`:`${a}, ${e}`:e);let r=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[R(n.text),t].filter(Boolean).join(" "),r,n.basis].filter(Boolean).join(" \xB7 ")}import{css as Gf}from"lit";var gr=Gf`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var Bf=["vata","pitta","kapha"],Hf={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function jf(n){return n.split("-").map(D).join("-")}function Kf(n,a){return Xe(n,(a??"").split(" ").filter(Boolean).map(D))}var hs=class extends g{renderData(a){let e=this.effectiveLang(),t=a.composite;return Me`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?Me`<span class="type">${jf(t.type)}</span>`:yt}</header>${this.renderBar(e,a)}<div class="facts" part="details">${t?.dominant?Me`<span><span class="roxy-label">${this.t("Dominant")}</span><b>${D(t.dominant)}</b></span>`:yt} ${t?.secondary?Me`<span><span class="roxy-label">${this.t("Secondary")}</span><b>${D(t.secondary)}</b></span>`:yt} ${a.lagnaSign?Me`<span><span class="roxy-label">${this.t("Lagna")}</span><b>${D(a.lagnaSign)}</b></span>`:yt} ${a.moonSign?Me`<span><span class="roxy-label">${this.t("Moon sign")}</span><b>${D(a.moonSign)}</b></span>`:yt}</div>${this.renderFactors(e,a.factors)} ${this.renderRanking(e,a.strengthRanking)} ${this.renderPlanetDoshas(a.planetDoshas)} ${a.summary&&!this.hideReadings?Me`<p class="summary" part="section readings">${a.summary}</p>`:yt} ${Q(e,a.frame,this.translator)} ${a.meta?.disclaimer?Me`<p class="disclaimer" part="disclaimer">${a.meta.disclaimer}</p>`:yt}</article>`}renderBar(a,e){let t=e.composite,r=Bf.map(i=>({humour:i,value:t?.[i]??0}));return r.reduce((i,o)=>i+o.value,0)<=0?yt:Me`<div part="chart"><div class="bar" role="img" aria-label="${r.map(i=>`${D(i.humour)} ${fe(a,i.value,0)}`).join(", ")}">${r.filter(i=>i.value>0).map(i=>Me`<div class="${`seg seg-${i.humour}`}" style="${`flex: ${i.value} 0 0`}"></div>`)}</div><p class="shares">${r.map(i=>Me`<span><span class="${`swatch seg-${i.humour}`}"></span>${D(i.humour)} <b>${fe(a,i.value,0)}</b></span>`)}</p></div>`}renderFactors(a,e){let t=e??[];return t.length===0?yt:Me`<section part="section factors"><h3>${this.t("Factors")}</h3><ul class="rows">${t.map(r=>Me`<li class="row" part="label-track"><span class="roxy-label">${this.factorLabel(r.id)}</span><div><span>${Kf(a,r.input)}</span> ${r.doshas?.length?Me`· ${r.doshas.map(s=>D(s)).join(", ")}`:yt} ${typeof r.weight=="number"?Me`· <span class="roxy-label">${this.t("Weight")}</span>${b(a,r.weight,2)}`:yt} ${this.renderCitation(r.source)}</div></li>`)}</ul></section>`}factorLabel(a){let e=Hf[a??""];return e?this.t(e):R(a??"")}renderCitation(a){let e=Wn(a??{});return e?Me`<div class="cite"><p><span class="roxy-label">${this.t("Source")}</span>${e}</p>${a?.note?Me`<details class="note"><summary>${this.t("Note on the source")}${V()}</summary><p>${a.note}</p></details>`:yt}</div>`:yt}renderRanking(a,e){let t=e??[];return t.length===0?yt:Me`<section part="section ranking"><h3>${this.t("Shadbala")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Shadbala")}"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(r=>Me`<tr class="${r.strong?"is-strong":""}"><td>${_(a,r.rank)}</td><td>${r.graha??""}</td><td>${this.t("{{value}} virupas",{value:b(a,r.totalVirupas,2)})}</td><td>${r.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(a){let e=a??[];return e.length===0?yt:Me`<section part="section planet-humours"><h3>${this.t("Planetary humours")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Planetary humours")}"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>Me`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(r=>D(r)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" \xB7 ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(a){let e=new Set;for(let t of a)for(let r of[t.doshaSource,t.dhatuSource]){let s=Wn(r??{});s&&e.add(s)}return e.size===0?yt:Me`<p class="cite"><span class="roxy-label">${this.t("Source")}</span>${[...e].join(" \xB7 ")}</p>`}};hs.endpoints=Hc,hs.styles=[f,G,z,gr,Ff`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.type{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold)}.bar{width:100%;min-width:0;border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);block-size:1lh;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info) 45%, var(--roxy-surface))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger) 45%, var(--roxy-surface))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success) 45%, var(--roxy-surface))}.shares,.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.swatch{block-size:.5lh;inline-size:.5lh;border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.shares b,.facts b{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.facts .roxy-label,.row>div .roxy-label,.cite .roxy-label{margin-inline-end:var(--roxy-space-xs)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.cite{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.cite .roxy-label{font-size:inherit}.cite .note summary{align-items:center;gap:var(--roxy-space-xs);width:fit-content;color:var(--roxy-secondary);display:flex}.cite .note p{margin-block-start:calc(var(--roxy-space-unit) / 2)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tr.is-strong td{font-weight:var(--roxy-weight-bold)}.summary{font-size:var(--roxy-text-sm)}.disclaimer{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);padding-inline-start:var(--roxy-space-md)}`],hs=m([x("roxy-dosha-constitution")],hs);import{css as Vf,html as io,nothing as Ml}from"lit";var ms=class extends g{renderData(a){return io`<article class="card" part="card" aria-label="${a.name??this.t("Dream symbol")}"><header class="head" part="header">${a.letter?io`<span class="letter" aria-hidden="true">${a.letter}</span>`:Ml}<div><p class="roxy-label">${this.t("Dream symbol")}</p>${a.name?io`<h2>${a.name}</h2>`:Ml}</div></header>${a.meaning?io`<p>${a.meaning}</p>`:Ml}</article>`}};ms.endpoints=jc,ms.styles=[f,Vf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.letter{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:2lh;inline-size:2lh;color:var(--roxy-accent-ink);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);text-transform:uppercase;flex:none;justify-content:center;align-items:center;display:inline-flex}`],ms=m([x("roxy-dream-card")],ms);import{css as Uf,html as oo,nothing as Fh}from"lit";var gs=class extends g{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let r=typeof e.total=="number"?e.total:t.length;return oo`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2>${this.t("Dream symbols")}</h2><span class="count">${r===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:r})}</span></header><ul class="grid" part="section symbols">${t.map(s=>oo`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?oo`<span class="letter" aria-hidden="true">${s.letter}</span>`:Fh} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?oo`<div class="detail" part="detail">${this.openedRow}</div>`:Fh}</section>`}};gs.endpoints=Kc,gs.styles=[f,Uf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm);width:100%;padding:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;display:flex}.result[aria-pressed=true],.result:hover{border-color:var(--roxy-accent)}.result[aria-pressed=true] .name{color:var(--roxy-accent-ink)}.detail{margin-block-start:var(--roxy-space-md)}.letter{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);text-transform:uppercase;flex:none}.name{font-size:var(--roxy-text-sm)}`],gs=m([x("roxy-dream-search")],gs);import{css as ix,html as Z,nothing as rt}from"lit";import{property as Qt,state as ba}from"lit/decorators.js";import{ifDefined as va}from"lit/directives/if-defined.js";import{live as ox}from"lit/directives/live.js";var Ia={accent:"Accent color",afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",colors:"Brand colors",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",font:"Typeface",footer:"Footer line",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",logo:"Logo URL",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",primary:"Primary color",q:"Search",question:"Your question",readings:"Include readings",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",size:"Paper size",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var Bh={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:true}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:true}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:true}},"GET /crystals":{color:{path:"/crystals/colors",lang:true},planet:{path:"/crystals/planets",lang:true}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:true}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:true}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:true}}},Hh={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Kt=(n,a)=>`${n}.${a}`;function co(n){let a=/^(.+)\.(\d+)$/.exec(n);return a?{key:a[1],index:Number(a[2])}:null}function po(n,a=Xo,e=t=>Ia[t]??R(t)){let t=co(n);return t?a("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):a(R(n))}function Kh(n,a){let e=a.key??a.name;if(Uh(e))return Xs(n,e);if(!a.label)return Xs(n,a.name);let t=Object.keys(Ia).find(r=>Ia[r]===a.label);return Jo(n,a.label)??(t?Xs(n,t):void 0)}function Vh(n,a,e){let t=Kt(a,0);return n.filter(r=>r.group===t).map(r=>({...r,key:`${Kt(a,e)}.${r.name}`,group:Kt(a,e)}))}function zl(n){return n.length<=(ho(n)?30:12)?"tiles":"select"}function ho(n){return n.every(a=>a.length<=2)}var qf=["format","branding","readings"],Yf=["latitude","longitude","timezone"],jh=["latitude","longitude"];function Uh(n){let a=n.match(/^(.+?)(Latitude|Longitude)$/);return a?{group:a[1],leaf:a[2].toLowerCase()}:null}var Wf=Se.map(n=>n.toLowerCase());function yr(n,a){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?a[e]:void 0}return n}}function qh(n){let a=n.anyOf??n.oneOf;return!a||a.length===0?n:a.find(e=>Array.isArray(e.enum))??a.find(e=>Nl(e)&&Nl(e)!=="null")??a[0]??n}function Nl(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let a=n.type.filter(e=>e!=="null");return a.length===1?a[0]:void 0}function Zf(n){let a=qh(n),e=Nl(a);return Array.isArray(a.enum)?zl(a.enum):e==="boolean"?"toggle":a.format==="date"?"date":a.format==="time"?"time":a.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function Yh(n){if(n.length!==12)return false;let a=new Set(n.map(e=>e.toLowerCase()));return Wf.every(e=>a.has(e))}function lo(n,a,e){let t=qh(a);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Zf(a)??"text",required:e.required,description:t.description??a.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:a.default??t.default,example:a.example??t.example}}function _l(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function Wh(n,a,e,t=n.requestBody?"POST":"GET"){let r=[],s=[],i=false,o,l=n.requestBody?.content?.["application/json"]?.schema,c=yr(l,a),d=c?.["x-required-any-of"],p=(n["x-request-cost"]??1)>1;if(c?.properties){let h=_l(c);for(let[u,v]of Object.entries(c.properties)){if(p&&qf.includes(u))continue;let L=yr(v,a)??{},$=L.type==="array"?yr(L.items,a):void 0;if($?.type==="object"&&$.properties){let P=Math.max(1,L.minItems??1),U=_l($);s.push({key:u,min:P,max:L.maxItems??P});for(let Ge=0;Ge<P;Ge++)for(let[$t,la]of Object.entries($.properties)){let Ea=yr(la,a)??{};r.push(lo($t,Ea,{key:`${Kt(u,Ge)}.${$t}`,group:Kt(u,Ge),required:h.has(u)&&U.has($t)}))}}else if(L.type==="object"&&L.properties){let P=_l(L);for(let[U,Ge]of Object.entries(L.properties)){let $t=yr(Ge,a)??{};$t.type==="array"&&yr($t.items,a)?.type==="object"||r.push(lo(U,$t,{key:`${u}.${U}`,group:u,required:h.has(u)&&P.has(U)}))}}else{let P=Uh(u),U=lo(P?.leaf??u,L,{key:u,group:P?.group,required:h.has(u)});P&&(U.label=`${R(P.group)} ${P.leaf}`),r.push(U)}}}for(let h of n.parameters??[]){if(h.in!=="path"&&h.in!=="query")continue;if(h.name==="lang"&&h.in==="query"){i=true,o=yr(h.schema,a)?.enum?.filter(L=>typeof L=="string");continue}let u=yr(h.schema,a)??{},v=lo(h.name,u,{key:h.name,required:!!h.required,inQuery:h.in==="query"});if(h.in==="path"&&v.enum&&/^(id|identifier|slug)$/i.test(Ia[v.name]??R(v.name))){let L=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(h.description??v.description??"")?.[1]?.trim();L&&(v.label=L)}r.push(v)}for(let h of r)!h.group&&!h.label&&r.some(u=>u.group&&u.name===h.name)&&(h.label=Xf(h));return Ol({title:Jf(n.summary,e),fields:r,hasLang:i,...o?.length?{langs:o}:{},...s.length>0?{repeats:s}:{},...d?{requiredAnyOf:d}:{}},t,e)}function Xf(n){let e=(Ia[n.name]??R(n.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(n.description??"")?.[1];return t?Ia[t.toLowerCase()+n.name.replace(/^./,r=>r.toUpperCase())]:void 0}function Ol(n,a,e){let t=`${a.toUpperCase()} /${e.replace(/^\//,"")}`,r=Bh[t]??{},s=Hh[t]??{},i=n.fields.map(h=>{let u={...h};return delete u.role,delete u.city,delete u.viewerZone,delete u.moment,delete u.fold,{...u,...r[h.key]&&{source:r[h.key]},...s[h.key]&&{disabledWhen:s[h.key]}}}),o=[...new Set(i.map(h=>h.group))].map(h=>h===void 0?{}:{key:h,label:po(h)}),l=o.filter(h=>jh.every(u=>i.some(v=>v.group===h.key&&v.name===u)));for(let[h,u]of l.entries()){let v=i.filter($=>$.group===u.key),L=v.find($=>$.name==="timezone")??(h===0?i.find($=>!$.group&&$.name==="timezone"):void 0);u.location={fields:[...v.filter($=>jh.includes($.name)).map($=>$.key),...L?[L.key]:[]],required:v.some($=>Yf.includes($.name)&&$.required)}}for(let h of i)h.name==="seed"?h.role="seed":(h.name==="limit"||h.name==="offset")&&!h.required?h.role="hidden-default":l.some(u=>u.location?.fields.includes(h.key))?h.role="location":h.name==="timezone"&&(h.city=true,!h.group&&!h.required&&(h.viewerZone=true));let c=o.filter(h=>h.key!==void 0&&(h.location||i.some(u=>u.group===h.key&&u.required))),d=i.some(h=>!h.group&&!h.role&&h.required)||c.length>0||l.some(h=>h.key===void 0);for(let h of o)h.key!==void 0&&d&&!c.includes(h)&&(h.fold=true);let p=h=>c.length>0&&h.default===void 0&&(h.kind==="date"||h.kind==="time"||h.kind==="datetime");for(let h of i)h.group?o.find(u=>u.key===h.group)?.fold&&(h.fold=true):!h.role&&d&&!h.required?p(h)?h.moment=true:h.fold=true:!h.role&&!d&&h.default!==void 0&&(h.fold=true);return{...n,fields:i,groups:o,opensOnLoad:Qf(n,a)}}function Zh(n,a){let e=n.filter(t=>t.moment);return e.some(t=>t.kind==="time"||t.kind==="datetime")&&e.every(t=>a[t.key]===void 0||a[t.key]==="")}function Jf(n,a){let e=n?.split(" - ")[0]?.trim();return e||R(a.split("/").pop()??"")}function Qf(n,a){return a.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function Xh(n,a=[]){if(a.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Jh(n,a){let e=gi(n,a);return e&&`${e}/schemas`}function Qh(n,a){let e=a.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function ex(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let a=Object.values(n),e=a.find(Array.isArray);return e||(a.find(r=>!!r&&typeof r=="object"&&Object.values(r).every(s=>typeof s=="number"))??null)}function Il(n,a="id"){let e=ex(n);if(!e)return[];if(!Array.isArray(e)){let r=Object.keys(e),s=r.length>0&&r.every(o=>/^[a-z]$/.test(o));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:r).map(o=>({value:o,label:s?o.toUpperCase():o,disabled:!e[o]}))}let t=[];for(let r of e){if(typeof r=="string"){t.push({value:r,label:r});continue}if(!r||typeof r!="object")continue;let s=r,i=s.id??s[a]??s.number;if(i==null)continue;let o=String(i),l=s.name??s.english;t.push({value:o,label:typeof l=="string"?l:o})}return t}function em(n){let a=n?.total;return typeof a=="number"?a:void 0}import{css as ax,html as un,nothing as Gl}from"lit";import{ifDefined as Fl}from"lit/directives/if-defined.js";import{css as tx}from"lit";var mo=tx`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function go(n,a){let e,t=((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...r)},a)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var rx=10,sx=10,Bl=new Map;function tm(n,a,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&a?{lang:a}:{},...e}}function jl(n,a,e,t){let r=JSON.stringify([n.submitUrl??n.baseUrl,a.path,e,t]),s=Bl.get(r);return s||(s=nx(n,a,e,t).catch(i=>{throw Bl.delete(r),i}),Bl.set(r,s)),s}async function nx(n,a,e,t){let r=[];for(let s=0;s<sx;s++){let i=await qa(n,{path:a.path,method:"GET",query:tm(a,t,r.length?{offset:r.length}:{})}),o=Il(i,e);r.push(...o);let l=em(i);if(!a.limit||l===void 0||r.length>=l||!o.length)break}return r}var Hl=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),yo=class{constructor(a,e,t,r,s){this.host=a;this.source=e;this.field=t;this.context=r;this.onPick=s;this.query="";this.options=[];this.open=false;this.highlight=-1;this.loading=false;this.error=null;this.search=go(a2=>{this.searchServer(a2)},250);a.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(a){this.query=a,this.error=null,this.source.search?a.trim().length<2?this.close():this.search(a):this.filter(a),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=false,this.highlight=-1,this.host.requestUpdate()}pick(a){this.query=a.label,this.close(),this.onPick(a)}keydown(a){let e=this.options.length;if(a.key==="Escape"){this.close();return}if(a.key==="ArrowDown"&&!this.open){a.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(a.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(a.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(a.key==="Home")this.highlight=0;else if(a.key==="End")this.highlight=e-1;else if(a.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;a.preventDefault(),this.host.requestUpdate()}}async filter(a){let{route:e,lang:t}=this.context();this.loading=true,this.host.requestUpdate();try{let r=await jl(e,this.source,this.field,t);if(a!==this.query)return;let s=Hl(a.trim());this.show(r.filter(i=>Hl(i.label).includes(s)||Hl(i.value).includes(s)))}catch(r){this.fail(r)}finally{this.loading=false,this.host.requestUpdate()}}async searchServer(a){let{route:e,lang:t}=this.context(),r=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=true,this.host.requestUpdate();try{let i=await qa(e,{path:this.source.path,method:"GET",query:tm({...this.source,limit:rx},t,{[r]:a})},s.signal);if(s.signal.aborted)return;this.show(Il(i,this.field))}catch(i){if(s.signal.aborted)return;this.fail(i)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=false,this.host.requestUpdate())}}show(a){this.options=a,this.open=true,this.highlight=a.length?0:-1}fail(a){this.options=[],this.open=false,this.error=a instanceof Error?a.message:String(a)}};function am(n,a,e,t={}){let r=`${a}-listbox`;return un`<div class="picker"><input id="${a}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${r}" aria-autocomplete="list" aria-labelledby="${Fl(t.labelledby)}" aria-describedby="${Fl(t.describedby)}" aria-invalid="${Fl(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${a}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?un`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Gl} ${n.open?un`<ul id="${r}" class="results" role="listbox">${n.options.length===0?un`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,i)=>un`<li id="${`${a}-opt-${i}`}" class="option" role="option" aria-selected="${n.highlight===i?"true":"false"}" @mousedown="${o=>o.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:Gl}</div>${n.error?un`<small class="field-error" role="alert">${n.error}</small>`:Gl}`}var rm=[mo,ax`.picker{position:relative}`];var sm=`${en}/openapi.json`,nm=Jh(Mn,globalThis.document?.currentScript?.src||import.meta.url),Kl=new Map,uo=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},fo=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function lx(n){let a=Kl.get(n);return a||(a=fetch(n).then(async e=>{if(!e.ok)throw new uo(e.status);return await e.json()}).catch(e=>{throw Kl.delete(n),e}),Kl.set(n,a)),a}function cx(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var im=n=>/\bbirth/i.test(n?.description??""),om=n=>n.key===`${n.group}.${n.name}`;function dx(n){let a=n.trim();if(!a)return[];try{let e=JSON.parse(a);if(Array.isArray(e))return e}catch{}return a.split(",").map(e=>e.trim()).filter(Boolean)}var pe=class extends Ua{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=false;this.fullPages=false;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=false;this.repeats=[];this.formTitle="";this.hasLang=false;this.values={};this.loaded=false;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=false,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=true,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||sm,message:e instanceof Error?e.message:String(e)},bubbles:true,composed:true}))}}specErrorMessage(e){return e instanceof uo?this.t("HTTP error {{status}}",{status:e.status}):e instanceof fo?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(sm)}async modelFromSpec(e){let t=await lx(e),r=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[r]?.[this.method.toLowerCase()];if(!s)throw new fo(this.method,r);return Wh(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){if(!nm)return null;try{let e=await fetch(`${nm}/${Qh(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Ol(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??false,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang,this.langs=e.langs;let t={};for(let r of e.fields){let s=r.viewerZone?void 0:this.fullPages&&r.name==="limit"&&this.roleOf(r)==="hidden-default"?r.max??r.default:r.default;s!==void 0&&(t[r.key]=s);let i=r.group&&om(r)?this.initialValues?.[r.group]?.[r.name]:this.initialValues?.[r.key];i!==void 0&&(t[r.key]=i)}this.values=this.withoutDisabled(t),this.loaded=true,this.loadChoices(),this.autoload&&this.opensOnLoad&&el(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!el(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let r=new yo(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));r.query=String(this.values[t.key]??""),this.pickers.set(t.key,r);continue}this.choices={...this.choices,[t.key]:"loading"},jl(this.route,t.source,t.name,this.requestLang()).then(r=>{this.choices={...this.choices,[t.key]:r}},()=>{let{[t.key]:r,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(r=>this.serverIssues?.some(s=>s.path===r));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let r=e.disabledWhen;return!!r&&t[r.field]===r.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?Or(this.publishableKey):void 0;t&&Js(this,t,{warn:true})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let r=this.fields.find(s=>s.key===t.path);return!!r&&this.roleOf(r)==="location"&&this.cityGroup(r)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(t=>Z`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?Z`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:rt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return rt;let t=r=>{let s=this.fields.find(o=>o.key===r);if(s)return this.fieldLabel(s);let i=this.groupKeys().find(o=>o===r);return i?this.groupName(i):this.fieldText({name:r.split(".")[0]??r})};return Z`<div part="validation-error" class="validation-error" role="alert">${e.map(r=>Z`<div><strong>${t(r.path)}</strong> ${r.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(r=>r.group===e);return t.find(r=>r.name==="latitude")??t.find(r=>r.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??false}get soleChoice(){if(this.groupKeys().some(r=>this.groupHasLocation(r))||this.groupKeys().some(r=>r!==void 0))return null;let e=this.fields.filter(r=>r.required&&this.isRendered(r)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return true;if(!this.opensOnLoad)return false;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(r=>r.value);return this.isFilter(e)&&!ho(t)?"select":this.choices[e.key]?zl(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(r=>({value:r,label:this.optionText(e.name,r)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Zh(this.fields,this.values)?this.t("Show right now"):this.t(Xh(this.endpoint,this.fields))}requestLang(e){return hi(this,e)}fieldText(e){let t=this.requestLang();return e.label?Kh(t,e)??e.label:re(t,e.name,Ia[e.name])}optionText(e,t){return B(this.requestLang(),e,t)}onLocationFor(e){return t=>{let r=this.groups.find(i=>i.key===e)?.location?.fields??[],s={};for(let i of r){let o=this.fields.find(l=>l.key===i)?.name;o&&(s[i]=t[o])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,t){let r={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(r[s.key]=void 0);this.setValues(r)}onTilesKeyDown(e){return t=>{let r=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(r.length===0)return;let s=r.indexOf(this.values[e.key]),i;if(t.key==="Home")i=0;else if(t.key==="End")i=r.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")i=s===-1?0:(s+1)%r.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")i=s===-1?r.length-1:(s-1+r.length)%r.length;else return;t.preventDefault();let o=r[i];if(o===void 0)return;this.chooseOption(e,o);let l=t.currentTarget,c=this.choicesOf(e).findIndex(d=>d.value===o);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:true,composed:true}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(i=>i.path));let t={};for(let i of this.fields){let o=this.values[i.key];if(i.name==="seed"&&(o===void 0||o==="")&&(o=cx()),i.viewerZone&&(o===void 0||o==="")&&(o=Rp()??i.default),o===void 0||o==="")continue;i.kind==="array"&&typeof o=="string"&&(o=dx(o));let l=i.group?co(i.group):null;if(l){let c=t[l.key]??[],d=c[l.index]??{};d[i.name]=o,c[l.index]=d,t[l.key]=c}else if(i.group&&om(i)){let c=t[i.group]??{};c[i.name]=o,t[i.group]=c}else t[i.key]=o}let r=this.fields.filter(i=>i.inQuery).map(i=>i.name),s=this.requestLang(this.langs);this.hasLang&&s&&(t.lang=s,r.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:r,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:true,composed:true}))}collectMissing(){let e=[],t=[],r=new Set;for(let s of this.fields){if(!s.required)continue;let i=this.roleOf(s)==="location";if(!this.isRendered(s)&&!i)continue;let o=this.values[s.key];if(!(o!==void 0&&o!=="")){if(e.push(s.key),i){r.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of r)t.push(this.locationLabel(s));return{keys:e,labels:t}}get readsEnglish(){return Hd(this.effectiveLang())}renderTitle(){return this.readsEnglish?Z`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:rt}reqMark(e){return e.required?Z`<span class="req" aria-hidden="true">*</span>`:rt}description(e){if(!e.description||!this.readsEnglish)return rt;if(e.description.length<=120)return Z`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return Z`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${V()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,r=!!e.enum&&Yh(e.enum),s=this.choicesOf(e),i=ho(s.map(c=>c.value)),o=s.findIndex(c=>c.value===this.values[e.key]),l=o===-1?s.findIndex(c=>!c.disabled):o;return Z`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${i?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,d)=>{let p=this.values[e.key]===c.value,h=r?N(c.value):void 0;return Z`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${p?"true":"false"}" tabindex="${d===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${h?Z`<span class="tile-glyph roxy-glyph" aria-hidden="true">${h}</span>`:rt} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${va(this.issueFor(e)?"true":void 0)}" aria-describedby="${va(this.issueFor(e)?`${t}-error`:void 0)}" .value="${ox(this.values[e.key]??"")}" @change="${r=>this.chooseOption(e,r.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(r=>Z`<option value="${r.value}" ?selected="${this.values[e.key]===r.value}" ?disabled="${!!r.disabled}">${r.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let r=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key&&this.readsEnglish,i=this.issueFor(e);return Z`<div part="field" class="field">${s?rt:Z`<label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${am(t,r,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:i?`${r}-error`:void 0,invalid:!!i})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,r=this.values[e.key]===true;return Z`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${r?"true":"false"}" @click="${()=>this.pickChoice(e,!r)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,r=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.example!=null?String(e.example):"",i=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(s)?s:"";return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${va(this.issueFor(e)?"true":void 0)}" aria-describedby="${va(this.issueFor(e)?`${t}-error`:void 0)}" min="${va(e.min)}" max="${va(e.max)}" step="${e.kind==="number"?"any":rt}" placeholder="${i||rt}" .value="${this.values[e.key]??""}" @input="${o=>{let l=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let r=this.choices[e.key];return r==="loading"?Z`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:r||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return po(e,(t,r)=>this.t(t,r),t=>this.fieldText({name:t}))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&co(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),r=Vh(this.fields,e,t),s=this.groups.find(o=>o.key===Kt(e,0));if(s){let o=l=>l.replace(`${Kt(e,0)}.`,`${Kt(e,t)}.`);this.groups=[...this.groups,{...s,key:Kt(e,t),label:po(Kt(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(o)}}}]}let i={...this.values};for(let o of r)o.default!==void 0&&(i[o.key]=o.default);this.values=i,this.fields=[...this.fields,...r]}removeRecord(e){let t=Kt(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let r={...this.values};for(let s of Object.keys(r))s.startsWith(`${t}.`)&&delete r[s];this.values=r}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?rt:Z`<div class="repeat-controls">${t<e.max?Z`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:rt} ${t>e.min?Z`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:rt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):im(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return Z`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?Z`<span class="req" aria-hidden="true">*</span>`:rt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return Z`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.pickChoice(e,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let r=e?this.t("{{group}} city",{group:this.groupName(e)}):im(this.placeField(e))?this.t("City of birth"):void 0;return Z`<roxy-location-search endpoint="${va(this.locationUrl||void 0)}" publishable-key="${va(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${va(this.effectiveLang())}" placeholder="${va(r)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(r=>r.group===e&&this.isRendered(r));return Z`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):rt}<div class="fields">${t.map(r=>this.renderField(r))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){return Z`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){if(!this.loaded)return Z`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return Z`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=Or(this.publishableKey);if(e)return Z`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(d=>!d.group&&this.isRendered(d)),r=this.groupKeys().filter(d=>d!==void 0),s=t.filter(d=>!d.fold),i=t.filter(d=>d.fold),o=r.filter(d=>!this.groups.find(p=>p.key===d)?.fold),l=r.filter(d=>this.groups.find(p=>p.key===d)?.fold),c=i.length>0||l.length>0;return Z`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?Z`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:rt} ${this.renderIssueSummary()}<div class="fields">${s.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):rt} ${o.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${c?Z`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...i.map(p=>p.key),...l].some(p=>d.path===p||d.path.startsWith(`${p}.`)))}"><summary>${this.t("Advanced")}${V()}</summary><div class="fields">${i.map(d=>this.renderField(d))}</div>${l.map(d=>this.groupCard(d))}</details>`:rt} ${this.selfSubmits?rt:Z`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let r=Number(t);return Number.isFinite(r)?r:void 0}return t}}};pe.styles=[f,z,rm,ix`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],m([Qt({type:String,attribute:"data-endpoint"})],pe.prototype,"endpoint",2),m([Qt({type:String})],pe.prototype,"method",2),m([Qt({type:String,attribute:"spec-url"})],pe.prototype,"specUrl",2),m([Qt({type:String,attribute:"submit-label"})],pe.prototype,"submitLabel",2),m([Qt({type:String,attribute:"publishable-key"})],pe.prototype,"publishableKey",2),m([Qt({type:String,attribute:"location-url"})],pe.prototype,"locationUrl",2),m([Qt({attribute:false})],pe.prototype,"initialValues",2),m([Qt({attribute:false})],pe.prototype,"serverIssues",2),m([Qt({attribute:false})],pe.prototype,"apiRoute",2),m([Qt({attribute:false})],pe.prototype,"autoload",2),m([Qt({attribute:false})],pe.prototype,"fullPages",2),m([ba()],pe.prototype,"choices",2),m([ba()],pe.prototype,"clearedIssues",2),m([ba()],pe.prototype,"fields",2),m([ba()],pe.prototype,"repeats",2),m([ba()],pe.prototype,"formTitle",2),m([ba()],pe.prototype,"hasLang",2),m([ba()],pe.prototype,"values",2),m([ba()],pe.prototype,"loaded",2),m([ba()],pe.prototype,"specError",2),m([ba()],pe.prototype,"validationErrors",2),pe=m([x("roxy-endpoint-form")],pe);import{css as px,html as st,nothing as xo}from"lit";import{property as hx}from"lit/decorators.js";var mx="12:00 UTC",ur=class extends g{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),r=this.effectiveLang();return st`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2><p class="month roxy-label"><span>${rn(r,t.year,t.month)}</span><span>${mx}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" tabindex="0" aria-label="${this.t("Daily positions")}">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?xo:st`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>st`<li class="signkey-item"><span class="signkey-glyph roxy-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=w(e.name);return st`<div class="track" role="listitem"><span class="body-name">${t?st`<span class="glyph roxy-glyph" aria-hidden="true">${t}</span>`:xo}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?st`<span class="chips roxy-chips">${e.ingresses.map(r=>this.renderIngressChip(r))} ${e.retrogrades.map(r=>this.renderRetrogradeChip(r))}</span>`:xo}</div>`}renderPosition(e){let{degree:t,minute:r}=ol(e.degreeInSign),s=N(e.sign),i=y(e,"sign");return st`<span class="pos" title="${i}">${t}${s?st`<span class="sg roxy-glyph" aria-hidden="true">${s}</span>`:st`<span class="sg">${i}</span>`}${String(r).padStart(2,"0")}</span>`}renderIngressChip(e){let t=N(e.sign),r=Gr(this.effectiveLang(),e.date);return st`<span class="roxy-chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:r})}"><span aria-hidden="true">→</span>${Fe(t)}${e.signLabel} <span class="chip-date">${r}</span></span>`}renderRetrogradeChip(e){let t=wp(this.effectiveLang(),e.start,e.end);return st`<span class="roxy-chip chip--retro" data-tone="danger"><span class="roxy-glyph" aria-hidden="true">${be}</span>${this.t("Retrograde {{range}}",{range:t})}</span>`}renderGrid(e){let t=this.effectiveLang();return st`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(r=>{let s=w(r.name);return st`<th scope="col" title="${r.label}">${s?st`<span class="glyph roxy-glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${r.label}</span>`:r.label}</th>`})}</tr></thead><tbody>${e.rows.map(r=>st`<tr><th scope="row" class="day">${kp(t,r.date)}</th>${r.cells.map((s,i)=>this.renderCell(s,e.bodies[i],r.date))}</tr>`)}</tbody></table>`}renderCell(e,t,r){if(!e)return st`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(r)?"ingress":"",t?.stationDates.has(r)?"station":""].filter(Boolean).join(" ");return st`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?st`<span class="retro-mark roxy-glyph" aria-label="${this.t("retrograde")}">${be}</span>`:xo}</td>`}toViewModel(e){let t=[],r=new Map;for(let o of e.days)for(let l of o.positions){let c=r.get(l.planet);c||(c=[],r.set(l.planet,c),t.push(l.planet)),c.push({date:o.date,p:l})}let s=[];for(let o of t){let l=r.get(o),c=l?.[0],d=l?.[l.length-1];if(!l||!c||!d)continue;let p=[],h=[],u=new Set,v=new Set;for(let L=0;L<l.length;L++){let $=l[L],P=l[L-1];if(!$||(P&&$.p.sign!==P.p.sign&&(p.push({date:$.date,sign:$.p.sign,signLabel:y($.p,"sign")}),u.add($.date)),P&&$.p.isRetrograde!==P.p.isRetrograde&&v.add($.date),!$.p.isRetrograde))continue;let U=h[h.length-1];U&&P?.p.isRetrograde?U.end=$.date:h.push({start:$.date,end:$.date})}s.push({name:o,label:y(d.p,"planet"),first:c.p,last:d.p,ingresses:p,retrogrades:h,ingressDates:u,stationDates:v})}let i=e.days.map(o=>{let l=new Map(o.positions.map(c=>[c.planet,c]));return{date:o.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:i,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let i of s.positions){let o=String(i.sign??"").toLowerCase();o&&!t.has(o)&&t.set(o,y(i,"sign"))}let r=[];for(let s of Se){let i=t.get(s.toLowerCase()),o=N(s);i&&o&&r.push({sign:s,label:i,glyph:o})}return r}};ur.endpoints=Vc,ur.styles=[f,px`:host{overflow-x:clip}.wrap{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,h3,p{margin:0}header,section{gap:var(--roxy-space-sm);display:grid}.month{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.signkey{gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.signkey-item{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);white-space:nowrap;display:inline-flex}.signkey-glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.track{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:var(--roxy-space-xs);min-inline-size:16ch;font-weight:var(--roxy-weight-bold);display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink)}.span{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;display:inline-flex}.arrow{color:var(--roxy-muted)}.chips{margin-inline-start:auto}.chip-date{color:var(--roxy-muted)}.scroll{min-width:0;overflow-x:auto}table{font-size:var(--roxy-text-xs)}:is(th,td){white-space:nowrap}thead th .glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}th.day{z-index:1;background:var(--roxy-bg);color:var(--roxy-fg);border-inline-end:1px solid var(--roxy-border);position:sticky;left:0}thead th.day{z-index:2}.sg{margin-inline:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-variant-numeric:normal}.retro-mark{font-weight:var(--roxy-weight-bold);margin-inline-start:calc(var(--roxy-space-unit) / 2)}td.retro,td.retro .sg{color:var(--roxy-danger-fg)}td.ingress{box-shadow:inset var(--roxy-line-thick) 0 var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}td.station{border-block-start:var(--roxy-line-thick) solid var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}`],m([hx({type:String})],ur.prototype,"heading",2),ur=m([x("roxy-ephemeris-table")],ur);import{css as gx,html as ea,nothing as Zn}from"lit";var ys=class extends g{renderData(a){let e=a.conjunctions??[],t=a.stars??[];return ea`<div class="wrap" part="card"><header part="header"><h2>${this.t("Fixed stars")}</h2>${typeof a.orb=="number"?ea`<p class="roxy-label">${this.t("Orb")} ${b(this.effectiveLang(),a.orb,1)}°</p>`:Zn}</header>${a.summary&&!this.hideReadings?ea`<p class="summary">${a.summary}</p>`:Zn} ${e.length?ea`<section part="section conjunctions"><h3>${this.t("Conjunctions to the chart")}</h3>${e.map((r,s)=>ea`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:y(r,"point"),star:r.star})}</span> ${V()} <span class="interp-aside"><small>${this.t("orb {{value}}\xB0",{value:b(this.effectiveLang(),r.orb,2)})}</small></span></summary>${r.interpretation&&!this.hideReadings?ea`<div class="interp-body"><p>${r.interpretation}</p></div>`:Zn}</details>`)}</section>`:ea`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):Zn}</div>`}renderCatalog(a){return ea`<details class="catalog"><summary>${V()} ${this.t("Star catalog ({{count}})",{count:a.length})}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Precessed positions for the chart date")}"><table><caption class="roxy-label">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${a.map(e=>{let t=N(e.sign);return ea`<tr><td>${e.name}</td><td>${t?ea`<span class="sg roxy-glyph">${t}</span>`:Zn}${Zt(e.degree)} ${e.sign}</td><td class="num">${b(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><ul class="kw roxy-chips">${(e.keywords??[]).map(r=>ea`<li>${r}</li>`)}</ul></td></tr>`})}</tbody></table></div></details>`}};ys.endpoints=Uc,ys.styles=[f,z,F,gx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.summary{font-size:var(--roxy-text-sm)}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}section>h3{margin-block-end:var(--roxy-space-sm)}.interp-lead .point{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);display:flex}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.sg{color:var(--roxy-secondary);margin-inline-end:var(--roxy-space-xs)}.kw{max-inline-size:32ch}`],ys=m([x("roxy-fixed-stars")],ys);import{css as ux,html as ne,nothing as he}from"lit";import{property as fx}from"lit/decorators.js";var bo=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as yx}from"lit";var vo=yx`.plate-heading{font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-bold);hyphens:manual}@container (width<=30rem){.plate-heading{font-size:calc(var(--roxy-text-xs) / var(--roxy-text-scale) / var(--roxy-text-scale))}}`;var Lo={forward:"Forward",reverse:"Backward"};function us(n){return"mountainCenterStar"in n}var fr=class extends g{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),r=this.mode!=="annual"&&us(e);return ne`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${us(e)?r?ne`<span class="period">${this.t("Period {{n}}",{n:_(t,e.period??0)})}</span>`:he:ne`<span class="period">${e.year??""}</span>`}</header>${us(e)?r?this.renderNatalFacts(e,t):he:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${bo.map(s=>this.renderPalace(e,s))}</div>${r?ne`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:he} ${r&&us(e)?this.renderStructure(e):he} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return ne`<div class="facts" part="details">${e.facing?ne`<span><span class="roxy-label">${this.t("Facing")}</span> <b>${B(t,"facing",e.facing.label??"")}</b></span>`:he} ${e.sitting?ne`<span><span class="roxy-label">${this.t("Sitting")}</span> <b>${B(t,"facing",e.sitting.label??"")}</b></span>`:he} ${typeof e.facingDegrees=="number"?ne`<span>${_(t,e.facingDegrees)}°</span>`:he} ${e.mountainFlight?ne`<span><span class="roxy-label">${this.t("Mountain star")}</span> ${Lo[e.mountainFlight]?this.t(Lo[e.mountainFlight]):e.mountainFlight}</span>`:he} ${e.waterFlight?ne`<span><span class="roxy-label">${this.t("Water star")}</span> ${Lo[e.waterFlight]?this.t(Lo[e.waterFlight]):e.waterFlight}</span>`:he} ${e.straddling?ne`<span><b>${this.t("Straddling")}</b></span>`:he}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?he:ne`<div class="facts" part="details">${typeof e.centerStar=="number"?ne`<span><span class="roxy-label">${this.t("Center")}</span> <b>${_(t,e.centerStar)}</b></span>`:he} ${e.changeoverDate?ne`<span>${C(t,e.changeoverDate)}</span>`:he}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):B(e,"facing",t)}renderPalace(e,t){let r=this.effectiveLang(),s=this.paletteHeading(r,t),i=(e.palaces??[]).find(d=>d.palace===t),o=this.mode!=="annual"&&us(e);if(!i)return ne`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(o&&us(e)){let d=i;return ne`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${d.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${d.water??""}</span> <span class="star" title="${this.t("Period star")}">${d.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${d.combination?ne`<span class="combo">${y(d.combination,"name")}</span>`:he}</div>`}let c=i;return ne`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${y(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?ne`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?ne`<p class="structure" part="reading">${t.meaning}</p>`:he}</section>`:he}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return he;let r=this.effectiveLang(),s=this.mode!=="annual"&&us(e),i=t.map(o=>{let l=this.paletteHeading(r,o.palace??"");if(s){let d=o;return!d.reading&&!d.combination?he:ne`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body">${d.combination?ne`<span>${y(d.combination,"name")}</span>`:he} ${d.reading&&!this.hideReadings?ne`<p part="reading">${d.reading}</p>`:he}</div></li>`}let c=o;return ne`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body"><span>${y(c,"name")}</span> ${c.element?ne`<span class="element-word ${kt(c.element)}">${y(c,"element")}</span>`:he}<dl class="star-facts">${c.nature?ne`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:he} ${c.enhancer?ne`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:he} ${c.remedy?ne`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:he}</dl>${c.meaning&&!this.hideReadings?ne`<p part="reading">${c.meaning}</p>`:he}</div></li>`});return i.every(o=>o===he)?he:ne`<section part="section palaces"><ul class="rows">${i}</ul></section>`}};fr.endpoints=qc,fr.styles=[f,ua,vo,gr,ux`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.period{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.palace{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);grid-template-columns:1fr 1fr;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent) 8%, var(--roxy-surface))}.mountain,.water{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.mountain{color:var(--roxy-info-fg);text-align:start}.water{color:var(--roxy-accent-ink);text-align:end}.star,.palace-name,.combo{text-align:center;grid-column:1/-1}.star{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.combo{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-mountain{background:var(--roxy-info)}.swatch-water{background:var(--roxy-accent)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}.star-facts{gap:var(--roxy-space-xs) var(--roxy-space-md);margin:var(--roxy-space-xs) 0 0;font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs);display:flex}.star-facts dt{color:var(--roxy-secondary);font-size:inherit}.star-facts dd{margin:0}.structure{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}`],m([fx({type:String,reflect:true})],fr.prototype,"mode",2),fr=m([x("roxy-flying-star-chart")],fr);import{css as xx,html as xr,nothing as lm}from"lit";var fs=class extends g{renderData(a){let e=a.windows??[];if(e.length===0)return this.renderEmpty();let t=vt(this.effectiveLang(),a.startDate,a.endDate);return xr`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2>${this.t("Forecast digest")}</h2>${t?xr`<p class="subtitle">${t}</p>`:lm}</div>${e.map(r=>this.renderWindow(r))}</div>`}windowLabel(a){return a===1?this.t("Next 24 hours"):typeof a=="number"?this.t("Next {{count}} days",{count:a}):this.t("Window")}renderWindow(a){let e=[...a.top??[]].sort((s,i)=>(i.significance??0)-(s.significance??0)),t=a.byDomain??{},r=Object.entries(t);return xr`<section class="window" part="section window"><div class="window-head" part="details"><h3>${this.windowLabel(a.days)}</h3><span class="window-count">${this.t("{{count}} events",{count:a.count??0})}</span></div>${r.length>0?xr`<div class="domains" part="legend">${r.map(([s,i])=>xr`<span class="domain-chip"><span class="swatch sw-${s}"></span>${R(s)} ${i}</span>`)}</div>`:lm} ${e.length>0?xr`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:xr`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=this.hideReadings||a.description==null?R(a.type??""):a.description;return xr`<div class="event" part="label-track" role="listitem"><span class="event-date">${C(this.effectiveLang(),a.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:b(this.effectiveLang(),e,0)})}"><span class="sig-fill ${a.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};fs.endpoints=Yc,fs.styles=[f,xx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.window{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.window:first-of-type{border-block-start:0;padding-block-start:0}.window-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.window-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.domains{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.domain-chip{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:inline-flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:.6lh;display:inline-block}.sw-western,.sig-fill.western{background:var(--roxy-accent)}.sw-vedic,.sig-fill.vedic{background:var(--roxy-info)}.sw-biorhythm,.sig-fill.biorhythm{background:var(--roxy-success)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);display:grid}.event-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-tight)}.sig{block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);grid-column:2;overflow:hidden}.sig-fill{height:100%;display:block}.quiet{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}`],fs=m([x("roxy-forecast-digest")],fs);import{css as bx,html as zt,nothing as fn}from"lit";var vx={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},cm=20,Lx=["western","vedic","biorhythm"],xs=class extends g{renderData(a){let e=a.events??[],t=this.groupByDate(e),r=Lx.filter(s=>e.some(i=>i.domain===s));return zt`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2>${this.t("Forecast timeline")}</h2>${a.startDate&&a.endDate?zt`<div class="range">${vt(this.effectiveLang(),a.startDate,a.endDate)} · ${this.t("{{count}} events",{count:a.count??e.length})}</div>`:fn}</header>${r.length?zt`<div class="legend" part="legend">${r.map(s=>zt`<span><span class="swatch swatch-${s}"></span>${vx[s]}</span>`)}</div>`:fn} ${t.length?zt`<div class="days" part="section events" role="list">${t.map(([s,i])=>this.renderDay(s,i))}</div>`:zt`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(a){let e=new Map;for(let t of a){let r=t.date??"",s=e.get(r)??[];s.push(t),e.set(r,s)}return[...e.entries()]}renderDay(a,e){return zt`<div class="day" role="listitem"><div class="day-date">${C(this.effectiveLang(),a)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=Math.max(0,Math.min(100,e));return zt`<div class="event"><span class="dot dot-${a.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderMoon(a)}${this.renderHeadline(a)}</div>${a.description&&!this.hideReadings?zt`<p class="event-desc">${a.description}</p>`:fn}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${a.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(a){let e=a.body?R(a.body):"",t=a.target?R(a.target):"",r=wt({type:a.aspect}),s=r?cn(a.aspect)??Ee({type:a.aspect}):"",i=typeof a.orb=="number"?b(this.effectiveLang(),a.orb,1):"",o=this.typeQualifier(a);return r&&t?zt`<strong>${e}</strong> <span class="${`${Be({type:a.aspect})} roxy-glyph`}">${s}</span> <strong>${t}</strong>${i?zt`<span class="kind">${this.t("orb {{value}}\xB0",{value:i})}</span>`:fn}`:zt`<strong>${e||R(a.type??"")}</strong>${o?zt`<span class="kind">${o}</span>`:fn}`}renderMoon(a){if(a.type==="lunar-phase"&&a.phase)return Wt(this,{illumination:a.phase==="full-moon"?100:0,waxing:true},cm);if(a.type!=="eclipse")return fn;let e=xt(a.body)==="sun";return Wt(this,{illumination:e?0:100,waxing:true},cm,e?"solar":"lunar")}typeQualifier(a){return a.type==="sign-ingress"&&a.target?`enters ${R(a.target)}`:a.type==="retrograde-station"&&a.station?a.station:a.type==="eclipse"?[a.kind,"eclipse"].filter(Boolean).join(" "):a.type==="critical-day"?"critical day":a.type==="dasha-change"&&a.target?`dasha ${R(a.target)}`:R(a.type??"")}};xs.endpoints=Wc,xs.styles=[f,Pa,Xa,bx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend .swatch{block-size:.6lh;inline-size:.6lh;border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-western,.dot-western,.sig-fill-western{background:var(--roxy-accent)}.swatch-vedic,.dot-vedic,.sig-fill-vedic{background:var(--roxy-info)}.swatch-biorhythm,.dot-biorhythm,.sig-fill-biorhythm{background:var(--roxy-success)}.day{gap:var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:9ch minmax(0,1fr);display:grid}.day:first-of-type{border-block-start:0}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;padding-block-start:calc(var(--roxy-space-unit) / 2)}.events{gap:var(--roxy-space-sm);display:grid}.event{align-items:start;gap:var(--roxy-space-sm);grid-template-columns:.4lh minmax(0,1fr);display:grid}.dot{block-size:.4lh;inline-size:.4lh;border-radius:var(--roxy-radius-full);margin-block-start:var(--roxy-space-xs)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm)}.event-line .moon-mark{margin-inline-end:var(--roxy-space-xs)}.event-line .kind{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.event-desc{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.sig{align-items:center;gap:var(--roxy-space-xs);margin-block-start:var(--roxy-space-xs);display:flex}.sig-track{max-inline-size:16ch;block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);flex:1;overflow:hidden}.sig-fill{height:100%;display:block}.sig-val{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],xs=m([x("roxy-forecast-timeline")],xs);import{css as $x,html as te,nothing as _e}from"lit";import{ifDefined as wx}from"lit/directives/if-defined.js";var bs=class extends g{renderData(a){let e=this.effectiveLang(),t=a.chosen,r=a.input?.text??a.input?.textHebrew??"";return te`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 id="gematria-title">${r?`${this.t("Gematria")} \xB7 ${r}`:this.t("Gematria")}</h2>${t?.hebrew?te`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:_e} ${this.chosenForm(a)?.romanization?te`<span class="roman">${this.chosenForm(a)?.romanization}</span>`:_e} ${t?.rule?te`<p class="rule">${t.rule}</p>`:_e}</header>${this.renderLetters(e,this.chosenForm(a)?.letters)} ${this.renderValues(e,a.values,this.t("Cipher values"))} ${this.renderForms(e,a)} ${this.renderTransformations(e,a.transformations)} ${this.renderLatin(e,a.latinValues)} ${this.renderMatches(e,a.matches)} ${this.renderConventions(a.conventions)}</article>`}chosenForm(a){let e=a.hebrewForms??[];return e.find(t=>t.hebrew===a.chosen?.hebrew)??e[0]}renderLetters(a,e){let t=e??[];return t.length===0?_e:te`<section part="section letters"><h3>${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(r=>te`<div class="${`letter${r.isFinal?" is-final":""}`}" dir="ltr" title="${wx(r.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${r.glyph??""}</span> <span class="name">${r.name??""}</span> <span class="num">${_(a,r.value)}</span></div>`)}</div>${t.some(r=>r.isFinal)?te`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:_e}</section>`}renderValues(a,e,t){let r=(e??[]).filter(i=>typeof i.value=="number");if(r.length===0)return _e;let s=r.some(i=>(i.alternateValues??[]).length>0);return te`<section part="section values"><h3>${t}</h3><div class="scroll" tabindex="0" role="region" aria-label="${t}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?te`<th>${this.t("Also published")}</th>`:_e}</tr></thead><tbody>${r.map(i=>te`<tr><td>${R(i.id??"")}</td><td class="num">${_(a,i.value)}</td>${s?te`<td class="num">${(i.alternateValues??[]).map(o=>_(a,o)).join(", ")}</td>`:_e}</tr>`)}</tbody></table></div>${this.renderProvenance(r)}</section>`}renderProvenance(a){let e=new Map;for(let t of a)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?_e:te`<p class="provenance"><span class="roxy-label">${this.t("Tradition")}</span> ${[...e].map(([t,r],s)=>te`${s>0?" \xB7 ":""}${R(t)}${ui(r)?te`<a class="src" href="${r}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:_e}`)}</p>`}renderForms(a,e){let t=e.hebrewForms??[];return t.length<2?_e:te`<section part="section spellings"><h3>${this.t("Spellings")}</h3><ul class="forms">${t.map(r=>te`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${r.hebrew??""}</span> ${r.hebrew===e.chosen?.hebrew?te`<span class="chosen roxy-chip" data-tone="success">${this.t("Chosen")}</span>`:_e}</div><span class="roman">${r.romanization??""}</span> ${r.rule?te`<p class="rule">${r.rule}</p>`:_e} ${this.renderFormTotals(a,r)}</li>`)}</ul></section>`}renderFormTotals(a,e){let t=(e.values??[]).find(r=>typeof r.value=="number");return t?te`<p class="rule"><span class="roxy-label">${R(t.id??"")}</span> ${_(a,t.value)}</p>`:_e}renderTransformations(a,e){let t=e??[];return t.length===0?_e:te`<section part="section substitutions"><h3>${this.t("Substitutions")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Substitutions")}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td>${R(r.id??"")}</td><td>${r.output?te`<span lang="he" dir="rtl">${r.output}</span>`:_e} ${r.outputRomanization?te`<span class="roman">${r.outputRomanization}</span>`:_e}</td><td class="num">${_(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(a,e){let t=e??[];return t.length===0?_e:te`<section part="section latin-ciphers"><h3>${this.t("Latin ciphers")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Latin ciphers")}"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td data-label="${this.t("Cipher")}">${R(r.id??"")} ${r.lineage?te`<p class="lineage">${r.lineage}</p>`:_e}</td><td class="num" data-label="${this.t("Value")}">${_(a,r.value)}</td><td data-label="${this.t("Tradition")}">${R(r.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(a,e){let t=e??[];return t.length===0?_e:te`<section part="section matches"><h3>${this.t("Equal values")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Equal values")}"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>te`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${r.hebrew??""}</span> <span class="roman">${r.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${r.meaning??""} ${r.note&&!this.hideReadings?te`<p class="match-note" part="reading">${r.note}</p>`:_e}</td><td class="num" data-label="${this.t("Value")}">${_(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(a){let e=this.effectiveLang(),t=[];for(let r of["transliteration","misparGadol"]){let s=a?.[r];s&&t.push([re(e,r),B(e,r,s)])}return t.length===0?_e:te`<p class="provenance">${t.map(([r,s],i)=>te`${i>0?" \xB7 ":""}<span class="roxy-label">${r}</span>${s}`)}</p>`}};bs.endpoints=Zc,bs.styles=[f,ga,$x`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{justify-items:start;gap:calc(var(--roxy-space-unit) / 2);min-width:0;display:grid}.hebrew{font-size:calc(var(--roxy-text-xl) * 1.3);font-weight:var(--roxy-weight-bold);line-height:1.4}.roman{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.rule{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.provenance .roxy-label,.rule .roxy-label{font-size:inherit;margin-inline-end:var(--roxy-space-xs)}.src{margin-inline-start:var(--roxy-space-xs)}.letters{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.letter{justify-items:center;gap:calc(var(--roxy-space-unit) / 2);min-inline-size:5ch;padding:var(--roxy-space-xs) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);display:grid}.letter .glyph{font-size:var(--roxy-text-lg);line-height:1.3}.letter .name{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.letter .num{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.letter.is-final{border-color:var(--roxy-accent)}.legend{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.legend .swatch{block-size:.6lh;inline-size:.6lh;border:1px solid var(--roxy-accent);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.lineage,.match-note{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);white-space:normal;margin-block-start:calc(var(--roxy-space-unit) / 2)}a{color:var(--roxy-accent-ink)}.forms{gap:var(--roxy-space-md);margin:0;padding:0;list-style:none;display:grid}.form{gap:var(--roxy-space-xs);min-width:0;border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.form:first-child{border-block-start:0;padding-block-start:0}`],bs=m([x("roxy-gematria")],bs);import{css as kx,html as ta,nothing as vs}from"lit";var dm=8,Ls=class extends g{renderData(a){let e=a.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=a.keyTransits??[],r=a.natalPlanets?.find(s=>s.name==="Moon")?.sign;return ta`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2>${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:q(this.effectiveLang(),a.transitDatetime),birth:q(this.effectiveLang(),a.birthDatetime)})}</p>${r?ta`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:r})}</p>`:vs} ${Q(this.effectiveLang(),a.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?ta`<section class="key" part="section key-transits"><h3>${this.t("Key transits")}</h3>${t.map(s=>ta`<p class="key-item">${s.description}</p>`)}</section>`:vs}</div>`}renderPlanet(a){let e=w(a.name)??"",t=typeof a.longitude=="number"?Pt(a.longitude):void 0;return ta`<article class="row"><div class="row-top"><span class="graha">${e?ta`<span class="glyph roxy-glyph">${e}</span>`:vs}${a.name} </span><span class="pos">${t?`${a.sign} ${t}`:a.sign} </span>${typeof a.houseFromMoon=="number"?ta`<span class="house moon roxy-chip">${this.t("house {{n}} from the Moon",{n:a.houseFromMoon})}</span>`:vs} ${typeof a.natalHouse=="number"?ta`<span class="house lagna roxy-chip">${this.t("house {{n}} from the Lagna",{n:a.natalHouse})}</span>`:vs}</div>${this.renderKaksha(a.kaksha)} ${this.renderContacts(this.t("Drishti"),a.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),a.aspectsToNatal)}</article>`}renderContacts(a,e){return e?.length?ta`<p class="aspects"><span class="contact-label">${a}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}\xB0)",{aspect:Ee({type:t.aspectType}),planet:t.natalPlanet,orb:b(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Ee({type:t.aspectType}),planet:t.natalPlanet})).join(" \xB7 ")}</p>`:vs}renderKaksha(a){if(!a||typeof a.number!="number")return vs;let e=a.number,t=a.bindu===true?"yes":a.bindu===false?"no":"",r=dm,s=a.lord&&typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:e,total:r,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):a.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:r,graha:a.lord}):typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:e,total:r,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:r}),i=a.bindu===null||a.bindu===void 0?"":typeof a.binduCount=="number"?a.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):a.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return ta`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:r})}">${Array.from({length:dm},(o,l)=>ta`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${i?`${s} \xB7 ${i}`:s}</p>`}};Ls.endpoints=Xc,Ls.styles=[f,G,kx`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,h3,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.pos{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.house.moon{border-color:var(--roxy-accent);color:var(--roxy-fg)}.contact-label{font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}.kaksha-bar{block-size:.4lh;margin-block:var(--roxy-space-xs);grid-template-columns:repeat(8,minmax(0,1fr));gap:1px;display:grid}.seg{background:var(--roxy-border);border-radius:var(--roxy-radius-sm)}.seg.here{background:var(--roxy-muted)}.seg.here.yes{background:var(--roxy-success)}.seg.here.no{background:var(--roxy-warning)}.aspects{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.key{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);display:grid}.key-item{font-size:var(--roxy-text-sm)}`],Ls=m([x("roxy-gochara-table")],Ls);import{css as Sx,html as La,nothing as xn}from"lit";var Rx={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},$s=class extends g{renderData(a){let e=(a.breakdown??[]).filter(c=>c?.category!==void 0),t=a.total??0,r=a.maxScore??36,s=t/r*100,i=s>=70?"high":s>=50?"mid":"low",o=s*2.827,l=(100-s)*2.827;return La`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${b(this.effectiveLang(),a.total,1)}</span> <span class="over">/ ${a.maxScore}</span> ${typeof a.percentage=="number"?La`<small class="pct">${fe(this.effectiveLang(),a.percentage,1)}</small>`:xn}</div><div class="verdict-wrap">${typeof a.isCompatible=="boolean"?La`<span class="verdict roxy-chip ${a.isCompatible?"yes":"no"}" data-tone="${a.isCompatible?"success":"danger"}">${a.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:xn} ${a.recommendation&&!this.hideReadings?La`<span class="recommendation">${a.recommendation}</span>`:xn}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="${r}" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45"/><circle class="ring-fill" data-band="${i}" cx="50" cy="50" r="45" stroke-dasharray="${o},${l}" transform="rotate(-90 50 50)"/></svg></div></div>${e.length>0?La`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(c=>{let d=c.score??0,p=c.maxScore??Cx(c.category),h=p?d/p*100:0;return La`<tr><td>${c.category} ${c.description?La`<small>${c.description}</small>`:xn}</td><td class="classification" data-label="${this.t("Person 1")}">${c.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${c.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${h}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${b(this.effectiveLang(),d,1)} / ${p}</td></tr>`})}</tbody></table></div>`:xn} ${(a.doshas?.length??0)>0||(a.doshaCancellations?.length??0)>0?La`<ul class="tags roxy-chips" part="details">${a.doshas?.map(c=>La`<li class="dosha roxy-chip" data-tone="danger">${c}</li>`)} ${a.doshaCancellations?.map(c=>La`<li class="cancel roxy-chip" data-tone="success" title="${c.reason}">${this.t("{{dosha}} cancelled",{dosha:c.dosha})}</li>`)}</ul>`:xn} ${Q(this.effectiveLang(),a.frame,this.translator)}</article>`}};$s.endpoints=Jc,$s.styles=[f,G,ga,Sx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:var(--roxy-space-md);display:flex}.score-info{flex:1;min-width:0}.table-scroll{min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.total{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.over,.pct{color:var(--roxy-muted)}.pct{font-size:var(--roxy-text-sm);margin-inline-start:var(--roxy-space-sm)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs);text-align:end;display:grid}.verdict{font-weight:var(--roxy-weight-bold)}.recommendation{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.score-ring{flex-shrink:0;block-size:5lh;inline-size:5lh}.score-ring svg{block-size:100%;inline-size:100%;display:block}.ring-track,.ring-fill{fill:none;stroke-width:8px}.ring-track{stroke:var(--roxy-border)}.ring-fill{stroke:var(--roxy-danger);stroke-linecap:round}.ring-fill[data-band=mid]{stroke:var(--roxy-warning)}.ring-fill[data-band=high]{stroke:var(--roxy-success)}table{width:100%}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}td.classification{color:var(--roxy-secondary);white-space:nowrap}:is(th,td).score{text-align:end}td.score{font-weight:var(--roxy-weight-bold)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-bar{gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr)}.verdict-wrap{text-align:start;justify-items:start}}.mini-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;overflow:hidden}.mini-bar>span{background:var(--roxy-accent);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}`],$s=m([x("roxy-guna-milan")],$s);function Cx(n){return n&&Rx[n.toLowerCase()]||1}import{css as Tx,html as aa,nothing as Ga}from"lit";import{unsafeHTML as Ex}from"lit/directives/unsafe-html.js";var ws=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderChart(e,t,r){let s=new Set(r?e.personAGates:(e.channels??[]).flatMap(h=>h.personAGates??[])),i=new Set(r?e.personBGates:(e.channels??[]).flatMap(h=>h.personBGates??[])),o=new Map;for(let h of new Set([...s,...i]))o.set(h,{left:s.has(h),right:i.has(h)});let l=new Set((e.centers??[]).filter(h=>h.defined).map(h=>h.id)),c=new Map((e.centers??[]).map(h=>[h.id,h.name])),d=new Map;for(let h of e.channels??[])d.set(h.gateA,h.name),d.set(h.gateB,h.name);let p=new Map;for(let[h,u]of o){let v=[u.left&&"A",u.right&&"B"].filter(Boolean).join(" + ");p.set(h,[`Gate ${h}`,d.get(h),v].filter(Boolean).join(" \xB7 "))}return aa`${Ex(k`<svg class="chart bodygraph" part="chart" viewBox=${yl} preserveAspectRatio="xMidYMid meet" role="img" aria-label=${t}><title>${t}</title>${ul({definedCenters:l,gateSources:o,gateTitles:p,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg>`.markup)} ${r?Ga:aa`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),r=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],i=e.centers??[],o=i.filter(l=>l.defined).length;return aa`<div class="wrap bodygraph" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2>Connection</h2>${typeof e.totalChannels=="number"?aa`<span class="count">${e.totalChannels} channels</span>`:Ga}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,r,t),r,this.translator)} ${Na([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?R(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:i.length>0?`${o}/${i.length}`:void 0}])} ${this.hideReadings?Ga:aa`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(i)} ${this.renderChannels(s,i)}</div>`}renderDynamics(e){if(!e)return Ga;let t=[{label:"Electromagnetic",aside:$o(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:$o(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:$o(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:$o(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ga:aa`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ga:aa`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],s=r.includes("A"),i=r.includes("B"),o=!!t.defined&&!s&&!i;return aa`<div class="row"><span class="cname">${t.name??R(String(t.id??""))}</span> <span class="roxy-chip ${o?"together":""}" data-tone="${t.defined&&!o?"success":Ga}">${t.defined?o?"Only together":"Defined":"Open"} </span><span class="who">${Dx(!!t.defined,s,i)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ga;let r=new Map(t.map(i=>[String(i.id??""),i.name??""])),s=i=>r.get(i)||R(i);return aa`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(i=>aa`<tr><td>${i.name??""}</td><td class="gates">${i.gateA}-${i.gateB}</td><td>${(i.centers??[]).map(s).join(" to ")}</td><td>${i.circuit??""}</td><td>${i.dynamic?aa`<span class="roxy-chip">${i.dynamic}</span>`:Ga}</td><td class="held">${pm(i.personAGates)}</td><td class="held">${pm(i.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};ws.endpoints=Qc,ws.styles=[f,z,F,or,Ai,Ui,He,Tx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-end:var(--roxy-space-sm)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.cname{flex:1;min-width:16ch}.roxy-chip.together{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.who{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:var(--roxy-info-fg);--src-right:var(--roxy-warning-fg);--src-ink:var(--roxy-bg)}`],ws=m([x("roxy-hd-connection")],ws);function $o(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function pm(n){let a=n??[];return a.length>0?a.join(", "):"Neither"}function Dx(n,a,e){return a&&e?"Defined in both charts":a?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}import{css as Ox,html as ut,nothing as Vt}from"lit";import{nothing as Ax,svg as Jn}from"lit";var Ul=360,Px=470,ql=8,gm=Ul-ql*2,ko=48,Xn=15,Vl=7,hm=16,wo=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],ym=`0 0 ${Ul} ${Px}`;function Mx(n,a){return ql+gm*(n*2+1)/(a*2)}function um(n){return Vn[n.gateA]==="throat"||Vn[n.gateB]==="throat"}function _x(n){return(um(n)?Vn[n.gateA]==="throat":Vn[n.gateA]==="g")?n.gateA:n.gateB}function Nx(){return wo.map(n=>Jn`<g>
83
+ <rect class="pn-bar" x=${ql} y=${n.y} width=${gm} height=${ko} rx="10" />
84
+ <text class="pn-bar-label" x=${Ul/2} y=${n.y+ko/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
85
+ </g>`)}function zx(n,a,e,t){return e.map((r,s)=>Jn`<g>
86
+ <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*hm} cy=${a} r=${Vl} />
87
+ <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*hm} y=${a} text-anchor="middle" dominant-baseline="central">${t(r)}</text>
88
+ </g>`)}function mm(n,a,e,t,r,s){let i=t.length>0;return Jn`<g>
89
+ <circle class="pn-gate-dot ${i?"on":""}" cx=${n} cy=${a} r=${Xn} />
90
90
  <text class="pn-gate ${i?"on":""}" x=${n} y=${a} text-anchor="middle" dominant-baseline="central">${e}</text>
91
- ${Tx(n,a+s,t,r)}
92
- </g>`}function hm(n){let a=[];for(let e of[true,false]){let t=n.rungs.filter(c=>pm(c)===e),r=e?Lo:vo[1].y+Lo,s=e?vo[1].y:vo[2].y,i=r+26,o=s-26,l=(i+o)/2;t.forEach((c,d)=>{let h=Sx(d,t.length),p=Rx(c),f=p===c.gateA?c.gateB:c.gateA,v=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;a.push(Zn`<g>
93
- <line class=${v} x1=${h} y1=${i+Wn} x2=${h} y2=${l-13} />
94
- <line class=${v} x1=${h} y1=${l+13} x2=${h} y2=${o-Wn} />
95
- <text class="pn-name ${c.defined?"on":""}" x=${h} y=${l} text-anchor="middle" dominant-baseline="central">${c.name}</text>
96
- ${lm(h,i,p,n.holders.get(p)??[],n.letterFor,Wn+Fl+7)}
97
- ${lm(h,o,f,n.holders.get(f)??[],n.letterFor,-(Wn+Fl+7))}
98
- </g>`)})}return Zn`${Cx()}${a.length>0?a:wx}`}var ks=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===true,isCore:s.isCore===true}));if(t.length===0)return Vt;let r=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return ut`<svg class="chart" part="chart" viewBox="${dm}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${hm({rungs:t,holders:r,letterFor:mm})}</svg>`}renderData(e){let t=e.channels??[],r=e.gates??[],s=e.summary,i=s?.gapGates??[],o=t.some(l=>l.isCore);return ut`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2>Penta</h2>${typeof e.memberCount=="number"?ut`<span class="count">${e.memberCount} members</span>`:Vt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${_a([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&r.length>0?`${s.filledGates} of ${r.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:i.length>0?i.join(", "):void 0}])} ${this.hideReadings?Vt:ut`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${o&&!this.hideReadings?ut`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Vt} ${this.renderGates(r)} ${t.length>0||r.length>0?ut`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Vt}</div>`}renderGroup(e,t,r){return t.length===0?Vt:ut`<div class="section" part="section channels"><h3>${e}</h3>${r&&!this.hideReadings?ut`<p class="note">${r}</p>`:Vt} ${t.map(s=>ut`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?ut`<span class="circuit">${s.circuit} circuit</span>`:Vt} </span><span class="roxy-chip" data-tone="${s.defined?"success":Vt}">${s.defined?"Defined":"Open"}</span> ${s.isCore?ut`<span class="roxy-chip core">Core</span>`:Vt} <span class="held">Gate ${s.gateA} held by ${jl(s.gateAHeldBy)}. Gate ${s.gateB} held by ${jl(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Vt;let t=e.filter(r=>r.filled).length;return ut`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Vt:ut`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(r=>ut`<div class="row"><span class="gate-id">${r.gate}</span> <span class="cname">${r.gateName??""}</span> ${r.filled?ut`<span class="who">Held by ${jl(r.heldBy)}</span>`:ut`<span class="roxy-chip" data-tone="danger">Gap</span>`}</div>`)}</div>`}};ks.endpoints=Wc,ks.styles=[u,He,ir,Ex`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent) 12%, transparent);stroke:var(--roxy-accent-ink);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .9375);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pn-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg)}.pn-badge{fill:var(--roxy-accent-ink)}.pn-badge-text{fill:var(--roxy-bg);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.section{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.note{margin-block-start:var(--roxy-space-xs)}.note,.held,.who,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.gates,.gate-id{font-variant-numeric:tabular-nums;min-width:5ch;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.cname{flex:1;min-width:16ch}.circuit{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.held{flex-basis:100%}.roxy-chip.core{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}`],ks=m([x("roxy-hd-penta")],ks);var Dx="ABCDE",mm=n=>Dx[n]??String(n+1);function jl(n){let a=(n??[]).map(mm);return a.length>0?a.join(", "):"nobody"}import{css as Ax,html as xn,nothing as $o}from"lit";var Ss=class extends g{renderData(a){return Px(a)?this.renderType(a):this.renderProfile(a)}renderType(a){return xn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Type")}</h2>${a.type||a.profile?xn`<div class="type-line">${[y(a,"type"),a.profile?this.t("Profile {{profile}}",{profile:a.profile}):""].filter(Boolean).join(" \xB7 ")}</div>`:$o}</header>${_a([{label:this.t("Type"),value:y(a,"type")},{label:this.t("Strategy"),value:y(a,"strategy")},{label:this.t("Authority"),value:y(a,"authority")},{label:this.t("Profile"),value:a.profile}])} ${a.typeDescription&&!this.hideReadings?xn`<p class="lead">${a.typeDescription}</p>`:$o} ${Ki(a.signature?y(a,"signature"):void 0,a.notSelf?y(a,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:y(a,"strategy"),body:a.strategyDescription},{label:this.t("Authority"),aside:y(a,"authority"),body:a.authorityDescription},{label:this.t("Aura"),body:a.aura}],"hd-type-reading")}</div>`}renderProfile(a){return xn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Profile")}</h2>${a.profile?xn`<div class="type-line">${a.profile}</div>`:$o}</header>${_a([{label:this.t("Profile"),value:a.profile},{label:this.t("Personality line"),value:a.personalityLine?.toString()},{label:this.t("Design line"),value:a.designLine?.toString()}])} ${this.hideReadings?$o:xn`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${Vi({personality:a.personalityKeynote,personalityLine:a.personalityLine,design:a.designKeynote,designLine:a.designLine},this.translator)}</section>`}</div>`}};Ss.endpoints=Zc,Ss.styles=[u,z,K,ir,Ax`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],Ss=m([x("roxy-hd-type-card")],Ss);function Px(n){return typeof n.type=="string"}import{css as Mx,html as ct,nothing as Ut}from"lit";var Rs=class extends g{renderData(a){let e=[...a.arrows??[]].sort((t,r)=>gm(t.position)-gm(r.position));return ct`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${a.confident===false?ct`<p class="note" role="note">${typeof a.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}\xB0). Verify the exact birth time.",{margin:a.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:Ut} ${this.renderReading(e,a.baseDescription)}</div>`}renderArrow(a){let e=a.direction==="left"?"\u2190":"\u2192",t=y(a,"baseName");return ct`<div class="arrow"><div class="arrow-head"><span class="glyph ${a.activation?.side??""}" aria-hidden="true">${e}</span> <span class="name">${y(a,"name")}</span></div>${a.layer?ct`<span class="layer">${y(a,"layer")}</span>`:Ut} <span class="labels">${[y(a,"directionLabel"),y(a,"colorLabel")].filter(Boolean).join(" \xB7 ")} </span>${typeof a.color=="number"?ct`<span class="ctb">${this.t("Color {{color}} \xB7 Tone {{tone}} \xB7 Base {{base}}",{color:a.color,tone:a.tone??"",base:a.base??""})}${t?`, ${t}`:""}</span>`:Ut} ${a.activation?.planet?ct`<span class="ctb">${[y(a.activation,"planet"),hl(a.activation.side,this.translator)].filter(Boolean).join(" \xB7 ")}</span>`:Ut} ${a.confident===false?ct`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:Ut}</div>`}renderReading(a,e){let t=a.filter(i=>i.description||i.colorMeaning);if(t.length===0||this.hideReadings)return Ut;let r=new Map;for(let i of t){let o=i.layer??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return ct`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...r].map(([i,o])=>ct`<div class="group">${i?ct`<p class="group-head">${y(o[0],"layer")}</p>`:Ut} ${o[0]?.layerDescription?ct`<p class="group-note">${o[0].layerDescription}</p>`:Ut} ${o.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?ct`<p class="footnote">${this.t("Base")}. ${e}</p>`:Ut}</section>`}renderArrowReading(a,e){let t=a.cognition,r=t?y(t,"label"):"",s=[{label:this.t("Color"),body:a.colorMeaning},{label:this.t("Tone"),body:a.toneMeaning},{label:this.t("Direction"),body:a.directionMeaning},{label:r?`${this.t("Cognition")} \xB7 ${r}`:this.t("Cognition"),body:t?.description}].filter(i=>!!i.body);return ct`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(a,"name")}</span> ${j()} ${a.position?ct`<span class="interp-aside"><small>${y(a,"position")}</small></span>`:Ut}</summary><div class="interp-body">${a.description?ct`<p>${a.description}</p>`:Ut} ${s.length>0?ct`<dl class="facets">${s.map(i=>ct`<dt>${i.label}</dt><dd>${i.body}</dd>`)}</dl>`:Ut}</div></details>`}};Rs.endpoints=Xc,Rs.styles=[u,z,K,Mx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.grid{gap:0 var(--roxy-space-lg);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{align-content:start;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm);display:flex}.glyph{font-size:var(--roxy-text-xl);color:var(--roxy-accent-ink);line-height:1}.glyph.design{color:var(--roxy-danger-fg)}.glyph.personality{color:var(--roxy-fg)}.name{font-weight:var(--roxy-weight-bold)}.layer,.ctb{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.ctb{font-variant-numeric:tabular-nums}.labels{font-size:var(--roxy-text-sm)}.note{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note{margin-block-end:var(--roxy-space-sm)}.facets{gap:var(--roxy-space-xs);margin:0;display:grid}.facets dd{margin:0}`],Rs=m([x("roxy-hd-variables")],Rs);function gm(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}import{css as _x,html as xr,nothing as Kl}from"lit";var Nx={udaya:"Rose",asta:"Set"},zx={udaya:"rises",asta:"sets"},Cs=class extends g{renderData(a){let e=a.grahas??[];return e.length?xr`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2>${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:a.date})}</p></header><div part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(a){let e=w(a.graha)??"";return xr`<article class="row"><div class="row-top"><span class="graha">${e?xr`<span class="glyph roxy-glyph">${e}</span>`:Kl}${a.graha} </span><span class="state roxy-chip ${a.visible?"visible":"invisible"}" data-tone="${a.visible?Kl:"warning"}">${a.visible?this.t("Visible"):this.t("Invisible")} </span>${a.retrograde?xr`<span class="retro" title="${this.t("retrograde")}">R</span>`:Kl}</div><p class="window" part="window">${this.windowLine(a)}</p><p class="meta" part="details">${this.metaLine(a)}</p></article>`}windowLine(a){let e=a.nextEvent,t=a.lastEvent;if(e){let r={event:this.t(zx[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:U(this.effectiveLang(),e.datetime)};return xr`${a.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",r):this.t("Invisible until it {{event}} {{where}} on {{when}}",r)}`}return t?xr`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Nx[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:U(this.effectiveLang(),t.datetime)})}`:xr`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(a){let e=a.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=a.nextEvent??a.lastEvent,r=t&&t.kalamsa!==a.kalamsa,s={degrees:b(this.effectiveLang(),a.timeDegrees,2),limit:b(this.effectiveLang(),a.kalamsa,0),shifted:r?b(this.effectiveLang(),t.kalamsa,0):""};return xr`${r?this.t("{{degrees}}\xB0 of time from the Sun against a limit of {{limit}}\xB0, becoming {{shifted}}\xB0 at that event",s):this.t("{{degrees}}\xB0 of time from the Sun against a limit of {{limit}}\xB0",s)} · ${e}`}};Cs.endpoints=Jc,Cs.styles=[u,_x`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.window{font-size:var(--roxy-text-sm)}`],Cs=m([x("roxy-heliacal-table")],Cs);import{css as Ox,html as Je,nothing as dt}from"lit";var Ts=class extends g{resolveHexagram(){let a=this.data;if(!a)return null;if("hexagram"in a&&a.hexagram){if("lines"in a){let s=a,i=s.hexagram;return{hex:i,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??i.changingLines,resultingHexagram:s.resultingHexagram}}let t=a,r=t.hexagram;return{hex:r,changingLines:r.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=a;return{hex:e,changingLines:e.changingLines}}renderData(){let a=this.resolveHexagram();if(!a)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:r,changingLines:s,dailyMessage:i,date:o,resultingHexagram:l}=a;return Je`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,r,s,i,o)} ${l?Je`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${j()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:dt}</article>`}renderHexagram(a,e,t,r,s,i,o){let l=t??this.derivedLines(e),c=Np(e.number),d=new Set(r??[]),h=!this.hideReadings;return Je`<div class="glyphs" part="chart">${c?Je`<div class="symbol roxy-glyph">${c}</div>`:dt} ${l.length>0?Je`<div class="lines" aria-hidden="true">${l.slice().reverse().map((p,f)=>{let v=l.length-1-f+1,L=d.has(v),$=p===6||p===8;return Je`<div class="line ${`${$?"broken":"solid"}${L?" changing":""}`}">${$?Je`<span class="seg"></span><span class="seg"></span>`:Je`<span class="seg"></span>`}</div>`})}</div>`:dt}</div><div part="header"><h2>${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${o?Je`<time class="daily-date" part="details" datetime="${o}">${C(this.effectiveLang(),o)}</time>`:dt}<p class="subtitle">${e.chinese?Je`${e.chinese}`:dt} ${e.pinyin?Je`· ${e.pinyin}`:dt}</p><div class="trigrams roxy-label" part="details">${e.upperTrigram?Je`<div>${this.t("Upper")} <span class="tri-glyph roxy-glyph">${Ja(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:dt} ${e.lowerTrigram?Je`<div>${this.t("Lower")} <span class="tri-glyph roxy-glyph">${Ja(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:dt}</div>${e.judgment&&h?Je`<p class="judgment">${e.judgment}</p>`:dt} ${e.image&&h?Je`<p class="image">${e.image}</p>`:dt} ${i&&h?Je`<p class="message">${i}</p>`:dt} ${e.interpretation?.general&&h?Je`<p>${e.interpretation.general}</p>`:dt} ${d.size>0?Je`<div class="changes" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(d).sort((p,f)=>p-f).join(", ")})}</div>`:dt} ${this.renderTopics(e,a)} ${this.renderLines(s??e.changingLines,d,`${a}-lines`)}</div>`}renderTopics(a,e){let t=a.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(r=>r.body),`${e}-topics`,"Readings"):dt}renderLines(a,e,t){let r=a??[];if(r.length===0)return dt;let s=e.size>0,i=s?r.filter(l=>e.has(l.position)):r;if(i.length===0)return dt;let o=i.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Je`<p class="line-meaning">${l.meaning}</p>`:dt}));return this.renderInterpretation(o,t,s?"Changing lines":"Lines")}derivedLines(a){let e=a.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};Ts.endpoints=Qc,Ts.styles=[u,z,K,Ox`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);display:grid}.result-chart{gap:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);padding-block-start:var(--roxy-space-md);display:grid}.result{border-block-start:1px solid var(--roxy-border);grid-column:1/-1;padding-block-start:var(--roxy-space-md)}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.glyphs{align-content:start;align-self:start;justify-items:center;gap:var(--roxy-space-md);display:grid}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.lines{gap:calc(var(--roxy-space-unit) * 1.5);inline-size:2lh;display:grid}.line{gap:var(--roxy-space-xs);grid-template-columns:1fr 1fr;display:grid}.seg{block-size:calc(var(--roxy-line-thick) * 3);background:var(--roxy-fg);display:block}.line.solid .seg{grid-column:1/-1}.line.changing .seg{background:var(--roxy-accent)}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.daily-date{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm);display:block}.trigrams{gap:var(--roxy-space-md);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.tri-glyph{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);vertical-align:middle;margin-inline-end:var(--roxy-space-xs)}.judgment,.image,.message{font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.judgment:before{content:"Judgment. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.image:before{content:"Image. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.line-meaning{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-muted);padding-inline-start:var(--roxy-space-sm)}.changes{border-block-start:1px solid var(--roxy-border);color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-md);padding-block-start:var(--roxy-space-md)}`],Ts=m([x("roxy-hexagram")],Ts);import{css as Gx,html as Xn,nothing as Vl}from"lit";var Es=class extends g{renderData(a){let e=a.dayHoras??[],t=a.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Xn`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2>${this.t("Hora")}</h2>${a.date?Xn`<p class="roxy-label">${C(this.effectiveLang(),a.date)}</p>`:Vl}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(a,e){return e.length===0?Vl:Xn`<div class="col"><h3 class="section-label">${a}</h3>${e.map(t=>Xn`<div class="row"><span class="glyph roxy-glyph" aria-hidden="true">${w(t.planet)??"\xB7"}</span> <span class="planet">${t.planet}</span> <span class="time">${da(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Xn`<span class="num">${t.number}</span>`:Vl}</div>`)}</div>`}};Es.endpoints=ed,Es.styles=[u,Gx`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.cols{gap:var(--roxy-space-md);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{margin-block-end:var(--roxy-space-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;display:flex}.row:last-child{border-block-end:0}.glyph{inline-size:2ch;color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);text-align:center;line-height:1}.planet{flex:1}.time{color:var(--roxy-muted);white-space:nowrap}.num{inline-size:3ch;color:var(--roxy-muted);font-size:var(--roxy-text-xs);text-align:end}@container (width<=30rem){.cols{grid-template-columns:minmax(0,1fr)}}`],Es=m([x("roxy-hora-table")],Es);import{css as Ix,html as P,nothing as J}from"lit";import{property as ym}from"lit/decorators.js";var Fx={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Bx={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Hx=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],jx=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Ia=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",r=N(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i=this.effectiveLang(),o="date"in e&&e.date&&C(i,e.date)||"week"in e&&e.week&&C(i,e.week)||"month"in e&&e.month&&Wa(i,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return P`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph roxy-glyph" aria-hidden="true">${r}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(Fx[this.period])}</h2>${o?P`<p class="date roxy-label">${o}</p>`:J}</div>${s!==null?P`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:J}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",d="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],h="luckyDays"in e&&e.luckyDays?e.luckyDays:[],p=e.compatibleSigns??[];return l===void 0&&!c&&d.length===0&&h.length===0&&p.length===0?J:P`<div class="lucky" part="details">${l!==void 0?P`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:J} ${c?P`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:J} ${d.length?P`<span>${this.t("Lucky numbers")} <strong>${d.join(", ")}</strong></span>`:J} ${h.length?P`<span>${this.t("Lucky days")} <strong>${h.join(", ")}</strong></span>`:J} ${p.length?P`<span class="compat-wrap">${this.t("Best with")}<ul class="compat roxy-chips">${p.map(f=>P`<li>${f}</li>`)}</ul></span>`:J}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return J;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):J;let r=this.paragraphs(e.overview);return P`${r.length?P`<div class="overview" part="section overview">${r}</div>`:J}<div class="sections" part="section outlook">${Hx.map(([s,i])=>{let o=this.paragraphs(e[s]);return o.length?P`<div class="section"><h3>${this.t(i)}</h3>${o}</div>`:J})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?J:P`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>P`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return J;let t=this.effectiveLang();return P`<section part="section events"><h3>${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(r=>this.renderRow(P`<time class="row-when" datetime="${r.at}">${Wa(t,r.at,"time")}</time>`,this.renderEventBodies(r),P`<span class="kind">${this.t(Bx[r.type])}</span> <span>${this.t("House")} ${r.house}</span> ${r.sign?P`<span>${this.glyphName(N(r.sign),M(r.sign))}</span>`:J} ${r.through?P`<span>${this.t("through {{date}}",{date:C(t,r.through)})}</span>`:J}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(r=>this.glyphName(w(r),r));return t.length===2&&e.aspect?P`${t[0]} <span class="${`${Be({type:e.aspect})} roxy-glyph`}">${ln(e.aspect)??e.aspect}</span> ${t[1]}`:P`${t}`}renderYear(e){if(!("themes"in e))return J;let t=this.effectiveLang();return P`${e.themes.length?P`<section part="section themes"><h3>${this.t("Themes")}</h3><ul class="rows">${e.themes.map(r=>this.renderRow(Lt(t,r.from,r.to),P`${this.glyphName(w(r.body),r.body)} ${this.glyphName(N(r.sign),M(r.sign))}`,P`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:J} ${e.keyPeriods.length?P`<section part="section key-periods"><h3>${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(r=>this.renderRow(Lt(t,r.from,r.to),this.glyphName(w(r.body),r.body),P`<span>${this.t("House")} ${r.house}</span><span>${r.focus}</span>`))}</ul></section>`:J} ${e.eclipses.length?P`<section part="section eclipses"><h3>${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(r=>this.renderRow(C(t,r.date),P`<span class="name">${r.kind}</span>`,P`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:J} ${e.retrogrades.length?P`<section part="section retrogrades"><h3>${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(r=>this.renderRow(C(t,r.date),P`${this.glyphName(w(r.body),r.body)} <span>${r.direction}</span>`,P`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:J} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return J;let t=this.effectiveLang(),r=jx.filter(([s])=>e[s]);return r.length===0?J:P`<section part="section best-periods"><h3>${this.t("Best months")}</h3><div class="tiles" part="details">${r.map(([s,i])=>{let o=e[s];return o?P`<div class="tile"><span class="roxy-label">${this.t(i)}</span> <span class="tile-value">${Wa(t,o.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:o.count})}</span></div>`:J})}</div></section>`}renderRow(e,t,r,s){return P`<li class="row" part="label-track">${s?.when==="element"?e:P`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${r}</span></li>`}glyphName(e,t){return P`<span class="roxy-glyph" aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",r="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!r&&s.length===0)return J;let i=N(t)??"";return P`<div class="sky" part="section sky">${t||r?P`<div class="moon-line">${t?P`<span><span class="roxy-label">${this.t("Moon")}</span> <span class="roxy-glyph" aria-hidden="true">${i}</span> <b>${t}</b></span>`:J} ${r?P`<span><span class="roxy-label">${this.t("Phase")}</span> <b>${r}</b></span>`:J}</div>`:J} ${s.length?P`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(o=>P`<li>${o}</li>`)}</ul>`:J}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],r=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&r.length===0?J:P`${t.length&&!this.hideReadings?P`<section part="section week-by-week"><h3>${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>P`<div class="week"><span class="roxy-label">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?P`<p class="week-advice">${s.advice}</p>`:J}</div></div>`)}</div></section>`:J} ${r.length?P`<section part="section key-dates"><h3>${this.t("Key dates")}</h3><dl class="dates" part="label-track">${r.map(s=>P`<div class="date-row"><dt>${C(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:J}`}};Ia.endpoints=td,Ia.styles=[u,Aa,mr,Ix`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);line-height:1}.title{text-transform:capitalize;white-space:nowrap}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar{inline-size:10ch;block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.column p,.overview p,.section p{line-height:1.7}.overview,.column,.section{align-content:start;gap:var(--roxy-space-sm);display:grid}.column{gap:var(--roxy-space-md)}.sections{gap:var(--roxy-space-lg) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,48ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm)}.sky,.lucky{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.sky{gap:var(--roxy-space-sm);display:grid}.lucky{gap:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-secondary);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs);flex-wrap:wrap;width:100%;display:flex}.compat>li{text-transform:capitalize}.moon-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold)}.moon-line .roxy-label{margin-inline-end:var(--roxy-space-xs)}.transits{gap:var(--roxy-space-xs);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.transits li::marker{color:var(--roxy-accent)}.weeks{gap:var(--roxy-space-sm);display:grid}.week{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.week:first-child{border-block-start:0;padding-block-start:0}.week-focus{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.week-advice{font-size:var(--roxy-text-sm);margin-block-start:calc(var(--roxy-space-unit) / 2)}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);margin:0;display:grid}.date-row{display:contents}.date-row dt{color:var(--roxy-accent-ink);font-size:inherit;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.date-row dd{margin:0}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.row:first-child{border-block-start:0;padding-block-start:0}.row-when{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.row-what{font-size:var(--roxy-text-sm)}.row-what .name,.row-meta .kind{font-weight:var(--roxy-weight-bold)}.row-meta{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;grid-column:2;display:flex}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.tile{gap:calc(var(--roxy-space-unit) / 2);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.tile-value{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.tile-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],m([ym({type:String,reflect:true})],Ia.prototype,"period",2),m([ym({type:String,reflect:true})],Ia.prototype,"layout",2),Ia=m([x("roxy-horoscope-card")],Ia);import{css as Kx,html as ie,nothing as ra}from"lit";import{state as Vx}from"lit/decorators.js";var Ux=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],wo=[1,2,3,4];function Ul(n,a){return n?typeof a=="number"?`${n} ${a}`:n:""}function um(n){return[...new Set(n.map(String))].join(" > ")}function qx(n){return[...new Set(n??[])]}var br=class extends g{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),r=e.nodes;for(let[s,i]of[["Rahu",r?.rahu],["Ketu",r?.ketu]])i&&t.push({name:s,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,pada:i.pada,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,kpNumber:i.kpNumber,retrograde:true});return t}renderData(e){let t=e.ascendant;return ie`<div class="wrap" part="card" aria-label="KP chart"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?ie`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?tt(t.longitude):t.sign??""} </strong>${t.nakshatra?ie`· ${Ul(t.nakshatra,t.pada)}`:ra} ${t.subLord?ie`· sub lord ${t.subLord}`:ra} ${typeof t.kpNumber=="number"?ie`· KP ${t.kpNumber}`:ra}</div>`:ra} ${typeof e.meta?.ayanamsa=="number"?ie`<div class="ayan">Ayanamsa: ${Br(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?ie`· ${e.meta.houseSystem} houses`:ra}</div>`:ra}</header>${mt({items:Ux,active:this.activeTab,onSelect:r=>{this.activeTab=r},label:"KP chart views",idPrefix:"kp",controls:true})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?this.scrollBox(ie`<table part="table" role="table"><caption id="kp-planets-caption" class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ie`<tr><td class="body">${t.name}${t.retrograde?ie`<span class="retro">R</span>`:ra}</td><td class="num">${typeof t.longitude=="number"?tt(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${Ul(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-planets-caption"):ie`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?this.scrollBox(ie`<table part="table" role="table"><caption id="kp-cusps-caption" class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>ie`<tr><td class="body num">${r.house}${this.renderThemes(rl(r.house,t))}</td><td class="num">${typeof r.longitude=="number"?tt(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${Ul(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-cusps-caption"):ie`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,r=e?.houseWise??[],s=e?.planetWise??[];return!r.length&&!s.length?ie`<p class="roxy-empty" role="status">No significators</p>`:ie`${this.renderLevelLegend(r)} ${r.length?ie`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div>${this.scrollBox(ie`<table part="table" role="table"><caption id="kp-house-sig-caption" class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${wo.map(i=>ie`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(i=>ie`<tr><td class="body num">${i.house}${this.renderThemes(rl(i.house,t))}</td>${wo.map(o=>this.renderCell(this.planetsAtLevel(i,o).join(", ")))}<td class="chain">${um(i.all??[])}</td></tr>`)}</tbody></table>`,"kp-house-sig-caption")}`:ra} ${s.length?ie`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div>${this.scrollBox(ie`<table part="table" role="table"><caption id="kp-planet-sig-caption" class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${wo.map(i=>ie`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(i=>ie`<tr><td class="body">${i.planet}</td>${wo.map(o=>this.renderCell(this.housesAtLevel(i,o).join(", ")))}<td class="chain">${um(i.allHouses??[])}${this.renderThemes(fa(qx(i.allHouses),t))}</td></tr>`)}</tbody></table>`,"kp-planet-sig-caption")}`:ra}`}scrollBox(e,t){return ie`<div class="scroll" tabindex="0" role="region" aria-labelledby="${t}">${e}</div>`}renderThemes(e){return e?ie`<span class="themes">${e}</span>`:ra}renderCell(e){return e?ie`<td>${e}</td>`:ie`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(r=>r.level===t).flatMap(r=>r.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(r=>r.level===t).flatMap(r=>r.houses??[])}renderLevelLegend(e){let t=new Map;for(let r of e)for(let s of r.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?ra:ie`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((r,s)=>r[0]-s[0]).map(([r,s])=>ie`<li><b>L${r}</b>${s}</li>`)}</ul>`}};br.endpoints=ad,br.styles=[u,et,Kx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.sig-title,.sig-note{margin:0}.asc,.ayan{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.asc strong{color:var(--roxy-fg)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.body{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.num{font-variant-numeric:tabular-nums}.sig-head{gap:var(--roxy-space-xs);display:grid}.sig-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}.chain,.empty-cell{color:var(--roxy-muted)}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);display:block}`],m([Vx()],br.prototype,"activeTab",2),br=m([x("roxy-kp-chart")],br);import{css as Yx,html as xe,nothing as bn}from"lit";var Wx={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},Zx={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},fm={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},Xx={gain:"Gain",loss:"Loss"},Jx={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Ds=class extends g{renderData(a){return a.layers?xe`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(a)} ${this.renderSignificators(a)}<section class="block" part="section cusps">${this.renderLayer("cusps",a.layers.cusps,this.renderCuspRows(a.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",a.layers.dasha,this.renderDashaRows(a.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",a.layers.rulingPlanets,this.renderRulingRows(a.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",a.layers.moonWindows,this.renderWindowRows(a.layers.moonWindows.rows))}</section>${this.renderWindows(a)}<section class="block" part="section frame">${Q(this.effectiveLang(),{ayanamsa:a.ayanamsa,ayanamsaDegrees:a.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(a){let e=this.effectiveLang();return xe`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${U(e,a.date)}</span></div><div class="verdict-row"><span class="verdict ${a.band}">${this.t(Wx[a.band])}</span> <span class="evidence">${b(e,a.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${U(e,a.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${Xe(e,a.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${Xe(e,a.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(a){let e=a.significators,t=this.effectiveLang(),r=s=>xe`<div class="roxy-chips">${s.map(i=>xe`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return xe`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${r(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${r(e.loss)}</dd></div></dl>${e.byHouse.length?xe`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>xe`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${Xe(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:bn}</section>`}renderLayer(a,e,t){let r=this.effectiveLang();return xe`<div class="block-head"><h3>${this.t(fm[a])}</h3><span class="evidence">${this.t("Weight")} ${ue(r,e.weight,0)} · ${this.t("Score")} ${b(r,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(fm[a])}">${t}</div>`}renderCuspRows(a){return xe`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${this.t(Jx[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${U(e,t.startDate)}</td><td>${U(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td><td class="num">${ue(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(a){return xe`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${Dt(e,t.from)}</td><td>${Dt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(a){let e=this.effectiveLang(),t=a.bestWindow,r=a.worstWindows??[];if(!t&&!r.length)return bn;let s=(i,o)=>xe`<span class="window roxy-chip ${o}" data-tone="${o==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${da(e,{start:i.from,end:i.to})}</small></span>`;return xe`<section class="block" part="section windows"><dl class="roxy-facts">${t?xe`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(t,"best")}</div></dd></div>`:bn} ${r.length?xe`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${r.map(i=>s(i,"worst"))}</div></dd></div>`:bn}</dl></section>`}glyphName(a,e=false){let t=w(a);return xe`${t?xe`<span class="glyph roxy-glyph" aria-hidden="true">${t}</span>`:bn}${a}${e?xe`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${De}</span>`:bn}`}verdictChip(a){return xe`<span class="state ${a}">${this.t(Zx[a])}</span>`}groupChip(a){return xe`<span class="chip roxy-chip">${this.t(Xx[a])}</span>`}};Ds.endpoints=rd,Ds.styles=[u,se,I,Yx`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],Ds=m([x("roxy-kp-finance-card")],Ds);import{css as Qx,html as ko,nothing as xm}from"lit";var As=class extends g{renderData(a){let e=a.planets??[];return ko`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof a.ayanamsa=="number"?ko`<span class="ayanamsa">Ayanamsa: ${b(this.effectiveLang(),a.ayanamsa,2)}°</span>`:xm}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ko`<tr><td class="planet">${t.planet} ${t.retrograde?ko`<span class="retro">R</span>`:xm}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};As.endpoints=sd,As.styles=[u,Qx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],As=m([x("roxy-kp-planets-table")],As);import{css as eb,html as Ps,nothing as So}from"lit";var Ms=class extends g{renderData(a){let e=a.significators??[];return Ps`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${a.dayLord?Ps`<div class="day-lord">Day lord: <strong>${a.dayLord}</strong></div>`:So}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.moonSignLord??""}</dd><dt>Star lord</dt><dd>${a.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${a.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${a.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${a.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.lagnaSubSublord??""}</dd></dl></div></div>${a.rulingPlanets?.length?Ps`<div class="rp-list" part="details"><span class="roxy-label">Ruling planets</span><ol class="roxy-chips" aria-label="Ruling planets by strength">${a.rulingPlanets.map((t,r)=>Ps`<li class="rp"><span class="rank">${r+1}</span> ${t}</li>`)}</ol></div>`:So} ${e.length?Ps`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let r=fa(t.signifies,a.houseThemes);return Ps`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${r?Ps`<span class="themes">${r}</span>`:So}</td></tr>`})}</tbody></table>`:So}</div>`}};Ms.endpoints=nd,Ms.styles=[u,eb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.title,.group h3{margin:0}.day-lord{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.day-lord strong{color:var(--roxy-fg)}.groups{gap:var(--roxy-space-md) var(--roxy-space-xl);flex-wrap:wrap;display:flex}.group{gap:var(--roxy-space-xs);flex:1 1 0;min-width:min(100%,22ch);display:grid}.group dl{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);margin:0;display:grid}.group dd{font-weight:var(--roxy-weight-bold);margin:0}.rp-list{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.rp .rank{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],Ms=m([x("roxy-kp-ruling-planets")],Ms);import{css as tb,html as nt,nothing as pt}from"lit";import{property as ab}from"lit/decorators.js";var vr=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),r=e.trigram;return nt`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?nt`<span class="group">${this.t("{{direction}} group",{direction:F(t,"facing",M(e.group))})}</span>`:pt}</header><div class="facts" part="details">${r?nt`<span><span class="roxy-label">${this.t("Trigram")}</span> <span lang="zh">${r.chinese??""}</span> ${Fe(Ja(r.english))} <b>${r.english??""}</b> <span class="element-word ${wt(r.element)}">${y(r,"element")}</span></span>`:pt} ${r?.familyMember?nt`<span><span class="roxy-label">${this.t("Role")}</span>${r.familyMember}</span>`:pt} ${"solarYear"in e&&typeof e.solarYear=="number"?nt`<span class="solar-year"><span class="roxy-label">${this.t("Year")}</span><b>${Wa(t,String(e.solarYear),"year")}</b></span>`:pt} ${"gender"in e&&e.gender?nt`<span class="formula-gender"><span class="roxy-label">${re(t,"gender")}</span>${F(t,"gender",e.gender)}</span>`:pt} ${"boundaryDate"in e&&e.boundaryDate?nt`<span>${this.t("Year boundary")} ${C(t,e.boundaryDate)}</span>`:pt} ${"reassigned"in e&&e.reassigned?nt`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:pt} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${uo.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?Qa(e.conventions,this.translator,this.effectiveLang()):pt}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return pt;let t=this.effectiveLang();return nt`${e.bestSector?nt`<span><span class="roxy-label">${this.t("Best")}</span><b>${F(t,"facing",e.bestSector)}</b></span>`:pt} ${e.worstSector?nt`<span><span class="roxy-label">${this.t("Worst")}</span><b>${F(t,"facing",e.worstSector)}</b></span>`:pt}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):F(e,"facing",t)}renderSector(e,t){let r=this.effectiveLang(),s=this.sectorHeading(r,t);if(t==="Center")return nt`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol roxy-glyph">${Ja(e.trigram?.english)??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let i=(e.sectors??[]).find(l=>l.direction===t);if(!i)return nt`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let o=i.nature==="auspicious";return nt`<div class="sector ${o?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${y(i,"starName")}</span> ${"chinese"in i&&i.chinese?nt`<span class="star-hanzi" lang="zh">${i.chinese}</span>`:pt} <span class="domain">${i.domain??""}</span> ${typeof i.rank=="number"?nt`<span class="rank">${o?this.t("Rank"):this.t("Severity")} ${i.rank}</span>`:pt}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return pt;let r=this.effectiveLang(),s=t.map(i=>{let o=this.mode==="mansions"&&"reading"in i?i.reading:void 0;return!o||this.hideReadings?pt:nt`<li class="row" part="label-track"><span class="roxy-label">${this.sectorHeading(r,i.direction??"")}</span><div class="row-body"><span>${y(i,"starName")}</span><p part="reading">${o}</p></div></li>`});return s.every(i=>i===pt)?pt:nt`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};vr.endpoints=id,vr.styles=[u,ua,I,fo,mr,tb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.group{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.sector{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);text-align:center;display:grid}.sector-good{background:color-mix(in srgb, var(--roxy-success) 10%, var(--roxy-surface))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger) 10%, var(--roxy-surface))}.sector-self{background:color-mix(in srgb, var(--roxy-accent) 10%, var(--roxy-surface))}:is(.sector-good,.sector-bad,.sector-self) .sector-name,:is(.sector-good,.sector-bad) .rank{color:var(--roxy-secondary)}.star-name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.star-hanzi,.trigram-symbol{color:var(--roxy-accent-ink)}:is(.sector-good,.sector-bad) .star-hanzi{color:var(--roxy-fg)}.domain{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.rank{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.centre{align-content:center}.kua-number{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.trigram-symbol{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight)}@container (width<=30rem){.plate{background:var(--roxy-surface);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";min-block-size:auto}.sector:last-child{border-block-end:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:end;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:end;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-good{background:var(--roxy-success)}.swatch-bad{background:var(--roxy-danger)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([ab({type:String,reflect:true})],vr.prototype,"mode",2),vr=m([x("roxy-kua-card")],vr);import{css as rb,html as vn,nothing as ql,svg as Ro}from"lit";var Yl=320,qt=Yl/2,Fa=128,sb=118,bm=137,nb=152,ib=.95,ob={glyph:11},lb=ob.glyph;function Ba(n,a){let e=n*Math.PI/180;return{x:qt+a*Math.sin(e),y:qt-a*Math.cos(e)}}var cb=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],_s=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderData(e){let t=e.bodies??[],r=e.birthDetails;return vn`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${r?vn`<p class="roxy-label">${U(this.effectiveLang(),r.date,r.time)}</p>`:ql}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?vn`<p class="summary">${e.summary}</p>`:ql} ${this.renderList(t)}</div>`}renderDial(e){return vn`<svg viewBox="0 0 ${Yl} ${Yl}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${qt}" cy="${qt}" r="${Fa}"/><circle class="dial" cx="${qt}" cy="${qt}" r="${Fa*.66}" stroke-width="0.5"/><circle class="dial" cx="${qt}" cy="${qt}" r="${Fa*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${qt}" cy="${qt}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=Ba(l,Fa),d=Ba(l,Fa-(l%45===0?8:4));e.push(Ro`<line class="tick" x1=${d.x} y1=${d.y} x2=${c.x} y2=${c.y} />`)}let t=Ba(0,Fa),r=Ba(180,Fa),s=Ba(90,Fa),i=Ba(270,Fa),o=cb.map(({az:l,source:c})=>{let d=Ba(l,nb),h=l%90===0;return Ro`<text class=${`compass-label${h?" cardinal":""}`} x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Ro`
91
+ ${zx(n,a+s,t,r)}
92
+ </g>`}function fm(n){let a=[];for(let e of[true,false]){let t=n.rungs.filter(c=>um(c)===e),r=e?ko:wo[1].y+ko,s=e?wo[1].y:wo[2].y,i=r+26,o=s-26,l=(i+o)/2;t.forEach((c,d)=>{let p=Mx(d,t.length),h=_x(c),u=h===c.gateA?c.gateB:c.gateA,v=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;a.push(Jn`<g>
93
+ <line class=${v} x1=${p} y1=${i+Xn} x2=${p} y2=${l-13} />
94
+ <line class=${v} x1=${p} y1=${l+13} x2=${p} y2=${o-Xn} />
95
+ <text class="pn-name ${c.defined?"on":""}" x=${p} y=${l} text-anchor="middle" dominant-baseline="central">${c.name}</text>
96
+ ${mm(p,i,h,n.holders.get(h)??[],n.letterFor,Xn+Vl+7)}
97
+ ${mm(p,o,u,n.holders.get(u)??[],n.letterFor,-(Xn+Vl+7))}
98
+ </g>`)})}return Jn`${Nx()}${a.length>0?a:Ax}`}var ks=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===true,isCore:s.isCore===true}));if(t.length===0)return Vt;let r=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return ut`<svg class="chart" part="chart" viewBox="${ym}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${fm({rungs:t,holders:r,letterFor:xm})}</svg>`}renderData(e){let t=e.channels??[],r=e.gates??[],s=e.summary,i=s?.gapGates??[],o=t.some(l=>l.isCore);return ut`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2>Penta</h2>${typeof e.memberCount=="number"?ut`<span class="count">${e.memberCount} members</span>`:Vt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${Na([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&r.length>0?`${s.filledGates} of ${r.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:i.length>0?i.join(", "):void 0}])} ${this.hideReadings?Vt:ut`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${o&&!this.hideReadings?ut`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Vt} ${this.renderGates(r)} ${t.length>0||r.length>0?ut`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Vt}</div>`}renderGroup(e,t,r){return t.length===0?Vt:ut`<div class="section" part="section channels"><h3>${e}</h3>${r&&!this.hideReadings?ut`<p class="note">${r}</p>`:Vt} ${t.map(s=>ut`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?ut`<span class="circuit">${s.circuit} circuit</span>`:Vt} </span><span class="roxy-chip" data-tone="${s.defined?"success":Vt}">${s.defined?"Defined":"Open"}</span> ${s.isCore?ut`<span class="roxy-chip core">Core</span>`:Vt} <span class="held">Gate ${s.gateA} held by ${Yl(s.gateAHeldBy)}. Gate ${s.gateB} held by ${Yl(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Vt;let t=e.filter(r=>r.filled).length;return ut`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Vt:ut`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(r=>ut`<div class="row"><span class="gate-id">${r.gate}</span> <span class="cname">${r.gateName??""}</span> ${r.filled?ut`<span class="who">Held by ${Yl(r.heldBy)}</span>`:ut`<span class="roxy-chip" data-tone="danger">Gap</span>`}</div>`)}</div>`}};ks.endpoints=ed,ks.styles=[f,He,or,Ox`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent) 12%, transparent);stroke:var(--roxy-accent-ink);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .9375);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pn-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg)}.pn-badge{fill:var(--roxy-accent-ink)}.pn-badge-text{fill:var(--roxy-bg);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.section{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.note{margin-block-start:var(--roxy-space-xs)}.note,.held,.who,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.gates,.gate-id{font-variant-numeric:tabular-nums;min-width:5ch;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.cname{flex:1;min-width:16ch}.circuit{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.held{flex-basis:100%}.roxy-chip.core{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}`],ks=m([x("roxy-hd-penta")],ks);var Ix="ABCDE",xm=n=>Ix[n]??String(n+1);function Yl(n){let a=(n??[]).map(xm);return a.length>0?a.join(", "):"nobody"}import{css as Gx,html as bn,nothing as So}from"lit";var Ss=class extends g{renderData(a){return Fx(a)?this.renderType(a):this.renderProfile(a)}renderType(a){return bn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Type")}</h2>${a.type||a.profile?bn`<div class="type-line">${[y(a,"type"),a.profile?this.t("Profile {{profile}}",{profile:a.profile}):""].filter(Boolean).join(" \xB7 ")}</div>`:So}</header>${Na([{label:this.t("Type"),value:y(a,"type")},{label:this.t("Strategy"),value:y(a,"strategy")},{label:this.t("Authority"),value:y(a,"authority")},{label:this.t("Profile"),value:a.profile}])} ${a.typeDescription&&!this.hideReadings?bn`<p class="lead">${a.typeDescription}</p>`:So} ${qi(a.signature?y(a,"signature"):void 0,a.notSelf?y(a,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:y(a,"strategy"),body:a.strategyDescription},{label:this.t("Authority"),aside:y(a,"authority"),body:a.authorityDescription},{label:this.t("Aura"),body:a.aura}],"hd-type-reading")}</div>`}renderProfile(a){return bn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Profile")}</h2>${a.profile?bn`<div class="type-line">${a.profile}</div>`:So}</header>${Na([{label:this.t("Profile"),value:a.profile},{label:this.t("Personality line"),value:a.personalityLine?.toString()},{label:this.t("Design line"),value:a.designLine?.toString()}])} ${this.hideReadings?So:bn`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${Yi({personality:a.personalityKeynote,personalityLine:a.personalityLine,design:a.designKeynote,designLine:a.designLine},this.translator)}</section>`}</div>`}};Ss.endpoints=td,Ss.styles=[f,z,F,or,Gx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],Ss=m([x("roxy-hd-type-card")],Ss);function Fx(n){return typeof n.type=="string"}import{css as Bx,html as ct,nothing as Ut}from"lit";var Rs=class extends g{renderData(a){let e=[...a.arrows??[]].sort((t,r)=>bm(t.position)-bm(r.position));return ct`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${a.confident===false?ct`<p class="note" role="note">${typeof a.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}\xB0). Verify the exact birth time.",{margin:a.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:Ut} ${this.renderReading(e,a.baseDescription)}</div>`}renderArrow(a){let e=a.direction==="left"?"\u2190":"\u2192",t=y(a,"baseName");return ct`<div class="arrow"><div class="arrow-head"><span class="glyph ${a.activation?.side??""}" aria-hidden="true">${e}</span> <span class="name">${y(a,"name")}</span></div>${a.layer?ct`<span class="layer">${y(a,"layer")}</span>`:Ut} <span class="labels">${[y(a,"directionLabel"),y(a,"colorLabel")].filter(Boolean).join(" \xB7 ")} </span>${typeof a.color=="number"?ct`<span class="ctb">${this.t("Color {{color}} \xB7 Tone {{tone}} \xB7 Base {{base}}",{color:a.color,tone:a.tone??"",base:a.base??""})}${t?`, ${t}`:""}</span>`:Ut} ${a.activation?.planet?ct`<span class="ctb">${[y(a.activation,"planet"),fl(a.activation.side,this.translator)].filter(Boolean).join(" \xB7 ")}</span>`:Ut} ${a.confident===false?ct`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:Ut}</div>`}renderReading(a,e){let t=a.filter(i=>i.description||i.colorMeaning);if(t.length===0||this.hideReadings)return Ut;let r=new Map;for(let i of t){let o=i.layer??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return ct`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...r].map(([i,o])=>ct`<div class="group">${i?ct`<p class="group-head">${y(o[0],"layer")}</p>`:Ut} ${o[0]?.layerDescription?ct`<p class="group-note">${o[0].layerDescription}</p>`:Ut} ${o.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?ct`<p class="footnote">${this.t("Base")}. ${e}</p>`:Ut}</section>`}renderArrowReading(a,e){let t=a.cognition,r=t?y(t,"label"):"",s=[{label:this.t("Color"),body:a.colorMeaning},{label:this.t("Tone"),body:a.toneMeaning},{label:this.t("Direction"),body:a.directionMeaning},{label:r?`${this.t("Cognition")} \xB7 ${r}`:this.t("Cognition"),body:t?.description}].filter(i=>!!i.body);return ct`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${y(a,"name")}</span> ${V()} ${a.position?ct`<span class="interp-aside"><small>${y(a,"position")}</small></span>`:Ut}</summary><div class="interp-body">${a.description?ct`<p>${a.description}</p>`:Ut} ${s.length>0?ct`<dl class="facets">${s.map(i=>ct`<dt>${i.label}</dt><dd>${i.body}</dd>`)}</dl>`:Ut}</div></details>`}};Rs.endpoints=ad,Rs.styles=[f,z,F,Bx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.grid{gap:0 var(--roxy-space-lg);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{align-content:start;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm);display:flex}.glyph{font-size:var(--roxy-text-xl);color:var(--roxy-accent-ink);line-height:1}.glyph.design{color:var(--roxy-danger-fg)}.glyph.personality{color:var(--roxy-fg)}.name{font-weight:var(--roxy-weight-bold)}.layer,.ctb{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.ctb{font-variant-numeric:tabular-nums}.labels{font-size:var(--roxy-text-sm)}.note{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note{margin-block-end:var(--roxy-space-sm)}.facets{gap:var(--roxy-space-xs);margin:0;display:grid}.facets dd{margin:0}`],Rs=m([x("roxy-hd-variables")],Rs);function bm(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}import{css as Hx,html as br,nothing as Wl}from"lit";var jx={udaya:"Rose",asta:"Set"},Kx={udaya:"rises",asta:"sets"},Cs=class extends g{renderData(a){let e=a.grahas??[];return e.length?br`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2>${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:a.date})}</p></header><div part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(a){let e=w(a.graha)??"";return br`<article class="row"><div class="row-top"><span class="graha">${e?br`<span class="glyph roxy-glyph">${e}</span>`:Wl}${a.graha} </span><span class="state roxy-chip ${a.visible?"visible":"invisible"}" data-tone="${a.visible?Wl:"warning"}">${a.visible?this.t("Visible"):this.t("Invisible")} </span>${a.retrograde?br`<span class="retro" title="${this.t("retrograde")}">R</span>`:Wl}</div><p class="window" part="window">${this.windowLine(a)}</p><p class="meta" part="details">${this.metaLine(a)}</p></article>`}windowLine(a){let e=a.nextEvent,t=a.lastEvent;if(e){let r={event:this.t(Kx[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:q(this.effectiveLang(),e.datetime)};return br`${a.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",r):this.t("Invisible until it {{event}} {{where}} on {{when}}",r)}`}return t?br`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(jx[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:q(this.effectiveLang(),t.datetime)})}`:br`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(a){let e=a.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=a.nextEvent??a.lastEvent,r=t&&t.kalamsa!==a.kalamsa,s={degrees:b(this.effectiveLang(),a.timeDegrees,2),limit:b(this.effectiveLang(),a.kalamsa,0),shifted:r?b(this.effectiveLang(),t.kalamsa,0):""};return br`${r?this.t("{{degrees}}\xB0 of time from the Sun against a limit of {{limit}}\xB0, becoming {{shifted}}\xB0 at that event",s):this.t("{{degrees}}\xB0 of time from the Sun against a limit of {{limit}}\xB0",s)} · ${e}`}};Cs.endpoints=rd,Cs.styles=[f,Hx`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.window{font-size:var(--roxy-text-sm)}`],Cs=m([x("roxy-heliacal-table")],Cs);import{css as Vx,html as Je,nothing as dt}from"lit";var Ts=class extends g{resolveHexagram(){let a=this.data;if(!a)return null;if("hexagram"in a&&a.hexagram){if("lines"in a){let s=a,i=s.hexagram;return{hex:i,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??i.changingLines,resultingHexagram:s.resultingHexagram}}let t=a,r=t.hexagram;return{hex:r,changingLines:r.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=a;return{hex:e,changingLines:e.changingLines}}renderData(){let a=this.resolveHexagram();if(!a)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:r,changingLines:s,dailyMessage:i,date:o,resultingHexagram:l}=a;return Je`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,r,s,i,o)} ${l?Je`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${V()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:dt}</article>`}renderHexagram(a,e,t,r,s,i,o){let l=t??this.derivedLines(e),c=Fp(e.number),d=new Set(r??[]),p=!this.hideReadings;return Je`<div class="glyphs" part="chart">${c?Je`<div class="symbol roxy-glyph">${c}</div>`:dt} ${l.length>0?Je`<div class="lines" aria-hidden="true">${l.slice().reverse().map((h,u)=>{let v=l.length-1-u+1,L=d.has(v),$=h===6||h===8;return Je`<div class="line ${`${$?"broken":"solid"}${L?" changing":""}`}">${$?Je`<span class="seg"></span><span class="seg"></span>`:Je`<span class="seg"></span>`}</div>`})}</div>`:dt}</div><div part="header"><h2>${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${o?Je`<time class="daily-date" part="details" datetime="${o}">${C(this.effectiveLang(),o)}</time>`:dt}<p class="subtitle">${e.chinese?Je`${e.chinese}`:dt} ${e.pinyin?Je`· ${e.pinyin}`:dt}</p><div class="trigrams roxy-label" part="details">${e.upperTrigram?Je`<div>${this.t("Upper")} <span class="tri-glyph roxy-glyph">${Qa(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:dt} ${e.lowerTrigram?Je`<div>${this.t("Lower")} <span class="tri-glyph roxy-glyph">${Qa(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:dt}</div>${e.judgment&&p?Je`<p class="judgment">${e.judgment}</p>`:dt} ${e.image&&p?Je`<p class="image">${e.image}</p>`:dt} ${i&&p?Je`<p class="message">${i}</p>`:dt} ${e.interpretation?.general&&p?Je`<p>${e.interpretation.general}</p>`:dt} ${d.size>0?Je`<div class="changes" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(d).sort((h,u)=>h-u).join(", ")})}</div>`:dt} ${this.renderTopics(e,a)} ${this.renderLines(s??e.changingLines,d,`${a}-lines`)}</div>`}renderTopics(a,e){let t=a.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(r=>r.body),`${e}-topics`,"Readings"):dt}renderLines(a,e,t){let r=a??[];if(r.length===0)return dt;let s=e.size>0,i=s?r.filter(l=>e.has(l.position)):r;if(i.length===0)return dt;let o=i.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Je`<p class="line-meaning">${l.meaning}</p>`:dt}));return this.renderInterpretation(o,t,s?"Changing lines":"Lines")}derivedLines(a){let e=a.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};Ts.endpoints=sd,Ts.styles=[f,z,F,Vx`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);display:grid}.result-chart{gap:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);padding-block-start:var(--roxy-space-md);display:grid}.result{border-block-start:1px solid var(--roxy-border);grid-column:1/-1;padding-block-start:var(--roxy-space-md)}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.glyphs{align-content:start;align-self:start;justify-items:center;gap:var(--roxy-space-md);display:grid}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.lines{gap:calc(var(--roxy-space-unit) * 1.5);inline-size:2lh;display:grid}.line{gap:var(--roxy-space-xs);grid-template-columns:1fr 1fr;display:grid}.seg{block-size:calc(var(--roxy-line-thick) * 3);background:var(--roxy-fg);display:block}.line.solid .seg{grid-column:1/-1}.line.changing .seg{background:var(--roxy-accent)}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.daily-date{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm);display:block}.trigrams{gap:var(--roxy-space-md);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.tri-glyph{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);vertical-align:middle;margin-inline-end:var(--roxy-space-xs)}.judgment,.image,.message{font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.judgment:before{content:"Judgment. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.image:before{content:"Image. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.line-meaning{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-muted);padding-inline-start:var(--roxy-space-sm)}.changes{border-block-start:1px solid var(--roxy-border);color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-md);padding-block-start:var(--roxy-space-md)}`],Ts=m([x("roxy-hexagram")],Ts);import{css as Ux,html as Qn,nothing as Zl}from"lit";var Es=class extends g{renderData(a){let e=a.dayHoras??[],t=a.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Qn`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2>${this.t("Hora")}</h2>${a.date?Qn`<p class="roxy-label">${C(this.effectiveLang(),a.date)}</p>`:Zl}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(a,e){return e.length===0?Zl:Qn`<div class="col"><h3 class="section-label">${a}</h3>${e.map(t=>Qn`<div class="row"><span class="glyph roxy-glyph" aria-hidden="true">${w(t.planet)??"\xB7"}</span> <span class="planet">${t.planet}</span> <span class="time">${da(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Qn`<span class="num">${t.number}</span>`:Zl}</div>`)}</div>`}};Es.endpoints=nd,Es.styles=[f,Ux`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.cols{gap:var(--roxy-space-md);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{margin-block-end:var(--roxy-space-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;display:flex}.row:last-child{border-block-end:0}.glyph{inline-size:2ch;color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);text-align:center;line-height:1}.planet{flex:1}.time{color:var(--roxy-muted);white-space:nowrap}.num{inline-size:3ch;color:var(--roxy-muted);font-size:var(--roxy-text-xs);text-align:end}@container (width<=30rem){.cols{grid-template-columns:minmax(0,1fr)}}`],Es=m([x("roxy-hora-table")],Es);import{css as qx,html as T,nothing as H}from"lit";import{property as vm}from"lit/decorators.js";var Yx={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Wx={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Zx={"new-moon":"New Moon","first-quarter":"First Quarter","full-moon":"Full Moon","last-quarter":"Last Quarter"},Lm={penumbral:"Penumbral eclipse",partial:"Partial eclipse",annular:"Annular eclipse",total:"Total eclipse"},$m={retrograde:"Turns retrograde",direct:"Turns direct"},Xx=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]];function Ro(n,a){return a!==void 0&&Object.hasOwn(n,a)?n[a]:void 0}var Jx=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Fa=class extends g{constructor(){super(...arguments);this.period="daily";this.layout="auto";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"}}renderData(e){let t=e.sign??"",r=N(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i=this.effectiveLang(),o="date"in e&&e.date&&C(i,e.date)||"week"in e&&e.week&&C(i,e.week)||"month"in e&&e.month&&Za(i,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return T`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph roxy-glyph" aria-hidden="true">${r}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(Yx[this.period])}</h2>${o?T`<p class="date roxy-label">${o}</p>`:H}</div>${s!==null?T`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:H}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderPositions(e.positions)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",d="crystal"in e?e.crystal:void 0,p="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],h="luckyDays"in e&&e.luckyDays?e.luckyDays:[],u=e.compatibleSigns??[];return l===void 0&&!c&&!d&&p.length===0&&h.length===0&&u.length===0?H:T`<div class="lucky" part="details">${l!==void 0?T`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:H} ${c?T`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:H} ${d?T`<span>${this.t("Crystal")} <button type="button" class="crystal" aria-pressed="${this.openedRowId===d.id?"true":"false"}" @click="${()=>this.pickRow({id:d.id,name:d.name})}">${d.name}</button></span>`:H} ${p.length?T`<span>${this.t("Lucky numbers")} <strong>${p.join(", ")}</strong></span>`:H} ${h.length?T`<span>${this.t("Lucky days")} <strong>${h.join(", ")}</strong></span>`:H} ${u.length?T`<span class="compat-wrap">${this.t("Best with")}<ul class="compat roxy-chips">${u.map(v=>T`<li>${v}</li>`)}</ul></span>`:H}</div>`})()} ${this.openedRow?T`<div class="detail" part="detail">${this.openedRow}</div>`:H}</article>`}renderReading(e){if(this.hideReadings)return H;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):H;let r=this.paragraphs(e.overview);return T`${r.length?T`<div class="overview" part="section overview">${r}</div>`:H}<div class="sections" part="section outlook">${Xx.map(([s,i])=>{let o=this.paragraphs(e[s]);return o.length?T`<div class="section"><h3>${this.t(i)}</h3>${o}</div>`:H})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?H:T`<div class="column" part="section column">${t}</div>`}paragraphs(e){return _n(e).map(t=>T`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return H;let t=this.effectiveLang();return T`<section part="section events"><h3>${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(r=>{let s=!!r.placements?.length;return this.renderRow(T`<time class="row-when" datetime="${r.at}">${Za(t,an(r.at),"time")}</time>`,this.renderEventBodies(r),T`<span class="kind">${this.t(Ro(Zx,r.phase)??Ro(Lm,r.kind)??Ro($m,r.direction)??Wx[r.type])}</span> ${s?H:T`<span>${this.t("House")} ${r.house}</span>`} ${!s&&r.sign?T`<span>${this.glyphName(N(r.sign),D(r.sign))}</span>`:H} ${r.through&&r.through!==r.at?T`<span>${this.t("through {{date}}",{date:C(t,an(r.through))})}</span>`:H}`,{when:"element"})})}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map((r,s)=>{let i=e.placements?.[s];return T`${this.glyphName(w(r),r)}${i?this.renderPlace(i):H}`});return t.length===2&&e.aspect?T`${t[0]} <span class="${`${Be({type:e.aspect})} roxy-glyph`}">${cn(e.aspect)??e.aspect}</span> ${t[1]}`:T`${t}`}renderPlace(e){return T`<span class="place">${this.glyphName(N(e.sign),D(e.sign))}<span>${this.t("House {{n}}",{n:e.house})}</span></span>`}renderPositions(e){if(!e?.length)return H;let t=this.effectiveLang();return T`<section part="section positions"><h3>${this.t("Positions")}</h3><ul class="rows" aria-label="${this.t("Positions")}">${e.map(r=>this.renderRow(this.stay(t,r),T`${this.glyphName(w(r.name),r.name)}${r.isRetrograde?T`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${be}</span>`:H}${this.renderPlace(r)}`,T`<span>${D(r.dignity)}</span> ${r.turnsDirectAt?T`<span class="turn"><span class="roxy-glyph" aria-hidden="true">${be}</span>${this.t("through {{date}}",{date:C(t,an(r.turnsDirectAt))})}</span>`:H}`))}</ul></section>`}stay(e,t){let r=an(t.enteredAt),s=an(t.leavesAt);return r&&s?vt(e,r,s):s?this.t("through {{date}}",{date:C(e,s)}):r?this.t("since {{date}}",{date:C(e,r)}):""}renderYear(e){if(!("themes"in e))return H;let t=this.effectiveLang();return T`${e.themes.length?T`<section part="section themes"><h3>${this.t("Themes")}</h3><ul class="rows">${e.themes.map(r=>this.renderRow(vt(t,r.from,r.to),T`${this.glyphName(w(r.body),r.body)} ${this.glyphName(N(r.sign),D(r.sign))}`,T`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:H} ${e.keyPeriods.length?T`<section part="section key-periods"><h3>${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(r=>this.renderRow(vt(t,r.from,r.to),this.glyphName(w(r.body),r.body),T`<span>${this.t("House")} ${r.house}</span><span>${r.focus}</span>`))}</ul></section>`:H} ${e.eclipses.length?T`<section part="section eclipses"><h3>${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(r=>this.renderRow(C(t,r.date),T`<span class="name">${this.wireLabel(Lm,r.kind)}</span>`,T`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:H} ${e.retrogrades.length?T`<section part="section retrogrades"><h3>${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(r=>this.renderRow(C(t,r.date),T`${this.glyphName(w(r.body),r.body)} <span>${this.wireLabel($m,r.direction)}</span>`,T`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:H} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return H;let t=this.effectiveLang(),r=Jx.filter(([s])=>e[s]);return r.length===0?H:T`<section part="section best-periods"><h3>${this.t("Best months")}</h3><div class="tiles" part="details">${r.map(([s,i])=>{let o=e[s];return o?T`<div class="tile"><span class="roxy-label">${this.t(i)}</span> <span class="tile-value">${Za(t,o.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:o.count})}</span></div>`:H})}</div></section>`}renderRow(e,t,r,s){return T`<li class="row" part="label-track">${s?.when==="element"?e:T`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${r}</span></li>`}wireLabel(e,t){let r=Ro(e,t);return r?this.t(r):t}glyphName(e,t){return T`<span class="roxy-glyph" aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",r="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!r&&s.length===0)return H;let i=N(t)??"";return T`<div class="sky" part="section sky">${t||r?T`<div class="moon-line">${t?T`<span><span class="roxy-label">${this.t("Moon")}</span> <span class="roxy-glyph" aria-hidden="true">${i}</span> <b>${t}</b></span>`:H} ${r?T`<span><span class="roxy-label">${this.t("Phase")}</span> <b>${r}</b></span>`:H}</div>`:H} ${s.length?T`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(o=>T`<li>${o}</li>`)}</ul>`:H}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],r=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&r.length===0?H:T`${t.length&&!this.hideReadings?T`<section part="section week-by-week"><h3>${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>T`<div class="week"><span class="roxy-label">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?T`<p class="week-advice">${s.advice}</p>`:H}</div></div>`)}</div></section>`:H} ${r.length?T`<section part="section key-dates"><h3>${this.t("Key dates")}</h3><dl class="dates" part="label-track">${r.map(s=>T`<div class="date-row"><dt>${C(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:H}`}};Fa.endpoints=id,Fa.styles=[f,Pa,gr,qx`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);line-height:1}.title{text-transform:capitalize;white-space:nowrap}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar{inline-size:10ch;block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.column p,.overview p,.section p{line-height:1.7}.overview,.column,.section{align-content:start;gap:var(--roxy-space-sm);display:grid}.column{gap:var(--roxy-space-md)}.sections{gap:var(--roxy-space-lg) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,48ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm)}.sky,.lucky{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.sky{gap:var(--roxy-space-sm);display:grid}.lucky{gap:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-secondary);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.crystal{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0;border:0;padding:0;text-decoration:underline}.detail{margin-block-start:var(--roxy-space-md)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs);flex-wrap:wrap;width:100%;display:flex}.compat>li{text-transform:capitalize}.moon-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold)}.moon-line .roxy-label{margin-inline-end:var(--roxy-space-xs)}.transits{gap:var(--roxy-space-xs);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.transits li::marker{color:var(--roxy-accent)}.weeks{gap:var(--roxy-space-sm);display:grid}.week{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.week:first-child{border-block-start:0;padding-block-start:0}.week-focus{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.week-advice{font-size:var(--roxy-text-sm);margin-block-start:calc(var(--roxy-space-unit) / 2)}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);margin:0;display:grid}.date-row{display:contents}.date-row dt{color:var(--roxy-accent-ink);font-size:inherit;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.date-row dd{margin:0}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.row:first-child{border-block-start:0;padding-block-start:0}.row-when{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.row-what{font-size:var(--roxy-text-sm)}.row-what .name,.row-meta .kind{font-weight:var(--roxy-weight-bold)}.place{gap:var(--roxy-space-xs);margin-inline:var(--roxy-space-xs) var(--roxy-space-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:inline-flex}.row-what .place .name{font-weight:inherit}.turn{gap:var(--roxy-space-xs);display:inline-flex}.row-what .retro{margin-inline-start:var(--roxy-space-xs)}.row-meta{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;grid-column:2;display:flex}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.tile{gap:calc(var(--roxy-space-unit) / 2);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.tile-value{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.tile-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],m([vm({type:String,reflect:true})],Fa.prototype,"period",2),m([vm({type:String,reflect:true})],Fa.prototype,"layout",2),Fa=m([x("roxy-horoscope-card")],Fa);import{css as Qx,html as ie,nothing as ra}from"lit";import{state as eb}from"lit/decorators.js";var tb=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],Co=[1,2,3,4];function Xl(n,a){return n?typeof a=="number"?`${n} ${a}`:n:""}function wm(n){return[...new Set(n.map(String))].join(" > ")}function ab(n){return[...new Set(n??[])]}var vr=class extends g{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),r=e.nodes;for(let[s,i]of[["Rahu",r?.rahu],["Ketu",r?.ketu]])i&&t.push({name:s,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,pada:i.pada,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,kpNumber:i.kpNumber,retrograde:true});return t}renderData(e){let t=e.ascendant;return ie`<div class="wrap" part="card" aria-label="KP chart"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?ie`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?tt(t.longitude):t.sign??""} </strong>${t.nakshatra?ie`· ${Xl(t.nakshatra,t.pada)}`:ra} ${t.subLord?ie`· sub lord ${t.subLord}`:ra} ${typeof t.kpNumber=="number"?ie`· KP ${t.kpNumber}`:ra}</div>`:ra} ${typeof e.meta?.ayanamsa=="number"?ie`<div class="ayan">Ayanamsa: ${Br(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?ie`· ${e.meta.houseSystem} houses`:ra}</div>`:ra}</header>${mt({items:tb,active:this.activeTab,onSelect:r=>{this.activeTab=r},label:"KP chart views",idPrefix:"kp",controls:true})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?this.scrollBox(ie`<table part="table" role="table"><caption id="kp-planets-caption" class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ie`<tr><td class="body">${t.name}${t.retrograde?ie`<span class="retro">R</span>`:ra}</td><td class="num">${typeof t.longitude=="number"?tt(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${Xl(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-planets-caption"):ie`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?this.scrollBox(ie`<table part="table" role="table"><caption id="kp-cusps-caption" class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>ie`<tr><td class="body num">${r.house}${this.renderThemes(ll(r.house,t))}</td><td class="num">${typeof r.longitude=="number"?tt(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${Xl(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-cusps-caption"):ie`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,r=e?.houseWise??[],s=e?.planetWise??[];return!r.length&&!s.length?ie`<p class="roxy-empty" role="status">No significators</p>`:ie`${this.renderLevelLegend(r)} ${r.length?ie`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div>${this.scrollBox(ie`<table part="table" role="table"><caption id="kp-house-sig-caption" class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${Co.map(i=>ie`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(i=>ie`<tr><td class="body num">${i.house}${this.renderThemes(ll(i.house,t))}</td>${Co.map(o=>this.renderCell(this.planetsAtLevel(i,o).join(", ")))}<td class="chain">${wm(i.all??[])}</td></tr>`)}</tbody></table>`,"kp-house-sig-caption")}`:ra} ${s.length?ie`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div>${this.scrollBox(ie`<table part="table" role="table"><caption id="kp-planet-sig-caption" class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${Co.map(i=>ie`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(i=>ie`<tr><td class="body">${i.planet}</td>${Co.map(o=>this.renderCell(this.housesAtLevel(i,o).join(", ")))}<td class="chain">${wm(i.allHouses??[])}${this.renderThemes(fa(ab(i.allHouses),t))}</td></tr>`)}</tbody></table>`,"kp-planet-sig-caption")}`:ra}`}scrollBox(e,t){return ie`<div class="scroll" tabindex="0" role="region" aria-labelledby="${t}">${e}</div>`}renderThemes(e){return e?ie`<span class="themes">${e}</span>`:ra}renderCell(e){return e?ie`<td>${e}</td>`:ie`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(r=>r.level===t).flatMap(r=>r.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(r=>r.level===t).flatMap(r=>r.houses??[])}renderLevelLegend(e){let t=new Map;for(let r of e)for(let s of r.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?ra:ie`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((r,s)=>r[0]-s[0]).map(([r,s])=>ie`<li><b>L${r}</b>${s}</li>`)}</ul>`}};vr.endpoints=od,vr.styles=[f,et,Qx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.sig-title,.sig-note{margin:0}.asc,.ayan{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.asc strong{color:var(--roxy-fg)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.body{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.num{font-variant-numeric:tabular-nums}.sig-head{gap:var(--roxy-space-xs);display:grid}.sig-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}.chain,.empty-cell{color:var(--roxy-muted)}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);display:block}`],m([eb()],vr.prototype,"activeTab",2),vr=m([x("roxy-kp-chart")],vr);import{css as rb,html as ve,nothing as vn}from"lit";var sb={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},nb={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},km={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},ib={gain:"Gain",loss:"Loss"},ob={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Ds=class extends g{renderData(a){return a.layers?ve`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(a)} ${this.renderSignificators(a)}<section class="block" part="section cusps">${this.renderLayer("cusps",a.layers.cusps,this.renderCuspRows(a.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",a.layers.dasha,this.renderDashaRows(a.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",a.layers.rulingPlanets,this.renderRulingRows(a.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",a.layers.moonWindows,this.renderWindowRows(a.layers.moonWindows.rows))}</section>${this.renderWindows(a)}<section class="block" part="section frame">${Q(this.effectiveLang(),{ayanamsa:a.ayanamsa,ayanamsaDegrees:a.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(a){let e=this.effectiveLang();return ve`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${q(e,a.date)}</span></div><div class="verdict-row"><span class="verdict ${a.band}">${this.t(sb[a.band])}</span> <span class="evidence">${b(e,a.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${q(e,a.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${Xe(e,a.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${Xe(e,a.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(a){let e=a.significators,t=this.effectiveLang(),r=s=>ve`<div class="roxy-chips">${s.map(i=>ve`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return ve`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${r(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${r(e.loss)}</dd></div></dl>${e.byHouse.length?ve`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>ve`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${Xe(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:vn}</section>`}renderLayer(a,e,t){let r=this.effectiveLang();return ve`<div class="block-head"><h3>${this.t(km[a])}</h3><span class="evidence">${this.t("Weight")} ${fe(r,e.weight,0)} · ${this.t("Score")} ${b(r,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(km[a])}">${t}</div>`}renderCuspRows(a){return ve`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>ve`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(a){let e=this.effectiveLang();return ve`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${a.map(t=>ve`<tr><td>${this.t(ob[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${q(e,t.startDate)}</td><td>${q(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td><td class="num">${fe(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(a){return ve`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>ve`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(a){let e=this.effectiveLang();return ve`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(t=>ve`<tr><td>${Dt(e,t.from)}</td><td>${Dt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(a){let e=this.effectiveLang(),t=a.bestWindow,r=a.worstWindows??[];if(!t&&!r.length)return vn;let s=(i,o)=>ve`<span class="window roxy-chip ${o}" data-tone="${o==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${da(e,{start:i.from,end:i.to})}</small></span>`;return ve`<section class="block" part="section windows"><dl class="roxy-facts">${t?ve`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(t,"best")}</div></dd></div>`:vn} ${r.length?ve`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${r.map(i=>s(i,"worst"))}</div></dd></div>`:vn}</dl></section>`}glyphName(a,e=false){let t=w(a);return ve`${t?ve`<span class="glyph roxy-glyph" aria-hidden="true">${t}</span>`:vn}${a}${e?ve`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${be}</span>`:vn}`}verdictChip(a){return ve`<span class="state ${a}">${this.t(nb[a])}</span>`}groupChip(a){return ve`<span class="chip roxy-chip">${this.t(ib[a])}</span>`}};Ds.endpoints=ld,Ds.styles=[f,se,G,rb`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],Ds=m([x("roxy-kp-finance-card")],Ds);import{css as lb,html as To,nothing as Sm}from"lit";var As=class extends g{renderData(a){let e=a.planets??[];return To`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof a.ayanamsa=="number"?To`<span class="ayanamsa">Ayanamsa: ${b(this.effectiveLang(),a.ayanamsa,2)}°</span>`:Sm}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>To`<tr><td class="planet">${t.planet} ${t.retrograde?To`<span class="retro">R</span>`:Sm}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};As.endpoints=cd,As.styles=[f,lb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],As=m([x("roxy-kp-planets-table")],As);import{css as cb,html as Ps,nothing as Eo}from"lit";var Ms=class extends g{renderData(a){let e=a.significators??[];return Ps`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${a.dayLord?Ps`<div class="day-lord">Day lord: <strong>${a.dayLord}</strong></div>`:Eo}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.moonSignLord??""}</dd><dt>Star lord</dt><dd>${a.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${a.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${a.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${a.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.lagnaSubSublord??""}</dd></dl></div></div>${a.rulingPlanets?.length?Ps`<div class="rp-list" part="details"><span class="roxy-label">Ruling planets</span><ol class="roxy-chips" aria-label="Ruling planets by strength">${a.rulingPlanets.map((t,r)=>Ps`<li class="rp"><span class="rank">${r+1}</span> ${t}</li>`)}</ol></div>`:Eo} ${e.length?Ps`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let r=fa(t.signifies,a.houseThemes);return Ps`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${r?Ps`<span class="themes">${r}</span>`:Eo}</td></tr>`})}</tbody></table>`:Eo}</div>`}};Ms.endpoints=dd,Ms.styles=[f,cb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.title,.group h3{margin:0}.day-lord{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.day-lord strong{color:var(--roxy-fg)}.groups{gap:var(--roxy-space-md) var(--roxy-space-xl);flex-wrap:wrap;display:flex}.group{gap:var(--roxy-space-xs);flex:1 1 0;min-width:min(100%,22ch);display:grid}.group dl{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);margin:0;display:grid}.group dd{font-weight:var(--roxy-weight-bold);margin:0}.rp-list{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.rp .rank{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],Ms=m([x("roxy-kp-ruling-planets")],Ms);import{css as db,html as nt,nothing as pt}from"lit";import{property as pb}from"lit/decorators.js";var Lr=class extends g{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),r=e.trigram;return nt`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?nt`<span class="group">${this.t("{{direction}} group",{direction:B(t,"facing",D(e.group))})}</span>`:pt}</header><div class="facts" part="details">${r?nt`<span><span class="roxy-label">${this.t("Trigram")}</span> <span lang="zh">${r.chinese??""}</span> ${Fe(Qa(r.english))} <b>${r.english??""}</b> <span class="element-word ${kt(r.element)}">${y(r,"element")}</span></span>`:pt} ${r?.familyMember?nt`<span><span class="roxy-label">${this.t("Role")}</span>${r.familyMember}</span>`:pt} ${"solarYear"in e&&typeof e.solarYear=="number"?nt`<span class="solar-year"><span class="roxy-label">${this.t("Year")}</span><b>${Za(t,String(e.solarYear),"year")}</b></span>`:pt} ${"gender"in e&&e.gender?nt`<span class="formula-gender"><span class="roxy-label">${re(t,"gender")}</span>${B(t,"gender",e.gender)}</span>`:pt} ${"boundaryDate"in e&&e.boundaryDate?nt`<span>${this.t("Year boundary")} ${C(t,e.boundaryDate)}</span>`:pt} ${"reassigned"in e&&e.reassigned?nt`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:pt} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${bo.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?er(e.conventions,this.translator,this.effectiveLang()):pt}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return pt;let t=this.effectiveLang();return nt`${e.bestSector?nt`<span><span class="roxy-label">${this.t("Best")}</span><b>${B(t,"facing",e.bestSector)}</b></span>`:pt} ${e.worstSector?nt`<span><span class="roxy-label">${this.t("Worst")}</span><b>${B(t,"facing",e.worstSector)}</b></span>`:pt}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):B(e,"facing",t)}renderSector(e,t){let r=this.effectiveLang(),s=this.sectorHeading(r,t);if(t==="Center")return nt`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol roxy-glyph">${Qa(e.trigram?.english)??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let i=(e.sectors??[]).find(l=>l.direction===t);if(!i)return nt`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let o=i.nature==="auspicious";return nt`<div class="sector ${o?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${y(i,"starName")}</span> ${"chinese"in i&&i.chinese?nt`<span class="star-hanzi" lang="zh">${i.chinese}</span>`:pt} <span class="domain">${i.domain??""}</span> ${typeof i.rank=="number"?nt`<span class="rank">${o?this.t("Rank"):this.t("Severity")} ${i.rank}</span>`:pt}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return pt;let r=this.effectiveLang(),s=t.map(i=>{let o=this.mode==="mansions"&&"reading"in i?i.reading:void 0;return!o||this.hideReadings?pt:nt`<li class="row" part="label-track"><span class="roxy-label">${this.sectorHeading(r,i.direction??"")}</span><div class="row-body"><span>${y(i,"starName")}</span><p part="reading">${o}</p></div></li>`});return s.every(i=>i===pt)?pt:nt`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};Lr.endpoints=pd,Lr.styles=[f,ua,G,vo,gr,db`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.group{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.sector{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);text-align:center;display:grid}.sector-good{background:color-mix(in srgb, var(--roxy-success) 10%, var(--roxy-surface))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger) 10%, var(--roxy-surface))}.sector-self{background:color-mix(in srgb, var(--roxy-accent) 10%, var(--roxy-surface))}:is(.sector-good,.sector-bad,.sector-self) .sector-name,:is(.sector-good,.sector-bad) .rank{color:var(--roxy-secondary)}.star-name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.star-hanzi,.trigram-symbol{color:var(--roxy-accent-ink)}:is(.sector-good,.sector-bad) .star-hanzi{color:var(--roxy-fg)}.domain{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.rank{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.centre{align-content:center}.kua-number{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.trigram-symbol{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight)}@container (width<=30rem){.plate{background:var(--roxy-surface);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";min-block-size:auto}.sector:last-child{border-block-end:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:end;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:end;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-good{background:var(--roxy-success)}.swatch-bad{background:var(--roxy-danger)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([pb({type:String,reflect:true})],Lr.prototype,"mode",2),Lr=m([x("roxy-kua-card")],Lr);import{css as hb,html as Ln,nothing as Jl,svg as Do}from"lit";var Ql=320,qt=Ql/2,Ba=128,mb=118,Rm=137,gb=152,yb=.95,ub={glyph:11},fb=ub.glyph;function Ha(n,a){let e=n*Math.PI/180;return{x:qt+a*Math.sin(e),y:qt-a*Math.cos(e)}}var xb=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],_s=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this)}renderData(e){let t=e.bodies??[],r=e.birthDetails;return Ln`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${r?Ln`<p class="roxy-label">${q(this.effectiveLang(),r.date,r.time)}</p>`:Jl}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?Ln`<p class="summary">${e.summary}</p>`:Jl} ${this.renderList(t)}</div>`}renderDial(e){return Ln`<svg viewBox="0 0 ${Ql} ${Ql}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${qt}" cy="${qt}" r="${Ba}"/><circle class="dial" cx="${qt}" cy="${qt}" r="${Ba*.66}" stroke-width="0.5"/><circle class="dial" cx="${qt}" cy="${qt}" r="${Ba*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${qt}" cy="${qt}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=Ha(l,Ba),d=Ha(l,Ba-(l%45===0?8:4));e.push(Do`<line class="tick" x1=${d.x} y1=${d.y} x2=${c.x} y2=${c.y} />`)}let t=Ha(0,Ba),r=Ha(180,Ba),s=Ha(90,Ba),i=Ha(270,Ba),o=xb.map(({az:l,source:c})=>{let d=Ha(l,gb),p=l%90===0;return Do`<text class=${`compass-label${p?" cardinal":""}`} x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return Do`
99
99
  <line class="cardinal-axis" x1=${t.x} y1=${t.y} x2=${r.x} y2=${r.y} />
100
100
  <line class="cardinal-axis" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} />
101
- ${e}${o}`}renderSpokes(e){let t=e.map((s,i)=>({b:s,i})),r=Mt(ib*lb,bm);return jt(t,({b:s})=>s.azimuth,r).map(({item:s,displayLongitude:i})=>{let{b:o,i:l}=s,c=Ur(o.planet,l),d=o.aboveHorizon===false,h=Ba(o.azimuth,sb),p=Ba(i,bm),f=w(o.planet)??y(o,"planet"),v=`${o.altitude>0?"+":""}${Math.round(o.altitude)}\xB0`;return Ro`<g>
102
- <line class=${`spoke${d?" below":""}`} stroke=${c} x1=${qt} y1=${qt} x2=${h.x} y2=${h.y}><title>${this.t("{{planet}} {{direction}} {{azimuth}}\xB0 altitude {{altitude}}",{planet:y(o,"planet"),direction:o.compassDirection,azimuth:Math.round(o.azimuth),altitude:v})}</title></line>
103
- <text class=${`body-glyph roxy-glyph${d?" below":""}`} fill=${c} x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${f}</text>
104
- </g>`})}renderList(e){if(e.length===0)return ql;let t=this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.");return vn`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t}"><table><caption class="roxy-sr-only">${t}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=Ur(r.planet,s),o=r.aboveHorizon===false;return vn`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${i}`}"></span> ${Fe(w(r.planet))}${y(r,"planet")}</span></td><td>${r.compassDirection}</td><td class="num">${Math.round(r.azimuth)}°</td><td class="num">${r.altitude>0?"+":""}${Math.round(r.altitude)}°</td><td><span class="${`horizon ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};_s.endpoints=od,_s.styles=[u,He,rb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,30rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border) 10%, transparent);stroke:var(--roxy-border);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border);stroke-width:.5px}.tick{stroke:var(--roxy-secondary);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold)}.body-glyph.below{opacity:.45}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td).num{text-align:end}.body-cell{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.body-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0}.horizon.up{color:var(--roxy-success-fg)}.horizon.down{color:var(--roxy-muted)}.summary{font-size:var(--roxy-text-sm)}`],_s=m([x("roxy-local-space-compass")],_s);import{css as db,html as Ha,nothing as Wl}from"lit";import{property as Ns,state as zs}from"lit/decorators.js";var Ve=class extends Va{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=false;this.isLoading=false;this.highlight=-1;this.error=null;this.debouncedFetch=po(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=false,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=false)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=false)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=zr(this.publishableKey??this.apiKey);t&&!this.refusal&&Js(this,t,{warn:true}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=true;try{let r=await this.search(e,t.signal);if(t.signal.aborted)return;this.error=null,this.results=r.cities??[],this.isOpen=true,this.highlight=this.results.length>0?0:-1}catch(r){if(r?.name==="AbortError")return;this.results=[],this.isOpen=false,this.highlight=-1,this.error=r instanceof Error?r.message:String(r)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=false)}}async search(e,t){if(!this.endpoint&&this.submitUrl)return Ua({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:e,limit:8}},t);let r=new URL(this.endpoint||`${en}/location/search`,document.baseURI);r.searchParams.set("q",e),r.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(s["X-API-Key"]=i);let o=await fetch(r,{headers:s,signal:t});if(!o.ok)throw new Error(await lp(o));return await o.json()}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=false,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:true,composed:true}))}render(){return Ha`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){return this.refusal?Ha`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:Ha`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=true)}}"> ${this.isLoading?Ha`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:Wl} ${this.isOpen?Ha`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?Ha`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>Ha`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?Ha`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:Wl}</div>${this.error?Ha`<p class="search-error" role="alert">${this.t(this.error)}</p>`:Wl}`}};Ve.styles=[u,co,db`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],m([Ns({type:String,attribute:"api-key"})],Ve.prototype,"apiKey",2),m([Ns({type:String,attribute:"publishable-key"})],Ve.prototype,"publishableKey",2),m([Ns({type:String})],Ve.prototype,"endpoint",2),m([Ns({type:String,attribute:"submit-url"})],Ve.prototype,"submitUrl",2),m([Ns({attribute:"submit-context",converter:bi})],Ve.prototype,"submitContext",2),m([Ns({type:String})],Ve.prototype,"placeholder",2),m([Ns({type:String,attribute:"default-value"})],Ve.prototype,"defaultValue",2),m([zs()],Ve.prototype,"query",2),m([zs()],Ve.prototype,"results",2),m([zs()],Ve.prototype,"isOpen",2),m([zs()],Ve.prototype,"isLoading",2),m([zs()],Ve.prototype,"highlight",2),m([zs()],Ve.prototype,"refusal",2),m([zs()],Ve.prototype,"error",2),Ve=m([x("roxy-location-search")],Ve);import{css as pb,html as sa,nothing as Lr}from"lit";var vm={forward:"Forward",reverse:"Backward"},Os=class extends g{renderData(a){let e=this.effectiveLang();return sa`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${a.direction?sa`<span><span class="roxy-label">${this.t("Direction")}</span><b>${vm[a.direction]?this.t(vm[a.direction]):a.direction}</b></span>`:Lr} ${typeof a.startAge=="number"?sa`<span><span class="roxy-label">${this.t("Starts")}</span><b>${this.ageLabel(e,a.startAge,a.startAgeMonths)}</b></span>`:Lr} ${a.boundaryTerm?sa`<span><span class="roxy-label">${this.t("Counted to")}</span>${F(e,"boundaryTerm",a.boundaryTerm)}</span>`:Lr} ${typeof a.daysToTerm=="number"?sa`<span><span class="roxy-label">${this.t("Days")}</span>${_(e,a.daysToTerm)}</span>`:Lr} ${a.gender?sa`<span><span class="roxy-label">${this.t("Formula")}</span>${F(e,"gender",a.gender)}</span>`:Lr}</div>${this.renderStrip(a,e)} ${this.renderAnnuals(a)} ${a.summary&&!this.hideReadings?sa`<p class="summary" part="section summary">${a.summary}</p>`:Lr} ${Qa(a.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(a,e,t){let r=_(a,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:r,months:_(a,t)}):this.t("{{years}} yrs",{years:r})}renderStrip(a,e){let t=a.luckPillars??[];return t.length===0?Lr:sa`<div class="strip-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(r=>sa`<div class="pillar" part="pillar"><span class="ages roxy-label">${this.t("{{start}} to {{end}}",{start:_(e,r.startAge??0),end:_(e,r.endAge??0)})}</span> <span class="god">${y(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} <span class="element-word ${wt(r.stem?.element)}">${y(r.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${y(r.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(r.startYear??""),end:String(r.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(a){let e=a.annualPillars??[];return e.length===0?Lr:sa`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><ul class="roxy-chips annuals">${e.map(t=>sa`<li class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${y(t.tenGod,"name")}</span></li>`)}</ul></section>`}};Os.endpoints=ld,Os.styles=[u,I,ua,pb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.strip-wrap{min-width:0;overflow-x:auto}.strip{min-width:min-content;display:flex}.pillar{gap:calc(var(--roxy-space-unit) / 2);min-inline-size:12ch;padding:var(--roxy-space-sm);text-align:center;flex:none;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.ages,.years{font-variant-numeric:tabular-nums}.ages{font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.years{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.annual .yr{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.summary{margin:0}`],Os=m([x("roxy-luck-pillars")],Os);import{css as hb,html as me,nothing as be}from"lit";import{property as mb}from"lit/decorators.js";var gb={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},yb={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},ub=13;function Lm(n){return"tzolkin"in n}var $r=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),r=this.mode==="chart"&&Lm(e)?e:void 0,s=Lm(e)?e.tzolkin:e,i=s?.reading,o=i?.numberBand?gb[i.numberBand]:void 0;return me`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?me`<div class="coefficient">${_(t,s.number)}</div>`:be}<div><p class="roxy-label">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?me`<span><span class="roxy-label">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:be} ${s?.daySignKiche?me`<span><span class="roxy-label">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:be}</p></div></header><div class="facts" part="details">${e.date?me`<span><span class="roxy-label">${this.t("Date")}</span><b>${C(t,e.date)}</b></span>`:be} ${this.renderTrecena(t,s?.trecena)} ${r?this.renderHaabFact(t,r.haab):be} ${r?.longCount?.formatted?me`<span><span class="roxy-label">${this.t("Long Count")}</span><b>${r.longCount.formatted}</b></span>`:be} ${r?.calendarRound?me`<span><span class="roxy-label">${this.t("Calendar Round")}</span><b>${r.calendarRound}</b></span>`:be} ${r?.yearBearer?.daySignName?me`<span><span class="roxy-label">${this.t("Year Bearer")}</span><b>${_(t,r.yearBearer.number)} ${r.yearBearer.daySignName}</b></span>`:be} ${r?.lordOfNight?.label?me`<span><span class="roxy-label">${this.t("Lord of the Night")}</span><b>${r.lordOfNight.label}</b></span>`:be} ${o?me`<span><span class="roxy-label">${this.t("Character of the number")}</span><b class="band">${this.t(o)}</b></span>`:be} ${e.conventions?.correlation?me`<span><span class="roxy-label">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${F(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:be}</div>${i?.keynote&&!this.hideReadings?me`<p class="keynote" part="reading">${i.keynote}</p>`:be} ${this.renderLists(i)} ${this.renderInterpretation(this.sections(r,i),"mayan-day")} ${this.renderCross(t,r?.cross)} ${r?.summary&&!this.hideReadings?me`<p class="summary" part="reading">${r.summary}</p>`:be}</article>`}renderTrecena(e,t){return t?me`<span><span class="roxy-label">${this.t("Trecena")}</span><b>${_(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:_(e,t.dayOfTrecena),total:_(e,ub)}):be} ${t.rulingSignName?me`· <span class="roxy-label">${this.t("Ruling sign")}</span>${t.rulingSignName}`:be}</span>`:be}renderHaabFact(e,t){return t?.monthName?me`<span><span class="roxy-label">${this.t("Haab")}</span><b>${_(e,t.day)} ${t.monthName}</b> ${t.monthClassic?me`(${t.monthClassic})`:be} ${typeof t.dayOfYear=="number"?me`· <span class="roxy-label">${this.t("Day of year")}</span>${_(e,t.dayOfYear)}`:be}</span>`:be}renderLists(e){let t=e?.strengths??[],r=e?.challenges??[];return this.hideReadings||t.length===0&&r.length===0?be:me`<div class="lists" part="section readings">${t.length>0?me`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>me`<li>${s}</li>`)}</ul></div>`:be} ${r.length>0?me`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${r.map(s=>me`<li>${s}</li>`)}</ul></div>`:be}</div>`}sections(e,t){let r=[];return t?.numberReading&&r.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&r.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&r.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&r.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&r.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),r}crossLabel(e){let t=yb[e??""];return t?this.t(t):R(e??"")}renderCross(e,t){let r=t??[];return r.length===0?be:me`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Mayan cross")}"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${r.map(s=>me`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${_(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${_(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?me`(${s.daySignKiche})`:be} ${s.reading&&!this.hideReadings?me`<p part="reading">${s.reading}</p>`:be}</td></tr>`)}</tbody></table></div></section>`}};$r.endpoints=cd,$r.styles=[u,K,ga,hb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.coefficient{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * 2.75);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.coefficient){min-width:0}.title,.block-title,p.roxy-label{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.spellings{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}span>.roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.keynote,.summary{margin:0;padding-block-start:var(--roxy-space-md)}.summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([mb({type:String,reflect:true})],$r.prototype,"mode",2),$r=m([x("roxy-mayan-day-sign")],$r);import{css as fb,html as Ct,nothing as $a}from"lit";import{property as xb}from"lit/decorators.js";var bb=88,vb=28,wr=class extends g{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let r=an(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Ct`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${r||this.t("Moon phase calendar")}</h2><div part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):$a}renderSingle(e){let t=e.meaning?.energy,r=t==="waxing"||t==="waning"?t==="waxing":typeof e.age=="number"?e.age<nn/2:el(e.date);return Ct`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header">${typeof e.illumination=="number"&&r!==void 0?Wt(this,{illumination:e.illumination,waxing:r},bb):$a}<div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?Ct`<p class="roxy-label">${C(this.effectiveLang(),e.date)}</p>`:$a}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Ct`<div><span class="roxy-label">${this.t("Illumination")}</span> <strong>${ue(this.effectiveLang(),e.illumination,0)}</strong></div>`:$a} ${typeof e.age=="number"?Ct`<div><span class="roxy-label">${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:b(this.effectiveLang(),e.age,1)})}</strong></div>`:$a} ${e.sign?Ct`<div><span class="roxy-label">${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:$a} ${typeof e.distance=="number"?Ct`<div><span class="roxy-label">${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:b(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:$a}</div>${e.meaning?.description&&!this.hideReadings?Ct`<p>${e.meaning.description}</p>`:$a} ${e.meaning?.keywords?.length&&!this.hideReadings?Ct`<ul class="roxy-chips">${e.meaning.keywords.map(s=>Ct`<li>${s}</li>`)}</ul>`:$a}</article>`}renderListItem(e){let t=el(e.date),r="illumination"in e&&t!==void 0?{illumination:e.illumination,waxing:t}:Sp(e.date);return Ct`<div class="list-item" role="listitem">${r?Wt(this,r,vb):Ct`<span></span>`} <span>${e.phase}</span> <span>${C(this.effectiveLang(),e.date)}</span> ${"sign"in e?this.renderSign(e.sign):$a}</div>`}renderSign(e){let t=N(e);return t?Ct`<span class="roxy-glyph" role="img" lang="en" aria-label="${e}">${t}</span>`:Ct`<span lang="en">${e}</span>`}};wr.endpoints=dd,wr.styles=[u,Za,fb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.label{text-transform:capitalize}.stats{gap:var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:repeat(auto-fit,minmax(min(100%,14ch),1fr));display:grid}.stats .roxy-label{display:block}.stats strong{font-variant-numeric:tabular-nums}.list-item{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);grid-template-columns:auto minmax(0,1fr);grid-auto-columns:auto;grid-auto-flow:column;display:grid}.list-item:last-child{border-block-end:0}`],m([xb({type:String,reflect:true})],wr.prototype,"mode",2),wr=m([x("roxy-moon-phase")],wr);import{css as Lb,html as na,nothing as wa}from"lit";var Gs=class extends g{renderData(a){let e=a.remedies;return na`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:a.name})}"><header class="head" part="header"><h2>${a.name}</h2>${typeof a.number=="number"?na`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:a.number})}</span>`:wa} ${a.range?na`<span class="range">${a.range}</span>`:wa}</header><dl class="roxy-facts" part="details">${a.lord?na`<div><dt>${this.t("Lord")}</dt><dd>${a.lord}</dd></div>`:wa} ${a.deity?na`<div><dt>${this.t("Deity")}</dt><dd>${a.deity}</dd></div>`:wa} ${a.symbol?na`<div><dt>${this.t("Symbol")}</dt><dd>${a.symbol}</dd></div>`:wa}</dl>${a.characteristics&&!this.hideReadings?na`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${a.characteristics}</p></div>`:wa} ${e&&!this.hideReadings?na`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?na`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:wa} ${e.gemstones?na`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:wa} ${e.rituals?na`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:wa}</div></div>`:wa}</article>`}};Gs.endpoints=pd,Gs.styles=[u,se,Lb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.number{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.section h3{margin-block-end:var(--roxy-space-xs)}.section p,.remedy{font-size:var(--roxy-text-sm)}.remedies{gap:var(--roxy-space-xs);display:grid}.remedy strong{color:var(--roxy-secondary)}`],Gs=m([x("roxy-nakshatra-card")],Gs);import{css as Gb,html as G,nothing as Se}from"lit";import{css as $b,html as Tt,nothing as Yt}from"lit";var Is=class extends g{rows(){let a=this.data;if(!a)return[];let e=(a.planets??[]).map(r=>({name:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),longitude:r.longitude,latitude:r.latitude,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,dignity:r.dignity})),t=[["Ascendant",a.ascendant],["Midheaven",a.midheaven],["Part of Fortune",a.partOfFortune],["Vertex",a.vertex]];for(let[r,s]of t)s&&e.push({name:r,label:this.t(r),sign:s.sign,signLabel:y(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:true});return e}renderData(a){if(!a.planets)return this.renderEmpty();let e=this.rows(),t=a.birthDetails,r=e.some(o=>Number.isFinite(o.latitude)),s=e.some(o=>o.sect),i=["latitude","longitude","timezone"];return Tt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${t?Tt`<div part="details"><p class="roxy-label">${U(this.effectiveLang(),t.date,t.time,true)}</p><dl class="roxy-facts">${i.map(o=>Tt`<div><dt>${re(this.effectiveLang(),o)}</dt><dd>${b(this.effectiveLang(),t[o],5)}</dd></div>`)}</dl></div>`:Yt}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${r?Tt`<th scope="col">${re(this.effectiveLang(),"latitude")}</th>`:Yt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?Tt`<th scope="col">${this.t("Sect")}</th>`:Yt}</tr></thead><tbody>${e.map(o=>{let l=w(o.name)??"",c=o.sect==="day"?this.t("Daytime"):o.sect==="night"?this.t("Night"):"",d=N(o.sign)??"",h=typeof o.speed=="number"?b(this.effectiveLang(),o.speed,6):"";return Tt`<tr class="${o.isPoint?"point":""}"><td class="body">${l?Tt`<span class="glyph roxy-glyph">${l}</span>`:Yt}${o.label}</td><td>${d?Tt`<span class="glyph roxy-glyph">${d}</span>`:Yt}${o.signLabel??""}</td><td>${typeof o.longitude=="number"?tt(o.longitude,o.signLabel):""}</td><td>${typeof o.longitude=="number"?`${b(this.effectiveLang(),o.longitude,5)}\xB0`:Yt}</td>${r?Tt`<td>${typeof o.latitude=="number"?`${b(this.effectiveLang(),o.latitude,5)}\xB0`:Yt}</td>`:Yt}<td>${typeof o.house=="number"?o.house:""}</td><td class="dignity">${o.dignity?M(o.dignity):""}</td><td>${h?Tt`${h}${this.t("\xB0/day")}`:Yt} ${o.isRetrograde?Tt`<span class="retro roxy-glyph">${De}</span>`:Yt}</td>${s?Tt`<td>${c}</td>`:Yt}</tr>`})}</tbody></table></div>${a.houses?.length?Tt`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${a.houses.map(o=>Tt`<tr><th scope="row">${b(this.effectiveLang(),o.number,0)}</th><td>${y(o,"sign")}</td><td>${tt(o.longitude,y(o,"sign"))}</td><td>${b(this.effectiveLang(),o.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:Yt}</div>`}};Is.endpoints=Md,Is.styles=[u,se,$b`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],Is=m([x("roxy-western-planets-table")],Is);import{property as Ib,state as Fb}from"lit/decorators.js";import{ifDefined as wm}from"lit/directives/if-defined.js";import{unsafeHTML as Bb}from"lit/directives/unsafe-html.js";var Zl=540,O=Zl/2,Ln=220,Jl=202,Qn=174,Jn=144,wb=232,Xl=249,ei={glyph:14,degree:7},kb=.95,Sb=28,Rb=13,Co=84;function Ql(n){return(n.houses??[]).length===12}function Cb(n){let a=n.midheaven?.longitude;return typeof a=="number"?a:null}function zt(n,a){return 180+n.ascendant-a}function $m(n,a={}){let e={data:n,t:ha(a.lang),locale:a.lang,size:a.typeSize??ei,ascendant:n.ascendant?.longitude??0,hasCusps:Ql(n)},t=n.planets??[];return k`<svg class="natal-wheel" xmlns=${pa} viewBox=${`0 0 ${Zl} ${Zl}`} part="chart" role="img" aria-label=${e.hasCusps?e.t("Natal chart wheel with twelve houses, planets, and aspects"):e.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}><title>${e.t("Natal chart wheel")}</title><desc>${e.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc>
105
- <circle class="wheel-line" cx=${O} cy=${O} r=${Ln} stroke-width="1.5" />
106
- <circle class="wheel-line" cx=${O} cy=${O} r=${Jl-14} stroke-width="0.8" />
107
- <circle class="wheel-line" cx=${O} cy=${O} r=${Qn} stroke-width="1" />
108
- <circle class="wheel-line" cx=${O} cy=${O} r=${Co} stroke-width="0.5" />
109
- ${Mb(e)} ${Db(e)} ${Ab(e)}
110
- ${Pb(e)} ${_b(e)}
111
- ${zb(e,t,n.aspects??[])} ${Nb(e,t)}
112
- ${Tb(e)}
113
- </svg>`.markup}function Tb(n){let a=n.ascendant,e=Cb(n.data),t=[{longitude:a,label:n.t("ASC")},{longitude:Fn(a),label:n.t("DSC")}];e!==null&&(t.push({longitude:e,label:n.t("MC")}),t.push({longitude:Fn(e),label:n.t("IC")}));let r=n.data?.partOfFortune?.longitude;typeof r=="number"&&t.push({longitude:At(r),label:n.t("PoF")});let s=n.data?.vertex?.longitude;return typeof s=="number"&&t.push({longitude:At(s),label:n.t("Vtx")}),jt(t,i=>i.longitude,Mt(Sb,Xl)).map(({item:i,longitude:o,displayLongitude:l})=>Eb(n,o,l,i.label))}function Eb(n,a,e,t){let r=zt(n,a),s=zt(n,e),i=E(O,O,Ln,r),o=E(O,O,wb,r),l=E(O,O,Xl,s),c=Math.abs(e-a)>.5,d=E(O,O,Xl-8,s);return k`
101
+ ${e}${o}`}renderSpokes(e){let t=e.map((s,i)=>({b:s,i})),r=_t(yb*fb,Rm);return jt(t,({b:s})=>s.azimuth,r).map(({item:s,displayLongitude:i})=>{let{b:o,i:l}=s,c=Ur(o.planet,l),d=o.aboveHorizon===false,p=Ha(o.azimuth,mb),h=Ha(i,Rm),u=w(o.planet)??y(o,"planet"),v=`${o.altitude>0?"+":""}${Math.round(o.altitude)}\xB0`;return Do`<g>
102
+ <line class=${`spoke${d?" below":""}`} stroke=${c} x1=${qt} y1=${qt} x2=${p.x} y2=${p.y}><title>${this.t("{{planet}} {{direction}} {{azimuth}}\xB0 altitude {{altitude}}",{planet:y(o,"planet"),direction:o.compassDirection,azimuth:Math.round(o.azimuth),altitude:v})}</title></line>
103
+ <text class=${`body-glyph roxy-glyph${d?" below":""}`} fill=${c} x=${h.x} y=${h.y} text-anchor="middle" dominant-baseline="central">${u}</text>
104
+ </g>`})}renderList(e){if(e.length===0)return Jl;let t=this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.");return Ln`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t}"><table><caption class="roxy-sr-only">${t}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=Ur(r.planet,s),o=r.aboveHorizon===false;return Ln`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${i}`}"></span> ${Fe(w(r.planet))}${y(r,"planet")}</span></td><td>${r.compassDirection}</td><td class="num">${Math.round(r.azimuth)}°</td><td class="num">${r.altitude>0?"+":""}${Math.round(r.altitude)}°</td><td><span class="${`horizon ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};_s.endpoints=hd,_s.styles=[f,He,hb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,30rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border) 10%, transparent);stroke:var(--roxy-border);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border);stroke-width:.5px}.tick{stroke:var(--roxy-secondary);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold)}.body-glyph.below{opacity:.45}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td).num{text-align:end}.body-cell{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.body-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0}.horizon.up{color:var(--roxy-success-fg)}.horizon.down{color:var(--roxy-muted)}.summary{font-size:var(--roxy-text-sm)}`],_s=m([x("roxy-local-space-compass")],_s);import{css as bb,html as ja,nothing as ec}from"lit";import{property as Ns,state as zs}from"lit/decorators.js";var Ve=class extends Ua{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=false;this.isLoading=false;this.highlight=-1;this.error=null;this.debouncedFetch=go(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=false,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=false)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=false)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=Or(this.publishableKey??this.apiKey);t&&!this.refusal&&Js(this,t,{warn:true}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=true;try{let r=await this.search(e,t.signal);if(t.signal.aborted)return;this.error=null,this.results=r.cities??[],this.isOpen=true,this.highlight=this.results.length>0?0:-1}catch(r){if(r?.name==="AbortError")return;this.results=[],this.isOpen=false,this.highlight=-1,this.error=r instanceof Error?r.message:String(r)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=false)}}async search(e,t){if(!this.endpoint&&this.submitUrl)return qa({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:e,limit:8}},t);let r=new URL(this.endpoint||`${en}/location/search`,document.baseURI);r.searchParams.set("q",e),r.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(s["X-API-Key"]=i);let o=await fetch(r,{headers:s,signal:t});if(!o.ok)throw new Error(await mp(o));return await o.json()}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=false,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:true,composed:true}))}render(){return ja`${this.renderFontStyle()}${this.renderBody()}`}renderBody(){return this.refusal?ja`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:ja`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=true)}}"> ${this.isLoading?ja`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:ec} ${this.isOpen?ja`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?ja`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>ja`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?ja`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:ec}</div>${this.error?ja`<p class="search-error" role="alert">${this.t(this.error)}</p>`:ec}`}};Ve.styles=[f,mo,bb`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],m([Ns({type:String,attribute:"api-key"})],Ve.prototype,"apiKey",2),m([Ns({type:String,attribute:"publishable-key"})],Ve.prototype,"publishableKey",2),m([Ns({type:String})],Ve.prototype,"endpoint",2),m([Ns({type:String,attribute:"submit-url"})],Ve.prototype,"submitUrl",2),m([Ns({attribute:"submit-context",converter:$i})],Ve.prototype,"submitContext",2),m([Ns({type:String})],Ve.prototype,"placeholder",2),m([Ns({type:String,attribute:"default-value"})],Ve.prototype,"defaultValue",2),m([zs()],Ve.prototype,"query",2),m([zs()],Ve.prototype,"results",2),m([zs()],Ve.prototype,"isOpen",2),m([zs()],Ve.prototype,"isLoading",2),m([zs()],Ve.prototype,"highlight",2),m([zs()],Ve.prototype,"refusal",2),m([zs()],Ve.prototype,"error",2),Ve=m([x("roxy-location-search")],Ve);import{css as vb,html as sa,nothing as $r}from"lit";var Cm={forward:"Forward",reverse:"Backward"},Os=class extends g{renderData(a){let e=this.effectiveLang();return sa`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${a.direction?sa`<span><span class="roxy-label">${this.t("Direction")}</span><b>${Cm[a.direction]?this.t(Cm[a.direction]):a.direction}</b></span>`:$r} ${typeof a.startAge=="number"?sa`<span><span class="roxy-label">${this.t("Starts")}</span><b>${this.ageLabel(e,a.startAge,a.startAgeMonths)}</b></span>`:$r} ${a.boundaryTerm?sa`<span><span class="roxy-label">${this.t("Counted to")}</span>${B(e,"boundaryTerm",a.boundaryTerm)}</span>`:$r} ${typeof a.daysToTerm=="number"?sa`<span><span class="roxy-label">${this.t("Days")}</span>${_(e,a.daysToTerm)}</span>`:$r} ${a.gender?sa`<span><span class="roxy-label">${this.t("Formula")}</span>${B(e,"gender",a.gender)}</span>`:$r}</div>${this.renderStrip(a,e)} ${this.renderAnnuals(a)} ${a.summary&&!this.hideReadings?sa`<p class="summary" part="section summary">${a.summary}</p>`:$r} ${er(a.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(a,e,t){let r=_(a,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:r,months:_(a,t)}):this.t("{{years}} yrs",{years:r})}renderStrip(a,e){let t=a.luckPillars??[];return t.length===0?$r:sa`<div class="strip-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(r=>sa`<div class="pillar" part="pillar"><span class="ages roxy-label">${this.t("{{start}} to {{end}}",{start:_(e,r.startAge??0),end:_(e,r.endAge??0)})}</span> <span class="god">${y(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} <span class="element-word ${kt(r.stem?.element)}">${y(r.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${y(r.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(r.startYear??""),end:String(r.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(a){let e=a.annualPillars??[];return e.length===0?$r:sa`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><ul class="roxy-chips annuals">${e.map(t=>sa`<li class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${y(t.tenGod,"name")}</span></li>`)}</ul></section>`}};Os.endpoints=md,Os.styles=[f,G,ua,vb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.strip-wrap{min-width:0;overflow-x:auto}.strip{min-width:min-content;display:flex}.pillar{gap:calc(var(--roxy-space-unit) / 2);min-inline-size:12ch;padding:var(--roxy-space-sm);text-align:center;flex:none;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.ages,.years{font-variant-numeric:tabular-nums}.ages{font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.years{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.annual .yr{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.summary{margin:0}`],Os=m([x("roxy-luck-pillars")],Os);import{css as Lb,html as me,nothing as Le}from"lit";import{property as $b}from"lit/decorators.js";var wb={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},kb={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Sb=13;function Tm(n){return"tzolkin"in n}var wr=class extends g{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),r=this.mode==="chart"&&Tm(e)?e:void 0,s=Tm(e)?e.tzolkin:e,i=s?.reading,o=i?.numberBand?wb[i.numberBand]:void 0;return me`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?me`<div class="coefficient">${_(t,s.number)}</div>`:Le}<div><p class="roxy-label">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?me`<span><span class="roxy-label">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:Le} ${s?.daySignKiche?me`<span><span class="roxy-label">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:Le}</p></div></header><div class="facts" part="details">${e.date?me`<span><span class="roxy-label">${this.t("Date")}</span><b>${C(t,e.date)}</b></span>`:Le} ${this.renderTrecena(t,s?.trecena)} ${r?this.renderHaabFact(t,r.haab):Le} ${r?.longCount?.formatted?me`<span><span class="roxy-label">${this.t("Long Count")}</span><b>${r.longCount.formatted}</b></span>`:Le} ${r?.calendarRound?me`<span><span class="roxy-label">${this.t("Calendar Round")}</span><b>${r.calendarRound}</b></span>`:Le} ${r?.yearBearer?.daySignName?me`<span><span class="roxy-label">${this.t("Year Bearer")}</span><b>${_(t,r.yearBearer.number)} ${r.yearBearer.daySignName}</b></span>`:Le} ${r?.lordOfNight?.label?me`<span><span class="roxy-label">${this.t("Lord of the Night")}</span><b>${r.lordOfNight.label}</b></span>`:Le} ${o?me`<span><span class="roxy-label">${this.t("Character of the number")}</span><b class="band">${this.t(o)}</b></span>`:Le} ${e.conventions?.correlation?me`<span><span class="roxy-label">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${B(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:Le}</div>${i?.keynote&&!this.hideReadings?me`<p class="keynote" part="reading">${i.keynote}</p>`:Le} ${this.renderLists(i)} ${this.renderInterpretation(this.sections(r,i),"mayan-day")} ${this.renderCross(t,r?.cross)} ${r?.summary&&!this.hideReadings?me`<p class="summary" part="reading">${r.summary}</p>`:Le}</article>`}renderTrecena(e,t){return t?me`<span><span class="roxy-label">${this.t("Trecena")}</span><b>${_(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:_(e,t.dayOfTrecena),total:_(e,Sb)}):Le} ${t.rulingSignName?me`· <span class="roxy-label">${this.t("Ruling sign")}</span>${t.rulingSignName}`:Le}</span>`:Le}renderHaabFact(e,t){return t?.monthName?me`<span><span class="roxy-label">${this.t("Haab")}</span><b>${_(e,t.day)} ${t.monthName}</b> ${t.monthClassic?me`(${t.monthClassic})`:Le} ${typeof t.dayOfYear=="number"?me`· <span class="roxy-label">${this.t("Day of year")}</span>${_(e,t.dayOfYear)}`:Le}</span>`:Le}renderLists(e){let t=e?.strengths??[],r=e?.challenges??[];return this.hideReadings||t.length===0&&r.length===0?Le:me`<div class="lists" part="section readings">${t.length>0?me`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>me`<li>${s}</li>`)}</ul></div>`:Le} ${r.length>0?me`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${r.map(s=>me`<li>${s}</li>`)}</ul></div>`:Le}</div>`}sections(e,t){let r=[];return t?.numberReading&&r.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&r.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&r.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&r.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&r.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),r}crossLabel(e){let t=kb[e??""];return t?this.t(t):R(e??"")}renderCross(e,t){let r=t??[];return r.length===0?Le:me`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Mayan cross")}"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${r.map(s=>me`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${_(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${_(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?me`(${s.daySignKiche})`:Le} ${s.reading&&!this.hideReadings?me`<p part="reading">${s.reading}</p>`:Le}</td></tr>`)}</tbody></table></div></section>`}};wr.endpoints=gd,wr.styles=[f,F,ga,Lb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.coefficient{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * 2.75);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.coefficient){min-width:0}.title,.block-title,p.roxy-label{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.spellings{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}span>.roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.keynote,.summary{margin:0;padding-block-start:var(--roxy-space-md)}.summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([$b({type:String,reflect:true})],wr.prototype,"mode",2),wr=m([x("roxy-mayan-day-sign")],wr);import{css as Rb,html as Tt,nothing as $a}from"lit";import{property as Cb}from"lit/decorators.js";var Tb=88,Eb=28,kr=class extends g{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let r=rn(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return Tt`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${r||this.t("Moon phase calendar")}</h2><div part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):$a}renderSingle(e){let t=e.meaning?.energy,r=t==="waxing"||t==="waning"?t==="waxing":typeof e.age=="number"?e.age<on/2:nl(e.date);return Tt`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header">${typeof e.illumination=="number"&&r!==void 0?Wt(this,{illumination:e.illumination,waxing:r},Tb):$a}<div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?Tt`<p class="roxy-label">${C(this.effectiveLang(),e.date)}</p>`:$a}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?Tt`<div><span class="roxy-label">${this.t("Illumination")}</span> <strong>${fe(this.effectiveLang(),e.illumination,0)}</strong></div>`:$a} ${typeof e.age=="number"?Tt`<div><span class="roxy-label">${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:b(this.effectiveLang(),e.age,1)})}</strong></div>`:$a} ${e.sign?Tt`<div><span class="roxy-label">${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:$a} ${typeof e.distance=="number"?Tt`<div><span class="roxy-label">${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:b(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:$a}</div>${e.meaning?.description&&!this.hideReadings?Tt`<p>${e.meaning.description}</p>`:$a} ${e.meaning?.keywords?.length&&!this.hideReadings?Tt`<ul class="roxy-chips">${e.meaning.keywords.map(s=>Tt`<li>${s}</li>`)}</ul>`:$a}</article>`}renderListItem(e){let t=nl(e.date),r="illumination"in e&&t!==void 0?{illumination:e.illumination,waxing:t}:Dp(e.date);return Tt`<div class="list-item" role="listitem">${r?Wt(this,r,Eb):Tt`<span></span>`} <span>${e.phase}</span> <span>${C(this.effectiveLang(),e.date)}</span> ${"sign"in e?this.renderSign(e.sign):$a}</div>`}renderSign(e){let t=N(e);return t?Tt`<span class="roxy-glyph" role="img" lang="en" aria-label="${e}">${t}</span>`:Tt`<span lang="en">${e}</span>`}};kr.endpoints=yd,kr.styles=[f,Xa,Rb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.label{text-transform:capitalize}.stats{gap:var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:repeat(auto-fit,minmax(min(100%,14ch),1fr));display:grid}.stats .roxy-label{display:block}.stats strong{font-variant-numeric:tabular-nums}.list-item{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);grid-template-columns:auto minmax(0,1fr);grid-auto-columns:auto;grid-auto-flow:column;display:grid}.list-item:last-child{border-block-end:0}`],m([Cb({type:String,reflect:true})],kr.prototype,"mode",2),kr=m([x("roxy-moon-phase")],kr);import{css as Db,html as na,nothing as wa}from"lit";var Is=class extends g{renderData(a){let e=a.remedies;return na`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:a.name})}"><header class="head" part="header"><h2>${a.name}</h2>${typeof a.number=="number"?na`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:a.number})}</span>`:wa} ${a.range?na`<span class="range">${a.range}</span>`:wa}</header><dl class="roxy-facts" part="details">${a.lord?na`<div><dt>${this.t("Lord")}</dt><dd>${a.lord}</dd></div>`:wa} ${a.deity?na`<div><dt>${this.t("Deity")}</dt><dd>${a.deity}</dd></div>`:wa} ${a.symbol?na`<div><dt>${this.t("Symbol")}</dt><dd>${a.symbol}</dd></div>`:wa}</dl>${a.characteristics&&!this.hideReadings?na`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${a.characteristics}</p></div>`:wa} ${e&&!this.hideReadings?na`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?na`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:wa} ${e.gemstones?na`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:wa} ${e.rituals?na`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:wa}</div></div>`:wa}</article>`}};Is.endpoints=ud,Is.styles=[f,se,Db`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.number{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.section h3{margin-block-end:var(--roxy-space-xs)}.section p,.remedy{font-size:var(--roxy-text-sm)}.remedies{gap:var(--roxy-space-xs);display:grid}.remedy strong{color:var(--roxy-secondary)}`],Is=m([x("roxy-nakshatra-card")],Is);import{css as qb,html as I,nothing as ge}from"lit";import{css as Ab,html as Et,nothing as Yt}from"lit";var Gs=class extends g{rows(){let a=this.data;if(!a)return[];let e=(a.planets??[]).map(r=>({name:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),longitude:r.longitude,latitude:r.latitude,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,dignity:r.dignity})),t=[["Ascendant",a.ascendant],["Midheaven",a.midheaven],["Part of Fortune",a.partOfFortune],["Vertex",a.vertex]];for(let[r,s]of t)s&&e.push({name:r,label:this.t(r),sign:s.sign,signLabel:y(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:true});return e}renderData(a){if(!a.planets)return this.renderEmpty();let e=this.rows(),t=a.birthDetails,r=e.some(o=>Number.isFinite(o.latitude)),s=e.some(o=>o.sect),i=["latitude","longitude","timezone"];return Et`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${t?Et`<div part="details"><p class="roxy-label">${q(this.effectiveLang(),t.date,t.time,true)}</p><dl class="roxy-facts">${i.map(o=>Et`<div><dt>${re(this.effectiveLang(),o)}</dt><dd>${b(this.effectiveLang(),t[o],5)}</dd></div>`)}</dl></div>`:Yt}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${r?Et`<th scope="col">${re(this.effectiveLang(),"latitude")}</th>`:Yt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?Et`<th scope="col">${this.t("Sect")}</th>`:Yt}</tr></thead><tbody>${e.map(o=>{let l=w(o.name)??"",c=o.sect==="day"?this.t("Daytime"):o.sect==="night"?this.t("Night"):"",d=N(o.sign)??"",p=typeof o.speed=="number"?b(this.effectiveLang(),o.speed,6):"";return Et`<tr class="${o.isPoint?"point":""}"><td class="body">${l?Et`<span class="glyph roxy-glyph">${l}</span>`:Yt}${o.label}</td><td>${d?Et`<span class="glyph roxy-glyph">${d}</span>`:Yt}${o.signLabel??""}</td><td>${typeof o.longitude=="number"?tt(o.longitude,o.signLabel):""}</td><td>${typeof o.longitude=="number"?`${b(this.effectiveLang(),o.longitude,5)}\xB0`:Yt}</td>${r?Et`<td>${typeof o.latitude=="number"?`${b(this.effectiveLang(),o.latitude,5)}\xB0`:Yt}</td>`:Yt}<td>${typeof o.house=="number"?o.house:""}</td><td class="dignity">${o.dignity?D(o.dignity):""}</td><td>${p?Et`${p}${this.t("\xB0/day")}`:Yt} ${o.isRetrograde?Et`<span class="retro roxy-glyph">${be}</span>`:Yt}</td>${s?Et`<td>${c}</td>`:Yt}</tr>`})}</tbody></table></div>${a.houses?.length?Et`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${a.houses.map(o=>Et`<tr><th scope="row">${b(this.effectiveLang(),o.number,0)}</th><td>${y(o,"sign")}</td><td>${tt(o.longitude,y(o,"sign"))}</td><td>${b(this.effectiveLang(),o.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:Yt}</div>`}};Gs.endpoints=Id,Gs.styles=[f,se,Ab`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],Gs=m([x("roxy-western-planets-table")],Gs);import{property as Yb,state as Wb}from"lit/decorators.js";import{ifDefined as Dm}from"lit/directives/if-defined.js";import{unsafeHTML as Zb}from"lit/directives/unsafe-html.js";var tc=540,O=tc/2,$n=220,rc=202,ti=174,ei=144,Pb=232,ac=249,ai={glyph:14,degree:7},Mb=.95,_b=28,Nb=13,Ao=84;function sc(n){return(n.houses??[]).length===12}function zb(n){let a=n.midheaven?.longitude;return typeof a=="number"?a:null}function Ot(n,a){return 180+n.ascendant-a}function Em(n,a={}){let e={data:n,t:ha(a.lang),locale:a.lang,size:a.typeSize??ai,ascendant:n.ascendant?.longitude??0,hasCusps:sc(n)},t=n.planets??[];return k`<svg class="natal-wheel" xmlns=${pa} viewBox=${`0 0 ${tc} ${tc}`} part="chart" role="img" aria-label=${e.hasCusps?e.t("Natal chart wheel with twelve houses, planets, and aspects"):e.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}><title>${e.t("Natal chart wheel")}</title><desc>${e.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc>
105
+ <circle class="wheel-line" cx=${O} cy=${O} r=${$n} stroke-width="1.5" />
106
+ <circle class="wheel-line" cx=${O} cy=${O} r=${rc-14} stroke-width="0.8" />
107
+ <circle class="wheel-line" cx=${O} cy=${O} r=${ti} stroke-width="1" />
108
+ <circle class="wheel-line" cx=${O} cy=${O} r=${Ao} stroke-width="0.5" />
109
+ ${Hb(e)} ${Gb(e)} ${Fb(e)}
110
+ ${Bb(e)} ${jb(e)}
111
+ ${Vb(e,t,n.aspects??[])} ${Kb(e,t)}
112
+ ${Ob(e)}
113
+ </svg>`.markup}function Ob(n){let a=n.ascendant,e=zb(n.data),t=[{longitude:a,label:n.t("ASC")},{longitude:Hn(a),label:n.t("DSC")}];e!==null&&(t.push({longitude:e,label:n.t("MC")}),t.push({longitude:Hn(e),label:n.t("IC")}));let r=n.data?.partOfFortune?.longitude;typeof r=="number"&&t.push({longitude:At(r),label:n.t("PoF")});let s=n.data?.vertex?.longitude;return typeof s=="number"&&t.push({longitude:At(s),label:n.t("Vtx")}),jt(t,i=>i.longitude,_t(_b,ac)).map(({item:i,longitude:o,displayLongitude:l})=>Ib(n,o,l,i.label))}function Ib(n,a,e,t){let r=Ot(n,a),s=Ot(n,e),i=A(O,O,$n,r),o=A(O,O,Pb,r),l=A(O,O,ac,s),c=Math.abs(e-a)>.5,d=A(O,O,ac-8,s);return k`
114
114
  <g>
115
115
  <line class="angle-tick" x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} />
116
116
  ${c?k`<line class="angle-tick" x1=${o.x} y1=${o.y} x2=${d.x} y2=${d.y} />`:""}
117
117
  <text class="angle-marker" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${t}</text>
118
118
  </g>
119
- `}function Db(n){let a=n.data?.houses??[];return(n.hasCusps?a.map(t=>t.longitude):Array.from({length:12},(t,r)=>n.ascendant+r*30)).map(t=>{let r=zt(n,t),s=E(O,O,Qn,r),i=E(O,O,Ln,r);return k`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}function Ab(n){return ke.map((a,e)=>{let t=zt(n,e*30+15),r=E(O,O,Jl,t);return k`<text class="sign-glyph roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(a)??""}</text>`})}function Pb(n){let a=n.data?.houses??[];if(n.hasCusps)return a.map((t,r)=>{let s=a[(r+1)%12],i=_i(t.longitude,s?s.longitude:t.longitude+30),o=E(O,O,Qn-12,zt(n,i));return k`<text class="house-num" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${t.number}</text>`});let e=n.ascendant;return Array.from({length:12},(t,r)=>{let s=zt(n,e+r*30+15),i=E(O,O,Qn-12,s),o=r+1;return k`<text class="house-num" x=${i.x} y=${i.y} text-anchor="middle" dominant-baseline="central">${o}</text>`})}function Mb(n){let a=[];for(let e=0;e<360;e+=5){let t=zt(n,e),r=e%30===0,s=r?Jl-14:Ln-5,i=E(O,O,s,t),o=E(O,O,Ln,t);a.push(k`<line class=${r?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${r?1:.5} />`)}return a}function _b(n){let a=n.data?.houses??[];return n.hasCusps?a.map(e=>{let t=zt(n,e.longitude),r=E(O,O,Qn+9,t);return k`<text class="cusp-deg" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${Ht(e.longitude)}</text>`}):""}function Nb(n,a){let e=n.size.degree>ei.degree,t=kb*n.size.glyph,r={width:t,height:t},s=p=>({width:((e?Pt.whole:Pt.minute)+(p?Pt.retrograde:0))*n.size.degree,height:Pt.ink*n.size.degree}),i=(p,f,v)=>{let L=s(p.isRetrograde===true),$=Jn-Pa(f,r,L,ya);return v===0?$:Math.min($,Math.max($-Rb,Co+ya+Up(f,L)))},o=Mt(t,Jn),l=s(true),c=Math.max(o,Mt(l.width,Jn-Pa(90,r,l,ya))/2),d=jt(a,p=>p.longitude,c),h=qp(d,({item:p,displayLongitude:f},v)=>{let L=zt(n,f);return{...E(O,O,i(p,L,v),L),...s(p.isRetrograde===true)}});return d.map((p,f)=>{let{item:v,longitude:L,displayLongitude:$}=p,D=zt(n,L),V=zt(n,$),Ie=E(O,O,Jn,V),vt=E(O,O,i(v,V,h[f]??0),V),la=E(O,O,Ln-4,D),Ea=E(O,O,Jn+8,V),oi=y(v,"name"),li=w(v.name)??oi,Dn=v.isRetrograde===true,yc=Ht(v.longitude),Xm=e?`${Bt(v.longitude).degree}\xB0`:yc,Jm=Math.abs($-L)>.5;return k`<g>
120
- ${Jm?k`<line class="planet-leader" x1=${la.x} y1=${la.y} x2=${Ea.x} y2=${Ea.y} />`:""}
121
- <text class="planet-glyph roxy-glyph" x=${Ie.x} y=${Ie.y} text-anchor="middle" dominant-baseline="central"><title>${oi}${Dn?` ${n.t("retrograde")}`:""} - ${yc} ${y(v,"sign")}</title>${li}</text>
122
- <text class="planet-deg" x=${vt.x} y=${vt.y} text-anchor="middle" dominant-baseline="central">${Xm}${Dn?k`<tspan class="retro roxy-glyph"> ${De}</tspan>`:""}</text>
123
- </g>`})}function zb(n,a,e){let t=new Map;for(let r of a){if(typeof r.longitude!="number")continue;let s=ft(r.name);s&&t.set(s,r.longitude)}return e.filter(Da).map(r=>{let s=t.get(ft(r.planet1)),i=t.get(ft(r.planet2));if(s===void 0||i===void 0)return"";let o=E(O,O,Co-2,zt(n,s)),l=E(O,O,Co-2,zt(n,i)),c=$t(r),{locale:d}=n,h=b(d,r.orb,1);return k`<line class=${`aspect ${Be(r)}`} style=${cn(r)} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y}><title>${y(r,"planet1")} ${y(r,"type",c)} ${y(r,"planet2")}${h?` (${n.t("Orb")} ${h}\xB0)`:""}</title></line>`})}var kr=class{constructor(a,e){this.host=a,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),a.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let a=false;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],r=Ob(this.host.renderRoot,t,this.size[e]);r!==this.size[e]&&(this.size[e]=r,a=true)}a&&this.host.requestUpdate()}};function Ob(n,a,e){let t=n?.querySelector(a);if(!t||typeof getComputedStyle!="function")return e;let r=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(r)&&r>0?r:e}var km={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},ja=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.heading="Natal chart";this.view="wheel";this.type=new kr(this,{glyph:[".planet-glyph",ei.glyph],degree:[".planet-deg",ei.degree]})}getPlanets(){return this.data?.planets??[]}renderData(e){let t=this.getPlanets(),r=e.aspects??[],s=this.view;return G`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?G`<p class="roxy-label">${U(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:Se}</header>${r.length>0?G`${mt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:true})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(e):this.renderAspectGrid(t,r)}</div>`:this.renderWheel(e)}<div class="legend" part="legend"><span>${this.t("{{label}}: {{value}}",{label:this.t("Positions"),value:b(this.effectiveLang(),t.length,0)})}</span> ${r.length>0?G`<span>${this.t("{{count}} aspects",{count:s==="grid"?r.length:r.filter(Da).length})}</span>`:Se} ${Ql(e)&&e.houseSystem?G`<span>${this.t("{{label}}: {{value}}",{label:re(this.effectiveLang(),"houseSystem"),value:F(this.effectiveLang(),"houseSystem",e.houseSystem)})}</span>`:G`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${r.length>0?G`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:Se}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(r)} ${this.renderInterpretations()}</div>`}renderWheel(e){return this.viewport.renderChartViewport(Bb($m(e,{lang:this.effectiveLang(),typeSize:this.type.size})),this.t(this.heading),this.translator)}renderAspectGrid(e,t){let r=e.map(o=>({name:o.name,label:y(o,"name")})),s=(o,l)=>[ft(o),ft(l)].sort().join("|"),i=new Map;for(let o of t)i.set(s(o.planet1,o.planet2),o);return r.length===0?G`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:G`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${r.slice(0,-1).map(o=>{let l=w(o.name)??o.label;return G`<th scope="col" class="roxy-glyph" title="${o.label}">${l}</th>`})}</tr></thead><tbody>${r.slice(1).map((o,l)=>{let c=w(o.name)??o.label;return G`<tr><th scope="row" class="roxy-glyph" title="${o.label}">${c}</th>${r.slice(0,l+1).map(d=>{let h=i.get(s(o.name,d.name));if(!h)return G`<td></td>`;let p=$t(h),f=ln(p)??y(h,"type",Te(h)),v=b(this.effectiveLang(),h.orb,1);return G`<td class="${`cell ${Be(h)}`}" title="${`${o.label} ${y(h,"type",p)} ${d.label}${v?` (${this.t("Orb")} ${v}\xB0)`:""}`}"><span class="asp roxy-glyph">${f}</span></td>`})} ${r.slice(l+1,-1).map(()=>G`<td></td>`)}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return G`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${wm(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return Se;let r=Si(e,"retrogradePlanets");return G`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?G`<ul class="roxy-chips">${e.dominantElement?G`<li>${this.t("{{label}}: {{value}}",{label:this.t("Dominant element"),value:y(e,"dominantElement")})}</li>`:Se} ${e.dominantModality?G`<li>${this.t("{{label}}: {{value}}",{label:this.t("Dominant modality"),value:y(e,"dominantModality")})}</li>`:Se}</ul>`:Se} ${t?G`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span></p>`:Se} ${r.length>0?G`<ul class="roxy-chips">${r.map(({value:s,label:i})=>{let o=w(s);return G`<li>${Fe(o)} ${i} <span class="roxy-glyph">${De}</span></li>`})}</ul>`:Se} ${t?.summary&&!this.hideReadings?G`<p>${t.summary}</p>`:Se} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return Se;let t=["Fire","Earth","Air","Water"],r=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},o=ke,l=this.data?.summary,c={};for(let v of t)c[v]={Cardinal:[],Fixed:[],Mutable:[]};let d=0;for(let v of e){let L=o.indexOf(M(v.sign??""));if(L<0)continue;let $=t[L%4],D=r[L%3],V=w(v.name)??y(v,"name");c[$]?.[D]?.push(V),d++}if(d===0)return Se;let h=v=>t.reduce((L,$)=>L+(c[$]?.[v]?.length??0),0),p=[...Object.entries(l?.elementDistribution??{}).map(([v,L])=>({label:s[M(v)]??v,count:L})),...Object.entries(l?.modalityDistribution??{}).map(([v,L])=>({label:i[M(v)]?.full??v,count:L}))],f=Object.values(l?.elementDistribution??{}).reduce((v,L)=>v+L,0);return G`${p.length?G`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:f})}</span> ${p.map(({label:v,count:L})=>G`<span>${this.t("{{label}}: {{value}}",{label:v,value:b(this.effectiveLang(),L,0)})}</span>`)}</p></section>`:Se}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:d})}</caption><thead><tr><td></td>${r.map(v=>G`<th scope="col" title="${i[v]?.full??v}">${i[v]?.abbr??v}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(v=>{let L=r.reduce(($,D)=>$+(c[v]?.[D]?.length??0),0);return G`<tr><th scope="row">${s[v]??v}</th>${r.map($=>G`<td class="roxy-glyph">${(c[v]?.[$]??[]).join(" ")}</td>`)}<td class="em-total">${L}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${r.map(v=>G`<td class="em-total">${h(v)}</td>`)}<td class="em-total">${d}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return Se;let t=[...e].sort((r,s)=>(km[r.kind]??9)-(km[s.kind]??9)||(s.tightness??0)-(r.tightness??0));return G`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(r=>this.renderPattern(r))}</section>`}renderPattern(e){let t=e.planets??[],r=e.apex?[...t].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):t;return G`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?G`<span class="roxy-chip">${e.element}</span>`:Se} ${e.modality?G`<span class="roxy-chip">${e.modality}</span>`:Se} ${e.dissociate?G`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:Se} ${typeof e.tightness=="number"?G`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:ue(this.effectiveLang(),e.tightness,0)})}</span>`:Se}</div><ul class="roxy-chips">${r.map(s=>{let i=w(s),o=!!e.apex&&s===e.apex;return G`<li class="${o?"roxy-chip apex":"roxy-chip"}">${i?G`<span class="roxy-glyph" aria-hidden="true">${i}</span>`:Se}${s}${o?G`<span>${this.t("apex")}</span>`:Se}</li>`})}</ul>${e.interpretation&&!this.hideReadings?G`<p class="pattern-interp">${e.interpretation}</p>`:Se}</div>`}renderAspectDetails(e){return e.length===0?Se:G`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${wm(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let r=t.interpretation,s=w(t.name)??"",i=y(t,"name"),o=r.summary||r.detailed||"",l=r.summary?r.detailed:void 0;return{glyph:s,label:i,aside:`${y(t,"sign")} ${Ht(t.longitude)}`,body:o,extra:G`${l?G`<p>${l}</p>`:Se} ${Gr(r.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}};ja.endpoints=hd,ja.styles=[u,He,dn,et,z,K,Dp,Gb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],m([Ib({type:String})],ja.prototype,"heading",2),m([Fb()],ja.prototype,"view",2),ja=m([x("roxy-natal-chart")],ja);import{css as Hb,html as S,nothing as T}from"lit";import{property as jb}from"lit/decorators.js";var Kb=new Set([11,22,33]),Vb=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Sr=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(Ub[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,To(e.number,e.type))} ${e.meaning?.description&&r?S`<p>${e.meaning.description}</p>`:T} ${e.calculation?S`<pre class="calc" part="calculation">${e.calculation}</pre>`:T} ${e.hasKarmicDebt&&e.karmicDebtNumber?S`<div class="karmic" part="section karmic-debt"><strong>${this.t("Karmic debt")} ${e.karmicDebtNumber}.</strong> ${r?qb(e.karmicDebtMeaning):""}</div>`:T} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,To(e.number,e.type))} ${e.dailyMessage&&r?S`<p>${e.dailyMessage}</p>`:T} ${e.meaning?.description&&r?S`<p>${e.meaning.description}</p>`:T} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?S`<p>${e.guidance}</p>`:T}<dl class="roxy-facts" part="details">${this.attr(this.t("Date"),C(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),ec(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),ec(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?S`<p>${e.focus}</p>`:T}<dl class="roxy-facts" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),ec(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?S`<p class="roxy-label">${e.cycle}</p>`:T} ${e.forecast&&r?S`<p>${e.forecast}</p>`:T} ${r?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):T} ${e.advice&&r?S`<p>${e.advice}</p>`:T}</article>`}renderChart(e,t){let r=Object.entries(e.coreNumbers??{}).filter(([,d])=>d),s=e.additionalInsights,i=e.luckyAssociations,o=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="roxy-label">${t}</p>${e.profile?.name?S`<h2>${e.profile.name}</h2>`:T} ${e.profile?.birthdate?S`<p class="roxy-label">${C(this.effectiveLang(),e.profile.birthdate)}</p>`:T}</div>${e.summary&&c?S`<p>${e.summary}</p>`:T} ${r.length>0?S`<div class="cores" part="details cores">${r.map(([d,h])=>S`<div class="item"><div class="core-head"><span class="core-key">${R(d)}</span> <strong>${h.number??""}</strong></div>${h.meaning?.title?S`<span class="core-title">${h.meaning.title}</span>`:T} ${To(h.number,h.type)?S`<span class="master roxy-chip">${this.t("Master")} ${h.number}</span>`:T}</div>`)}</div>`:T} ${this.renderInterpretation(r.map(([d,h])=>({label:R(d),aside:[h.number!=null?`${h.number}`:"",To(h.number,h.type)?"master":"",h.hasKarmicDebt&&h.karmicDebtNumber?`karmic debt ${h.karmicDebtNumber}`:""].filter(Boolean).join(" \xB7 "),body:h.meaning?.description??"",extra:this.renderReading(h.meaning,`numerology-core-${d}`)})),"numerology-cores","Core numbers")} ${l?S`<dl class="roxy-facts" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:T} ${o?S`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${o.title?S`<h4>${[o.day?this.t("Day {{day}}",{day:o.day}):"",o.title].filter(Boolean).join(" \xB7 ")}</h4>`:T} ${o.description&&c?S`<p>${o.description}</p>`:T} ${this.renderReading(o,"numerology-birth-day-profile")}</section>`:T} ${s?this.renderInsights(s):T} ${i?S`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="roxy-facts">${this.attr(this.t("Day"),i.day)} ${this.attr(this.t("Element"),i.element)} ${this.attr(this.t("Ruling planet"),i.rulingPlanet)} ${this.attr(this.t("Colors"),i.colors?.join(", "))} ${this.attr(this.t("Gemstones"),i.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),i.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),i.incompatibleNumbers?.join(", "))}</dl></section>`:T}</article>`}renderInsights(e){let t=e.karmicLessons,r=e.karmicDebt,s=e.personalYear,i=e.hiddenPassion,o=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),d=!this.hideReadings;return S`${t?S`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?S`<ul class="roxy-chips">${t.missingNumbers.map(h=>S`<li>${this.t("Missing")} ${h}</li>`)}</ul>`:S`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?S`<ul class="roxy-chips">${c.map(([h,p])=>S`<li>${h} x ${p}</li>`)}</ul>`:T} ${this.renderInterpretation((t.lessons??[]).map(h=>({label:h.lesson??`Lesson ${h.number}`,aside:h.number!=null?`${h.number}`:"",body:h.description??"",extra:h.howToOvercome?S`<p><strong>${this.t("How to overcome")}.</strong> ${h.howToOvercome}</p>`:T})),"numerology-karmic-lessons","Lessons")}</section>`:T}${r?.hasKarmicDebt?S`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${r.debtNumbers?.length?S`<ul class="roxy-chips">${r.debtNumbers.map(h=>S`<li>${this.t("Debt")} ${h}</li>`)}</ul>`:T} ${this.renderInterpretation((r.meanings??[]).map(h=>({label:`${this.t("Karmic debt")} ${h.number}`,body:h.description??"",extra:S`${h.challenge?S`<p><strong>${this.t("Challenge")}.</strong> ${h.challenge}</p>`:T}${h.resolution?S`<p><strong>${this.t("Resolution")}.</strong> ${h.resolution}</p>`:T}`})),"numerology-karmic-debt","Debts")}</section>`:T}${s?S`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4>${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" \xB7 ")}</h4>${s.forecast&&d?S`<p>${s.forecast}</p>`:T} ${d?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):T} ${s.advice&&d?S`<p>${s.advice}</p>`:T} ${s.personalMonth?S`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" \xB7 ")}.</strong> ${d?s.personalMonth.focus??"":""}</p>`:T}</section>`:T}${e.pinnacles?.length&&d?S`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(h=>({label:[h.position!=null?`Pinnacle ${h.position}`:"Pinnacle",h.meaning?.title??""].filter(Boolean).join(" \xB7 "),aside:[h.number!=null?`${h.number}`:"",Sm(h.startAge,h.endAge)].filter(Boolean).join(" \xB7 "),body:h.meaning?.description??"",extra:this.renderLists(["Opportunities",h.meaning?.opportunities],["Challenges",h.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:T}${e.challenges?.length&&d?S`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(h=>({label:[h.position!=null?`Challenge ${h.position}`:"Challenge",h.meaning?.title??""].filter(Boolean).join(" \xB7 "),aside:[h.number!=null?`${h.number}`:"",Sm(h.startAge,h.endAge)].filter(Boolean).join(" \xB7 "),body:h.meaning?.description??"",extra:S`${h.meaning?.lesson?S`<p><strong>${this.t("Lesson")}.</strong> ${h.meaning.lesson}</p>`:T}${h.meaning?.howToOvercome?S`<p><strong>${this.t("How to overcome")}.</strong> ${h.meaning.howToOvercome}</p>`:T}`})),"numerology-challenges","Obstacle periods")}</section>`:T}${i||o?S`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${i?S`<div><h4>${[i.number!=null?this.t("Hidden passion {{number}}",{number:i.number}):this.t("Hidden passion"),i.title??""].filter(Boolean).join(" \xB7 ")}</h4>${i.description&&d?S`<p>${i.description}</p>`:T} ${typeof i.count=="number"?S`<p class="roxy-label">${this.t("Appears {{count}} times in the name",{count:i.count})}</p>`:T}</div>`:T} ${o?S`<div><h4>${[o.number!=null?this.t("Subconscious self {{number}}",{number:o.number}):this.t("Subconscious self"),o.title??""].filter(Boolean).join(" \xB7 ")}</h4>${o.description&&d?S`<p>${o.description}</p>`:T} ${o.uniqueNumbers?.length?S`<p class="roxy-label">${this.t("Numbers present: {{list}}",{list:Xe(this.effectiveLang(),o.uniqueNumbers.map(String))})}</p>`:T}</div>`:T}</section>`:T}${l&&d?S`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:tc(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:tc(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:tc(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:T}`}renderHero(e,t,r,s=false){return S`<div class="hero" part="header">${typeof t=="number"?S`<div class="numeral">${t}</div>`:T}<div><p class="roxy-label">${e}</p>${r?S`<h2>${r}</h2>`:T} ${s?S`<span class="master roxy-chip">${this.t("Master number")}</span>`:T}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return T;let r=Vb.map(([s,i])=>({label:i,body:e[s]??""}));return S`${e.keywords?.length?S`<ul class="roxy-chips">${e.keywords.map(s=>S`<li>${s}</li>`)}</ul>`:T}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(r,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,r])=>r&&r.length>0);return t.length===0?T:S`<div class="lists">${t.map(([r,s])=>S`<div><h3>${this.t(r)}</h3><ul>${(s??[]).map(i=>S`<li>${i}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?T:S`<div><dt>${e}</dt><dd>${t}</dd></div>`}};Sr.endpoints=md,Sr.styles=[u,z,se,K,Hb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.master{margin-block-start:var(--roxy-space-xs)}.calc{color:var(--roxy-muted);font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.cores{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));padding-block-start:var(--roxy-space-md);display:grid}.cores .item{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.cores .item .core-key{color:var(--roxy-muted);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.cores .item .core-title{font-size:var(--roxy-text-xs)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.sub{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.sub p{font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.karmic{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.karmic strong{color:var(--roxy-warning-fg);font-weight:var(--roxy-weight-bold)}`],m([jb({type:String,reflect:true})],Sr.prototype,"type",2),Sr=m([x("roxy-numerology-card")],Sr);var Ub={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function qb(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function To(n,a){return a==="master"||n!==void 0&&Kb.has(n)}function ec(n,a){return[n!=null?`${n}`:"",a??""].filter(Boolean).join(" \xB7 ")}function Sm(n,a){return n==null?"":a==null?`ages ${n} onward`:`ages ${n} to ${a}`}function tc(n,a){return[n??"",a!=null?`${a}`:""].filter(Boolean).join(" \xB7 ")}import{css as Yb,html as ve,nothing as it}from"lit";import{property as Wb}from"lit/decorators.js";var Zb=28;function ac(...n){return n.filter(Boolean).join(" \xB7 ")}function rc(...n){return n.filter(Boolean).join(", ")}var Rr=class extends g{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,r="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],i=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],o=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return ve`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2>${this.t("Panchang")}</h2><span class="roxy-label">${t?C(this.effectiveLang(),t.date):""}</span> ${t?this.renderLocation(t.location):it}</header><table part="table"><tbody>${this.limbs(e,t).map(d=>this.renderLimbRow(d))} ${t?ve`${this.renderRow(this.t("Sunrise"),Dt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),Dt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),Dt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),Dt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:r?ve`${this.renderRow(this.t("Sun"),this.formatLongitude(r.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(r.moonLongitude))}`:it}</tbody></table>${t?this.renderTransitions(t.transitions):it} ${c?ve`<h3 class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</h3><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(d=>!!d[1]),...i])}</tbody></table><h3 class="section" part="section inauspicious">${this.t("Inauspicious periods")}</h3><table part="table inauspicious"><tbody>${this.renderPeriodRows([...o.filter(d=>!!d[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:it}</div>`}limbs(e,t){let r=e.tithi,s=e.nakshatra,i=e.yoga,o=e.karana,l=[{label:this.t("Tithi"),value:rc(r?.name,r?.paksha?`${r.paksha} paksha`:void 0),moon:zn(r?.number),meta:ac(r?.rulingPlanet?`Ruled by ${r.rulingPlanet}`:void 0,r?.deity?`Deity ${r.deity}`:void 0,r?.element,typeof r?.percent=="number"?`${ue(this.effectiveLang(),r.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:rc(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:ac(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:i?.name??"",meta:i?.characteristics??""},{label:this.t("Karana"),value:rc(o?.name,o?.type),meta:o?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:Nn(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return ve`<tr><th>${e.label}</th><td>${e.moon?Wt(this,e.moon,Zb):it}${e.value}${e.meta?ve`<small>${e.meta}</small>`:it}</td></tr>`}renderRow(e,t){return t?ve`<tr><th>${e}</th><td>${t}</td></tr>`:it}renderTransitions(e){return e?ve`<h3 class="section" part="section transitions">${this.t("Next transitions")}</h3><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:it}renderPeriodRows(e){return e.map(([t,r])=>{let s=da(this.effectiveLang(),r);return s?ve`<tr><th>${t}</th><td>${s}</td></tr>`:it})}expandWindows(e,t){return!t||t.length===0?[]:t.map((r,s)=>[t.length>1?`${e} ${s+1}`:e,r])}renderBhadraRow(e){if(!e)return it;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return it;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Panchaka")}</th><td>${e.active?ve`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?ve`<small>${t}</small>`:it}`:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?it:ve`<h3 class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</h3><table part="table balams"><tbody>${e?ve`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"success")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:it} ${t?ve`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"success")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"danger")}</td></tr>`:it}</tbody></table>`}renderChips(e,t){return e?.length?ve`<ul class="roxy-chips">${e.map(r=>ve`<li class="roxy-chip" data-tone="${t}">${r}</li>`)}</ul>`:ve`<span class="quiet">${this.t("None")}</span>`}renderLocation(e){return e?ve`<dl class="roxy-facts">${["latitude","longitude","timezone"].map(r=>ve`<div><dt>${re(this.effectiveLang(),r)}</dt><dd>${b(this.effectiveLang(),e[r],5)}</dd></div>`)}</dl>`:it}clock(e){let t=this.data?.date;return t&&e.slice(0,10)!==t.slice(0,10)?U(this.effectiveLang(),e):Dt(this.effectiveLang(),e)}renderTransitionRow(e,t){if(!t?.endsAt)return it;let r=this.clock(t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:r,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:r,next:t.next}):this.t("ends {{time}}",{time:r});return ve`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?ve`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:this.clock(e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:this.clock(e.changesAt)})}</td></tr>`:it}formatSpan(e,t){let r=da(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!r||!e||!t||e.slice(0,10)===t.slice(0,10)?r:this.t("{{range}} (ends {{date}})",{range:r,date:C(this.effectiveLang(),t)})}formatRashi(e){return Nn(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?ac(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=da(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?tt(e):""}};Rr.endpoints=gd,Rr.styles=[u,se,Za,Yb`.wrap{overflow:hidden}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;display:flex}h2,h3{margin:0}.head .roxy-facts{flex-basis:100%;margin:0}table{width:100%}th,td{padding-inline:var(--roxy-space-md)}th{width:38%}tbody tr:last-child :is(th,td){border-block-end:0}td>.moon-mark{margin-inline-end:var(--roxy-space-sm)}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:normal;margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}.section{padding:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border)}.quiet{color:var(--roxy-muted)}.roxy-chips{margin-block-start:var(--roxy-space-xs)}`],m([Wb({type:String,reflect:true})],Rr.prototype,"detail",2),Rr=m([x("roxy-panchang-table")],Rr);import{css as Xb,html as Ne,nothing as Ot}from"lit";import{property as Jb}from"lit/decorators.js";var Cr=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),r=t.cols;return Ne`<div class="wrap" part="card"><header part="header"><h2>${this.heading||t.title}</h2>${t.badges.length?Ne`<ul class="roxy-chips" part="details">${t.badges.map(s=>Ne`<li>${this.t("{{label}}: {{value}}",{label:s.label,value:s.value})}</li>`)}</ul>`:Ot}</header>${t.summary&&!this.hideReadings?Ne`<p class="summary">${t.summary}</p>`:Ot}<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t.title}"><table><caption class="roxy-label">${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${r.natal?Ne`<th scope="col">${this.t("Natal")}</th>`:Ot} ${r.house?Ne`<th scope="col" class="num">${this.t("House")}</th>`:Ot} ${r.motion?Ne`<th scope="col">${this.t("Motion")}</th>`:Ot} ${r.formula?Ne`<th scope="col">${this.t("Formula")}</th>`:Ot}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,r))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let r=w(e.body??e.label);return Ne`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${r?Ne`<span class="glyph roxy-glyph">${r}</span>`:Ot}${e.label}</td><td>${this.signCell(e.sign,e.degree,e.signLabel)}</td>${t.natal?Ne`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Ne`—`}</td>`:Ot} ${t.house?Ne`<td class="num">${e.house!=null?e.house:Ne`—`}</td>`:Ot} ${t.motion?Ne`<td>${e.speed!=null?Ne`${b(this.effectiveLang(),e.speed,3)}${this.t("\xB0/day")}${e.isRetrograde?Ne`<span class="retro roxy-glyph">${De}</span>`:Ot}`:Ne`—`}</td>`:Ot} ${t.formula?Ne`<td class="formula">${e.formula??Ne`—`}</td>`:Ot}</tr>`}signCell(e,t,r=e){let s=N(e);return Ne`<span class="sign">${s?Ne`<span class="sg roxy-glyph">${s}</span>`:Ot}${Zt(t)} ${r}</span>`}signFromLongitude(e){let t=Bt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(r=>r.interpretation).map(r=>({glyph:w(r.body??r.label)??"",label:r.label,aside:`${r.signLabel??r.sign} ${Zt(r.degree)}`.trim(),body:r.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:e.asteroids.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:e.lilith.map(r=>({label:this.t("{{variant}} apogee",{variant:y(r,"variant",M(r.variant))}),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${b(this.effectiveLang(),e.solarArc,2)}\xB0`},{label:this.t("Directed to"),value:C(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:false,motion:false,formula:false,natal:true},rows:e.directed.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,natalLongitude:r.natalLongitude,interpretation:r.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:M(e.sect)}]:[],summary:e.summary,cols:{house:false,motion:false,formula:true,natal:false},rows:e.lots.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,formula:r.formula,interpretation:r.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,signLabel:y(e.ascendant,"sign"),degree:e.ascendant.degree,isAngle:true}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,signLabel:y(e.midheaven,"sign"),degree:e.midheaven.degree,isAngle:true}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:C(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:b(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:[...t,...e.planets.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))]}}};Cr.endpoints=yd,Cr.styles=[u,z,K,Xb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-sm);display:grid}.summary{font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.body-cell{font-weight:var(--roxy-weight-bold)}.body-cell .glyph{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}tr.angle td{color:var(--roxy-secondary)}.sign{align-items:baseline;gap:var(--roxy-space-xs);display:inline-flex}.sign .sg{color:var(--roxy-secondary)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.formula{color:var(--roxy-muted);white-space:normal}`],m([Jb({type:String})],Cr.prototype,"heading",2),Cr=m([x("roxy-positions-table")],Cr);import{css as Qb,html as Fs,nothing as $n}from"lit";var Bs=class extends g{renderData(a){let e=N(a.profectedSign),t=w(a.lordOfYear),r=N(a.lordNatalPosition?.sign);return Fs`<div class="wrap" part="card"><header part="header"><h2>${this.t("Annual profection")}</h2>${a.targetDate?Fs`<p class="roxy-label">${this.t("For")} ${C(this.effectiveLang(),a.targetDate)}</p>`:$n}</header><div class="focus" part="details"><div class="age"><span class="n">${a.age}</span> <span class="roxy-label">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${a.profectedHouse}</span> <span class="sign">${e?Fs`<span class="sg roxy-glyph">${e}</span>`:$n}${a.profectedSign}</span></div></div><div class="lord" part="details"><span class="roxy-label">${this.t("Lord of the year")}</span> <span class="value">${t?Fs`<span class="sg roxy-glyph" aria-hidden="true">${t}</span>`:$n}${a.lordOfYear}</span> ${a.lordNatalPosition?Fs`<span class="sub">${this.t("Natal")} ${r?Fs`<span class="sg roxy-glyph" aria-hidden="true">${r}</span>`:$n}${this.t("{{sign}} \xB7 house {{house}}",{sign:a.lordNatalPosition.sign,house:a.lordNatalPosition.house})}</span>`:$n}</div>${a.interpretation&&!this.hideReadings?Fs`<p class="interp">${a.interpretation}</p>`:$n}</div>`}};Bs.endpoints=ud,Bs.styles=[u,Qb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.focus{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.age,.house{gap:calc(var(--roxy-space-unit) / 2);display:grid}.age{justify-items:center}.age .n{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.arrow{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.house .h{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.house .sign{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.sg{margin-inline-end:var(--roxy-space-xs)}.lord{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.lord .value{font-weight:var(--roxy-weight-bold)}.lord .sub{color:var(--roxy-muted)}.interp{font-size:var(--roxy-text-sm)}`],Bs=m([x("roxy-profection-card")],Bs);import{css as ev,html as ka,nothing as ti}from"lit";var Cm=["name","english","title"],tv=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]);function av(n){let a=e=>typeof e=="string"?e:void 0;return N(a(n.id))??w(a(n.id))??Ja(a(n.english))}var rv=new Set(["id","symbol",...Cm]),Rm=48;function sv(n){return R(n).toLowerCase().replace(/\s+/g,"-")}function nv(n){return Object.values(sn(n)).filter(a=>typeof a=="string"||typeof a=="number").map(String).join(" \xB7 ")}var Hs=class extends g{renderData(a){let e=sn(a),t=this.deriveTitle(e),r=av(e),s=typeof e.symbol=="string"&&new RegExp("\\p{L}","u").test(e.symbol)?e.symbol:void 0,i=Array.isArray(e.keywords)?e.keywords.map(String):[],o=[],l=[],c=[],d=(p,f,v)=>{if(f!=null){if(Array.isArray(f)){let L=f.filter($=>$!=null).map($=>typeof $=="object"?nv($):String($)).filter($=>$.length>0);L.length>0&&l.push([p,L,L.some($=>$.length>Rm)])}else if(typeof f=="string")tv.has(p)||f.length>Rm?o.push([p,f]):c.push([p,f]);else if(typeof f=="number"||typeof f=="boolean")c.push([p,String(f)]);else if(typeof f=="object"&&v<2)for(let[L,$]of Object.entries(sn(f)))d(`${p} ${L}`,$,v+1)}};for(let[p,f]of Object.entries(e))rv.has(p)||p==="keywords"&&Array.isArray(f)||d(p,f,0);let h=!this.hideReadings;return ka`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${r?ka`<span class="symbol roxy-glyph" aria-hidden="true">${r}</span>`:s?ka`<span class="symbol" aria-hidden="true">${s}</span>`:ti}<div><p class="roxy-label">${this.t("Reference")}</p><h2>${t}</h2></div></header>${i.length>0&&h?ka`<ul class="roxy-chips">${i.map(p=>ka`<li>${p}</li>`)}</ul>`:ti} ${h?o.map(([p,f])=>ka`<p class="prose"><span class="roxy-label">${re(this.effectiveLang(),p)}</span>${f}</p>`):ti} ${c.length>0?ka`<div part="details"><dl class="roxy-facts">${c.map(([p,f])=>ka`<div><dt>${re(this.effectiveLang(),p)}</dt><dd>${f}</dd></div>`)}</dl></div>`:ti} ${l.map(([p,f,v])=>v&&!h?ti:ka`<div class="list" part="section ${sv(p)}"><h3>${re(this.effectiveLang(),p)}</h3><ul class="roxy-chips">${f.map(L=>ka`<li>${L}</li>`)}</ul></div>`)}</article>`}deriveTitle(a){for(let r of Cm)if(typeof a[r]=="string")return a[r];let e=typeof a.type=="string"?R(a.type):"",t=a.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Hs.endpoints=fd,Hs.styles=[u,se,ev`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);flex:none;line-height:1}.prose .roxy-label{margin-block-end:calc(var(--roxy-space-unit) / 2);display:block}.list h3{margin-block-end:var(--roxy-space-xs)}.roxy-facts{margin:0}`],Hs=m([x("roxy-reference-card")],Hs);import{css as iv,html as ia,nothing as ai}from"lit";import{ifDefined as ov}from"lit/directives/if-defined.js";var Tm=n=>w(n)??"",js=class extends g{renderData(a){let e=a.changes,t=["latitude","longitude"];return ia`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${ov(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${a}"></roxy-natal-chart><section class="changes" part="card changes"><h2>${this.t("What changes at this location")}</h2>${a.relocation?ia`<dl class="roxy-facts" part="details">${t.map(r=>ia`<div><dt>${re(this.effectiveLang(),r==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${b(this.effectiveLang(),a.relocation[r],5)}</dd></div>`)}</dl>`:ai}<div class="move" part="details">${typeof e?.distanceKm=="number"?ia`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:_(this.effectiveLang(),e.distanceKm),direction:e.direction?F(this.effectiveLang(),"direction",M(e.direction),e.direction):""})}</span>`:ai} ${e?ia`<span>${a.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:y(a.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:y(a.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:ai}</div>${a.interpretation?.summary&&!this.hideReadings?ia`<p class="summary">${a.interpretation.summary}</p>`:ai} ${e?.angularPlanets?.length?ia`<section part="section angular-planets"><h3>${this.t("Angular planets here")}</h3><ul class="roxy-chips">${Si(e,"angularPlanets").map(({value:r,label:s})=>ia`<li>${Tm(r)} ${s}</li>`)}</ul></section>`:ai}<section part="section house-changes"><h3>${this.t("Planets that change house")}</h3>${e?.planetsChangedHouse?.length?ia`<ul class="moves-list">${e.planetsChangedHouse.map(r=>ia`<li>${Tm(r.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(r,"planet"),from:r.natalHouse,to:r.relocatedHouse})}</li>`)}</ul>`:ia`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</section></section></div>`}};js.endpoints=xd,js.styles=[u,se,iv`.stack{gap:var(--roxy-space-md);display:grid}.changes{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.changes section{gap:var(--roxy-space-xs);display:grid}.move{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.summary,.moves-list{font-size:var(--roxy-text-sm)}.moves-list{gap:calc(var(--roxy-space-unit) / 2);margin:0;padding:0;list-style:none;display:grid}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],js=m([x("roxy-relocation-wheel")],js);import{css as cv,html as Do}from"lit";import{property as wn}from"lit/decorators.js";function lv(n,a){let e=atob(n),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t],{type:a})}var Eo=class{constructor(a,e){this.host=a;this.type=e;this.revokedOnDisconnect=false;a.addController(this)}urlFor(a){return this.url&&this.source===a?this.url:(this.revoke(),this.url=URL.createObjectURL(lv(a,this.type)),this.source=a,this.url)}hostConnected(){this.revokedOnDisconnect&&(this.revokedOnDisconnect=false,this.host.requestUpdate())}hostDisconnected(){this.revokedOnDisconnect=this.url!==void 0,this.revoke()}revoke(){this.url&&URL.revokeObjectURL(this.url),this.url=void 0,this.source=void 0}};var dv=/[\\/:*?"<>|]+/g;function pv(n){switch(n.status){case 400:return"Check the details and try again.";case 403:return n.code==="origin_not_allowed"?"This website is not allowed to use this key.":void 0;case 429:return"Too many requests. Try again shortly.";case 503:return"Busy right now. Try again in a moment.";default:return}}function hv(n){let a=Ko(n.color),e=Ko(n.accent),t={...n.name?{name:n.name}:{},...n.logo?{logo:n.logo}:{},...n.footer?{footer:n.footer}:{},...a||e?{colors:{...a?{primary:a}:{},...e?{accent:e}:{}}}:{},...hi(n.font)?{font:n.font}:{},...jd(n.theme)?{theme:n.theme}:{}};return Object.keys(t).length>0?t:void 0}var Gt=class extends g{constructor(){super(...arguments);this.format="pdf";this.pdfUrl=new Eo(this,"application/pdf");this.fitFrame=e=>{let t=e.currentTarget,r=t.contentDocument?.documentElement;if(!r)return;let s=()=>{let i=t.offsetHeight-t.clientHeight;t.style.blockSize=`${Math.ceil(r.getBoundingClientRect().height)+i}px`};s(),this.frameObserver?.disconnect(),this.frameObserver=new ResizeObserver(s),this.frameObserver.observe(r)}}ownRequest(){return{format:this.format==="html"?"html":"pdf",branding:hv({name:this.brandName,logo:this.brandLogo,footer:this.brandFooter,color:this.brandColor,accent:this.brandAccent,font:this.font,theme:this.theme}),readings:this.hideReadings?false:void 0}}disconnectedCallback(){super.disconnectedCallback(),this.frameObserver?.disconnect(),this.frameObserver=void 0}renderData(e){if(e.html)return this.renderDocument(e.html,e.title);if(!e.pdf)return this.renderEmpty();let t=(e.title||this.report||e.template).replace(dv," ");return Do`<article class="card" part="card"><h2 part="header">${e.title}</h2><a class="download" part="download" href="${this.pdfUrl.urlFor(e.pdf)}" download="${`${t}.pdf`}">${this.t("Download PDF")}</a></article>`}renderDocument(e,t){return Do`<iframe class="document" part="document" title="${t}" sandbox="allow-same-origin" srcdoc="${e}" @load="${this.fitFrame}"></iframe>`}renderLoading(){return Do`<div class="busy" role="status" aria-busy="true" part="loading"><span class="roxy-skeleton"></span><p>${this.t("Preparing your report")}</p></div>`}renderError(e){let t=pv(this.failure);return t?Do`<p class="lead" role="alert">${this.t(t)}</p>${super.renderError(e)}`:super.renderError(e)}};Gt.endpoints=bd,Gt.styles=[u,cv`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);justify-items:start;display:grid}h2{margin:0}.download{min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-lg);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);font-weight:var(--roxy-weight-bold);align-items:center;text-decoration:none;display:inline-flex}.document{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);background:var(--roxy-surface);inline-size:100%;display:block}.busy{gap:var(--roxy-space-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);display:grid}.busy .roxy-skeleton{block-size:2lh}.busy p,.lead{margin:0}.lead{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-sm)}`],m([wn({type:String})],Gt.prototype,"report",2),m([wn({type:String})],Gt.prototype,"format",2),m([wn({type:String,attribute:"brand-name"})],Gt.prototype,"brandName",2),m([wn({type:String,attribute:"brand-logo"})],Gt.prototype,"brandLogo",2),m([wn({type:String,attribute:"brand-footer"})],Gt.prototype,"brandFooter",2),m([wn({type:String})],Gt.prototype,"theme",2),Gt=m([x("roxy-report")],Gt);import{css as mv,html as kn,nothing as Ao}from"lit";var sc=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info)"},{key:"digBala",source:"Dig",color:"var(--roxy-success)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger)"}],Ks=class extends g{renderData(a){if(!a.planets?.length)return this.renderEmpty();let e=[...a.planets].sort((t,r)=>t.relativeRank-r.relativeRank);return kn`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${sc.map(t=>kn`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(a){let e=w(a.planet)??"",t=sc.map(c=>Math.max(0,a[c.key])),r=t.reduce((c,d)=>c+d,0),s=typeof a.strengthRatio=="number"&&a.strengthRatio>=1,i=s?"adequacy-badge--adequate":"adequacy-badge--weak",o=s?this.t("Adequate"):this.t("Weak"),l=b(this.effectiveLang(),a.totalRupas,2)&&b(this.effectiveLang(),a.minRequired,2)?`${b(this.effectiveLang(),a.totalRupas,2)} / ${b(this.effectiveLang(),a.minRequired,2)} R`:"";return kn`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:a.planet})}"><div class="planet-label"><span class="glyph roxy-glyph" aria-hidden="true">${e}</span> ${a.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:a.relativeRank})}">#${a.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:a.planet})}">${r>0?sc.map((c,d)=>{let h=t[d];if(h<=0)return Ao;let p=h/r*100;return kn`<div class="bar-segment" style="flex-grow:${p};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:b(this.effectiveLang(),h,1)})}"></div>`}):Ao}</div>${this.renderPhala(a)}</div><div class="pills">${l?kn`<span class="rupas-label">${l}</span>`:Ao} <span class="${`adequacy-badge ${i}`}">${o}</span></div></div>`}renderPhala(a){let e=typeof a.ishtaPhala=="number"?a.ishtaPhala:0,t=typeof a.kashtaPhala=="number"?a.kashtaPhala:0;if(e+t<=0)return Ao;let r=b(this.effectiveLang(),e,1)||"0",s=b(this.effectiveLang(),t,1)||"0";return kn`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:r,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:r})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Ks.endpoints=vd,Ks.styles=[u,I,mv`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle,.footnote{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.planet-row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:14ch minmax(0,1fr) auto;display:grid}.planet-row:last-of-type{border-block-end:0}.planet-label{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.glyph{font-size:var(--roxy-text-base);line-height:1}.bar-wrap,.pills{gap:var(--roxy-space-xs);flex-direction:column;display:flex}.pills{align-items:flex-end}.bar{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);block-size:.5lh;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration) var(--roxy-motion-easing)}.rupas-label{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;color:var(--roxy-muted);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.25lh;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success)}.phala-kashta{background:var(--roxy-danger)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs);color:var(--roxy-muted)}.adequacy-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.adequacy-badge--adequate{color:var(--roxy-success-fg)}.adequacy-badge--weak{color:var(--roxy-danger-fg)}.rank-badge{font-size:var(--roxy-text-xs);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);color:var(--roxy-muted);display:flex}.legend-swatch{aspect-ratio:1;border-radius:var(--roxy-radius-sm);flex-shrink:0;block-size:.6lh;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:12ch minmax(0,1fr)}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Ks=m([x("roxy-shadbala-table")],Ks);import{css as $v,html as Y,nothing as Re}from"lit";import{unsafeHTML as wv}from"lit/directives/unsafe-html.js";function _m(n){let a=n?.ascendant;if(!a)return;let e=ke.findIndex(t=>t.toLowerCase()===a.sign.toLowerCase());return e<0?void 0:e*30+a.degree}var ic=680,ee=ic/2,Po=204,gv=186,Em=160,Dm=258,yv=212,nc=224,Mo=86,_o={glyph:18,degree:10},uv=1.3,fv=.95,Am=8,Pm=4;function Tr(n,a){return 180+n.ascendant-a}function Nm(n,a={}){let e={t:ha(a.lang),locale:a.lang,size:a.typeSize??_o,ascendant:_m(n.person1)??0},t=n.person1?.planets??[],r=n.person2?.planets??[];return k`<svg class="synastry-wheel" xmlns=${pa} viewBox=${`0 0 ${ic} ${ic}`} part="chart" role="img" aria-label=${e.t("Dual chart wheel comparing two natal charts")}><title>${e.t("Synastry dual wheel")}</title>
124
- <circle class="wheel-line" cx=${ee} cy=${ee} r=${Po} stroke-width="1.5" />
125
- <circle class="wheel-line" cx=${ee} cy=${ee} r=${Po-32} stroke-width="0.8" />
126
- <circle class="wheel-line" cx=${ee} cy=${ee} r=${Mo} stroke-width="0.6" />
127
- ${xv(e)} ${bv(e)}
128
- ${Lv(e,t,r,n.interAspects??[])}
129
- ${Mm(e,t,Em,(s,i,o)=>Em-Pa(s,i,o,ya),"p1",1)} ${Mm(e,r,Dm,(s,i,o)=>Dm+Pa(s,i,o,ya),"p2",2)}
130
- ${vv(e,n)}
131
- </svg>`.markup}function xv(n){return Array.from({length:12},(a,e)=>{let t=Tr(n,e*30),r=E(ee,ee,Mo,t),s=E(ee,ee,Po,t);return k`<line class="wheel-line" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} stroke-width="0.6" />`})}function bv(n){return ke.map((a,e)=>{let t=Tr(n,e*30+15),r=E(ee,ee,gv,t);return k`<text class="sign roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(a)}</text>`})}function Mm(n,a,e,t,r,s){let i={width:uv*n.size.glyph,height:fv*n.size.glyph},o=d=>({width:(Pt.whole+(d.isRetrograde===true?Pt.retrograde:0))*n.size.degree,height:Pt.ink*n.size.degree}),l=Mt(i.width,e);return jt(a,d=>d.longitude,(d,h)=>Math.max(l,Mt((o(d).width+o(h).width)/2,t(90,i,o(d))))).map(({item:d,longitude:h,displayLongitude:p})=>{let f=Tr(n,p),v=E(ee,ee,e,f),L=E(ee,ee,t(f,i,o(d)),f),$=w(d.name)??y(d,"name"),D=d.isRetrograde===true,V=typeof d.house=="number"?` \xB7 ${n.t("House {{n}}",{n:d.house})}`:"",Ie=`${y(d,"name")}${D?` ${n.t("retrograde")}`:""} - ${Ht(h)} ${y(d,"sign")}${V}`,vt=Math.abs(p-h)>.5,la=E(ee,ee,e+(s===1?Am:-Am),Tr(n,h)),Ea=E(ee,ee,e+(s===1?Pm:-Pm),f);return k`<g>
132
- ${vt?k`<line class=${`leader ${r}`} x1=${la.x} y1=${la.y} x2=${Ea.x} y2=${Ea.y} />`:""}
133
- <text class=${r} x=${v.x} y=${v.y} text-anchor="middle" dominant-baseline="central"><title>${Ie}</title><tspan class="roxy-glyph">${$}</tspan><tspan class="person-tag" dy="-0.55em" dx="0.15em">${s}</tspan></text>
134
- <text class="planet-deg" x=${L.x} y=${L.y} text-anchor="middle" dominant-baseline="central">${Bt(h).degree}°${D?k`<tspan class="retro roxy-glyph"> ${De}</tspan>`:""}</text>
135
- </g>`})}function vv(n,a){let e=[a.person1,a.person2].flatMap((t,r)=>{let s=_m(t);return s===void 0?[]:[{longitude:s,index:r+1}]});return jt(e,t=>t.longitude,Mt(34,nc)).map(({item:t,longitude:r,displayLongitude:s})=>{let i=Tr(n,r),o=Tr(n,s),l=E(ee,ee,Po,i),c=E(ee,ee,yv,i),d=E(ee,ee,nc,o),h=E(ee,ee,nc-7,o);return k`<g>
119
+ `}function Gb(n){let a=n.data?.houses??[];return(n.hasCusps?a.map(t=>t.longitude):Array.from({length:12},(t,r)=>n.ascendant+r*30)).map(t=>{let r=Ot(n,t),s=A(O,O,ti,r),i=A(O,O,$n,r);return k`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.8" />`})}function Fb(n){return Se.map((a,e)=>{let t=Ot(n,e*30+15),r=A(O,O,rc,t);return k`<text class="sign-glyph roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(a)??""}</text>`})}function Bb(n){let a=n.data?.houses??[];if(n.hasCusps)return a.map((t,r)=>{let s=a[(r+1)%12],i=Oi(t.longitude,s?s.longitude:t.longitude+30),o=A(O,O,ti-12,Ot(n,i));return k`<text class="house-num" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${t.number}</text>`});let e=n.ascendant;return Array.from({length:12},(t,r)=>{let s=Ot(n,e+r*30+15),i=A(O,O,ti-12,s),o=r+1;return k`<text class="house-num" x=${i.x} y=${i.y} text-anchor="middle" dominant-baseline="central">${o}</text>`})}function Hb(n){let a=[];for(let e=0;e<360;e+=5){let t=Ot(n,e),r=e%30===0,s=r?rc-14:$n-5,i=A(O,O,s,t),o=A(O,O,$n,t);a.push(k`<line class=${r?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${r?1:.5} />`)}return a}function jb(n){let a=n.data?.houses??[];return n.hasCusps?a.map(e=>{let t=Ot(n,e.longitude),r=A(O,O,ti+9,t);return k`<text class="cusp-deg" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${Pt(e.longitude)}</text>`}):""}function Kb(n,a){let e=n.size.degree>ai.degree,t=Mb*n.size.glyph,r={width:t,height:t},s=h=>({width:((e?Mt.whole:Mt.minute)+(h?Mt.retrograde:0))*n.size.degree,height:Mt.ink*n.size.degree}),i=(h,u,v)=>{let L=s(h.isRetrograde===true),$=ei-Ma(u,r,L,ya);return v===0?$:Math.min($,Math.max($-Nb,Ao+ya+Xp(u,L)))},o=_t(t,ei),l=s(true),c=Math.max(o,_t(l.width,ei-Ma(90,r,l,ya))/2),d=jt(a,h=>h.longitude,c),p=Jp(d,({item:h,displayLongitude:u},v)=>{let L=Ot(n,u);return{...A(O,O,i(h,L,v),L),...s(h.isRetrograde===true)}});return d.map((h,u)=>{let{item:v,longitude:L,displayLongitude:$}=h,P=Ot(n,L),U=Ot(n,$),Ge=A(O,O,ei,U),$t=A(O,O,i(v,U,p[u]??0),U),la=A(O,O,$n-4,P),Ea=A(O,O,ei+8,U),di=y(v,"name"),pi=w(v.name)??di,An=v.isRetrograde===true,vc=Pt(v.longitude),sg=e?`${Ht(v.longitude).degree}\xB0`:vc,ng=Math.abs($-L)>.5;return k`<g>
120
+ ${ng?k`<line class="planet-leader" x1=${la.x} y1=${la.y} x2=${Ea.x} y2=${Ea.y} />`:""}
121
+ <text class="planet-glyph roxy-glyph" x=${Ge.x} y=${Ge.y} text-anchor="middle" dominant-baseline="central"><title>${di}${An?` ${n.t("retrograde")}`:""} - ${vc} ${y(v,"sign")}</title>${pi}</text>
122
+ <text class="planet-deg" x=${$t.x} y=${$t.y} text-anchor="middle" dominant-baseline="central">${sg}${An?k`<tspan class="retro roxy-glyph"> ${be}</tspan>`:""}</text>
123
+ </g>`})}function Vb(n,a,e){let t=new Map;for(let r of a){if(typeof r.longitude!="number")continue;let s=xt(r.name);s&&t.set(s,r.longitude)}return e.filter(Aa).map(r=>{let s=t.get(xt(r.planet1)),i=t.get(xt(r.planet2));if(s===void 0||i===void 0)return"";let o=A(O,O,Ao-2,Ot(n,s)),l=A(O,O,Ao-2,Ot(n,i)),c=wt(r),{locale:d}=n,p=b(d,r.orb,1);return k`<line class=${`aspect ${Be(r)}`} style=${dn(r)} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y}><title>${y(r,"planet1")} ${y(r,"type",c)} ${y(r,"planet2")}${p?` (${n.t("Orb")} ${p}\xB0)`:""}</title></line>`})}var Sr=class{constructor(a,e){this.host=a,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),a.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let a=false;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],r=Ub(this.host.renderRoot,t,this.size[e]);r!==this.size[e]&&(this.size[e]=r,a=true)}a&&this.host.requestUpdate()}};function Ub(n,a,e){let t=n?.querySelector(a);if(!t||typeof getComputedStyle!="function")return e;let r=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(r)&&r>0?r:e}function ri(n){let[a="",...e]=_n(n);return{body:a,extra:e.map(t=>I`<p>${t}</p>`)}}var Am={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Ka=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.heading="Natal chart";this.view="wheel";this.type=new Sr(this,{glyph:[".planet-glyph",ai.glyph],degree:[".planet-deg",ai.degree]})}getPlanets(){return this.data?.planets??[]}renderData(e){let t=this.getPlanets(),r=e.aspects??[],s=this.view;return I`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?I`<p class="roxy-label">${q(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:ge}</header>${r.length>0?I`${mt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:true})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(e):this.renderAspectGrid(t,r)}</div>`:this.renderWheel(e)}<div class="legend" part="legend"><span>${this.t("{{label}}: {{value}}",{label:this.t("Positions"),value:b(this.effectiveLang(),t.length,0)})}</span> ${r.length>0?I`<span>${this.t("{{count}} aspects",{count:s==="grid"?r.length:r.filter(Aa).length})}</span>`:ge} ${sc(e)&&e.houseSystem?I`<span>${this.t("{{label}}: {{value}}",{label:re(this.effectiveLang(),"houseSystem"),value:B(this.effectiveLang(),"houseSystem",e.houseSystem)})}</span>`:I`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${r.length>0?I`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:ge}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(r)} ${this.renderChartReading()} ${this.renderInterpretations()}</div>`}renderWheel(e){return this.viewport.renderChartViewport(Zb(Em(e,{lang:this.effectiveLang(),typeSize:this.type.size})),this.t(this.heading),this.translator)}renderAspectGrid(e,t){let r=e.map(o=>({name:o.name,label:y(o,"name")})),s=(o,l)=>[xt(o),xt(l)].sort().join("|"),i=new Map;for(let o of t)i.set(s(o.planet1,o.planet2),o);return r.length===0?I`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:I`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${r.slice(0,-1).map(o=>{let l=w(o.name)??o.label;return I`<th scope="col" class="roxy-glyph" title="${o.label}">${l}</th>`})}</tr></thead><tbody>${r.slice(1).map((o,l)=>{let c=w(o.name)??o.label;return I`<tr><th scope="row" class="roxy-glyph" title="${o.label}">${c}</th>${r.slice(0,l+1).map(d=>{let p=i.get(s(o.name,d.name));if(!p)return I`<td></td>`;let h=wt(p),u=cn(h)??y(p,"type",Ee(p)),v=b(this.effectiveLang(),p.orb,1);return I`<td class="${`cell ${Be(p)}`}" title="${`${o.label} ${y(p,"type",h)} ${d.label}${v?` (${this.t("Orb")} ${v}\xB0)`:""}`}"><span class="asp roxy-glyph">${u}</span></td>`})} ${r.slice(l+1,-1).map(()=>I`<td></td>`)}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return I`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${Dm(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return ge;let r=Ti(e,"retrogradePlanets");return I`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?I`<ul class="roxy-chips">${e.dominantElement?I`<li>${this.t("{{label}}: {{value}}",{label:this.t("Dominant element"),value:y(e,"dominantElement")})}</li>`:ge} ${e.dominantModality?I`<li>${this.t("{{label}}: {{value}}",{label:this.t("Dominant modality"),value:y(e,"dominantModality")})}</li>`:ge}</ul>`:ge} ${t?I`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span></p>`:ge} ${r.length>0?I`<ul class="roxy-chips">${r.map(({value:s,label:i})=>{let o=w(s);return I`<li>${Fe(o)} ${i} <span class="roxy-glyph">${be}</span></li>`})}</ul>`:ge} ${t?.summary&&!this.hideReadings?I`<p>${t.summary}</p>`:ge} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return ge;let t=["Fire","Earth","Air","Water"],r=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},o=Se,l=this.data?.summary,c={};for(let v of t)c[v]={Cardinal:[],Fixed:[],Mutable:[]};let d=0;for(let v of e){let L=o.indexOf(D(v.sign??""));if(L<0)continue;let $=t[L%4],P=r[L%3],U=w(v.name)??y(v,"name");c[$]?.[P]?.push(U),d++}if(d===0)return ge;let p=v=>t.reduce((L,$)=>L+(c[$]?.[v]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([v,L])=>({label:s[D(v)]??v,count:L})),...Object.entries(l?.modalityDistribution??{}).map(([v,L])=>({label:i[D(v)]?.full??v,count:L}))],u=Object.values(l?.elementDistribution??{}).reduce((v,L)=>v+L,0);return I`${h.length?I`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:u})}</span> ${h.map(({label:v,count:L})=>I`<span>${this.t("{{label}}: {{value}}",{label:v,value:b(this.effectiveLang(),L,0)})}</span>`)}</p></section>`:ge}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:d})}</caption><thead><tr><td></td>${r.map(v=>I`<th scope="col" title="${i[v]?.full??v}">${i[v]?.abbr??v}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(v=>{let L=r.reduce(($,P)=>$+(c[v]?.[P]?.length??0),0);return I`<tr><th scope="row">${s[v]??v}</th>${r.map($=>I`<td class="roxy-glyph">${(c[v]?.[$]??[]).join(" ")}</td>`)}<td class="em-total">${L}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${r.map(v=>I`<td class="em-total">${p(v)}</td>`)}<td class="em-total">${d}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return ge;let t=[...e].sort((r,s)=>(Am[r.kind]??9)-(Am[s.kind]??9)||(s.tightness??0)-(r.tightness??0));return I`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(r=>this.renderPattern(r))}</section>`}renderPattern(e){let t=e.planets??[],r=e.apex?[...t].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):t;return I`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?I`<span class="roxy-chip">${e.element}</span>`:ge} ${e.modality?I`<span class="roxy-chip">${e.modality}</span>`:ge} ${e.dissociate?I`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:ge} ${typeof e.tightness=="number"?I`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:fe(this.effectiveLang(),e.tightness,0)})}</span>`:ge}</div><ul class="roxy-chips">${r.map(s=>{let i=w(s),o=!!e.apex&&s===e.apex;return I`<li class="${o?"roxy-chip apex":"roxy-chip"}">${i?I`<span class="roxy-glyph" aria-hidden="true">${i}</span>`:ge}${s}${o?I`<span>${this.t("apex")}</span>`:ge}</li>`})}</ul>${e.interpretation&&!this.hideReadings?I`<p class="pattern-interp">${e.interpretation}</p>`:ge}</div>`}renderAspectDetails(e){return e.length===0?ge:I`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${Dm(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderChartReading(){let e=this.data?.interpretation;if(!e)return ge;let t=this.renderInterpretation([{label:this.t("Your birth chart"),...ri(e.opening)},{label:this.t("Love"),...ri(e.love)},{label:this.t("Career"),...ri(e.career)},{label:this.t("Home"),...ri(e.home)},{label:this.t("Your chart in perspective"),...ri(e.closing)}],"natal-chart-reading","Reading");return t===ge?ge:I`<div part="section interpretation">${t}</div>`}angleReading(e,t){let r=t?.interpretation;return{label:e,aside:t?`${y(t,"sign")} ${Pt(t.longitude)}`:void 0,body:r?.summary??"",extra:_n(r?.detailed).map(s=>I`<p>${s}</p>`)}}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let r=t.interpretation,s=w(t.name)??"",i=y(t,"name"),o=r.summary||r.detailed||"",l=r.summary?r.detailed:void 0;return{glyph:s,label:i,aside:`${y(t,"sign")} ${Pt(t.longitude)}`,body:o,extra:I`${l?I`<p>${l}</p>`:ge} ${Da(r.keywords)}`}});return e.splice(2,0,this.angleReading(this.t("Ascendant"),this.data?.ascendant),this.angleReading(this.t("Midheaven"),this.data?.midheaven)),this.renderInterpretation(e,"natal-planet-readings","Planet readings")}};Ka.endpoints=fd,Ka.styles=[f,He,pn,et,z,F,Np,qb`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],m([Yb({type:String})],Ka.prototype,"heading",2),m([Wb()],Ka.prototype,"view",2),Ka=m([x("roxy-natal-chart")],Ka);import{css as Xb,html as S,nothing as E}from"lit";import{property as Jb}from"lit/decorators.js";var Qb=new Set([11,22,33]),ev=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],Rr=class extends g{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(tv[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Po(e.number,e.type))} ${e.meaning?.description&&r?S`<p>${e.meaning.description}</p>`:E} ${e.calculation?S`<pre class="calc" part="calculation">${e.calculation}</pre>`:E} ${e.hasKarmicDebt&&e.karmicDebtNumber?S`<div class="karmic" part="section karmic-debt"><strong>${this.t("Karmic debt")} ${e.karmicDebtNumber}.</strong> ${r?av(e.karmicDebtMeaning):""}</div>`:E} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,Po(e.number,e.type))} ${e.dailyMessage&&r?S`<p>${e.dailyMessage}</p>`:E} ${e.meaning?.description&&r?S`<p>${e.meaning.description}</p>`:E} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?S`<p>${e.guidance}</p>`:E}<dl class="roxy-facts" part="details">${this.attr(this.t("Date"),C(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),nc(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),nc(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?S`<p>${e.focus}</p>`:E}<dl class="roxy-facts" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),nc(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let r=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?S`<p class="roxy-label">${e.cycle}</p>`:E} ${e.forecast&&r?S`<p>${e.forecast}</p>`:E} ${r?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):E} ${e.advice&&r?S`<p>${e.advice}</p>`:E}</article>`}renderChart(e,t){let r=Object.entries(e.coreNumbers??{}).filter(([,d])=>d),s=e.additionalInsights,i=e.luckyAssociations,o=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return S`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="roxy-label">${t}</p>${e.profile?.name?S`<h2>${e.profile.name}</h2>`:E} ${e.profile?.birthdate?S`<p class="roxy-label">${C(this.effectiveLang(),e.profile.birthdate)}</p>`:E}</div>${e.summary&&c?S`<p>${e.summary}</p>`:E} ${r.length>0?S`<div class="cores" part="details cores">${r.map(([d,p])=>S`<div class="item"><div class="core-head"><span class="core-key">${R(d)}</span> <strong>${p.number??""}</strong></div>${p.meaning?.title?S`<span class="core-title">${p.meaning.title}</span>`:E} ${Po(p.number,p.type)?S`<span class="master roxy-chip">${this.t("Master")} ${p.number}</span>`:E}</div>`)}</div>`:E} ${this.renderInterpretation(r.map(([d,p])=>({label:R(d),aside:[p.number!=null?`${p.number}`:"",Po(p.number,p.type)?"master":"",p.hasKarmicDebt&&p.karmicDebtNumber?`karmic debt ${p.karmicDebtNumber}`:""].filter(Boolean).join(" \xB7 "),body:p.meaning?.description??"",extra:this.renderReading(p.meaning,`numerology-core-${d}`)})),"numerology-cores","Core numbers")} ${l?S`<dl class="roxy-facts" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:E} ${o?S`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${o.title?S`<h4>${[o.day?this.t("Day {{day}}",{day:o.day}):"",o.title].filter(Boolean).join(" \xB7 ")}</h4>`:E} ${o.description&&c?S`<p>${o.description}</p>`:E} ${this.renderReading(o,"numerology-birth-day-profile")}</section>`:E} ${s?this.renderInsights(s):E} ${i?S`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="roxy-facts">${this.attr(this.t("Day"),i.day)} ${this.attr(this.t("Element"),i.element)} ${this.attr(this.t("Ruling planet"),i.rulingPlanet)} ${this.attr(this.t("Colors"),i.colors?.join(", "))} ${this.attr(this.t("Gemstones"),i.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),i.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),i.incompatibleNumbers?.join(", "))}</dl></section>`:E}</article>`}renderInsights(e){let t=e.karmicLessons,r=e.karmicDebt,s=e.personalYear,i=e.hiddenPassion,o=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),d=!this.hideReadings;return S`${t?S`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?S`<ul class="roxy-chips">${t.missingNumbers.map(p=>S`<li>${this.t("Missing")} ${p}</li>`)}</ul>`:S`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?S`<ul class="roxy-chips">${c.map(([p,h])=>S`<li>${p} x ${h}</li>`)}</ul>`:E} ${this.renderInterpretation((t.lessons??[]).map(p=>({label:p.lesson??`Lesson ${p.number}`,aside:p.number!=null?`${p.number}`:"",body:p.description??"",extra:p.howToOvercome?S`<p><strong>${this.t("How to overcome")}.</strong> ${p.howToOvercome}</p>`:E})),"numerology-karmic-lessons","Lessons")}</section>`:E}${r?.hasKarmicDebt?S`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${r.debtNumbers?.length?S`<ul class="roxy-chips">${r.debtNumbers.map(p=>S`<li>${this.t("Debt")} ${p}</li>`)}</ul>`:E} ${this.renderInterpretation((r.meanings??[]).map(p=>({label:`${this.t("Karmic debt")} ${p.number}`,body:p.description??"",extra:S`${p.challenge?S`<p><strong>${this.t("Challenge")}.</strong> ${p.challenge}</p>`:E}${p.resolution?S`<p><strong>${this.t("Resolution")}.</strong> ${p.resolution}</p>`:E}`})),"numerology-karmic-debt","Debts")}</section>`:E}${s?S`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4>${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" \xB7 ")}</h4>${s.forecast&&d?S`<p>${s.forecast}</p>`:E} ${d?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):E} ${s.advice&&d?S`<p>${s.advice}</p>`:E} ${s.personalMonth?S`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" \xB7 ")}.</strong> ${d?s.personalMonth.focus??"":""}</p>`:E}</section>`:E}${e.pinnacles?.length&&d?S`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(p=>({label:[p.position!=null?`Pinnacle ${p.position}`:"Pinnacle",p.meaning?.title??""].filter(Boolean).join(" \xB7 "),aside:[p.number!=null?`${p.number}`:"",Pm(p.startAge,p.endAge)].filter(Boolean).join(" \xB7 "),body:p.meaning?.description??"",extra:this.renderLists(["Opportunities",p.meaning?.opportunities],["Challenges",p.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:E}${e.challenges?.length&&d?S`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(p=>({label:[p.position!=null?`Challenge ${p.position}`:"Challenge",p.meaning?.title??""].filter(Boolean).join(" \xB7 "),aside:[p.number!=null?`${p.number}`:"",Pm(p.startAge,p.endAge)].filter(Boolean).join(" \xB7 "),body:p.meaning?.description??"",extra:S`${p.meaning?.lesson?S`<p><strong>${this.t("Lesson")}.</strong> ${p.meaning.lesson}</p>`:E}${p.meaning?.howToOvercome?S`<p><strong>${this.t("How to overcome")}.</strong> ${p.meaning.howToOvercome}</p>`:E}`})),"numerology-challenges","Obstacle periods")}</section>`:E}${i||o?S`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${i?S`<div><h4>${[i.number!=null?this.t("Hidden passion {{number}}",{number:i.number}):this.t("Hidden passion"),i.title??""].filter(Boolean).join(" \xB7 ")}</h4>${i.description&&d?S`<p>${i.description}</p>`:E} ${typeof i.count=="number"?S`<p class="roxy-label">${this.t("Appears {{count}} times in the name",{count:i.count})}</p>`:E}</div>`:E} ${o?S`<div><h4>${[o.number!=null?this.t("Subconscious self {{number}}",{number:o.number}):this.t("Subconscious self"),o.title??""].filter(Boolean).join(" \xB7 ")}</h4>${o.description&&d?S`<p>${o.description}</p>`:E} ${o.uniqueNumbers?.length?S`<p class="roxy-label">${this.t("Numbers present: {{list}}",{list:Xe(this.effectiveLang(),o.uniqueNumbers.map(String))})}</p>`:E}</div>`:E}</section>`:E}${l&&d?S`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:ic(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:ic(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:ic(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:E}`}renderHero(e,t,r,s=false){return S`<div class="hero" part="header">${typeof t=="number"?S`<div class="numeral">${t}</div>`:E}<div><p class="roxy-label">${e}</p>${r?S`<h2>${r}</h2>`:E} ${s?S`<span class="master roxy-chip">${this.t("Master number")}</span>`:E}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return E;let r=ev.map(([s,i])=>({label:i,body:e[s]??""}));return S`${e.keywords?.length?S`<ul class="roxy-chips">${e.keywords.map(s=>S`<li>${s}</li>`)}</ul>`:E}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(r,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,r])=>r&&r.length>0);return t.length===0?E:S`<div class="lists">${t.map(([r,s])=>S`<div><h3>${this.t(r)}</h3><ul>${(s??[]).map(i=>S`<li>${i}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?E:S`<div><dt>${e}</dt><dd>${t}</dd></div>`}};Rr.endpoints=xd,Rr.styles=[f,z,se,F,Xb`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.master{margin-block-start:var(--roxy-space-xs)}.calc{color:var(--roxy-muted);font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.cores{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));padding-block-start:var(--roxy-space-md);display:grid}.cores .item{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.cores .item .core-key{color:var(--roxy-muted);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.cores .item .core-title{font-size:var(--roxy-text-xs)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.sub{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.sub p{font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.karmic{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.karmic strong{color:var(--roxy-warning-fg);font-weight:var(--roxy-weight-bold)}`],m([Jb({type:String,reflect:true})],Rr.prototype,"type",2),Rr=m([x("roxy-numerology-card")],Rr);var tv={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function av(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function Po(n,a){return a==="master"||n!==void 0&&Qb.has(n)}function nc(n,a){return[n!=null?`${n}`:"",a??""].filter(Boolean).join(" \xB7 ")}function Pm(n,a){return n==null?"":a==null?`ages ${n} onward`:`ages ${n} to ${a}`}function ic(n,a){return[n??"",a!=null?`${a}`:""].filter(Boolean).join(" \xB7 ")}import{css as rv,html as $e,nothing as it}from"lit";import{property as sv}from"lit/decorators.js";var nv=28;function oc(...n){return n.filter(Boolean).join(" \xB7 ")}function lc(...n){return n.filter(Boolean).join(", ")}var Cr=class extends g{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,r="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],i=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],o=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return $e`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2>${this.t("Panchang")}</h2><span class="roxy-label">${t?C(this.effectiveLang(),t.date):""}</span> ${t?this.renderLocation(t.location):it}</header><table part="table"><tbody>${this.limbs(e,t).map(d=>this.renderLimbRow(d))} ${t?$e`${this.renderRow(this.t("Sunrise"),Dt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),Dt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),Dt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),Dt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:r?$e`${this.renderRow(this.t("Sun"),this.formatLongitude(r.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(r.moonLongitude))}`:it}</tbody></table>${t?this.renderTransitions(t.transitions):it} ${c?$e`<h3 class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</h3><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(d=>!!d[1]),...i])}</tbody></table><h3 class="section" part="section inauspicious">${this.t("Inauspicious periods")}</h3><table part="table inauspicious"><tbody>${this.renderPeriodRows([...o.filter(d=>!!d[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:it}</div>`}limbs(e,t){let r=e.tithi,s=e.nakshatra,i=e.yoga,o=e.karana,l=[{label:this.t("Tithi"),value:lc(r?.name,r?.paksha?`${r.paksha} paksha`:void 0),moon:In(r?.number),meta:oc(r?.rulingPlanet?`Ruled by ${r.rulingPlanet}`:void 0,r?.deity?`Deity ${r.deity}`:void 0,r?.element,typeof r?.percent=="number"?`${fe(this.effectiveLang(),r.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:lc(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:oc(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:i?.name??"",meta:i?.characteristics??""},{label:this.t("Karana"),value:lc(o?.name,o?.type),meta:o?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:On(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return $e`<tr><th>${e.label}</th><td>${e.moon?Wt(this,e.moon,nv):it}${e.value}${e.meta?$e`<small>${e.meta}</small>`:it}</td></tr>`}renderRow(e,t){return t?$e`<tr><th>${e}</th><td>${t}</td></tr>`:it}renderTransitions(e){return e?$e`<h3 class="section" part="section transitions">${this.t("Next transitions")}</h3><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:it}renderPeriodRows(e){return e.map(([t,r])=>{let s=da(this.effectiveLang(),r);return s?$e`<tr><th>${t}</th><td>${s}</td></tr>`:it})}expandWindows(e,t){return!t||t.length===0?[]:t.map((r,s)=>[t.length>1?`${e} ${s+1}`:e,r])}renderBhadraRow(e){if(!e)return it;let t=this.formatSpan(e.startsAt,e.endsAt);return $e`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:$e`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return it;let t=this.formatSpan(e.startsAt,e.endsAt);return $e`<tr><th>${this.t("Panchaka")}</th><td>${e.active?$e`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?$e`<small>${t}</small>`:it}`:$e`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?it:$e`<h3 class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</h3><table part="table balams"><tbody>${e?$e`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"success")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:it} ${t?$e`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"success")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"danger")}</td></tr>`:it}</tbody></table>`}renderChips(e,t){return e?.length?$e`<ul class="roxy-chips">${e.map(r=>$e`<li class="roxy-chip" data-tone="${t}">${r}</li>`)}</ul>`:$e`<span class="quiet">${this.t("None")}</span>`}renderLocation(e){return e?$e`<dl class="roxy-facts">${["latitude","longitude","timezone"].map(r=>$e`<div><dt>${re(this.effectiveLang(),r)}</dt><dd>${b(this.effectiveLang(),e[r],5)}</dd></div>`)}</dl>`:it}clock(e){let t=this.data?.date;return t&&e.slice(0,10)!==t.slice(0,10)?q(this.effectiveLang(),e):Dt(this.effectiveLang(),e)}renderTransitionRow(e,t){if(!t?.endsAt)return it;let r=this.clock(t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:r,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:r,next:t.next}):this.t("ends {{time}}",{time:r});return $e`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?$e`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:this.clock(e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:this.clock(e.changesAt)})}</td></tr>`:it}formatSpan(e,t){let r=da(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!r||!e||!t||e.slice(0,10)===t.slice(0,10)?r:this.t("{{range}} (ends {{date}})",{range:r,date:C(this.effectiveLang(),t)})}formatRashi(e){return On(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?oc(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=da(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?tt(e):""}};Cr.endpoints=bd,Cr.styles=[f,se,Xa,rv`.wrap{overflow:hidden}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;display:flex}h2,h3{margin:0}.head .roxy-facts{flex-basis:100%;margin:0}table{width:100%}th,td{padding-inline:var(--roxy-space-md)}th{width:38%}tbody tr:last-child :is(th,td){border-block-end:0}td>.moon-mark{margin-inline-end:var(--roxy-space-sm)}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:normal;margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}.section{padding:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border)}.quiet{color:var(--roxy-muted)}.roxy-chips{margin-block-start:var(--roxy-space-xs)}`],m([sv({type:String,reflect:true})],Cr.prototype,"detail",2),Cr=m([x("roxy-panchang-table")],Cr);import{css as iv,html as Ne,nothing as It}from"lit";import{property as ov}from"lit/decorators.js";var Tr=class extends g{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),r=t.cols;return Ne`<div class="wrap" part="card"><header part="header"><h2>${this.heading||t.title}</h2>${t.badges.length?Ne`<ul class="roxy-chips" part="details">${t.badges.map(s=>Ne`<li>${this.t("{{label}}: {{value}}",{label:s.label,value:s.value})}</li>`)}</ul>`:It}</header>${t.summary&&!this.hideReadings?Ne`<p class="summary">${t.summary}</p>`:It}<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t.title}"><table><caption class="roxy-label">${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${r.natal?Ne`<th scope="col">${this.t("Natal")}</th>`:It} ${r.house?Ne`<th scope="col" class="num">${this.t("House")}</th>`:It} ${r.motion?Ne`<th scope="col">${this.t("Motion")}</th>`:It} ${r.formula?Ne`<th scope="col">${this.t("Formula")}</th>`:It}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,r))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let r=w(e.body??e.label);return Ne`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${r?Ne`<span class="glyph roxy-glyph">${r}</span>`:It}${e.label}</td><td>${this.signCell(e.sign,e.degree,e.signLabel)}</td>${t.natal?Ne`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Ne`—`}</td>`:It} ${t.house?Ne`<td class="num">${e.house!=null?e.house:Ne`—`}</td>`:It} ${t.motion?Ne`<td>${e.speed!=null?Ne`${b(this.effectiveLang(),e.speed,3)}${this.t("\xB0/day")}${e.isRetrograde?Ne`<span class="retro roxy-glyph">${be}</span>`:It}`:Ne`—`}</td>`:It} ${t.formula?Ne`<td class="formula">${e.formula??Ne`—`}</td>`:It}</tr>`}signCell(e,t,r=e){let s=N(e);return Ne`<span class="sign">${s?Ne`<span class="sg roxy-glyph">${s}</span>`:It}${Zt(t)} ${r}</span>`}signFromLongitude(e){let t=Ht(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(r=>r.interpretation).map(r=>({glyph:w(r.body??r.label)??"",label:r.label,aside:`${r.signLabel??r.sign} ${Zt(r.degree)}`.trim(),body:r.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:e.asteroids.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:e.lilith.map(r=>({label:this.t("{{variant}} apogee",{variant:y(r,"variant",D(r.variant))}),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${b(this.effectiveLang(),e.solarArc,2)}\xB0`},{label:this.t("Directed to"),value:C(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:false,motion:false,formula:false,natal:true},rows:e.directed.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,natalLongitude:r.natalLongitude,interpretation:r.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:D(e.sect)}]:[],summary:e.summary,cols:{house:false,motion:false,formula:true,natal:false},rows:e.lots.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,formula:r.formula,interpretation:r.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,signLabel:y(e.ascendant,"sign"),degree:e.ascendant.degree,isAngle:true}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,signLabel:y(e.midheaven,"sign"),degree:e.midheaven.degree,isAngle:true}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:C(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:b(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:true,motion:true,formula:false,natal:false},rows:[...t,...e.planets.map(r=>({body:r.name,label:y(r,"name"),sign:r.sign,signLabel:y(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))]}}};Tr.endpoints=vd,Tr.styles=[f,z,F,iv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-sm);display:grid}.summary{font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.body-cell{font-weight:var(--roxy-weight-bold)}.body-cell .glyph{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}tr.angle td{color:var(--roxy-secondary)}.sign{align-items:baseline;gap:var(--roxy-space-xs);display:inline-flex}.sign .sg{color:var(--roxy-secondary)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.formula{color:var(--roxy-muted);white-space:normal}`],m([ov({type:String})],Tr.prototype,"heading",2),Tr=m([x("roxy-positions-table")],Tr);import{css as lv,html as Fs,nothing as wn}from"lit";var Bs=class extends g{renderData(a){let e=N(a.profectedSign),t=w(a.lordOfYear),r=N(a.lordNatalPosition?.sign);return Fs`<div class="wrap" part="card"><header part="header"><h2>${this.t("Annual profection")}</h2>${a.targetDate?Fs`<p class="roxy-label">${this.t("For")} ${C(this.effectiveLang(),a.targetDate)}</p>`:wn}</header><div class="focus" part="details"><div class="age"><span class="n">${a.age}</span> <span class="roxy-label">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${a.profectedHouse}</span> <span class="sign">${e?Fs`<span class="sg roxy-glyph">${e}</span>`:wn}${a.profectedSign}</span></div></div><div class="lord" part="details"><span class="roxy-label">${this.t("Lord of the year")}</span> <span class="value">${t?Fs`<span class="sg roxy-glyph" aria-hidden="true">${t}</span>`:wn}${a.lordOfYear}</span> ${a.lordNatalPosition?Fs`<span class="sub">${this.t("Natal")} ${r?Fs`<span class="sg roxy-glyph" aria-hidden="true">${r}</span>`:wn}${this.t("{{sign}} \xB7 house {{house}}",{sign:a.lordNatalPosition.sign,house:a.lordNatalPosition.house})}</span>`:wn}</div>${a.interpretation&&!this.hideReadings?Fs`<p class="interp">${a.interpretation}</p>`:wn}</div>`}};Bs.endpoints=Ld,Bs.styles=[f,lv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.focus{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.age,.house{gap:calc(var(--roxy-space-unit) / 2);display:grid}.age{justify-items:center}.age .n{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.arrow{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.house .h{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.house .sign{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.sg{margin-inline-end:var(--roxy-space-xs)}.lord{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.lord .value{font-weight:var(--roxy-weight-bold)}.lord .sub{color:var(--roxy-muted)}.interp{font-size:var(--roxy-text-sm)}`],Bs=m([x("roxy-profection-card")],Bs);import{css as cv,html as ka,nothing as si}from"lit";var _m=["name","english","title"],dv=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]);function pv(n){let a=e=>typeof e=="string"?e:void 0;return N(a(n.id))??w(a(n.id))??Qa(a(n.english))}var hv=new Set(["id","symbol",..._m]),Mm=48;function mv(n){return R(n).toLowerCase().replace(/\s+/g,"-")}function gv(n){return Object.values(nn(n)).filter(a=>typeof a=="string"||typeof a=="number").map(String).join(" \xB7 ")}var Hs=class extends g{renderData(a){let e=nn(a),t=this.deriveTitle(e),r=pv(e),s=typeof e.symbol=="string"&&new RegExp("\\p{L}","u").test(e.symbol)?e.symbol:void 0,i=Array.isArray(e.keywords)?e.keywords.map(String):[],o=[],l=[],c=[],d=(h,u,v)=>{if(u!=null){if(Array.isArray(u)){let L=u.filter($=>$!=null).map($=>typeof $=="object"?gv($):String($)).filter($=>$.length>0);L.length>0&&l.push([h,L,L.some($=>$.length>Mm)])}else if(typeof u=="string")dv.has(h)||u.length>Mm?o.push([h,u]):c.push([h,u]);else if(typeof u=="number"||typeof u=="boolean")c.push([h,String(u)]);else if(typeof u=="object"&&v<2)for(let[L,$]of Object.entries(nn(u)))d(`${h} ${L}`,$,v+1)}};for(let[h,u]of Object.entries(e))hv.has(h)||h==="keywords"&&Array.isArray(u)||d(h,u,0);let p=!this.hideReadings;return ka`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${r?ka`<span class="symbol roxy-glyph" aria-hidden="true">${r}</span>`:s?ka`<span class="symbol" aria-hidden="true">${s}</span>`:si}<div><p class="roxy-label">${this.t("Reference")}</p><h2>${t}</h2></div></header>${i.length>0&&p?ka`<ul class="roxy-chips">${i.map(h=>ka`<li>${h}</li>`)}</ul>`:si} ${p?o.map(([h,u])=>ka`<p class="prose"><span class="roxy-label">${re(this.effectiveLang(),h)}</span>${u}</p>`):si} ${c.length>0?ka`<div part="details"><dl class="roxy-facts">${c.map(([h,u])=>ka`<div><dt>${re(this.effectiveLang(),h)}</dt><dd>${u}</dd></div>`)}</dl></div>`:si} ${l.map(([h,u,v])=>v&&!p?si:ka`<div class="list" part="section ${mv(h)}"><h3>${re(this.effectiveLang(),h)}</h3><ul class="roxy-chips">${u.map(L=>ka`<li>${L}</li>`)}</ul></div>`)}</article>`}deriveTitle(a){for(let r of _m)if(typeof a[r]=="string")return a[r];let e=typeof a.type=="string"?R(a.type):"",t=a.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Hs.endpoints=$d,Hs.styles=[f,se,cv`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);flex:none;line-height:1}.prose .roxy-label{margin-block-end:calc(var(--roxy-space-unit) / 2);display:block}.list h3{margin-block-end:var(--roxy-space-xs)}.roxy-facts{margin:0}`],Hs=m([x("roxy-reference-card")],Hs);import{css as yv,html as ia,nothing as ni}from"lit";import{ifDefined as uv}from"lit/directives/if-defined.js";var Nm=n=>w(n)??"",js=class extends g{renderData(a){let e=a.changes,t=["latitude","longitude"];return ia`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${uv(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, interpretation, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${a}"></roxy-natal-chart><section class="changes" part="card changes"><h2>${this.t("What changes at this location")}</h2>${a.relocation?ia`<dl class="roxy-facts" part="details">${t.map(r=>ia`<div><dt>${re(this.effectiveLang(),r==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${b(this.effectiveLang(),a.relocation[r],5)}</dd></div>`)}</dl>`:ni}<div class="move" part="details">${typeof e?.distanceKm=="number"?ia`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:_(this.effectiveLang(),e.distanceKm),direction:e.direction?B(this.effectiveLang(),"direction",D(e.direction),e.direction):""})}</span>`:ni} ${e?ia`<span>${a.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:y(a.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:y(a.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:ni}</div>${a.interpretation?.summary&&!this.hideReadings?ia`<p class="summary">${a.interpretation.summary}</p>`:ni} ${e?.angularPlanets?.length?ia`<section part="section angular-planets"><h3>${this.t("Angular planets here")}</h3><ul class="roxy-chips">${Ti(e,"angularPlanets").map(({value:r,label:s})=>ia`<li>${Nm(r)} ${s}</li>`)}</ul></section>`:ni}<section part="section house-changes"><h3>${this.t("Planets that change house")}</h3>${e?.planetsChangedHouse?.length?ia`<ul class="moves-list">${e.planetsChangedHouse.map(r=>ia`<li>${Nm(r.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:y(r,"planet"),from:r.natalHouse,to:r.relocatedHouse})}</li>`)}</ul>`:ia`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</section></section></div>`}};js.endpoints=wd,js.styles=[f,se,yv`.stack{gap:var(--roxy-space-md);display:grid}.changes{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.changes section{gap:var(--roxy-space-xs);display:grid}.move{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.summary,.moves-list{font-size:var(--roxy-text-sm)}.moves-list{gap:calc(var(--roxy-space-unit) / 2);margin:0;padding:0;list-style:none;display:grid}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],js=m([x("roxy-relocation-wheel")],js);import{css as xv,html as _o}from"lit";import{property as kn}from"lit/decorators.js";function fv(n,a){let e=atob(n),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t],{type:a})}var Mo=class{constructor(a,e){this.host=a;this.type=e;this.revokedOnDisconnect=false;a.addController(this)}urlFor(a){return this.url&&this.source===a?this.url:(this.revoke(),this.url=URL.createObjectURL(fv(a,this.type)),this.source=a,this.url)}hostConnected(){this.revokedOnDisconnect&&(this.revokedOnDisconnect=false,this.host.requestUpdate())}hostDisconnected(){this.revokedOnDisconnect=this.url!==void 0,this.revoke()}revoke(){this.url&&URL.revokeObjectURL(this.url),this.url=void 0,this.source=void 0}};var bv=/[\\/:*?"<>|]+/g;function vv(n){switch(n.status){case 400:return"Check the details and try again.";case 403:return n.code==="origin_not_allowed"?"This website is not allowed to use this key.":void 0;case 429:return"Too many requests. Try again shortly.";case 503:return"Busy right now. Try again in a moment.";default:return}}function Lv(n){let a=Wo(n.color),e=Wo(n.accent),t={...n.name?{name:n.name}:{},...n.logo?{logo:n.logo}:{},...n.footer?{footer:n.footer}:{},...a||e?{colors:{...a?{primary:a}:{},...e?{accent:e}:{}}}:{},...yi(n.font)?{font:n.font}:{},...Yd(n.theme)?{theme:n.theme}:{}};return Object.keys(t).length>0?t:void 0}var Gt=class extends g{constructor(){super(...arguments);this.format="pdf";this.pdfUrl=new Mo(this,"application/pdf");this.fitFrame=e=>{let t=e.currentTarget,r=t.contentDocument?.documentElement;if(!r)return;let s=()=>{let i=t.offsetHeight-t.clientHeight;t.style.blockSize=`${Math.ceil(r.getBoundingClientRect().height)+i}px`};s(),this.frameObserver?.disconnect(),this.frameObserver=new ResizeObserver(s),this.frameObserver.observe(r)}}ownRequest(){return{format:this.format==="html"?"html":"pdf",branding:Lv({name:this.brandName,logo:this.brandLogo,footer:this.brandFooter,color:this.brandColor,accent:this.brandAccent,font:this.font,theme:this.theme}),readings:this.hideReadings?false:void 0}}disconnectedCallback(){super.disconnectedCallback(),this.frameObserver?.disconnect(),this.frameObserver=void 0}renderData(e){if(e.html)return this.renderDocument(e.html,e.title);if(!e.pdf)return this.renderEmpty();let t=(e.title||this.report||e.template).replace(bv," ");return _o`<article class="card" part="card"><h2 part="header">${e.title}</h2><a class="download" part="download" href="${this.pdfUrl.urlFor(e.pdf)}" download="${`${t}.pdf`}">${this.t("Download PDF")}</a></article>`}renderDocument(e,t){return _o`<iframe class="document" part="document" title="${t}" sandbox="allow-same-origin" srcdoc="${e}" @load="${this.fitFrame}"></iframe>`}renderLoading(){return _o`<div class="busy" role="status" aria-busy="true" part="loading"><span class="roxy-skeleton"></span><p>${this.t("Preparing your report")}</p></div>`}renderError(e){let t=vv(this.failure);return t?_o`<p class="lead" role="alert">${this.t(t)}</p>${super.renderError(e)}`:super.renderError(e)}};Gt.endpoints=kd,Gt.styles=[f,xv`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);justify-items:start;display:grid}h2{margin:0}.download{min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-lg);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);font-weight:var(--roxy-weight-bold);align-items:center;text-decoration:none;display:inline-flex}.document{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);background:var(--roxy-surface);inline-size:100%;display:block}.busy{gap:var(--roxy-space-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);display:grid}.busy .roxy-skeleton{block-size:2lh}.busy p,.lead{margin:0}.lead{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-sm)}`],m([kn({type:String})],Gt.prototype,"report",2),m([kn({type:String})],Gt.prototype,"format",2),m([kn({type:String,attribute:"brand-name"})],Gt.prototype,"brandName",2),m([kn({type:String,attribute:"brand-logo"})],Gt.prototype,"brandLogo",2),m([kn({type:String,attribute:"brand-footer"})],Gt.prototype,"brandFooter",2),m([kn({type:String})],Gt.prototype,"theme",2),Gt=m([x("roxy-report")],Gt);import{css as $v,html as Sn,nothing as No}from"lit";var cc=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info)"},{key:"digBala",source:"Dig",color:"var(--roxy-success)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger)"}],Ks=class extends g{renderData(a){if(!a.planets?.length)return this.renderEmpty();let e=[...a.planets].sort((t,r)=>t.relativeRank-r.relativeRank);return Sn`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${Q(this.effectiveLang(),a.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${cc.map(t=>Sn`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(a){let e=w(a.planet)??"",t=cc.map(c=>Math.max(0,a[c.key])),r=t.reduce((c,d)=>c+d,0),s=typeof a.strengthRatio=="number"&&a.strengthRatio>=1,i=s?"adequacy-badge--adequate":"adequacy-badge--weak",o=s?this.t("Adequate"):this.t("Weak"),l=b(this.effectiveLang(),a.totalRupas,2)&&b(this.effectiveLang(),a.minRequired,2)?`${b(this.effectiveLang(),a.totalRupas,2)} / ${b(this.effectiveLang(),a.minRequired,2)} R`:"";return Sn`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:a.planet})}"><div class="planet-label"><span class="glyph roxy-glyph" aria-hidden="true">${e}</span> ${a.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:a.relativeRank})}">#${a.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:a.planet})}">${r>0?cc.map((c,d)=>{let p=t[d];if(p<=0)return No;let h=p/r*100;return Sn`<div class="bar-segment" style="flex-grow:${h};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:b(this.effectiveLang(),p,1)})}"></div>`}):No}</div>${this.renderPhala(a)}</div><div class="pills">${l?Sn`<span class="rupas-label">${l}</span>`:No} <span class="${`adequacy-badge ${i}`}">${o}</span></div></div>`}renderPhala(a){let e=typeof a.ishtaPhala=="number"?a.ishtaPhala:0,t=typeof a.kashtaPhala=="number"?a.kashtaPhala:0;if(e+t<=0)return No;let r=b(this.effectiveLang(),e,1)||"0",s=b(this.effectiveLang(),t,1)||"0";return Sn`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:r,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:r})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Ks.endpoints=Sd,Ks.styles=[f,G,$v`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle,.footnote{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.planet-row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:14ch minmax(0,1fr) auto;display:grid}.planet-row:last-of-type{border-block-end:0}.planet-label{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.glyph{font-size:var(--roxy-text-base);line-height:1}.bar-wrap,.pills{gap:var(--roxy-space-xs);flex-direction:column;display:flex}.pills{align-items:flex-end}.bar{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);block-size:.5lh;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration) var(--roxy-motion-easing)}.rupas-label{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;color:var(--roxy-muted);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.25lh;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success)}.phala-kashta{background:var(--roxy-danger)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs);color:var(--roxy-muted)}.adequacy-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.adequacy-badge--adequate{color:var(--roxy-success-fg)}.adequacy-badge--weak{color:var(--roxy-danger-fg)}.rank-badge{font-size:var(--roxy-text-xs);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);color:var(--roxy-muted);display:flex}.legend-swatch{aspect-ratio:1;border-radius:var(--roxy-radius-sm);flex-shrink:0;block-size:.6lh;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:12ch minmax(0,1fr)}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Ks=m([x("roxy-shadbala-table")],Ks);import{css as Av,html as W,nothing as Re}from"lit";import{unsafeHTML as Pv}from"lit/directives/unsafe-html.js";function Bm(n){let a=n?.ascendant;if(!a)return;let e=Se.findIndex(t=>t.toLowerCase()===a.sign.toLowerCase());return e<0?void 0:e*30+a.degree}var pc=680,ee=pc/2,zo=204,wv=186,zm=160,Om=258,kv=212,dc=224,Oo=86,Io={glyph:18,degree:10},Sv=1.3,Rv=.95,Im=8,Gm=4;function Er(n,a){return 180+n.ascendant-a}function Hm(n,a={}){let e={t:ha(a.lang),locale:a.lang,size:a.typeSize??Io,ascendant:Bm(n.person1)??0},t=n.person1?.planets??[],r=n.person2?.planets??[];return k`<svg class="synastry-wheel" xmlns=${pa} viewBox=${`0 0 ${pc} ${pc}`} part="chart" role="img" aria-label=${e.t("Dual chart wheel comparing two natal charts")}><title>${e.t("Synastry dual wheel")}</title>
124
+ <circle class="wheel-line" cx=${ee} cy=${ee} r=${zo} stroke-width="1.5" />
125
+ <circle class="wheel-line" cx=${ee} cy=${ee} r=${zo-32} stroke-width="0.8" />
126
+ <circle class="wheel-line" cx=${ee} cy=${ee} r=${Oo} stroke-width="0.6" />
127
+ ${Cv(e)} ${Tv(e)}
128
+ ${Dv(e,t,r,n.interAspects??[])}
129
+ ${Fm(e,t,zm,(s,i,o)=>zm-Ma(s,i,o,ya),"p1",1)} ${Fm(e,r,Om,(s,i,o)=>Om+Ma(s,i,o,ya),"p2",2)}
130
+ ${Ev(e,n)}
131
+ </svg>`.markup}function Cv(n){return Array.from({length:12},(a,e)=>{let t=Er(n,e*30),r=A(ee,ee,Oo,t),s=A(ee,ee,zo,t);return k`<line class="wheel-line" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} stroke-width="0.6" />`})}function Tv(n){return Se.map((a,e)=>{let t=Er(n,e*30+15),r=A(ee,ee,wv,t);return k`<text class="sign roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(a)}</text>`})}function Fm(n,a,e,t,r,s){let i={width:Sv*n.size.glyph,height:Rv*n.size.glyph},o=d=>({width:(Mt.whole+(d.isRetrograde===true?Mt.retrograde:0))*n.size.degree,height:Mt.ink*n.size.degree}),l=_t(i.width,e);return jt(a,d=>d.longitude,(d,p)=>Math.max(l,_t((o(d).width+o(p).width)/2,t(90,i,o(d))))).map(({item:d,longitude:p,displayLongitude:h})=>{let u=Er(n,h),v=A(ee,ee,e,u),L=A(ee,ee,t(u,i,o(d)),u),$=w(d.name)??y(d,"name"),P=d.isRetrograde===true,U=typeof d.house=="number"?` \xB7 ${n.t("House {{n}}",{n:d.house})}`:"",Ge=`${y(d,"name")}${P?` ${n.t("retrograde")}`:""} - ${Pt(p)} ${y(d,"sign")}${U}`,$t=Math.abs(h-p)>.5,la=A(ee,ee,e+(s===1?Im:-Im),Er(n,p)),Ea=A(ee,ee,e+(s===1?Gm:-Gm),u);return k`<g>
132
+ ${$t?k`<line class=${`leader ${r}`} x1=${la.x} y1=${la.y} x2=${Ea.x} y2=${Ea.y} />`:""}
133
+ <text class=${r} x=${v.x} y=${v.y} text-anchor="middle" dominant-baseline="central"><title>${Ge}</title><tspan class="roxy-glyph">${$}</tspan><tspan class="person-tag" dy="-0.55em" dx="0.15em">${s}</tspan></text>
134
+ <text class="planet-deg" x=${L.x} y=${L.y} text-anchor="middle" dominant-baseline="central">${Ht(p).degree}°${P?k`<tspan class="retro roxy-glyph"> ${be}</tspan>`:""}</text>
135
+ </g>`})}function Ev(n,a){let e=[a.person1,a.person2].flatMap((t,r)=>{let s=Bm(t);return s===void 0?[]:[{longitude:s,index:r+1}]});return jt(e,t=>t.longitude,_t(34,dc)).map(({item:t,longitude:r,displayLongitude:s})=>{let i=Er(n,r),o=Er(n,s),l=A(ee,ee,zo,i),c=A(ee,ee,kv,i),d=A(ee,ee,dc,o),p=A(ee,ee,dc-7,o);return k`<g>
136
136
  <line class="asc-tick" x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y} />
137
- ${Math.abs(s-r)>.5?k`<line class="asc-tick" x1=${c.x} y1=${c.y} x2=${h.x} y2=${h.y} />`:""}
137
+ ${Math.abs(s-r)>.5?k`<line class="asc-tick" x1=${c.x} y1=${c.y} x2=${p.x} y2=${p.y} />`:""}
138
138
  <text class="asc-label" x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${n.t("ASC{{n}}",{n:t.index})}</text>
139
- </g>`})}function Lv(n,a,e,t){let r=(s,i)=>{let o=M(i);for(let l of s)if(M(l.name)===o&&typeof l.longitude=="number")return l.longitude};return t.filter(Da).map(s=>{let i=r(a,s.planet1),o=r(e,s.planet2);if(i===void 0||o===void 0)return"";let l=E(ee,ee,Mo-2,Tr(n,i)),c=E(ee,ee,Mo-2,Tr(n,o)),{locale:d}=n,h=b(d,s.orb,1);return k`<line class=${`aspect ${Be(s)}`} style=${cn(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${y(s,"planet1")} ${y(s,"type",Te(s))} ${y(s,"planet2")}${h?` (${n.t("Orb")} ${h}\xB0)`:""}</title></line>`})}var kv=12,Vs=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.type=new kr(this,{glyph:[".p1",_o.glyph],degree:[".planet-deg",_o.degree]})}renderData(e){let{person1:t,person2:r,compatibilityScore:s,analysis:i}=e,o=e.interAspects??[],l=t?.planets??[],c=r?.planets??[],d=typeof s=="number"?Math.round(s):void 0,h=i?.overall,p=i?.strengths??[],f=i?.challenges??[],v=l.length>0&&c.length>0,L=[...o].sort((D,V)=>(V.strength??0)-(D.strength??0)),$=L.slice(0,kv);return Y`<div class="wrap synastry-wheel" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2>${this.t("Synastry")}</h2>${typeof d=="number"?Y`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:d})}">${d} / 100</span>`:Re}</div>${this.renderPeople(t,r)} ${v?Y`${this.viewport.renderChartViewport(wv(Nm(e,{lang:this.effectiveLang(),typeSize:this.type.size})),this.t("Synastry dual wheel"),this.translator)}<div class="legend" part="legend"><span><span class="person-dot p1"></span>${this.t("Person 1")}</span> <span><span class="person-dot p2"></span>${this.t("Person 2")}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span> <span>${this.t("Sign sectors, not houses")}</span></div>`:Y`<p role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</p>`} ${this.renderOverlay(t,r)} ${this.renderSummaryCounts(e.summary)} ${h&&!this.hideReadings?Y`<p class="summary">${h}</p>`:Re} ${$.length>0?Y`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${$.map((D,V)=>this.renderAspectCard(D,V))}</section>`:Re} ${L.length>$.length?this.renderCatalog(L):Re} ${!this.hideReadings&&(p.length>0||f.length>0)?Y`<div class="lists" part="section strengths-challenges">${p.length?Y`<div><h3>${this.t("Strengths")}</h3><ul>${p.map(D=>Y`<li>${D}</li>`)}</ul></div>`:Re} ${f.length?Y`<div><h3>${this.t("Challenges")}</h3><ul>${f.map(D=>Y`<li>${D}</li>`)}</ul></div>`:Re}</div>`:Re}</div>`}renderPeople(e,t){let r=(i,o)=>{if(!i)return Re;let l=i.ascendant,d=[["Sun",i.sunSign??"",y(i,"sunSign")],["Moon",i.moonSign??"",y(i,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Zt(l.degree)}`:""]].filter(([,,h])=>h);return d.length===0?Re:Y`<div class="person"><span class="person-name"><span class="person-dot p${o}" aria-hidden="true"></span>${i.name||this.t("Person {{n}}",{n:o})}</span><div class="big-three">${d.map(([h,p,f])=>Y`<span><span class="roxy-label">${this.t(h)}</span> <span class="roxy-glyph" aria-hidden="true">${N(p)??""}</span> ${f}</span>`)}</div></div>`},s=[r(e,1),r(t,2)].filter(i=>i!==Re);return s.length===0?Re:Y`<div class="people" part="details">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return Re;let r=(o,l)=>o?.name||this.t("Person {{n}}",{n:l}),s=r(e,1),i=r(t,2);return Y`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,i,1)} ${this.renderOverlayTable(t.planets,i,s,2)}</section>`}renderOverlayTable(e,t,r,s){let i=e.filter(l=>typeof l.houseInOtherChart=="number");if(i.length===0)return Re;let o=`overlay-${s}`;return Y`<div class="overlay-dir"><h4 id="${o}"><span class="person-dot p${s}" aria-hidden="true"></span>${this.t("{{first}} in the houses of {{second}}",{first:t,second:r})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${o}"><table aria-labelledby="${o}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${i.map(l=>Y`<tr><td><span class="roxy-glyph" aria-hidden="true">${w(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?Y`<span class="retro roxy-glyph" title="${this.t("retrograde")}">${De}</span>`:Re}</td><td><span class="roxy-glyph" aria-hidden="true">${N(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Zt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryCounts(e){if(!e||typeof e!="object")return Re;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return typeof e.total!="number"&&t.length===0?Re:Y`<p class="counts" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?Y`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:Re} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>Y`<span>${this.t("{{label}}: {{value}}",{label:Te({type:r}),value:s})}</span>`)}</p>`}renderAspectCard(e,t){let r=w(e.planet1)??"",s=w(e.planet2)??"",i=e.meaning,o=Y`<span class="interp-lead"><span aria-hidden="true" class="glyph roxy-glyph">${r}</span>${y(e,"planet1")} <span class="asp-name ${Be(e)}">${y(e,"type",Te(e))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${s}</span>${y(e,"planet2")}</span>`,l=Y`<span class="interp-aside"><small>${this.t("orb {{orb}}\xB0 \xB7 str {{strength}}",{orb:b(this.effectiveLang(),e.orb,2),strength:b(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?Y`<div class="interp-card" part="reading"><div class="static-head">${o}${l}</div></div>`:Y`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${o}${j()}${l}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return Y`<div class="interp-body">${e.relationshipContext?Y`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:Re} ${e.description?.short?Y`<p>${e.description.short}</p>`:Re} ${e.description?.long&&e.description.long!==e.description.short?Y`<p>${e.description.long}</p>`:Re} ${Gr(e.keywords)}</div>`}renderCatalog(e){return Y`<details class="catalog" part="section aspects inter-aspects"><summary>${j()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}renderAspects(e){return Y`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?Re:Y`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>Y`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Te(t))}</td><td class="orb">${b(this.effectiveLang(),t.orb,1)}</td><td>${b(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?Re:Y`<td>${t.meaning?Y`<details part="reading"><summary>${j()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:Re}</td>`}</tr>`)}</tbody></table>`}};Vs.endpoints=Ld,Vs.styles=[u,He,dn,z,K,Ap,$v`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p,ul{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,50rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.person-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_person);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.people,.lists{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.person,.lists>div{gap:var(--roxy-space-xs);align-content:start;display:grid}.person-name{font-weight:var(--roxy-weight-bold)}.big-three{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.lists ul{font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.overlay-dir{gap:var(--roxy-space-xs);display:grid}.overlay-dir+.overlay-dir{margin-block-start:var(--roxy-space-md)}.overlay-house{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.own-house,.retro{color:var(--roxy-muted)}.retro{margin-inline-start:var(--roxy-space-xs)}.glyph{line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.asp-name,.context{font-weight:var(--roxy-weight-bold)}.catalog>summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);font-size:var(--roxy-text-sm);display:flex}.scroll{min-width:0;overflow-x:auto}.catalog .scroll{margin-block-start:var(--roxy-space-sm)}table{width:100%}td.orb{color:var(--roxy-muted)}td .interp-body{white-space:normal;min-width:32ch}`],Vs=m([x("roxy-synastry-chart")],Vs);import{css as Rv,html as oa,nothing as Rn}from"lit";import{state as Cv}from"lit/decorators.js";import{css as Sv}from"lit";function Us(n,a){return F(n,"arcana",a,`${M(a)} Arcana`)}function ri(n,a){return F(n,"suit",a,M(a))}var Sn=Sv`.card-art{aspect-ratio:600/1072}`;var Tv=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Er=class extends g{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,r=!!t.reversed,s=t.keywords??[],i=this.effectiveLang(),o=[t.arcana?Us(i,t.arcana):"",t.suit?ri(i,t.suit):""].filter(Boolean).join(" \xB7 "),l=!this.hideReadings;return oa`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,r)}<div part="header"><div class="meta roxy-label">${o?`${o} \xB7 `:""}<span class="drawn">${r?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2>${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?oa`<p class="message">${e.dailyMessage}</p>`:Rn} ${t.meaning&&l?oa`<p class="reading">${t.meaning}</p>`:Rn} ${s.length>0&&l?oa`<ul class="roxy-chips">${s.map(c=>oa`<li>${c}</li>`)}</ul>`:Rn} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",r=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??r?.keywords??[],i=!this.hideReadings;return oa`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta roxy-label">${[e.arcana?Us(this.effectiveLang(),e.arcana):"",e.suit?ri(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" \xB7 ")}</div><h2>${e.name??this.t("Tarot card")}</h2>${mt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:o=>{this.orientation=o},label:this.t("Card orientation"),idPrefix:"tarot",controls:true})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${r?.description&&i?oa`<p class="reading">${r.description}</p>`:Rn} ${s.length>0&&i?oa`<ul class="roxy-chips">${s.map(o=>oa`<li>${o}</li>`)}</ul>`:Rn} ${this.renderGuidance(r,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,r){let s=`image ${r?"reversed":""}`;return e?oa`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:oa`<div class="${s} card-art" part="chart" style="display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return Rn;let r=Tv.map(([s,i])=>({label:this.t(i),body:e[s]??""}));return this.renderInterpretation(r,t,"Guidance")}};Er.endpoints=$d,Er.styles=[u,Sn,z,K,et,Rv`.card{align-items:start;gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=480px){.card{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.image{border-radius:var(--roxy-radius-md);background:var(--roxy-border);width:100%;height:auto;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.image.reversed{transform:rotate(180deg)}.meta{margin-block-end:var(--roxy-space-sm)}.drawn{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.message{margin-block:var(--roxy-space-sm) var(--roxy-space-md)}.reading{white-space:pre-line;margin-block-end:var(--roxy-space-md)}.roxy-tablist{margin-block:var(--roxy-space-sm)}.roxy-chips{margin-block-start:var(--roxy-space-sm)}`],m([Cv()],Er.prototype,"orientation",2),Er=m([x("roxy-tarot-card")],Er);import{css as Ev,html as si,nothing as Dv}from"lit";import{property as Av}from"lit/decorators.js";var Dr=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,i=this.effectiveLang();return si`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(o=>si`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?si`<img class="art card-art" src="${o.imageUrl}" alt="${o.name??this.t("Tarot card")}" loading="lazy">`:si`<div class="art card-art" aria-hidden="true"></div>`}<p class="name">${o.name}</p><p class="meta">${Pv(i,o)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?si`<div class="detail" part="detail">${this.openedRow}</div>`:Dv}</section>`}};Dr.endpoints=wd,Dr.styles=[u,Sn,Ev`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([Av({type:String,reflect:true})],Dr.prototype,"heading",2),Dr=m([x("roxy-tarot-catalog")],Dr);function Pv(n,a){let e=Us(n,a.arcana);return a.suit?`${e} \xB7 ${ri(n,a.suit)}`:e}import{css as Mv,html as $e,nothing as Et}from"lit";import{property as _v}from"lit/decorators.js";function Nv(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var Ar=class extends g{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,r="cards"in e&&!("spread"in e),s=r?[]:"positions"in e?e.positions??[]:[],i=r&&"cards"in e?e.cards:[],o=t?e:void 0,l=y(o,"strength"),c=o?.card,d=t?this.t("Yes or no"):r?this.t("Card draw"):Nv(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),h="question"in e?e.question:void 0,p="summary"in e?e.summary:void 0,f=o?.interpretation,v=o?.answer?o.answer.toLowerCase():"";return $e`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${d}</h2>${h?$e`<span class="question">"${h}"</span>`:Et}</header>${t?$e`<div class="verdict" part="section verdict"><div class="card"><div class="image card-art" part="chart">${c?.imageUrl?$e`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:$e`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?$e`<small>${this.t("(reversed)")}</small>`:Et}</p>${c?.arcana?$e`<p class="roxy-label">${Us(this.effectiveLang(),c.arcana)}</p>`:Et}</div><div class="meta" part="details"><div><span class="${`answer ${v}`}">${y(o,"answer")}</span> ${l?$e`<small>· ${l}</small>`:Et}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?$e`<ul class="roxy-chips">${c.keywords.map(L=>$e`<li>${L}</li>`)}</ul>`:Et}</div></div>`:Et} ${s.length>0?$e`<div class="grid" part="section positions">${s.map(L=>$e`<div class="card"><p class="roxy-label">${L.name??""}</p><div class="image card-art" part="chart">${L.card?.imageUrl?$e`<img src="${L.card.imageUrl}" alt="${L.card.name??this.t("Tarot card")}" class="${L.card.reversed?"reversed":""}">`:$e`${L.card?.name??"?"}`}</div><p class="name">${L.card?.name??""} ${L.card?.reversed?$e`<small>${this.t("(reversed)")}</small>`:Et}</p>${L.interpretation&&!this.hideReadings?$e`<p class="interp">${L.interpretation}</p>`:Et}</div>`)}</div>`:Et} ${i.length>0?$e`<div class="grid" part="section cards">${i.map(L=>$e`<div class="card"><div class="image card-art" part="chart">${L.imageUrl?$e`<img src="${L.imageUrl}" alt="${L.name??this.t("Tarot card")}" class="${L.reversed?"reversed":""}">`:$e`${L.name??"?"}`}</div><p class="name">${L.name??""} ${L.reversed?$e`<small>${this.t("(reversed)")}</small>`:Et}</p>${L.meaning&&!this.hideReadings?$e`<p class="interp">${L.meaning}</p>`:Et}</div>`)}</div>`:Et} ${p&&!this.hideReadings?$e`<p>${p}</p>`:Et} ${f&&!this.hideReadings?$e`<p>${f}</p>`:Et}</article>`}};Ar.endpoints=kd,Ar.styles=[u,Sn,Mv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title{text-transform:capitalize}.question{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}.answer{font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight)}.answer.yes{color:var(--roxy-success-fg)}.answer.no{color:var(--roxy-danger-fg)}.answer.maybe{color:var(--roxy-warning-fg)}.verdict{align-items:start;gap:var(--roxy-space-md);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=26rem){.verdict{grid-template-columns:minmax(0,1fr)}}.verdict .meta{justify-items:start;gap:var(--roxy-space-sm);display:grid}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.card{align-content:start;gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr);display:grid}.image{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);width:100%;color:var(--roxy-muted);font-size:var(--roxy-text-xs);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.interp{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}`],m([_v({type:String,reflect:true})],Ar.prototype,"spread",2),Ar=m([x("roxy-tarot-spread")],Ar);import{css as zv,html as Qe,nothing as Ue,svg as Ka}from"lit";import{property as oc}from"lit/decorators.js";import{ifDefined as lc}from"lit/directives/if-defined.js";var dc=640,B=dc/2,Ov=212,Gv=226,ni=204,Iv=186,cc=168,zm=250,Om=142,ii=78,Fv=166,Gm={glyph:18,degree:10},Bv=.95,Hv=8,jv=4,No=(n,a)=>w(n)??a,zo=n=>{let a=new Map;for(let e of n)a.set(M(e.name),e);return a},Sa=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.heading="Transits";this.type=new kr(this,{glyph:[".natal-glyph",Gm.glyph],degree:[".planet-deg",Gm.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,i)=>typeof s=="number"?{number:i+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,i)=>s.number-i.number);return t.every((s,i)=>s.number===i+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],r=e.transitPlanets??[],s=e.aspects??[],i=U(this.effectiveLang(),e.transitDate),o=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...r].some(c=>Number.isFinite(c.house));return Qe`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2>${this.t(this.heading)}</h2>${i||o?Qe`<p class="roxy-label">${[i,o].filter(Boolean).join(" \xB7 ")}</p>`:Ue}</div>${this.renderWheel(t,r,s)} ${this.renderLegend(t,r,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,r,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0\xB0 Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,r){return this.viewport.renderChartViewport(Qe`<svg viewBox="0 0 ${dc} ${dc}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${B}" cy="${B}" r="${ni}" stroke-width="1.5"/><circle class="wheel-line" cx="${B}" cy="${B}" r="${cc}" stroke-width="0.8"/><circle class="wheel-line" cx="${B}" cy="${B}" r="${ii}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,r)} ${this.renderRing(e,Om,(s,i,o)=>Om-Pa(s,i,o,ya),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,zm,(s,i,o)=>zm+Pa(s,i,o,ya),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=E(B,B,s?cc:ni-5,r),o=E(B,B,ni,r);e.push(Ka`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return ke.map((e,t)=>{let r=this.toAngle(t*30),s=E(B,B,ii,r),i=E(B,B,ni,r);return Ka`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,r)=>{let s=e[(r+1)%12],i=this.toAngle(t.longitude),o=E(B,B,ii,i),l=E(B,B,cc,i),c=E(B,B,Fv,this.toAngle(_i(t.longitude,s?.longitude??t.longitude+30)));return Ka`<g>
139
+ </g>`})}function Dv(n,a,e,t){let r=(s,i)=>{let o=D(i);for(let l of s)if(D(l.name)===o&&typeof l.longitude=="number")return l.longitude};return t.filter(Aa).map(s=>{let i=r(a,s.planet1),o=r(e,s.planet2);if(i===void 0||o===void 0)return"";let l=A(ee,ee,Oo-2,Er(n,i)),c=A(ee,ee,Oo-2,Er(n,o)),{locale:d}=n,p=b(d,s.orb,1);return k`<line class=${`aspect ${Be(s)}`} style=${dn(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${y(s,"planet1")} ${y(s,"type",Ee(s))} ${y(s,"planet2")}${p?` (${n.t("Orb")} ${p}\xB0)`:""}</title></line>`})}var Mv=12,Vs=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.type=new Sr(this,{glyph:[".p1",Io.glyph],degree:[".planet-deg",Io.degree]})}renderData(e){let{person1:t,person2:r,compatibilityScore:s,analysis:i}=e,o=e.interAspects??[],l=t?.planets??[],c=r?.planets??[],d=typeof s=="number"?Math.round(s):void 0,p=i?.overall,h=i?.strengths??[],u=i?.challenges??[],v=l.length>0&&c.length>0,L=[...o].sort((P,U)=>(U.strength??0)-(P.strength??0)),$=L.slice(0,Mv);return W`<div class="wrap synastry-wheel" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2>${this.t("Synastry")}</h2>${typeof d=="number"?W`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:d})}">${d} / 100</span>`:Re}</div>${this.renderPeople(t,r)} ${v?W`${this.viewport.renderChartViewport(Pv(Hm(e,{lang:this.effectiveLang(),typeSize:this.type.size})),this.t("Synastry dual wheel"),this.translator)}<div class="legend" part="legend"><span><span class="person-dot p1"></span>${this.t("Person 1")}</span> <span><span class="person-dot p2"></span>${this.t("Person 2")}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span> <span>${this.t("Sign sectors, not houses")}</span></div>`:W`<p role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</p>`} ${this.renderOverlay(t,r)} ${this.renderSummaryCounts(e.summary)} ${p&&!this.hideReadings?W`<p class="summary">${p}</p>`:Re} ${$.length>0?W`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${$.map((P,U)=>this.renderAspectCard(P,U))}</section>`:Re} ${L.length>$.length?this.renderCatalog(L):Re} ${!this.hideReadings&&(h.length>0||u.length>0)?W`<div class="lists" part="section strengths-challenges">${h.length?W`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(P=>W`<li>${P}</li>`)}</ul></div>`:Re} ${u.length?W`<div><h3>${this.t("Challenges")}</h3><ul>${u.map(P=>W`<li>${P}</li>`)}</ul></div>`:Re}</div>`:Re}</div>`}renderPeople(e,t){let r=(i,o)=>{if(!i)return Re;let l=i.ascendant,d=[["Sun",i.sunSign??"",y(i,"sunSign")],["Moon",i.moonSign??"",y(i,"moonSign")],["ASC",l?.sign??"",l?`${y(l,"sign")} ${Zt(l.degree)}`:""]].filter(([,,p])=>p);return d.length===0?Re:W`<div class="person"><span class="person-name"><span class="person-dot p${o}" aria-hidden="true"></span>${i.name||this.t("Person {{n}}",{n:o})}</span><div class="big-three">${d.map(([p,h,u])=>W`<span><span class="roxy-label">${this.t(p)}</span> <span class="roxy-glyph" aria-hidden="true">${N(h)??""}</span> ${u}</span>`)}</div></div>`},s=[r(e,1),r(t,2)].filter(i=>i!==Re);return s.length===0?Re:W`<div class="people" part="details">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return Re;let r=(o,l)=>o?.name||this.t("Person {{n}}",{n:l}),s=r(e,1),i=r(t,2);return W`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,i,1)} ${this.renderOverlayTable(t.planets,i,s,2)}</section>`}renderOverlayTable(e,t,r,s){let i=e.filter(l=>typeof l.houseInOtherChart=="number");if(i.length===0)return Re;let o=`overlay-${s}`;return W`<div class="overlay-dir"><h4 id="${o}"><span class="person-dot p${s}" aria-hidden="true"></span>${this.t("{{first}} in the houses of {{second}}",{first:t,second:r})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${o}"><table aria-labelledby="${o}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${i.map(l=>W`<tr><td><span class="roxy-glyph" aria-hidden="true">${w(l.name)??""}</span> ${y(l,"name")}${l.isRetrograde?W`<span class="retro roxy-glyph" title="${this.t("retrograde")}">${be}</span>`:Re}</td><td><span class="roxy-glyph" aria-hidden="true">${N(l.sign)??""}</span> ${y(l,"sign")}</td><td>${Zt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryCounts(e){if(!e||typeof e!="object")return Re;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return typeof e.total!="number"&&t.length===0?Re:W`<p class="counts" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?W`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:Re} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>W`<span>${this.t("{{label}}: {{value}}",{label:Ee({type:r}),value:s})}</span>`)}</p>`}renderAspectCard(e,t){let r=w(e.planet1)??"",s=w(e.planet2)??"",i=e.meaning,o=W`<span class="interp-lead"><span aria-hidden="true" class="glyph roxy-glyph">${r}</span>${y(e,"planet1")} <span class="asp-name ${Be(e)}">${y(e,"type",Ee(e))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${s}</span>${y(e,"planet2")}</span>`,l=W`<span class="interp-aside"><small>${this.t("orb {{orb}}\xB0 \xB7 str {{strength}}",{orb:b(this.effectiveLang(),e.orb,2),strength:b(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?W`<div class="interp-card" part="reading"><div class="static-head">${o}${l}</div></div>`:W`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${o}${V()}${l}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return W`<div class="interp-body">${e.relationshipContext?W`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:Re} ${e.description?.short?W`<p>${e.description.short}</p>`:Re} ${e.description?.long&&e.description.long!==e.description.short?W`<p>${e.description.long}</p>`:Re} ${Da(e.keywords)}</div>`}renderCatalog(e){return W`<details class="catalog" part="section aspects inter-aspects"><summary>${V()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}renderAspects(e){return W`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?Re:W`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>W`<tr><td>${y(t,"planet1")}</td><td>${y(t,"planet2")}</td><td>${y(t,"type",Ee(t))}</td><td class="orb">${b(this.effectiveLang(),t.orb,1)}</td><td>${b(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?Re:W`<td>${t.meaning?W`<details part="reading"><summary>${V()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:Re}</td>`}</tr>`)}</tbody></table>`}};Vs.endpoints=Rd,Vs.styles=[f,He,pn,z,F,zp,Av`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p,ul{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,50rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.person-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_person);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.people,.lists{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.person,.lists>div{gap:var(--roxy-space-xs);align-content:start;display:grid}.person-name{font-weight:var(--roxy-weight-bold)}.big-three{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.lists ul{font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.overlay-dir{gap:var(--roxy-space-xs);display:grid}.overlay-dir+.overlay-dir{margin-block-start:var(--roxy-space-md)}.overlay-house{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.own-house,.retro{color:var(--roxy-muted)}.retro{margin-inline-start:var(--roxy-space-xs)}.glyph{line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.asp-name,.context{font-weight:var(--roxy-weight-bold)}.catalog>summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);font-size:var(--roxy-text-sm);display:flex}.scroll{min-width:0;overflow-x:auto}.catalog .scroll{margin-block-start:var(--roxy-space-sm)}table{width:100%}td.orb{color:var(--roxy-muted)}td .interp-body{white-space:normal;min-width:32ch}`],Vs=m([x("roxy-synastry-chart")],Vs);import{css as Nv,html as oa,nothing as Cn}from"lit";import{state as zv}from"lit/decorators.js";import{css as _v}from"lit";function Us(n,a){return B(n,"arcana",a,`${D(a)} Arcana`)}function ii(n,a){return B(n,"suit",a,D(a))}var Go=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],Rn=_v`.card-art{aspect-ratio:600/1072}`;var Dr=class extends g{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,r=!!t.reversed,s=t.keywords??[],i=this.effectiveLang(),o=[t.arcana?Us(i,t.arcana):"",t.suit?ii(i,t.suit):""].filter(Boolean).join(" \xB7 "),l=!this.hideReadings;return oa`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,r)}<div part="header"><div class="meta roxy-label">${o?`${o} \xB7 `:""}<span class="drawn">${r?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2>${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?oa`<p class="message">${e.dailyMessage}</p>`:Cn} ${t.meaning&&l?oa`<p class="reading">${t.meaning}</p>`:Cn} ${s.length>0&&l?oa`<ul class="roxy-chips">${s.map(c=>oa`<li>${c}</li>`)}</ul>`:Cn} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",r=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??r?.keywords??[],i=!this.hideReadings;return oa`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta roxy-label">${[e.arcana?Us(this.effectiveLang(),e.arcana):"",e.suit?ii(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" \xB7 ")}</div><h2>${e.name??this.t("Tarot card")}</h2>${mt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:o=>{this.orientation=o},label:this.t("Card orientation"),idPrefix:"tarot",controls:true})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${r?.description&&i?oa`<p class="reading">${r.description}</p>`:Cn} ${s.length>0&&i?oa`<ul class="roxy-chips">${s.map(o=>oa`<li>${o}</li>`)}</ul>`:Cn} ${this.renderGuidance(r,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,r){let s=`image ${r?"reversed":""}`;return e?oa`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:oa`<div class="${s} card-art" part="chart" style="display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return Cn;let r=Go.map(([s,i])=>({label:this.t(i),body:e[s]??""}));return this.renderInterpretation(r,t,"Guidance")}};Dr.endpoints=Cd,Dr.styles=[f,Rn,z,F,et,Nv`.card{align-items:start;gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=480px){.card{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.image{border-radius:var(--roxy-radius-md);background:var(--roxy-border);width:100%;height:auto;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.image.reversed{transform:rotate(180deg)}.meta{margin-block-end:var(--roxy-space-sm)}.drawn{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.message{margin-block:var(--roxy-space-sm) var(--roxy-space-md)}.reading{white-space:pre-line;margin-block-end:var(--roxy-space-md)}.roxy-tablist{margin-block:var(--roxy-space-sm)}.roxy-chips{margin-block-start:var(--roxy-space-sm)}`],m([zv()],Dr.prototype,"orientation",2),Dr=m([x("roxy-tarot-card")],Dr);import{css as Ov,html as oi,nothing as Iv}from"lit";import{property as Gv}from"lit/decorators.js";var Ar=class extends g{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,i=this.effectiveLang();return oi`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(o=>oi`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?oi`<img class="art card-art" src="${o.imageUrl}" alt="${o.name??this.t("Tarot card")}" loading="lazy">`:oi`<div class="art card-art" aria-hidden="true"></div>`}<p class="name">${o.name}</p><p class="meta">${Fv(i,o)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?oi`<div class="detail" part="detail">${this.openedRow}</div>`:Iv}</section>`}};Ar.endpoints=Td,Ar.styles=[f,Rn,Ov`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([Gv({type:String,reflect:true})],Ar.prototype,"heading",2),Ar=m([x("roxy-tarot-catalog")],Ar);function Fv(n,a){let e=Us(n,a.arcana);return a.suit?`${e} \xB7 ${ii(n,a.suit)}`:e}import{css as Bv,html as Ce,nothing as ft}from"lit";import{property as Hv}from"lit/decorators.js";var jv={love:"love",career:"career"};function Kv(n){return(n??"").split(/\n\s*\n/).map(a=>a.trim()).filter(Boolean)}function Vv(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var Pr=class extends g{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,r="cards"in e&&!("spread"in e),s=r?[]:"positions"in e?e.positions??[]:[],i=r&&"cards"in e?e.cards:[],o=t?e:void 0,l=y(o,"strength"),c=o?.card,d=t?this.t("Yes or no"):r?this.t("Card draw"):Vv(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),p="question"in e?e.question:void 0,h="summary"in e?e.summary:void 0,u=o?.interpretation,v=o?.answer?o.answer.toLowerCase():"";return Ce`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${d}</h2>${p?Ce`<span class="question">"${p}"</span>`:ft}</header>${t?Ce`<div class="verdict" part="section verdict"><div class="card"><div class="image card-art" part="chart">${c?.imageUrl?Ce`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:Ce`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?Ce`<small>${this.t("(reversed)")}</small>`:ft}</p>${c?.arcana?Ce`<p class="roxy-label">${Us(this.effectiveLang(),c.arcana)}</p>`:ft}</div><div class="meta" part="details"><div><span class="${`answer ${v}`}">${y(o,"answer")}</span> ${l?Ce`<small>· ${l}</small>`:ft}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?Ce`<ul class="roxy-chips">${c.keywords.map(L=>Ce`<li>${L}</li>`)}</ul>`:ft}</div></div>`:ft} ${s.length>0?Ce`<ul class="${this.hideReadings?"rows cast":"rows"}" part="section positions">${s.map(L=>this.renderDrawn(L.card,L.name,L.interpretation))}</ul>`:ft} ${i.length>0?Ce`<ul class="${this.hideReadings?"rows cast":"rows"}" part="section cards">${i.map(L=>this.renderDrawn(L))}</ul>`:ft} ${h&&!this.hideReadings?Ce`<p class="summary">${h}</p>`:ft} ${u&&!this.hideReadings?Ce`<p>${u}</p>`:ft}</article>`}renderDrawn(e,t,r){let s=jv[this.spread],i=Kv(e.meaning),o=i.length>1?1:0,l=s?e[s]:i[o],c=s?i:i.filter((p,h)=>h!==o),d=[{label:this.t("Card meaning"),body:c[0]??"",extra:c.slice(1).map(p=>Ce`<p>${p}</p>`)},...Go.filter(([p])=>p!==s).map(([p,h])=>({label:this.t(h),body:e[p]??""}))];return Ce`<li class="row"><div class="image card-art" part="chart">${e.imageUrl?Ce`<img src="${e.imageUrl}" alt="${e.name??this.t("Tarot card")}" class="${e.reversed?"reversed":""}">`:Ce`${e.name??"?"}`}</div><div class="row-head">${t?Ce`<p class="roxy-label">${t}</p>`:ft}<h3>${e.name??""} ${e.reversed?Ce`<small>${this.t("(reversed)")}</small>`:ft}</h3>${this.hideReadings?ft:Da(e.keywords)}</div>${this.hideReadings?ft:Ce`<div class="row-read">${r?Ce`<p class="ask">${r}</p>`:ft} ${l?Ce`<p class="lead">${l}</p>`:ft} ${this.renderInterpretation(d,`tarot-${e.id}`,"Guidance",true)}</div>`}</li>`}};Pr.endpoints=Ed,Pr.styles=[f,Rn,z,F,Bv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title{text-transform:capitalize}.question{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}.answer{font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight)}.answer.yes{color:var(--roxy-success-fg)}.answer.no{color:var(--roxy-danger-fg)}.answer.maybe{color:var(--roxy-warning-fg)}.verdict{align-items:start;gap:var(--roxy-space-md);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=26rem){.verdict{grid-template-columns:minmax(0,1fr)}}.verdict .meta{justify-items:start;gap:var(--roxy-space-sm);display:grid}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-content:start;gap:var(--roxy-space-sm) var(--roxy-space-lg);padding-block:var(--roxy-space-lg);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,8lh) minmax(0,1fr);grid-template-areas:"art head""art read";display:grid}.row:first-child{border-block-start:0;padding-block-start:0}.row .image{grid-area:art;align-self:start}.row-head{align-content:start;gap:var(--roxy-space-xs);overflow-wrap:anywhere;grid-area:head;display:grid}.row-read{align-content:start;gap:var(--roxy-space-sm);grid-area:read;display:grid}@container (width<=30rem){.row{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:minmax(0,5lh) minmax(0,1fr);grid-template-areas:"art head""read read"}}.rows.cast{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr))}.cast .row{border-block-start:0;grid-template-columns:minmax(0,1fr);grid-template-areas:"art""head";padding-block:0}.row-head h3{font-size:var(--roxy-text-lg);line-height:var(--roxy-leading-tight);margin:0}.ask{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-style:italic}.lead{line-height:1.7}.row-read .block{padding-top:var(--roxy-space-sm)}.summary{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);line-height:1.7}.card{align-content:start;gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr);display:grid}.image{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);width:100%;color:var(--roxy-muted);font-size:var(--roxy-text-xs);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}`],m([Hv({type:String,reflect:true})],Pr.prototype,"spread",2),Pr=m([x("roxy-tarot-spread")],Pr);import{css as Uv,html as Qe,nothing as Ue,svg as Va}from"lit";import{property as hc}from"lit/decorators.js";import{ifDefined as mc}from"lit/directives/if-defined.js";var yc=640,j=yc/2,qv=212,Yv=226,li=204,Wv=186,gc=168,jm=250,Km=142,ci=78,Zv=166,Vm={glyph:18,degree:10},Xv=.95,Jv=8,Qv=4,Fo=(n,a)=>w(n)??a,Bo=n=>{let a=new Map;for(let e of n)a.set(D(e.name),e);return a},Sa=class extends g{constructor(){super(...arguments);this.viewport=new Ae(this);this.heading="Transits";this.type=new Sr(this,{glyph:[".natal-glyph",Vm.glyph],degree:[".planet-deg",Vm.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,i)=>typeof s=="number"?{number:i+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,i)=>s.number-i.number);return t.every((s,i)=>s.number===i+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],r=e.transitPlanets??[],s=e.aspects??[],i=q(this.effectiveLang(),e.transitDate),o=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...r].some(c=>Number.isFinite(c.house));return Qe`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2>${this.t(this.heading)}</h2>${i||o?Qe`<p class="roxy-label">${[i,o].filter(Boolean).join(" \xB7 ")}</p>`:Ue}</div>${this.renderWheel(t,r,s)} ${this.renderLegend(t,r,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,r,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0\xB0 Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,r){return this.viewport.renderChartViewport(Qe`<svg viewBox="0 0 ${yc} ${yc}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${j}" cy="${j}" r="${li}" stroke-width="1.5"/><circle class="wheel-line" cx="${j}" cy="${j}" r="${gc}" stroke-width="0.8"/><circle class="wheel-line" cx="${j}" cy="${j}" r="${ci}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,r)} ${this.renderRing(e,Km,(s,i,o)=>Km-Ma(s,i,o,ya),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,jm,(s,i,o)=>jm+Ma(s,i,o,ya),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=A(j,j,s?gc:li-5,r),o=A(j,j,li,r);e.push(Va`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return Se.map((e,t)=>{let r=this.toAngle(t*30),s=A(j,j,ci,r),i=A(j,j,li,r);return Va`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,r)=>{let s=e[(r+1)%12],i=this.toAngle(t.longitude),o=A(j,j,ci,i),l=A(j,j,gc,i),c=A(j,j,Zv,this.toAngle(Oi(t.longitude,s?.longitude??t.longitude+30)));return Va`<g>
140
140
  <line class="house-cusp" x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} />
141
141
  <text class="house-num" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${t.number}</text>
142
- </g>`}):Ue}renderSigns(){return ke.map((e,t)=>{let r=E(B,B,Iv,this.toAngle(t*30+15));return Ka`<text class="sign-glyph roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(e)}</text>`})}renderRing(e,t,r,s,i,o){let l=Bv*this.type.size.glyph,c={width:l,height:l},d=f=>({width:(Pt.whole+(f.isRetrograde===true?Pt.retrograde:0))*this.type.size.degree,height:Pt.ink*this.type.size.degree}),h=Mt(l,t);return jt(e,f=>f.longitude,(f,v)=>Math.max(h,Mt((d(f).width+d(v).width)/2,r(90,c,d(f))))).map(({item:f,longitude:v,displayLongitude:L})=>{let $=this.toAngle(L),D=E(B,B,t,$),V=E(B,B,r($,c,d(f)),$),Ie=f.isRetrograde===true,vt=`${Bt(v).degree}\xB0`,la=y(f,"name"),Ea=`${i} ${la}${Ie?` ${this.t("retrograde")}`:""} - ${Ht(v)} ${y(f,"sign")}`,oi=Math.abs(L-v)>.5,li=E(B,B,t+o*Hv,this.toAngle(v)),Dn=E(B,B,t+o*jv,$);return Ka`<g>
143
- ${oi?Ka`<line class=${`leader ${s}`} x1=${li.x} y1=${li.y} x2=${Dn.x} y2=${Dn.y} />`:Ue}
144
- <text class=${`${s} roxy-glyph`} x=${D.x} y=${D.y} text-anchor="middle" dominant-baseline="central"><title>${Ea}</title>${No(f.name,la)}</text>
145
- <text class="planet-deg" x=${V.x} y=${V.y} text-anchor="middle" dominant-baseline="central">${vt}${Ie?Ka`<tspan class="retro roxy-glyph"> ${De}</tspan>`:Ue}</text>
146
- </g>`})}renderAspectLines(e,t,r){let s=zo(e),i=zo(t);return r.filter(Da).map(o=>{let l=i.get(M(o.planet1)),c=s.get(M(o.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return Ue;let d=E(B,B,ii-2,this.toAngle(l.longitude)),h=E(B,B,ii-2,this.toAngle(c.longitude)),p=$t(o),f=b(this.effectiveLang(),o.orb,1);return Ka`<line class=${`aspect ${Be(o)}`} style=${cn(o)} x1=${d.x} y1=${d.y} x2=${h.x} y2=${h.y}><title>${this.t("Transiting")} ${y(o,"planet1")} ${y(o,"type",p)} ${this.t("Natal")} ${y(o,"planet2")}${f?` (${this.t("Orb")} ${f}\xB0)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return Ue;let t=At(e);return[t,Fn(t)].map((r,s)=>{let i=this.toAngle(r),o=E(B,B,ni,i),l=E(B,B,Ov,i),c=E(B,B,Gv,i);return Ka`<g>
142
+ </g>`}):Ue}renderSigns(){return Se.map((e,t)=>{let r=A(j,j,Wv,this.toAngle(t*30+15));return Va`<text class="sign-glyph roxy-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(e)}</text>`})}renderRing(e,t,r,s,i,o){let l=Xv*this.type.size.glyph,c={width:l,height:l},d=u=>({width:(Mt.whole+(u.isRetrograde===true?Mt.retrograde:0))*this.type.size.degree,height:Mt.ink*this.type.size.degree}),p=_t(l,t);return jt(e,u=>u.longitude,(u,v)=>Math.max(p,_t((d(u).width+d(v).width)/2,r(90,c,d(u))))).map(({item:u,longitude:v,displayLongitude:L})=>{let $=this.toAngle(L),P=A(j,j,t,$),U=A(j,j,r($,c,d(u)),$),Ge=u.isRetrograde===true,$t=`${Ht(v).degree}\xB0`,la=y(u,"name"),Ea=`${i} ${la}${Ge?` ${this.t("retrograde")}`:""} - ${Pt(v)} ${y(u,"sign")}`,di=Math.abs(L-v)>.5,pi=A(j,j,t+o*Jv,this.toAngle(v)),An=A(j,j,t+o*Qv,$);return Va`<g>
143
+ ${di?Va`<line class=${`leader ${s}`} x1=${pi.x} y1=${pi.y} x2=${An.x} y2=${An.y} />`:Ue}
144
+ <text class=${`${s} roxy-glyph`} x=${P.x} y=${P.y} text-anchor="middle" dominant-baseline="central"><title>${Ea}</title>${Fo(u.name,la)}</text>
145
+ <text class="planet-deg" x=${U.x} y=${U.y} text-anchor="middle" dominant-baseline="central">${$t}${Ge?Va`<tspan class="retro roxy-glyph"> ${be}</tspan>`:Ue}</text>
146
+ </g>`})}renderAspectLines(e,t,r){let s=Bo(e),i=Bo(t);return r.filter(Aa).map(o=>{let l=i.get(D(o.planet1)),c=s.get(D(o.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return Ue;let d=A(j,j,ci-2,this.toAngle(l.longitude)),p=A(j,j,ci-2,this.toAngle(c.longitude)),h=wt(o),u=b(this.effectiveLang(),o.orb,1);return Va`<line class=${`aspect ${Be(o)}`} style=${dn(o)} x1=${d.x} y1=${d.y} x2=${p.x} y2=${p.y}><title>${this.t("Transiting")} ${y(o,"planet1")} ${y(o,"type",h)} ${this.t("Natal")} ${y(o,"planet2")}${u?` (${this.t("Orb")} ${u}\xB0)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return Ue;let t=At(e);return[t,Hn(t)].map((r,s)=>{let i=this.toAngle(r),o=A(j,j,li,i),l=A(j,j,qv,i),c=A(j,j,Yv,i);return Va`<g>
147
147
  <line class="axis-tick" x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} />
148
148
  <text class="axis-label" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${s===0?this.t("ASC"):this.t("DSC")}</text>
149
- </g>`})}renderLegend(e,t,r,s){return Qe`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${r.length>0?Qe`<span>${this.t("{{count}} aspects",{count:r.filter(Da).length})}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:Ue} ${s?Qe`<span>${this.t("{{label}}: {{value}}",{label:re(this.effectiveLang(),"houseSystem"),value:F(this.effectiveLang(),"houseSystem",s)})}</span>`:Ue} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return Ue;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return Qe`<div part="details"><p class="counts" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Qe`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:Ue} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>Qe`<span>${this.t("{{label}}: {{value}}",{label:Te({type:r}),value:s})}</span>`)}</p>${e.strongest?this.renderStrongest(e.strongest):Ue}</div>`}renderStrongest(e){let t=y(e,"planet1"),r=y(e,"planet2");return Qe`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph roxy-glyph">${No(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="asp-name ${Be(e)}">${y(e,"type",Te(e))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${No(e.planet2,r)}</span>${this.t("Natal")} ${r} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${b(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${b(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,r){if(e.length===0&&t.length===0)return Ue;let s=zo(e),i=zo(t),o=e.length>0?e:t,l=d=>d?Qe`${Fe(N(d.sign))} ${Ht(d.longitude)} ${y(d,"sign")}${d.isRetrograde?Qe`<span class="retro-badge roxy-glyph" aria-label="${this.t("retrograde")}">${De}</span>`:Ue}`:Ue,c=d=>r?Qe`<td>${d&&Number.isFinite(d.house)?d.house:Ue}</td>`:Ue;return Qe`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${r?this.t("Both house numbers are read against the natal house cusps."):Ue}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${r?Qe`<th scope="col">${this.t("Natal house")}</th>`:Ue}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${r?Qe`<th scope="col">${this.t("Transiting house")}</th>`:Ue}</tr></thead><tbody>${o.map(d=>{let h=M(d.name),p=y(d,"name");return Qe`<tr><th scope="row"><span aria-hidden="true" class="glyph roxy-glyph">${No(d.name,p)}</span> ${p}</th><td>${l(s.get(h))}</td>${c(s.get(h))}<td>${l(i.get(h))}</td>${c(i.get(h))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return Qe`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${lc(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${lc(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?Ue:Qe`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${lc(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};Sa.endpoints=Sd,Sa.styles=[u,He,dn,z,zv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,47.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.natal-glyph,.swatch--natal{--_ring:var(--roxy-accent-ink)}.transit-glyph,.swatch--transit{--_ring:var(--roxy-fg)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.transit-glyph,.natal-glyph{fill:var(--_ring);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.leader{stroke:var(--_ring);stroke-width:.6px;opacity:.6}.planet-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .625)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.house-cusp{stroke:var(--roxy-secondary);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625)}.axis-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:calc(var(--roxy-text-base) * 1.625)}.planet-deg{font-size:calc(var(--roxy-text-base) * .875)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.counts{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_ring);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-start:var(--roxy-space-sm);display:flex}.strongest .meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}.retro-badge{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}`],m([oc({type:String})],Sa.prototype,"heading",2),m([oc({type:Number})],Sa.prototype,"ascendant",2),m([oc({type:Array})],Sa.prototype,"houses",2),Sa=m([x("roxy-transit-wheel")],Sa);import{css as Kv,html as Ra,nothing as pc}from"lit";import{state as Vv}from"lit/decorators.js";var Pr=class extends g{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:r,transitPlanets:s,transitAspects:i,summary:o}=e,l=[C(this.effectiveLang(),t),Dt(this.effectiveLang(),r)].filter(Boolean).join(" "),c=i?.length??0,d=this.tab;return Ra`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2>${this.t("Transits")}</h2>${l?Ra`<p class="roxy-label">${l}</p>`:pc}</div>${c>0?Ra`${mt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:d,onSelect:h=>{this.tab=h},label:this.t("Transit views"),idPrefix:"transits",controls:true})}<div id="transits-panel-${d}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${d}">${d==="positions"?this.renderPlanetsTable(s):Ra`${o?this.renderSummaryCounts(o):pc} ${this.renderAspectsList(i??[])}`}</div>`:this.renderPlanetsTable(s)}</div>`}renderSummaryCounts(e){return Ra`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.totalAspects})}</span> <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`}renderPlanetsTable(e){return Ra`<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let r=w(t.name)??"",s=N(t.sign)??"",i=t.speed>=0?"\u2191":"\u2193";return Ra`<tr><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${r}</span> ${y(t,"name")} ${t.isRetrograde?Ra`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${De}</span>`:pc}</div></td><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${s}</span> ${y(t,"sign")}</div></td><td class="num">${Zt(t.degree)}</td><td class="speed"><span aria-hidden="true">${i}</span> ${b(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("\xB0/day")}</td></tr>`})}</tbody></table></div>`}renderAspectsList(e){return Ra`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,r)=>{let s=w(t.transitPlanet)??"",i=w(t.natalPlanet)??"",o=t.interpretation,l=Te(t),c=t.isApplying?this.t("Applying"):this.t("Separating");return Ra`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${r===0}"><summary><span class="roxy-glyph" aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="asp-name ${Be(t)}">${l}</span> <span class="roxy-glyph" aria-hidden="true">${i}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:c,orb:b(this.effectiveLang(),t.orb,2),strength:b(this.effectiveLang(),t.strength,1)})} </span>${j()}</summary><div class="interp-body">${Mn(o,this.translator)}</div></details>`})}</div>`}};Pr.endpoints=Rd,Pr.styles=[u,et,z,Aa,Kv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}.glyph{line-height:1}.planet-cell{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}td.num,.speed{color:var(--roxy-muted)}.speed{white-space:nowrap}.aspect-card{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.aspect-card summary{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.asp-name{font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.aspect-card .interp-body{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-xs)}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs)}`],m([Vv()],Pr.prototype,"tab",2),Pr=m([x("roxy-transits-table")],Pr);import{css as Uv,html as Cn,nothing as qv}from"lit";var Yv=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],qs=class extends g{renderData(a){let e=Yv.filter(t=>a[t.key]?.length);return e.length?Cn`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,a[t.key]))}</div>`:this.renderEmpty()}renderGroup(a,e){let t=Cn`<div class="group-head"><h3>${this.t(a.titleSource)}</h3><p class="group-note">${this.t(a.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(a.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(a.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(r=>{let s=N(r.rashi)??"";return Cn`<tr><td class="name">${r.name}</td><td>${s?Cn`<span class="glyph roxy-glyph">${s}</span>`:qv}${r.rashi??""}</td><td>${typeof r.longitude=="number"?tt(r.longitude):""}</td><td>${b(this.effectiveLang(),r.longitude,2)}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return a.key==="timeBased"?Cn`<section part="section time-based">${t}</section>`:Cn`<section part="section sun-based">${t}</section>`}};qs.endpoints=Cd,qs.styles=[u,I,Uv`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],qs=m([x("roxy-upagraha-table")],qs);import{css as Wv,html as ge,nothing as Ce,svg as Tn}from"lit";import{property as Zv}from"lit/decorators.js";import{ifDefined as Im}from"lit/directives/if-defined.js";var Xv=["North","East","South","West"],Jv={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},Qv={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},e1={feet:"ft\xB2",metres:"m\xB2"},Oo=.04,t1=8,a1=.88;function Fm(n){return"cells"in n}function r1(n){let a=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),t=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(t<2||a.length===0||e.length===0)return;let r=(Math.max(...a)-Math.min(...a))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(r>0)||!(s>0)))return{size:t,cellW:r,cellH:s,originX:Math.min(...a)-r/2,originY:Math.min(...e)-s/2}}function Go(n,a){let e=((a?.x??0)-n.originX)/n.cellW,t=n.size-((a?.y??0)-n.originY)/n.cellH;return[Bm(e),Bm(t)]}function Bm(n){return Math.round(n*1e3)/1e3}var Mr=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),r=Fm(e)?e:void 0,s=this.mode==="entrance"&&!Fm(e)?e:void 0,i=r?r1(r.cells??[]):s1(e.conventions?.grid);return ge`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?ge`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:Ce}</header>${this.renderGrid(t,i,r,s)} ${this.renderLegend(s,r)} ${this.renderDevatas(t,r?.cells)} ${this.renderFacts(t,e,r,s)} ${s?.effect&&!this.hideReadings?ge`<p class="effect" part="reading">${s.effect}</p>`:Ce} ${s?.reading&&!this.hideReadings?ge`<p class="reading" part="reading">${s.reading}</p>`:Ce} ${this.renderSources(r?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,r,s){if(!t)return Ce;let i=t.size,o=`${-Oo} ${-Oo} ${i+Oo*2} ${i+Oo*2}`;return ge`<div class="frame" part="chart">${Xv.map(l=>ge`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${F(e,"facing",l)}</span>`)} <svg viewBox="${o}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(r?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(i):Ce} ${s?this.renderDoor(e,s):Ce} ${this.renderVamsa(t,r?.vamsa)} ${this.renderBrahmasthan(t,r?.brahmasthan?.polygon)} ${this.renderAtimarma(t,r)}</svg></div>`}renderCell(e,t){let r=t.class??t.role??"",s=["pada",r?`pada-${r}`:"",t.withinPlot===false?"pada-outside":""].filter(Boolean).join(" "),i=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,i,[i,this.ringLabel(r)].filter(Boolean).join(" \xB7 "))}renderPada(e,t,r,s,i,o,l){let c=(t??1)-1,d=(r??1)-1,h=o.length>t1;return Tn`<g>
149
+ </g>`})}renderLegend(e,t,r,s){return Qe`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${r.length>0?Qe`<span>${this.t("{{count}} aspects",{count:r.filter(Aa).length})}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:Ue} ${s?Qe`<span>${this.t("{{label}}: {{value}}",{label:re(this.effectiveLang(),"houseSystem"),value:B(this.effectiveLang(),"houseSystem",s)})}</span>`:Ue} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return Ue;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return Qe`<div part="details"><p class="counts" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Qe`<span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.total})}</span>`:Ue} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>Qe`<span>${this.t("{{label}}: {{value}}",{label:Ee({type:r}),value:s})}</span>`)}</p>${e.strongest?this.renderStrongest(e.strongest):Ue}</div>`}renderStrongest(e){let t=y(e,"planet1"),r=y(e,"planet2");return Qe`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph roxy-glyph">${Fo(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="asp-name ${Be(e)}">${y(e,"type",Ee(e))}</span> <span aria-hidden="true" class="glyph roxy-glyph">${Fo(e.planet2,r)}</span>${this.t("Natal")} ${r} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${b(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${b(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,r){if(e.length===0&&t.length===0)return Ue;let s=Bo(e),i=Bo(t),o=e.length>0?e:t,l=d=>d?Qe`${Fe(N(d.sign))} ${Pt(d.longitude)} ${y(d,"sign")}${d.isRetrograde?Qe`<span class="retro-badge roxy-glyph" aria-label="${this.t("retrograde")}">${be}</span>`:Ue}`:Ue,c=d=>r?Qe`<td>${d&&Number.isFinite(d.house)?d.house:Ue}</td>`:Ue;return Qe`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${r?this.t("Both house numbers are read against the natal house cusps."):Ue}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${r?Qe`<th scope="col">${this.t("Natal house")}</th>`:Ue}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${r?Qe`<th scope="col">${this.t("Transiting house")}</th>`:Ue}</tr></thead><tbody>${o.map(d=>{let p=D(d.name),h=y(d,"name");return Qe`<tr><th scope="row"><span aria-hidden="true" class="glyph roxy-glyph">${Fo(d.name,h)}</span> ${h}</th><td>${l(s.get(p))}</td>${c(s.get(p))}<td>${l(i.get(p))}</td>${c(i.get(p))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return Qe`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${mc(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${mc(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?Ue:Qe`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${mc(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};Sa.endpoints=Dd,Sa.styles=[f,He,pn,z,Uv`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,47.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.natal-glyph,.swatch--natal{--_ring:var(--roxy-accent-ink)}.transit-glyph,.swatch--transit{--_ring:var(--roxy-fg)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.transit-glyph,.natal-glyph{fill:var(--_ring);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.leader{stroke:var(--_ring);stroke-width:.6px;opacity:.6}.planet-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .625)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.house-cusp{stroke:var(--roxy-secondary);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625)}.axis-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:calc(var(--roxy-text-base) * 1.625)}.planet-deg{font-size:calc(var(--roxy-text-base) * .875)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.counts{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_ring);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-start:var(--roxy-space-sm);display:flex}.strongest .meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}.retro-badge{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}`],m([hc({type:String})],Sa.prototype,"heading",2),m([hc({type:Number})],Sa.prototype,"ascendant",2),m([hc({type:Array})],Sa.prototype,"houses",2),Sa=m([x("roxy-transit-wheel")],Sa);import{css as e1,html as Ra,nothing as uc}from"lit";import{state as t1}from"lit/decorators.js";var Mr=class extends g{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:r,transitPlanets:s,transitAspects:i,summary:o}=e,l=[C(this.effectiveLang(),t),Dt(this.effectiveLang(),r)].filter(Boolean).join(" "),c=i?.length??0,d=this.tab;return Ra`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2>${this.t("Transits")}</h2>${l?Ra`<p class="roxy-label">${l}</p>`:uc}</div>${c>0?Ra`${mt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:d,onSelect:p=>{this.tab=p},label:this.t("Transit views"),idPrefix:"transits",controls:true})}<div id="transits-panel-${d}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${d}">${d==="positions"?this.renderPlanetsTable(s):Ra`${o?this.renderSummaryCounts(o):uc} ${this.renderAspectsList(i??[])}`}</div>`:this.renderPlanetsTable(s)}</div>`}renderSummaryCounts(e){return Ra`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span>${this.t("{{label}}: {{value}}",{label:this.t("Total"),value:e.totalAspects})}</span> <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`}renderPlanetsTable(e){return Ra`<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let r=w(t.name)??"",s=N(t.sign)??"",i=t.speed>=0?"\u2191":"\u2193";return Ra`<tr><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${r}</span> ${y(t,"name")} ${t.isRetrograde?Ra`<span class="retro roxy-glyph" aria-label="${this.t("retrograde")}">${be}</span>`:uc}</div></td><td><div class="planet-cell"><span class="glyph roxy-glyph" aria-hidden="true">${s}</span> ${y(t,"sign")}</div></td><td class="num">${Zt(t.degree)}</td><td class="speed"><span aria-hidden="true">${i}</span> ${b(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("\xB0/day")}</td></tr>`})}</tbody></table></div>`}renderAspectsList(e){return Ra`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,r)=>{let s=w(t.transitPlanet)??"",i=w(t.natalPlanet)??"",o=t.interpretation,l=Ee(t),c=t.isApplying?this.t("Applying"):this.t("Separating");return Ra`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${r===0}"><summary><span class="roxy-glyph" aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="asp-name ${Be(t)}">${l}</span> <span class="roxy-glyph" aria-hidden="true">${i}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} \xB7 orb {{orb}}\xB0 \xB7 str {{strength}}",{status:c,orb:b(this.effectiveLang(),t.orb,2),strength:b(this.effectiveLang(),t.strength,1)})} </span>${V()}</summary><div class="interp-body">${Nn(o,this.translator)}</div></details>`})}</div>`}};Mr.endpoints=Ad,Mr.styles=[f,et,z,Pa,e1`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}.glyph{line-height:1}.planet-cell{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}td.num,.speed{color:var(--roxy-muted)}.speed{white-space:nowrap}.aspect-card{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.aspect-card summary{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.asp-name{font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.aspect-card .interp-body{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-xs)}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs)}`],m([t1()],Mr.prototype,"tab",2),Mr=m([x("roxy-transits-table")],Mr);import{css as a1,html as Tn,nothing as r1}from"lit";var s1=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],qs=class extends g{renderData(a){let e=s1.filter(t=>a[t.key]?.length);return e.length?Tn`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,a[t.key]))}</div>`:this.renderEmpty()}renderGroup(a,e){let t=Tn`<div class="group-head"><h3>${this.t(a.titleSource)}</h3><p class="group-note">${this.t(a.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(a.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(a.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(r=>{let s=N(r.rashi)??"";return Tn`<tr><td class="name">${r.name}</td><td>${s?Tn`<span class="glyph roxy-glyph">${s}</span>`:r1}${r.rashi??""}</td><td>${typeof r.longitude=="number"?tt(r.longitude):""}</td><td>${b(this.effectiveLang(),r.longitude,2)}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return a.key==="timeBased"?Tn`<section part="section time-based">${t}</section>`:Tn`<section part="section sun-based">${t}</section>`}};qs.endpoints=Pd,qs.styles=[f,G,a1`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],qs=m([x("roxy-upagraha-table")],qs);import{css as n1,html as ye,nothing as Te,svg as En}from"lit";import{property as i1}from"lit/decorators.js";import{ifDefined as Um}from"lit/directives/if-defined.js";var o1=["North","East","South","West"],l1={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},c1={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},d1={feet:"ft\xB2",metres:"m\xB2"},Ho=.04,p1=8,h1=.88;function qm(n){return"cells"in n}function m1(n){let a=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),t=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(t<2||a.length===0||e.length===0)return;let r=(Math.max(...a)-Math.min(...a))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(r>0)||!(s>0)))return{size:t,cellW:r,cellH:s,originX:Math.min(...a)-r/2,originY:Math.min(...e)-s/2}}function jo(n,a){let e=((a?.x??0)-n.originX)/n.cellW,t=n.size-((a?.y??0)-n.originY)/n.cellH;return[Ym(e),Ym(t)]}function Ym(n){return Math.round(n*1e3)/1e3}var _r=class extends g{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),r=qm(e)?e:void 0,s=this.mode==="entrance"&&!qm(e)?e:void 0,i=r?m1(r.cells??[]):g1(e.conventions?.grid);return ye`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?ye`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:Te}</header>${this.renderGrid(t,i,r,s)} ${this.renderLegend(s,r)} ${this.renderDevatas(t,r?.cells)} ${this.renderFacts(t,e,r,s)} ${s?.effect&&!this.hideReadings?ye`<p class="effect" part="reading">${s.effect}</p>`:Te} ${s?.reading&&!this.hideReadings?ye`<p class="reading" part="reading">${s.reading}</p>`:Te} ${this.renderSources(r?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,r,s){if(!t)return Te;let i=t.size,o=`${-Ho} ${-Ho} ${i+Ho*2} ${i+Ho*2}`;return ye`<div class="frame" part="chart">${o1.map(l=>ye`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${B(e,"facing",l)}</span>`)} <svg viewBox="${o}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(r?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(i):Te} ${s?this.renderDoor(e,s):Te} ${this.renderVamsa(t,r?.vamsa)} ${this.renderBrahmasthan(t,r?.brahmasthan?.polygon)} ${this.renderAtimarma(t,r)}</svg></div>`}renderCell(e,t){let r=t.class??t.role??"",s=["pada",r?`pada-${r}`:"",t.withinPlot===false?"pada-outside":""].filter(Boolean).join(" "),i=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,i,[i,this.ringLabel(r)].filter(Boolean).join(" \xB7 "))}renderPada(e,t,r,s,i,o,l){let c=(t??1)-1,d=(r??1)-1,p=o.length>p1;return En`<g>
150
150
  <rect class=${s} x=${c} y=${d} width="1" height="1">
151
151
  <title>${l}</title>
152
152
  </rect>
153
153
  <text class="square-no" x=${c+.5} y=${d+.34}>${_(e,i)}</text>
154
- ${o?Tn`<text
154
+ ${o?En`<text
155
155
  class="devata"
156
156
  x=${c+.5}
157
157
  y=${d+.68}
158
- textLength=${Im(h?a1:void 0)}
159
- lengthAdjust=${Im(h?"spacingAndGlyphs":void 0)}
158
+ textLength=${Um(p?h1:void 0)}
159
+ lengthAdjust=${Um(p?"spacingAndGlyphs":void 0)}
160
160
  >${o}</text
161
- >`:Ce}
162
- </g>`}renderEmptyGrid(e){let t=[];for(let r=0;r<e;r++)for(let s=0;s<e;s++)t.push(Tn`<rect class="pada" x=${s} y=${r} width="1" height="1"></rect>`);return t}renderDoor(e,t){let r=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,r,r)}renderVamsa(e,t){return(t??[]).map(r=>{let[s,i]=Go(e,r.from),[o,l]=Go(e,r.to);return Tn`<line class="vamsa" x1=${s} y1=${i} x2=${o} y2=${l}></line>`})}renderBrahmasthan(e,t){let r=t??[];if(r.length<3)return Ce;let s=r.map(i=>Go(e,i).join(",")).join(" ");return Tn`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let r=new Set(t?.atimarma??[]);return r.size===0?Ce:(t?.cells??[]).filter(s=>s.square!=null&&r.has(s.square)).map(s=>{let[i,o]=Go(e,s.center);return Tn`<circle class="atimarma" cx=${i} cy=${o} r="0.06"></circle>`})}renderDevatas(e,t){let r=new Map;for(let s of t??[])!s.devataName||s.square==null||r.set(s.devataName,[...r.get(s.devataName)??[],s.square]);return r.size===0?Ce:ge`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...r].map(([s,i])=>ge`<li><b>${s}</b> ${i.sort((o,l)=>o-l).map(o=>_(e,o)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return ge`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let r=(t?.cells??[]).some(s=>s.withinPlot===false);return ge`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${r?ge`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:Ce}</div>`}renderFacts(e,t,r,s){let i=t.conventions?.grid;return ge`<div class="facts" part="details">${i?ge`<span><span class="roxy-label">${re(e,"grid")}</span><b>${F(e,"grid",i)}</b></span>`:Ce} ${s?.pada!=null?ge`<span><span class="roxy-label">${this.t("Pada")}</span><b>${_(e,s.pada)}</b></span>`:Ce} ${s?.side?ge`<span><span class="roxy-label">${this.t("Side")}</span><b>${F(e,"facing",s.side)}</b></span>`:Ce} ${s?.startCorner?ge`<span><span class="roxy-label">${this.t("Counted from")}</span>${F(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?ge`· ${_(e,s.ordinalOnSide)}`:Ce}</span>`:Ce} ${s?.devata?.name?ge`<span><span class="roxy-label">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?ge`· ${this.t("Pada")} ${_(e,s.devata.padaCount)}`:Ce}</span>`:Ce} ${s?.recommendedPadas?.length?ge`<span><span class="roxy-label">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(o=>_(e,o)).join(", ")}</span>`:Ce} ${r?.brahmasthan?.area!=null?ge`<span><span class="roxy-label">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,r.brahmasthan.area,r.conventions?.unit)}</b></span>`:Ce} ${r?.marma?.areaEach!=null?ge`<span><span class="roxy-label">${this.t("Area of one marma")}</span>${this.areaLabel(e,r.marma.areaEach,r.conventions?.unit)}</span>`:Ce} ${r?.atimarma?.length?ge`<span><span class="roxy-label">${this.t("Crossing points")}</span>${r.atimarma.map(o=>_(e,o)).join(", ")}</span>`:Ce}</div>`}renderSources(e){return e.length===0?Ce:ge`<section part="section sources"><ul class="cites">${e.map(t=>ge`<li>${qn(t)}</li>`)}</ul></section>`}areaLabel(e,t,r){let s=b(e,t,2);if(!r)return s;let i=e1[r]??`${r}\xB2`;return ge`<span title="${F(e,"unit",r)}">${s} ${i}</span>`}ringLabel(e){let t=Jv[e];return t?this.t(t):R(e)}verdictLabel(e){let t=Qv[e];return t?this.t(t):R(e)}};Mr.endpoints=Td,Mr.styles=[u,Wv`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);--_brahma:color-mix(in srgb, var(--roxy-accent) 16%, var(--roxy-surface));--_outside:color-mix(in srgb, var(--roxy-muted) 18%, var(--roxy-surface));--_door:color-mix(in srgb, var(--roxy-success) 26%, var(--roxy-surface));grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.verdict-auspicious{color:var(--roxy-success-fg)}.verdict-inauspicious{color:var(--roxy-danger-fg)}.verdict-mixed{color:var(--roxy-warning-fg)}.frame{place-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-xs);inline-size:100%;max-inline-size:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";margin-inline:auto;display:grid}.compass{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface);stroke:var(--roxy-border);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent) 7%, var(--roxy-surface))}.pada-center,.pada-brahma{fill:var(--_brahma)}.pada-outside{fill:var(--_outside)}.pada-door{fill:var(--_door);stroke:var(--roxy-fg);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink)}text{fill:var(--roxy-fg);text-anchor:middle}.devata{font-size:calc(var(--roxy-text-base) * .011875)}.square-no{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .00875)}@container (width<=30rem){.devata{display:none}.square-no{font-size:calc(var(--roxy-text-base) * .02125);dominant-baseline:middle;translate:0 .31lh}}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b,.devatas b{color:var(--roxy-fg)}.devatas{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-brahma{background:var(--_brahma)}.swatch-outside{background:var(--_outside)}.swatch-door{background:var(--_door)}.effect{margin:0;padding-block-start:var(--roxy-space-md)}.reading{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}.cites{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin:0;padding:0;list-style:none}`],m([Zv({type:String,reflect:true})],Mr.prototype,"mode",2),Mr=m([x("roxy-vastu-mandala")],Mr);function s1(n){let a=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(a));if(!(!Number.isFinite(e)||e<2||e*e!==a))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}import{css as n1,html as Ca,nothing as En}from"lit";var Ys=class extends g{renderData(a){let e=a.aspects??[],t=a.mutualAspects??[],r=a.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=a.datetime?U(this.effectiveLang(),a.datetime):"";return Ca`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2>${this.t("Vedic aspects")}</h2>${s?Ca`<p class="roxy-label">${this.t("Chart time {{when}}",{when:s})}</p>`:En}</div>${r.length>0?Ca`<div part="section positions"><h3 class="section-label">${this.t("Sidereal positions")}</h3><ul class="roxy-chips">${r.map(i=>Ca`<li class="position"><strong>${i.name}</strong> ${typeof i.longitude=="number"?tt(i.longitude):i.sign??""}</li>`)}</ul></div>`:En} ${t.length>0?Ca`<div part="section mutual-aspects"><h3 class="section-label">${this.t("Mutual aspects")}</h3><ul class="roxy-chips">${t.map(i=>Ca`<li class="mutual-pill">${i.planet1} <span class="roxy-glyph" aria-hidden="true">${zp}</span> ${i.planet2} ${i.aspectType?Ca`<span class="rel">${i.aspectType}</span>`:En}</li>`)}</ul></div>`:En} ${e.length>0?Ca`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Vedic aspects")}"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(i=>Ca`<tr><td>${i.aspectingPlanet}</td><td><span class="kind">${i.aspectType}</span></td><td>${i.aspectedPlanet}</td><td>${typeof i.strength=="number"?Ca`<span class="bar" style="--_v:${Math.max(10,Math.min(100,i.strength))}"></span><span class="num">${b(this.effectiveLang(),i.strength,0)}</span>`:En}</td><td class="num">${typeof i.orb=="number"?`${b(this.effectiveLang(),i.orb,2)}\xB0`:""}</td></tr>`)}</tbody></table></div>`:En}</div>`}};Ys.endpoints=Ed,Ys.styles=[u,n1`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.section-label{margin-block-end:var(--roxy-space-xs)}.position,.mutual-pill{font-variant-numeric:tabular-nums;min-width:0}.position strong,.mutual-pill{color:var(--roxy-fg)}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.kind{font-weight:var(--roxy-weight-bold)}.num{color:var(--roxy-muted)}.bar{inline-size:calc(var(--_v) * 5ch / 100);block-size:.3lh;border-radius:var(--roxy-radius-full);background:var(--roxy-accent);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`],Ys=m([x("roxy-vedic-aspects")],Ys);import{css as i1,html as ae,nothing as qe}from"lit";var hc={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},o1=Object.keys(hc),l1={favourable:"success",aggravated:"danger",unfavourable:"danger"},Hm=8,Io={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},c1={day:"Day",finance:"Finance",natal:"Natal"},jm={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},Ws=class extends g{renderData(a){let e=a.grahas??[];return e.length?ae`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(a)} ${this.renderPanchanga(a)} ${this.renderGrahas(e,a.houseThemes)} ${this.renderWindows(a)} ${this.renderFinance(a)} ${this.renderDasha(a)} ${this.renderProvenance(a)}</div>`:this.renderEmpty()}renderHead(a){let e=new Map((a.tally??[]).map(r=>[r.state,r.count])),t=e.get("favourable")??0;return ae`<header class="head" part="header"><div class="title-row"><h2>${this.t("Vedic daily")}</h2><span class="roxy-label">${rn(this.effectiveLang(),a.dayStart,a.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${a.verdict}">${this.t(Io[a.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:a.evaluated})}</span></div>${e.size?ae`<ul class="tally roxy-chips" part="legend">${o1.filter(r=>e.get(r)).map(r=>ae`<li class="pill">${this.t(hc[r])} ${e.get(r)}</li>`)}</ul>`:qe} ${a.subject?ae`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:a.subject.janmaRashi,nakshatra:a.subject.janmaNakshatra})}</p>`:qe} ${(a.degraded??[]).map(r=>ae`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:r.component,reason:r.reason})}</p>`)}</header>`}renderPanchanga(a){let e=a.panchanga;if(!e)return qe;let t=(r,s)=>s?ae`<div><dt>${r}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?ae`<span class="until">${this.t("until {{time}}",{time:U(this.effectiveLang(),s.validTo)})}</span>`:qe}</dd></div>`:qe;return ae`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="roxy-facts" part="details"><div><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(a,e){return a?.[String(e)]?.join(", ")??""}renderGrahas(a,e){return ae`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Grahas today")}"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${a.map(t=>{let r=w(t.graha)??"",s=this.theme(e,t.houseFromMoon);return ae`<tr><td>${r?ae`<span class="glyph roxy-glyph">${r}</span>`:qe}${t.graha}</td><td>${t.sign}</td><td title="${s}">${t.houseFromMoon}</td><td>${typeof t.binduCount=="number"?t.binduCount:""}</td><td>${this.renderKaksha(t.kaksha)}</td><td><span class="state roxy-chip ${t.state}" data-tone="${l1[t.state]??qe}" title="${t.stateSource??""}">${this.t(hc[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(a){if(!a||typeof a.number!="number")return qe;let e=a.bindu===true?"yes":a.bindu===false?"no":"",t=a.bindu===true?this.t("this kaksha lord gave bindu"):a.bindu===false?this.t("this kaksha lord gave no bindu"):"",r=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:a.number,total:Hm,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)});return ae`<span class="kaksha" title="${t?`${r} \xB7 ${t}`:r}">${a.number}/${Hm} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(a){let e=a.tara??[],t=a.chandrabala??[];if(!e.length&&!t.length)return qe;let r=(s,i)=>ae`<small>${rn(this.effectiveLang(),s,i)}</small>`;return ae`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?ae`<div class="chips">${e.map(s=>ae`<span class="window"><span>${s.number}. ${s.name}${s.quality?` \xB7 ${s.quality}`:""}</span> ${r(s.validFrom,s.validTo)}</span>`)}</div>`:qe} ${t.length?ae`<div class="chips">${t.map(s=>ae`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?ae`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:qe} </span>${r(s.validFrom,s.validTo)}</span>`)}</div>`:qe}</section>`}renderFinance(a){let e=a.areas?.finance;if(!e)return qe;let t=a.houseThemes,r=s=>{let i=this.theme(t,s.house);return ae`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${i?` (${i})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?ae`<span class="note">${s.dashaLevels.map(o=>this.t(jm[o])).join(", ")}</span>`:qe}</li>`};return ae`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(Io[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?ae`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:qe}</div><div class="lists">${e.drivers?.length?ae`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(r)}</ul></div>`:qe} ${e.cautions?.length?ae`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(r)}</ul></div>`:qe}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(a){return a?ae`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${a.band}">${this.t(Io[a.band])}</span> <span class="evidence">${a.score}</span></div><ul class="layers">${a.layers.map(e=>ae`<li><span>${this.t(c1[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(Io[e.band])}</span></li>`)}</ul></div>`:qe}renderDasha(a){let e=a.dasha??[];return e.length?ae`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>ae`<span class="window"><span>${this.t(jm[t.level])} · ${t.lord}</span> <small>${rn(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:qe}renderProvenance(a){return a.frames?ae`<section class="block" part="section frame">${Gp(this.effectiveLang(),a.frames,this.translator)}</section>`:qe}};Ws.endpoints=Dd,Ws.styles=[u,I,se,i1`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}h2,h3,p{margin:0}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{color:var(--roxy-secondary);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.verdict:is(.very-strong,.strong){color:var(--roxy-success-fg)}.verdict.moderate{color:var(--roxy-accent-ink)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.pill{font-variant-numeric:tabular-nums}.roxy-facts{margin:0}.until{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.state{cursor:help}.kaksha{align-items:center;gap:var(--roxy-space-xs);cursor:help;display:inline-flex}.dot{aspect-ratio:1;border-radius:var(--roxy-radius-full);background:var(--roxy-border);inline-size:1ch}.dot.yes{background:var(--roxy-success)}.dot.no{background:var(--roxy-warning)}.chips{gap:var(--roxy-space-sm) var(--roxy-space-lg);flex-wrap:wrap;display:flex}.window{font-size:var(--roxy-text-sm);display:grid}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.window.yes>:first-child{color:var(--roxy-success-fg)}.window.no>:first-child,.mark{color:var(--roxy-danger-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.composite{gap:var(--roxy-space-sm);display:grid}.layers{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary)}`],Ws=m([x("roxy-vedic-daily")],Ws);import{html as d1}from"lit";import{property as mc}from"lit/decorators.js";import{unsafeHTML as p1}from"lit/directives/unsafe-html.js";var Ta=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?Ji(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return d1`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${r}</h2>${Q(this.effectiveLang(),e.frame,this.translator)} ${eo(t,this.translator)}</div>${to(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(p1(Qi(t,{style:this.chartStyle,lang:this.effectiveLang()})),r,this.translator)}</div></div>`}};Ta.endpoints=Ad,Ta.styles=[u,He,I,Ci,ao,et],m([mc({type:String,reflect:true,attribute:"chart-style"})],Ta.prototype,"chartStyle",2),m([mc({type:String,reflect:true,attribute:"chart-reference"})],Ta.prototype,"chartReference",2),m([mc({type:String,reflect:true,attribute:"lagna-override"})],Ta.prototype,"lagnaOverride",2),Ta=m([x("roxy-vedic-kundli")],Ta);import{css as h1,html as ye,nothing as Ye}from"lit";var m1=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Km=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],Zs=class extends g{orderedRows(){let a=this.data?.meta??{},e=new Set,t=[];for(let r of m1){let s=a[r];s&&(t.push([r,s]),e.add(r))}for(let[r,s]of Object.entries(a))e.has(r)||t.push([r,s]);return t}renderData(a){if(!a.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,r])=>r.avasthaInfo);return ye`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2>${this.t("Planetary positions")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Planetary positions")}"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):Ye}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([r,s])=>{let i=(s.graha??r)==="Lagna",o=w(s.graha??r)??"",l=N(s.rashi)??"";return ye`<tr class="${i?"lagna":""}"><td class="graha">${o?ye`<span class="glyph roxy-glyph">${o}</span>`:Ye}${s.graha??r}</td><td>${l?ye`<span class="glyph roxy-glyph">${l}</span>`:Ye}${s.rashi??""}</td><td>${typeof s.longitude=="number"?tt(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${typeof s.house=="number"?s.house:""}</td>${Km.map(([c])=>ye`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?ye`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Ye}</td>`)}<td>${s.isRetrograde?ye`<span class="retro">R</span>`:Ye}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let a=this.data?.modernPlanets??[];return a.length===0?Ye:a.map((e,t)=>{let r=N(e.rashi)??"";return ye`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${Nn(e.planet,e.sanskritName)}</td><td>${r?ye`<span class="glyph roxy-glyph">${r}</span>`:Ye}${e.rashi??""}</td><td>${typeof e.longitude=="number"?tt(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td>${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?ye`<span class="retro">R</span>`:Ye}</td></tr>`})}renderCombustion(){let a=this.data?.combustion??[];return a.length===0?Ye:ye`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${a.length}</span>${j()}</summary><div class="panel-body">${a.map(e=>{let t=w(e.planet)??"",r=b(this.effectiveLang(),e.distanceFromSun,2),s=b(this.effectiveLang(),e.orb,1);return ye`<div class="condition"><span class="planet">${Fe(t)} ${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:r,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let a=this.data?.planetaryWar??[];return a.length===0?Ye:ye`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${a.length}</span>${j()}</summary><div class="panel-body">${a.map(e=>{let t=b(this.effectiveLang(),e.distance,2);return ye`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return Ye;let a=this.data?.interpretations??{},e=this.orderedRows().map(([t,r])=>[r.graha??t,a[r.graha??t],r.avasthaInfo]).filter(([,t,r])=>t!=null||r!=null);return e.length===0?Ye:ye`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${j()}</summary><div class="panel-body">${e.map(([t,r,s])=>{let i=w(t)??"";return ye`<div class="interp"><span class="planet">${Fe(i)} ${t}</span> ${r?.rashi?ye`<p><span class="label">${this.t("Rashi.")}</span> ${r.rashi}</p>`:Ye} ${r?.nakshatra?ye`<p><span class="label">${this.t("Nakshatra.")}</span> ${r.nakshatra}</p>`:Ye} ${Km.map(([o,l])=>s?.[o]?.interpretation?ye`<p><span class="label">${this.t(l)}</span> ${s[o].interpretation}</p>`:Ye)}</div>`})}</div></details>`}renderHouses(){let a=(this.data?.houses??[]).filter(e=>e.name||e.description);return a.length===0?Ye:ye`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${a.length}</span>${j()}</summary><div class="panel-body">${a.map(e=>ye`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?ye`<p class="desc">${e.description}</p>`:Ye}</div>`)}</div></details>`}renderYogas(){let a=(this.data?.yogas??[]).filter(e=>e.present);return a.length===0?Ye:ye`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${a.length}</span>${j()}</summary><div class="panel-body">${a.map(e=>ye`<div class="bhava"><span class="name">${e.name} ${e.quality?ye`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Ye}</span> ${e.result?ye`<p class="desc">${e.result}</p>`:Ye}</div>`)}</div></details>`}};Zs.endpoints=Pd,Zs.styles=[u,I,z,h1`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lagna td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}tbody tr.lagna .glyph{color:var(--roxy-accent-ink)}tbody tr.modern-first td{border-block-start:var(--roxy-line-thick) solid var(--roxy-border)}td.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.gloss{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:block}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}details.panel{border-block-start:1px solid var(--roxy-border)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);padding:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.summary-count{margin-inline:auto var(--roxy-space-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums}.panel-body{gap:var(--roxy-space-sm);padding:0 var(--roxy-space-md) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,1fr);display:grid}.condition{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}:is(.condition,.interp) .planet,.bhava .name{font-weight:var(--roxy-weight-bold)}.condition .detail{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.condition .winner{color:var(--roxy-success-fg);font-weight:var(--roxy-weight-bold)}.interp,.bhava{gap:calc(var(--roxy-space-unit) / 2);display:grid}.interp .label{color:var(--roxy-muted);font-weight:var(--roxy-weight-bold)}.bhava .desc{color:var(--roxy-muted)}.quality{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.quality.positive{color:var(--roxy-success-fg)}.quality.negative{color:var(--roxy-danger-fg)}.quality.both{color:var(--roxy-muted)}`],Zs=m([x("roxy-vedic-planets-table")],Zs);import{css as g1,html as We,nothing as It}from"lit";import{state as y1}from"lit/decorators.js";function Vm(n){return n.suppressedBy||void 0}var Um=["classical","asraya","dala","akriti","sankhya"];function qm(n){let a=Um.indexOf(n.family);return a===-1?Um.length:a}var u1=[{id:"present",source:"Present",open:true,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:true,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:false,noteSource:"At least one classical condition fails. Read the evidence for which."}],f1={Positive:"success",Negative:"danger",Both:"warning"},_r=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Vm(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return It;let r=[...t].sort((s,i)=>qm(s)-qm(i));return We`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${r.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return We`<span class="quality-chip roxy-chip quality-${e}" data-tone="${f1[e]??It}">${e}</span>`}renderFamilyChip(e){return e.family?We`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${M(e.family)}</span>`:It}renderDetailCard(e){return We`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):It} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?We`<p class="description">${e.description}</p>`:It} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?It:We`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Vm(e),[r,s,i]=e.present?["is-present","Present","success"]:t?["is-outranked",`Outranked by ${M(t)}`,"warning"]:["is-absent","Not present",void 0];return We`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):It} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${r}" data-tone="${i??It}">${s}</span></p>${e.description&&!this.hideReadings?We`<p class="description">${e.description}</p>`:It} ${e.present?this.renderEffects(e.result):It} ${e.evidence?We`<p class="evidence">${e.evidence}</p>`:It}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let r=e;return We`<div class="wrap" part="card">${this.renderDetailCard(r)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let r=e.yogas;if(r.length>0&&"present"in r[0]){let c=r,d=t?c.filter(p=>p.name.toLowerCase().includes(t)):c,h=e.total??c.filter(p=>p.present).length;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:h,total:c.length})}</span></div>${Q(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${d.length>0?u1.map(p=>this.renderVerdictGroup(p,d.filter(f=>this.verdictOf(f)===p.id))):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(r.length>0&&"description"in r[0]){let c=r,d=t?c.filter(p=>p.name.toLowerCase().includes(t)):c,h=e.total;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${h!==void 0?We`<span class="count">${this.t("{{count}} total",{count:h})}</span>`:It}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${d.length>0?d.map(p=>this.renderDetailCard(p)):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=r,o=t?i.filter(c=>c.name.toLowerCase().includes(t)):i,l=e.total;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${l!==void 0?We`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:It}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${o.length>0?o.map(c=>We`<div class="yoga-chip">${c.name}</div>`):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return We`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};_r.endpoints=_d,_r.styles=[u,I,g1`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([y1()],_r.prototype,"filter",2),_r=m([x("roxy-yoga-list")],_r);import{css as x1,html as H,nothing as Z}from"lit";import{property as b1}from"lit/decorators.js";var Fo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Ym={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Nr=class extends g{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,r=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i="date"in e&&e.date?C(r,e.date):"";return H`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${y(t,"name")}</h2><div class="sub">${t.pinyin??""}${i?` ${i}`:""}</div></div>${s!==null?H`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:_(r,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:Z}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?H`<p class="prose" part="section interpretation">${e.interpretation}</p>`:Z} ${"conventions"in e?Qa(e.conventions,this.translator,this.effectiveLang()):Z}</article>`}renderIdentity(e,t){let r="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,i="element"in e&&typeof e.element=="string"?e:void 0,o=i?y(i,"element"):y(t,"element"),l=wt(i?.element??t.element),c="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!o&&!c&&!r&&!s&&!t.branch?Z:H`<div class="facts" part="details">${o?H`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${l}">${o}</b></span>`:Z} ${c?H`<span><span class="roxy-label">${this.t("Polarity")}</span>${c}</span>`:Z} ${t.branch?H`<span><span class="roxy-label">${this.t("Branch")}</span>${t.branch}</span>`:Z} ${r?H`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${r.stem??""}</b> ${r.branch??""}</span>`:Z} ${s&&typeof s.start=="number"?H`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:Z}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return Z;let t="year"in e?e.year:void 0,r="benMingNian"in e?e.benMingNian:false;return H`${H`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&Fo[e.relationship]?this.t(Fo[e.relationship]):e.relationship??""}</b></span> ${t?H`<span><span class="roxy-label">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&Fo[t.relationship]?this.t(Fo[t.relationship]):t.relationship??""}</span>`:Z} ${r?H`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:Z}</div>`} ${this.hideReadings?Z:H`${e.overview?H`<p class="prose" part="section overview">${e.overview}</p>`:Z}<div class="sections" part="section outlook">${"love"in e&&e.love?H`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:Z} ${"career"in e&&e.career?H`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:Z} ${"advice"in e&&e.advice?H`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:Z}</div>`} ${t?.note&&!this.hideReadings?H`<p class="prose" part="reading">${t.note}</p>`:Z}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return Z;let t=e;return H`${t.trine?H`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> <span class="element-word ${wt(t.trine.element)}">${y(t.trine,"element")}</span></span> ${t.trine.members?.length?H`<span class="roxy-chips">${t.trine.members.map(r=>H`<span class="roxy-chip">${r}</span>`)}</span>`:Z} ${t.trine.theme?H`<span>${t.trine.theme}</span>`:Z}</div></section>`:Z} ${this.renderPartners(t)} ${this.hideReadings?Z:H`${t.summary?H`<p class="prose" part="section summary">${t.summary}</p>`:Z} ${t.traits?.length?H`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${t.traits.map(r=>H`<li>${r}</li>`)}</ul></section>`:Z} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?H`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:Z}`}`}renderPartners(e){let r=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return r.length===0?Z:H`<section part="section partners"><div class="partners">${r.map(([s,i])=>H`<div class="partner"><span class="role roxy-label">${this.t(s)}</span> <span class="glyph" lang="zh">${i?.chinese??""}</span> <span class="who">${y(i,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?H`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(r=>H`<li>${r}</li>`)}</ul></section>`:Z}renderCompatibility(e){let t=e.signs?.first,r=e.signs?.second,s=typeof e.score=="number"?e.score:null;return H`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${y(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${y(r,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${y(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?H`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?H`<span class="roxy-chip tag">${Ym[e.verdict]?this.t(Ym[e.verdict]):e.verdict}</span>`:Z}</div>`:Z} ${e.sharedElement?H`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${wt(e.sharedElement)}">${y(e,"sharedElement")}</b></span></div>`:Z} ${this.hideReadings?Z:H`${e.summary?H`<p class="prose" part="section summary">${e.summary}</p>`:Z} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?H`<p class="prose" part="reading">${e.advice}</p>`:Z}`}</article>`}};Nr.endpoints=Nd,Nr.styles=[u,I,ua,x1`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],m([b1({type:String,reflect:true})],Nr.prototype,"mode",2),Nr=m([x("roxy-zodiac-card")],Nr);var Wm={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},post_reports_natal:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateNatalReport",attrs:{report:"natal"}},post_reports_synastry:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateSynastryReport",attrs:{report:"synastry"}},post_reports_kundli:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateKundliReport",attrs:{report:"kundli"}},post_reports_matchmaking:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateMatchmakingReport",attrs:{report:"matchmaking"}},post_reports_yearly_forecast:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateYearlyForecastReport",attrs:{report:"yearly-forecast"}},post_reports_human_design:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateHumanDesignReport",attrs:{report:"human-design"}},post_reports_bazi:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateBaziReport",attrs:{report:"bazi"}},post_reports_numerology:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateNumerologyReport",attrs:{report:"numerology"}},post_reports_tarot:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateTarotReport",attrs:{report:"tarot"}},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function Zm(n){let a=n.lastIndexOf(":"),e=a===-1?n:n.slice(a+1),t=Wm[e];return t?{...t,toolName:e}:void 0}var gc=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReport",tag:"roxy-report",slug:"report",heading:"Branded report",description:"Branded report for any /reports operation: the visitor fills the form, and the finished document arrives under your name as a PDF download or in place on the page",docsLabel:"Reports",endpointLabel:"POST /reports/...",docsSummary:"Form to finished branded report, as a PDF download or inline HTML",topic:"Reports"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:true},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:true},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:true}];var GP=gc.map(n=>n.slug);export{gc as ROXY_COMPONENTS,GP as ROXY_UI_COMPONENTS,Pn as ROXY_UI_VERSION,Xa as RoxyAlmanacDay,Hr as RoxyAngelNumberCard,jr as RoxyAngelNumberLookup,Kr as RoxyArudhaPadas,tr as RoxyAshtakavargaGrid,Vr as RoxyAspectsTable,qr as RoxyAstrocartographyMap,Yr as RoxyBaziChart,Zr as RoxyBhavChalitTable,Jr as RoxyBhavaBalaTable,rr as RoxyBiorhythmChart,or as RoxyBodygraph,rs as RoxyCharaKarakas,ss as RoxyChoghadiyaGrid,cr as RoxyCompatibilityCard,ns as RoxyCompoundNumber,is as RoxyCrystalCard,dr as RoxyCrystalGrid,Na as RoxyDashaTimeline,cs as RoxyData,pr as RoxyDivisionalChart,hr as RoxyDoshaCard,hs as RoxyDoshaConstitution,ms as RoxyDreamCard,gs as RoxyDreamSearch,pe as RoxyEndpointForm,yr as RoxyEphemerisTable,ys as RoxyFixedStars,ur as RoxyFlyingStarChart,fs as RoxyForecastDigest,xs as RoxyForecastTimeline,bs as RoxyGematria,Ls as RoxyGocharaTable,$s as RoxyGunaMilan,ws as RoxyHdConnection,ks as RoxyHdPenta,Ss as RoxyHdTypeCard,Rs as RoxyHdVariables,Cs as RoxyHeliacalTable,Ts as RoxyHexagram,Es as RoxyHoraTable,Ia as RoxyHoroscopeCard,br as RoxyKpChart,Ds as RoxyKpFinanceCard,As as RoxyKpPlanetsTable,Ms as RoxyKpRulingPlanets,vr as RoxyKuaCard,_s as RoxyLocalSpaceCompass,Ve as RoxyLocationSearch,Os as RoxyLuckPillars,$r as RoxyMayanDaySign,wr as RoxyMoonPhase,Gs as RoxyNakshatraCard,ja as RoxyNatalChart,Sr as RoxyNumerologyCard,Rr as RoxyPanchangTable,Cr as RoxyPositionsTable,Bs as RoxyProfectionCard,Hs as RoxyReferenceCard,js as RoxyRelocationWheel,Gt as RoxyReport,Ks as RoxyShadbalaTable,Vs as RoxySynastryChart,Er as RoxyTarotCard,Dr as RoxyTarotCatalog,Ar as RoxyTarotSpread,Sa as RoxyTransitWheel,Pr as RoxyTransitsTable,qs as RoxyUpagrahaTable,Mr as RoxyVastuMandala,Ys as RoxyVedicAspects,Ws as RoxyVedicDaily,Ta as RoxyVedicKundli,Zs as RoxyVedicPlanetsTable,Is as RoxyWesternPlanetsTable,_r as RoxyYogaList,Nr as RoxyZodiacCard,Zm as componentForTool,fi as expandCompact,Rg as roxyDataScript,mp as serializeRoxyData};
161
+ >`:Te}
162
+ </g>`}renderEmptyGrid(e){let t=[];for(let r=0;r<e;r++)for(let s=0;s<e;s++)t.push(En`<rect class="pada" x=${s} y=${r} width="1" height="1"></rect>`);return t}renderDoor(e,t){let r=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,r,r)}renderVamsa(e,t){return(t??[]).map(r=>{let[s,i]=jo(e,r.from),[o,l]=jo(e,r.to);return En`<line class="vamsa" x1=${s} y1=${i} x2=${o} y2=${l}></line>`})}renderBrahmasthan(e,t){let r=t??[];if(r.length<3)return Te;let s=r.map(i=>jo(e,i).join(",")).join(" ");return En`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let r=new Set(t?.atimarma??[]);return r.size===0?Te:(t?.cells??[]).filter(s=>s.square!=null&&r.has(s.square)).map(s=>{let[i,o]=jo(e,s.center);return En`<circle class="atimarma" cx=${i} cy=${o} r="0.06"></circle>`})}renderDevatas(e,t){let r=new Map;for(let s of t??[])!s.devataName||s.square==null||r.set(s.devataName,[...r.get(s.devataName)??[],s.square]);return r.size===0?Te:ye`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...r].map(([s,i])=>ye`<li><b>${s}</b> ${i.sort((o,l)=>o-l).map(o=>_(e,o)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return ye`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let r=(t?.cells??[]).some(s=>s.withinPlot===false);return ye`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${r?ye`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:Te}</div>`}renderFacts(e,t,r,s){let i=t.conventions?.grid;return ye`<div class="facts" part="details">${i?ye`<span><span class="roxy-label">${re(e,"grid")}</span><b>${B(e,"grid",i)}</b></span>`:Te} ${s?.pada!=null?ye`<span><span class="roxy-label">${this.t("Pada")}</span><b>${_(e,s.pada)}</b></span>`:Te} ${s?.side?ye`<span><span class="roxy-label">${this.t("Side")}</span><b>${B(e,"facing",s.side)}</b></span>`:Te} ${s?.startCorner?ye`<span><span class="roxy-label">${this.t("Counted from")}</span>${B(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?ye`· ${_(e,s.ordinalOnSide)}`:Te}</span>`:Te} ${s?.devata?.name?ye`<span><span class="roxy-label">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?ye`· ${this.t("Pada")} ${_(e,s.devata.padaCount)}`:Te}</span>`:Te} ${s?.recommendedPadas?.length?ye`<span><span class="roxy-label">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(o=>_(e,o)).join(", ")}</span>`:Te} ${r?.brahmasthan?.area!=null?ye`<span><span class="roxy-label">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,r.brahmasthan.area,r.conventions?.unit)}</b></span>`:Te} ${r?.marma?.areaEach!=null?ye`<span><span class="roxy-label">${this.t("Area of one marma")}</span>${this.areaLabel(e,r.marma.areaEach,r.conventions?.unit)}</span>`:Te} ${r?.atimarma?.length?ye`<span><span class="roxy-label">${this.t("Crossing points")}</span>${r.atimarma.map(o=>_(e,o)).join(", ")}</span>`:Te}</div>`}renderSources(e){return e.length===0?Te:ye`<section part="section sources"><ul class="cites">${e.map(t=>ye`<li>${Wn(t)}</li>`)}</ul></section>`}areaLabel(e,t,r){let s=b(e,t,2);if(!r)return s;let i=d1[r]??`${r}\xB2`;return ye`<span title="${B(e,"unit",r)}">${s} ${i}</span>`}ringLabel(e){let t=l1[e];return t?this.t(t):R(e)}verdictLabel(e){let t=c1[e];return t?this.t(t):R(e)}};_r.endpoints=Md,_r.styles=[f,n1`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);--_brahma:color-mix(in srgb, var(--roxy-accent) 16%, var(--roxy-surface));--_outside:color-mix(in srgb, var(--roxy-muted) 18%, var(--roxy-surface));--_door:color-mix(in srgb, var(--roxy-success) 26%, var(--roxy-surface));grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.verdict-auspicious{color:var(--roxy-success-fg)}.verdict-inauspicious{color:var(--roxy-danger-fg)}.verdict-mixed{color:var(--roxy-warning-fg)}.frame{place-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-xs);inline-size:100%;max-inline-size:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";margin-inline:auto;display:grid}.compass{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface);stroke:var(--roxy-border);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent) 7%, var(--roxy-surface))}.pada-center,.pada-brahma{fill:var(--_brahma)}.pada-outside{fill:var(--_outside)}.pada-door{fill:var(--_door);stroke:var(--roxy-fg);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink)}text{fill:var(--roxy-fg);text-anchor:middle}.devata{font-size:calc(var(--roxy-text-base) * .011875)}.square-no{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .00875)}@container (width<=30rem){.devata{display:none}.square-no{font-size:calc(var(--roxy-text-base) * .02125);dominant-baseline:middle;translate:0 .31lh}}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b,.devatas b{color:var(--roxy-fg)}.devatas{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-brahma{background:var(--_brahma)}.swatch-outside{background:var(--_outside)}.swatch-door{background:var(--_door)}.effect{margin:0;padding-block-start:var(--roxy-space-md)}.reading{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}.cites{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin:0;padding:0;list-style:none}`],m([i1({type:String,reflect:true})],_r.prototype,"mode",2),_r=m([x("roxy-vastu-mandala")],_r);function g1(n){let a=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(a));if(!(!Number.isFinite(e)||e<2||e*e!==a))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}import{css as y1,html as Ca,nothing as Dn}from"lit";var Ys=class extends g{renderData(a){let e=a.aspects??[],t=a.mutualAspects??[],r=a.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=a.datetime?q(this.effectiveLang(),a.datetime):"";return Ca`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2>${this.t("Vedic aspects")}</h2>${s?Ca`<p class="roxy-label">${this.t("Chart time {{when}}",{when:s})}</p>`:Dn}</div>${r.length>0?Ca`<div part="section positions"><h3 class="section-label">${this.t("Sidereal positions")}</h3><ul class="roxy-chips">${r.map(i=>Ca`<li class="position"><strong>${i.name}</strong> ${typeof i.longitude=="number"?tt(i.longitude):i.sign??""}</li>`)}</ul></div>`:Dn} ${t.length>0?Ca`<div part="section mutual-aspects"><h3 class="section-label">${this.t("Mutual aspects")}</h3><ul class="roxy-chips">${t.map(i=>Ca`<li class="mutual-pill">${i.planet1} <span class="roxy-glyph" aria-hidden="true">${Bp}</span> ${i.planet2} ${i.aspectType?Ca`<span class="rel">${i.aspectType}</span>`:Dn}</li>`)}</ul></div>`:Dn} ${e.length>0?Ca`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Vedic aspects")}"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(i=>Ca`<tr><td>${i.aspectingPlanet}</td><td><span class="kind">${i.aspectType}</span></td><td>${i.aspectedPlanet}</td><td>${typeof i.strength=="number"?Ca`<span class="bar" style="--_v:${Math.max(10,Math.min(100,i.strength))}"></span><span class="num">${b(this.effectiveLang(),i.strength,0)}</span>`:Dn}</td><td class="num">${typeof i.orb=="number"?`${b(this.effectiveLang(),i.orb,2)}\xB0`:""}</td></tr>`)}</tbody></table></div>`:Dn}</div>`}};Ys.endpoints=_d,Ys.styles=[f,y1`.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:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.section-label{margin-block-end:var(--roxy-space-xs)}.position,.mutual-pill{font-variant-numeric:tabular-nums;min-width:0}.position strong,.mutual-pill{color:var(--roxy-fg)}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.kind{font-weight:var(--roxy-weight-bold)}.num{color:var(--roxy-muted)}.bar{inline-size:calc(var(--_v) * 5ch / 100);block-size:.3lh;border-radius:var(--roxy-radius-full);background:var(--roxy-accent);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`],Ys=m([x("roxy-vedic-aspects")],Ys);import{css as u1,html as ae,nothing as qe}from"lit";var fc={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},f1=Object.keys(fc),x1={favourable:"success",aggravated:"danger",unfavourable:"danger"},Wm=8,Ko={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},b1={day:"Day",finance:"Finance",natal:"Natal"},Zm={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},Ws=class extends g{renderData(a){let e=a.grahas??[];return e.length?ae`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(a)} ${this.renderPanchanga(a)} ${this.renderGrahas(e,a.houseThemes)} ${this.renderWindows(a)} ${this.renderFinance(a)} ${this.renderDasha(a)} ${this.renderProvenance(a)}</div>`:this.renderEmpty()}renderHead(a){let e=new Map((a.tally??[]).map(r=>[r.state,r.count])),t=e.get("favourable")??0;return ae`<header class="head" part="header"><div class="title-row"><h2>${this.t("Vedic daily")}</h2><span class="roxy-label">${sn(this.effectiveLang(),a.dayStart,a.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${a.verdict}">${this.t(Ko[a.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:a.evaluated})}</span></div>${e.size?ae`<ul class="tally roxy-chips" part="legend">${f1.filter(r=>e.get(r)).map(r=>ae`<li class="pill">${this.t(fc[r])} ${e.get(r)}</li>`)}</ul>`:qe} ${a.subject?ae`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:a.subject.janmaRashi,nakshatra:a.subject.janmaNakshatra})}</p>`:qe} ${(a.degraded??[]).map(r=>ae`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:r.component,reason:r.reason})}</p>`)}</header>`}renderPanchanga(a){let e=a.panchanga;if(!e)return qe;let t=(r,s)=>s?ae`<div><dt>${r}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?ae`<span class="until">${this.t("until {{time}}",{time:q(this.effectiveLang(),s.validTo)})}</span>`:qe}</dd></div>`:qe;return ae`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="roxy-facts" part="details"><div><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(a,e){return a?.[String(e)]?.join(", ")??""}renderGrahas(a,e){return ae`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Grahas today")}"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${a.map(t=>{let r=w(t.graha)??"",s=this.theme(e,t.houseFromMoon);return ae`<tr><td>${r?ae`<span class="glyph roxy-glyph">${r}</span>`:qe}${t.graha}</td><td>${t.sign}</td><td title="${s}">${t.houseFromMoon}</td><td>${typeof t.binduCount=="number"?t.binduCount:""}</td><td>${this.renderKaksha(t.kaksha)}</td><td><span class="state roxy-chip ${t.state}" data-tone="${x1[t.state]??qe}" title="${t.stateSource??""}">${this.t(fc[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(a){if(!a||typeof a.number!="number")return qe;let e=a.bindu===true?"yes":a.bindu===false?"no":"",t=a.bindu===true?this.t("this kaksha lord gave bindu"):a.bindu===false?this.t("this kaksha lord gave no bindu"):"",r=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}\xB0 to {{end}}\xB0 of the sign",{n:a.number,total:Wm,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)});return ae`<span class="kaksha" title="${t?`${r} \xB7 ${t}`:r}">${a.number}/${Wm} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(a){let e=a.tara??[],t=a.chandrabala??[];if(!e.length&&!t.length)return qe;let r=(s,i)=>ae`<small>${sn(this.effectiveLang(),s,i)}</small>`;return ae`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?ae`<div class="chips">${e.map(s=>ae`<span class="window"><span>${s.number}. ${s.name}${s.quality?` \xB7 ${s.quality}`:""}</span> ${r(s.validFrom,s.validTo)}</span>`)}</div>`:qe} ${t.length?ae`<div class="chips">${t.map(s=>ae`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?ae`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:qe} </span>${r(s.validFrom,s.validTo)}</span>`)}</div>`:qe}</section>`}renderFinance(a){let e=a.areas?.finance;if(!e)return qe;let t=a.houseThemes,r=s=>{let i=this.theme(t,s.house);return ae`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${i?` (${i})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?ae`<span class="note">${s.dashaLevels.map(o=>this.t(Zm[o])).join(", ")}</span>`:qe}</li>`};return ae`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(Ko[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?ae`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:qe}</div><div class="lists">${e.drivers?.length?ae`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(r)}</ul></div>`:qe} ${e.cautions?.length?ae`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(r)}</ul></div>`:qe}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(a){return a?ae`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${a.band}">${this.t(Ko[a.band])}</span> <span class="evidence">${a.score}</span></div><ul class="layers">${a.layers.map(e=>ae`<li><span>${this.t(b1[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(Ko[e.band])}</span></li>`)}</ul></div>`:qe}renderDasha(a){let e=a.dasha??[];return e.length?ae`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>ae`<span class="window"><span>${this.t(Zm[t.level])} · ${t.lord}</span> <small>${sn(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:qe}renderProvenance(a){return a.frames?ae`<section class="block" part="section frame">${jp(this.effectiveLang(),a.frames,this.translator)}</section>`:qe}};Ws.endpoints=Nd,Ws.styles=[f,G,se,u1`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}h2,h3,p{margin:0}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{color:var(--roxy-secondary);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.verdict:is(.very-strong,.strong){color:var(--roxy-success-fg)}.verdict.moderate{color:var(--roxy-accent-ink)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.pill{font-variant-numeric:tabular-nums}.roxy-facts{margin:0}.until{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.state{cursor:help}.kaksha{align-items:center;gap:var(--roxy-space-xs);cursor:help;display:inline-flex}.dot{aspect-ratio:1;border-radius:var(--roxy-radius-full);background:var(--roxy-border);inline-size:1ch}.dot.yes{background:var(--roxy-success)}.dot.no{background:var(--roxy-warning)}.chips{gap:var(--roxy-space-sm) var(--roxy-space-lg);flex-wrap:wrap;display:flex}.window{font-size:var(--roxy-text-sm);display:grid}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.window.yes>:first-child{color:var(--roxy-success-fg)}.window.no>:first-child,.mark{color:var(--roxy-danger-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.composite{gap:var(--roxy-space-sm);display:grid}.layers{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary)}`],Ws=m([x("roxy-vedic-daily")],Ws);import{html as v1}from"lit";import{property as xc}from"lit/decorators.js";import{unsafeHTML as L1}from"lit/directives/unsafe-html.js";var Ta=class extends g{constructor(){super(...arguments);this.chartViewport=new Ae(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?to(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return v1`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${r}</h2>${Q(this.effectiveLang(),e.frame,this.translator)} ${ro(t,this.translator)}</div>${so(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(L1(ao(t,{style:this.chartStyle,lang:this.effectiveLang()})),r,this.translator)}</div></div>`}};Ta.endpoints=zd,Ta.styles=[f,He,G,Di,no,et],m([xc({type:String,reflect:true,attribute:"chart-style"})],Ta.prototype,"chartStyle",2),m([xc({type:String,reflect:true,attribute:"chart-reference"})],Ta.prototype,"chartReference",2),m([xc({type:String,reflect:true,attribute:"lagna-override"})],Ta.prototype,"lagnaOverride",2),Ta=m([x("roxy-vedic-kundli")],Ta);import{css as $1,html as ue,nothing as Ye}from"lit";var w1=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Xm=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],Zs=class extends g{orderedRows(){let a=this.data?.meta??{},e=new Set,t=[];for(let r of w1){let s=a[r];s&&(t.push([r,s]),e.add(r))}for(let[r,s]of Object.entries(a))e.has(r)||t.push([r,s]);return t}renderData(a){if(!a.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,r])=>r.avasthaInfo);return ue`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2>${this.t("Planetary positions")}</h2>${Q(this.effectiveLang(),a.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Planetary positions")}"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):Ye}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([r,s])=>{let i=(s.graha??r)==="Lagna",o=w(s.graha??r)??"",l=N(s.rashi)??"";return ue`<tr class="${i?"lagna":""}"><td class="graha">${o?ue`<span class="glyph roxy-glyph">${o}</span>`:Ye}${s.graha??r}</td><td>${l?ue`<span class="glyph roxy-glyph">${l}</span>`:Ye}${s.rashi??""}</td><td>${typeof s.longitude=="number"?tt(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${typeof s.house=="number"?s.house:""}</td>${Xm.map(([c])=>ue`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?ue`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Ye}</td>`)}<td>${s.isRetrograde?ue`<span class="retro">R</span>`:Ye}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let a=this.data?.modernPlanets??[];return a.length===0?Ye:a.map((e,t)=>{let r=N(e.rashi)??"";return ue`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${On(e.planet,e.sanskritName)}</td><td>${r?ue`<span class="glyph roxy-glyph">${r}</span>`:Ye}${e.rashi??""}</td><td>${typeof e.longitude=="number"?tt(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td>${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?ue`<span class="retro">R</span>`:Ye}</td></tr>`})}renderCombustion(){let a=this.data?.combustion??[];return a.length===0?Ye:ue`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${a.length}</span>${V()}</summary><div class="panel-body">${a.map(e=>{let t=w(e.planet)??"",r=b(this.effectiveLang(),e.distanceFromSun,2),s=b(this.effectiveLang(),e.orb,1);return ue`<div class="condition"><span class="planet">${Fe(t)} ${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:r,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let a=this.data?.planetaryWar??[];return a.length===0?Ye:ue`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${a.length}</span>${V()}</summary><div class="panel-body">${a.map(e=>{let t=b(this.effectiveLang(),e.distance,2);return ue`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return Ye;let a=this.data?.interpretations??{},e=this.orderedRows().map(([t,r])=>[r.graha??t,a[r.graha??t],r.avasthaInfo]).filter(([,t,r])=>t!=null||r!=null);return e.length===0?Ye:ue`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${V()}</summary><div class="panel-body">${e.map(([t,r,s])=>{let i=w(t)??"";return ue`<div class="interp"><span class="planet">${Fe(i)} ${t}</span> ${r?.rashi?ue`<p><span class="label">${this.t("Rashi.")}</span> ${r.rashi}</p>`:Ye} ${r?.nakshatra?ue`<p><span class="label">${this.t("Nakshatra.")}</span> ${r.nakshatra}</p>`:Ye} ${Xm.map(([o,l])=>s?.[o]?.interpretation?ue`<p><span class="label">${this.t(l)}</span> ${s[o].interpretation}</p>`:Ye)}</div>`})}</div></details>`}renderHouses(){let a=(this.data?.houses??[]).filter(e=>e.name||e.description);return a.length===0?Ye:ue`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${a.length}</span>${V()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?ue`<p class="desc">${e.description}</p>`:Ye}</div>`)}</div></details>`}renderYogas(){let a=(this.data?.yogas??[]).filter(e=>e.present);return a.length===0?Ye:ue`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${a.length}</span>${V()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.name} ${e.quality?ue`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Ye}</span> ${e.result?ue`<p class="desc">${e.result}</p>`:Ye}</div>`)}</div></details>`}};Zs.endpoints=Od,Zs.styles=[f,G,z,$1`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lagna td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}tbody tr.lagna .glyph{color:var(--roxy-accent-ink)}tbody tr.modern-first td{border-block-start:var(--roxy-line-thick) solid var(--roxy-border)}td.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.gloss{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:block}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}details.panel{border-block-start:1px solid var(--roxy-border)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);padding:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.summary-count{margin-inline:auto var(--roxy-space-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums}.panel-body{gap:var(--roxy-space-sm);padding:0 var(--roxy-space-md) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,1fr);display:grid}.condition{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}:is(.condition,.interp) .planet,.bhava .name{font-weight:var(--roxy-weight-bold)}.condition .detail{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.condition .winner{color:var(--roxy-success-fg);font-weight:var(--roxy-weight-bold)}.interp,.bhava{gap:calc(var(--roxy-space-unit) / 2);display:grid}.interp .label{color:var(--roxy-muted);font-weight:var(--roxy-weight-bold)}.bhava .desc{color:var(--roxy-muted)}.quality{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.quality.positive{color:var(--roxy-success-fg)}.quality.negative{color:var(--roxy-danger-fg)}.quality.both{color:var(--roxy-muted)}`],Zs=m([x("roxy-vedic-planets-table")],Zs);import{css as k1,html as We,nothing as Ft}from"lit";import{state as S1}from"lit/decorators.js";function Jm(n){return n.suppressedBy||void 0}var Qm=["classical","asraya","dala","akriti","sankhya"];function eg(n){let a=Qm.indexOf(n.family);return a===-1?Qm.length:a}var R1=[{id:"present",source:"Present",open:true,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:true,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:false,noteSource:"At least one classical condition fails. Read the evidence for which."}],C1={Positive:"success",Negative:"danger",Both:"warning"},Nr=class extends g{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Jm(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return Ft;let r=[...t].sort((s,i)=>eg(s)-eg(i));return We`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${r.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return We`<span class="quality-chip roxy-chip quality-${e}" data-tone="${C1[e]??Ft}">${e}</span>`}renderFamilyChip(e){return e.family?We`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${D(e.family)}</span>`:Ft}renderDetailCard(e){return We`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Ft} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?We`<p class="description">${e.description}</p>`:Ft} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?Ft:We`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Jm(e),[r,s,i]=e.present?["is-present","Present","success"]:t?["is-outranked",`Outranked by ${D(t)}`,"warning"]:["is-absent","Not present",void 0];return We`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Ft} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${r}" data-tone="${i??Ft}">${s}</span></p>${e.description&&!this.hideReadings?We`<p class="description">${e.description}</p>`:Ft} ${e.present?this.renderEffects(e.result):Ft} ${e.evidence?We`<p class="evidence">${e.evidence}</p>`:Ft}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let r=e;return We`<div class="wrap" part="card">${this.renderDetailCard(r)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let r=e.yogas;if(r.length>0&&"present"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total??c.filter(h=>h.present).length;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:p,total:c.length})}</span></div>${Q(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${d.length>0?R1.map(h=>this.renderVerdictGroup(h,d.filter(u=>this.verdictOf(u)===h.id))):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(r.length>0&&"description"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${p!==void 0?We`<span class="count">${this.t("{{count}} total",{count:p})}</span>`:Ft}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${d.length>0?d.map(h=>this.renderDetailCard(h)):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=r,o=t?i.filter(c=>c.name.toLowerCase().includes(t)):i,l=e.total;return We`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${l!==void 0?We`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:Ft}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${o.length>0?o.map(c=>We`<div class="yoga-chip">${c.name}</div>`):We`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return We`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};Nr.endpoints=Gd,Nr.styles=[f,G,k1`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([S1()],Nr.prototype,"filter",2),Nr=m([x("roxy-yoga-list")],Nr);import{css as T1,html as K,nothing as X}from"lit";import{property as E1}from"lit/decorators.js";var Vo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},tg={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},zr=class extends g{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,r=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i="date"in e&&e.date?C(r,e.date):"";return K`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${y(t,"name")}</h2><div class="sub">${t.pinyin??""}${i?` ${i}`:""}</div></div>${s!==null?K`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:_(r,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:X}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?K`<p class="prose" part="section interpretation">${e.interpretation}</p>`:X} ${"conventions"in e?er(e.conventions,this.translator,this.effectiveLang()):X}</article>`}renderIdentity(e,t){let r="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,i="element"in e&&typeof e.element=="string"?e:void 0,o=i?y(i,"element"):y(t,"element"),l=kt(i?.element??t.element),c="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!o&&!c&&!r&&!s&&!t.branch?X:K`<div class="facts" part="details">${o?K`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${l}">${o}</b></span>`:X} ${c?K`<span><span class="roxy-label">${this.t("Polarity")}</span>${c}</span>`:X} ${t.branch?K`<span><span class="roxy-label">${this.t("Branch")}</span>${t.branch}</span>`:X} ${r?K`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${r.stem??""}</b> ${r.branch??""}</span>`:X} ${s&&typeof s.start=="number"?K`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:X}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return X;let t="year"in e?e.year:void 0,r="benMingNian"in e?e.benMingNian:false;return K`${K`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&Vo[e.relationship]?this.t(Vo[e.relationship]):e.relationship??""}</b></span> ${t?K`<span><span class="roxy-label">${this.t("Year")}</span>${t.pillar??""} ${y(t,"animal")} ${t.relationship&&Vo[t.relationship]?this.t(Vo[t.relationship]):t.relationship??""}</span>`:X} ${r?K`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:X}</div>`} ${this.hideReadings?X:K`${e.overview?K`<p class="prose" part="section overview">${e.overview}</p>`:X}<div class="sections" part="section outlook">${"love"in e&&e.love?K`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:X} ${"career"in e&&e.career?K`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:X} ${"advice"in e&&e.advice?K`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:X}</div>`} ${t?.note&&!this.hideReadings?K`<p class="prose" part="reading">${t.note}</p>`:X}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return X;let t=e;return K`${t.trine?K`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> <span class="element-word ${kt(t.trine.element)}">${y(t.trine,"element")}</span></span> ${t.trine.members?.length?K`<span class="roxy-chips">${t.trine.members.map(r=>K`<span class="roxy-chip">${r}</span>`)}</span>`:X} ${t.trine.theme?K`<span>${t.trine.theme}</span>`:X}</div></section>`:X} ${this.renderPartners(t)} ${this.hideReadings?X:K`${t.summary?K`<p class="prose" part="section summary">${t.summary}</p>`:X} ${t.traits?.length?K`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${t.traits.map(r=>K`<li>${r}</li>`)}</ul></section>`:X} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?K`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:X}`}`}renderPartners(e){let r=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return r.length===0?X:K`<section part="section partners"><div class="partners">${r.map(([s,i])=>K`<div class="partner"><span class="role roxy-label">${this.t(s)}</span> <span class="glyph" lang="zh">${i?.chinese??""}</span> <span class="who">${y(i,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?K`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(r=>K`<li>${r}</li>`)}</ul></section>`:X}renderCompatibility(e){let t=e.signs?.first,r=e.signs?.second,s=typeof e.score=="number"?e.score:null;return K`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${y(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${y(r,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${y(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?K`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?K`<span class="roxy-chip tag">${tg[e.verdict]?this.t(tg[e.verdict]):e.verdict}</span>`:X}</div>`:X} ${e.sharedElement?K`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${kt(e.sharedElement)}">${y(e,"sharedElement")}</b></span></div>`:X} ${this.hideReadings?X:K`${e.summary?K`<p class="prose" part="section summary">${e.summary}</p>`:X} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?K`<p class="prose" part="reading">${e.advice}</p>`:X}`}</article>`}};zr.endpoints=Fd,zr.styles=[f,G,ua,T1`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],m([E1({type:String,reflect:true})],zr.prototype,"mode",2),zr=m([x("roxy-zodiac-card")],zr);var ag={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},post_reports_natal:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateNatalReport",attrs:{report:"natal"}},post_reports_synastry:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateSynastryReport",attrs:{report:"synastry"}},post_reports_kundli:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateKundliReport",attrs:{report:"kundli"}},post_reports_matchmaking:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateMatchmakingReport",attrs:{report:"matchmaking"}},post_reports_yearly_forecast:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateYearlyForecastReport",attrs:{report:"yearly-forecast"}},post_reports_human_design:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateHumanDesignReport",attrs:{report:"human-design"}},post_reports_bazi:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateBaziReport",attrs:{report:"bazi"}},post_reports_numerology:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateNumerologyReport",attrs:{report:"numerology"}},post_reports_tarot:{tag:"roxy-report",pascal:"RoxyReport",operationId:"generateTarotReport",attrs:{report:"tarot"}},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function rg(n){let a=n.lastIndexOf(":"),e=a===-1?n:n.slice(a+1),t=ag[e];return t?{...t,toolName:e}:void 0}var bc=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReport",tag:"roxy-report",slug:"report",heading:"Branded report",description:"Branded report for any /reports operation: the visitor fills the form, and the finished document arrives under your name as a PDF download or in place on the page",docsLabel:"Reports",endpointLabel:"POST /reports/...",docsSummary:"Form to finished branded report, as a PDF download or inline HTML",topic:"Reports"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:true},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:true},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:true}];var ZP=bc.map(n=>n.slug);export{bc as ROXY_COMPONENTS,ZP as ROXY_UI_COMPONENTS,Mn as ROXY_UI_VERSION,Ja as RoxyAlmanacDay,Hr as RoxyAngelNumberCard,jr as RoxyAngelNumberLookup,Kr as RoxyArudhaPadas,ar as RoxyAshtakavargaGrid,Vr as RoxyAspectsTable,qr as RoxyAstrocartographyMap,Yr as RoxyBaziChart,Zr as RoxyBhavChalitTable,Jr as RoxyBhavaBalaTable,sr as RoxyBiorhythmChart,lr as RoxyBodygraph,rs as RoxyCharaKarakas,ss as RoxyChoghadiyaGrid,dr as RoxyCompatibilityCard,ns as RoxyCompoundNumber,is as RoxyCrystalCard,pr as RoxyCrystalGrid,za as RoxyDashaTimeline,cs as RoxyData,hr as RoxyDivisionalChart,mr as RoxyDoshaCard,hs as RoxyDoshaConstitution,ms as RoxyDreamCard,gs as RoxyDreamSearch,pe as RoxyEndpointForm,ur as RoxyEphemerisTable,ys as RoxyFixedStars,fr as RoxyFlyingStarChart,fs as RoxyForecastDigest,xs as RoxyForecastTimeline,bs as RoxyGematria,Ls as RoxyGocharaTable,$s as RoxyGunaMilan,ws as RoxyHdConnection,ks as RoxyHdPenta,Ss as RoxyHdTypeCard,Rs as RoxyHdVariables,Cs as RoxyHeliacalTable,Ts as RoxyHexagram,Es as RoxyHoraTable,Fa as RoxyHoroscopeCard,vr as RoxyKpChart,Ds as RoxyKpFinanceCard,As as RoxyKpPlanetsTable,Ms as RoxyKpRulingPlanets,Lr as RoxyKuaCard,_s as RoxyLocalSpaceCompass,Ve as RoxyLocationSearch,Os as RoxyLuckPillars,wr as RoxyMayanDaySign,kr as RoxyMoonPhase,Is as RoxyNakshatraCard,Ka as RoxyNatalChart,Rr as RoxyNumerologyCard,Cr as RoxyPanchangTable,Tr as RoxyPositionsTable,Bs as RoxyProfectionCard,Hs as RoxyReferenceCard,js as RoxyRelocationWheel,Gt as RoxyReport,Ks as RoxyShadbalaTable,Vs as RoxySynastryChart,Dr as RoxyTarotCard,Ar as RoxyTarotCatalog,Pr as RoxyTarotSpread,Sa as RoxyTransitWheel,Mr as RoxyTransitsTable,qs as RoxyUpagrahaTable,_r as RoxyVastuMandala,Ys as RoxyVedicAspects,Ws as RoxyVedicDaily,Ta as RoxyVedicKundli,Zs as RoxyVedicPlanetsTable,Gs as RoxyWesternPlanetsTable,Nr as RoxyYogaList,zr as RoxyZodiacCard,rg as componentForTool,vi as expandCompact,Mg as roxyDataScript,xp as serializeRoxyData};