hebcal
Version:
An easy to use, richly-featured, perpetual Jewish Calendar API
9 lines (7 loc) • 53.2 kB
JavaScript
/*
Hebcal - A Jewish Calendar Generator
https://github.com/hebcal/hebcal-js
Licensed GPLv3
*/
!function(){function e(t,n,r){function a(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){return a(t[o][1][e]||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}return e}()({1:[function(e,t,n){function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=A(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}function a(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function i(e,t,n){if(t)e.call(n);else for(var r=e.length,a=w(e,r),i=0;i<r;++i)a[i].call(n)}function o(e,t,n,r){if(t)e.call(n,r);else for(var a=e.length,i=w(e,a),o=0;o<a;++o)i[o].call(n,r)}function s(e,t,n,r,a){if(t)e.call(n,r,a);else for(var i=e.length,o=w(e,i),s=0;s<i;++s)o[s].call(n,r,a)}function u(e,t,n,r,a,i){if(t)e.call(n,r,a,i);else for(var o=e.length,s=w(e,o),u=0;u<o;++u)s[u].call(n,r,a,i)}function h(e,t,n,r){if(t)e.apply(n,r);else for(var a=e.length,i=w(e,a),o=0;o<a;++o)i[o].apply(n,r)}function c(e,t,n,r){var i,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if(o=e._events,o?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=A(null),e._eventsCount=0),s){if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(i=a(e))&&i>0&&s.length>i){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=o[t]=n,++e._eventsCount;return e}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function l(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=S.call(f,r);return a.listener=n,r.wrapFn=a,a}function y(e,t,n){var r=e._events;if(!r)return[];var a=r[t];return a?"function"==typeof a?n?[a.listener||a]:[a]:n?g(a):w(a,a.length):[]}function m(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function d(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}function w(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function p(e){var t=function(){};return t.prototype=e,new t}function v(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n}function b(e){var t=this;return function(){return t.apply(e,arguments)}}var A=Object.create||p,L=Object.keys||v,S=Function.prototype.bind||b;t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0;var E,_=10;try{var T={};Object.defineProperty&&Object.defineProperty(T,"x",{value:0}),E=0===T.x}catch(e){E=!1}E?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(e){if("number"!=typeof e||e<0||e!==e)throw new TypeError('"defaultMaxListeners" must be a positive number');_=e}}):r.defaultMaxListeners=_,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return a(this)},r.prototype.emit=function(e){var t,n,r,a,c,f,l="error"===e;if(f=this._events)l=l&&null==f.error;else if(!l)return!1;if(l){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var y=new Error('Unhandled "error" event. ('+t+")");throw y.context=t,y}if(!(n=f[e]))return!1;var m="function"==typeof n;switch(r=arguments.length){case 1:i(n,m,this);break;case 2:o(n,m,this,arguments[1]);break;case 3:s(n,m,this,arguments[1],arguments[2]);break;case 4:u(n,m,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(r-1),c=1;c<r;c++)a[c-1]=arguments[c];h(n,m,this,a)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,l(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,l(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,r,a,i,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=A(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){o=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():d(n,a),1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,o||t)}return this},r.prototype.removeAllListeners=function(e){var t,n,r;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=A(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=A(null):delete n[e]),this;if(0===arguments.length){var a,i=L(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=A(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},r.prototype.listeners=function(e){return y(this,e,!0)},r.prototype.rawListeners=function(e){return y(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},r.prototype.listenerCount=m,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],2:[function(e,t,n){!function(){function e(e,t){if("number"!=typeof e&&"string"!=typeof e)throw new TypeError("non-number or string given to gematriya()");var n="string"==typeof e;return n&&(e=e.replace(/('|")/g,"")),e=e.toString().split("").reverse(),!n&&t&&(e=e.slice(0,t)),e=e.map(function i(o,s){return n?t&&a[o]<a[e[s-1]]&&a[o]<100?1e3*a[o]:a[o]:parseInt(o,10)*Math.pow(10,s)>1e3?i(o,s-3):r[parseInt(o,10)*Math.pow(10,s)]}),n?e.reduce(function(e,t){return e+t},0):(e=e.reverse().join("").replace(/יה/g,"טו").replace(/יו/g,"טז").split(""),1===e.length?e.push("'"):e.length>1&&e.splice(-1,0,'"'),e.join(""))}var n,r={},a={"":0,"א":1,"ב":2,"ג":3,"ד":4,"ה":5,"ו":6,"ז":7,"ח":8,"ט":9,"י":10,"כ":20,"ל":30,"מ":40,"נ":50,"ס":60,"ע":70,"פ":80,"צ":90,"ק":100,"ר":200,"ש":300,"ת":400,"תק":500,"תר":600,"תש":700,"תת":800,"תתק":900,"תתר":1e3};for(n in a)r[a[n]]=n;void 0!==t?t.exports=e:window.gematriya=e}()},{}],3:[function(e,t,n){!function(){"use strict";function e(e){return e.valueOf()/I-.5+C}function r(e){return new Date((e+.5-C)*I)}function a(t){return e(t)-H}function i(e,t){return T(L(e)*S(D)-E(t)*L(D),S(e))}function o(e,t){return _(L(t)*S(D)+S(t)*L(D)*L(e))}function s(e,t,n){return T(L(e),S(e)*L(t)-E(n)*S(t))}function u(e,t,n){return _(L(t)*L(n)+S(t)*S(n)*S(e))}function h(e,t){return N*(280.16+360.9856235*e)-t}function c(e){return e<0&&(e=0),2967e-7/Math.tan(e+.00312536/(e+.08901179))}function f(e){return N*(357.5291+.98560028*e)}function l(e){return e+N*(1.9148*L(e)+.02*L(2*e)+3e-4*L(3*e))+102.9372*N+A}function y(e){var t=f(e),n=l(t);return{dec:o(n,0),ra:i(n,0)}}function m(e,t){return Math.round(e-k-t/(2*A))}function d(e,t,n){return k+(e+t)/(2*A)+n}function w(e,t,n){return H+e+.0053*L(t)-.0069*L(2*n)}function g(e,t,n){return M((L(e)-L(t)*L(n))/(S(t)*S(n)))}function p(e,t,n,r,a,i,o){return w(d(g(e,n,r),t,a),i,o)}function v(e){var t=N*(218.316+13.176396*e),n=N*(134.963+13.064993*e),r=N*(93.272+13.22935*e),a=t+6.289*N*L(n),s=5.128*N*L(r),u=385001-20905*S(n);return{ra:i(a,s),dec:o(a,s),dist:u}}function b(e,t){return new Date(e.valueOf()+t*I/24)}var A=Math.PI,L=Math.sin,S=Math.cos,E=Math.tan,_=Math.asin,T=Math.atan2,M=Math.acos,N=A/180,I=864e5,C=2440588,H=2451545,D=23.4397*N,O={};O.getPosition=function(e,t,n){var r=N*-n,i=N*t,o=a(e),c=y(o),f=h(o,r)-c.ra;return{azimuth:s(f,i,c.dec),altitude:u(f,i,c.dec)}};var Y=O.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];O.addTime=function(e,t,n){Y.push([e,t,n])};var k=9e-4;O.getTimes=function(e,t,n){var i,s,u,h,c,y=N*-n,g=N*t,v=a(e),b=m(v,y),A=d(0,y,b),L=f(A),S=l(L),E=o(S,0),_=w(A,L,S),T={solarNoon:r(_),nadir:r(_-.5)};for(i=0,s=Y.length;i<s;i+=1)u=Y[i],h=p(u[0]*N,y,g,E,b,L,S),c=_-(h-_),T[u[1]]=r(c),T[u[2]]=r(h);return T},O.getMoonPosition=function(e,t,n){var r=N*-n,i=N*t,o=a(e),f=v(o),l=h(o,r)-f.ra,y=u(l,i,f.dec),m=T(L(l),E(i)*S(f.dec)-L(f.dec)*S(l));return y+=c(y),{azimuth:s(l,i,f.dec),altitude:y,distance:f.dist,parallacticAngle:m}},O.getMoonIllumination=function(e){var t=a(e||new Date),n=y(t),r=v(t),i=M(L(n.dec)*L(r.dec)+S(n.dec)*S(r.dec)*S(n.ra-r.ra)),o=T(149598e3*L(i),r.dist-149598e3*S(i)),s=T(S(n.dec)*L(n.ra-r.ra),L(n.dec)*S(r.dec)-S(n.dec)*L(r.dec)*S(n.ra-r.ra));return{fraction:(1+S(o))/2,phase:.5+.5*o*(s<0?-1:1)/Math.PI,angle:s}},O.getMoonTimes=function(e,t,n,r){var a=new Date(e);r?a.setUTCHours(0,0,0,0):a.setHours(0,0,0,0);for(var i,o,s,u,h,c,f,l,y,m,d,w,g,p=.133*N,v=O.getMoonPosition(a,t,n).altitude-p,A=1;A<=24&&(i=O.getMoonPosition(b(a,A),t,n).altitude-p,o=O.getMoonPosition(b(a,A+1),t,n).altitude-p,h=(v+o)/2-i,c=(o-v)/2,f=-c/(2*h),l=(h*f+c)*f+i,y=c*c-4*h*i,m=0,y>=0&&(g=Math.sqrt(y)/(2*Math.abs(h)),d=f-g,w=f+g,Math.abs(d)<=1&&m++,Math.abs(w)<=1&&m++,d<-1&&(d=w)),1===m?v<0?s=A+d:u=A+d:2===m&&(s=A+(l<0?w:d),u=A+(l<0?d:w)),!s||!u);A+=2)v=o;var L={};return s&&(L.rise=b(a,s)),u&&(L.set=b(a,u)),s||u||(L[l>0?"alwaysUp":"alwaysDown"]=!0),L},"object"==typeof n&&void 0!==t?t.exports=O:"function"==typeof define&&define.amd?define(O):window.SunCalc=O}()},{}],4:[function(e,t,n){function r(e){return e=e.split(/\s+/).map(function(e,t,n){return"washington dc"===n.join(" ").toLowerCase()&&1===t?e.toUpperCase():e[0].toUpperCase()+e.slice(1).toLowerCase()}).join(" "),i[e]||[0,0,!1]}function a(){return Object.keys(i)}var i={Ashdod:[31.8,34.633,!0],Atlanta:[33.75,-84.383,!1],Austin:[30.266,-97.75,!1],Baghdad:[33.233,44.366,!1],"Beer Sheva":[31.25,34.783,!0],Berlin:[52.516,13.4,!1],Baltimore:[39.283,-76.6,!1],Bogota:[4.6,-74.083,!1],Boston:[42.333,-71.066,!1],"Buenos Aires":[-34.616,-58.4,!1],Buffalo:[42.883,-78.866,!1],Chicago:[41.833,-87.75,!1],Cincinnati:[39.1,-84.516,!1],Cleveland:[41.5,-81.683,!1],Dallas:[32.783,-96.8,!1],Denver:[39.733,-104.983,!1],Detroit:[42.333,-83.033,!1],Eilat:[29.55,34.95,!0],Gibraltar:[36.133,-5.35,!1],Haifa:[32.816,34.983,!0],Hawaii:[19.5,-155.5,!1],Houston:[29.766,-95.366,!1],Jerusalem:[31.783,35.233,!0],Johannesburg:[-26.166,28.033,!1],Kiev:[50.466,30.483,!1],"La Paz":[-16.5,-68.15,!1],Livingston:[40.283,-74.3,!1],London:[51.5,-.166,!1],"Los Angeles":[34.066,-118.25,!1],Miami:[25.766,-80.2,!1],Melbourne:[-37.866,145.133,!1],"Mexico City":[19.4,-99.15,!1],Montreal:[45.5,-73.6,!1],Moscow:[55.75,37.7,!1],"New York":[40.716,-74.016,!1],Omaha:[41.266,-95.933,!1],Ottawa:[45.7,-76.183,!1],"Panama City":[8.966,-79.533,!1],Paris:[48.866,2.333,!1],"Petach Tikvah":[32.083,34.883,!0],Philadelphia:[39.95,-75.166,!1],Phoenix:[33.45,-112.066,!1],Pittsburgh:[40.433,-80,!1],"Saint Louis":[38.633,-90.2,!1],"Saint Petersburg":[59.883,30.25,!1],"San Francisco":[37.783,-122.416,!1],Seattle:[47.6,-122.333,!1],Sydney:[-33.916,151.283,!1],"Tel Aviv":[32.083,34.766,!0],Tiberias:[32.966,35.533,!0],Toronto:[43.633,-79.4,!1],Vancouver:[49.266,-123.116,!1],"White Plains":[41.033,-73.75,!1],"Washington DC":[38.916,-77,!1]};n.getCity=r,n.listCities=a,n.addCity=function(e,t){if(!Array.isArray(t))throw new TypeError("adding non-array city");if(5==t.length){var n=t.slice();t=[],t[0]=(60*n[0]+n[1])/60,t[1]=(60*n[2]+n[3])/60,t[2]=n[4]}if(3!=t.length)throw new TypeError("length of city array is not 3");e=e.split(/\s+/).map(function(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()}).join(" "),i[e]=t},n.nearest=function(e,t){if(Array.isArray(e)&&(e=(60*e[0]+e[1])/60),Array.isArray(t)&&(t=(60*t[0]+t[1])/60),"number"!=typeof e)throw new TypeError("incorrect lat type passed to nearest()");if("number"!=typeof t)throw new TypeError("incorrect long type passed to nearest()");return a().map(function(n){var a=r(n);return{name:n,dist:Math.sqrt(Math.pow(Math.abs(a[0]-e),2)+Math.pow(Math.abs(a[1]-t),2))}}).reduce(function(e,t){return e.dist<t.dist?e:t}).name}},{}],5:[function(e,t,n){function r(e){return(1+7*e)%19<7}function a(e){var t=235*Math.floor((e-1)/19)+(e-1)%19*12+Math.floor(((e-1)%19*7+1)/19),n=204+t%1080*793,a=5+12*t+793*Math.floor(t/1080)+Math.floor(n/1080),i=n%1080+a%24*1080,o=1+29*t+Math.floor(a/24),s=o+(i>=19440||2==o%7&&i>=9924&&!r(e)||1==o%7&&i>=16789&&r(e-1));return s+(s%7==0||s%7==3||s%7==5)}function i(e){return a(e+1)-a(e)}function o(e){return i(e)%10==5}function s(e){return i(e)%10==3}function u(e){switch(e.toLowerCase()[0]){case"n":case"נ":return"o"==e.toLowerCase()[1]?0:f.NISAN;case"i":return f.IYYAR;case"e":return f.ELUL;case"c":case"ח":return f.CHESHVAN;case"k":case"כ":return f.KISLEV;case"s":switch(e.toLowerCase()[1]){case"i":return f.SIVAN;case"h":return f.SHVAT;default:return 0}case"t":switch(e.toLowerCase()[1]){case"a":return f.TAMUZ;case"i":return f.TISHREI;case"e":return f.TEVET}break;case"a":switch(e.toLowerCase()[1]){case"v":return f.AV;case"d":return/(1|[^i]i|a|א)$/i.test(e)?f.ADAR_I:f.ADAR_II}break;case"ס":return f.SIVAN;case"ט":return f.TEVET;case"ש":return f.SHVAT;case"א":switch(e.toLowerCase()[1]){case"ב":return f.AV;case"ד":return/(1|[^i]i|a|א)$/i.test(e)?f.ADAR_I:f.ADAR_II;case"י":return f.IYYAR;case"ל":return f.ELUL}break;case"ת":switch(e.toLowerCase()[1]){case"מ":return f.TAMUZ;case"ש":return f.TISHREI}}return 0}function h(e,t,n){if(null===e)throw new TypeError("self is null");switch(typeof t){case"function":break;case"string":case"number":return e[t];case"boolean":t=t?function(e){return e}:function(e){return!e};break;case"object":var r=t;if(t instanceof RegExp){t=function(e){return r.test(e)};break}if(Array.isArray(t)){t=function(e,t){return r.indexOf(t)>-1};break}default:throw new TypeError("fun is not a supported type")}var a={},i=Object(e);for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];if(t.call(n,s,o,i)){var u=Object.getOwnPropertyDescriptor(i,o);u.value=s,Object.defineProperty(a,o,u)}}if(Array.isArray(e)||"string"==typeof e){var h=[];for(o in a)h[Number(o)]=a[o];a=h.filter(function(e){return e}),"string"==typeof e&&(a=a.join(""))}return a}var c=e("gematriya"),f=n.months={NISAN:1,IYYAR:2,SIVAN:3,TAMUZ:4,AV:5,ELUL:6,TISHREI:7,CHESHVAN:8,KISLEV:9,TEVET:10,SHVAT:11,ADAR_I:12,ADAR_II:13},l=[["",0,""],["Nisan",0,"ניסן"],["Iyyar",0,"אייר"],["Sivan",0,"סיון"],["Tamuz",0,"תמוז"],["Av",0,"אב"],["Elul",0,"אלול"],["Tishrei",0,"תשרי"],["Cheshvan",0,"חשון"],["Kislev",0,"כסלו"],["Tevet",0,"טבת"],["Sh'vat",0,"שבט"]];n.monthNames=[l.concat([["Adar",0,"אדר"],["Nisan",0,"ניסן"]]),l.concat([["Adar 1",0,"אדר א'"],["Adar 2",0,"אדר ב'"],["Nisan",0,"ניסן"]])],n.days={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},n.LANG=function(e,t){return"h"==t&&e[2]||"a"==t&&e[1]||e[0]},n.LEAP=r,n.MONTH_CNT=function(e){return 12+r(e)},n.daysInMonth=function(e,t){return 30-(e==f.IYYAR||e==f.TAMUZ||e==f.ELUL||e==f.TEVET||e==f.ADAR_II||e==f.ADAR_I&&!r(t)||e==f.CHESHVAN&&!o(t)||e==f.KISLEV&&s(t))},n.monthNum=function(e){return"number"==typeof e?e:e.charCodeAt(0)>=1488&&e.charCodeAt(0)<=1514&&/('|")/.test(e)?c(e):e.charCodeAt(0)>=48&&e.charCodeAt(0)<=57?parseInt(e,10):u(e)},n.dayYearNum=function(e){return"number"==typeof e?e:e.charCodeAt(0)>=1488&&e.charCodeAt(0)<=1514?c(e,!0):parseInt(e,10)},n.hebElapsedDays=a,n.daysInYear=i,n.lngChesh=o,n.shrtKis=s,n.monthFromName=u,n.dayOnOrBefore=function(e,t){return t-(t-e)%7},n.map=function(e,t,n){if(null===e||"function"!=typeof t)throw new TypeError;var r=Object(e),a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]=t.call(n,r[i],i,r));if(Array.isArray(e)||"string"==typeof e){var o=[];for(i in a)o[Number(i)]=a[i];a=h(o,!0),"string"==typeof e&&(a=a.join(""))}return a},n.filter=h,n.range=function(e,t,n){(n=n||1)<0&&(n=0-n);var r=[],a=e;if(e<t)for(;a<=t;a+=n)r.push(a);else for(;a>=t;a-=n)r.push(a);return r}},{gematriya:2}],6:[function(e,t,n){var r=e("./common"),a=e("./greg"),i=e("gematriya"),o=[["Berachot","Berachos","ברכות",64],["Shabbat","Shabbos","שבת",157],["Eruvin","Eruvin","עירובין",105],["Pesachim",0,"פסחים",121],["Shekalim",0,"שקלים",22],["Yoma",0,"יומא",88],["Sukkah",0,"סוכה",56],["Beitzah",0,"ביצה",40],["Rosh Hashana",0,"ראש השנה",35],["Taanit","Taanis","תענית",31],["Megillah",0,"מגילה",32],["Moed Katan",0,"מועד קטן",29],["Chagigah",0,"חגיגה",27],["Yevamot","Yevamos","יבמות",122],["Ketubot","Kesubos","כתובות",112],["Nedarim",0,"נדרים",91],["Nazir",0,"נזיר",66],["Sotah",0,"סוטה",49],["Gitin",0,"גיטין",90],["Kiddushin",0,"קידושין",82],["Baba Kamma",0,"בבא קמא",119],["Baba Metzia",0,"בבא מציעא",119],["Baba Batra","Baba Basra","בבא בתרא",176],["Sanhedrin",0,"סנהדרין",113],["Makkot","Makkos","מכות",24],["Shevuot","Shevuos","שבועות",49],["Avodah Zarah",0,"עבודה זרה",76],["Horayot","Horayos","הוריות",14],["Zevachim",0,"זבחים",120],["Menachot","Menachos","מנחות",110],["Chullin",0,"חולין",142],["Bechorot","Bechoros","בכורות",61],["Arachin",0,"ערכין",34],["Temurah",0,"תמורה",34],["Keritot","Kerisos","כריתות",28],["Meilah",0,"מעילה",22],["Kinnim",0,"קנים",4],["Tamid",0,"תמיד",10],["Midot","Midos","מדות",4],["Niddah",0,"נדה",73]].map(function(e){return{name:e.slice(0,3),blatt:e[3]}});n.dafyomi=function(e){var t,n,r,i,s,u,h,c,f;if(!(e instanceof Date))throw new TypeError("non-date given to dafyomi");if(r=a.greg2abs(new Date(1923,8,11)),i=a.greg2abs(new Date(1975,5,24)),(c=a.greg2abs(e))<r)return{name:[],blatt:0};for(c>=i?(t=8+(c-i)/2711,n=(c-i)%2711):(t=1+(c-r)/2702,n=(c-r)%2702),s=f=0,u=-1,o[4].blatt=t<=7?13:22,h=0;h<40;){if(u++,s=s+o[h].blatt-1,n<s){switch(f=o[h].blatt+1-(s-n),u){case 36:f+=21;break;case 37:f+=24;break;case 38:f+=33}h=41}h++}return{name:o[u].name,blatt:f}},n.dafname=function(e,t){return r.LANG(e.name,t)+" "+("h"===t?i(e.blatt):e.blatt)}},{"./common":5,"./greg":7,gematriya:2}],7:[function(e,t,n){function r(e){if(!e instanceof Date)throw new TypeError("Argument to greg.dayOfYear not a Date");var t=e.getDate()+31*e.getMonth();return e.getMonth()>1&&(t-=i((4*(e.getMonth()+1)+23)/10),a(e.getFullYear())&&t++),t}function a(e){return!(e%4||!(e%100)&&e%400)}var i=Math.floor,o=[30,31],s=[0,31,28,31].concat(o,o,31,o,o),u=[s.slice()];s[2]++,u.push(s),n.daysInMonth=function(e,t){return u[+a(t)][e]},n.monthNames=["","January","February","March","April","May","June","July","August","September","October","November","December"],n.lookupMonthNum=function(e){return new Date(e+" 1").getMonth()+1},n.dayOfYear=r,n.LEAP=a,n.greg2abs=function(e){var t=e.getFullYear()-1;return r(e)+365*t+(i(t/4)-i(t/100)+i(t/400))},n.abs2greg=function(e){var t=e-1,n=i(t/146097),r=i(t%146097),a=i(r/36524),o=r%36524,s=i(o/1461),u=o%1461,h=i(u/365),c=u%365+1,f=400*n+100*a+4*s+h;return 4==a||4==h?new Date(f,11,31):new Date(new Date(++f,0,c).setFullYear(f))}},{}],8:[function(e,t,n){function r(e,t,n){var a=this;switch(arguments.length){case 0:return new r(new Date);case 1:if(void 0===e)return new r;if(e instanceof Date){var i=u(y.greg2abs(e));return i}if(e instanceof r){var i=new r(e[v](),e[p](),e[g]());return i.il=e.il,i.setLocation(i.lat,i.long),i}if("string"==typeof e){switch(e.toLowerCase().trim()){case"today":return new r;case"yesterday":return(new r).prev();case"tomorrow":return(new r).next()}if(/\s/.test(e)){var o=e.split(/\s+/);if(2==o.length)return new r(o[0],o[1]);if(3==o.length)return new r(o[0],o[1],o[2]);if(4==o.length)return/i/i.test(o[2])&&(o[2]=o[2].length),new r(o[0],o[1]+o[2],o[3])}}else if("number"==typeof e)return u(e);throw new TypeError("HDate called with bad argument");case 2:return new r(e,t,(new r)[g]());case 3:a.day=a.month=1,a.year=l.dayYearNum(n),a.setMonth(l.monthNum(t)),a.setDate(l.dayYearNum(e));break;default:throw new TypeError("HDate called with bad arguments")}return a.setLocation.apply(a,r.defaultLocation)}function a(e){o(e),i(e)}function i(e){e.day<1&&(e.month==E&&(e.year-=1),e.day+=T(e.month,e.year),e.month-=1,a(e)),e.day>T(e.month,e.year)&&(e.month==S.ELUL&&(e.year+=1),e.day-=T(e.month,e.year),e.month+=1,a(e)),o(e)}function o(e){e.month!=S.ADAR_II||e.isLeapYear()||(e.month-=1,a(e)),e.month<1&&(e.month+=_(e.year),e.year-=1,a(e)),e.month>_(e.year)&&(e.month-=_(e.year),e.year+=1,a(e))}function s(e){var t,n=e[v](),r=e[g]();if(e[p]()<E){for(t=E;t<=_(r);t++)n+=T(t,r);for(t=S.NISAN;t<e[p]();t++)n+=T(t,r)}else for(t=E;t<e[p]();t++)n+=T(t,r);return l.hebElapsedDays(r)-1373429+n}function u(e){var t,n,a,i,o=[S.KISLEV,S.TEVET,S.SHVAT,S.ADAR_I,S.NISAN,S.IYYAR,S.SIVAN,S.TAMUZ,E,E,E,S.CHESHVAN];if(e>=10555144)throw new RangeError("parameter to abs2hebrew "+e+" out of range");for(n=y.abs2greg(e),t=new r(1,E,i=3760+n[g]());e>=s(t.setFullYear(i+1));)i++;for(a=i>4634&&i<10666?o[n[p]()]:E;e>s(t=new r(T(a,i),a,i));)a=a%_(i)+1;return t.setLocation.apply(t.setDate(e-s(t.setDate(1))+1),r.defaultLocation)}function h(e){var t=e.greg();return m.getTimes(new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0,0,0),e.lat,e.long)}function c(e,t){return new Date(e.sunrise()[b]()+e[L]()*t)}function f(e,t,n){return new r(M(e,t[A]()+n)).setLocation(t.lat,t.long)}var l=e("./common"),y=e("./greg"),m=e("suncalc"),d=e("./cities"),w=e("gematriya");m.addTime(-16.1,"alot_hashachar",0),m.addTime(-11.5,"misheyakir",0),m.addTime(-10.2,"misheyakir_machmir",0),m.addTime(-8.5,0,"tzeit");var g="getFullYear",p="getMonth",v="getDate",b="getTime",A="abs",L="hour",S=l.months,E=S.TISHREI,_=l.MONTH_CNT,T=l.daysInMonth,M=l.dayOnOrBefore,N=r.prototype;r.defaultLocation=[0,0],Object.defineProperty(r,"defaultCity",{enumerable:!0,configurable:!0,get:function(){return d.nearest(r.defaultLocation[0],r.defaultLocation[1])},set:function(e){r.defaultLocation=d.getCity(e).slice(0,2)}}),N[g]=function(){return this.year},N.isLeapYear=function(){return l.LEAP(this.year)},N[p]=function(){return this.month},N.getTishreiMonth=function(){var e=_(this[g]());return(this[p]()+e-6)%e||e},N.daysInMonth=function(){return T(this[p](),this[g]())},N[v]=function(){return this.day},N.getDay=function(){return this.greg().getDay()},N.setFullYear=function(e){return this.year=e,a(this),this},N.setMonth=function(e){return this.month=l.monthNum(e),a(this),this},N.setTishreiMonth=function(e){return this.setMonth((e+6)%_(this[g]())||13)},N.setDate=function(e){return this.day=e,a(this),this},N.greg=function(){return y.abs2greg(s(this))},N.gregEve=function(){return this.prev().sunset()},N[A]=function(){return s(this)},N.toString=function(e){return l.LANG([this[v](),null,w(this[v]())],e)+" "+this.getMonthName(e)+" "+l.LANG([this[g](),null,w(this[g]())],e)},N.getMonthName=function(e){return l.LANG(l.monthNames[+this.isLeapYear()][this[p]()],e)},N.setCity=function(e){return this.setLocation(d.getCity(e))},N.setLocation=function(e,t){if("object"!=typeof e||Array.isArray(e)||(t=e.long,e=e.lat),Array.isArray(e)&&void 0===t&&(t=e[1],e=e[0]),Array.isArray(e)&&(e=(60*e[0]+e[1])/60),Array.isArray(t)&&(t=(60*t[0]+t[1])/60),"number"!=typeof e)throw new TypeError("incorrect lat type passed to HDate.setLocation()");if("number"!=typeof t)throw new TypeError("incorrect long type passed to HDate.setLocation()");return this.lat=e,this.long=t,this.il=d.getCity(d.nearest(e,t))[2],this},N.sunrise=function(){return h(this).sunrise},N.sunset=function(){return h(this).sunset},N[L]=function(){return(this.sunset()-this.sunrise())/12},N.hourMins=function(){return this[L]()/6e4},N.nightHour=function(){return(this.sunrise()-this.gregEve())/12},N.nightHourMins=function(){return this.nightHour()/6e4};var I={chatzot:function(e){return c(e,6)},chatzot_night:function(e){return new Date(e.sunrise()[b]()-6*e.nightHour())},alot_hashachar:function(e){return h(e).alot_hashachar},alot_hashacher:function(e){return h(e).alot_hashachar},misheyakir:function(e){return h(e).misheyakir},misheyakir_machmir:function(e){return h(e).misheyakir_machmir},sof_zman_shma:function(e){return c(e,3)},sof_zman_tfilla:function(e){return c(e,4)},mincha_gedola:function(e){return c(e,6.5)},mincha_ketana:function(e){return c(e,9.5)},plag_hamincha:function(e){return c(e,10.75)},tzeit:function(e){return h(e).tzeit},neitz_hachama:function(e){return e.sunrise()},shkiah:function(e){return e.sunset()}};N.getZemanim=function(){return l.map(I,function(e){return e(this)},this)},r.addZeman=function(e,t){I[e]=t},N.next=function(){return u(this.abs()+1).setLocation(this.lat,this.long)},N.prev=function(){return u(this.abs()-1).setLocation(this.lat,this.long)},N.isSameDate=function(e){return e instanceof r&&(-1==e[g]()&&(e=new r(e).setFullYear(this[g]())),this[A]()==e[A]())},N.before=function(e){return f(e,this,-1)},N.onOrBefore=function(e){return f(e,this,0)},N.nearest=function(e){return f(e,this,3)},N.onOrAfter=function(e){return f(e,this,6)},N.after=function(e){return f(e,this,7)},t.exports=r},{"./cities":4,"./common":5,"./greg":7,gematriya:2,suncalc:3}],9:[function(e,t,n){function r(e,t){return{enumerable:!0,configurable:!0,get:e,set:t}}function a(e,t){for(var n in t)e[n]=t[n];return e}function i(e,t){var n=this;if(e||(e=(new c)[T]()),"number"!=typeof e)throw new v("year to Hebcal() is not a number");if(n.year=e,!t)return new i(e,h.range(1,h.MONTH_CNT(e)));if("string"==typeof t&&(t=h.monthFromName(t)),"number"==typeof t&&(t=[t]),!Array.isArray(t))throw new v("month to Hebcal is not a valid type");n.months=t[S](function(t){var r=new o(t,e);return p(r,"__year",{configurable:!0,writable:!0,value:n}),r}),n.holidays=f.year(e),n[N]=h.daysInYear(e),p(n,"il",r(function(){return n[_](1).il},function(e){n.months.forEach(function(t){t.il=e})})),p(n,"lat",r(function(){return n[_](1).lat},function(e){n.months.forEach(function(t){t.lat=e})})),p(n,"long",r(function(){return n[_](1).long},function(e){n.months.forEach(function(t){t.long=e})}))}function o(e,t){var n=this;if("number"!=typeof(e=h.monthNum(e)))throw new v("month to Hebcal.Month is not a valid type");if("number"!=typeof t)throw new v("year to Hebcal.Month is not a number");return n.month=e,n.year=t,n.days=h.range(1,h.daysInMonth(e,t))[S](function(r){var a=new c(r,e,t);return p(a,"__month",{configurable:!0,writable:!0,value:n}),a}),n[N]=n.days[N],n.holidays=h.filter(f.year(t),function(t){return t[0].date[_]()==e}),p(n,"il",r(function(){return n[E](1).il},function(e){n.days.forEach(function(t){t.il=e})})),p(n,"lat",r(function(){return n[E](1).lat},function(e){n.days.forEach(function(t){t.lat=e})})),p(n,"long",r(function(){return n[E](1).long},function(e){n.days.forEach(function(t){t.long=e})})),n}function s(e,t){var n=this;if(e||(e=(new Date)[T]()),"string"==typeof e){var i=new Date(e);return t=e.indexOf(" ")+1||e.indexOf("-")+1||e.indexOf("/")+1?i[_]()+1:h.range(1,12),new s(i[T](),t)}if("number"!=typeof e)throw new v("year to Hebcal.GregYear() is not a number");if(n.year=e,!t)return new s(e,h.range(1,12));if("string"==typeof t&&(t=d.lookupMonthName(t)),"number"==typeof t&&(t=[t]),!Array.isArray(t))throw new v("month to Hebcal.GregYear() is not a valid type");return n.months=t[S](function(t){var r=new u(t,e);return p(r,"__year",{configurable:!0,writable:!0,value:n}),r}),n.hebyears=[].concat.apply([],n.months[S](function(e){return e.hebmonths[S](function(e){return e.year})})).filter(function(e,t,n){return n.indexOf(e)===t}),n.holidays=h.filter(f.year(n.hebyears[0]),function(t){return t[0].date.greg()[T]()===e&&n.months.filter(function(e){return e.month===t[0].date.greg()[_]()+1})[N]}),n.hebyears[1]&&a(n.holidays,h.filter(f.year(n.hebyears[1]),function(t){return t[0].date.greg()[T]()===e&&n.months.filter(function(e){return e.month===t[0].date.greg()[_]()+1})[N]})),n[N]=365+d.LEAP(e),p(n,"il",r(function(){return n[_](1).il},function(e){n.months.forEach(function(t){t.il=e})})),p(n,"lat",r(function(){return n[_](1).lat},function(e){n.months.forEach(function(t){t.lat=e})})),p(n,"long",r(function(){return n[_](1).long},function(e){n.months.forEach(function(t){t.long=e})})),n}function u(e,t){var n=this;if("string"==typeof e&&(e=d.lookupMonthNum(e)),"number"!=typeof e)throw new v("month to Hebcal.GregMonth is not a valid type");if("number"!=typeof t)throw new v("year to Hebcal.GregMonth is not a number");return n.year=t,n.month=e,n.days=h.range(1,d.daysInMonth(e,t))[S](function(r){var a=new c(new Date(t,e-1,r));return p(a,"__gregmonth",{configurable:!0,writable:!0,value:n}),a}),n[N]=n.days[N],n.hebmonths=[{month:n[E](1)[_](),year:n[E](1)[T]()},{month:n[E](-1)[_](),year:n[E](-1)[T]()}].filter(function(e,t,n){return 0===t||e.month!=n[0].month}),p(n,"il",r(function(){return n[E](1).il},function(e){n.days.forEach(function(t){t.il=e})})),p(n,"lat",r(function(){return n[E](1).lat},function(e){n.days.forEach(function(t){t.lat=e})})),p(n,"long",r(function(){return n[E](1).long},function(e){n.days.forEach(function(t){t.long=e})})),n}var h=e("./common"),c=e("./hdate"),f=e("./holidays"),l=e("./sedra"),y=e("./dafyomi"),m=e("./cities"),d=e("./greg"),w=e("events").EventEmitter,g=e("gematriya"),p=Object.defineProperty,v=TypeError,b="find",A="strings",L="getYearObject",S="map",E="getDay",_="getMonth",T="getFullYear",M="isLeapYear",N="length",I="next",C="prev",H=h.months,D=H.TISHREI,O=H.NISAN,Y=i.prototype,k=o.prototype,R=s.prototype,V=u.prototype,P=c.prototype;Y[M]=P[M],Y.setCity=function(e){return this.months.forEach(function(t){t.setCity(e)}),this},Y.setLocation=function(e,t){return this.months.forEach(function(n){n.setLocation(e,t)}),this},Y[I]=function(){return new i(this.year+1)},Y[C]=function(){return new i(this.year-1)},Y[_]=function(e){var t=this.months;return e=h.monthNum(e),e>this.months[N]?this[I]()[_](e-t[N]):t[e>0?e-1:t[N]+e]},Y[E]=function(e){var t=this;if(e>t[N])return null;if(e<0)return t[E](t[N]-e);var n=t[b](29,H.ELUL)[0].abs()+1-t[b](1,O)[0].abs();return e<=n?t[_](O)[E](e):t[_](D)[E](e-n)},Y.days=function(){return[].concat.apply([],this.months[S](function(e){return e.days}))},Y[S]=function(){return[][S].apply(this.days(),arguments)},Y.filter=function(){return[].filter.apply(this.days(),arguments)},Y.addHoliday=function(e){if(!(e instanceof f.Event))throw new v("non-Event passed to addHoliday()");return this.holidays.add(e),this},Y.findParsha=function(e,t){var n=t?[t]:["s","a","h"],r=this.filter(function(t){return Math.max.apply(null,n.map(function(n){return t.getSedra(n).indexOf(e)+1}))});return r[r[N]-1]},Y.findSedra=Y.findParsha,Y[b]=function e(t,n){var r=this;if(1===arguments[N]){if("string"==typeof t)return e[A].call(r,t);if(Array.isArray(t))return[].concat.apply([],t[S](function(e){return r[b][Array.isArray(e)?"apply":"call"](r,e)}));if(t instanceof c)return r[b](t.getDate(),t[_]());if(t instanceof Date)return r[b](new c(t))}else if(2==arguments[N]){if(n instanceof o)return n[b](t);if(Array.isArray(n))return[].concat.apply([],n[S](function(e){return r[b](t,e)}));if("string"==typeof n)return r[b](t,h.monthNum(n));if("number"==typeof n)return r[b](t,r[_](n))}return[]},Y[b][A]=function e(t){
var n=t.split(/\s+/),r=e[t.replace(/\s/g,"_").toLowerCase()];if(!n[N])return[];if(r)return r.call(this);try{return this[b](new c(t))}catch(e){return n[N]-1?this[b].apply(this,n):[]}},Y[b][A].rosh_chodesh=function(){return this[b]("Rosh Chodesh",h.range(1,this.months[N]))},Y[b][A].holidays=function(){return[].concat.apply([],this.holidays[S](function(e){return this[b](e.date)},this))},Y[b][A].omer=function(){return this[b](h.range(16,64),O)},Y[b][A].today=function(){return this[b](new c)},Y[b][A].yesterday=function(){return[this[b]("today")[0][C]()]},Y[b][A].tomorrow=function(){return[this[b]("today")[0][I]()]},Y[b][A].pesach=function(){return this[b](h.range(15,23-this.il),O)},Y[b][A].sukkot=function(){return this[b](h.range(15,24-this.il),D)},Y[b][A].succot=Y[b][A].succos=Y[b][A].sukkos=Y[b][A].sukkot,Y[b][A].shavuot=function(){return this[b](h.range(6,7-this.il),H.SIVAN)},Y[b][A].shavuos=Y[b][A].shavuot,Y[b][A].rosh_hashana=function(){return this[b](h.range(1,2),D)},Y[b][A].rosh_hashanah=Y[b][A].rosh_hashana,i.addZeman=c.addZeman,i.cities=m,i.range=h.range,i.gematriya=g,i.holidays=h.filter(f,["masks","Event"]),i.parshiot=l.parshiot,i.LANGUAGE=h.LANG,i[S]=h[S],i.filter=h.filter,p(i,"defaultLocation",r(function(){return c.defaultLocation},function(e){i.events.emit("locationChange",c.defaultLocation),c.defaultLocation=e})),p(i,"defaultCity",r(function(){return c.defaultCity},function(e){i.defaultLocation=m.getCity(e).slice(0,2)})),p(i,"candleLighting",r(function(){return f.Event.candleLighting},function(e){f.Event.candleLighting=e})),p(i,"havdalah",r(function(){return f.Event.havdalah},function(e){f.Event.havdalah=e})),i.Month=o,k[M]=P[M],k[C]=function(){var e=this,t=e[L]();return 1===e.month?t[_](-1):e.month===D?t[C]()[_](H.ELUL):t[_](e.month-1)},k[I]=function(){var e=this,t=e[L]();return e.month===h.MONTH_CNT(e.year)?t[_](1):e.month===H.ELUL?t[I]()[_](D):t[_](e.month+1)},k[E]=function(e){var t=this.days;return e=h.dayYearNum(e),e>t[N]?this[I]()[E](e-t[N]):t[e>0?e-1:t[N]+e]},k[L]=function(){return this.__year||new i(this.year)},k.getName=function(e){return h.LANG(h.monthNames[+this[M]()][this.month],e)},k.rosh_chodesh=function(){var e=this[C]();return 30==e[N]?[e[E](-1),this[E](1)]:[this[E](1)]},k.setCity=function(e){return this.days.forEach(function(t){t.setCity(e)}),this},k.setLocation=function(e,t){return this.days.forEach(function(n){n.setLocation(e,t)}),this},k[S]=function(){return[][S].apply(this.days,arguments)},k.molad=function(){var e,t,n,r,a,i,o={},s=parseInt;i=this.month-7,e=this.year-1,i<0&&(i+=h.MONTH_CNT(e+1)),t=s(i+e/19*235),n=s(204+t%1080*793),r=s(5+12*t+t/1080*793-6),a=s(n%1080+r%24*1080),o.doy=new c(s(1+29*t+r/24)).getDay(),o.hour=Math.round(r%24);var u=s(a%1080);o.minutes=s(u/18),o.chalakim=u%18;var f=this.prev().find.strings.shabbat_mevarchim._calc.call(this)[0].onOrAfter(o.doy).greg();return f.setHours(o.hour),f.setMinutes(o.minutes),f.setSeconds(3.33*o.chalakim),o.day=f,o},k[b]=function e(t){var n=this;return"number"==typeof t?[n[E](t)]:"string"==typeof t?e[A].call(n,t):Array.isArray(t)?[].concat.apply([],t[S](function(e){return n[b](e)})):t instanceof c&&t[T]()==n.year&&t[_]()==n.month?n[b](t.getDate()):t instanceof Date?n[b](new c(t)):[]},k[b][A]=function e(t){var n=e[t.replace(/\s/g,"_").toLowerCase()];if(n)return n.call(this);try{return this[b](new c(t))}catch(e){var r=h.dayYearNum(t);return r?this[b](r):[]}},k[b][A].rosh_chodesh=function(){return this.rosh_chodesh()},k[b][A].shabbat_mevarchim=function e(){return this.month===H.ELUL?[]:e._calc.call(this)},k[b][A].shabbat_mevarchim._calc=function(){return this[b](this[E](29).onOrBefore(h.days.SAT))},k[b][A].shabbos_mevarchim=k[b][A].shabbos_mevorchim=k[b][A].shabbat_mevarchim,i.HDate=c,P.getMonthObject=function(){return this.__month||new o(this[_](),this[T]())},P[L]=function(){return this.getMonthObject()[L]()},function(){var e={};[C,I].forEach(function(t){e[t]=P[t],P[t]=function(){var n=e[t].call(this);return this.__month?this[L]()[b](n)[0]:n}})}();var x=function(){var e={};return function(t){var n=e[t[T]()];return n&&n.il==t.il||(n=e[t[T]()]=new l(t[T](),t.il)),n}}();P.getSedra=function(e){return x(this).get(this)[S](function(t){return h.LANG(t,e)})},P.getParsha=P.getSedra,P.isSedra=function(){return x(this).isParsha(this)},P.isParsha=P.isSedra,P.holidays=function(e){var t=this,n=t[L]().holidays[t];return n?n.filter(function(n){return!!e||!n.routine()&&n.is(t)})[S](function(e){return e.date.setLocation(t),e}):[]},["candleLighting","havdalah"].forEach(function(e){P[e]=function(){var t=this,n=t.holidays(!0).filter(function(e){return e.is(t)});return n.length&&(n=h.filter(n.map(function(t){return t[e]()}),!0)),n.length?new Date(Math.max.apply(null,n)):null}}),P.omer=function(){var e=this,t=e.greg().getTime(),n=e[T]();return t>new c(15,O,n).greg().getTime()&&t<new c(6,H.SIVAN,n).greg().getTime()?e.abs()-new c(16,O,n).abs()+1:0},P.dafyomi=function(e){return y.dafname(y.dafyomi(this.greg()),e)},P.tachanun=function(){function e(){function e(e){return e[S](function(e){return e.abs()})}var o,s,u,c=!arguments[0],l=this,y=l[L](),m=y.year;if(i.il[m]===l.il?(o=i.all[m],s=i.some[m],u=i.yes_prev[m]):(o=i.all[m]=e(y[b]("Rosh Chodesh").concat(y[b](h.range(1,h.daysInMonth(O,m)),O),y[b](48,O),y[b](h.range(1,8-l.il),H.SIVAN),y[b]([9,15],H.AV),y[b](-1,H.ELUL),y[b]([1,2],D),y[b](h.range(9,24-l.il),D),y[b](h.range(25,33),H.KISLEV),y[b](15,H.SHVAT),y[b]([14,15],y[M]()?[H.ADAR_I,H.ADAR_II]:H.ADAR_I))),s=i.some[m]=e([].concat(y[b](h.range(1,13),H.SIVAN),y[b](h.range(20,31),D),y[b](14,H.IYYAR),f.atzmaut(m)[1].date||[],m>=5727?y[b](29,H.IYYAR):[])),u=i.yes_prev[m]=e([].concat(y[b](-1,H.ELUL),y[b](9,H.TISHREI),y[b](14,H.IYYAR))),i.il[m]=l.il),o=o.indexOf(l.abs())>-1,s=s.indexOf(l.abs())>-1,u=u.indexOf(l.abs()+1)>-1,o)return t;var d=(!s&&a)|(6!=l[E]()&&r);return d|=c&&!u?l[I]().tachanun(!0)&r&&n:5!=l[E]()&&n,d==a?t:d}var t=e.NONE=0,n=e.MINCHA=1,r=e.SHACHARIT=2,a=e.ALL_CONGS=4,i={all:{},some:{},yes_prev:{},il:{}};return e}(),P.tachanun_uf=function(){var e=this.tachanun();return{shacharit:!!(e&this.tachanun.SHACHARIT),mincha:!!(e&this.tachanun.MINCHA),all_congs:!!(e&this.tachanun.ALL_CONGS)}},P.hallel=function(){function e(){var e=this,i=e[L](),o=i.year,s=a.il[o]==e.il&&a.whole[o]||(a.whole[o]=[].concat(i[b](h.range(25,33),H.KISLEV),i[b]([15,e.il?null:16],O),i[b]("Shavuot"),i[b]("Sukkot"),f.atzmaut(o)[1].date||[],o>=5727?i[b](29,H.IYYAR):[])[S](function(e){return e.abs()})),u=a.il[o]==e.il&&a.half[o]||(a.half[o]=[].concat(i[b]("Rosh Chodesh").filter(function(e){return e[_]()!=D}),i[b](h.range(17-e.il,23-e.il),O))[S](function(e){return e.abs()}));return a.il[o]=e.il,s.indexOf(e.abs())>-1&&r||u.indexOf(e.abs())>-1&&n||t}var t=e.NONE=0,n=e.HALF=1,r=e.WHOLE=2,a={whole:{},half:{},il:{}};return e}(),function(e){function t(){function t(e,t){return h.filter(h[S](e,function(e){return e-r}),function(e){return e>0&&e-t<0})}var n=new c;i.isSameDate(n)||(e.emit("dayChange"),i=n);var r=new Date,a=t(n.getZemanim(),e.beforeZeman),o=t(e.customs,e.refreshInterval);for(var s in a)e.emit("almostZeman",s,a[s]),a[s]<e.refreshInterval&&e.emit("atZeman",s);for(var u in o)e.emit("custom",u)}var n,a,i=new c;p(e,"refreshInterval",r(function(){return n},function(e){a&&(a=clearInterval(a)),n=e,e&&(a=setInterval(t,e),a.unref&&a.unref())})),e.beforeZeman=6e5,t(),e.refreshInterval=3e5,e.customs={}}(i.events=new w),i.GregYear=s,R[M]=function(){return 366==this[N]},R.setCity=Y.setCity,R.setLocation=Y.setLocation,R[I]=function(){return new s(this.year+1)},R[C]=function(){return new s(this.year-1)},R[_]=function(e){var t=this.months;return e="number"==typeof e?e:d.lookupMonthNum(e),e>t[N]?this[I]()[_](e-t[N]):t[e>0?e-1:t[N]+e]},a(R,{days:Y.days,map:Y[S],filter:Y.filter,addHoliday:Y.addHoliday}),i.GregMonth=u,V[M]=function(){return d.LEAP(this.year)},V[C]=function(){return 1===this.month?this[L]()[C]()[_](-1):this[L]()[_](this.month-1)},V[I]=function(){return this[L]()[_](this.month+1)},V[E]=function(e){return e>this.days[N]?this[I]()[E](e-this.days[N]):this.days[e>0?e-1:this.days[N]+e]},V[L]=function(){return this.__year||new s(this.year)},V.getName=function(){return d.monthNames[this.month]},V.setCity=k.setCity,V.setLocation=k.setLocation,V[S]=k[S],P.getGregMonthObject=function(){return this.__gregmonth||new u(this.greg()[_]()+1,this.greg()[T]())},P.getGregYearObject=function(){return this.getGregMonthObject()[L]()},t.exports=i},{"./cities":4,"./common":5,"./dafyomi":6,"./greg":7,"./hdate":8,"./holidays":10,"./sedra":12,events:1,gematriya:2}],10:[function(e,t,n){function r(e){return["Chanukah: Candle "+e,0,"חנוכה: נר "+f(e)]}function a(e){return[e[0]+' (CH"M)',e[1]?e[1]+' (CH"M)':e[1],e[2]?e[2]+' )חוה"מ(':e[2]]}function i(e){return["Sukkot: "+e,"Succos: "+e,"סוכות יום "+f(e)]}function o(e){return["Pesach: "+e,0,"פסח יום "+f(e)]}function s(e,t,n){var r=this;r.date=new c(e),r.desc="object"!=typeof t?[t]:t,r.USER_EVENT=!!(n&E),r.LIGHT_CANDLES=!!(n&_),r.YOM_TOV_ENDS=!!(n&T),r.CHUL_ONLY=!!(n&M),r.IL_ONLY=!!(n&N),r.LIGHT_CANDLES_TZEIS=!!(n&I)}function u(e){if(e>=5708){var t=new c(1,m.IYYAR,e),n=new c(15,p,e);return n[b]()==d.SUN?t.setDate(2):n[b]()==v?t.setDate(3):e<5764?t.setDate(4):n[b]()==d.TUE?t.setDate(5):t.setDate(4),[new s(t,["Yom HaZikaron",0,"יום הזיכרון"],0),new s(t.next(),["Yom HaAtzma'ut",0,"יום העצמאות"],0)]}return[]}var h=e("./common"),c=e("./hdate"),f=e("gematriya"),l={},y=h.dayOnOrBefore,m=h.months,d=h.days,w=m.TISHREI,g=m.KISLEV,p=m.NISAN,v=d.SAT,b="getDay",A="abs",L="Shabbat",S="Shabbos",E=1,_=2,T=4,M=8,N=16,I=32;n.masks={USER_EVENT:E,LIGHT_CANDLES:_,YOM_TOV_ENDS:T,CHUL_ONLY:M,IL_ONLY:N,LIGHT_CANDLES_TZEIS:I},s.prototype.is=function(e,t){return e=new c(e),myDate=this.date,arguments.length<2&&(t=e.il),e.getDate()==myDate.getDate()&&e.getMonth()==myDate.getMonth()&&(e.getFullYear()==myDate.getFullYear()&&!(t&&this.CHUL_ONLY||!t&&this.IL_ONLY))},s.prototype.masks=function(){var e=this;return(e.USER_EVENT&&E)|(e.LIGHT_CANDLES&&_)|(e.YOM_TOV_ENDS&&T)|(e.CHUL_ONLY&&M)|(e.IL_ONLY&&N)|(e.LIGHT_CANDLES_TZEIS&&I)},s.prototype.getDesc=function(e){return h.LANG(this.desc,e)},s.prototype.candleLighting=function(){var e=this.date;return this.LIGHT_CANDLES?new Date(e.sunset()-60*s.candleLighting*1e3):this.LIGHT_CANDLES_TZEIS?e.getZemanim().tzeit:null},s.prototype.havdalah=function(){return this.YOM_TOV_ENDS?new Date(this.date.sunset().getTime()+60*s.havdalah*1e3):null},s.prototype.routine=function(){function e(){return!!~e.names.indexOf(this.getDesc("s"))}return e.names=[L,"Erev Shabbat"],e}(),s.isIL=!1,s.candleLighting=18,s.havdalah=42,n.Event=s,n.year=function(e){function t(e){Array.isArray(e)?e.forEach(function(e){t(e)}):C[e.date]?C[e.date].push(e):C[e.date]=[e]}if(l[e])return l[e];var n,f=new c(1,w,e),E=new c(15,p,e),C={};Object.defineProperty(C,"add",{value:t}),t([new s(f,["Rosh Hashana 1",0,"ראש השנה א'"],I),new s(new c(2,w,e),["Rosh Hashana 2",0,"ראש השנה ב'"],T),new s(new c(3+(f[b]()==d.THU),w,e),["Tzom Gedaliah",0,"צום גדליה"],0),new s(new c(9,w,e),["Erev Yom Kippur",0,"ערב יום כיפור"],_),new s(new c(y(v,7+f[A]())),["Shabbat Shuva","Shabbos Shuvah","שבת שובה"],0),new s(new c(10,w,e),["Yom Kippur",0,"יום כיפור"],T),new s(new c(14,w,e),["Erev Sukkot","Erev Succos","ערב סוכות"],_),new s(new c(15,w,e),i(1),I|M),new s(new c(15,w,e),i(1),T|N),new s(new c(16,w,e),i(2),T|M),new s(new c(16,w,e),a(i(2)),N),new s(new c(17,w,e),a(i(3)),0),new s(new c(18,w,e),a(i(4)),0),new s(new c(19,w,e),a(i(5)),0),new s(new c(20,w,e),a(i(6)),0),new s(new c(21,w,e),["Sukkot: 7 (Hoshana Raba)","Succos: 7 (Hoshana Raba)","סוכות יום ז' )הושענא רבה("],_),new s(new c(22,w,e),["Shmini Atzeret","Shmini Atzeres","שמיני עצרת"],I|M),new s(new c(22,w,e),["Shmini Atzeret / Simchat Torah","Shmini Atzeres / Simchas Torah","שמיני עצרת / שמחת תורה"],T|N),new s(new c(23,w,e),["Simchat Torah","Simchas Torah","שמחת תורה"],T|M),new s(new c(24,g,e),["Erev Chanukah",0,"ערב חנוכה"],0),new s(new c(25,g,e),r(1),0),new s(new c(26,g,e),r(2),0),new s(new c(27,g,e),r(3),0),new s(new c(28,g,e),r(4),0),new s(new c(29,g,e),r(5),0),new s(new c(30,g,e),r(6),0),new s(new c(31,g,e),r(7),0),new s(new c(32,g,e),r(8),0),new s(new c(15,m.SHVAT,e),["Tu B'Shvat",0,'ט"ו בשבט'],0),new s(new c(y(v,E[A]()-43)),["Shabbat Shekalim","Shabbos Shekalim","שבת שקלים"],0),new s(new c(y(v,E[A]()-30)),["Shabbat Zachor","Shabbos Zachor","שבת זכור"],0),new s(new c(E[A]()-(E[b]()==d.TUE?33:31)),["Ta'anit Esther","Ta'anis Esther","תענית אסתר"],0),new s(new c(13,m.ADAR_II,e),["Erev Purim",0,"ערב פורים"],0),new s(new c(14,m.ADAR_II,e),["Purim",0,"פורים"],0),new s(new c(15,m.ADAR_II,e),["Shushan Purim",0,"שושן פורים"],0),new s(new c(y(v,E[A]()-14)-7),["Shabbat Parah","Shabbos Parah","שבת פרה"],0),new s(new c(y(v,E[A]()-14)),["Shabbat Hachodesh","Shabbos Hachodesh","שבת החודש"],0),new s(new c(y(v,E[A]()-1)),["Shabbat HaGadol","Shabbos HaGadol","שבת הגדול"],0),new s(E.prev()[b]()==v?E.onOrBefore(d.THU):new c(14,p,e),["Ta'anit Bechorot","Ta'anis Bechoros","תענית בכורות"],0),new s(new c(14,p,e),["Erev Pesach",0,"ערב פסח"],_),new s(new c(15,p,e),o(1),I|M),new s(new c(15,p,e),o(1),T|N),new s(new c(16,p,e),o(2),T|M),new s(new c(16,p,e),a(o(2)),N),new s(new c(16,p,e),["Start counting Omer",0,"התחלת ספירת העומר"],0),new s(new c(17,p,e),a(o(3)),0),new s(new c(18,p,e),a(o(4)),0),new s(new c(19,p,e),a(o(5)),0),new s(new c(20,p,e),a(o(6)),_),new s(new c(21,p,e),o(7),I|M),new s(new c(21,p,e),o(7),T|N),new s(new c(22,p,e),o(8),T|M),new s(new c(14,m.IYYAR,e),["Pesach Sheni",0,"פסח שני"],0),new s(new c(18,m.IYYAR,e),["Lag B'Omer",0,'ל"ג בעומר'],0),new s(new c(5,m.SIVAN,e),["Erev Shavuot","Erev Shavuos","ערב שבועות"],_),new s(new c(6,m.SIVAN,e),["Shavuot 1","Shavuos 1","שבועות א'"],I|M),new s(new c(6,m.SIVAN,e),["Shavuot","Shavuos","שבועות"],T|N),new s(new c(7,m.SIVAN,e),["Shavuot 2","Shavuos 2","שבועות ב'"],T|M),new s(new c(y(v,new c(1,w,e+1)[A]()-4)),["Leil Selichot","Leil Selichos","ליל סליחות"],0),new s(new c(29,m.ELUL,e),["Erev Rosh Hashana",0,"ערב ראש השנה"],_)]),n=new c(10,m.TEVET,e),n[b]()==v&&(n=n.next()),t(new s(n,["Asara B'Tevet",0,"עשרה בטבת"],0)),h.LEAP(e)&&(t(new s(new c(14,m.ADAR_I,e),["Purim Katan",0,"פורים קטן"],0)),t(new s(new c(15,m.ADAR_I,e),["Shushan Purim Katan",0,"שושן פורים קטן"],0))),e>=5711&&(n=new c(27,p,e),n[b]()==d.FRI?n=n.prev():n[b]()==d.SUN&&(n=n.next()),t(new s(n,["Yom HaShoah",0,"יום השואה"],0))),t(u(e)),e>=5727&&t(new s(new c(28,m.IYYAR,e),["Yom Yerushalayim",0,"יום ירושלים"],0)),n=new c(17,m.TAMUZ,e),n[b]()==v&&(n=n.next()),t(new s(n,["Shiva-Asar B'Tamuz",0,"צום יז' בתמוז"],0)),n=new c(9,m.AV,e),n[b]()==v&&(n=n.next()),t(new s(new c(y(v,n[A]())),["Shabbat Chazon","Shabbos Chazon","שבת חזון"],0)),t(new s(n.prev(),["Erev Tish'a B'Av",0,"ערב תשעה באב"],0)),t(new s(n,["Tish'a B'Av",0,"תשעה באב"],0)),t(new s(new c(y(v,n[A]()+7)),["Shabbat Nachamu","Shabbos Nachamu","שבת נחמו"],0));for(var H=6;H<h.daysInYear(e)+7;H+=7)t(new s(new c(y(v,new c(1,w,e)[A]()+H)),[L,S,"שבת"],T)),t(new s(new c(y(d.FRI,new c(1,w,e)[A]()+H)),["Erev Shabbat","Erev Shabbos","ערב שבת"],_));for(var D=1;D<=h.MONTH_CNT(e);D++)30==(D==p?h.daysInMonth(h.MONTH_CNT(e-1),e-1):h.daysInMonth(D-1,e))?(t(new s(new c(1,D,e),["Rosh Chodesh 2",0,"ראש חודש ב'"],0)),t(new s(new c(30,D-1,e),["Rosh Chodesh 1",0,"ראש חודש א'"],0))):D!==w&&t(new s(new c(1,D,e),["Rosh Chodesh",0,"ראש חודש"],0)),D!=m.ELUL&&t(new s(new c(29,D,e).onOrBefore(v),["Shabbat Mevarchim","Shabbos Mevorchim","שבת מברכים"],0));return l[e]=C},n.atzmaut=u},{"./common":5,"./hdate":8,gematriya:2}],11:[function(e,t,n){window.Hebcal=e("..");var r=!1,a="undefined"!=typeof console&&(console.warn||console.log)||function(){};Hebcal.events.on("newListener",function(e){"ready"===e&&!r&&Hebcal.ready&&(r=Hebcal.events.emit("ready"))}),Object.defineProperty(Hebcal,"onready",{configurable:!0,get:function(){return a("Getting deprecated property Hebcal.onready"),Hebcal.events.listeners("ready")[0]},set:function(e){a("Setting deprecated property Hebcal.onready; use Hebcal.events.on('ready', func) instead"),Hebcal.events.on("ready",e)}}),Hebcal.ready=!0,r=Hebcal.events.emit("ready")},{"..":9}],12:[function(e,t,n){function r(e,t){t=!!t;var n,r=o.lngChesh(e),a=o.shrtKis(e);this.year=e,n=r&&!a?l:!r&&a?c:f;var i=new s(1,o.months.TISHREI,e).abs(),u=i%7+1;this.first_saturday=o.dayOnOrBefore(6,i+6);var h=+o.LEAP(e);this.type=n,this.rosh_hashana_day=u,this.leap=h,this.il=t;var y=""+h+u+n;if(E[y]?this.theSedraArray=E[y]:this.theSedraArray=E[y+ +t],!this.theSedraArray)throw console.log(this),new TypeError("improper sedra year type calculated.")}function a(e){return-e}function i(e,t){t=o.dayOnOrBefore(6,t+6);var n=(t-e.first_saturday)/7,s=e.theSedraArray[n];return void 0===s?i(new r(e.year+1,e.il),t):"object"==typeof s?{parsha:[s],chag:!0}:s>=0?{parsha:[y[s]],chag:!1}:(s=a(s),{parsha:[y[s],y[s+1]],chag:!1})}var o=e("./common"),s=e("./hdate"),u="concat",h=o.range,c=0,f=1,l=2,y=r.parshiot=[["Bereshit","Bereshis","בראשית"],["Noach",0,"נח"],["Lech-Lecha",0,"לך-לך"],["Vayera",0,"וירא"],["Chayei Sara",0,"חיי שרה"],["Toldot","Toldos","תולדות"],["Vayetzei",0,"ויצא"],["Vayishlach",0,"וישלח"],["Vayeshev",0,"וישב"],["Miketz",0,"מקץ"],["Vayigash",0,"ויגש"],["Vayechi",0,"ויחי"],["Shemot","Shemos","שמות"],["Vaera",0,"וארא"],["Bo",0,"בא"],["Beshalach",0,"בשלח"],["Yitro","Yisro","יתרו"],["Mishpatim",0,"משפטים"],["Terumah",0,"תרומה"],["Tetzaveh",0,"תצוה"],["Ki Tisa","Ki Sisa","כי תשא"],["Vayakhel",0,"ויקהל"],["Pekudei",0,"פקודי"],["Vayikra",0,"ויקרא"],["Tzav",0,"צו"],["Shmini",0,"שמיני"],["Tazria",0,"תזריע"],["Metzora",0,"מצורע"],["Achrei Mot","Achrei Mos","אחרי מות"],["Kedoshim",0,"קדשים"],["Emor",0,"אמור"],["Behar",0,"בהר"],["Bechukotai","Bechukosai","בחקתי"],["Bamidbar",0,"במדבר"],["Nasso",0,"נשא"],["Beha'alotcha","Beha'aloscha","בהעלתך"],["Sh'lach",0,"שלח לך"],["Korach",0,"קורח"],["Chukat","Chukas","חקת"],["Balak",0,"בלק"],["Pinchas",0,"פינחס"],["Matot","Matos","מטות"],["Masei",0,"מסעי"],["Devarim",0,"דברים"],["Vaetchanan","V'es