diff --git a/asset-manifest.json b/asset-manifest.json index b97ca92..28f2380 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { - "main.css": "/daytime-lowtide-finder/static/css/main.e3798874.css", - "main.js": "/daytime-lowtide-finder/static/js/main.140dff40.js", - "static/js/97.4efa0057.chunk.js": "/daytime-lowtide-finder/static/js/97.4efa0057.chunk.js", - "index.html": "/daytime-lowtide-finder/index.html", - "main.e3798874.css.map": "/daytime-lowtide-finder/static/css/main.e3798874.css.map", - "main.140dff40.js.map": "/daytime-lowtide-finder/static/js/main.140dff40.js.map", - "97.4efa0057.chunk.js.map": "/daytime-lowtide-finder/static/js/97.4efa0057.chunk.js.map" + "main.css": "/tide-finder/static/css/main.e3798874.css", + "main.js": "/tide-finder/static/js/main.02e12d8f.js", + "static/js/97.3068ba19.chunk.js": "/tide-finder/static/js/97.3068ba19.chunk.js", + "index.html": "/tide-finder/index.html", + "main.e3798874.css.map": "/tide-finder/static/css/main.e3798874.css.map", + "main.02e12d8f.js.map": "/tide-finder/static/js/main.02e12d8f.js.map", + "97.3068ba19.chunk.js.map": "/tide-finder/static/js/97.3068ba19.chunk.js.map" }, "entrypoints": [ "static/css/main.e3798874.css", - "static/js/main.140dff40.js" + "static/js/main.02e12d8f.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index a939502..0029ee1 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Daytime Lowtide Finder
\ No newline at end of file +Tide Finder
\ No newline at end of file diff --git a/static/js/97.3068ba19.chunk.js b/static/js/97.3068ba19.chunk.js new file mode 100644 index 0000000..c10ff45 --- /dev/null +++ b/static/js/97.3068ba19.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunktide_finder=self.webpackChunktide_finder||[]).push([[97],{97:(t,n,r)=>{t.exports=r(2397)},6196:t=>{var n=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),r=function(){function t(n,r,i){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.latitude=r,this.longitude=i,this.julianDate=e(n)}return n(t,{illuminosity:{get:function(){return function(t){var n=(e(t)+2451543.5-2451545)/36525,r=n*n,o=r*n,u=o*n,s=297.8501921+445267.1114034*n-.0018819*r+o/545868-u/113065e3,f=134.9633964+477198.8675055*n+.0087414*r+o/69699-u/14712e3,h=357.5291092+35999.0502909*n-1536e-7*r+o/2449e4;return i(180-s-6.289*a(f)+2.1*a(h)-1.274*a(2*s-f)-.658*a(2*s)-.214*a(2*f)-.11*a(s))}(this.date)/360}},distance:{get:function(){return function(t){for(var n=e(t)+2451543.5,r=(n-2451545)/36525,m=r*r,D=m*r,w=D*r,p=218.3164477+481267.88123421*r-.0015786*m+D/538841-w/65194e3,b=297.8501921+445267.1114034*r-.0018819*m+D/545868-w/113065e3,k=357.5291092+35999.0502909*r-1536e-7*m+D/2449e4,P=134.9633964+477198.8675055*r+.0087414*m+D/69699-w/14712e3,y=93.272095+483202.0175233*r-.0036539*m-D/3526e3+w/86331e4,I=119.75+131.849*r,j=53.09+479264.29*r,C=313.45+481266.484*r,E=1-.002516*r-74e-7*m,T=E*E,x=0,F=0,N=0;N<60;N++){var O=1;1===Math.abs(s[N])&&(O=E),2===Math.abs(s[N])&&(O=T),x+=c[N]*O*a(i(u[N]*b+s[N]*k+f[N]*P+h[N]*y)),F+=l[N]*O*o(i(u[N]*b+s[N]*k+f[N]*P+h[N]*y))}var S=0;for(N=0;N<60;N++){O=1;1===Math.abs(g[N])&&(O=E),2===Math.abs(g[N])&&(O=T),S+=A[N]*O*a(i(M[N]*b+g[N]*k+v[N]*P+d[N]*y))}x=x+3958*a(i(I))+1962*a(i(p-y))+318*a(i(j)),S=S-2235*a(i(p))+382*a(i(C))+175*a(i(I-y))+175*a(i(I+y))+127*a(i(p-P))-115*a(i(p+P));var Y=i(p+x/1e6),H=i(S/1e6);H>180&&(H-=360);var U=Math.round(385000.56+F/1e3),_=23.4393-3.563e-9*(n-2451543.5),q=i((G=a(Y)*o(_)-(K=H,Math.tan(K*Math.PI/180)*a(_)),J=o(Y),180/Math.PI*Math.atan(G/J)-180*(J<0)))/15,z=i((B=a(H)*o(_)+o(H)*a(_)*a(Y),180/Math.PI*Math.asin(B)));var B;var G,J;var K;z>180&&(z-=360);return{ra:q,dec:z,distance:U}}(this.date).distance}}}),t}();function e(t){var n=t.getFullYear(),r=t.getMonth()+1,e=t.getDate(),i=Math.floor(n/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(n+4716))+Math.floor(30.6001*(r+1))+e+a-1524.5}function i(t){return t-360*Math.floor(t/360)}function a(t){return Math.sin(t*Math.PI/180)}function o(t){return Math.cos(t*Math.PI/180)}var u=[0,2,2,0,0,0,2,2,2,2,0,1,0,2,0,0,4,0,4,2,2,1,1,2,2,4,2,0,2,2,1,2,0,0,2,2,2,4,0,3,2,4,0,2,2,2,4,0,4,1,2,0,1,3,4,2,0,1,2,2],s=[0,0,0,0,1,0,0,-1,0,-1,1,0,1,0,0,0,0,0,0,1,1,0,1,-1,0,0,0,1,0,-1,0,-2,1,2,-2,0,0,-1,0,0,1,-1,2,2,1,-1,0,0,-1,0,1,0,1,0,0,-1,2,1,0,0],f=[1,-1,0,2,0,0,-2,-1,1,0,-1,0,1,0,1,1,-1,3,-2,-1,0,-1,0,1,2,0,-3,-2,-1,-2,1,0,2,0,-1,1,0,-1,2,-1,1,-2,-1,-1,-2,0,1,4,0,-2,0,2,1,-2,-3,2,1,-1,3,-1],h=[0,0,0,0,0,2,0,0,0,0,0,0,0,-2,2,-2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,-2,2,0,2,0,0,0,0,0,0,-2,0,0,0,0,-2,-2,0,0,0,0,0,0,0,-2],c=[6288774,1274027,658314,213618,-185116,-114332,58793,57066,53322,45758,-40923,-34720,-30383,15327,-12528,10980,10675,10034,8548,-7888,-6766,-5163,4987,4036,3994,3861,3665,-2689,-2602,2390,-2348,2236,-2120,-2069,2048,-1773,-1595,1215,-1110,-892,-810,759,-713,-700,691,596,549,537,520,-487,-399,-381,351,-340,330,327,-323,299,294,0],l=[-20905355,-3699111,-2955968,-569925,48888,-3149,246158,-152138,-170733,-204586,-129620,108743,104755,10321,0,79661,-34782,-23210,-21636,24208,30824,-8379,-16675,-12831,-10445,-11650,14403,-7003,0,10056,6322,-9884,5751,0,-4950,4130,0,-3958,0,3258,2616,-1897,-2117,2354,0,0,-1423,-1117,-1571,-1739,0,-4421,0,0,0,0,1165,0,0,8752],M=[0,0,0,2,2,2,2,0,2,0,2,2,2,2,2,2,2,0,4,0,0,0,1,0,0,0,1,0,4,4,0,4,2,2,2,2,0,2,2,2,2,4,2,2,0,2,1,1,0,2,1,2,0,4,4,1,4,1,4,2],g=[0,0,0,0,0,0,0,0,0,0,-1,0,0,1,-1,-1,-1,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,1,1,0,-1,-2,0,1,1,1,1,1,0,-1,1,0,-1,0,0,0,-1,-2],v=[0,1,1,0,-1,-1,0,2,1,2,0,-2,1,0,-1,0,-1,-1,-1,0,0,-1,0,1,1,0,0,3,0,-1,1,-2,0,2,1,-2,3,2,-3,-1,0,0,1,0,1,1,0,0,-2,-1,1,-2,2,-2,-1,1,1,-1,0,0],d=[1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,3,1,1,1,-1,-1,-1,1,-1,1,-3,1,-3,-1,-1,1,-1,1,-1,1,1,1,1,-1,3,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1],A=[5128122,280602,277693,173237,55413,46271,32573,17198,9266,8822,8216,4324,4200,-3359,2463,2211,2065,-1870,1828,-1794,-1749,-1565,-1491,-1475,-1410,-1344,-1335,1107,1021,833,777,671,607,596,491,-451,439,422,421,-366,-351,331,315,302,-283,-229,223,223,-220,-220,-185,181,-177,176,166,-164,132,-119,115,107];t.exports=r},2397:(t,n,r)=>{var e=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),i=r(2507),a=r(6196),o=.833,u=.3,s=6,f=12,h=18,c=-6,l=function(){function t(n,r,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.lat=r,this.longitude=e,this.sun=new i(n,r,e),this.moon=new a(n,r,e)}return e(t,{solarNoon:{get:function(){return this.sun.solarNoon}},sunrise:{get:function(){return this.sun.timeAtAngle(o,!0)}},sunset:{get:function(){return this.sun.timeAtAngle(o)}},sunriseEnd:{get:function(){return this.sun.timeAtAngle(u,!0)}},sunsetStart:{get:function(){return this.sun.timeAtAngle(u,!1)}},civilDawn:{get:function(){return this.sun.timeAtAngle(s,!0)}},dawn:{get:function(){return this.civilDawn}},civilDusk:{get:function(){return this.sun.timeAtAngle(s,!1)}},dusk:{get:function(){return this.civilDusk}},nauticalDawn:{get:function(){return this.sun.timeAtAngle(f,!0)}},nauticalDusk:{get:function(){return this.sun.timeAtAngle(f,!1)}},nightStart:{get:function(){return this.astronomicalDusk}},astronomicalDusk:{get:function(){return this.sun.timeAtAngle(h,!1)}},astronomicalDawn:{get:function(){return this.sun.timeAtAngle(h,!0)}},nightEnd:{get:function(){return this.astronomicalDawn}},goldenHourStart:{get:function(){return this.sun.timeAtAngle(c,!1)}},goldenHourEnd:{get:function(){return this.sun.timeAtAngle(c,!0)}},lunarDistance:{get:function(){return this.moon.distance}},lunarIlluminosity:{get:function(){return this.moon.illuminosity}}}),t}();t.exports=l},2507:t=>{var n=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),r=function(){function t(n,r,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.latitude=r,this.longitude=e,this.julianDate=function(t){var n=t.getFullYear(),r=t.getMonth()+1,e=t.getDate(),i=Math.floor(n/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(n+4716))+Math.floor(30.6001*(r+1))+e+a-1524.5}(n)}return n(t,{solarNoon:{get:function(){return function(t,n,r){var a=l(i(t-n/360)),o=i(t+(720-4*n-a)/1440);a=l(o);var u=720-4*n-a;for(;u<0;)u+=1440;for(;u>=1440;)u-=1440;return e(r,u)}(this.julianDate,this.longitude,this.date)}},timeAtAngle:{value:function(t,n){return function(t,n,r,i,a,o){var u=v(t,n,r,a,o),s=v(t,n,r+u/1440,a,o);if(M(s))return e(i,s);var f=function(t){var n,r=Math.floor(t+.5),e=t+.5-r;if(r<2299161)n=r;else{var i=Math.floor((r-1867216.25)/36524.25);n=r+1+i-Math.floor(i/4)}var a=n+1524,o=Math.floor((a-122.1)/365.25),u=Math.floor(365.25*o),s=Math.floor((a-u)/30.6001),f=a-u-Math.floor(30.6001*s)+e,h=s<14?s-1:s-13,c=(M=h>2?o-4716:o-4715,M%4===0&&M%100!==0||M%400===0?1:2),l=Math.floor(275*h/9)-c*Math.floor((h+9)/12)+f-30;var M;return l}(r);return g(d(a>66.4&&f>79&&f<267||a<-66.4&&(f<83||f>263)?!t:t,t,n,r,a,o))}(n,t,this.julianDate,this.date,this.latitude,this.longitude)}}}),t}(),e=function(t,n){var r=60*(n-Math.floor(n));return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,n,r))};function i(t){return(t-2451545)/36525}function a(t){return 180*t/Math.PI}function o(t){return Math.PI*t/180}function u(t){for(var n=280.46646+t*(36000.76983+3032e-7*t);n>360;)n-=360;for(;n<0;)n+=360;return n}function s(t){return 357.52911+t*(35999.05029-1537e-7*t)}function f(t){var n=u(t),r=function(t){var n=o(s(t));return Math.sin(n)*(1.914602-t*(.004817+14e-6*t))+Math.sin(n+n)*(.019993-101e-6*t)+289e-6*Math.sin(n+n+n)}(t);return n+r}function h(t){var n=function(t){return 23+(26+(21.448-t*(46.815+t*(59e-5-.001813*t)))/60)/60}(t),r=125.04-1934.136*t;return n+.00256*Math.cos(o(r))}function c(t){var n=h(t),r=function(t){var n=125.04-1934.136*t;return f(t)-.00569-.00478*Math.sin(o(n))}(t),e=Math.sin(o(n))*Math.sin(o(r));return a(Math.asin(e))}function l(t){var n=h(t),r=u(t),e=function(t){return.016708634-t*(42037e-9+1.267e-7*t)}(t),i=s(t),f=Math.tan(o(n)/2);f*=f;var c=Math.sin(2*o(r)),l=Math.sin(o(i));return 4*a(f*c-2*e*l+4*e*f*l*Math.cos(2*o(r))-.5*f*f*Math.sin(4*o(r))-1.25*e*e*Math.sin(2*o(i)))}function M(t){for(var n=!1,r=""+t,e=0;e"9")return!1}else n=!0}return!0}function g(t){if(t<9e5||t>2817e3)return"error";var n,r=Math.floor(t+.5),e=t+.5-r;if(r<2299161)n=r;else{var i=Math.floor((r-1867216.25)/36524.25);n=r+1+i-Math.floor(i/4)}var a=n+1524,o=Math.floor((a-122.1)/365.25),u=Math.floor(365.25*o),s=Math.floor((a-u)/30.6001),f=a-u-Math.floor(30.6001*s)+e,h=s<14?s-1:s-13,c=h>2?o-4716:o-4715;return new Date(Date.UTC(c,h-1,f,0,0,0))}function v(t,n,r,e,u){var s=i(r),f=l(s),h=function(t,n,r){var e=o(n),i=o(r),a=Math.cos(o(90+t))/(Math.cos(e)*Math.cos(i))-Math.tan(e)*Math.tan(i);return Math.acos(a)}(n,e,c(s));return t||(h=-h),720-4*(u+a(h))-f}function d(t,n,r,e,i,a){for(var o=e,u=t?1:-1,s=v(n,r,o,i,a);!M(s);)s=v(n,r,o+=u,i,a);return o}t.exports=r}}]); +//# sourceMappingURL=97.3068ba19.chunk.js.map \ No newline at end of file diff --git a/static/js/97.4efa0057.chunk.js.map b/static/js/97.3068ba19.chunk.js.map similarity index 99% rename from static/js/97.4efa0057.chunk.js.map rename to static/js/97.3068ba19.chunk.js.map index 8292b87..115858b 100644 --- a/static/js/97.4efa0057.chunk.js.map +++ b/static/js/97.3068ba19.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/97.4efa0057.chunk.js","mappings":"4HAEAA,EAAOC,QAAU,EAAjBD,K,WCAA,IAAIE,EAAgB,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,KAAOD,EAAO,CAAE,IAAIE,EAAOF,EAAMC,GAAMC,EAAKC,cAAe,EAAUD,EAAKE,QAAOF,EAAKG,UAAW,EAAM,CAAEC,OAAOR,iBAAiBC,EAAQC,EAAQ,CAAE,OAAO,SAAUO,EAAaC,EAAYC,GAAiJ,OAA9HD,GAAYV,EAAiBS,EAAYG,UAAWF,GAAiBC,GAAaX,EAAiBS,EAAaE,GAAqBF,CAAa,CAAG,CAAva,GAIhBI,EAAQ,WACV,SAASA,EAAKC,EAAMC,EAAUC,IAHV,SAAUC,EAAUR,GAAe,KAAMQ,aAAoBR,GAAgB,MAAM,IAAIS,UAAU,oCAAwC,CAI3JC,CAAgBC,KAAMP,GAEtBO,KAAKN,KAAOA,EACZM,KAAKL,SAAWA,EAChBK,KAAKJ,UAAYA,EAEjBI,KAAKC,WAAaC,EAAMR,EAC1B,CAeA,OAbAf,EAAac,EAAM,CACjBU,aAAc,CACZC,IAAK,WACH,OA0XR,SAAmBV,GAEjB,IACIW,GADIH,EAAMR,GAAQ,UACT,SAAW,MACpBY,EAAKD,EAAIA,EACTE,EAAKD,EAAKD,EACVG,EAAKD,EAAKF,EAIVI,EAAI,YAAc,eAAiBJ,EAAI,SAAYC,EAAKC,EAAK,OAASC,EAAK,SAI3EE,EAAK,YAAc,eAAiBL,EAAI,SAAYC,EAAKC,EAAK,MAAQC,EAAK,QAE3EG,EAAI,YAAc,cAAgBN,EAAI,QAAYC,EAAKC,EAAK,OAGhE,OAAOK,EADE,IAAMH,EAAI,MAAQI,EAAKH,GAAM,IAAMG,EAAKF,GAAK,M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AAYkI,EAASgC,IACD7D,CAElC,CA0BA,SAASuB,EAAwB6C,EAAM5D,EAAM6D,EAAM5D,EAAI/G,EAAUC,GAK/D,IAJA,IAAI2K,EAAY7D,EACZ8D,EAAYH,EAAO,GAAK,EAExBI,EAAO7D,EAAkBH,EAAM6D,EAAMC,EAAW5K,EAAUC,IACtDkH,EAAS2D,IAEfA,EAAO7D,EAAkBH,EAAM6D,EAD/BC,GAAaC,EACmC7K,EAAUC,GAG5D,OAAO2K,CACT,CAEA9L,EAAOC,QAAU4F,C","sources":["../node_modules/solar-calc/index.js","../node_modules/solar-calc/lib/moon.js","../node_modules/solar-calc/lib/solarCalc.js","../node_modules/solar-calc/lib/sun.js"],"sourcesContent":["'use strict';\n\nmodule.exports = require('./lib/solarCalc.js');\n","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Moon = (function () {\n function Moon(date, latitude, longitude) {\n _classCallCheck(this, Moon);\n\n this.date = date;\n this.latitude = latitude;\n this.longitude = longitude;\n\n this.julianDate = getJD(date);\n }\n\n _createClass(Moon, {\n illuminosity: {\n get: function () {\n return moonPhase(this.date) / 360;\n }\n },\n distance: {\n get: function () {\n return moonPos(this.date).distance;\n }\n }\n });\n\n return Moon;\n})();\n\n// Utility functions for astronomical programming.\n// JavaScript by Peter Hayes http://www.peter-hayes.freeserve.co.uk/\n// Copyright 2001-2002\n// This code is made freely available but please keep this notice.\n// I accept no liability for any errors in my coding but please\n// let me know of any errors you find. My address is on my home page.\n\nfunction getJD(date) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n var A = Math.floor(year / 100);\n var B = 2 - A + Math.floor(A / 4);\n var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;\n return JD;\n}\n\n// function dayno(year, month, day, hours) {\n// // Day number is a modified Julian date, day 0 is 2000 January 0.0\n// // which corresponds to a Julian date of 2451543.5\n// var A = Math.floor(year / 100);\n// var B = 2 - A + Math.floor(A / 4);\n// var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5 + hours;\n// return JD;\n// }\n\n// function julian(year, month, day, hours) {\n// return dayno(year, month, day, hours) + 2451543.5;\n// }\n\n// function jdtocd(jd) {\n// // The calendar date from julian date\n// // Returns year, month, day, day of week, hours, minutes, seconds\n// var Z = Math.floor(jd + 0.5);\n// var F = jd + 0.5 - Z;\n// if (Z < 2299161) {\n// var A = Z;\n// } else {\n// var alpha = Math.floor((Z - 1867216.25) / 36524.25);\n// var A = Z + 1 + alpha - Math.floor(alpha / 4);\n// }\n// var B = A + 1524;\n// var C = Math.floor((B - 122.1) / 365.25);\n// var D = Math.floor(365.25 * C);\n// var E = Math.floor((B - D) / 30.6001);\n// var d = B - D - Math.floor(30.6001 * E) + F;\n// if (E < 14) {\n// var month = E - 1;\n// } else {\n// var month = E - 13;\n// }\n// if (month > 2) {\n// var year = C - 4716;\n// } else {\n// var year = C - 4715;\n// }\n// var day = Math.floor(d);\n// var h = (d - day) * 24;\n// var hours = Math.floor(h);\n// var m = (h - hours) * 60;\n// var minutes = Math.floor(m);\n// var seconds = Math.round((m - minutes) * 60);\n// if (seconds >= 60) {\n// minutes = minutes + 1;\n// seconds = seconds - 60;\n// }\n// if (minutes >= 60) {\n// hours = hours + 1;\n// minutes = 0;\n// }\n// var dw = Math.floor(jd + 1.5) - 7 * Math.floor((jd + 1.5) / 7);\n// return [year, month, day, dw, hours, minutes, seconds];\n// }\n\n// function local_sidereal(year, month, day, hours, lon) {\n// // Compute local siderial time in degrees\n// // year, month, day and hours are the Greenwich date and time\n// // lon is the observers longitude\n// var d = dayno(year, month, day, hours);\n// var lst = (98.9818 + 0.985647352 * d + hours * 15 + lon);\n// return rev(lst) / 15;\n// }\n\n// function radtoaa(ra, dec, year, month, day, hours, lat, lon) {\n// // convert ra and dec to altitude and azimuth\n// // year, month, day and hours are the Greenwich date and time\n// // lat and lon are the observers latitude and longitude\n// var lst = local_sidereal(year, month, day, hours, lon);\n// var x = cosd(15.0 * (lst - ra)) * cosd(dec);\n// var y = sind(15.0 * (lst - ra)) * cosd(dec);\n// var z = sind(dec);\n// // rotate so z is the local zenith\n// var xhor = x * sind(lat) - z * cosd(lat);\n// var yhor = y;\n// var zhor = x * cosd(lat) + z * sind(lat);\n// var azimuth = rev(atan2d(yhor, xhor) + 180.0); // so 0 degrees is north\n// var altitude = atan2d(zhor, Math.sqrt(xhor * xhor + yhor * yhor));\n// return [altitude, azimuth];\n// }\n\n// Extensions to the Math routines - Trig routines in degrees\n// JavaScript by Peter Hayes http://www.peter-hayes.freeserve.co.uk/\n// Copyright 2001-2002\n\nfunction rev(angle) {\n return angle - Math.floor(angle / 360) * 360;\n}\n\nfunction sind(angle) {\n return Math.sin(angle * Math.PI / 180);\n}\n\nfunction cosd(angle) {\n return Math.cos(angle * Math.PI / 180);\n}\n\nfunction tand(angle) {\n return Math.tan(angle * Math.PI / 180);\n}\n\nfunction asind(c) {\n return 180 / Math.PI * Math.asin(c);\n}\n\n// function acosd(c) {\n// return (180.0 / Math.PI) * Math.acos(c);\n// }\n\nfunction atan2d(y, x) {\n return 180 / Math.PI * Math.atan(y / x) - 180 * (x < 0);\n}\n\n// function anglestring(a, circle) {\n// // returns a in degrees as a string degrees:minutes\n// // circle is true for range between 0 and 360 and false for -90 to +90\n// var ar = Math.round(a * 60) / 60;\n// var deg = Math.abs(ar);\n// var min = Math.round(60.0 * (deg - Math.floor(deg)));\n// if (min >= 60) {\n// deg += 1;\n// min = 0;\n// }\n// var anglestr = \"\";\n// if (!circle) anglestr += (ar < 0 ? \"-\" : \"+\");\n// if (circle) anglestr += ((Math.floor(deg) < 100) ? \"0\" : \"\");\n// anglestr += ((Math.floor(deg) < 10) ? \"0\" : \"\") + Math.floor(deg);\n// anglestr += ((min < 10) ? \":0\" : \":\") + (min);\n// return anglestr;\n// }\n\n// JavaScript by Peter Hayes http://www.aphayes.pwp.blueyonder.co.uk/\n// Copyright 2001-2010\n// Unless otherwise stated this code is based on the methods in\n// Astronomical Algorithms, first edition, by Jean Meeus\n// Published by Willmann-Bell, Inc.\n// This code is made freely available but please keep this notice.\n// The calculations are approximate but should be good enough for general use,\n// I accept no responsibility for errors in astronomy or coding.\n\n// WARNING moonrise code changed on 6 May 2003 to correct a systematic error\n// these are now local times NOT UTC as the original code did.\n\n// Meeus first edition table 45.A Longitude and distance of the moon\n\nvar T45AD = [0, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 1, 0, 2, 0, 0, 4, 0, 4, 2, 2, 1, 1, 2, 2, 4, 2, 0, 2, 2, 1, 2, 0, 0, 2, 2, 2, 4, 0, 3, 2, 4, 0, 2, 2, 2, 4, 0, 4, 1, 2, 0, 1, 3, 4, 2, 0, 1, 2, 2];\n\nvar T45AM = [0, 0, 0, 0, 1, 0, 0, -1, 0, -1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, -2, 1, 2, -2, 0, 0, -1, 0, 0, 1, -1, 2, 2, 1, -1, 0, 0, -1, 0, 1, 0, 1, 0, 0, -1, 2, 1, 0, 0];\n\nvar T45AMP = [1, -1, 0, 2, 0, 0, -2, -1, 1, 0, -1, 0, 1, 0, 1, 1, -1, 3, -2, -1, 0, -1, 0, 1, 2, 0, -3, -2, -1, -2, 1, 0, 2, 0, -1, 1, 0, -1, 2, -1, 1, -2, -1, -1, -2, 0, 1, 4, 0, -2, 0, 2, 1, -2, -3, 2, 1, -1, 3, -1];\n\nvar T45AF = [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -2, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -2, 2, 0, 2, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, -2, -2, 0, 0, 0, 0, 0, 0, 0, -2];\n\nvar T45AL = [6288774, 1274027, 658314, 213618, -185116, -114332, 58793, 57066, 53322, 45758, -40923, -34720, -30383, 15327, -12528, 10980, 10675, 10034, 8548, -7888, -6766, -5163, 4987, 4036, 3994, 3861, 3665, -2689, -2602, 2390, -2348, 2236, -2120, -2069, 2048, -1773, -1595, 1215, -1110, -892, -810, 759, -713, -700, 691, 596, 549, 537, 520, -487, -399, -381, 351, -340, 330, 327, -323, 299, 294, 0];\n\nvar T45AR = [-20905355, -3699111, -2955968, -569925, 48888, -3149, 246158, -152138, -170733, -204586, -129620, 108743, 104755, 10321, 0, 79661, -34782, -23210, -21636, 24208, 30824, -8379, -16675, -12831, -10445, -11650, 14403, -7003, 0, 10056, 6322, -9884, 5751, 0, -4950, 4130, 0, -3958, 0, 3258, 2616, -1897, -2117, 2354, 0, 0, -1423, -1117, -1571, -1739, 0, -4421, 0, 0, 0, 0, 1165, 0, 0, 8752];\n\n// Meeus table 45B latitude of the moon\n\nvar T45BD = [0, 0, 0, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 4, 0, 4, 2, 2, 2, 2, 0, 2, 2, 2, 2, 4, 2, 2, 0, 2, 1, 1, 0, 2, 1, 2, 0, 4, 4, 1, 4, 1, 4, 2];\n\nvar T45BM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, -1, -1, -1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 1, 0, -1, -2, 0, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, -1, -2];\n\nvar T45BMP = [0, 1, 1, 0, -1, -1, 0, 2, 1, 2, 0, -2, 1, 0, -1, 0, -1, -1, -1, 0, 0, -1, 0, 1, 1, 0, 0, 3, 0, -1, 1, -2, 0, 2, 1, -2, 3, 2, -3, -1, 0, 0, 1, 0, 1, 1, 0, 0, -2, -1, 1, -2, 2, -2, -1, 1, 1, -1, 0, 0];\n\nvar T45BF = [1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 3, 1, 1, 1, -1, -1, -1, 1, -1, 1, -3, 1, -3, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 3, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1];\n\nvar T45BL = [5128122, 280602, 277693, 173237, 55413, 46271, 32573, 17198, 9266, 8822, 8216, 4324, 4200, -3359, 2463, 2211, 2065, -1870, 1828, -1794, -1749, -1565, -1491, -1475, -1410, -1344, -1335, 1107, 1021, 833, 777, 671, 607, 596, 491, -451, 439, 422, 421, -366, -351, 331, 315, 302, -283, -229, 223, 223, -220, -220, -185, 181, -177, 176, 166, -164, 132, -119, 115, 107];\n\n// MoonPos calculates the Moon position, based on Meeus chapter 45\n\nfunction moonPos(date) {\n // julian date\n var jd = getJD(date) + 2451543.5;\n var T = (jd - 2451545) / 36525;\n var T2 = T * T;\n var T3 = T2 * T;\n var T4 = T3 * T;\n // Moons mean longitude L'\n var LP = 218.3164477 + 481267.88123421 * T - 0.0015786 * T2 + T3 / 538841 - T4 / 65194000;\n // Moons mean elongation\n var D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000;\n // Suns mean anomaly\n var M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T2 + T3 / 24490000;\n // Moons mean anomaly M'\n var MP = 134.9633964 + 477198.8675055 * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000;\n // Moons argument of latitude\n var F = 93.272095 + 483202.0175233 * T - 0.0036539 * T2 - T3 / 3526000 + T4 / 863310000;\n\n // Additional arguments\n var A1 = 119.75 + 131.849 * T;\n var A2 = 53.09 + 479264.29 * T;\n var A3 = 313.45 + 481266.484 * T;\n var E = 1 - 0.002516 * T - 0.0000074 * T2;\n var E2 = E * E;\n // Sums of periodic terms from table 45.A and 45.B\n var Sl = 0;\n var Sr = 0;\n for (var i = 0; i < 60; i++) {\n var Eterm = 1;\n if (Math.abs(T45AM[i]) === 1) Eterm = E;\n if (Math.abs(T45AM[i]) === 2) Eterm = E2;\n Sl += T45AL[i] * Eterm * sind(rev(T45AD[i] * D + T45AM[i] * M + T45AMP[i] * MP + T45AF[i] * F));\n Sr += T45AR[i] * Eterm * cosd(rev(T45AD[i] * D + T45AM[i] * M + T45AMP[i] * MP + T45AF[i] * F));\n }\n var Sb = 0;\n for (var i = 0; i < 60; i++) {\n var Eterm = 1;\n if (Math.abs(T45BM[i]) === 1) Eterm = E;\n if (Math.abs(T45BM[i]) === 2) Eterm = E2;\n Sb += T45BL[i] * Eterm * sind(rev(T45BD[i] * D + T45BM[i] * M + T45BMP[i] * MP + T45BF[i] * F));\n }\n // Additional additive terms\n Sl = Sl + 3958 * sind(rev(A1)) + 1962 * sind(rev(LP - F)) + 318 * sind(rev(A2));\n Sb = Sb - 2235 * sind(rev(LP)) + 382 * sind(rev(A3)) + 175 * sind(rev(A1 - F)) + 175 * sind(rev(A1 + F)) + 127 * sind(rev(LP - MP)) - 115 * sind(rev(LP + MP));\n // geocentric longitude, latitude and distance\n var mglong = rev(LP + Sl / 1000000);\n var mglat = rev(Sb / 1000000);\n if (mglat > 180) mglat = mglat - 360;\n var mr = Math.round(385000.56 + Sr / 1000);\n // Obliquity of Ecliptic\n var obl = 23.4393 - 3.563e-9 * (jd - 2451543.5);\n // RA and dec\n var ra = rev(atan2d(sind(mglong) * cosd(obl) - tand(mglat) * sind(obl), cosd(mglong))) / 15;\n var dec = rev(asind(sind(mglat) * cosd(obl) + cosd(mglat) * sind(obl) * sind(mglong)));\n if (dec > 180) dec = dec - 360;\n return {\n ra: ra,\n dec: dec,\n distance: mr\n };\n}\n\n// function MoonRise(year, month, day, TZ, latitude, longitude) {\n// // returns an array containing rise and set times or one of the\n// // following codes.\n// // -1 rise or set event not found and moon was down at 00:00\n// // -2 rise or set event not found and moon was up at 00:00\n// // WARNING code changes on 6/7 May 2003 these are now local times\n// // NOT UTC and rise/set not found codes changed.\n// var hours = 0;\n// var riseset = [];\n// // elh is the elevation at the hour elhdone is true if elh calculated\n// var elh = [];\n// var elhdone = [];\n// for (var i = 0; i <= 24; i++) {\n// elhdone[i] = false;\n// }\n// // Compute the moon elevation at start and end of day\n// // store elevation at the hours in an array elh to save search time\n// var rad = MoonPos(year, month, day, hours - TZ);\n// var altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[0] = altaz[0];\n// elhdone[0] = true;\n// // set the return code to allow for always up or never rises\n// if (elh[0] > 0.0) {\n// riseset = [-2, -2];\n// } else {\n// riseset = [-1, -1];\n// }\n// hours = 24;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[24] = altaz[0];\n// elhdone[24] = true;\n// // search for moonrise and set\n// for (var rise = 0; rise < 2; rise++) {\n// var found = false;\n// var hfirst = 0;\n// var hlast = 24;\n// // Try a binary chop on the hours to speed the search\n// while (Math.ceil((hlast - hfirst) / 2) > 1) {\n// hmid = hfirst + Math.round((hlast - hfirst) / 2);\n// if (!elhdone[hmid]) {\n// hours = hmid;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[hmid] = altaz[0];\n// elhdone[hmid] = true;\n// }\n// if (((rise === 0) && (elh[hfirst] <= 0.0) && (elh[hmid] >= 0.0)) ||\n// ((rise === 1) && (elh[hfirst] >= 0.0) && (elh[hmid] <= 0.0))) {\n// hlast = hmid;\n// found = true;\n// continue;\n// }\n// if (((rise === 0) && (elh[hmid] <= 0.0) && (elh[hlast] >= 0.0)) ||\n// ((rise === 1) && (elh[hmid] >= 0.0) && (elh[hlast] <= 0.0))) {\n// hfirst = hmid;\n// found = true;\n// continue;\n// }\n// break;\n// }\n// // If the binary chop did not find a 1 hour interval\n// if ((hlast - hfirst) > 1) {\n// for (var i = hfirst; i < hlast; i++) {\n// found = false;\n// if (!elhdone[i + 1]) {\n// hours = i + 1;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[hours] = altaz[0];\n// elhdone[hours] = true;\n// }\n// if (((rise === 0) && (elh[i] <= 0.0) && (elh[i + 1] >= 0.0)) ||\n// ((rise === 1) && (elh[i] >= 0.0) && (elh[i + 1] <= 0.0))) {\n// hfirst = i;\n// hlast = i + 1;\n// found = true;\n// break;\n// }\n// }\n// }\n// // simple linear interpolation for the minutes\n// if (found) {\n// var elfirst = elh[hfirst];\n// var ellast = elh[hlast];\n// hours = hfirst + 0.5;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// // alert(\"day =\"+day+\" hour =\"+hours+\" altaz=\"+altaz[0]+\" \"+altaz[1]);\n// if ((rise == 0) && (altaz[0] <= 0.0)) {\n// hfirst = hours;\n// elfirst = altaz[0];\n// }\n// if ((rise == 0) && (altaz[0] > 0.0)) {\n// hlast = hours;\n// ellast = altaz[0];\n// }\n// if ((rise == 1) && (altaz[0] <= 0.0)) {\n// hlast = hours;\n// ellast = altaz[0];\n// }\n// if ((rise === 1) && (altaz[0] > 0.0)) {\n// hfirst = hours;\n// elfirst = altaz[0];\n// }\n// var eld = Math.abs(elfirst) + Math.abs(ellast);\n// riseset[rise] = hfirst + (hlast - hfirst) * Math.abs(elfirst) / eld;\n// }\n// } // End of rise/set loop\n// return (riseset);\n// }\n\nfunction moonPhase(date) {\n // the illuminated percentage from Meeus chapter 46\n var j = getJD(date) + 2451543.5;\n var T = (j - 2451545) / 36525;\n var T2 = T * T;\n var T3 = T2 * T;\n var T4 = T3 * T;\n // Moons mean elongation Meeus first edition\n // var D=297.8502042+445267.1115168*T-0.0016300*T2+T3/545868.0-T4/113065000.0;\n // Moons mean elongation Meeus second edition\n var D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000;\n // Moons mean anomaly M' Meeus first edition\n // var MP=134.9634114+477198.8676313*T+0.0089970*T2+T3/69699.0-T4/14712000.0;\n // Moons mean anomaly M' Meeus second edition\n var MP = 134.9633964 + 477198.8675055 * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000;\n // Suns mean anomaly\n var M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T2 + T3 / 24490000;\n // phase angle\n var pa = 180 - D - 6.289 * sind(MP) + 2.1 * sind(M) - 1.274 * sind(2 * D - MP) - 0.658 * sind(2 * D) - 0.214 * sind(2 * MP) - 0.11 * sind(D);\n return rev(pa);\n}\n\n// function MoonQuarters(year, month, day) {\n// // returns an array of Julian Ephemeris Days (JDE) for\n// // new moon, first quarter, full moon and last quarter\n// // Meeus first edition chapter 47 with only the most larger additional corrections\n// // Meeus code calculate Terrestrial Dynamic Time\n// // TDT = UTC + (number of leap seconds) + 32.184\n// // At the end of June 2012 the 25th leap second was added\n// //\n// var quarters = [];\n// // k is an integer for new moon incremented by 0.25 for first quarter 0.5 for new etc.\n// var k = Math.floor((year + ((month - 1) + day / 30) / 12 - 2000) * 12.3685);\n// // Time in Julian centuries since 2000.0\n// var T = k / 1236.85;\n// // Sun's mean anomaly\n// var M = rev(2.5534 + 29.10535669 * k - 0.0000218 * T * T);\n// // Moon's mean anomaly (M' in Meeus)\n// var MP = rev(201.5643 + 385.81693528 * k + 0.0107438 * T * T + 0.00001239 * T * T * T - 0.00000011 * T * T * T);\n// var E = 1 - 0.002516 * T - 0.0000074 * T * T;\n// // Moons argument of latitude\n// var F = rev(160.7108 + 390.67050274 * k - 0.0016341 * T * T - 0.00000227 * T * T * T + 0.000000011 * T * T * T * T);\n// // Longitude of ascending node of lunar orbit\n// var Omega = rev(124.7746 - 1.56375580 * k + 0.0020691 * T * T + 0.00000215 * T * T * T);\n// // The full planetary arguments include 14 terms, only used the 7 most significant\n// var A = [];\n// A[1] = rev(299.77 + 0.107408 * k - 0.009173 * T * T);\n// A[2] = rev(251.88 + 0.016321 * k);\n// A[3] = rev(251.83 + 26.651886 * k);\n// A[4] = rev(349.42 + 36.412478 * k);\n// A[5] = rev(84.88 + 18.206239 * k);\n// A[6] = rev(141.74 + 53.303771 * k);\n// A[7] = rev(207.14 + 2.453732 * k);\n\n// // New moon\n// var JDE0 = 2451550.09765 + 29.530588853 * k + 0.0001337 * T * T - 0.000000150 * T * T * T + 0.00000000073 * T * T * T * T;\n// // Correct for TDT since 1 July 2012\n// JDE0 = JDE0 - 57.184 / (24 * 60 * 60);\n// var JDE = JDE0 - 0.40720 * sind(MP) + 0.17241 * E * sind(M) + 0.01608 * sind(2 * MP) + 0.01039 * sind(2 * F) + 0.00739 * E * sind(MP - M) - 0.00514 * E * sind(MP + M) + 0.00208 * E * E * sind(2 * M) - 0.00111 * sind(MP - 2 * F) - 0.00057 * sind(MP + 2 * F) + 0.00056 * E * sind(2 * MP + M) - 0.00042 * sind(3 * MP) + 0.00042 * E * sind(M + 2 * F) + 0.00038 * E * sind(M - 2 * F) - 0.00024 * E * sind(2 * MP - M) - 0.00017 * sind(Omega) - 0.00007 * sind(MP + 2 * M);\n\n// quarters[0] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // The following code needs tidying up with a loop and conditionals for each quarter\n// // First Quarter k=k+0.25\n// JDE = JDE0 + 29.530588853 * 0.25;\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.62801 * sind(MP) + 0.17172 * E * sind(M) - 0.01183 * E * sind(MP + M) + 0.00862 * sind(2 * MP) + 0.00804 * sind(2 * F) + 0.00454 * E * sind(MP - M) + 0.00204 * E * E * sind(2 * M) - 0.00180 * sind(MP - 2 * F) - 0.00070 * sind(MP + 2 * F) - 0.00040 * sind(3 * MP) - 0.00034 * E * sind(2 * MP - M) + 0.00032 * E * sind(M + 2 * F) + 0.00032 * E * sind(M - 2 * F) - 0.00028 * E * E * sind(MP + 2 * M) + 0.00027 * E * sind(2 * MP + M) - 0.00017 * sind(Omega);\n// // Next term is w add for first quarter & subtract for second\n// JDE = JDE + (0.00306 - 0.00038 * E * cosd(M) + 0.00026 * cosd(MP) - 0.00002 * cosd(MP - M) + 0.00002 * cosd(MP + M) + 0.00002 * cosd(2 * F));\n\n// quarters[1] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // Full moon k=k+0.5\n// JDE = JDE0 + 29.530588853 * 0.5;\n// // Already added 0.25 for first quarter\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.40614 * sind(MP) + 0.17302 * E * sind(M) + 0.01614 * sind(2 * MP) + 0.01043 * sind(2 * F) + 0.00734 * E * sind(MP - M) - 0.00515 * E * sind(MP + M) + 0.00209 * E * E * sind(2 * M) - 0.00111 * sind(MP - 2 * F) - 0.00057 * sind(MP + 2 * F) + 0.00056 * E * sind(2 * MP + M) - 0.00042 * sind(3 * MP) + 0.00042 * E * sind(M + 2 * F) + 0.00038 * E * sind(M - 2 * F) - 0.00024 * E * sind(2 * MP - M) - 0.00017 * sind(Omega) - 0.00007 * sind(MP + 2 * M);\n\n// quarters[2] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // Last Quarter k=k+0.75\n// JDE = JDE0 + 29.530588853 * 0.75;\n// // Already added 0.5 for full moon\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.62801 * sind(MP) + 0.17172 * E * sind(M) - 0.01183 * E * sind(MP + M) + 0.00862 * sind(2 * MP) + 0.00804 * sind(2 * F) + 0.00454 * E * sind(MP - M) + 0.00204 * E * E * sind(2 * M) - 0.00180 * sind(MP - 2 * F) - 0.00070 * sind(MP + 2 * F) - 0.00040 * sind(3 * MP) - 0.00034 * E * sind(2 * MP - M) + 0.00032 * E * sind(M + 2 * F) + 0.00032 * E * sind(M - 2 * F) - 0.00028 * E * E * sind(MP + 2 * M) + 0.00027 * E * sind(2 * MP + M) - 0.00017 * sind(Omega);\n// // Next term is w add for first quarter & subtract for second\n// JDE = JDE - (0.00306 - 0.00038 * E * cosd(M) + 0.00026 * cosd(MP) - 0.00002 * cosd(MP - M) + 0.00002 * cosd(MP + M) + 0.00002 * cosd(2 * F));\n\n// quarters[3] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// return quarters;\n// }\n\nmodule.exports = Moon;","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Sun = require(\"./sun.js\");\nvar Moon = require(\"./moon.js\");\n\nvar degreesBelowHorizon = {\n sunrise: 0.833,\n sunriseEnd: 0.3,\n twilight: 6,\n nauticalTwilight: 12,\n night: 18,\n goldenHour: -6\n};\n\nvar SolarCalc = (function () {\n function SolarCalc(date, latitude, longitude) {\n _classCallCheck(this, SolarCalc);\n\n this.date = date;\n this.lat = latitude;\n this.longitude = longitude;\n\n this.sun = new Sun(date, latitude, longitude);\n this.moon = new Moon(date, latitude, longitude);\n }\n\n _createClass(SolarCalc, {\n solarNoon: {\n get: function () {\n return this.sun.solarNoon;\n }\n },\n sunrise: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunrise, true);\n }\n },\n sunset: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunrise);\n }\n },\n sunriseEnd: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunriseEnd, true);\n }\n },\n sunsetStart: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunriseEnd, false);\n }\n },\n civilDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.twilight, true);\n }\n },\n dawn: {\n get: function () {\n return this.civilDawn;\n }\n },\n civilDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.twilight, false);\n }\n },\n dusk: {\n get: function () {\n return this.civilDusk;\n }\n },\n nauticalDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.nauticalTwilight, true);\n }\n },\n nauticalDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.nauticalTwilight, false);\n }\n },\n nightStart: {\n get: function () {\n return this.astronomicalDusk;\n }\n },\n astronomicalDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.night, false);\n }\n },\n astronomicalDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.night, true);\n }\n },\n nightEnd: {\n get: function () {\n return this.astronomicalDawn;\n }\n },\n goldenHourStart: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.goldenHour, false);\n }\n },\n goldenHourEnd: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.goldenHour, true);\n }\n },\n lunarDistance: {\n get: function () {\n return this.moon.distance;\n }\n },\n lunarIlluminosity: {\n get: function () {\n return this.moon.illuminosity;\n }\n }\n });\n\n return SolarCalc;\n})();\n\nmodule.exports = SolarCalc;","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Sun = (function () {\n function Sun(date, latitude, longitude) {\n _classCallCheck(this, Sun);\n\n this.date = date;\n this.latitude = latitude;\n this.longitude = longitude;\n\n this.julianDate = getJD(date);\n }\n\n _createClass(Sun, {\n solarNoon: {\n get: function () {\n return calcSolNoon(this.julianDate, this.longitude, this.date);\n }\n },\n timeAtAngle: {\n value: function timeAtAngle(angle, rising) {\n return calcSunriseSet(rising, angle, this.julianDate, this.date, this.latitude, this.longitude);\n }\n }\n });\n\n return Sun;\n})();\n\nvar formatDate = function formatDate(date, minutes) {\n var seconds = (minutes - Math.floor(minutes)) * 60;\n return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, minutes, seconds));\n};\n\nfunction calcTimeJulianCent(jd) {\n var T = (jd - 2451545) / 36525;\n return T;\n}\n\nfunction isLeapYear(yr) {\n return yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0;\n}\n\nfunction calcDoyFromJD(jd) {\n var z = Math.floor(jd + 0.5);\n var f = jd + 0.5 - z;\n var A;\n if (z < 2299161) {\n A = z;\n } else {\n var alpha = Math.floor((z - 1867216.25) / 36524.25);\n A = z + 1 + alpha - Math.floor(alpha / 4);\n }\n var B = A + 1524;\n var C = Math.floor((B - 122.1) / 365.25);\n var D = Math.floor(365.25 * C);\n var E = Math.floor((B - D) / 30.6001);\n var day = B - D - Math.floor(30.6001 * E) + f;\n var month = E < 14 ? E - 1 : E - 13;\n var year = month > 2 ? C - 4716 : C - 4715;\n\n var k = isLeapYear(year) ? 1 : 2;\n var doy = Math.floor(275 * month / 9) - k * Math.floor((month + 9) / 12) + day - 30;\n return doy;\n}\n\nfunction radToDeg(angleRad) {\n return 180 * angleRad / Math.PI;\n}\n\nfunction degToRad(angleDeg) {\n return Math.PI * angleDeg / 180;\n}\n\nfunction calcGeomMeanLongSun(t) {\n var L0 = 280.46646 + t * (36000.76983 + t * 0.0003032);\n while (L0 > 360) {\n L0 -= 360;\n }\n while (L0 < 0) {\n L0 += 360;\n }\n return L0; // in degrees\n}\n\nfunction calcGeomMeanAnomalySun(t) {\n var M = 357.52911 + t * (35999.05029 - 0.0001537 * t);\n return M; // in degrees\n}\n\nfunction calcEccentricityEarthOrbit(t) {\n var e = 0.016708634 - t * (0.000042037 + 1.267e-7 * t);\n return e; // unitless\n}\n\nfunction calcSunEqOfCenter(t) {\n var m = calcGeomMeanAnomalySun(t);\n var mrad = degToRad(m);\n var sinm = Math.sin(mrad);\n var sin2m = Math.sin(mrad + mrad);\n var sin3m = Math.sin(mrad + mrad + mrad);\n var C = sinm * (1.914602 - t * (0.004817 + 0.000014 * t)) + sin2m * (0.019993 - 0.000101 * t) + sin3m * 0.000289;\n return C; // in degrees\n}\n\nfunction calcSunTrueLong(t) {\n var l0 = calcGeomMeanLongSun(t);\n var c = calcSunEqOfCenter(t);\n var O = l0 + c;\n return O; // in degrees\n}\n\nfunction calcSunApparentLong(t) {\n var o = calcSunTrueLong(t);\n var omega = 125.04 - 1934.136 * t;\n var lambda = o - 0.00569 - 0.00478 * Math.sin(degToRad(omega));\n return lambda; // in degrees\n}\n\nfunction calcMeanObliquityOfEcliptic(t) {\n var seconds = 21.448 - t * (46.815 + t * (0.00059 - t * 0.001813));\n var e0 = 23 + (26 + seconds / 60) / 60;\n return e0; // in degrees\n}\n\nfunction calcObliquityCorrection(t) {\n var e0 = calcMeanObliquityOfEcliptic(t);\n var omega = 125.04 - 1934.136 * t;\n var e = e0 + 0.00256 * Math.cos(degToRad(omega));\n return e; // in degrees\n}\n\nfunction calcSunDeclination(t) {\n var e = calcObliquityCorrection(t);\n var lambda = calcSunApparentLong(t);\n\n var sint = Math.sin(degToRad(e)) * Math.sin(degToRad(lambda));\n var theta = radToDeg(Math.asin(sint));\n return theta; // in degrees\n}\n\nfunction calcEquationOfTime(t) {\n var epsilon = calcObliquityCorrection(t);\n var l0 = calcGeomMeanLongSun(t);\n var e = calcEccentricityEarthOrbit(t);\n var m = calcGeomMeanAnomalySun(t);\n\n var y = Math.tan(degToRad(epsilon) / 2);\n y *= y;\n\n var sin2l0 = Math.sin(2 * degToRad(l0));\n var sinm = Math.sin(degToRad(m));\n var cos2l0 = Math.cos(2 * degToRad(l0));\n var sin4l0 = Math.sin(4 * degToRad(l0));\n var sin2m = Math.sin(2 * degToRad(m));\n\n var Etime = y * sin2l0 - 2 * e * sinm + 4 * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m;\n return radToDeg(Etime) * 4; // in minutes of time\n}\n\nfunction calcHourAngle(angle, lat, solarDec) {\n var latRad = degToRad(lat);\n var sdRad = degToRad(solarDec);\n var HAarg = Math.cos(degToRad(90 + angle)) / (Math.cos(latRad) * Math.cos(sdRad)) - Math.tan(latRad) * Math.tan(sdRad);\n var HA = Math.acos(HAarg);\n return HA; // in radians (for sunset, use -HA)\n}\n\nfunction isNumber(inputVal) {\n var oneDecimal = false;\n var inputStr = \"\" + inputVal;\n for (var i = 0; i < inputStr.length; i++) {\n var oneChar = inputStr.charAt(i);\n if (i === 0 && (oneChar === \"-\" || oneChar === \"+\")) {\n continue;\n }\n if (oneChar === \".\" && !oneDecimal) {\n oneDecimal = true;\n continue;\n }\n if (oneChar < \"0\" || oneChar > \"9\") {\n return false;\n }\n }\n return true;\n}\n\nfunction getJD(date) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n var A = Math.floor(year / 100);\n var B = 2 - A + Math.floor(A / 4);\n var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;\n return JD;\n}\n\nfunction calcSolNoon(jd, longitude, date) {\n var tnoon = calcTimeJulianCent(jd - longitude / 360);\n var eqTime = calcEquationOfTime(tnoon);\n var solNoonOffset = 720 - longitude * 4 - eqTime; // in minutes\n var newt = calcTimeJulianCent(jd + solNoonOffset / 1440);\n eqTime = calcEquationOfTime(newt);\n var solNoonLocal = 720 - longitude * 4 - eqTime; // in minutes\n while (solNoonLocal < 0) {\n solNoonLocal += 1440;\n }\n while (solNoonLocal >= 1440) {\n solNoonLocal -= 1440;\n }\n return formatDate(date, solNoonLocal);\n // return timeString(solNoonLocal, 3);\n}\n\nfunction dayString(jd) {\n if (jd < 900000 || jd > 2817000) {\n return \"error\";\n } else {\n var z = Math.floor(jd + 0.5);\n var f = jd + 0.5 - z;\n var A;\n if (z < 2299161) {\n A = z;\n } else {\n var alpha = Math.floor((z - 1867216.25) / 36524.25);\n A = z + 1 + alpha - Math.floor(alpha / 4);\n }\n var B = A + 1524;\n var C = Math.floor((B - 122.1) / 365.25);\n var D = Math.floor(365.25 * C);\n var E = Math.floor((B - D) / 30.6001);\n var day = B - D - Math.floor(30.6001 * E) + f;\n var month = E < 14 ? E - 1 : E - 13;\n var year = month > 2 ? C - 4716 : C - 4715;\n return new Date(Date.UTC(year, month - 1, day, 0, 0, 0));\n }\n}\n\nfunction calcSunriseSetUTC(rise, angle, JD, latitude, longitude) {\n var t = calcTimeJulianCent(JD);\n var eqTime = calcEquationOfTime(t);\n var solarDec = calcSunDeclination(t);\n var hourAngle = calcHourAngle(angle, latitude, solarDec);\n //alert(\"HA = \" + radToDeg(hourAngle));\n if (!rise) hourAngle = -hourAngle;\n var delta = longitude + radToDeg(hourAngle);\n var timeUTC = 720 - 4 * delta - eqTime; // in minutes\n return timeUTC;\n}\n\nfunction calcSunriseSet(rise, angle, JD, date, latitude, longitude)\n// rise = 1 for sunrise, 0 for sunset\n{\n var timeUTC = calcSunriseSetUTC(rise, angle, JD, latitude, longitude);\n var newTimeUTC = calcSunriseSetUTC(rise, angle, JD + timeUTC / 1440, latitude, longitude);\n if (isNumber(newTimeUTC)) {\n\n return formatDate(date, newTimeUTC);\n } else {\n // no sunrise/set found\n var doy = calcDoyFromJD(JD);\n var jdy;\n if (latitude > 66.4 && doy > 79 && doy < 267 || latitude < -66.4 && (doy < 83 || doy > 263)) {\n //previous sunrise/next sunset\n jdy = calcJDofNextPrevRiseSet(!rise, rise, angle, JD, latitude, longitude);\n return dayString(jdy);\n } else {\n //previous sunset/next sunrise\n jdy = calcJDofNextPrevRiseSet(rise, rise, angle, JD, latitude, longitude);\n return dayString(jdy);\n }\n }\n}\n\nfunction calcJDofNextPrevRiseSet(next, rise, type, JD, latitude, longitude) {\n var julianday = JD;\n var increment = next ? 1 : -1;\n\n var time = calcSunriseSetUTC(rise, type, julianday, latitude, longitude);\n while (!isNumber(time)) {\n julianday += increment;\n time = calcSunriseSetUTC(rise, type, julianday, latitude, longitude);\n }\n\n return julianday;\n}\n\nmodule.exports = Sun;"],"names":["module","exports","_createClass","defineProperties","target","props","key","prop","configurable","value","writable","Object","Constructor","protoProps","staticProps","prototype","Moon","date","latitude","longitude","instance","TypeError","_classCallCheck","this","julianDate","getJD","illuminosity","get","T","T2","T3","T4","D","MP","M","rev","sind","moonPhase","distance","jd","LP","F","A1","A2","A3","E","E2","Sl","Sr","i","Eterm","Math","abs","T45AM","T45AL","T45AD","T45AMP","T45AF","T45AR","cosd","Sb","T45BM","T45BL","T45BD","T45BMP","T45BF","mglong","mglat","mr","round","obl","ra","y","angle","tan","PI","x","atan","dec","c","asin","moonPos","year","getFullYear","month","getMonth","day","getDate","A","floor","B","sin","cos","Sun","require","degreesBelowHorizon","SolarCalc","lat","sun","moon","solarNoon","sunrise","timeAtAngle","sunset","sunriseEnd","sunsetStart","civilDawn","dawn","civilDusk","dusk","nauticalDawn","nauticalDusk","nightStart","astronomicalDusk","astronomicalDawn","nightEnd","goldenHourStart","goldenHourEnd","lunarDistance","lunarIlluminosity","eqTime","calcEquationOfTime","calcTimeJulianCent","newt","solNoonLocal","formatDate","calcSolNoon","rising","rise","JD","timeUTC","calcSunriseSetUTC","newTimeUTC","isNumber","doy","z","f","alpha","C","k","yr","calcDoyFromJD","dayString","calcJDofNextPrevRiseSet","calcSunriseSet","minutes","seconds","Date","UTC","radToDeg","angleRad","degToRad","angleDeg","calcGeomMeanLongSun","t","L0","calcGeomMeanAnomalySun","calcSunTrueLong","l0","mrad","calcSunEqOfCenter","calcObliquityCorrection","e0","calcMeanObliquityOfEcliptic","omega","calcSunDeclination","e","lambda","calcSunApparentLong","sint","epsilon","calcEccentricityEarthOrbit","m","sin2l0","sinm","inputVal","oneDecimal","inputStr","length","oneChar","charAt","hourAngle","solarDec","latRad","sdRad","HAarg","acos","calcHourAngle","next","type","julianday","increment","time"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/97.3068ba19.chunk.js","mappings":"sGAEAA,EAAOC,QAAU,EAAjBD,K,WCAA,IAAIE,EAAgB,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,KAAOD,EAAO,CAAE,IAAIE,EAAOF,EAAMC,GAAMC,EAAKC,cAAe,EAAUD,EAAKE,QAAOF,EAAKG,UAAW,EAAM,CAAEC,OAAOR,iBAAiBC,EAAQC,EAAQ,CAAE,OAAO,SAAUO,EAAaC,EAAYC,GAAiJ,OAA9HD,GAAYV,EAAiBS,EAAYG,UAAWF,GAAiBC,GAAaX,EAAiBS,EAAaE,GAAqBF,CAAa,CAAG,CAAva,GAIhBI,EAAQ,WACV,SAASA,EAAKC,EAAMC,EAAUC,IAHV,SAAUC,EAAUR,GAAe,KAAMQ,aAAoBR,GAAgB,MAAM,IAAIS,UAAU,oCAAwC,CAI3JC,CAAgBC,KAAMP,GAEtBO,KAAKN,KAAOA,EACZM,KAAKL,SAAWA,EAChBK,KAAKJ,UAAYA,EAEjBI,KAAKC,WAAaC,EAAMR,EAC1B,CAeA,OAbAf,EAAac,EAAM,CACjBU,aAAc,CACZC,IAAK,WACH,OA0XR,SAAmBV,GAEjB,IAC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nFN,SAAuB5G,EAAOwB,EAAKqF,GACjC,IAAIC,EAAShC,EAAStD,GAClBuF,EAAQjC,EAAS+B,GACjBG,EAAQtI,KAAKyC,IAAI2D,EAAS,GAAK9E,KAAWtB,KAAKyC,IAAI2F,GAAUpI,KAAKyC,IAAI4F,IAAUrI,KAAKuB,IAAI6G,GAAUpI,KAAKuB,IAAI8G,GAEhH,OADSrI,KAAKuI,KAAKD,EAErB,CA6EkBE,CAAclH,EAAOvD,EADtBmJ,EAAmBX,IAMlC,OAHK1B,IAAMqD,GAAaA,GAEV,IAAM,GADRlK,EAAYkI,EAASgC,IACD7D,CAElC,CA0BA,SAASuB,EAAwB6C,EAAM5D,EAAM6D,EAAM5D,EAAI/G,EAAUC,GAK/D,IAJA,IAAI2K,EAAY7D,EACZ8D,EAAYH,EAAO,GAAK,EAExBI,EAAO7D,EAAkBH,EAAM6D,EAAMC,EAAW5K,EAAUC,IACtDkH,EAAS2D,IAEfA,EAAO7D,EAAkBH,EAAM6D,EAD/BC,GAAaC,EACmC7K,EAAUC,GAG5D,OAAO2K,CACT,CAEA9L,EAAOC,QAAU4F,C","sources":["../node_modules/solar-calc/index.js","../node_modules/solar-calc/lib/moon.js","../node_modules/solar-calc/lib/solarCalc.js","../node_modules/solar-calc/lib/sun.js"],"sourcesContent":["'use strict';\n\nmodule.exports = require('./lib/solarCalc.js');\n","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Moon = (function () {\n function Moon(date, latitude, longitude) {\n _classCallCheck(this, Moon);\n\n this.date = date;\n this.latitude = latitude;\n this.longitude = longitude;\n\n this.julianDate = getJD(date);\n }\n\n _createClass(Moon, {\n illuminosity: {\n get: function () {\n return moonPhase(this.date) / 360;\n }\n },\n distance: {\n get: function () {\n return moonPos(this.date).distance;\n }\n }\n });\n\n return Moon;\n})();\n\n// Utility functions for astronomical programming.\n// JavaScript by Peter Hayes http://www.peter-hayes.freeserve.co.uk/\n// Copyright 2001-2002\n// This code is made freely available but please keep this notice.\n// I accept no liability for any errors in my coding but please\n// let me know of any errors you find. My address is on my home page.\n\nfunction getJD(date) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n var A = Math.floor(year / 100);\n var B = 2 - A + Math.floor(A / 4);\n var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;\n return JD;\n}\n\n// function dayno(year, month, day, hours) {\n// // Day number is a modified Julian date, day 0 is 2000 January 0.0\n// // which corresponds to a Julian date of 2451543.5\n// var A = Math.floor(year / 100);\n// var B = 2 - A + Math.floor(A / 4);\n// var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5 + hours;\n// return JD;\n// }\n\n// function julian(year, month, day, hours) {\n// return dayno(year, month, day, hours) + 2451543.5;\n// }\n\n// function jdtocd(jd) {\n// // The calendar date from julian date\n// // Returns year, month, day, day of week, hours, minutes, seconds\n// var Z = Math.floor(jd + 0.5);\n// var F = jd + 0.5 - Z;\n// if (Z < 2299161) {\n// var A = Z;\n// } else {\n// var alpha = Math.floor((Z - 1867216.25) / 36524.25);\n// var A = Z + 1 + alpha - Math.floor(alpha / 4);\n// }\n// var B = A + 1524;\n// var C = Math.floor((B - 122.1) / 365.25);\n// var D = Math.floor(365.25 * C);\n// var E = Math.floor((B - D) / 30.6001);\n// var d = B - D - Math.floor(30.6001 * E) + F;\n// if (E < 14) {\n// var month = E - 1;\n// } else {\n// var month = E - 13;\n// }\n// if (month > 2) {\n// var year = C - 4716;\n// } else {\n// var year = C - 4715;\n// }\n// var day = Math.floor(d);\n// var h = (d - day) * 24;\n// var hours = Math.floor(h);\n// var m = (h - hours) * 60;\n// var minutes = Math.floor(m);\n// var seconds = Math.round((m - minutes) * 60);\n// if (seconds >= 60) {\n// minutes = minutes + 1;\n// seconds = seconds - 60;\n// }\n// if (minutes >= 60) {\n// hours = hours + 1;\n// minutes = 0;\n// }\n// var dw = Math.floor(jd + 1.5) - 7 * Math.floor((jd + 1.5) / 7);\n// return [year, month, day, dw, hours, minutes, seconds];\n// }\n\n// function local_sidereal(year, month, day, hours, lon) {\n// // Compute local siderial time in degrees\n// // year, month, day and hours are the Greenwich date and time\n// // lon is the observers longitude\n// var d = dayno(year, month, day, hours);\n// var lst = (98.9818 + 0.985647352 * d + hours * 15 + lon);\n// return rev(lst) / 15;\n// }\n\n// function radtoaa(ra, dec, year, month, day, hours, lat, lon) {\n// // convert ra and dec to altitude and azimuth\n// // year, month, day and hours are the Greenwich date and time\n// // lat and lon are the observers latitude and longitude\n// var lst = local_sidereal(year, month, day, hours, lon);\n// var x = cosd(15.0 * (lst - ra)) * cosd(dec);\n// var y = sind(15.0 * (lst - ra)) * cosd(dec);\n// var z = sind(dec);\n// // rotate so z is the local zenith\n// var xhor = x * sind(lat) - z * cosd(lat);\n// var yhor = y;\n// var zhor = x * cosd(lat) + z * sind(lat);\n// var azimuth = rev(atan2d(yhor, xhor) + 180.0); // so 0 degrees is north\n// var altitude = atan2d(zhor, Math.sqrt(xhor * xhor + yhor * yhor));\n// return [altitude, azimuth];\n// }\n\n// Extensions to the Math routines - Trig routines in degrees\n// JavaScript by Peter Hayes http://www.peter-hayes.freeserve.co.uk/\n// Copyright 2001-2002\n\nfunction rev(angle) {\n return angle - Math.floor(angle / 360) * 360;\n}\n\nfunction sind(angle) {\n return Math.sin(angle * Math.PI / 180);\n}\n\nfunction cosd(angle) {\n return Math.cos(angle * Math.PI / 180);\n}\n\nfunction tand(angle) {\n return Math.tan(angle * Math.PI / 180);\n}\n\nfunction asind(c) {\n return 180 / Math.PI * Math.asin(c);\n}\n\n// function acosd(c) {\n// return (180.0 / Math.PI) * Math.acos(c);\n// }\n\nfunction atan2d(y, x) {\n return 180 / Math.PI * Math.atan(y / x) - 180 * (x < 0);\n}\n\n// function anglestring(a, circle) {\n// // returns a in degrees as a string degrees:minutes\n// // circle is true for range between 0 and 360 and false for -90 to +90\n// var ar = Math.round(a * 60) / 60;\n// var deg = Math.abs(ar);\n// var min = Math.round(60.0 * (deg - Math.floor(deg)));\n// if (min >= 60) {\n// deg += 1;\n// min = 0;\n// }\n// var anglestr = \"\";\n// if (!circle) anglestr += (ar < 0 ? \"-\" : \"+\");\n// if (circle) anglestr += ((Math.floor(deg) < 100) ? \"0\" : \"\");\n// anglestr += ((Math.floor(deg) < 10) ? \"0\" : \"\") + Math.floor(deg);\n// anglestr += ((min < 10) ? \":0\" : \":\") + (min);\n// return anglestr;\n// }\n\n// JavaScript by Peter Hayes http://www.aphayes.pwp.blueyonder.co.uk/\n// Copyright 2001-2010\n// Unless otherwise stated this code is based on the methods in\n// Astronomical Algorithms, first edition, by Jean Meeus\n// Published by Willmann-Bell, Inc.\n// This code is made freely available but please keep this notice.\n// The calculations are approximate but should be good enough for general use,\n// I accept no responsibility for errors in astronomy or coding.\n\n// WARNING moonrise code changed on 6 May 2003 to correct a systematic error\n// these are now local times NOT UTC as the original code did.\n\n// Meeus first edition table 45.A Longitude and distance of the moon\n\nvar T45AD = [0, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 1, 0, 2, 0, 0, 4, 0, 4, 2, 2, 1, 1, 2, 2, 4, 2, 0, 2, 2, 1, 2, 0, 0, 2, 2, 2, 4, 0, 3, 2, 4, 0, 2, 2, 2, 4, 0, 4, 1, 2, 0, 1, 3, 4, 2, 0, 1, 2, 2];\n\nvar T45AM = [0, 0, 0, 0, 1, 0, 0, -1, 0, -1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, -2, 1, 2, -2, 0, 0, -1, 0, 0, 1, -1, 2, 2, 1, -1, 0, 0, -1, 0, 1, 0, 1, 0, 0, -1, 2, 1, 0, 0];\n\nvar T45AMP = [1, -1, 0, 2, 0, 0, -2, -1, 1, 0, -1, 0, 1, 0, 1, 1, -1, 3, -2, -1, 0, -1, 0, 1, 2, 0, -3, -2, -1, -2, 1, 0, 2, 0, -1, 1, 0, -1, 2, -1, 1, -2, -1, -1, -2, 0, 1, 4, 0, -2, 0, 2, 1, -2, -3, 2, 1, -1, 3, -1];\n\nvar T45AF = [0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -2, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -2, 2, 0, 2, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, -2, -2, 0, 0, 0, 0, 0, 0, 0, -2];\n\nvar T45AL = [6288774, 1274027, 658314, 213618, -185116, -114332, 58793, 57066, 53322, 45758, -40923, -34720, -30383, 15327, -12528, 10980, 10675, 10034, 8548, -7888, -6766, -5163, 4987, 4036, 3994, 3861, 3665, -2689, -2602, 2390, -2348, 2236, -2120, -2069, 2048, -1773, -1595, 1215, -1110, -892, -810, 759, -713, -700, 691, 596, 549, 537, 520, -487, -399, -381, 351, -340, 330, 327, -323, 299, 294, 0];\n\nvar T45AR = [-20905355, -3699111, -2955968, -569925, 48888, -3149, 246158, -152138, -170733, -204586, -129620, 108743, 104755, 10321, 0, 79661, -34782, -23210, -21636, 24208, 30824, -8379, -16675, -12831, -10445, -11650, 14403, -7003, 0, 10056, 6322, -9884, 5751, 0, -4950, 4130, 0, -3958, 0, 3258, 2616, -1897, -2117, 2354, 0, 0, -1423, -1117, -1571, -1739, 0, -4421, 0, 0, 0, 0, 1165, 0, 0, 8752];\n\n// Meeus table 45B latitude of the moon\n\nvar T45BD = [0, 0, 0, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 4, 0, 4, 2, 2, 2, 2, 0, 2, 2, 2, 2, 4, 2, 2, 0, 2, 1, 1, 0, 2, 1, 2, 0, 4, 4, 1, 4, 1, 4, 2];\n\nvar T45BM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, -1, -1, -1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 1, 0, -1, -2, 0, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, -1, -2];\n\nvar T45BMP = [0, 1, 1, 0, -1, -1, 0, 2, 1, 2, 0, -2, 1, 0, -1, 0, -1, -1, -1, 0, 0, -1, 0, 1, 1, 0, 0, 3, 0, -1, 1, -2, 0, 2, 1, -2, 3, 2, -3, -1, 0, 0, 1, 0, 1, 1, 0, 0, -2, -1, 1, -2, 2, -2, -1, 1, 1, -1, 0, 0];\n\nvar T45BF = [1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 3, 1, 1, 1, -1, -1, -1, 1, -1, 1, -3, 1, -3, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 3, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1];\n\nvar T45BL = [5128122, 280602, 277693, 173237, 55413, 46271, 32573, 17198, 9266, 8822, 8216, 4324, 4200, -3359, 2463, 2211, 2065, -1870, 1828, -1794, -1749, -1565, -1491, -1475, -1410, -1344, -1335, 1107, 1021, 833, 777, 671, 607, 596, 491, -451, 439, 422, 421, -366, -351, 331, 315, 302, -283, -229, 223, 223, -220, -220, -185, 181, -177, 176, 166, -164, 132, -119, 115, 107];\n\n// MoonPos calculates the Moon position, based on Meeus chapter 45\n\nfunction moonPos(date) {\n // julian date\n var jd = getJD(date) + 2451543.5;\n var T = (jd - 2451545) / 36525;\n var T2 = T * T;\n var T3 = T2 * T;\n var T4 = T3 * T;\n // Moons mean longitude L'\n var LP = 218.3164477 + 481267.88123421 * T - 0.0015786 * T2 + T3 / 538841 - T4 / 65194000;\n // Moons mean elongation\n var D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000;\n // Suns mean anomaly\n var M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T2 + T3 / 24490000;\n // Moons mean anomaly M'\n var MP = 134.9633964 + 477198.8675055 * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000;\n // Moons argument of latitude\n var F = 93.272095 + 483202.0175233 * T - 0.0036539 * T2 - T3 / 3526000 + T4 / 863310000;\n\n // Additional arguments\n var A1 = 119.75 + 131.849 * T;\n var A2 = 53.09 + 479264.29 * T;\n var A3 = 313.45 + 481266.484 * T;\n var E = 1 - 0.002516 * T - 0.0000074 * T2;\n var E2 = E * E;\n // Sums of periodic terms from table 45.A and 45.B\n var Sl = 0;\n var Sr = 0;\n for (var i = 0; i < 60; i++) {\n var Eterm = 1;\n if (Math.abs(T45AM[i]) === 1) Eterm = E;\n if (Math.abs(T45AM[i]) === 2) Eterm = E2;\n Sl += T45AL[i] * Eterm * sind(rev(T45AD[i] * D + T45AM[i] * M + T45AMP[i] * MP + T45AF[i] * F));\n Sr += T45AR[i] * Eterm * cosd(rev(T45AD[i] * D + T45AM[i] * M + T45AMP[i] * MP + T45AF[i] * F));\n }\n var Sb = 0;\n for (var i = 0; i < 60; i++) {\n var Eterm = 1;\n if (Math.abs(T45BM[i]) === 1) Eterm = E;\n if (Math.abs(T45BM[i]) === 2) Eterm = E2;\n Sb += T45BL[i] * Eterm * sind(rev(T45BD[i] * D + T45BM[i] * M + T45BMP[i] * MP + T45BF[i] * F));\n }\n // Additional additive terms\n Sl = Sl + 3958 * sind(rev(A1)) + 1962 * sind(rev(LP - F)) + 318 * sind(rev(A2));\n Sb = Sb - 2235 * sind(rev(LP)) + 382 * sind(rev(A3)) + 175 * sind(rev(A1 - F)) + 175 * sind(rev(A1 + F)) + 127 * sind(rev(LP - MP)) - 115 * sind(rev(LP + MP));\n // geocentric longitude, latitude and distance\n var mglong = rev(LP + Sl / 1000000);\n var mglat = rev(Sb / 1000000);\n if (mglat > 180) mglat = mglat - 360;\n var mr = Math.round(385000.56 + Sr / 1000);\n // Obliquity of Ecliptic\n var obl = 23.4393 - 3.563e-9 * (jd - 2451543.5);\n // RA and dec\n var ra = rev(atan2d(sind(mglong) * cosd(obl) - tand(mglat) * sind(obl), cosd(mglong))) / 15;\n var dec = rev(asind(sind(mglat) * cosd(obl) + cosd(mglat) * sind(obl) * sind(mglong)));\n if (dec > 180) dec = dec - 360;\n return {\n ra: ra,\n dec: dec,\n distance: mr\n };\n}\n\n// function MoonRise(year, month, day, TZ, latitude, longitude) {\n// // returns an array containing rise and set times or one of the\n// // following codes.\n// // -1 rise or set event not found and moon was down at 00:00\n// // -2 rise or set event not found and moon was up at 00:00\n// // WARNING code changes on 6/7 May 2003 these are now local times\n// // NOT UTC and rise/set not found codes changed.\n// var hours = 0;\n// var riseset = [];\n// // elh is the elevation at the hour elhdone is true if elh calculated\n// var elh = [];\n// var elhdone = [];\n// for (var i = 0; i <= 24; i++) {\n// elhdone[i] = false;\n// }\n// // Compute the moon elevation at start and end of day\n// // store elevation at the hours in an array elh to save search time\n// var rad = MoonPos(year, month, day, hours - TZ);\n// var altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[0] = altaz[0];\n// elhdone[0] = true;\n// // set the return code to allow for always up or never rises\n// if (elh[0] > 0.0) {\n// riseset = [-2, -2];\n// } else {\n// riseset = [-1, -1];\n// }\n// hours = 24;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[24] = altaz[0];\n// elhdone[24] = true;\n// // search for moonrise and set\n// for (var rise = 0; rise < 2; rise++) {\n// var found = false;\n// var hfirst = 0;\n// var hlast = 24;\n// // Try a binary chop on the hours to speed the search\n// while (Math.ceil((hlast - hfirst) / 2) > 1) {\n// hmid = hfirst + Math.round((hlast - hfirst) / 2);\n// if (!elhdone[hmid]) {\n// hours = hmid;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[hmid] = altaz[0];\n// elhdone[hmid] = true;\n// }\n// if (((rise === 0) && (elh[hfirst] <= 0.0) && (elh[hmid] >= 0.0)) ||\n// ((rise === 1) && (elh[hfirst] >= 0.0) && (elh[hmid] <= 0.0))) {\n// hlast = hmid;\n// found = true;\n// continue;\n// }\n// if (((rise === 0) && (elh[hmid] <= 0.0) && (elh[hlast] >= 0.0)) ||\n// ((rise === 1) && (elh[hmid] >= 0.0) && (elh[hlast] <= 0.0))) {\n// hfirst = hmid;\n// found = true;\n// continue;\n// }\n// break;\n// }\n// // If the binary chop did not find a 1 hour interval\n// if ((hlast - hfirst) > 1) {\n// for (var i = hfirst; i < hlast; i++) {\n// found = false;\n// if (!elhdone[i + 1]) {\n// hours = i + 1;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// elh[hours] = altaz[0];\n// elhdone[hours] = true;\n// }\n// if (((rise === 0) && (elh[i] <= 0.0) && (elh[i + 1] >= 0.0)) ||\n// ((rise === 1) && (elh[i] >= 0.0) && (elh[i + 1] <= 0.0))) {\n// hfirst = i;\n// hlast = i + 1;\n// found = true;\n// break;\n// }\n// }\n// }\n// // simple linear interpolation for the minutes\n// if (found) {\n// var elfirst = elh[hfirst];\n// var ellast = elh[hlast];\n// hours = hfirst + 0.5;\n// rad = MoonPos(year, month, day, hours - TZ);\n// altaz = radtoaa(rad[0], rad[1], year, month, day, hours - TZ, latitude, longitude);\n// // alert(\"day =\"+day+\" hour =\"+hours+\" altaz=\"+altaz[0]+\" \"+altaz[1]);\n// if ((rise == 0) && (altaz[0] <= 0.0)) {\n// hfirst = hours;\n// elfirst = altaz[0];\n// }\n// if ((rise == 0) && (altaz[0] > 0.0)) {\n// hlast = hours;\n// ellast = altaz[0];\n// }\n// if ((rise == 1) && (altaz[0] <= 0.0)) {\n// hlast = hours;\n// ellast = altaz[0];\n// }\n// if ((rise === 1) && (altaz[0] > 0.0)) {\n// hfirst = hours;\n// elfirst = altaz[0];\n// }\n// var eld = Math.abs(elfirst) + Math.abs(ellast);\n// riseset[rise] = hfirst + (hlast - hfirst) * Math.abs(elfirst) / eld;\n// }\n// } // End of rise/set loop\n// return (riseset);\n// }\n\nfunction moonPhase(date) {\n // the illuminated percentage from Meeus chapter 46\n var j = getJD(date) + 2451543.5;\n var T = (j - 2451545) / 36525;\n var T2 = T * T;\n var T3 = T2 * T;\n var T4 = T3 * T;\n // Moons mean elongation Meeus first edition\n // var D=297.8502042+445267.1115168*T-0.0016300*T2+T3/545868.0-T4/113065000.0;\n // Moons mean elongation Meeus second edition\n var D = 297.8501921 + 445267.1114034 * T - 0.0018819 * T2 + T3 / 545868 - T4 / 113065000;\n // Moons mean anomaly M' Meeus first edition\n // var MP=134.9634114+477198.8676313*T+0.0089970*T2+T3/69699.0-T4/14712000.0;\n // Moons mean anomaly M' Meeus second edition\n var MP = 134.9633964 + 477198.8675055 * T + 0.0087414 * T2 + T3 / 69699 - T4 / 14712000;\n // Suns mean anomaly\n var M = 357.5291092 + 35999.0502909 * T - 0.0001536 * T2 + T3 / 24490000;\n // phase angle\n var pa = 180 - D - 6.289 * sind(MP) + 2.1 * sind(M) - 1.274 * sind(2 * D - MP) - 0.658 * sind(2 * D) - 0.214 * sind(2 * MP) - 0.11 * sind(D);\n return rev(pa);\n}\n\n// function MoonQuarters(year, month, day) {\n// // returns an array of Julian Ephemeris Days (JDE) for\n// // new moon, first quarter, full moon and last quarter\n// // Meeus first edition chapter 47 with only the most larger additional corrections\n// // Meeus code calculate Terrestrial Dynamic Time\n// // TDT = UTC + (number of leap seconds) + 32.184\n// // At the end of June 2012 the 25th leap second was added\n// //\n// var quarters = [];\n// // k is an integer for new moon incremented by 0.25 for first quarter 0.5 for new etc.\n// var k = Math.floor((year + ((month - 1) + day / 30) / 12 - 2000) * 12.3685);\n// // Time in Julian centuries since 2000.0\n// var T = k / 1236.85;\n// // Sun's mean anomaly\n// var M = rev(2.5534 + 29.10535669 * k - 0.0000218 * T * T);\n// // Moon's mean anomaly (M' in Meeus)\n// var MP = rev(201.5643 + 385.81693528 * k + 0.0107438 * T * T + 0.00001239 * T * T * T - 0.00000011 * T * T * T);\n// var E = 1 - 0.002516 * T - 0.0000074 * T * T;\n// // Moons argument of latitude\n// var F = rev(160.7108 + 390.67050274 * k - 0.0016341 * T * T - 0.00000227 * T * T * T + 0.000000011 * T * T * T * T);\n// // Longitude of ascending node of lunar orbit\n// var Omega = rev(124.7746 - 1.56375580 * k + 0.0020691 * T * T + 0.00000215 * T * T * T);\n// // The full planetary arguments include 14 terms, only used the 7 most significant\n// var A = [];\n// A[1] = rev(299.77 + 0.107408 * k - 0.009173 * T * T);\n// A[2] = rev(251.88 + 0.016321 * k);\n// A[3] = rev(251.83 + 26.651886 * k);\n// A[4] = rev(349.42 + 36.412478 * k);\n// A[5] = rev(84.88 + 18.206239 * k);\n// A[6] = rev(141.74 + 53.303771 * k);\n// A[7] = rev(207.14 + 2.453732 * k);\n\n// // New moon\n// var JDE0 = 2451550.09765 + 29.530588853 * k + 0.0001337 * T * T - 0.000000150 * T * T * T + 0.00000000073 * T * T * T * T;\n// // Correct for TDT since 1 July 2012\n// JDE0 = JDE0 - 57.184 / (24 * 60 * 60);\n// var JDE = JDE0 - 0.40720 * sind(MP) + 0.17241 * E * sind(M) + 0.01608 * sind(2 * MP) + 0.01039 * sind(2 * F) + 0.00739 * E * sind(MP - M) - 0.00514 * E * sind(MP + M) + 0.00208 * E * E * sind(2 * M) - 0.00111 * sind(MP - 2 * F) - 0.00057 * sind(MP + 2 * F) + 0.00056 * E * sind(2 * MP + M) - 0.00042 * sind(3 * MP) + 0.00042 * E * sind(M + 2 * F) + 0.00038 * E * sind(M - 2 * F) - 0.00024 * E * sind(2 * MP - M) - 0.00017 * sind(Omega) - 0.00007 * sind(MP + 2 * M);\n\n// quarters[0] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // The following code needs tidying up with a loop and conditionals for each quarter\n// // First Quarter k=k+0.25\n// JDE = JDE0 + 29.530588853 * 0.25;\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.62801 * sind(MP) + 0.17172 * E * sind(M) - 0.01183 * E * sind(MP + M) + 0.00862 * sind(2 * MP) + 0.00804 * sind(2 * F) + 0.00454 * E * sind(MP - M) + 0.00204 * E * E * sind(2 * M) - 0.00180 * sind(MP - 2 * F) - 0.00070 * sind(MP + 2 * F) - 0.00040 * sind(3 * MP) - 0.00034 * E * sind(2 * MP - M) + 0.00032 * E * sind(M + 2 * F) + 0.00032 * E * sind(M - 2 * F) - 0.00028 * E * E * sind(MP + 2 * M) + 0.00027 * E * sind(2 * MP + M) - 0.00017 * sind(Omega);\n// // Next term is w add for first quarter & subtract for second\n// JDE = JDE + (0.00306 - 0.00038 * E * cosd(M) + 0.00026 * cosd(MP) - 0.00002 * cosd(MP - M) + 0.00002 * cosd(MP + M) + 0.00002 * cosd(2 * F));\n\n// quarters[1] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // Full moon k=k+0.5\n// JDE = JDE0 + 29.530588853 * 0.5;\n// // Already added 0.25 for first quarter\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.40614 * sind(MP) + 0.17302 * E * sind(M) + 0.01614 * sind(2 * MP) + 0.01043 * sind(2 * F) + 0.00734 * E * sind(MP - M) - 0.00515 * E * sind(MP + M) + 0.00209 * E * E * sind(2 * M) - 0.00111 * sind(MP - 2 * F) - 0.00057 * sind(MP + 2 * F) + 0.00056 * E * sind(2 * MP + M) - 0.00042 * sind(3 * MP) + 0.00042 * E * sind(M + 2 * F) + 0.00038 * E * sind(M - 2 * F) - 0.00024 * E * sind(2 * MP - M) - 0.00017 * sind(Omega) - 0.00007 * sind(MP + 2 * M);\n\n// quarters[2] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// // Last Quarter k=k+0.75\n// JDE = JDE0 + 29.530588853 * 0.75;\n// // Already added 0.5 for full moon\n// M = rev(M + 29.10535669 * 0.25);\n// MP = rev(MP + 385.81693528 * 0.25);\n// F = rev(F + 390.67050274 * 0.25);\n// Omega = rev(Omega - 1.56375580 * 0.25);\n// A[1] = rev(A[1] + 0.107408 * 0.25);\n// A[2] = rev(A[2] + 0.016321 * 0.25);\n// A[3] = rev(A[3] + 26.651886 * 0.25);\n// A[4] = rev(A[4] + 36.412478 * 0.25);\n// A[5] = rev(A[5] + 18.206239 * 0.25);\n// A[6] = rev(A[6] + 53.303771 * 0.25);\n// A[7] = rev(A[7] + 2.453732 * 0.25);\n\n// JDE = JDE - 0.62801 * sind(MP) + 0.17172 * E * sind(M) - 0.01183 * E * sind(MP + M) + 0.00862 * sind(2 * MP) + 0.00804 * sind(2 * F) + 0.00454 * E * sind(MP - M) + 0.00204 * E * E * sind(2 * M) - 0.00180 * sind(MP - 2 * F) - 0.00070 * sind(MP + 2 * F) - 0.00040 * sind(3 * MP) - 0.00034 * E * sind(2 * MP - M) + 0.00032 * E * sind(M + 2 * F) + 0.00032 * E * sind(M - 2 * F) - 0.00028 * E * E * sind(MP + 2 * M) + 0.00027 * E * sind(2 * MP + M) - 0.00017 * sind(Omega);\n// // Next term is w add for first quarter & subtract for second\n// JDE = JDE - (0.00306 - 0.00038 * E * cosd(M) + 0.00026 * cosd(MP) - 0.00002 * cosd(MP - M) + 0.00002 * cosd(MP + M) + 0.00002 * cosd(2 * F));\n\n// quarters[3] = JDE + 0.000325 * sind(A[1]) + 0.000165 * sind(A[2]) + 0.000164 * sind(A[3]) + 0.000126 * sind(A[4]) + 0.000110 * sind(A[5]) + 0.000062 * sind(A[6]) + 0.000060 * sind(A[7]);\n\n// return quarters;\n// }\n\nmodule.exports = Moon;","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Sun = require(\"./sun.js\");\nvar Moon = require(\"./moon.js\");\n\nvar degreesBelowHorizon = {\n sunrise: 0.833,\n sunriseEnd: 0.3,\n twilight: 6,\n nauticalTwilight: 12,\n night: 18,\n goldenHour: -6\n};\n\nvar SolarCalc = (function () {\n function SolarCalc(date, latitude, longitude) {\n _classCallCheck(this, SolarCalc);\n\n this.date = date;\n this.lat = latitude;\n this.longitude = longitude;\n\n this.sun = new Sun(date, latitude, longitude);\n this.moon = new Moon(date, latitude, longitude);\n }\n\n _createClass(SolarCalc, {\n solarNoon: {\n get: function () {\n return this.sun.solarNoon;\n }\n },\n sunrise: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunrise, true);\n }\n },\n sunset: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunrise);\n }\n },\n sunriseEnd: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunriseEnd, true);\n }\n },\n sunsetStart: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.sunriseEnd, false);\n }\n },\n civilDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.twilight, true);\n }\n },\n dawn: {\n get: function () {\n return this.civilDawn;\n }\n },\n civilDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.twilight, false);\n }\n },\n dusk: {\n get: function () {\n return this.civilDusk;\n }\n },\n nauticalDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.nauticalTwilight, true);\n }\n },\n nauticalDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.nauticalTwilight, false);\n }\n },\n nightStart: {\n get: function () {\n return this.astronomicalDusk;\n }\n },\n astronomicalDusk: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.night, false);\n }\n },\n astronomicalDawn: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.night, true);\n }\n },\n nightEnd: {\n get: function () {\n return this.astronomicalDawn;\n }\n },\n goldenHourStart: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.goldenHour, false);\n }\n },\n goldenHourEnd: {\n get: function () {\n return this.sun.timeAtAngle(degreesBelowHorizon.goldenHour, true);\n }\n },\n lunarDistance: {\n get: function () {\n return this.moon.distance;\n }\n },\n lunarIlluminosity: {\n get: function () {\n return this.moon.illuminosity;\n }\n }\n });\n\n return SolarCalc;\n})();\n\nmodule.exports = SolarCalc;","\"use strict\";\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } };\n\nvar Sun = (function () {\n function Sun(date, latitude, longitude) {\n _classCallCheck(this, Sun);\n\n this.date = date;\n this.latitude = latitude;\n this.longitude = longitude;\n\n this.julianDate = getJD(date);\n }\n\n _createClass(Sun, {\n solarNoon: {\n get: function () {\n return calcSolNoon(this.julianDate, this.longitude, this.date);\n }\n },\n timeAtAngle: {\n value: function timeAtAngle(angle, rising) {\n return calcSunriseSet(rising, angle, this.julianDate, this.date, this.latitude, this.longitude);\n }\n }\n });\n\n return Sun;\n})();\n\nvar formatDate = function formatDate(date, minutes) {\n var seconds = (minutes - Math.floor(minutes)) * 60;\n return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, minutes, seconds));\n};\n\nfunction calcTimeJulianCent(jd) {\n var T = (jd - 2451545) / 36525;\n return T;\n}\n\nfunction isLeapYear(yr) {\n return yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0;\n}\n\nfunction calcDoyFromJD(jd) {\n var z = Math.floor(jd + 0.5);\n var f = jd + 0.5 - z;\n var A;\n if (z < 2299161) {\n A = z;\n } else {\n var alpha = Math.floor((z - 1867216.25) / 36524.25);\n A = z + 1 + alpha - Math.floor(alpha / 4);\n }\n var B = A + 1524;\n var C = Math.floor((B - 122.1) / 365.25);\n var D = Math.floor(365.25 * C);\n var E = Math.floor((B - D) / 30.6001);\n var day = B - D - Math.floor(30.6001 * E) + f;\n var month = E < 14 ? E - 1 : E - 13;\n var year = month > 2 ? C - 4716 : C - 4715;\n\n var k = isLeapYear(year) ? 1 : 2;\n var doy = Math.floor(275 * month / 9) - k * Math.floor((month + 9) / 12) + day - 30;\n return doy;\n}\n\nfunction radToDeg(angleRad) {\n return 180 * angleRad / Math.PI;\n}\n\nfunction degToRad(angleDeg) {\n return Math.PI * angleDeg / 180;\n}\n\nfunction calcGeomMeanLongSun(t) {\n var L0 = 280.46646 + t * (36000.76983 + t * 0.0003032);\n while (L0 > 360) {\n L0 -= 360;\n }\n while (L0 < 0) {\n L0 += 360;\n }\n return L0; // in degrees\n}\n\nfunction calcGeomMeanAnomalySun(t) {\n var M = 357.52911 + t * (35999.05029 - 0.0001537 * t);\n return M; // in degrees\n}\n\nfunction calcEccentricityEarthOrbit(t) {\n var e = 0.016708634 - t * (0.000042037 + 1.267e-7 * t);\n return e; // unitless\n}\n\nfunction calcSunEqOfCenter(t) {\n var m = calcGeomMeanAnomalySun(t);\n var mrad = degToRad(m);\n var sinm = Math.sin(mrad);\n var sin2m = Math.sin(mrad + mrad);\n var sin3m = Math.sin(mrad + mrad + mrad);\n var C = sinm * (1.914602 - t * (0.004817 + 0.000014 * t)) + sin2m * (0.019993 - 0.000101 * t) + sin3m * 0.000289;\n return C; // in degrees\n}\n\nfunction calcSunTrueLong(t) {\n var l0 = calcGeomMeanLongSun(t);\n var c = calcSunEqOfCenter(t);\n var O = l0 + c;\n return O; // in degrees\n}\n\nfunction calcSunApparentLong(t) {\n var o = calcSunTrueLong(t);\n var omega = 125.04 - 1934.136 * t;\n var lambda = o - 0.00569 - 0.00478 * Math.sin(degToRad(omega));\n return lambda; // in degrees\n}\n\nfunction calcMeanObliquityOfEcliptic(t) {\n var seconds = 21.448 - t * (46.815 + t * (0.00059 - t * 0.001813));\n var e0 = 23 + (26 + seconds / 60) / 60;\n return e0; // in degrees\n}\n\nfunction calcObliquityCorrection(t) {\n var e0 = calcMeanObliquityOfEcliptic(t);\n var omega = 125.04 - 1934.136 * t;\n var e = e0 + 0.00256 * Math.cos(degToRad(omega));\n return e; // in degrees\n}\n\nfunction calcSunDeclination(t) {\n var e = calcObliquityCorrection(t);\n var lambda = calcSunApparentLong(t);\n\n var sint = Math.sin(degToRad(e)) * Math.sin(degToRad(lambda));\n var theta = radToDeg(Math.asin(sint));\n return theta; // in degrees\n}\n\nfunction calcEquationOfTime(t) {\n var epsilon = calcObliquityCorrection(t);\n var l0 = calcGeomMeanLongSun(t);\n var e = calcEccentricityEarthOrbit(t);\n var m = calcGeomMeanAnomalySun(t);\n\n var y = Math.tan(degToRad(epsilon) / 2);\n y *= y;\n\n var sin2l0 = Math.sin(2 * degToRad(l0));\n var sinm = Math.sin(degToRad(m));\n var cos2l0 = Math.cos(2 * degToRad(l0));\n var sin4l0 = Math.sin(4 * degToRad(l0));\n var sin2m = Math.sin(2 * degToRad(m));\n\n var Etime = y * sin2l0 - 2 * e * sinm + 4 * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m;\n return radToDeg(Etime) * 4; // in minutes of time\n}\n\nfunction calcHourAngle(angle, lat, solarDec) {\n var latRad = degToRad(lat);\n var sdRad = degToRad(solarDec);\n var HAarg = Math.cos(degToRad(90 + angle)) / (Math.cos(latRad) * Math.cos(sdRad)) - Math.tan(latRad) * Math.tan(sdRad);\n var HA = Math.acos(HAarg);\n return HA; // in radians (for sunset, use -HA)\n}\n\nfunction isNumber(inputVal) {\n var oneDecimal = false;\n var inputStr = \"\" + inputVal;\n for (var i = 0; i < inputStr.length; i++) {\n var oneChar = inputStr.charAt(i);\n if (i === 0 && (oneChar === \"-\" || oneChar === \"+\")) {\n continue;\n }\n if (oneChar === \".\" && !oneDecimal) {\n oneDecimal = true;\n continue;\n }\n if (oneChar < \"0\" || oneChar > \"9\") {\n return false;\n }\n }\n return true;\n}\n\nfunction getJD(date) {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n var A = Math.floor(year / 100);\n var B = 2 - A + Math.floor(A / 4);\n var JD = Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;\n return JD;\n}\n\nfunction calcSolNoon(jd, longitude, date) {\n var tnoon = calcTimeJulianCent(jd - longitude / 360);\n var eqTime = calcEquationOfTime(tnoon);\n var solNoonOffset = 720 - longitude * 4 - eqTime; // in minutes\n var newt = calcTimeJulianCent(jd + solNoonOffset / 1440);\n eqTime = calcEquationOfTime(newt);\n var solNoonLocal = 720 - longitude * 4 - eqTime; // in minutes\n while (solNoonLocal < 0) {\n solNoonLocal += 1440;\n }\n while (solNoonLocal >= 1440) {\n solNoonLocal -= 1440;\n }\n return formatDate(date, solNoonLocal);\n // return timeString(solNoonLocal, 3);\n}\n\nfunction dayString(jd) {\n if (jd < 900000 || jd > 2817000) {\n return \"error\";\n } else {\n var z = Math.floor(jd + 0.5);\n var f = jd + 0.5 - z;\n var A;\n if (z < 2299161) {\n A = z;\n } else {\n var alpha = Math.floor((z - 1867216.25) / 36524.25);\n A = z + 1 + alpha - Math.floor(alpha / 4);\n }\n var B = A + 1524;\n var C = Math.floor((B - 122.1) / 365.25);\n var D = Math.floor(365.25 * C);\n var E = Math.floor((B - D) / 30.6001);\n var day = B - D - Math.floor(30.6001 * E) + f;\n var month = E < 14 ? E - 1 : E - 13;\n var year = month > 2 ? C - 4716 : C - 4715;\n return new Date(Date.UTC(year, month - 1, day, 0, 0, 0));\n }\n}\n\nfunction calcSunriseSetUTC(rise, angle, JD, latitude, longitude) {\n var t = calcTimeJulianCent(JD);\n var eqTime = calcEquationOfTime(t);\n var solarDec = calcSunDeclination(t);\n var hourAngle = calcHourAngle(angle, latitude, solarDec);\n //alert(\"HA = \" + radToDeg(hourAngle));\n if (!rise) hourAngle = -hourAngle;\n var delta = longitude + radToDeg(hourAngle);\n var timeUTC = 720 - 4 * delta - eqTime; // in minutes\n return timeUTC;\n}\n\nfunction calcSunriseSet(rise, angle, JD, date, latitude, longitude)\n// rise = 1 for sunrise, 0 for sunset\n{\n var timeUTC = calcSunriseSetUTC(rise, angle, JD, latitude, longitude);\n var newTimeUTC = calcSunriseSetUTC(rise, angle, JD + timeUTC / 1440, latitude, longitude);\n if (isNumber(newTimeUTC)) {\n\n return formatDate(date, newTimeUTC);\n } else {\n // no sunrise/set found\n var doy = calcDoyFromJD(JD);\n var jdy;\n if (latitude > 66.4 && doy > 79 && doy < 267 || latitude < -66.4 && (doy < 83 || doy > 263)) {\n //previous sunrise/next sunset\n jdy = calcJDofNextPrevRiseSet(!rise, rise, angle, JD, latitude, longitude);\n return dayString(jdy);\n } else {\n //previous sunset/next sunrise\n jdy = calcJDofNextPrevRiseSet(rise, rise, angle, JD, latitude, longitude);\n return dayString(jdy);\n }\n }\n}\n\nfunction calcJDofNextPrevRiseSet(next, rise, type, JD, latitude, longitude) {\n var julianday = JD;\n var increment = next ? 1 : -1;\n\n var time = calcSunriseSetUTC(rise, type, julianday, latitude, longitude);\n while (!isNumber(time)) {\n julianday += increment;\n time = calcSunriseSetUTC(rise, type, julianday, latitude, longitude);\n }\n\n return julianday;\n}\n\nmodule.exports = Sun;"],"names":["module","exports","_createClass","defineProperties","target","props","key","prop","configurable","value","writable","Object","Constructor","protoProps","staticProps","prototype","Moon","date","latitude","longitude","instance","TypeError","_classCallCheck","this","julianDate","getJD","illuminosity","get","T","T2","T3","T4","D","MP","M","rev","sind","moonPhase","distance","jd","LP","F","A1","A2","A3","E","E2","Sl","Sr","i","Eterm","Math","abs","T45AM","T45AL","T45AD","T45AMP","T45AF","T45AR","cosd","Sb","T45BM","T45BL","T45BD","T45BMP","T45BF","mglong","mglat","mr","round","obl","ra","y","angle","tan","PI","x","atan","dec","c","asin","moonPos","year","getFullYear","month","getMonth","day","getDate","A","floor","B","sin","cos","Sun","require","degreesBelowHorizon","SolarCalc","lat","sun","moon","solarNoon","sunrise","timeAtAngle","sunset","sunriseEnd","sunsetStart","civilDawn","dawn","civilDusk","dusk","nauticalDawn","nauticalDusk","nightStart","astronomicalDusk","astronomicalDawn","nightEnd","goldenHourStart","goldenHourEnd","lunarDistance","lunarIlluminosity","eqTime","calcEquationOfTime","calcTimeJulianCent","newt","solNoonLocal","formatDate","calcSolNoon","rising","rise","JD","timeUTC","calcSunriseSetUTC","newTimeUTC","isNumber","doy","z","f","alpha","C","k","yr","calcDoyFromJD","dayString","calcJDofNextPrevRiseSet","calcSunriseSet","minutes","seconds","Date","UTC","radToDeg","angleRad","degToRad","angleDeg","calcGeomMeanLongSun","t","L0","calcGeomMeanAnomalySun","calcSunTrueLong","l0","mrad","calcSunEqOfCenter","calcObliquityCorrection","e0","calcMeanObliquityOfEcliptic","omega","calcSunDeclination","e","lambda","calcSunApparentLong","sint","epsilon","calcEccentricityEarthOrbit","m","sin2l0","sinm","inputVal","oneDecimal","inputStr","length","oneChar","charAt","hourAngle","solarDec","latRad","sdRad","HAarg","acos","calcHourAngle","next","type","julianday","increment","time"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/97.4efa0057.chunk.js b/static/js/97.4efa0057.chunk.js deleted file mode 100644 index 7f28453..0000000 --- a/static/js/97.4efa0057.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkdaytime_lowtide_finder=self.webpackChunkdaytime_lowtide_finder||[]).push([[97],{97:(t,n,r)=>{t.exports=r(2397)},6196:t=>{var n=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),r=function(){function t(n,r,i){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.latitude=r,this.longitude=i,this.julianDate=e(n)}return n(t,{illuminosity:{get:function(){return function(t){var n=(e(t)+2451543.5-2451545)/36525,r=n*n,o=r*n,u=o*n,s=297.8501921+445267.1114034*n-.0018819*r+o/545868-u/113065e3,f=134.9633964+477198.8675055*n+.0087414*r+o/69699-u/14712e3,h=357.5291092+35999.0502909*n-1536e-7*r+o/2449e4;return i(180-s-6.289*a(f)+2.1*a(h)-1.274*a(2*s-f)-.658*a(2*s)-.214*a(2*f)-.11*a(s))}(this.date)/360}},distance:{get:function(){return function(t){for(var n=e(t)+2451543.5,r=(n-2451545)/36525,m=r*r,w=m*r,D=w*r,p=218.3164477+481267.88123421*r-.0015786*m+w/538841-D/65194e3,b=297.8501921+445267.1114034*r-.0018819*m+w/545868-D/113065e3,y=357.5291092+35999.0502909*r-1536e-7*m+w/2449e4,k=134.9633964+477198.8675055*r+.0087414*m+w/69699-D/14712e3,P=93.272095+483202.0175233*r-.0036539*m-w/3526e3+D/86331e4,I=119.75+131.849*r,j=53.09+479264.29*r,C=313.45+481266.484*r,E=1-.002516*r-74e-7*m,T=E*E,x=0,_=0,F=0;F<60;F++){var N=1;1===Math.abs(s[F])&&(N=E),2===Math.abs(s[F])&&(N=T),x+=c[F]*N*a(i(u[F]*b+s[F]*y+f[F]*k+h[F]*P)),_+=l[F]*N*o(i(u[F]*b+s[F]*y+f[F]*k+h[F]*P))}var O=0;for(F=0;F<60;F++){N=1;1===Math.abs(g[F])&&(N=E),2===Math.abs(g[F])&&(N=T),O+=A[F]*N*a(i(M[F]*b+g[F]*y+v[F]*k+d[F]*P))}x=x+3958*a(i(I))+1962*a(i(p-P))+318*a(i(j)),O=O-2235*a(i(p))+382*a(i(C))+175*a(i(I-P))+175*a(i(I+P))+127*a(i(p-k))-115*a(i(p+k));var S=i(p+x/1e6),Y=i(O/1e6);Y>180&&(Y-=360);var H=Math.round(385000.56+_/1e3),U=23.4393-3.563e-9*(n-2451543.5),q=i((G=a(S)*o(U)-(K=Y,Math.tan(K*Math.PI/180)*a(U)),J=o(S),180/Math.PI*Math.atan(G/J)-180*(J<0)))/15,z=i((B=a(Y)*o(U)+o(Y)*a(U)*a(S),180/Math.PI*Math.asin(B)));var B;var G,J;var K;z>180&&(z-=360);return{ra:q,dec:z,distance:H}}(this.date).distance}}}),t}();function e(t){var n=t.getFullYear(),r=t.getMonth()+1,e=t.getDate(),i=Math.floor(n/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(n+4716))+Math.floor(30.6001*(r+1))+e+a-1524.5}function i(t){return t-360*Math.floor(t/360)}function a(t){return Math.sin(t*Math.PI/180)}function o(t){return Math.cos(t*Math.PI/180)}var u=[0,2,2,0,0,0,2,2,2,2,0,1,0,2,0,0,4,0,4,2,2,1,1,2,2,4,2,0,2,2,1,2,0,0,2,2,2,4,0,3,2,4,0,2,2,2,4,0,4,1,2,0,1,3,4,2,0,1,2,2],s=[0,0,0,0,1,0,0,-1,0,-1,1,0,1,0,0,0,0,0,0,1,1,0,1,-1,0,0,0,1,0,-1,0,-2,1,2,-2,0,0,-1,0,0,1,-1,2,2,1,-1,0,0,-1,0,1,0,1,0,0,-1,2,1,0,0],f=[1,-1,0,2,0,0,-2,-1,1,0,-1,0,1,0,1,1,-1,3,-2,-1,0,-1,0,1,2,0,-3,-2,-1,-2,1,0,2,0,-1,1,0,-1,2,-1,1,-2,-1,-1,-2,0,1,4,0,-2,0,2,1,-2,-3,2,1,-1,3,-1],h=[0,0,0,0,0,2,0,0,0,0,0,0,0,-2,2,-2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,-2,2,0,2,0,0,0,0,0,0,-2,0,0,0,0,-2,-2,0,0,0,0,0,0,0,-2],c=[6288774,1274027,658314,213618,-185116,-114332,58793,57066,53322,45758,-40923,-34720,-30383,15327,-12528,10980,10675,10034,8548,-7888,-6766,-5163,4987,4036,3994,3861,3665,-2689,-2602,2390,-2348,2236,-2120,-2069,2048,-1773,-1595,1215,-1110,-892,-810,759,-713,-700,691,596,549,537,520,-487,-399,-381,351,-340,330,327,-323,299,294,0],l=[-20905355,-3699111,-2955968,-569925,48888,-3149,246158,-152138,-170733,-204586,-129620,108743,104755,10321,0,79661,-34782,-23210,-21636,24208,30824,-8379,-16675,-12831,-10445,-11650,14403,-7003,0,10056,6322,-9884,5751,0,-4950,4130,0,-3958,0,3258,2616,-1897,-2117,2354,0,0,-1423,-1117,-1571,-1739,0,-4421,0,0,0,0,1165,0,0,8752],M=[0,0,0,2,2,2,2,0,2,0,2,2,2,2,2,2,2,0,4,0,0,0,1,0,0,0,1,0,4,4,0,4,2,2,2,2,0,2,2,2,2,4,2,2,0,2,1,1,0,2,1,2,0,4,4,1,4,1,4,2],g=[0,0,0,0,0,0,0,0,0,0,-1,0,0,1,-1,-1,-1,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,1,1,0,-1,-2,0,1,1,1,1,1,0,-1,1,0,-1,0,0,0,-1,-2],v=[0,1,1,0,-1,-1,0,2,1,2,0,-2,1,0,-1,0,-1,-1,-1,0,0,-1,0,1,1,0,0,3,0,-1,1,-2,0,2,1,-2,3,2,-3,-1,0,0,1,0,1,1,0,0,-2,-1,1,-2,2,-2,-1,1,1,-1,0,0],d=[1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,1,3,1,1,1,-1,-1,-1,1,-1,1,-3,1,-3,-1,-1,1,-1,1,-1,1,1,1,1,-1,3,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1],A=[5128122,280602,277693,173237,55413,46271,32573,17198,9266,8822,8216,4324,4200,-3359,2463,2211,2065,-1870,1828,-1794,-1749,-1565,-1491,-1475,-1410,-1344,-1335,1107,1021,833,777,671,607,596,491,-451,439,422,421,-366,-351,331,315,302,-283,-229,223,223,-220,-220,-185,181,-177,176,166,-164,132,-119,115,107];t.exports=r},2397:(t,n,r)=>{var e=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),i=r(2507),a=r(6196),o=.833,u=.3,s=6,f=12,h=18,c=-6,l=function(){function t(n,r,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.lat=r,this.longitude=e,this.sun=new i(n,r,e),this.moon=new a(n,r,e)}return e(t,{solarNoon:{get:function(){return this.sun.solarNoon}},sunrise:{get:function(){return this.sun.timeAtAngle(o,!0)}},sunset:{get:function(){return this.sun.timeAtAngle(o)}},sunriseEnd:{get:function(){return this.sun.timeAtAngle(u,!0)}},sunsetStart:{get:function(){return this.sun.timeAtAngle(u,!1)}},civilDawn:{get:function(){return this.sun.timeAtAngle(s,!0)}},dawn:{get:function(){return this.civilDawn}},civilDusk:{get:function(){return this.sun.timeAtAngle(s,!1)}},dusk:{get:function(){return this.civilDusk}},nauticalDawn:{get:function(){return this.sun.timeAtAngle(f,!0)}},nauticalDusk:{get:function(){return this.sun.timeAtAngle(f,!1)}},nightStart:{get:function(){return this.astronomicalDusk}},astronomicalDusk:{get:function(){return this.sun.timeAtAngle(h,!1)}},astronomicalDawn:{get:function(){return this.sun.timeAtAngle(h,!0)}},nightEnd:{get:function(){return this.astronomicalDawn}},goldenHourStart:{get:function(){return this.sun.timeAtAngle(c,!1)}},goldenHourEnd:{get:function(){return this.sun.timeAtAngle(c,!0)}},lunarDistance:{get:function(){return this.moon.distance}},lunarIlluminosity:{get:function(){return this.moon.illuminosity}}}),t}();t.exports=l},2507:t=>{var n=function(){function t(t,n){for(var r in n){var e=n[r];e.configurable=!0,e.value&&(e.writable=!0)}Object.defineProperties(t,n)}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}(),r=function(){function t(n,r,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.date=n,this.latitude=r,this.longitude=e,this.julianDate=function(t){var n=t.getFullYear(),r=t.getMonth()+1,e=t.getDate(),i=Math.floor(n/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(n+4716))+Math.floor(30.6001*(r+1))+e+a-1524.5}(n)}return n(t,{solarNoon:{get:function(){return function(t,n,r){var a=l(i(t-n/360)),o=i(t+(720-4*n-a)/1440);a=l(o);var u=720-4*n-a;for(;u<0;)u+=1440;for(;u>=1440;)u-=1440;return e(r,u)}(this.julianDate,this.longitude,this.date)}},timeAtAngle:{value:function(t,n){return function(t,n,r,i,a,o){var u=v(t,n,r,a,o),s=v(t,n,r+u/1440,a,o);if(M(s))return e(i,s);var f=function(t){var n,r=Math.floor(t+.5),e=t+.5-r;if(r<2299161)n=r;else{var i=Math.floor((r-1867216.25)/36524.25);n=r+1+i-Math.floor(i/4)}var a=n+1524,o=Math.floor((a-122.1)/365.25),u=Math.floor(365.25*o),s=Math.floor((a-u)/30.6001),f=a-u-Math.floor(30.6001*s)+e,h=s<14?s-1:s-13,c=(M=h>2?o-4716:o-4715,M%4===0&&M%100!==0||M%400===0?1:2),l=Math.floor(275*h/9)-c*Math.floor((h+9)/12)+f-30;var M;return l}(r);return g(d(a>66.4&&f>79&&f<267||a<-66.4&&(f<83||f>263)?!t:t,t,n,r,a,o))}(n,t,this.julianDate,this.date,this.latitude,this.longitude)}}}),t}(),e=function(t,n){var r=60*(n-Math.floor(n));return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,n,r))};function i(t){return(t-2451545)/36525}function a(t){return 180*t/Math.PI}function o(t){return Math.PI*t/180}function u(t){for(var n=280.46646+t*(36000.76983+3032e-7*t);n>360;)n-=360;for(;n<0;)n+=360;return n}function s(t){return 357.52911+t*(35999.05029-1537e-7*t)}function f(t){var n=u(t),r=function(t){var n=o(s(t));return Math.sin(n)*(1.914602-t*(.004817+14e-6*t))+Math.sin(n+n)*(.019993-101e-6*t)+289e-6*Math.sin(n+n+n)}(t);return n+r}function h(t){var n=function(t){return 23+(26+(21.448-t*(46.815+t*(59e-5-.001813*t)))/60)/60}(t),r=125.04-1934.136*t;return n+.00256*Math.cos(o(r))}function c(t){var n=h(t),r=function(t){var n=125.04-1934.136*t;return f(t)-.00569-.00478*Math.sin(o(n))}(t),e=Math.sin(o(n))*Math.sin(o(r));return a(Math.asin(e))}function l(t){var n=h(t),r=u(t),e=function(t){return.016708634-t*(42037e-9+1.267e-7*t)}(t),i=s(t),f=Math.tan(o(n)/2);f*=f;var c=Math.sin(2*o(r)),l=Math.sin(o(i));return 4*a(f*c-2*e*l+4*e*f*l*Math.cos(2*o(r))-.5*f*f*Math.sin(4*o(r))-1.25*e*e*Math.sin(2*o(i)))}function M(t){for(var n=!1,r=""+t,e=0;e"9")return!1}else n=!0}return!0}function g(t){if(t<9e5||t>2817e3)return"error";var n,r=Math.floor(t+.5),e=t+.5-r;if(r<2299161)n=r;else{var i=Math.floor((r-1867216.25)/36524.25);n=r+1+i-Math.floor(i/4)}var a=n+1524,o=Math.floor((a-122.1)/365.25),u=Math.floor(365.25*o),s=Math.floor((a-u)/30.6001),f=a-u-Math.floor(30.6001*s)+e,h=s<14?s-1:s-13,c=h>2?o-4716:o-4715;return new Date(Date.UTC(c,h-1,f,0,0,0))}function v(t,n,r,e,u){var s=i(r),f=l(s),h=function(t,n,r){var e=o(n),i=o(r),a=Math.cos(o(90+t))/(Math.cos(e)*Math.cos(i))-Math.tan(e)*Math.tan(i);return Math.acos(a)}(n,e,c(s));return t||(h=-h),720-4*(u+a(h))-f}function d(t,n,r,e,i,a){for(var o=e,u=t?1:-1,s=v(n,r,o,i,a);!M(s);)s=v(n,r,o+=u,i,a);return o}t.exports=r}}]); -//# sourceMappingURL=97.4efa0057.chunk.js.map \ No newline at end of file diff --git a/static/js/main.02e12d8f.js b/static/js/main.02e12d8f.js new file mode 100644 index 0000000..f94a233 --- /dev/null +++ b/static/js/main.02e12d8f.js @@ -0,0 +1,3 @@ +/*! For license information please see main.02e12d8f.js.LICENSE.txt */ +(()=>{var e={9264:(e,t,n)=>{"use strict";n.a(e,(async(e,r)=>{try{n.d(t,{A:()=>g});var a=n(5043),l=n(6451),i=n(2239),o=n(6042),u=n(7480),s=n(775),c=n(6545),f=n(4799),d=n(5564),p=(n(7111),n(579)),h=e([d]);function v(){const{mode:e,title:t,toggleMode:n}=(0,c.b)(),{stationId:r,setStationId:h,stationData:m}=(0,d.q)(),{lowtideEvents:v,setLowtideEvents:g,selectedDates:y,allDatesAreSelected:b,selectAllDates:w,deselectAllDates:k,selectDate:S,unselectDate:x}=(0,f.f)(),[E,_]=(0,a.useState)(0),[T,C]=(0,a.useState)(0),[O,P]=(0,a.useState)(.99),N=(0,a.useCallback)((()=>{if(m&&y.length){const{metadata:e,timezone:t}=m;(0,u.h)(y,e,t,r)}}),[y,m,r]);return(0,a.useEffect)((()=>{m&&(g(e===l.W.dtlt?(0,s.N)(E,T,m):(0,s.A)(E,O,m)),k())}),[k,O,e,g,m,E,T]),(0,p.jsxs)("div",{children:[(0,p.jsxs)("header",{className:"header",children:[(0,p.jsx)("h1",{children:t}),(0,p.jsx)("button",{onClick:n,children:"Toggle Mode"})]}),(0,p.jsxs)("main",{children:[(0,p.jsx)(i.A,{mode:e,allDatesAreSelected:b,downloadCalendar:N,deselectAllDates:k,selectAllDates:w,setStationId:h,setTideTarget:_,setTideThreshold:C,setLunarThreshold:P,stationId:r,tideTarget:E,lunarThreshold:O,tideThreshold:T}),(0,p.jsx)(o.A,{lowtideEvents:v,mode:e,selectDate:S,selectedDates:y,unselectDate:x,stationData:m,tideTarget:E})]}),(0,p.jsxs)("footer",{className:"footer",children:["made by"," ",(0,p.jsx)("a",{href:"https://colewillsea.net",target:"_blank",rel:"noreferrer",children:"Cole Willsea"})]})]})}d=(h.then?(await h)():h)[0];const g=v;r()}catch(m){r(m)}}))},2239:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5043),a=n(6451),l=n(579);const i=function(e){let{mode:t,stationId:n,allDatesAreSelected:i,downloadCalendar:o,deselectAllDates:u,selectAllDates:s,setStationId:c,tideTarget:f,setTideTarget:d,tideThreshold:p,lunarThreshold:h,setTideThreshold:m,setLunarThreshold:v}=e;const g=(0,r.useCallback)((()=>{i?u():s()}),[i,u,s]);return(0,l.jsxs)("div",{className:"controls-container",children:[(0,l.jsxs)("div",{className:"controls-box",children:[(0,l.jsxs)("div",{className:"control-wrapper",children:[(0,l.jsx)("input",{className:"control-input",name:"station-id",type:"text",value:n,onChange:e=>c(e.target.value)}),(0,l.jsxs)("label",{htmlFor:"station-id",children:["NOAA Station ID (",(0,l.jsx)("a",{href:"https://tidesandcurrents.noaa.gov/map/index.html?type=TidePredictions®ion=#",target:"_blank",rel:"noreferrer",children:"look up here"}),")"]})]}),(0,l.jsxs)("div",{className:"control-wrapper",children:[(0,l.jsx)("input",{className:"control-input",type:"range",list:"tide-markers",min:"-3",max:"1",name:"tide-target",step:"0.1",value:f,onChange:e=>d(Number(e.target.value))}),(0,l.jsxs)("label",{htmlFor:"tide-target",children:[f," feet or lower"]}),(0,l.jsxs)("datalist",{id:"tide-markers",children:[(0,l.jsx)("option",{value:"0"}),(0,l.jsx)("option",{value:"-1"}),(0,l.jsx)("option",{value:"-2"})]})]}),t===a.W.dtlt?(0,l.jsxs)("div",{className:"control-wrapper",children:[(0,l.jsx)("input",{type:"range",min:"0",max:"60",step:"5",name:"tide-threshold",className:"control-input",value:p,onChange:e=>m(Number(e.target.value))}),(0,l.jsxs)("label",{htmlFor:"tide-threshold",children:["Within ",p," minutes of sunrise/sunset"]})]}):(0,l.jsxs)("div",{className:"control-wrapper",children:[(0,l.jsx)("input",{type:"range",min:"0",max:"1",step:"0.1",name:"lundar-threshold",className:"control-input",value:h,onChange:e=>v(Number(e.target.value))}),(0,l.jsxs)("label",{htmlFor:"lunar-threshold",children:["Moon at least ",100*h,"% full"]})]})]}),(0,l.jsxs)("div",{className:"download-wrapper",children:[(0,l.jsx)("button",{onClick:o,children:"Download Calendar"})," ",(0,l.jsxs)("label",{children:["Select All"," ",(0,l.jsx)("input",{type:"checkbox",checked:i,onChange:g})]})]})]})}},6042:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6451),a=n(3791),l=n(5043),i=n(579);const o=function(e){let{lowtideData:t,mode:n,tideTarget:o,timezone:u,unselectDate:s,selectDate:c,selectedDates:f}=e;const{solarData:d,tides:p}=t,{lunarIlluminosity:h,sunrise:m,sunset:v}=d,g=(0,a.gz)(m,u),y=(0,l.useMemo)((()=>Boolean(f.find((e=>e.solarData.sunrise===m)))),[f,m]),b=(0,l.useCallback)((()=>{y?s(t):c(t)}),[y,t,c,s]),w=(0,l.useMemo)((()=>{const e={};return e[m.getTime()]=(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"sunrise",children:"sunrise"}),(0,i.jsx)("td",{children:(0,a.R6)(m,u)})]},m.getTime()),e[v.getTime()]=(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"sunset",children:"sunset"}),(0,i.jsx)("td",{children:(0,a.R6)(v,u)})]},v.getTime()),p.forEach((t=>{const n=t.tidee[t]))}),[m,v,o,p,u]);return(0,i.jsxs)("div",{className:"result ".concat(y?"selected":""),onClick:b,children:[(0,i.jsxs)("div",{className:"date",children:[g," ",(0,i.jsx)("input",{type:"checkbox",checked:y,onChange:b})]}),(0,i.jsx)("table",{className:"result-table",children:(0,i.jsxs)("tbody",{children:[n===r.W.fmlt?(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"Moon"}),(0,i.jsxs)("td",{children:[Math.trunc(100*h),"% full"]})]}):null,w]})})]})};const u=function(e){let{lowtideEvents:t,mode:n,stationData:r,tideTarget:l,unselectDate:u,selectDate:s,selectedDates:c}=e;if(!r)return(0,i.jsx)("div",{className:"loading",children:"Loading . . ."});const{metadata:f,timezone:d}=r,{title:p,lat:h,lng:m}=f;return(0,i.jsxs)("div",{className:"results",children:[(0,i.jsxs)("div",{className:"station-title",children:[(0,i.jsxs)("div",{children:[p," - ",h,",",m]}),(0,i.jsxs)("div",{children:[t.length," results"]})]}),(0,i.jsx)("div",{className:"results-container",children:t.map((e=>(0,i.jsx)(o,{lowtideData:e,mode:n,timezone:d,tideTarget:l,selectDate:s,unselectDate:u,selectedDates:c},(0,a.gz)(e.solarData.sunrise,d))))})]})}},6545:(e,t,n)=>{"use strict";n.d(t,{b:()=>o,n:()=>l});var r=n(5043),a=n(2072);const l={dtlt:"dtlt",fmlt:"fmlt"},i={dtlt:"Day Time Low Tide Finder",fmlt:"Full Moon Low Tide Finder"};function o(){const[e,t]=(0,r.useState)(l[(0,a.qn)(a.s4)]||l.dtlt),n=(0,r.useCallback)((()=>{const n=e===l.dtlt?l.fmlt:l.dtlt;t(n),(0,a.bJ)(a.s4,n)}),[e]),o=i[e];return{mode:e,title:o,toggleMode:n}}},4799:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});var r=n(5043);function a(){const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),l=(0,r.useMemo)((()=>e.length===n.length),[e.length,n.length]),i=(0,r.useCallback)((()=>{a(e)}),[e]),o=(0,r.useCallback)((()=>{a([])}),[]),u=(0,r.useCallback)((e=>{a([...n,e])}),[n]),s=(0,r.useCallback)((e=>{const t=n.findIndex((t=>t.solarData.sunrise===e.solarData.sunrise));a([...n.slice(0,t),...n.slice(t+1,n.length)])}),[n]);return{setLowtideEvents:t,lowtideEvents:e,selectedDates:n,allDatesAreSelected:l,selectAllDates:i,deselectAllDates:o,selectDate:u,unselectDate:s}}},5564:(e,t,n)=>{"use strict";n.a(e,(async(e,r)=>{try{n.d(t,{q:()=>s});var a=n(5043),l=n(9688),i=n(2072),o=e([l]);function s(){const[e,t]=(0,a.useState)((0,i.qn)(i.ft)),[n,r]=(0,a.useState)();return(0,a.useEffect)((()=>{7===e.length&&((0,i.bJ)(i.ft,e),(0,l.v)(e).then((e=>{r(e)})))}),[e]),{stationId:e,setStationId:t,stationData:n}}l=(o.then?(await o)():o)[0],r()}catch(u){r(u)}}))},2812:(e,t,n)=>{"use strict";n.a(e,(async(e,t)=>{try{var r=n(5043),a=n(4391),l=(n(9555),n(9264)),i=n(579),o=e([l]);l=(o.then?(await o)():o)[0];a.createRoot(document.getElementById("root")).render((0,i.jsx)(r.StrictMode,{children:(0,i.jsx)(l.A,{})})),t()}catch(u){t(u)}}))},6451:(e,t,n)=>{"use strict";n.d(t,{W:()=>r.n});var r=n(6545)},9688:(e,t,n)=>{"use strict";n.a(e,(async(e,r)=>{try{n.d(t,{v:()=>s});var a=n(7542),l=n(3791),i=e([a]);function u(e,t,n,r){const l=[];for(var i=new Date(n.toString());i<=r;i.setDate(i.getDate()+1))l.push((0,a.n)(i,e,t));return l}async function s(e){var t;const n=new Date,r=new Date;r.setFullYear((new Date).getFullYear()+1);const a=(0,l.JJ)(n),i=(0,l.JJ)(r);let o,s,c;try{const t=await fetch("https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations/".concat(e,".json"),{cache:"force-cache"});if(!t.ok)throw new Error;o=await t.json()}catch(m){return}try{const t=await fetch("https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?begin_date=".concat(a,"&end_date=").concat(i,"&station=").concat(e,"&product=predictions&datum=MLLW&time_zone=gmt&interval=hilo&units=english&application=daytime_lowtide_finder&format=json"),{cache:"force-cache"});if(!t.ok)throw new Error;s=await t.json()}catch(m){return}const f=(0,l.jR)(o),d=(0,l.AD)(s);if(!f||!d)return;const{lat:p,lng:h}=f;try{const e=await fetch("https://www.timeapi.io/api/TimeZone/coordinate?latitude=".concat(p,"&longitude=").concat(h),{cache:"force-cache",mode:"no-cors"});if(!e.ok)throw new Error;c=await e.json()}catch(m){}return{metadata:f,tideData:d,timezone:(null===(t=c)||void 0===t?void 0:t.timeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,solarData:u(p,h,n,r)}}a=(i.then?(await i)():i)[0],r()}catch(o){r(o)}}))},7480:(e,t,n)=>{"use strict";n.d(t,{h:()=>l});var r=n(3298),a=n(3791);async function l(e,t,n,l){const i="LowTideCalendar.ics",o=e.map((e=>function(e,t,n,r){const{title:l,lat:i,lng:o}=t,{lowtide:u,solarData:s,tides:c}=e,{sunrise:f,sunset:d}=s,p=["- sunrise ".concat((0,a.R6)(f,n)),...c.map((e=>"- ".concat(e.tide,"ft, ").concat((0,a.R6)(e.time,n)))),"- sunset ".concat((0,a.R6)(d,n))].join("\n");return{start:u.time.getTime(),duration:{hours:1},title:"".concat(u.tide,"ft ").concat(l),description:p,location:l,url:"https://colewillsea.net/tide-finder/?station_id=".concat(r),geo:{lat:i,lon:o},categories:["low tide"]}}(e,t,n,l))),u=await new Promise(((e,t)=>{(0,r.q2)(o,((n,r)=>{n&&t(n),e(new File([r],i,{type:"text/calendar"}))}))})).catch((e=>{console.error(e)}));if(!u)return;const s=URL.createObjectURL(u),c=document.createElement("a");c.href=s,c.download=i,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(s)}},775:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,N:()=>a});var r=n(3791);function a(e,t,n){const{tideData:a,solarData:l,timezone:i}=n,o=a.reduce(((e,t)=>{const n=(0,r.gz)(t.time,i);return e[n]=e[n]||[],e[n].push(t),e}),{});return l.reduce(((n,a)=>{const l=o[(0,r.gz)(a.sunrise,i)],u=new Date(a.sunrise.getTime()-6e4*t),s=new Date(a.sunset.getTime()+6e4*t),c=null===l||void 0===l?void 0:l.find((t=>{const{time:n,tide:r}=t;return r=u&&n<=s)}));return c&&n.push({solarData:a,tides:l,lowtide:c}),n}),[])}function l(e,t,n){const{tideData:a,solarData:l,timezone:i}=n,o=a.reduce(((e,t)=>{const n=(0,r.gz)(t.time,i);return e[n]=e[n]||[],e[n].push(t),e}),{});return l.reduce(((n,a)=>{const l=o[(0,r.gz)(a.sunrise,i)],u=new Date(a.sunrise.getTime()-6e4*t),s=new Date(a.sunset.getTime()+6e4*t);if(!(a.lunarIlluminosity>=t))return n;const c=null===l||void 0===l?void 0:l.find((t=>{const{time:n,tide:r}=t;return rs)}));return c&&n.push({solarData:a,tides:l,lowtide:c}),n}),[])}},3791:(e,t,n)=>{"use strict";function r(e){const t=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return"".concat(r).concat(n).concat(t)}function a(e,t){return e.toLocaleDateString("en-US",{timeZone:t})}function l(e,t){return e.toLocaleTimeString("en-US",{timeZone:t,hour:"2-digit",minute:"2-digit"})}function i(e){var t;const n=null===e||void 0===e||null===(t=e.stations)||void 0===t?void 0:t.at(0);if(n)return{title:"".concat(null===n||void 0===n?void 0:n.name,", ").concat(null===n||void 0===n?void 0:n.state),lat:Number(null===n||void 0===n?void 0:n.lat),lng:Number(null===n||void 0===n?void 0:n.lng)}}function o(e){var t;return null===e||void 0===e||null===(t=e.predictions)||void 0===t?void 0:t.map((e=>{return{time:new Date((t=e.t,t.split(" ").join("T")+"Z")),tide:Number(e.v)};var t}))}n.d(t,{AD:()=>o,JJ:()=>r,R6:()=>l,gz:()=>a,jR:()=>i})},2072:(e,t,n)=>{"use strict";n.d(t,{bJ:()=>l,ft:()=>r,qn:()=>i,s4:()=>a});const r="station_id",a="mode";function l(e,t){const n=new URL(window.location.href);n.searchParams.set(e,t),window.history.pushState(null,"",n.toString())}function i(e){return new URLSearchParams(document.location.search).get(e)||""}},7542:(e,t,n)=>{"use strict";n.a(e,(async(e,r)=>{try{n.d(t,{n:()=>i});const{default:l}=await n.e(97).then(n.t.bind(n,97,23));function i(e,t,n){const r=new l(e,t,n);return{lunarIlluminosity:r.lunarIlluminosity,sunrise:r.sunrise,sunset:r.sunset}}r()}catch(a){r(a)}}),1)},4214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.headerDefaults=t.eventDefaults=void 0;var r=n(3712);t.headerDefaults=function(){return{productId:"adamgibbons/ics",method:"PUBLISH"}};t.eventDefaults=function(){return{title:"Untitled event",uid:(0,r.nanoid)(),timestamp:Date.now()}}},3298:(e,t,n)=>{"use strict";t.q2=s;var r=n(7389);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildEvent=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(Object.assign({},(0,r.eventDefaults)(),e))},t.buildHeader=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(Object.assign({},(0,r.headerDefaults)(),e))};var r=n(4214);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return Object.entries(e).reduce((function(e,t){return"undefined"!==typeof t[1]?Object.assign(e,l({},t[0],t[1])):e}),{})}},2950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatEvent=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.title,n=e.uid,r=e.sequence,i=e.timestamp,o=e.start,u=e.startType,s=e.startInputType,c=e.startOutputType,f=e.duration,d=e.end,p=e.endInputType,h=e.endOutputType,m=e.description,v=e.url,g=e.geo,y=e.location,b=e.status,w=e.categories,k=e.organizer,S=e.attendees,x=e.alarms,E=e.recurrenceRule,_=e.exclusionDates,T=e.busyStatus,C=e.transp,O=e.classification,P=e.created,N=e.lastModified,D=e.htmlContent,j="";j+="BEGIN:VEVENT\r\n",j+=(0,a.foldLine)("UID:".concat((0,l.default)(n)))+"\r\n",j+=t?(0,a.foldLine)("SUMMARY:".concat((0,l.default)((0,a.setSummary)(t))))+"\r\n":"",j+=(0,a.foldLine)("DTSTAMP:".concat((0,l.default)((0,a.formatDate)(i))))+"\r\n",j+=(0,a.foldLine)("DTSTART".concat(o&&3==o.length?";VALUE=DATE":"",":").concat((0,l.default)((0,a.formatDate)(o,c||u,s))))+"\r\n",(!d||3!==d.length||o.length!==d.length||o.some((function(e,t){return e!==d[t]})))&&d&&(j+=(0,a.foldLine)("DTEND".concat(3===d.length?";VALUE=DATE":"",":").concat((0,l.default)((0,a.formatDate)(d,h||c||u,p||s))))+"\r\n");j+="undefined"!==typeof r?"SEQUENCE:".concat(r,"\r\n"):"",j+=m?(0,a.foldLine)("DESCRIPTION:".concat((0,l.default)((0,a.setDescription)(m))))+"\r\n":"",j+=v?(0,a.foldLine)("URL:".concat((0,l.default)(v)))+"\r\n":"",j+=g?(0,a.foldLine)("GEO:".concat((0,a.setGeolocation)(g)))+"\r\n":"",j+=y?(0,a.foldLine)("LOCATION:".concat((0,l.default)((0,a.setLocation)(y))))+"\r\n":"",j+=b?(0,a.foldLine)("STATUS:".concat((0,l.default)(b)))+"\r\n":"",j+=w?(0,a.foldLine)("CATEGORIES:".concat((0,l.default)(w.join(","))))+"\r\n":"",j+=k?(0,a.foldLine)("ORGANIZER;".concat((0,a.setOrganizer)(k)))+"\r\n":"",j+=T?(0,a.foldLine)("X-MICROSOFT-CDO-BUSYSTATUS:".concat((0,l.default)(T)))+"\r\n":"",j+=C?(0,a.foldLine)("TRANSP:".concat((0,l.default)(C)))+"\r\n":"",j+=O?(0,a.foldLine)("CLASS:".concat((0,l.default)(O)))+"\r\n":"",j+=P?"CREATED:"+(0,l.default)((0,a.formatDate)(P))+"\r\n":"",j+=N?"LAST-MODIFIED:"+(0,l.default)((0,a.formatDate)(N))+"\r\n":"",j+=D?(0,a.foldLine)("X-ALT-DESC;FMTTYPE=text/html:".concat((0,l.default)(D)))+"\r\n":"",S&&S.forEach((function(e){j+=(0,a.foldLine)("ATTENDEE;".concat((0,l.default)((0,a.setContact)(e))))+"\r\n"}));j+=E?(0,a.foldLine)("RRULE:".concat((0,l.default)(E)))+"\r\n":"",j+=_?(0,a.foldLine)("EXDATE:".concat((0,l.default)(_.map((function(e){return(0,a.formatDate)(e)})).join(","))))+"\r\n":"",j+=f?(0,a.foldLine)("DURATION:".concat((0,a.formatDuration)(f)))+"\r\n":"",x&&x.forEach((function(e){j+=(0,a.setAlarm)(e)}));return j+="END:VEVENT\r\n"},t.formatFooter=function(){return"END:VCALENDAR\r\n"},t.formatHeader=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.productId,n=e.method,r=e.calName,i="";return i+="BEGIN:VCALENDAR\r\n",i+="VERSION:2.0\r\n",i+="CALSCALE:GREGORIAN\r\n",i+=(0,a.foldLine)("PRODID:".concat((0,l.default)(t)))+"\r\n",i+=(0,a.foldLine)("METHOD:".concat((0,l.default)(n)))+"\r\n",i+=r?(0,a.foldLine)("X-WR-CALNAME:".concat((0,l.default)(r)))+"\r\n":"",i+="X-PUBLISHED-TTL:PT1H\r\n"};var r,a=n(4412),l=(r=n(4185))&&r.__esModule?r:{default:r}},7389:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"buildEvent",{enumerable:!0,get:function(){return r.buildEvent}}),Object.defineProperty(t,"buildHeader",{enumerable:!0,get:function(){return r.buildHeader}}),Object.defineProperty(t,"formatEvent",{enumerable:!0,get:function(){return a.formatEvent}}),Object.defineProperty(t,"formatFooter",{enumerable:!0,get:function(){return a.formatFooter}}),Object.defineProperty(t,"formatHeader",{enumerable:!0,get:function(){return a.formatHeader}}),Object.defineProperty(t,"validateHeader",{enumerable:!0,get:function(){return l.validateHeader}}),Object.defineProperty(t,"validateHeaderAndEvent",{enumerable:!0,get:function(){return l.validateHeaderAndEvent}});var r=n(6281),a=n(2950),l=n(8239)},8239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7556);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},7556:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateHeader=function(e){try{return{error:null,value:v.validateSync(e,{abortEarly:!1,strict:!0})}}catch(t){return{error:Object.assign({},t),value:void 0}}},t.validateHeaderAndEvent=function(e){try{return{error:null,value:y.validateSync(e,{abortEarly:!1,strict:!0})}}catch(t){return{error:Object.assign({},t),value:void 0}}};var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!==typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(899));function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/\r?\n/gm,"\\n")}},3488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'"'.concat(e.replaceAll('"','\\"'),'"')}},9968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[],n=75;for(;e.length>n;)t.push(e.slice(0,n)),e=e.slice(n),n=74;return t.push(e),t.join("\r\n\t")}},502:(e,t)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l,i,o=[],u=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(o.push(r.value),o.length!==t);u=!0);}catch(c){s=!0,a=c}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utc",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local";if("string"===typeof e)return e;if(Array.isArray(e)&&3===e.length){var l=n(e,3),i=l[0],o=l[1],u=l[2];return"".concat(i).concat(a(o)).concat(a(u))}var s=new Date;if(Array.isArray(e)&&e.length>0&&e[0]){var c=n(e,6),f=c[0],d=c[1],p=c[2],h=c[3],m=void 0===h?0:h,v=c[4],g=void 0===v?0:v,y=c[5],b=void 0===y?0:y;s="local"===r?new Date(f,d-1,p,m,g,b):new Date(Date.UTC(f,d-1,p,m,g,b))}else Array.isArray(e)||(s=new Date(e));if("local"===t)return[s.getFullYear(),a(s.getMonth()+1),a(s.getDate()),"T",a(s.getHours()),a(s.getMinutes()),a(s.getSeconds())].join("");return[s.getUTCFullYear(),a(s.getUTCMonth()+1),a(s.getUTCDate()),"T",a(s.getUTCHours()),a(s.getUTCMinutes()),a(s.getUTCSeconds()),"Z"].join("")};var a=function(e){return e<10?"0".concat(e):"".concat(e)}},8578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.weeks,n=e.days,r=e.hours,a=e.minutes,l=e.seconds,i="P";return i+=t?"".concat(t,"W"):"",i+=n?"".concat(n,"D"):"",i+="T",i+=r?"".concat(r,"H"):"",i+=a?"".concat(a,"M"):"",i+=l?"".concat(l,"S"):""}},3757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/\\/gm,"\\\\").replace(/\r?\n/gm,"\\n").replace(/;/gm,"\\;").replace(/,/gm,"\\,")}},4412:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeParamValue",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"foldLine",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"formatDate",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"formatDuration",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"setAlarm",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"setContact",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"setDescription",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"setGeolocation",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"setLocation",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"setOrganizer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"setSummary",{enumerable:!0,get:function(){return s.default}});var r=h(n(502)),a=h(n(6591)),l=h(n(7393)),i=h(n(8496)),o=h(n(5840)),u=h(n(8383)),s=h(n(5901)),c=h(n(8578)),f=h(n(9968)),d=h(n(3550)),p=h(n(3488));function h(e){return e&&e.__esModule?e:{default:e}}},5840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=e.repeat,i=e.description,u=e.duration,s=e.attach,c=e.attachType,f=e.trigger,d=e.summary,p="BEGIN:VALARM\r\n";p+=(0,a.default)("ACTION:".concat((0,l.default)(function(e){return e.toUpperCase()}(t))))+"\r\n",p+=n?(0,a.default)("REPEAT:".concat(n))+"\r\n":"",p+=i?(0,a.default)("DESCRIPTION:".concat((0,l.default)(i)))+"\r\n":"",p+=u?(0,a.default)("DURATION:".concat(o(u)))+"\r\n":"";var h=c||"FMTTYPE=audio/basic";return p+=s?(0,a.default)((0,l.default)("ATTACH;".concat(h,":").concat(s)))+"\r\n":"",p+=f?(0,l.default)(function(e){var t="";if(Array.isArray(e)||"number"===typeof e||"string"===typeof e)t="TRIGGER;VALUE=DATE-TIME:".concat((0,l.default)((0,r.default)(e)),"\r\n");else{var n=e.before?"-":"";t="TRIGGER:".concat((0,l.default)(n+o(e)),"\r\n")}return t}(f)):"",p+=d?(0,a.default)("SUMMARY:".concat((0,l.default)(d)))+"\r\n":"",p+="END:VALARM\r\n"};var r=i(n(502)),a=i(n(9968)),l=i(n(4185));function i(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.weeks,n=e.days,r=e.hours,a=e.minutes,l=e.seconds,i="P";return i+=t?"".concat(t,"W"):"",i+=n?"".concat(n,"D"):"",i+="T",i+=r?"".concat(r,"H"):"",i+=a?"".concat(a,"M"):"",i+=l?"".concat(l,"S"):""}},7393:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.name,n=e.email,r=e.rsvp,l=e.dir,i=e.partstat,o=e.role,u=e.cutype,s=e.xNumGuests,c=[];void 0!==r&&c.push(r?"RSVP=TRUE":"RSVP=FALSE");u&&c.push("CUTYPE=".concat((0,a.default)(u)));void 0!==s&&c.push("X-NUM-GUESTS=".concat(s));o&&c.push("ROLE=".concat((0,a.default)(o)));i&&c.push("PARTSTAT=".concat((0,a.default)(i)));l&&c.push("DIR=".concat((0,a.default)(l)));return c.push("CN=".concat((0,a.default)(t||"Unnamed attendee"))),c.join(";").concat(n?":mailto:".concat(n):"")};var r,a=(r=n(3488))&&r.__esModule?r:{default:r}},8383:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e)};var r,a=(r=n(3757))&&r.__esModule?r:{default:r}},6591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.lat,n=e.lon;return"".concat(t,";").concat(n)}},3550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e)};var r,a=(r=n(3757))&&r.__esModule?r:{default:r}},8496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.name,n=e.email,r=e.dir,l=e.sentBy,i="";return i+=r?"DIR=".concat((0,a.default)(r),";"):"",i+=l?"SENT-BY=".concat((0,a.default)("MAILTO:".concat(l)),";"):"",i+="CN=",i+=(0,a.default)(t||"Organizer"),i+=n?":MAILTO:".concat(n):""};var r,a=(r=n(3488))&&r.__esModule?r:{default:r}},5901:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e)};var r,a=(r=n(3757))&&r.__esModule?r:{default:r}},4575:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,a=/^\d/,l=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,o=new t(512),u=new t(512),s=new t(512);function c(e){return o.get(e)||o.set(e,f(e).map((function(e){return e.replace(i,"$2")})))}function f(e){return e.match(n)||[""]}function d(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function p(e){return!d(e)&&(function(e){return e.match(a)&&!e.match(r)}(e)||function(e){return l.test(e)}(e))}e.exports={Cache:t,split:f,normalizePath:c,setter:function(e){var t=c(e);return u.get(e)||u.set(e,(function(e,n){for(var r=0,a=t.length,l=e;r{"use strict";var r=n(5043),a=n(8853);function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n