@magmacomputing/tempo-plugin-astro 1.1.2 → 1.1.3

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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- function a0_0x583b(_0x3268bb,_0xa9d3ae){_0x3268bb=_0x3268bb-0x8f;const _0x4650c9=a0_0x4650();let _0x583b71=_0x4650c9[_0x3268bb];return _0x583b71;}const a0_0x1b148d=a0_0x583b;(function(_0x5c0ba9,_0x539e80){const _0x49cdc5=a0_0x583b,_0x1132a8=_0x5c0ba9();while(!![]){try{const _0xcf48a0=parseInt(_0x49cdc5(0x9b))/0x1*(-parseInt(_0x49cdc5(0xb3))/0x2)+-parseInt(_0x49cdc5(0xb7))/0x3+parseInt(_0x49cdc5(0xa9))/0x4*(-parseInt(_0x49cdc5(0xad))/0x5)+-parseInt(_0x49cdc5(0x96))/0x6+-parseInt(_0x49cdc5(0xa4))/0x7+-parseInt(_0x49cdc5(0xb9))/0x8*(-parseInt(_0x49cdc5(0xa2))/0x9)+-parseInt(_0x49cdc5(0xba))/0xa*(-parseInt(_0x49cdc5(0x95))/0xb);if(_0xcf48a0===_0x539e80)break;else _0x1132a8['push'](_0x1132a8['shift']());}catch(_0x28685b){_0x1132a8['push'](_0x1132a8['shift']());}}}(a0_0x4650,0x577e6));import{Tempo,enums}from'@magmacomputing/tempo/core';import{getTermRange}from'@magmacomputing/tempo/term';import{definePremiumTerm}from'@magmacomputing/tempo/plugin';import{enumify}from'@magmacomputing/tempo/library';var ASTRO=enumify({'Vernal':a0_0x1b148d(0xa0),'Summer':'summer','Autumnal':a0_0x1b148d(0xaf),'Winter':a0_0x1b148d(0xb8)}),{COMPASS,SEASON,DURATIONS}=enums,key=a0_0x1b148d(0xb6),scope=a0_0x1b148d(0x98);function calculateAstroMoment(_0x11ad13,_0x373be8,_0x226c53){const _0x2197df=a0_0x1b148d,_0x48f208=(_0x11ad13-0x7d0)/0x3e8;let _0x4c0fdf;switch(_0x373be8){case ASTRO['Vernal']:_0x4c0fdf=2451623.80984+365242.37404*_0x48f208+0.05169*_0x48f208*_0x48f208;break;case ASTRO[_0x2197df(0x9f)]:_0x4c0fdf=2451716.56767+365241.62603*_0x48f208+0.00325*_0x48f208*_0x48f208;break;case ASTRO[_0x2197df(0x99)]:_0x4c0fdf=2451810.21715+365242.01767*_0x48f208-0.11575*_0x48f208*_0x48f208;break;case ASTRO['Winter']:_0x4c0fdf=2451900.05952+365242.74049*_0x48f208-0.06223*_0x48f208*_0x48f208;break;}const _0x3ad8c5=Math[_0x2197df(0xbc)]((_0x4c0fdf-2440587.5)*DURATIONS['days']);return new Tempo(_0x3ad8c5,{'timeZone':_0x226c53,'timeStamp':'ms'});}function resolve(_0x5d50f9,_0x1d1831){const _0x3620ab=a0_0x1b148d,_0x1fff07=_0x5d50f9['config'][_0x3620ab(0xb0)];if(!_0x1fff07)return[];const _0x35eb4d=_0x1d1831?.['yy']??_0x1d1831?.[_0x3620ab(0xbb)]??_0x5d50f9['yy'],_0x47a12f=_0x1d1831?.[_0x3620ab(0xaa)]??_0x5d50f9['tz']??_0x3620ab(0xa7),_0x18a571=[],_0x399f20=_0x1fff07===COMPASS[_0x3620ab(0xa1)]?{'vernal':'Autumnal','summer':_0x3620ab(0xae),'autumnal':_0x3620ab(0xa8),'winter':_0x3620ab(0x9f)}:{'vernal':_0x3620ab(0xa8),'summer':_0x3620ab(0x9f),'autumnal':'Autumnal','winter':_0x3620ab(0xae)},_0x429507=_0x1fff07===COMPASS['South']?{'vernal':SEASON['Autumn'],'summer':SEASON[_0x3620ab(0xae)],'autumnal':SEASON[_0x3620ab(0xb1)],'winter':SEASON[_0x3620ab(0x9f)]}:{'vernal':SEASON[_0x3620ab(0xb1)],'summer':SEASON[_0x3620ab(0x9f)],'autumnal':SEASON[_0x3620ab(0xb4)],'winter':SEASON[_0x3620ab(0xae)]};for(const _0x29e13b of[_0x35eb4d-0x1,_0x35eb4d,_0x35eb4d+0x1]){const _0x3cef41=(_0x28ce56,_0x554452)=>{const _0x4e1f57=_0x3620ab,_0x4e3076=calculateAstroMoment(_0x28ce56,_0x554452,_0x47a12f),_0x1b0c9a=_0x4e3076[_0x4e1f57(0xb5)]();return{'year':_0x1b0c9a[_0x4e1f57(0xbb)],'month':_0x1b0c9a['month'],'day':_0x1b0c9a[_0x4e1f57(0x94)],'hour':_0x1b0c9a[_0x4e1f57(0xa6)],'minute':_0x1b0c9a['minute'],'second':_0x1b0c9a['second'],'millisecond':_0x1b0c9a[_0x4e1f57(0x8f)],'microsecond':_0x1b0c9a[_0x4e1f57(0xab)],'nanosecond':_0x1b0c9a[_0x4e1f57(0x92)]};};_0x18a571[_0x3620ab(0x9c)]({'key':_0x399f20[_0x3620ab(0xa0)],'season':_0x429507[_0x3620ab(0xa0)],'sphere':_0x1fff07,..._0x3cef41(_0x29e13b,ASTRO['Vernal']),'type':'Equinox','group':_0x3620ab(0x98)}),_0x18a571[_0x3620ab(0x9c)]({'key':_0x399f20[_0x3620ab(0xb2)],'season':_0x429507[_0x3620ab(0xb2)],'sphere':_0x1fff07,..._0x3cef41(_0x29e13b,ASTRO[_0x3620ab(0x9f)]),'type':_0x3620ab(0xa5),'group':_0x3620ab(0x98)}),_0x18a571['push']({'key':_0x399f20['autumnal'],'season':_0x429507[_0x3620ab(0xaf)],'sphere':_0x1fff07,..._0x3cef41(_0x29e13b,ASTRO[_0x3620ab(0x99)]),'type':_0x3620ab(0x9e),'group':'astronomy'}),_0x18a571[_0x3620ab(0x9c)]({'key':_0x399f20[_0x3620ab(0xb8)],'season':_0x429507[_0x3620ab(0xb8)],'sphere':_0x1fff07,..._0x3cef41(_0x29e13b,ASTRO[_0x3620ab(0xae)]),'type':_0x3620ab(0xa5),'group':_0x3620ab(0x98)});}return _0x18a571;}function resolveDateBoundary(_0x3ea8d1,_0x17218f){const _0x587ca1=a0_0x1b148d,_0x28b5de=resolve(_0x3ea8d1,_0x17218f);return _0x28b5de[_0x587ca1(0x9d)](_0x19f135=>({..._0x19f135,'hour':0x0,'minute':0x0,'second':0x0,'millisecond':0x0,'microsecond':0x0,'nanosecond':0x0}));}var AstroTerm=definePremiumTerm({'key':key,'scope':scope,'resolve'(_0x2493e5){return resolve(this,_0x2493e5);},'define'(_0x199c53,_0xbffdb5){const _0x409613=a0_0x1b148d,_0x53a214=resolve(this,_0xbffdb5),_0x19a86b=resolveDateBoundary(this,_0xbffdb5),_0x1c5e64=_0xbffdb5??this[_0x409613(0xb5)]();if(_0x199c53===!![]||_0x199c53===void 0x0){const _0x4adadd=getTermRange(this,_0x19a86b,!![],_0xbffdb5);return _0x4adadd;}const _0x49b0dc=getTermRange(this,_0x53a214,![],_0xbffdb5);if(!_0x49b0dc)return _0x49b0dc;const _0x2f65bb=getTermRange(this,_0x19a86b,![],_0xbffdb5);if(!_0x2f65bb)return _0x49b0dc;const _0x1db9aa=_0x53a214[_0x409613(0x90)](_0x58902e=>_0x58902e[_0x409613(0x9a)]===_0x2f65bb['key']&&_0x58902e[_0x409613(0xbb)]===_0x2f65bb['year']&&_0x58902e['month']===_0x2f65bb[_0x409613(0xac)]&&_0x58902e[_0x409613(0x94)]===_0x2f65bb[_0x409613(0x94)]);if(!_0x1db9aa)return{..._0x2f65bb,'strict':_0x49b0dc[_0x409613(0x9a)]};const _0x4e2eeb=_0x1c5e64[_0x409613(0x91)]({'year':_0x1db9aa[_0x409613(0xbb)],'month':_0x1db9aa[_0x409613(0xac)],'day':_0x1db9aa[_0x409613(0x94)],'hour':_0x1db9aa[_0x409613(0xa6)]??0x0,'minute':_0x1db9aa[_0x409613(0x93)]??0x0,'second':_0x1db9aa[_0x409613(0xa3)]??0x0,'millisecond':_0x1db9aa[_0x409613(0x8f)]??0x0,'microsecond':_0x1db9aa[_0x409613(0xab)]??0x0,'nanosecond':_0x1db9aa[_0x409613(0x92)]??0x0})[_0x409613(0x97)]({'minutes':0x1}),_0x157fe9=getTermRange(this,_0x53a214,![],_0x4e2eeb);if(!_0x157fe9)return{..._0x2f65bb,'strict':_0x49b0dc[_0x409613(0x9a)]};return{..._0x157fe9,'strict':_0x49b0dc[_0x409613(0x9a)]};}});function a0_0x4650(){const _0x184e31=['hour','UTC','Vernal','4ovsXHP','timeZoneId','microsecond','month','108490xrmyIT','Winter','autumnal','sphere','Spring','summer','12WQZczK','Autumn','toDateTime','astro','112200CyimDd','winter','8DcrvNa','742090mTTqyO','year','trunc','millisecond','find','with','nanosecond','minute','day','121NSZHQC','304470KhLdZP','add','astronomy','Autumnal','key','59557Antwgo','push','map','Equinox','Summer','vernal','South','2406006usWKYq','second','1806518ZJEkFK','Solstice'];a0_0x4650=function(){return _0x184e31;};return a0_0x4650();}Tempo['extend'](AstroTerm);export{AstroTerm};
1
+ function a0_0x76a1(_0x2fe614,_0x24c14a){_0x2fe614=_0x2fe614-0x140;const _0x58a836=a0_0x58a8();let _0x76a1d4=_0x58a836[_0x2fe614];return _0x76a1d4;}const a0_0x224e2b=a0_0x76a1;(function(_0x4a30f5,_0xc0a83b){const _0x3c949a=a0_0x76a1,_0x212712=_0x4a30f5();while(!![]){try{const _0xa1c8e0=parseInt(_0x3c949a(0x156))/0x1+-parseInt(_0x3c949a(0x15d))/0x2*(parseInt(_0x3c949a(0x14d))/0x3)+parseInt(_0x3c949a(0x146))/0x4*(parseInt(_0x3c949a(0x168))/0x5)+parseInt(_0x3c949a(0x154))/0x6+-parseInt(_0x3c949a(0x15a))/0x7+-parseInt(_0x3c949a(0x142))/0x8+parseInt(_0x3c949a(0x15f))/0x9*(parseInt(_0x3c949a(0x151))/0xa);if(_0xa1c8e0===_0xc0a83b)break;else _0x212712['push'](_0x212712['shift']());}catch(_0x4dea5d){_0x212712['push'](_0x212712['shift']());}}}(a0_0x58a8,0xacd0a));import{Tempo,enums}from'@magmacomputing/tempo/core';import{getTermRange}from'@magmacomputing/tempo/term';import{definePremiumTerm}from'@magmacomputing/tempo/plugin';import{enumify}from'@magmacomputing/tempo/library';var ASTRO=enumify({'Vernal':a0_0x224e2b(0x153),'Summer':a0_0x224e2b(0x149),'Autumnal':a0_0x224e2b(0x148),'Winter':a0_0x224e2b(0x150)}),{COMPASS,SEASON,DURATIONS}=enums,key='astro',scope=a0_0x224e2b(0x169);function calculateAstroMoment(_0xd31cde,_0xe6797f,_0x5aaef0){const _0x48ee99=a0_0x224e2b,_0x308371=(_0xd31cde-0x7d0)/0x3e8;let _0x20a963;switch(_0xe6797f){case ASTRO[_0x48ee99(0x141)]:_0x20a963=2451623.80984+365242.37404*_0x308371+0.05169*_0x308371*_0x308371;break;case ASTRO[_0x48ee99(0x161)]:_0x20a963=2451716.56767+365241.62603*_0x308371+0.00325*_0x308371*_0x308371;break;case ASTRO['Autumnal']:_0x20a963=2451810.21715+365242.01767*_0x308371-0.11575*_0x308371*_0x308371;break;case ASTRO[_0x48ee99(0x163)]:_0x20a963=2451900.05952+365242.74049*_0x308371-0.06223*_0x308371*_0x308371;break;}const _0x4c5dba=Math[_0x48ee99(0x157)]((_0x20a963-2440587.5)*DURATIONS[_0x48ee99(0x158)]);return new Tempo(_0x4c5dba,{'timeZone':_0x5aaef0,'timeStamp':'ms'});}function a0_0x58a8(){const _0x11fb03=['nanosecond','vernal','3785430oTxUjz','map','305870fdJdzx','trunc','days','Autumnal','7304073zHukfs','add','Autumn','10AATPUh','push','25176483CxvDZR','extend','Summer','month','Winter','microsecond','Solstice','day','sphere','2175lIydJY','astronomy','key','UTC','minute','Vernal','7811704CzMfNG','second','hour','South','1396QAuKiW','with','autumnal','summer','timeZoneId','find','Equinox','694935OGEAxS','year','millisecond','winter','10pWNvnz'];a0_0x58a8=function(){return _0x11fb03;};return a0_0x58a8();}function resolve(_0x3a4fd9,_0x5bac12){const _0x362dc0=a0_0x224e2b,_0x3c4466=_0x3a4fd9['config'][_0x362dc0(0x167)];if(!_0x3c4466)return[];const _0x1cf47a=_0x5bac12?.['yy']??_0x5bac12?.[_0x362dc0(0x14e)]??_0x3a4fd9['yy'],_0x2490f5=_0x5bac12?.[_0x362dc0(0x14a)]??_0x3a4fd9['tz']??_0x362dc0(0x16b),_0x293ec8=[],_0x5c6d3f=_0x3c4466===COMPASS[_0x362dc0(0x145)]?{'vernal':_0x362dc0(0x159),'summer':_0x362dc0(0x163),'autumnal':'Vernal','winter':'Summer'}:{'vernal':_0x362dc0(0x141),'summer':'Summer','autumnal':_0x362dc0(0x159),'winter':'Winter'},_0x115a91=_0x3c4466===COMPASS['South']?{'vernal':SEASON[_0x362dc0(0x15c)],'summer':SEASON[_0x362dc0(0x163)],'autumnal':SEASON['Spring'],'winter':SEASON['Summer']}:{'vernal':SEASON['Spring'],'summer':SEASON['Summer'],'autumnal':SEASON[_0x362dc0(0x15c)],'winter':SEASON[_0x362dc0(0x163)]};for(const _0x3a04fd of[_0x1cf47a-0x1,_0x1cf47a,_0x1cf47a+0x1]){const _0x1df356=(_0x3f599b,_0x5842d3)=>{const _0x267add=_0x362dc0,_0x4cb90d=calculateAstroMoment(_0x3f599b,_0x5842d3,_0x2490f5),_0xae4311=_0x4cb90d['toDateTime']();return{'year':_0xae4311[_0x267add(0x14e)],'month':_0xae4311[_0x267add(0x162)],'day':_0xae4311['day'],'hour':_0xae4311['hour'],'minute':_0xae4311['minute'],'second':_0xae4311[_0x267add(0x143)],'millisecond':_0xae4311[_0x267add(0x14f)],'microsecond':_0xae4311[_0x267add(0x164)],'nanosecond':_0xae4311[_0x267add(0x152)]};};_0x293ec8['push']({'key':_0x5c6d3f['vernal'],'season':_0x115a91[_0x362dc0(0x153)],'sphere':_0x3c4466,..._0x1df356(_0x3a04fd,ASTRO[_0x362dc0(0x141)]),'type':_0x362dc0(0x14c),'group':'astronomy'}),_0x293ec8[_0x362dc0(0x15e)]({'key':_0x5c6d3f['summer'],'season':_0x115a91['summer'],'sphere':_0x3c4466,..._0x1df356(_0x3a04fd,ASTRO[_0x362dc0(0x161)]),'type':_0x362dc0(0x165),'group':_0x362dc0(0x169)}),_0x293ec8['push']({'key':_0x5c6d3f[_0x362dc0(0x148)],'season':_0x115a91[_0x362dc0(0x148)],'sphere':_0x3c4466,..._0x1df356(_0x3a04fd,ASTRO[_0x362dc0(0x159)]),'type':'Equinox','group':_0x362dc0(0x169)}),_0x293ec8['push']({'key':_0x5c6d3f[_0x362dc0(0x150)],'season':_0x115a91['winter'],'sphere':_0x3c4466,..._0x1df356(_0x3a04fd,ASTRO[_0x362dc0(0x163)]),'type':'Solstice','group':_0x362dc0(0x169)});}return _0x293ec8;}function resolveDateBoundary(_0xfa0d4,_0x233978){const _0x265c95=a0_0x224e2b,_0x44c2b8=resolve(_0xfa0d4,_0x233978);return _0x44c2b8[_0x265c95(0x155)](_0x13dd35=>({..._0x13dd35,'hour':0x0,'minute':0x0,'second':0x0,'millisecond':0x0,'microsecond':0x0,'nanosecond':0x0}));}var AstroTerm=definePremiumTerm({'key':key,'scope':scope,'resolve'(_0x510e47){return resolve(this,_0x510e47);},'define'(_0x2a0072,_0x50bb0d){const _0x4753f1=a0_0x224e2b,_0x472980=resolve(this,_0x50bb0d),_0x1be25f=resolveDateBoundary(this,_0x50bb0d),_0x7521ab=_0x50bb0d??this['toDateTime']();if(_0x2a0072===!![]||_0x2a0072===void 0x0){const _0x110e02=getTermRange(this,_0x1be25f,!![],_0x50bb0d);return _0x110e02;}const _0x103b6d=getTermRange(this,_0x472980,![],_0x50bb0d);if(!_0x103b6d)return _0x103b6d;const _0x992615=getTermRange(this,_0x1be25f,![],_0x50bb0d);if(!_0x992615)return _0x103b6d;const _0xcd99ea=_0x472980[_0x4753f1(0x14b)](_0xccfb5f=>_0xccfb5f[_0x4753f1(0x16a)]===_0x992615['key']&&_0xccfb5f[_0x4753f1(0x14e)]===_0x992615['year']&&_0xccfb5f['month']===_0x992615['month']&&_0xccfb5f[_0x4753f1(0x166)]===_0x992615['day']);if(!_0xcd99ea)return{..._0x992615,'strict':_0x103b6d[_0x4753f1(0x16a)]};const _0x103719=_0x7521ab[_0x4753f1(0x147)]({'year':_0xcd99ea[_0x4753f1(0x14e)],'month':_0xcd99ea[_0x4753f1(0x162)],'day':_0xcd99ea[_0x4753f1(0x166)],'hour':_0xcd99ea[_0x4753f1(0x144)]??0x0,'minute':_0xcd99ea[_0x4753f1(0x140)]??0x0,'second':_0xcd99ea[_0x4753f1(0x143)]??0x0,'millisecond':_0xcd99ea[_0x4753f1(0x14f)]??0x0,'microsecond':_0xcd99ea[_0x4753f1(0x164)]??0x0,'nanosecond':_0xcd99ea['nanosecond']??0x0})[_0x4753f1(0x15b)]({'minutes':0x1}),_0x3dfb1d=getTermRange(this,_0x472980,![],_0x103719);if(!_0x3dfb1d)return{..._0x992615,'strict':_0x103b6d['key']};return{..._0x3dfb1d,'strict':_0x103b6d[_0x4753f1(0x16a)]};}});Tempo[a0_0x224e2b(0x160)](AstroTerm);export{AstroTerm};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmacomputing/tempo-plugin-astro",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Tempo plugin that calculates precise astronomical seasons (solstices & equinoxes) using the Jean Meeus algorithm — hemisphere-aware, sub-minute accuracy",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "scripts": {
16
16
  "build": "tsup src/index.ts --format esm --clean && tsc",
17
17
  "postbuild": "javascript-obfuscator dist/index.js --output dist/index.js",
18
- "test": "vitest run -c ../../vitest.premium.ts && vitest run -c ../../vitest.community.ts",
18
+ "test": "vitest run -c ../../test/vitest.premium.ts && vitest run -c ../../test/vitest.community.ts",
19
19
  "publish": "npm publish --access public",
20
20
  "prepublishOnly": "if [ $(git rev-parse --abbrev-ref HEAD) != main ]; then echo 'ERROR: Must be on main branch to publish.'; exit 1; fi && npm run build"
21
21
  },