diff --git a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js index 1416a3f..5dc3646 100644 --- a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js +++ b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js @@ -5,7 +5,7 @@ Elevation: ${this.getElevation().toString()} Meters`).concat(` Timezone ID: ${this.getTimeZone()}`).concat(` Timezone Display Name: ${Ve.getDisplayName(this.getTimeZone())}`).concat(` Timezone GMT Offset: ${(Ve.getRawOffset(this.getTimeZone())/Q.HOUR_NANOS).toString()}`).concat(` -Timezone DST Offset: ${(Ve.getDSTSavings(this.getTimeZone())/Q.HOUR_NANOS).toString()}`)}clone(){return JSON.parse(JSON.stringify(this))}};Q.DISTANCE=0,Q.INITIAL_BEARING=1,Q.FINAL_BEARING=2,Q.MINUTE_NANOS=S.Duration.from({minutes:1}).total("nanoseconds"),Q.HOUR_NANOS=S.Duration.from({hours:1}).total("nanoseconds");var Oa=Q;var wo=class wo{constructor(){this.refraction=34/60;this.solarRadius=16/60;this.earthRadius=6356.9}getEarthRadius(){return this.earthRadius}setEarthRadius(e){this.earthRadius=e}static getDefault(){throw new Le("This method is deprecated, due to the fact that it depends on a circular dependency. Use `new NOAACalculator()` instead.")}getElevationAdjustment(e){return y.radiansToDegrees(Math.acos(this.earthRadius/(this.earthRadius+e/1e3)))}adjustZenith(e,a){let n=e;return e===wo.GEOMETRIC_ZENITH&&(n=e+(this.getSolarRadius()+this.getRefraction()+this.getElevationAdjustment(a))),n}getRefraction(){return this.refraction}setRefraction(e){this.refraction=e}getSolarRadius(){return this.solarRadius}setSolarRadius(e){this.solarRadius=e}clone(){return JSON.parse(JSON.stringify(this))}equals(e){return this===e}};wo.GEOMETRIC_ZENITH=90;var Na=wo;var O=class O extends Na{getCalculatorName(){return"US National Oceanic and Atmospheric Administration Algorithm"}getUTCSunrise(e,a,n,o){let r=o?a.getElevation():0,i=this.adjustZenith(n,r),s=O.getSunRiseSetUTC(O.getJulianDay(e),a.getLatitude(),-a.getLongitude(),i,0);return s=s/60,s>0?s%24:s%24+24}getUTCSunset(e,a,n,o){let r=o?a.getElevation():0,i=this.adjustZenith(n,r),s=O.getSunRiseSetUTC(O.getJulianDay(e),a.getLatitude(),-a.getLongitude(),i,1);return s=s/60,s>0?s%24:s%24+24}static getJulianDay(e){let{year:a,month:n}=e,{day:o}=e;n<=2&&(a-=1,n+=12);let r=Math.trunc(a/100),i=Math.trunc(2-r+r/4);return Math.floor(365.25*(a+4716))+Math.floor(30.6001*(n+1))+o+i-1524.5}static getJulianCenturiesFromJulianDay(e){return(e-O.JULIAN_DAY_JAN_1_2000)/O.JULIAN_DAYS_PER_CENTURY}static getJulianDayFromJulianCenturies(e){return e*O.JULIAN_DAYS_PER_CENTURY+O.JULIAN_DAY_JAN_1_2000}static getSunGeometricMeanLongitude(e){let a=280.46646+e*(36000.76983+3032e-7*e);return a>0?a%360:a%360+360}static getSunGeometricMeanAnomaly(e){return 357.52911+e*(35999.05029-1537e-7*e)}static getEarthOrbitEccentricity(e){return .016708634-e*(42037e-9+1267e-10*e)}static getSunEquationOfCenter(e){let a=O.getSunGeometricMeanAnomaly(e),n=y.degreesToRadians(a),o=Math.sin(n),r=Math.sin(n+n),i=Math.sin(n+n+n);return o*(1.914602-e*(.004817+14e-6*e))+r*(.019993-101e-6*e)+i*289e-6}static getSunTrueLongitude(e){let a=O.getSunGeometricMeanLongitude(e),n=O.getSunEquationOfCenter(e);return a+n}static getSunApparentLongitude(e){let a=O.getSunTrueLongitude(e),n=125.04-1934.136*e;return a-.00569-.00478*Math.sin(y.degreesToRadians(n))}static getMeanObliquityOfEcliptic(e){return 23+(26+(21.448-e*(46.815+e*(59e-5-e*.001813)))/60)/60}static getObliquityCorrection(e){let a=O.getMeanObliquityOfEcliptic(e),n=125.04-1934.136*e;return a+.00256*Math.cos(y.degreesToRadians(n))}static getSunDeclination(e){let a=O.getObliquityCorrection(e),n=O.getSunApparentLongitude(e),o=Math.sin(y.degreesToRadians(a))*Math.sin(y.degreesToRadians(n));return y.radiansToDegrees(Math.asin(o))}static getEquationOfTime(e){let a=O.getObliquityCorrection(e),n=O.getSunGeometricMeanLongitude(e),o=O.getEarthOrbitEccentricity(e),r=O.getSunGeometricMeanAnomaly(e),i=Math.tan(y.degreesToRadians(a)/2);i*=i;let s=Math.sin(2*y.degreesToRadians(n)),u=Math.sin(y.degreesToRadians(r)),h=Math.cos(2*y.degreesToRadians(n)),c=Math.sin(4*y.degreesToRadians(n)),d=Math.sin(2*y.degreesToRadians(r)),l=i*s-2*o*u+4*o*i*u*h-.5*i*i*c-1.25*o*o*d;return y.radiansToDegrees(l)*4}static getSunHourAngle(e,a,n,o){let r=y.degreesToRadians(e),i=y.degreesToRadians(a),s=Math.acos(Math.cos(y.degreesToRadians(n))/(Math.cos(r)*Math.cos(i))-Math.tan(r)*Math.tan(i));return o==1&&(s=-s),s}getUTCNoon(e,a){let n=O.getJulianDay(e),o=O.getJulianCenturiesFromJulianDay(n),r=O.getSolarNoonUTC(o,-a.getLongitude());return r=r/60,r>0?r%24:r%24+24}static getSolarNoonUTC(e,a){let n=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(e)+a/360),o=O.getEquationOfTime(n),r=720+a*4-o,i=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(e)-.5+r/1440);return o=O.getEquationOfTime(i),720+a*4-o}static getSunRiseSetUTC(e,a,n,o,r){let i=O.getJulianCenturiesFromJulianDay(e),s=O.getSolarNoonUTC(i,n),u=O.getJulianCenturiesFromJulianDay(e+s/1440),h=O.getEquationOfTime(u),c=O.getSunDeclination(u),d=O.getSunHourAngle(a,c,o,r),l=n-y.radiansToDegrees(d),f=4*l,A=720+f-h,M=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(i)+A/1440);return h=O.getEquationOfTime(M),c=O.getSunDeclination(M),d=O.getSunHourAngle(a,c,o,r),l=n-y.radiansToDegrees(d),f=4*l,A=720+f-h,A}};O.JULIAN_DAY_JAN_1_2000=2451545,O.JULIAN_DAYS_PER_CENTURY=36525;var Yo=O;var _=class _{getSunrise(){let e=this.getUTCSunrise(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,0)}getSeaLevelSunrise(){let e=this.getUTCSeaLevelSunrise(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,0)}getBeginCivilTwilight(){return this.getSunriseOffsetByDegrees(_.CIVIL_ZENITH)}getBeginNauticalTwilight(){return this.getSunriseOffsetByDegrees(_.NAUTICAL_ZENITH)}getBeginAstronomicalTwilight(){return this.getSunriseOffsetByDegrees(_.ASTRONOMICAL_ZENITH)}getSunset(){let e=this.getUTCSunset(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,1)}getSeaLevelSunset(){let e=this.getUTCSeaLevelSunset(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,1)}getEndCivilTwilight(){return this.getSunsetOffsetByDegrees(_.CIVIL_ZENITH)}getEndNauticalTwilight(){return this.getSunsetOffsetByDegrees(_.NAUTICAL_ZENITH)}getEndAstronomicalTwilight(){return this.getSunsetOffsetByDegrees(_.ASTRONOMICAL_ZENITH)}getSunriseOffsetByDegrees(e){let a=this.getUTCSunrise(e);return Number.isNaN(a)?null:this.getDateFromTime(a,0)}getSunsetOffsetByDegrees(e){let a=this.getUTCSunset(e);return Number.isNaN(a)?null:this.getDateFromTime(a,1)}constructor(e){this.setDate(S.Now.plainDateISO()),this.setGeoLocation(e),this.setAstronomicalCalculator(new Yo)}getUTCSunrise(e){return this.getAstronomicalCalculator().getUTCSunrise(this.getAdjustedDate(),this.getGeoLocation(),e,!0)}getUTCSeaLevelSunrise(e){return this.getAstronomicalCalculator().getUTCSunrise(this.getAdjustedDate(),this.getGeoLocation(),e,!1)}getUTCSunset(e){return this.getAstronomicalCalculator().getUTCSunset(this.getAdjustedDate(),this.getGeoLocation(),e,!0)}getUTCSeaLevelSunset(e){return this.getAstronomicalCalculator().getUTCSunset(this.getAdjustedDate(),this.getGeoLocation(),e,!1)}getTemporalHour(e=this.getSeaLevelSunrise(),a=this.getSeaLevelSunset()){if(e===null||a===null)return;let n=e.until(a).total({unit:"nanoseconds"})/12;return S.Duration.from({nanoseconds:Math.trunc(n)})}getSolarMidnight(){var a;let e=this.clone();return e.setDate(this.getDate().add({days:1})),this.getSunTransit().add({nanoseconds:Math.trunc(((a=this.getSunTransit())==null?void 0:a.until(e.getSunTransit()).total({unit:"nanoseconds"}))/2)})}getSunTransit(e,a){if(e){if(!a)throw new Z("No argument for the end of day provided");let o=this.getTemporalHour(e,a),r=e;for(let i=0;i<6;i++)r=r.add(o);return r}let n=this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(),this.getGeoLocation());return this.getDateFromTime(n,2)}getSunLowerTransit(){let e=this.getAdjustedDate(),a=this.getGeoLocation().clone(),o=a.getLongitude()+180;o>180&&(o=o-360,e=e.subtract({days:1})),a.setLongitude(o);let r=this.getAstronomicalCalculator().getUTCNoon(e,a);return this.getDateFromTime(r,3)}getDateFromTime(e,a){if(Number.isNaN(e))return null;let n=e,r=this.getAdjustedDate().toZonedDateTime("UTC"),i=Math.trunc(n);n-=i;let s=Math.trunc(n*=60);n-=s;let u=Math.trunc(n*=60);n-=u;let h=Math.trunc(n*=1e3);n-=h;let c=Math.trunc(n*=1e3);n-=c;let d=Math.trunc(this.getGeoLocation().getLongitude()/15);return a==0&&d+i>18?r=r.subtract({days:1}):a==1&&d+i<6?r=r.add({days:1}):a==3&&d+i>12&&(r=r.subtract({days:1})),r.with({hour:i,minute:s,second:u,millisecond:h,microsecond:c,nanosecond:Math.trunc(n*1e3)}).withTimeZone(this.geoLocation.getTimeZone())}getSunriseSolarDipFromOffset(e){var i;if(Number.isNaN(e))return null;let a=this.getSeaLevelSunrise(),n=(i=this.getSeaLevelSunrise())==null?void 0:i.subtract({minutes:e}),o=new Ca(0),r=new Ca("0.0001");for(;a===null||e<0&&a0&&a>n;)e>0?o=o.add(r):o=o.sub(r),a=this.getSunriseOffsetByDegrees(_.GEOMETRIC_ZENITH+o.toNumber());return o.toNumber()}getSunsetSolarDipFromOffset(e){var i;if(Number.isNaN(e))return null;let a=this.getSeaLevelSunset(),n=(i=this.getSeaLevelSunset())==null?void 0:i.add({minutes:e}),o=new Ca(0),r=new Ca("0.001");for(;a==null||e>0&&an;)e>0?o=o.add(r):o=o.sub(r),a=this.getSunsetOffsetByDegrees(_.GEOMETRIC_ZENITH+o.toNumber());return o.toNumber()}getLocalMeanTime(e){var o;if(e<0||e>=24)throw new Z("Hours must between 0 and 23.9999...");let a=this.getGeoLocation(),n=Ve.getRawOffset(a.getTimeZone())/_.HOUR_NANOS;return(o=this.getDateFromTime(e-n,0))==null?void 0:o.subtract({nanoseconds:a.getLocalMeanTimeOffset()})}getAdjustedDate(){let e=this.getGeoLocation().getAntimeridianAdjustment();return e===0?this.getDate():this.getDate().add({days:e})}toString(){throw new Le("This method is unsupported, due to the fact that it depends on a circular dependency.")}toJSON(){throw new Le("This method is unsupported, due to the fact that it depends on a circular dependency. Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.")}equals(e){if(this===e)return!0;if(!(e instanceof _))return!1;let a=e;return this.getDate().equals(a.getDate())&&this.getGeoLocation().equals(a.getGeoLocation())&&this.getAstronomicalCalculator()===a.getAstronomicalCalculator()}getGeoLocation(){return this.geoLocation}setGeoLocation(e){this.geoLocation=e}getAstronomicalCalculator(){return this.astronomicalCalculator}setAstronomicalCalculator(e){this.astronomicalCalculator=e}getDate(){return this.date}setDate(e){e instanceof S.PlainDate?this.date=e:e instanceof Date?this.date=S.Instant.fromEpochMilliseconds(e.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate():typeof e=="string"&&(this.date=S.PlainDate.from(e))}clone(){let e=new _(this.geoLocation);return e.setDate(this.date),e.setAstronomicalCalculator(this.astronomicalCalculator),e}getClassName(){return"com.kosherjava.zmanim.AstronomicalCalendar"}};_.GEOMETRIC_ZENITH=90,_.CIVIL_ZENITH=96,_.NAUTICAL_ZENITH=102,_.ASTRONOMICAL_ZENITH=108,_.HOUR_NANOS=S.Duration.from({hours:1}).total("nanosecond");var Za=_;var E=class E{getMoladHours(){return this.moladHours}setMoladHours(e){this.moladHours=e}getMoladMinutes(){return this.moladMinutes}setMoladMinutes(e){this.moladMinutes=e}setMoladChalakim(e){this.moladChalakim=e}getMoladChalakim(){return this.moladChalakim}getLastDayOfGregorianMonth(e){return this.date.with({month:e}).daysInMonth}static getLastDayOfGregorianMonth(e,a){switch(e){case 2:return a%4===0&&a%100!==0||a%400===0?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}}absDateToDate(e){let a=Math.trunc(e/366);for(;e>=E.gregorianDateToAbsDate(a+1,1,1);)a++;let n=1;for(;e>E.gregorianDateToAbsDate(a,n,E.getLastDayOfGregorianMonth(n,a));)n++;let o=e-E.gregorianDateToAbsDate(a,n,1)+1;this.setInternalGregorianDate(a,n,o)}static gregorianDateToAbsDate(e,a,n){let o=n;for(let r=a-1;r>0;r--)o+=E.getLastDayOfGregorianMonth(r,e);return o+365*(e-1)+Math.trunc((e-1)/4)-Math.trunc((e-1)/100)+Math.trunc((e-1)/400)}static isJewishLeapYear(e){return(7*e+1)%19<7}isJewishLeapYear(){return E.isJewishLeapYear(this.getJewishYear())}static getLastMonthOfJewishYear(e){return E.isJewishLeapYear(e)?E.ADAR_II:E.ADAR}static getJewishCalendarElapsedDays(e){let a=E.getChalakimSinceMoladTohu(e,E.TISHREI),n=Math.trunc(a/E.CHALAKIM_PER_DAY),o=Math.trunc(a-n*E.CHALAKIM_PER_DAY);return E.addDechiyos(e,n,o)}static addDechiyos(e,a,n){let o=a;return(n>=19440||a%7===2&&n>=9924&&!E.isJewishLeapYear(e)||a%7===1&&n>=16789&&E.isJewishLeapYear(e-1))&&(o+=1),(o%7===0||o%7===3||o%7===5)&&o++,o}static getChalakimSinceMoladTohu(e,a){let n=E.getJewishMonthOfYear(e,a),o=235*Math.trunc((e-1)/19)+12*((e-1)%19)+Math.trunc((7*((e-1)%19)+1)/19)+(n-1);return E.CHALAKIM_MOLAD_TOHU+E.CHALAKIM_PER_MONTH*o}getChalakimSinceMoladTohu(){let e=this.date.withCalendar("hebrew");return E.getChalakimSinceMoladTohu(e.year,this.getJewishMonth())}static getJewishMonthOfYear(e,a){return new E(e,a,1).date.withCalendar("hebrew").month}static validateJewishDate(e,a,n,o,r,i){if(aE.getLastMonthOfJewishYear(e))throw new Z(`The Jewish month has to be between 1 and 12 (or 13 on a leap year). ${a} is invalid for the year ${e}.`);if(n<1||n>30)throw new Z(`The Jewish day of month can't be < 1 or > 30. ${n} is invalid.`);if(e<3761||e===3761&&a>=E.TISHREI&&a23)throw new Z(`Hours < 0 or > 23 can't be set. ${o} is invalid.`);if(r<0||r>59)throw new Z(`Minutes < 0 or > 59 can't be set. ${r} is invalid.`);if(i<0||i>17)throw new Z(`Chalakim/parts < 0 or > 17 can't be set. ${i} is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)`)}static validateGregorianDate(e,a,n){E.validateGregorianMonth(a),E.validateGregorianDayOfMonth(n),E.validateGregorianYear(e)}static validateGregorianMonth(e){if(e>11||e<0)throw new Z(`The Gregorian month has to be between 0 - 11. ${e} is invalid.`)}static validateGregorianDayOfMonth(e){if(e<=0)throw new Z(`The day of month can't be less than 1. ${e} is invalid.`)}static validateGregorianYear(e){if(e<1)throw new Z(`Years < 1 can't be calculated. ${e} is invalid.`)}static getDaysInJewishYear(e){return S.PlainYearMonth.from({year:e,month:1,calendar:"hebrew"}).daysInYear}getDaysInJewishYear(){return E.getDaysInJewishYear(this.getJewishYear())}static isCheshvanLong(e){return E.getDaysInJewishYear(e)%10===5}isCheshvanLong(){return E.isCheshvanLong(this.getJewishYear())}static isKislevShort(e){return E.getDaysInJewishYear(e)%10===3}isKislevShort(){return E.isKislevShort(this.getJewishYear())}getCheshvanKislevKviah(){return this.isCheshvanLong()&&!this.isKislevShort()?E.SHELAIMIM:!this.isCheshvanLong()&&this.isKislevShort()?E.CHASERIM:E.KESIDRAN}static getDaysInJewishMonth(e,a){let n=e-6;return n<1&&(n+=S.PlainDate.from({year:a,month:e,day:1,calendar:"hebrew"}).monthsInYear),S.PlainDate.from({year:a,month:n,day:15,calendar:"hebrew"}).daysInMonth}getDaysInJewishMonth(){return this.getDate().withCalendar("hebrew").daysInMonth}getMolad(){let e=new E(this.getChalakimSinceMoladTohu());return e.getMoladHours()>=6&&e.setDate(e.getDate().add({days:1})),e.setMoladHours((e.getMoladHours()+18)%24),e}static moladToAbsDate(e){return Math.trunc(e/E.CHALAKIM_PER_DAY)+E.JEWISH_EPOCH}setMoladTime(e){let a=e;this.setMoladHours(Math.trunc(a/E.CHALAKIM_PER_HOUR)),a=a-this.getMoladHours()*E.CHALAKIM_PER_HOUR,this.setMoladMinutes(Math.trunc(a/E.CHALAKIM_PER_MINUTE)),this.setMoladChalakim(a-this.moladMinutes*E.CHALAKIM_PER_MINUTE)}getDaysSinceStartOfJewishYear(){return this.date.withCalendar("hebrew").with({month:1,day:1}).subtract({days:1}).until(this.date.withCalendar("hebrew")).total("days")}constructor(e,a,n){if(this.date=S.Now.plainDateISO(),a)this.setJewishDate(e,a,n);else if(e instanceof Date)this.setDate(S.Instant.fromEpochMilliseconds(e.valueOf()).toZonedDateTimeISO("UTC").toPlainDate());else if(e instanceof S.PlainDate)this.setDate(e);else if(typeof e=="number"){let o=e;this.absDateToDate(E.moladToAbsDate(o));let r=Math.trunc(o/E.CHALAKIM_PER_DAY),i=Math.trunc(o-r*E.CHALAKIM_PER_DAY);this.setMoladTime(i)}}setDate(e){if(e.year<1)throw new Z(`Dates with a BC era are not supported. The year ${e.year} is invalid.`);this.date=e}setGregorianDate(e,a,n){E.validateGregorianDate(e,a,n),this.setInternalGregorianDate(e,a+1,n)}setInternalGregorianDate(e,a,n){n>E.getLastDayOfGregorianMonth(a,e)&&(n=E.getLastDayOfGregorianMonth(a,e)),this.date=new S.PlainDate(e,a,n)}setJewishDate(e,a,n,o=0,r=0,i=0){E.validateJewishDate(e,a,n,o,r,i),n>E.getDaysInJewishMonth(a,e)&&(n=E.getDaysInJewishMonth(a,e));let s=a-6;s<1&&(s+=S.PlainDate.from({year:e,month:a,day:n,calendar:"hebrew"}).monthsInYear),this.date=S.PlainDate.from({year:e,month:s,day:n,calendar:"hebrew"}).withCalendar("iso8601")}getDate(){return this.date}resetDate(){this.setDate(S.Now.plainDateISO())}toString(){let e=["Nissan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Teves","Shevat","Adar","Adar II","Adar I"],a;return this.isJewishLeapYear()&&this.getJewishMonth()===E.ADAR?a=e[13]:a=e[this.getJewishMonth()-1],`${this.getJewishDayOfMonth()} ${a}, ${this.getJewishYear()}`}forward(e,a){if(![H.DATE,H.MONTH,H.YEAR].includes(e))throw new Z("Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.");if(a<1)throw new Z("JewishDate.forward() does not support amounts less than 1. See JewishDate.back()");e===H.DATE?this.date=this.date.add({days:a}):e===H.MONTH?this.date=this.date.add({months:a}):e===H.YEAR&&(this.date=this.date.add({years:a}))}back(){this.date=this.date.subtract({days:1})}equals(e){return e instanceof E&&S.PlainDate.compare(this.date,e.getDate())==0}compareTo(e){return S.PlainDate.compare(this.date,e.getDate())}getGregorianMonth(){return this.date.withCalendar("iso8601").month-1}getGregorianDayOfMonth(){return this.date.withCalendar("iso8601").day}getGregorianYear(){return this.date.withCalendar("iso8601").year}getJewishMonth(){let e=this.date.withCalendar("hebrew"),a=6;return e.monthsInYear==13&&++a,e.month<=a?e.month+6:e.month-a}getJewishDayOfMonth(){return this.date.withCalendar("hebrew").day}getJewishYear(){return this.date.withCalendar("hebrew").year}getDayOfWeek(){let e=this.date.dayOfWeek+1;return e==8&&(e=1),e}setGregorianMonth(e){E.validateGregorianMonth(e),this.date=this.date.withCalendar("iso8601").with({month:e+1})}setGregorianYear(e){E.validateGregorianYear(e),this.date=this.date.withCalendar("iso8601").with({year:e})}setGregorianDayOfMonth(e){E.validateGregorianDayOfMonth(e),this.date=this.date.withCalendar("iso8601").with({day:e})}setJewishMonth(e){let a=this.date.withCalendar("hebrew");this.setJewishDate(a.year,e,a.day)}setJewishYear(e){let a=this.date.withCalendar("hebrew");this.setJewishDate(e,this.getJewishMonth(),a.day),this.date=this.date.withCalendar("hebrew").with({year:e}).withCalendar("iso8601")}setJewishDayOfMonth(e){this.date=this.date.withCalendar("hebrew").with({day:e}).withCalendar("iso8601")}clone(){let e=new E(this.date);return e.setMoladHours(this.moladHours),e.setMoladMinutes(this.moladMinutes),e.setMoladChalakim(this.moladChalakim),e}};E.NISSAN=1,E.IYAR=2,E.SIVAN=3,E.TAMMUZ=4,E.AV=5,E.ELUL=6,E.TISHREI=7,E.CHESHVAN=8,E.KISLEV=9,E.TEVES=10,E.SHEVAT=11,E.ADAR=12,E.ADAR_II=13,E.JEWISH_EPOCH=-1373429,E.CHALAKIM_PER_MINUTE=18,E.CHALAKIM_PER_HOUR=1080,E.CHALAKIM_PER_DAY=25920,E.CHALAKIM_PER_MONTH=765433,E.CHALAKIM_MOLAD_TOHU=31524,E.CHASERIM=0,E.KESIDRAN=1,E.SHELAIMIM=2;var P=E;function mn(t,e,a,n=!0){let o=[1];return n&&o.push(0),o.includes(S.PlainDate.compare(e,t))&&o.includes(S.PlainDate.compare(a,e))}var Ra=class{getMasechtaNumber(){return this.masechtaNumber}setMasechtaNumber(e){this.masechtaNumber=e}constructor(e,a){this.masechtaNumber=e,this.daf=a}getDaf(){return this.daf}setDaf(e){this.daf=e}};var re=class re{static getDafYomiBavli(e){let a=[64,157,105,121,22,88,56,40,35,31,32,29,27,122,112,91,66,49,90,82,119,119,176,113,24,49,76,14,120,110,142,61,34,34,28,22,4,9,5,73],n=e.getDate(),o,r=this.getJulianDay(n),i=0,s=0;if(S.PlainDate.compare(n,re.dafYomiStartDate)==-1)throw new Z(`${e} is prior to organized Daf Yomi Bavli cycles that started on ${re.dafYomiStartDate}`);S.PlainDate.compare(n,re.shekalimChangeDate)==1?(i=8+(r-re.shekalimJulianChangeDay)/2711,s=(r-re.shekalimJulianChangeDay)%2711):(i=1+(r-re.dafYomiJulianStartDay)/2702,s=(r-re.dafYomiJulianStartDay)%2702);let u=0,h=-1,c=0;i<=7?a[4]=13:a[4]=22;for(let d of a)if(h++,u=u+d-1,sr.days.find(i=>a.equals(a.withCalendar("hebrew").with(i))))}};var{FRIDAY:y0,SATURDAY:gn}=H,Ts=(g=>(g[g.NONE=0]="NONE",g[g.BERESHIS=1]="BERESHIS",g[g.NOACH=2]="NOACH",g[g.LECH_LECHA=3]="LECH_LECHA",g[g.VAYERA=4]="VAYERA",g[g.CHAYEI_SARA=5]="CHAYEI_SARA",g[g.TOLDOS=6]="TOLDOS",g[g.VAYETZEI=7]="VAYETZEI",g[g.VAYISHLACH=8]="VAYISHLACH",g[g.VAYESHEV=9]="VAYESHEV",g[g.MIKETZ=10]="MIKETZ",g[g.VAYIGASH=11]="VAYIGASH",g[g.VAYECHI=12]="VAYECHI",g[g.SHEMOS=13]="SHEMOS",g[g.VAERA=14]="VAERA",g[g.BO=15]="BO",g[g.BESHALACH=16]="BESHALACH",g[g.YISRO=17]="YISRO",g[g.MISHPATIM=18]="MISHPATIM",g[g.TERUMAH=19]="TERUMAH",g[g.TETZAVEH=20]="TETZAVEH",g[g.KI_SISA=21]="KI_SISA",g[g.VAYAKHEL=22]="VAYAKHEL",g[g.PEKUDEI=23]="PEKUDEI",g[g.VAYIKRA=24]="VAYIKRA",g[g.TZAV=25]="TZAV",g[g.SHMINI=26]="SHMINI",g[g.TAZRIA=27]="TAZRIA",g[g.METZORA=28]="METZORA",g[g.ACHREI_MOS=29]="ACHREI_MOS",g[g.KEDOSHIM=30]="KEDOSHIM",g[g.EMOR=31]="EMOR",g[g.BEHAR=32]="BEHAR",g[g.BECHUKOSAI=33]="BECHUKOSAI",g[g.BAMIDBAR=34]="BAMIDBAR",g[g.NASSO=35]="NASSO",g[g.BEHAALOSCHA=36]="BEHAALOSCHA",g[g.SHLACH=37]="SHLACH",g[g.KORACH=38]="KORACH",g[g.CHUKAS=39]="CHUKAS",g[g.BALAK=40]="BALAK",g[g.PINCHAS=41]="PINCHAS",g[g.MATOS=42]="MATOS",g[g.MASEI=43]="MASEI",g[g.DEVARIM=44]="DEVARIM",g[g.VAESCHANAN=45]="VAESCHANAN",g[g.EIKEV=46]="EIKEV",g[g.REEH=47]="REEH",g[g.SHOFTIM=48]="SHOFTIM",g[g.KI_SEITZEI=49]="KI_SEITZEI",g[g.KI_SAVO=50]="KI_SAVO",g[g.NITZAVIM=51]="NITZAVIM",g[g.VAYEILECH=52]="VAYEILECH",g[g.HAAZINU=53]="HAAZINU",g[g.VZOS_HABERACHA=54]="VZOS_HABERACHA",g[g.VAYAKHEL_PEKUDEI=55]="VAYAKHEL_PEKUDEI",g[g.TAZRIA_METZORA=56]="TAZRIA_METZORA",g[g.ACHREI_MOS_KEDOSHIM=57]="ACHREI_MOS_KEDOSHIM",g[g.BEHAR_BECHUKOSAI=58]="BEHAR_BECHUKOSAI",g[g.CHUKAS_BALAK=59]="CHUKAS_BALAK",g[g.MATOS_MASEI=60]="MATOS_MASEI",g[g.NITZAVIM_VAYEILECH=61]="NITZAVIM_VAYEILECH",g[g.SHKALIM=62]="SHKALIM",g[g.ZACHOR=63]="ZACHOR",g[g.PARA=64]="PARA",g[g.HACHODESH=65]="HACHODESH",g[g.SHUVA=66]="SHUVA",g[g.SHIRA=67]="SHIRA",g[g.HAGADOL=68]="HAGADOL",g[g.CHAZON=69]="CHAZON",g[g.NACHAMU=70]="NACHAMU",g))(Ts||{}),m=class m extends P{constructor(a,n,o,r){super(a,n,o);this.inIsrael=!1;this.isMukafChoma=!1;this.useModernHolidays=!1;r&&this.setInIsrael(r)}isUseModernHolidays(){return this.useModernHolidays}setUseModernHolidays(a){this.useModernHolidays=a}setInIsrael(a){this.inIsrael=a}getInIsrael(){return this.inIsrael}getIsMukafChoma(){return this.isMukafChoma}setIsMukafChoma(a){this.isMukafChoma=a}isBirkasHachamah(){let a=m.getJewishCalendarElapsedDays(this.getJewishYear());return a+=Math.trunc(this.getDaysSinceStartOfJewishYear()),a%(28*365.25)===172}getParshaYearType(){let a=this.getDate().withCalendar("hebrew").with({day:1,month:1});if(a.monthsInYear==13)switch(a.dayOfWeek){case 1:if(this.isKislevShort())return this.getInIsrael()?14:6;if(this.isCheshvanLong())return this.getInIsrael()?15:7;break;case 2:return this.getInIsrael()?15:7;case 4:if(this.isKislevShort())return 8;if(this.isCheshvanLong())return 9;break;case 6:if(this.isKislevShort())return 10;if(this.isCheshvanLong())return this.getInIsrael()?16:11;break}else switch(a.dayOfWeek){case 1:if(this.isKislevShort())return 0;if(this.isCheshvanLong())return this.getInIsrael()?12:1;break;case 2:return this.getInIsrael()?12:1;case 4:if(this.isCheshvanLong())return 3;if(!this.isKislevShort())return this.getInIsrael()?13:2;break;case 6:if(this.isKislevShort())return 4;if(this.isCheshvanLong())return 5;break}return-1}getParshah(){if(this.getDayOfWeek()!==gn)return 0;let a=this.getParshaYearType(),o=m.getJewishCalendarElapsedDays(this.getJewishYear())%7+Math.trunc(this.getDaysSinceStartOfJewishYear());return a>=0?m.parshalist[a][o/7]:0}getSpecialShabbos(){if(this.getDayOfWeek()!==gn)return 0;if((this.getJewishMonth()===m.SHEVAT&&!this.isJewishLeapYear()||this.getJewishMonth()===m.ADAR&&this.isJewishLeapYear())&&[25,27,29].includes(this.getJewishDayOfMonth()))return 62;if(this.getJewishMonth()===m.ADAR&&!this.isJewishLeapYear()||this.getJewishMonth()===m.ADAR_II){if(this.getJewishDayOfMonth()===1)return 62;if([8,9,11,13].includes(this.getJewishDayOfMonth()))return 63;if([18,20,22,23].includes(this.getJewishDayOfMonth()))return 64;if([25,27,29].includes(this.getJewishDayOfMonth()))return 65}if(this.getJewishMonth()===m.NISSAN){if(this.getJewishDayOfMonth()==1)return 65;if(this.getJewishDayOfMonth()>=8&&this.getJewishDayOfMonth()<=14)return 68}if(this.getJewishMonth()==m.AV){if(this.getJewishDayOfMonth()>=4&&this.getJewishDayOfMonth()<=9)return 69;if(this.getJewishDayOfMonth()>=10&&this.getJewishDayOfMonth()<=16)return 70}return this.getJewishMonth()==m.TISHREI&&this.getJewishDayOfMonth()>=3&&this.getJewishDayOfMonth()<=8?66:this.getParshah()==16?67:0}getUpcomingParshah(){let a=this.clone(),n=(H.SATURDAY-this.getDayOfWeek()+7)%7;for(this.getDayOfWeek()!=H.SATURDAY?a.forward(H.DATE,n):a.forward(H.DATE,7);a.getParshah()==0;)a.forward(H.DATE,7);return a.getParshah()}getYomTovIndex(){let a=this.getJewishDayOfMonth(),n=this.getDayOfWeek();switch(this.getJewishMonth()){case m.NISSAN:if(a===14)return m.EREV_PESACH;if(a===15||a===21||!this.inIsrael&&(a===16||a===22))return m.PESACH;if(a>=17&&a<=20||a===16&&this.inIsrael)return m.CHOL_HAMOED_PESACH;if(this.isUseModernHolidays()&&(a===26&&n===5||a===28&&n===2||a===27&&n!==1&&n!==6))return m.YOM_HASHOAH;break;case m.IYAR:if(this.isUseModernHolidays()&&(a===4&&n===3||(a===3||a===2)&&n===4||a===5&&n===2))return m.YOM_HAZIKARON;if(this.isUseModernHolidays()&&(a===5&&n===4||(a===4||a===3)&&n===5||a===6&&n===3))return m.YOM_HAATZMAUT;if(a===14)return m.PESACH_SHENI;if(a===18)return m.LAG_BAOMER;if(this.isUseModernHolidays()&&a===28)return m.YOM_YERUSHALAYIM;break;case m.SIVAN:if(a===5)return m.EREV_SHAVUOS;if(a===6||a===7&&!this.inIsrael)return m.SHAVUOS;break;case m.TAMMUZ:if(a===17&&n!==7||a===18&&n===1)return m.SEVENTEEN_OF_TAMMUZ;break;case m.AV:if(n===1&&a===10||n!==7&&a===9)return m.TISHA_BEAV;if(a===15)return m.TU_BEAV;break;case m.ELUL:if(a===29)return m.EREV_ROSH_HASHANA;break;case m.TISHREI:if(a===1||a===2)return m.ROSH_HASHANA;if(a===3&&n!==7||a===4&&n===1)return m.FAST_OF_GEDALYAH;if(a===9)return m.EREV_YOM_KIPPUR;if(a===10)return m.YOM_KIPPUR;if(a===14)return m.EREV_SUCCOS;if(a===15||a===16&&!this.inIsrael)return m.SUCCOS;if(a>=17&&a<=20||a===16&&this.inIsrael)return m.CHOL_HAMOED_SUCCOS;if(a===21)return m.HOSHANA_RABBA;if(a===22)return m.SHEMINI_ATZERES;if(a===23&&!this.inIsrael)return m.SIMCHAS_TORAH;break;case m.KISLEV:if(a>=25)return m.CHANUKAH;break;case m.TEVES:if(a===1||a===2||a===3&&this.isKislevShort())return m.CHANUKAH;if(a===10)return m.TENTH_OF_TEVES;break;case m.SHEVAT:if(a===15)return m.TU_BESHVAT;break;case m.ADAR:if(this.isJewishLeapYear()){if(a===14)return m.PURIM_KATAN;if(a===15)return m.SHUSHAN_PURIM_KATAN}else{if((a===11||a===12)&&n===5||a===13&&!(n===6||n===7))return m.FAST_OF_ESTHER;if(a===14)return m.PURIM;if(a===15)return m.SHUSHAN_PURIM}break;case m.ADAR_II:if((a===11||a===12)&&n===5||a===13&&!(n===6||n===7))return m.FAST_OF_ESTHER;if(a===14)return m.PURIM;if(a===15)return m.SHUSHAN_PURIM;break}return-1}isYomTov(){let a=this.getYomTovIndex();return this.isErevYomTov()&&(a!==m.HOSHANA_RABBA||a===m.CHOL_HAMOED_PESACH&&this.getJewishDayOfMonth()!==20)||this.isTaanis()&&a!==m.YOM_KIPPUR?!1:this.getYomTovIndex()!==-1}isYomTovAssurBemelacha(){let a=[m.PESACH,m.SHAVUOS,m.SUCCOS,m.SHEMINI_ATZERES,m.SIMCHAS_TORAH,m.ROSH_HASHANA,m.YOM_KIPPUR],n=this.getYomTovIndex();return a.includes(n)}isAssurBemelacha(){return this.getDayOfWeek()===gn||this.isYomTovAssurBemelacha()}hasCandleLighting(){return this.isTomorrowShabbosOrYomTov()}isTomorrowShabbosOrYomTov(){return this.getDayOfWeek()===y0||this.isErevYomTov()||this.isErevYomTovSheni()}isErevYomTovSheni(){return this.getJewishMonth()===m.TISHREI&&this.getJewishDayOfMonth()===1||!this.getInIsrael()&&(this.getJewishMonth()===m.NISSAN&&[15,21].includes(this.getJewishDayOfMonth())||this.getJewishMonth()===m.TISHREI&&[15,22].includes(this.getJewishDayOfMonth())||this.getJewishMonth()===m.SIVAN&&this.getJewishDayOfMonth()===6)}isAseresYemeiTeshuva(){return this.getJewishMonth()===m.TISHREI&&this.getJewishDayOfMonth()<=10}isPesach(){let a=this.getYomTovIndex();return a==m.PESACH||a==m.CHOL_HAMOED_PESACH}isCholHamoedPesach(){return this.getYomTovIndex()===m.CHOL_HAMOED_PESACH}isShavuos(){return this.getYomTovIndex()==m.SHAVUOS}isRoshHashana(){return this.getYomTovIndex()==m.ROSH_HASHANA}isYomKippur(){return this.getYomTovIndex()==m.YOM_KIPPUR}isSuccos(){let a=this.getYomTovIndex();return a==m.SUCCOS||a==m.CHOL_HAMOED_SUCCOS||a==m.HOSHANA_RABBA}isHoshanaRabba(){return this.getYomTovIndex()==m.HOSHANA_RABBA}isShminiAtzeres(){return this.getYomTovIndex()==m.SHEMINI_ATZERES}isSimchasTorah(){return this.getYomTovIndex()==m.SIMCHAS_TORAH}isCholHamoedSuccos(){return this.getYomTovIndex()===m.CHOL_HAMOED_SUCCOS}isCholHamoed(){return this.isCholHamoedPesach()||this.isCholHamoedSuccos()}isErevYomTov(){let a=[m.EREV_PESACH,m.EREV_SHAVUOS,m.EREV_ROSH_HASHANA,m.EREV_YOM_KIPPUR,m.EREV_SUCCOS,m.HOSHANA_RABBA],n=this.getYomTovIndex();return a.includes(n)||n===m.CHOL_HAMOED_PESACH&&this.getJewishDayOfMonth()===20}isErevRoshChodesh(){return this.getJewishDayOfMonth()===29&&this.getJewishMonth()!==m.ELUL}isYomKippurKatan(){let a=this.getDayOfWeek(),n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return n==P.ELUL||n==P.TISHREI||n==P.KISLEV||n==P.NISSAN?!1:o==29&&a!=H.FRIDAY&&a!=H.SATURDAY||(o==27||o==28)&&a==H.THURSDAY}isBeHaB(){let a=this.getDayOfWeek(),n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return(n==P.CHESHVAN||n==P.IYAR)&&(a==H.MONDAY&&o>4&&o<18||a==H.THURSDAY&&o>7&&o<14)}isTaanis(){let a=[m.SEVENTEEN_OF_TAMMUZ,m.TISHA_BEAV,m.YOM_KIPPUR,m.FAST_OF_GEDALYAH,m.TENTH_OF_TEVES,m.FAST_OF_ESTHER],n=this.getYomTovIndex();return a.includes(n)}isTaanisBechoros(){let a=this.getJewishDayOfMonth(),n=this.getDayOfWeek();return this.getJewishMonth()===m.NISSAN&&(a===14&&n!==H.SATURDAY||a===12&&n===H.THURSDAY)}getDayOfChanukah(){let a=this.getJewishDayOfMonth();return this.isChanukah()?this.getJewishMonth()===m.KISLEV?a-24:this.isKislevShort()?a+5:a+6:-1}isChanukah(){return this.getYomTovIndex()===m.CHANUKAH}isPurim(){return this.isMukafChoma?this.getYomTovIndex()==m.SHUSHAN_PURIM:this.getYomTovIndex()==m.PURIM}isRoshChodesh(){return this.getJewishDayOfMonth()===1&&this.getJewishMonth()!==m.TISHREI||this.getJewishDayOfMonth()===30}isMacharChodesh(){return this.getDayOfWeek()===gn&&(this.getJewishDayOfMonth()===30||this.getJewishDayOfMonth()===29)}isShabbosMevorchim(){return this.getDayOfWeek()===gn&&this.getJewishDayOfMonth()>=23&&this.getJewishDayOfMonth()<=29&&this.getJewishMonth()!==m.ELUL}getDayOfOmer(){let a=-1,n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return n===m.NISSAN&&o>=16?a=o-15:n===m.IYAR?a=o+15:n===m.SIVAN&&o<6&&(a=o+44),a}getMoladAsDate(){let a=this.getMolad(),n="Jerusalem, Israel",o=31.778,r=35.2354,i="+02:00",s=new Oa(n,o,r,i),u=a.getMoladChalakim()*10/3,h=Math.trunc(1e3*(u-Math.trunc(u)));return S.ZonedDateTime.from({timeZone:s.getTimeZone(),year:a.getGregorianYear(),month:a.getGregorianMonth()+1,day:a.getGregorianDayOfMonth(),hour:a.getMoladHours(),minute:a.getMoladMinutes(),second:Math.trunc(u),millisecond:h}).subtract({nanoseconds:Math.trunc(s.getLocalMeanTimeOffset())})}getTchilasZmanKidushLevana3Days(){return this.getMoladAsDate().add({hours:72})}getTchilasZmanKidushLevana7Days(){return this.getMoladAsDate().add({hours:168})}getSofZmanKidushLevanaBetweenMoldos(){return this.getMoladAsDate().add({days:14,hours:18,minutes:22,seconds:1,milliseconds:666})}getSofZmanKidushLevana15Days(){return this.getMoladAsDate().add({days:15})}getDafYomiBavli(){return Bo.getDafYomiBavli(this)}getDafYomiYerushalmi(){return Vo.getDafYomiYerushalmi(this)}getChafetzChayimYomi(){return Fo.getChafetzChayimYomi(this)}getTekufasTishreiElapsedDays(){let a=m.getJewishCalendarElapsedDays(this.getJewishYear())+(this.getDaysSinceStartOfJewishYear()-1)+.5,n=(this.getJewishYear()-1)*365.25;return Math.floor(a-n)}isIsruChag(){return this.getYomTovIndex()==m.ISRU_CHAG}equals(a){return S.PlainDate.compare(this.getDate(),a.getDate())===0&&this.getInIsrael()===a.getInIsrael()}};m.EREV_PESACH=0,m.PESACH=1,m.CHOL_HAMOED_PESACH=2,m.PESACH_SHENI=3,m.EREV_SHAVUOS=4,m.SHAVUOS=5,m.SEVENTEEN_OF_TAMMUZ=6,m.TISHA_BEAV=7,m.TU_BEAV=8,m.EREV_ROSH_HASHANA=9,m.ROSH_HASHANA=10,m.FAST_OF_GEDALYAH=11,m.EREV_YOM_KIPPUR=12,m.YOM_KIPPUR=13,m.EREV_SUCCOS=14,m.SUCCOS=15,m.CHOL_HAMOED_SUCCOS=16,m.HOSHANA_RABBA=17,m.SHEMINI_ATZERES=18,m.SIMCHAS_TORAH=19,m.CHANUKAH=21,m.TENTH_OF_TEVES=22,m.TU_BESHVAT=23,m.FAST_OF_ESTHER=24,m.PURIM=25,m.SHUSHAN_PURIM=26,m.PURIM_KATAN=27,m.ROSH_CHODESH=28,m.YOM_HASHOAH=29,m.YOM_HAZIKARON=30,m.YOM_HAATZMAUT=31,m.YOM_YERUSHALAYIM=32,m.LAG_BAOMER=33,m.SHUSHAN_PURIM_KATAN=34,m.ISRU_CHAG=35,m.YOM_KIPPUR_KATAN=36,m.BEHAB=37,m.parshalist=[[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,61],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61]];var R=m;var rt=class rt extends Za{constructor(){super(...arguments);this.useElevation=!1;this.useAstronomicalChatzos=!0;this.useAstronomicalChatzosForOtherZmanim=!1;this.candleLightingOffset=18}isUseElevation(){return this.useElevation}setUseElevation(a){this.useElevation=a}isUseAstronomicalChatzos(){return this.useAstronomicalChatzos}setUseAstronomicalChatzos(a){this.useAstronomicalChatzos=a}isUseAstronomicalChatzosForOtherZmanim(){return this.useAstronomicalChatzosForOtherZmanim}setUseAstronomicalChatzosForOtherZmanim(a){this.useAstronomicalChatzosForOtherZmanim=a}getElevationAdjustedSunrise(){return this.isUseElevation()?super.getSunrise():this.getSeaLevelSunrise()}getElevationAdjustedSunset(){return this.isUseElevation()?super.getSunset():this.getSeaLevelSunset()}getTzais(){return this.getSunsetOffsetByDegrees(rt.ZENITH_8_POINT_5)}getAlosHashachar(){return this.getSunriseOffsetByDegrees(rt.ZENITH_16_POINT_1)}getAlos72(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:72})}getChatzos(){if(this.useAstronomicalChatzos)return this.getSunTransit();{let a=this.getChatzosAsHalfDay();return a??this.getSunTransit()}}getChatzosAsHalfDay(){return this.getSunTransit(this.getSeaLevelSunrise(),this.getSeaLevelSunset())}getSofZmanShma(a,n){return this.getShaahZmanisBasedZman(a,n,3)}getSofZmanShmaGRA(){return this.getSofZmanShma(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSofZmanShmaMGA(){return this.getSofZmanShma(this.getAlos72(),this.getTzais72())}getTzais72(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:72})}getCandleLighting(){var a;return(a=this.getSeaLevelSunset())==null?void 0:a.subtract({minutes:this.getCandleLightingOffset()})}getSofZmanTfila(a,n){return this.getShaahZmanisBasedZman(a,n,4)}getSofZmanTfilaGRA(){return this.getSofZmanTfila(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSofZmanTfilaMGA(){return this.getSofZmanTfila(this.getAlos72(),this.getTzais72())}getMinchaGedola(a,n){if(!a&&!n)return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),this.getSunset(),.5):this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset(),6.5);if(a&&n)return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),n,.5):this.getShaahZmanisBasedZman(a,n,6.5);throw new Z("Need valid parameters")}getSamuchLeMinchaKetana(a,n){return this.getShaahZmanisBasedZman(a,n,9)}getMinchaKetana(a=this.getElevationAdjustedSunrise(),n=this.getElevationAdjustedSunset()){return this.getShaahZmanisBasedZman(a,n,9.5)}getPlagHamincha(a=this.getElevationAdjustedSunrise(),n=this.getElevationAdjustedSunset()){return this.getShaahZmanisBasedZman(a,n,10.75)}getShaahZmanisGra(){return this.getTemporalHour(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getShaahZmanisMGA(){return this.getTemporalHour(this.getAlos72(),this.getTzais72())}getCandleLightingOffset(){return this.candleLightingOffset}setCandleLightingOffset(a){this.candleLightingOffset=a}getClassName(){return"com.kosherjava.zmanim.ZmanimCalendar"}isAssurBemlacha(a,n,o){let r=new R,i=this.getDate();r.setGregorianDate(i.year,i.month-1,i.day),r.setInIsrael(o);let s=this.getElevationAdjustedSunset();if(!s)throw new Lo;return r.hasCandleLighting()&&a>=s?!0:r.isAssurBemelacha()&&a<=n}getShaahZmanisBasedZman(a,n,o){let r=this.getTemporalHour(a,n),i=S.Duration.from({nanoseconds:Math.trunc(r.total("nanoseconds")*o)});return a.add(i)}getHalfDayBasedZman(a,n,o){if(a==null||n==null)return null;let r=a.until(n).total({unit:"nanoseconds"})/6,i=S.Duration.from({nanoseconds:Math.trunc(r*o)});return a.add(i)}getPercentOfShaahZmanisFromDegrees(a,n){let o=this.getSeaLevelSunrise(),r=this.getSeaLevelSunset(),i=null;if(n?i=this.getSunsetOffsetByDegrees(rt.GEOMETRIC_ZENITH+a):i=this.getSunriseOffsetByDegrees(rt.GEOMETRIC_ZENITH+a),o==null||r==null||i==null)return bl;let s=o.until(r).total("nanoseconds")/12,u;return n?u=r.until(i).total("nanoseconds"):u=i.until(o).total("nanoseconds"),u/s}};rt.ZENITH_16_POINT_1=rt.GEOMETRIC_ZENITH+16.1,rt.ZENITH_8_POINT_5=rt.GEOMETRIC_ZENITH+8.5;var Zt=rt;var Es=(t,e)=>S.ZonedDateTime.compare(t,e)*-1,T=class T extends Zt{constructor(){super(...arguments);this.ateretTorahSunsetOffset=40}getShaahZmanis19Point8Degrees(){return this.getTemporalHour(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getShaahZmanis18Degrees(){return this.getTemporalHour(this.getAlos18Degrees(),this.getTzais18Degrees())}getShaahZmanis26Degrees(){return this.getTemporalHour(this.getAlos26Degrees(),this.getTzais26Degrees())}getShaahZmanis16Point1Degrees(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getShaahZmanis60Minutes(){return this.getTemporalHour(this.getAlos60(),this.getTzais60())}getShaahZmanis72Minutes(){return this.getShaahZmanisMGA()}getShaahZmanis72MinutesZmanis(){return this.getTemporalHour(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getShaahZmanis90Minutes(){return this.getTemporalHour(this.getAlos90(),this.getTzais90())}getShaahZmanis90MinutesZmanis(){return this.getTemporalHour(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getShaahZmanis96MinutesZmanis(){return this.getTemporalHour(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getShaahZmanisAteretTorah(){return this.getTemporalHour(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getShaahZmanisAlos16Point1ToTzais3Point8(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point8Degrees())}getShaahZmanisAlos16Point1ToTzais3Point7(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point7Degrees())}getShaahZmanis96Minutes(){return this.getTemporalHour(this.getAlos96(),this.getTzais96())}getShaahZmanis120Minutes(){return this.getTemporalHour(this.getAlos120(),this.getTzais120())}getShaahZmanis120MinutesZmanis(){return this.getTemporalHour(this.getAlos120Zmanis(),this.getTzais120Zmanis())}getPlagHamincha120MinutesZmanis(){return this.getPlagHamincha(this.getAlos120Zmanis(),this.getTzais120Zmanis())}getPlagHamincha120Minutes(){return this.getPlagHamincha(this.getAlos120(),this.getTzais120())}getAlos60(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:60})}getAlos72Zmanis(){return this.getZmanisBasedOffset(-1.2)}getAlos96(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:96})}getAlos90Zmanis(){return this.getZmanisBasedOffset(-1.5)}getAlos96Zmanis(){return this.getZmanisBasedOffset(-1.6)}getAlos90(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:90})}getAlos120(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:120})}getAlos120Zmanis(){return this.getZmanisBasedOffset(-2)}getAlos26Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_26_DEGREES)}getAlos18Degrees(){return this.getSunriseOffsetByDegrees(T.ASTRONOMICAL_ZENITH)}getAlos19Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_19_DEGREES)}getAlos19Point8Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_19_POINT_8)}getAlos16Point1Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_16_POINT_1)}getMisheyakir11Point5Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_11_POINT_5)}getMisheyakir11Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_11_DEGREES)}getMisheyakir10Point2Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_10_POINT_2)}getMisheyakir7Point65Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_7_POINT_65)}getMisheyakir9Point5Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_9_POINT_5)}getSofZmanShmaMGA19Point8Degrees(){return this.getSofZmanShma(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getSofZmanShmaMGA16Point1Degrees(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSofZmanShmaMGA18Degrees(){return this.getSofZmanShma(this.getAlos18Degrees(),this.getTzais18Degrees())}getSofZmanShmaMGA72Minutes(){return this.getSofZmanShmaMGA()}getSofZmanShmaMGA72MinutesZmanis(){return this.getSofZmanShma(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getSofZmanShmaMGA90Minutes(){return this.getSofZmanShma(this.getAlos90(),this.getTzais90())}getSofZmanShmaMGA90MinutesZmanis(){return this.getSofZmanShma(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getSofZmanShmaMGA96Minutes(){return this.getSofZmanShma(this.getAlos96(),this.getTzais96())}getSofZmanShmaMGA96MinutesZmanis(){return this.getSofZmanShma(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getSofZmanShma3HoursBeforeChatzos(){var a;return(a=this.getChatzos())==null?void 0:a.subtract({minutes:180})}getSofZmanShmaMGA120Minutes(){return this.getSofZmanShma(this.getAlos120(),this.getTzais120())}getSofZmanShmaAlos16Point1ToSunset(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getElevationAdjustedSunset())}getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getTzaisGeonim7Point083Degrees())}getSofZmanShmaKolEliyahu(){var o;let a=this.getFixedLocalChatzos();if(a===null||this.getSunrise()===null)return null;let n=S.Duration.from({nanoseconds:Math.trunc(((o=this.getElevationAdjustedSunrise())==null?void 0:o.until(a).total("nanoseconds"))/2)});return a.subtract(n)}getSofZmanTfilaMGA19Point8Degrees(){return this.getSofZmanTfila(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getSofZmanTfilaMGA16Point1Degrees(){return this.getSofZmanTfila(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSofZmanTfilaMGA18Degrees(){return this.getSofZmanTfila(this.getAlos18Degrees(),this.getTzais18Degrees())}getSofZmanTfilaMGA72Minutes(){return this.getSofZmanTfilaMGA()}getSofZmanTfilaMGA72MinutesZmanis(){return this.getSofZmanTfila(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getSofZmanTfilaMGA90Minutes(){return this.getSofZmanTfila(this.getAlos90(),this.getTzais90())}getSofZmanTfilaMGA90MinutesZmanis(){return this.getSofZmanTfila(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getSofZmanTfilaMGA96Minutes(){return this.getSofZmanTfila(this.getAlos96(),this.getTzais96())}getSofZmanTfilaMGA96MinutesZmanis(){return this.getSofZmanTfila(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getSofZmanTfilaMGA120Minutes(){return this.getSofZmanTfila(this.getAlos120(),this.getTzais120())}getSofZmanTfila2HoursBeforeChatzos(){var a;return(a=this.getChatzos())==null?void 0:a.subtract({minutes:120})}getMinchaGedola30Minutes(){var a;return(a=this.getChatzos())==null?void 0:a.add({minutes:30})}getMinchaGedola72Minutes(){return this.getMinchaGedola(this.getAlos72(),this.getTzais72())}getMinchaGedola16Point1Degrees(){return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),this.getTzais16Point1Degrees(),.5):this.getMinchaGedola(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getMinchaGedolaAhavatShalom(){var a;return!this.getMinchaGedola30Minutes()||!this.getMinchaGedola()||!this.getShaahZmanisAlos16Point1ToTzais3Point7()?(console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(),this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point7Degrees()),null):[this.getMinchaGedola30Minutes(),(a=this.getChatzos())==null?void 0:a.add({nanoseconds:Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7().total("nanoseconds")/2)})].sort(Es)[0]}getMinchaGedolaGreaterThan30(){return this.getMinchaGedola30Minutes()===null||this.getMinchaGedola()===null?null:[this.getMinchaGedola30Minutes(),this.getMinchaGedola()].sort(Es)[0]}getMinchaKetana16Point1Degrees(){return this.getMinchaKetana(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getMinchaKetanaAhavatShalom(){var a,n;return(n=this.getTzaisGeonim3Point8Degrees())==null?void 0:n.subtract({nanoseconds:Math.trunc(((a=this.getShaahZmanisAlos16Point1ToTzais3Point8())==null?void 0:a.total("nanoseconds"))*2.5)})}getMinchaKetana72Minutes(){return this.getMinchaKetana(this.getAlos72(),this.getTzais72())}getPlagHamincha60Minutes(){return this.getPlagHamincha(this.getAlos60(),this.getTzais60())}getPlagHamincha72Minutes(){return this.getPlagHamincha(this.getAlos72(),this.getTzais72())}getPlagHamincha90Minutes(){return this.getPlagHamincha(this.getAlos90(),this.getTzais90())}getPlagHamincha96Minutes(){return this.getPlagHamincha(this.getAlos96(),this.getTzais96())}getPlagHamincha96MinutesZmanis(){return this.getPlagHamincha(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getPlagHamincha90MinutesZmanis(){return this.getPlagHamincha(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getPlagHamincha72MinutesZmanis(){return this.getPlagHamincha(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getPlagHamincha16Point1Degrees(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getPlagHamincha19Point8Degrees(){return this.getPlagHamincha(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getPlagHamincha26Degrees(){return this.getPlagHamincha(this.getAlos26Degrees(),this.getTzais26Degrees())}getPlagHamincha18Degrees(){return this.getPlagHamincha(this.getAlos18Degrees(),this.getTzais18Degrees())}getPlagAlosToSunset(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getElevationAdjustedSunset())}getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getTzaisGeonim7Point083Degrees())}getPlagAhavatShalom(){var n,o;let a=S.Duration.from({nanoseconds:((n=this.getShaahZmanisAlos16Point1ToTzais3Point8())==null?void 0:n.total("nanoseconds"))*1.25});return(o=this.getTzaisGeonim3Point8Degrees())==null?void 0:o.subtract(a)}getBainHashmashosRT13Point24Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_13_POINT_24)}getBainHashmashosRT58Point5Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:58,seconds:30})}getBainHashmashosRT13Point5MinutesBefore7Point083Degrees(){var a;return(a=this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_083))==null?void 0:a.subtract({minutes:13,seconds:30})}getBainHashmashosRT2Stars(){var r;let a=this.getAlos19Point8Degrees(),n=this.getElevationAdjustedSunrise();if(a===null||n===null)return null;let o=-a.until(n).total("nanoseconds");return(r=this.getElevationAdjustedSunset())==null?void 0:r.add({nanoseconds:o*(5/18)})}getBainHashmashosYereim18Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:18})}getBainHashmashosYereim3Point05Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_3_POINT_05)}getBainHashmashosYereim16Point875Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:16,seconds:52,milliseconds:500})}getBainHashmashosYereim2Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_2_POINT_8)}getBainHashmashosYereim13Point5Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:13,seconds:30})}getBainHashmashosYereim2Point1Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_2_POINT_1)}getTzaisGeonim3Point7Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_7)}getTzaisGeonim3Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_8)}getTzaisGeonim5Point95Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_5_POINT_95)}getTzaisGeonim3Point65Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_65)}getTzaisGeonim3Point676Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_676)}getTzaisGeonim4Point61Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_61)}getTzaisGeonim4Point37Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_37)}getTzaisGeonim5Point88Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_5_POINT_88)}getTzaisGeonim4Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_8)}getTzaisGeonim6Point45Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_6_POINT_45)}getTzaisGeonim7Point083Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_083)}getTzaisGeonim7Point67Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_67)}getTzaisGeonim8Point5Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_8_POINT_5)}getTzaisGeonim9Point3Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_9_POINT_3)}getTzaisGeonim9Point75Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_9_POINT_75)}getTzais60(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:60})}getTzaisAteretTorah(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:this.getAteretTorahSunsetOffset()})}getAteretTorahSunsetOffset(){return this.ateretTorahSunsetOffset}setAteretTorahSunsetOffset(a){this.ateretTorahSunsetOffset=a}getSofZmanShmaAteretTorah(){return this.getSofZmanShma(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getSofZmanTfilahAteretTorah(){return this.getSofZmanTfila(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMinchaGedolaAteretTorah(){return this.getMinchaGedola(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMinchaKetanaAteretTorah(){return this.getMinchaKetana(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getPlagHaminchaAteretTorah(){return this.getPlagHamincha(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMesheyakirAteretTorah(a){var n;return(n=this.getAlos72Zmanis())==null?void 0:n.add({minutes:a})}getTzais72Zmanis(){return this.getZmanisBasedOffset(1.2)}getZmanisBasedOffset(a){var o,r;if(a==0)return;let n=S.Duration.from({nanoseconds:Math.trunc(this.getShaahZmanisGra().total("nanoseconds")*Math.abs(a))});return a>0?(o=this.getElevationAdjustedSunset())==null?void 0:o.add(n):(r=this.getElevationAdjustedSunrise())==null?void 0:r.subtract(n)}getTzais90Zmanis(){return this.getZmanisBasedOffset(1.5)}getTzais96Zmanis(){return this.getZmanisBasedOffset(1.6)}getTzais90(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:90})}getTzais120(){return this.getElevationAdjustedSunset().add({minutes:120})}getTzais120Zmanis(){return this.getZmanisBasedOffset(2)}getTzais16Point1Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_16_POINT_1)}getTzais26Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_26_DEGREES)}getTzais18Degrees(){return this.getSunsetOffsetByDegrees(T.ASTRONOMICAL_ZENITH)}getTzais19Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_19_POINT_8)}getTzais96(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:96})}getFixedLocalChatzos(){return this.getLocalMeanTime(12)}getSofZmanShmaFixedLocal(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.subtract({minutes:180})}getSofZmanTfilaFixedLocal(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.subtract({minutes:120})}getSofZmanKidushLevanaBetweenMoldos(a,n){let o=new R(this.getDate());return o.getJewishDayOfMonth()<11||o.getJewishDayOfMonth()>16?null:this.getMoladBasedTime(o.getSofZmanKidushLevanaBetweenMoldos(),a,n,!1)}getMoladBasedTime(a,n,o,r){let i=this.getMidnightLastNight(),s=this.getMidnightTonight();return as?null:n!==null||o!==null?r&&!(an)?o:n:a}getSofZmanKidushLevana15Days(a=null,n=null){let o=new R(this.getDate());return o.getJewishDayOfMonth()<11||o.getJewishDayOfMonth()>17?null:this.getMoladBasedTime(o.getSofZmanKidushLevana15Days(),a,n,!1)}getTchilasZmanKidushLevana3Days(a=null,n=null){let o=new R;if(o.setGregorianDate(this.getDate().year,this.getDate().month-1,this.getDate().day),o.getJewishDayOfMonth()>5&&o.getJewishDayOfMonth()<30)return null;let r=this.getMoladBasedTime(o.getTchilasZmanKidushLevana3Days(),a,n,!0);return r===null&&o.getJewishDayOfMonth()===30&&(o.forward(H.MONTH,1),r=this.getMoladBasedTime(o.getTchilasZmanKidushLevana3Days(),null,null,!0)),r}getZmanMolad(){let a=new R(this.getDate());if(a.getJewishDayOfMonth()>2&&a.getJewishDayOfMonth()<27)return null;let n=this.getMoladBasedTime(a.getMoladAsDate(),null,null,!0);return n===null&&a.getJewishDayOfMonth()>26&&(a.setDate(a.getDate().add({months:1})),n=this.getMoladBasedTime(a.getMoladAsDate(),null,null,!0)),n}getMidnightLastNight(){return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({hour:0,minute:0,second:0,millisecond:0})}getMidnightTonight(){return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).add({days:1}).with({hour:0,minute:0,second:0,millisecond:0})}getTchilasZmanKidushLevana7Days(a=null,n=null){let o=new R(this.getDate());return o.getJewishDayOfMonth()<4||o.getJewishDayOfMonth()>9?null:this.getMoladBasedTime(o.getTchilasZmanKidushLevana7Days(),a,n,!0)}getSofZmanAchilasChametzGRA(){return this.getSofZmanTfilaGRA()}getSofZmanAchilasChametzMGA72Minutes(){return this.getSofZmanTfilaMGA72Minutes()}getSofZmanAchilasChametzMGA16Point1Degrees(){return this.getSofZmanTfilaMGA16Point1Degrees()}getSofZmanBiurChametzGRA(){return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset(),5)}getSofZmanBiurChametzMGA72Minutes(){return this.getShaahZmanisBasedZman(this.getAlos72(),this.getTzais72(),5)}getSofZmanBiurChametzMGA16Point1Degrees(){return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees(),5)}getSunriseBaalHatanya(){return this.getSunriseOffsetByDegrees(T.ZENITH_1_POINT_583)}getSunsetBaalHatanya(){return this.getSunsetOffsetByDegrees(T.ZENITH_1_POINT_583)}getShaahZmanisBaalHatanya(){return this.getTemporalHour(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getAlosBaalHatanya(){return this.getSunriseOffsetByDegrees(T.ZENITH_16_POINT_9)}getSofZmanShmaBaalHatanya(){return this.getSofZmanShma(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getSofZmanTfilaBaalHatanya(){return this.getSofZmanTfila(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getSofZmanAchilasChametzBaalHatanya(){return this.getSofZmanTfilaBaalHatanya()}getSofZmanBiurChametzBaalHatanya(){return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya(),5)}getMinchaGedolaBaalHatanya(){return this.getMinchaGedola(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getMinchaGedolaBaalHatanyaGreaterThan30(){return this.getMinchaGedola30Minutes()===null||this.getMinchaGedolaBaalHatanya()===null?null:[this.getMinchaGedola30Minutes(),this.getMinchaGedolaBaalHatanya()].sort(Es)[0]}getMinchaKetanaBaalHatanya(){return this.getMinchaKetana(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getPlagHaminchaBaalHatanya(){return this.getPlagHamincha(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getTzaisBaalHatanya(){return this.getSunsetOffsetByDegrees(T.ZENITH_6_DEGREES)}getFixedLocalChatzosBasedZmanim(a,n,o){if(a==null||n==null)return null;let r=a.until(n).total("nanoseconds")/6;return a.add({nanoseconds:Math.trunc(r*o)})}getSofZmanShmaMGA18DegreesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA90MinutesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos90(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA72MinutesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos72(),this.getFixedLocalChatzos(),3)}getSofZmanShmaGRASunriseToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getSunrise(),this.getFixedLocalChatzos(),3)}getSofZmanTfilaGRASunriseToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getSunrise(),this.getFixedLocalChatzos(),4)}getMinchaGedolaGRAFixedLocalChatzos30Minutes(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.add({minutes:30})}getMinchaKetanaGRAFixedLocalChatzosToSunset(){return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos(),this.getSunset(),3.5)}getPlagHaminchaGRAFixedLocalChatzosToSunset(){return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos(),this.getSunset(),4.75)}getTzais50(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:50})}getSamuchLeMinchaKetanaGRA(){return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSamuchLeMinchaKetana16Point1Degrees(){return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSamuchLeMinchaKetana72Minutes(){return this.getSamuchLeMinchaKetana(this.getAlos72(),this.getTzais72())}getClassName(){return"com.kosherjava.zmanim.ComplexZmanimCalendar"}};T.ZENITH_3_POINT_7=T.GEOMETRIC_ZENITH+3.7,T.ZENITH_3_POINT_8=T.GEOMETRIC_ZENITH+3.8,T.ZENITH_5_POINT_95=T.GEOMETRIC_ZENITH+5.95,T.ZENITH_7_POINT_083=T.GEOMETRIC_ZENITH+7+5/60,T.ZENITH_10_POINT_2=T.GEOMETRIC_ZENITH+10.2,T.ZENITH_11_DEGREES=T.GEOMETRIC_ZENITH+11,T.ZENITH_11_POINT_5=T.GEOMETRIC_ZENITH+11.5,T.ZENITH_13_POINT_24=T.GEOMETRIC_ZENITH+13.24,T.ZENITH_19_DEGREES=T.GEOMETRIC_ZENITH+19,T.ZENITH_19_POINT_8=T.GEOMETRIC_ZENITH+19.8,T.ZENITH_26_DEGREES=T.GEOMETRIC_ZENITH+26,T.ZENITH_4_POINT_37=T.GEOMETRIC_ZENITH+4.37,T.ZENITH_4_POINT_61=T.GEOMETRIC_ZENITH+4.61,T.ZENITH_4_POINT_8=T.GEOMETRIC_ZENITH+4.8,T.ZENITH_3_POINT_65=T.GEOMETRIC_ZENITH+3.65,T.ZENITH_3_POINT_676=T.GEOMETRIC_ZENITH+3.676,T.ZENITH_5_POINT_88=T.GEOMETRIC_ZENITH+5.88,T.ZENITH_1_POINT_583=T.GEOMETRIC_ZENITH+1.583,T.ZENITH_16_POINT_9=T.GEOMETRIC_ZENITH+16.9,T.ZENITH_6_DEGREES=T.GEOMETRIC_ZENITH+6,T.ZENITH_6_POINT_45=T.GEOMETRIC_ZENITH+6.45,T.ZENITH_7_POINT_65=T.GEOMETRIC_ZENITH+7.65,T.ZENITH_7_POINT_67=T.GEOMETRIC_ZENITH+7.67,T.ZENITH_9_POINT_3=T.GEOMETRIC_ZENITH+9.3,T.ZENITH_9_POINT_5=T.GEOMETRIC_ZENITH+9.5,T.ZENITH_9_POINT_75=T.GEOMETRIC_ZENITH+9.75,T.ZENITH_MINUS_2_POINT_1=T.GEOMETRIC_ZENITH-2.1,T.ZENITH_MINUS_2_POINT_8=T.GEOMETRIC_ZENITH-2.8,T.ZENITH_MINUS_3_POINT_05=T.GEOMETRIC_ZENITH-3.05;var La=T;var le=class le{constructor(e,a,n=0,o=0){this.hours=0;this.minutes=0;this.seconds=0;this.milliseconds=0;this.negative=!1;if(a)this.hours=e,this.minutes=a,this.seconds=n,this.milliseconds=o;else{let r=e;r<0&&(this.negative=!0,r=Math.abs(r)),this.hours=Math.trunc(r/le.HOUR_MILLIS),r=r-this.hours*le.HOUR_MILLIS,this.minutes=Math.trunc(r/le.MINUTE_MILLIS),r=r-this.minutes*le.MINUTE_MILLIS,this.seconds=Math.trunc(r/le.SECOND_MILLIS),r=r-this.seconds*le.SECOND_MILLIS,this.milliseconds=r}}isNegative(){return this.negative}setIsNegative(e){this.negative=e}getHours(){return this.hours}setHours(e){this.hours=e}getMinutes(){return this.minutes}setMinutes(e){this.minutes=e}getSeconds(){return this.seconds}setSeconds(e){this.seconds=e}getMilliseconds(){return this.milliseconds}setMilliseconds(e){this.milliseconds=e}getTime(){return this.hours*le.HOUR_MILLIS+this.minutes*le.MINUTE_MILLIS+this.seconds*le.SECOND_MILLIS+this.milliseconds}toString(){throw new Le("This method is deprecated, due to the fact that it depends on a circular dependency. Use `new ZmanimFormatter(TimeZone.getTimeZone('UTC')).format(time)` instead")}};le.SECOND_MILLIS=1e3,le.MINUTE_MILLIS=le.SECOND_MILLIS*60,le.HOUR_MILLIS=le.MINUTE_MILLIS*60;var ta=le;var fn=class{constructor(e,a){this.label=a,e instanceof S.ZonedDateTime?this.zman=e:typeof e=="number"&&(this.duration=e)}static compareDateOrder(e,a){let n=[e,a].map(o=>o.zman);return S.ZonedDateTime.compare(...n)}static compareNameOrder(e,a){return Ro.compareTo(e.label||"",a.label||"")}static compareDurationOrder(e,a){return vo.compare(e.duration||0,a.duration||0)}toString(){return` +Timezone DST Offset: ${(Ve.getDSTSavings(this.getTimeZone())/Q.HOUR_NANOS).toString()}`)}clone(){return JSON.parse(JSON.stringify(this))}};Q.DISTANCE=0,Q.INITIAL_BEARING=1,Q.FINAL_BEARING=2,Q.MINUTE_NANOS=S.Duration.from({minutes:1}).total("nanoseconds"),Q.HOUR_NANOS=S.Duration.from({hours:1}).total("nanoseconds");var Oa=Q;var wo=class wo{constructor(){this.refraction=34/60;this.solarRadius=16/60;this.earthRadius=6356.9}getEarthRadius(){return this.earthRadius}setEarthRadius(e){this.earthRadius=e}static getDefault(){throw new Le("This method is deprecated, due to the fact that it depends on a circular dependency. Use `new NOAACalculator()` instead.")}getElevationAdjustment(e){return y.radiansToDegrees(Math.acos(this.earthRadius/(this.earthRadius+e/1e3)))}adjustZenith(e,a){let n=e;return e===wo.GEOMETRIC_ZENITH&&(n=e+(this.getSolarRadius()+this.getRefraction()+this.getElevationAdjustment(a))),n}getRefraction(){return this.refraction}setRefraction(e){this.refraction=e}getSolarRadius(){return this.solarRadius}setSolarRadius(e){this.solarRadius=e}clone(){return JSON.parse(JSON.stringify(this))}equals(e){return this===e}};wo.GEOMETRIC_ZENITH=90;var Na=wo;var O=class O extends Na{getCalculatorName(){return"US National Oceanic and Atmospheric Administration Algorithm"}getUTCSunrise(e,a,n,o){let r=o?a.getElevation():0,i=this.adjustZenith(n,r),s=O.getSunRiseSetUTC(O.getJulianDay(e),a.getLatitude(),-a.getLongitude(),i,0);return s=s/60,s>0?s%24:s%24+24}getUTCSunset(e,a,n,o){let r=o?a.getElevation():0,i=this.adjustZenith(n,r),s=O.getSunRiseSetUTC(O.getJulianDay(e),a.getLatitude(),-a.getLongitude(),i,1);return s=s/60,s>0?s%24:s%24+24}static getJulianDay(e){let{year:a,month:n}=e,{day:o}=e;n<=2&&(a-=1,n+=12);let r=Math.trunc(a/100),i=Math.trunc(2-r+r/4);return Math.floor(365.25*(a+4716))+Math.floor(30.6001*(n+1))+o+i-1524.5}static getJulianCenturiesFromJulianDay(e){return(e-O.JULIAN_DAY_JAN_1_2000)/O.JULIAN_DAYS_PER_CENTURY}static getJulianDayFromJulianCenturies(e){return e*O.JULIAN_DAYS_PER_CENTURY+O.JULIAN_DAY_JAN_1_2000}static getSunGeometricMeanLongitude(e){let a=280.46646+e*(36000.76983+3032e-7*e);return a>0?a%360:a%360+360}static getSunGeometricMeanAnomaly(e){return 357.52911+e*(35999.05029-1537e-7*e)}static getEarthOrbitEccentricity(e){return .016708634-e*(42037e-9+1267e-10*e)}static getSunEquationOfCenter(e){let a=O.getSunGeometricMeanAnomaly(e),n=y.degreesToRadians(a),o=Math.sin(n),r=Math.sin(n+n),i=Math.sin(n+n+n);return o*(1.914602-e*(.004817+14e-6*e))+r*(.019993-101e-6*e)+i*289e-6}static getSunTrueLongitude(e){let a=O.getSunGeometricMeanLongitude(e),n=O.getSunEquationOfCenter(e);return a+n}static getSunApparentLongitude(e){let a=O.getSunTrueLongitude(e),n=125.04-1934.136*e;return a-.00569-.00478*Math.sin(y.degreesToRadians(n))}static getMeanObliquityOfEcliptic(e){return 23+(26+(21.448-e*(46.815+e*(59e-5-e*.001813)))/60)/60}static getObliquityCorrection(e){let a=O.getMeanObliquityOfEcliptic(e),n=125.04-1934.136*e;return a+.00256*Math.cos(y.degreesToRadians(n))}static getSunDeclination(e){let a=O.getObliquityCorrection(e),n=O.getSunApparentLongitude(e),o=Math.sin(y.degreesToRadians(a))*Math.sin(y.degreesToRadians(n));return y.radiansToDegrees(Math.asin(o))}static getEquationOfTime(e){let a=O.getObliquityCorrection(e),n=O.getSunGeometricMeanLongitude(e),o=O.getEarthOrbitEccentricity(e),r=O.getSunGeometricMeanAnomaly(e),i=Math.tan(y.degreesToRadians(a)/2);i*=i;let s=Math.sin(2*y.degreesToRadians(n)),u=Math.sin(y.degreesToRadians(r)),h=Math.cos(2*y.degreesToRadians(n)),c=Math.sin(4*y.degreesToRadians(n)),d=Math.sin(2*y.degreesToRadians(r)),l=i*s-2*o*u+4*o*i*u*h-.5*i*i*c-1.25*o*o*d;return y.radiansToDegrees(l)*4}static getSunHourAngle(e,a,n,o){let r=y.degreesToRadians(e),i=y.degreesToRadians(a),s=Math.acos(Math.cos(y.degreesToRadians(n))/(Math.cos(r)*Math.cos(i))-Math.tan(r)*Math.tan(i));return o==1&&(s=-s),s}getUTCNoon(e,a){let n=O.getJulianDay(e),o=O.getJulianCenturiesFromJulianDay(n),r=O.getSolarNoonUTC(o,-a.getLongitude());return r=r/60,r>0?r%24:r%24+24}static getSolarNoonUTC(e,a){let n=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(e)+a/360),o=O.getEquationOfTime(n),r=720+a*4-o,i=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(e)-.5+r/1440);return o=O.getEquationOfTime(i),720+a*4-o}static getSunRiseSetUTC(e,a,n,o,r){let i=O.getJulianCenturiesFromJulianDay(e),s=O.getSolarNoonUTC(i,n),u=O.getJulianCenturiesFromJulianDay(e+s/1440),h=O.getEquationOfTime(u),c=O.getSunDeclination(u),d=O.getSunHourAngle(a,c,o,r),l=n-y.radiansToDegrees(d),f=4*l,A=720+f-h,M=O.getJulianCenturiesFromJulianDay(O.getJulianDayFromJulianCenturies(i)+A/1440);return h=O.getEquationOfTime(M),c=O.getSunDeclination(M),d=O.getSunHourAngle(a,c,o,r),l=n-y.radiansToDegrees(d),f=4*l,A=720+f-h,A}};O.JULIAN_DAY_JAN_1_2000=2451545,O.JULIAN_DAYS_PER_CENTURY=36525;var Yo=O;var _=class _{getSunrise(){let e=this.getUTCSunrise(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,0)}getSeaLevelSunrise(){let e=this.getUTCSeaLevelSunrise(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,0)}getBeginCivilTwilight(){return this.getSunriseOffsetByDegrees(_.CIVIL_ZENITH)}getBeginNauticalTwilight(){return this.getSunriseOffsetByDegrees(_.NAUTICAL_ZENITH)}getBeginAstronomicalTwilight(){return this.getSunriseOffsetByDegrees(_.ASTRONOMICAL_ZENITH)}getSunset(){let e=this.getUTCSunset(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,1)}getSeaLevelSunset(){let e=this.getUTCSeaLevelSunset(_.GEOMETRIC_ZENITH);return Number.isNaN(e)?null:this.getDateFromTime(e,1)}getEndCivilTwilight(){return this.getSunsetOffsetByDegrees(_.CIVIL_ZENITH)}getEndNauticalTwilight(){return this.getSunsetOffsetByDegrees(_.NAUTICAL_ZENITH)}getEndAstronomicalTwilight(){return this.getSunsetOffsetByDegrees(_.ASTRONOMICAL_ZENITH)}getSunriseOffsetByDegrees(e){let a=this.getUTCSunrise(e);return Number.isNaN(a)?null:this.getDateFromTime(a,0)}getSunsetOffsetByDegrees(e){let a=this.getUTCSunset(e);return Number.isNaN(a)?null:this.getDateFromTime(a,1)}constructor(e){this.setDate(S.Now.plainDateISO()),this.setGeoLocation(e),this.setAstronomicalCalculator(new Yo)}getUTCSunrise(e){return this.getAstronomicalCalculator().getUTCSunrise(this.getAdjustedDate(),this.getGeoLocation(),e,!0)}getUTCSeaLevelSunrise(e){return this.getAstronomicalCalculator().getUTCSunrise(this.getAdjustedDate(),this.getGeoLocation(),e,!1)}getUTCSunset(e){return this.getAstronomicalCalculator().getUTCSunset(this.getAdjustedDate(),this.getGeoLocation(),e,!0)}getUTCSeaLevelSunset(e){return this.getAstronomicalCalculator().getUTCSunset(this.getAdjustedDate(),this.getGeoLocation(),e,!1)}getTemporalHour(e=this.getSeaLevelSunrise(),a=this.getSeaLevelSunset()){if(e===null||a===null)return;let n=e.until(a).total({unit:"nanoseconds"})/12;return S.Duration.from({nanoseconds:Math.trunc(n)})}getSolarMidnight(){var a;let e=this.clone();return e.setDate(this.getDate().add({days:1})),this.getSunTransit().add({nanoseconds:Math.trunc(((a=this.getSunTransit())==null?void 0:a.until(e.getSunTransit()).total({unit:"nanoseconds"}))/2)})}getSunTransit(e,a){if(e){if(!a)throw new Z("No argument for the end of day provided");let o=this.getTemporalHour(e,a),r=e;for(let i=0;i<6;i++)r=r.add(o);return r}let n=this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(),this.getGeoLocation());return this.getDateFromTime(n,2)}getSunLowerTransit(){let e=this.getAdjustedDate(),a=this.getGeoLocation().clone(),o=a.getLongitude()+180;o>180&&(o=o-360,e=e.subtract({days:1})),a.setLongitude(o);let r=this.getAstronomicalCalculator().getUTCNoon(e,a);return this.getDateFromTime(r,3)}getDateFromTime(e,a){if(Number.isNaN(e))return null;let n=e,r=this.getAdjustedDate().toZonedDateTime("UTC"),i=Math.trunc(n);n-=i;let s=Math.trunc(n*=60);n-=s;let u=Math.trunc(n*=60);n-=u;let h=Math.trunc(n*=1e3);n-=h;let c=Math.trunc(n*=1e3);n-=c;let d=Math.trunc(this.getGeoLocation().getLongitude()/15);return a==0&&d+i>18?r=r.subtract({days:1}):a==1&&d+i<6?r=r.add({days:1}):a==3&&d+i>12&&(r=r.subtract({days:1})),r.with({hour:i,minute:s,second:u,millisecond:h,microsecond:c,nanosecond:Math.trunc(n*1e3)}).withTimeZone(this.geoLocation.getTimeZone())}getSunriseSolarDipFromOffset(e){var i;if(Number.isNaN(e))return null;let a=this.getSeaLevelSunrise(),n=(i=this.getSeaLevelSunrise())==null?void 0:i.subtract({minutes:e}),o=new Ca(0),r=new Ca("0.0001");for(;a===null||e<0&&a0&&a>n;)e>0?o=o.add(r):o=o.sub(r),a=this.getSunriseOffsetByDegrees(_.GEOMETRIC_ZENITH+o.toNumber());return o.toNumber()}getSunsetSolarDipFromOffset(e){var i;if(Number.isNaN(e))return null;let a=this.getSeaLevelSunset(),n=(i=this.getSeaLevelSunset())==null?void 0:i.add({minutes:e}),o=new Ca(0),r=new Ca("0.001");for(;a==null||e>0&&an;)e>0?o=o.add(r):o=o.sub(r),a=this.getSunsetOffsetByDegrees(_.GEOMETRIC_ZENITH+o.toNumber());return o.toNumber()}getLocalMeanTime(e){var o;if(e<0||e>=24)throw new Z("Hours must between 0 and 23.9999...");let a=this.getGeoLocation(),n=Ve.getRawOffset(a.getTimeZone())/_.HOUR_NANOS;return(o=this.getDateFromTime(e-n,0))==null?void 0:o.subtract({nanoseconds:a.getLocalMeanTimeOffset()})}getAdjustedDate(){let e=this.getGeoLocation().getAntimeridianAdjustment();return e===0?this.getDate():this.getDate().add({days:e})}toString(){throw new Le("This method is unsupported, due to the fact that it depends on a circular dependency.")}toJSON(){throw new Le("This method is unsupported, due to the fact that it depends on a circular dependency. Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.")}equals(e){if(this===e)return!0;if(!(e instanceof _))return!1;let a=e;return this.getDate().equals(a.getDate())&&this.getGeoLocation().equals(a.getGeoLocation())&&this.getAstronomicalCalculator()===a.getAstronomicalCalculator()}getGeoLocation(){return this.geoLocation}setGeoLocation(e){this.geoLocation=e}getAstronomicalCalculator(){return this.astronomicalCalculator}setAstronomicalCalculator(e){this.astronomicalCalculator=e}getDate(){return this.date}setDate(e){e instanceof S.PlainDate?this.date=e:e instanceof Date?this.date=S.Instant.fromEpochMilliseconds(e.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate():typeof e=="string"&&(this.date=S.PlainDate.from(e))}clone(){let e=new _(this.geoLocation);return e.setDate(this.date),e.setAstronomicalCalculator(this.astronomicalCalculator),e}getClassName(){return"com.kosherjava.zmanim.AstronomicalCalendar"}};_.GEOMETRIC_ZENITH=90,_.CIVIL_ZENITH=96,_.NAUTICAL_ZENITH=102,_.ASTRONOMICAL_ZENITH=108,_.HOUR_NANOS=S.Duration.from({hours:1}).total("nanosecond");var Za=_;var E=class E{getMoladHours(){return this.moladHours}setMoladHours(e){this.moladHours=e}getMoladMinutes(){return this.moladMinutes}setMoladMinutes(e){this.moladMinutes=e}setMoladChalakim(e){this.moladChalakim=e}getMoladChalakim(){return this.moladChalakim}getLastDayOfGregorianMonth(e){return this.date.with({month:e}).daysInMonth}static getLastDayOfGregorianMonth(e,a){switch(e){case 2:return a%4===0&&a%100!==0||a%400===0?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}}absDateToDate(e){let a=Math.trunc(e/366);for(;e>=E.gregorianDateToAbsDate(a+1,1,1);)a++;let n=1;for(;e>E.gregorianDateToAbsDate(a,n,E.getLastDayOfGregorianMonth(n,a));)n++;let o=e-E.gregorianDateToAbsDate(a,n,1)+1;this.setInternalGregorianDate(a,n,o)}static gregorianDateToAbsDate(e,a,n){let o=n;for(let r=a-1;r>0;r--)o+=E.getLastDayOfGregorianMonth(r,e);return o+365*(e-1)+Math.trunc((e-1)/4)-Math.trunc((e-1)/100)+Math.trunc((e-1)/400)}static isJewishLeapYear(e){return(7*e+1)%19<7}isJewishLeapYear(){return E.isJewishLeapYear(this.getJewishYear())}static getLastMonthOfJewishYear(e){return E.isJewishLeapYear(e)?E.ADAR_II:E.ADAR}static getJewishCalendarElapsedDays(e){let a=E.getChalakimSinceMoladTohu(e,E.TISHREI),n=Math.trunc(a/E.CHALAKIM_PER_DAY),o=Math.trunc(a-n*E.CHALAKIM_PER_DAY);return E.addDechiyos(e,n,o)}static addDechiyos(e,a,n){let o=a;return(n>=19440||a%7===2&&n>=9924&&!E.isJewishLeapYear(e)||a%7===1&&n>=16789&&E.isJewishLeapYear(e-1))&&(o+=1),(o%7===0||o%7===3||o%7===5)&&o++,o}static getChalakimSinceMoladTohu(e,a){let n=E.getJewishMonthOfYear(e,a),o=235*Math.trunc((e-1)/19)+12*((e-1)%19)+Math.trunc((7*((e-1)%19)+1)/19)+(n-1);return E.CHALAKIM_MOLAD_TOHU+E.CHALAKIM_PER_MONTH*o}getChalakimSinceMoladTohu(){let e=this.date.withCalendar("hebrew");return E.getChalakimSinceMoladTohu(e.year,this.getJewishMonth())}static getJewishMonthOfYear(e,a){return new E(e,a,1).date.withCalendar("hebrew").month}static validateJewishDate(e,a,n,o,r,i){if(aE.getLastMonthOfJewishYear(e))throw new Z(`The Jewish month has to be between 1 and 12 (or 13 on a leap year). ${a} is invalid for the year ${e}.`);if(n<1||n>30)throw new Z(`The Jewish day of month can't be < 1 or > 30. ${n} is invalid.`);if(e<3761||e===3761&&a>=E.TISHREI&&a23)throw new Z(`Hours < 0 or > 23 can't be set. ${o} is invalid.`);if(r<0||r>59)throw new Z(`Minutes < 0 or > 59 can't be set. ${r} is invalid.`);if(i<0||i>17)throw new Z(`Chalakim/parts < 0 or > 17 can't be set. ${i} is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)`)}static validateGregorianDate(e,a,n){E.validateGregorianMonth(a),E.validateGregorianDayOfMonth(n),E.validateGregorianYear(e)}static validateGregorianMonth(e){if(e>11||e<0)throw new Z(`The Gregorian month has to be between 0 - 11. ${e} is invalid.`)}static validateGregorianDayOfMonth(e){if(e<=0)throw new Z(`The day of month can't be less than 1. ${e} is invalid.`)}static validateGregorianYear(e){if(e<1)throw new Z(`Years < 1 can't be calculated. ${e} is invalid.`)}static getDaysInJewishYear(e){return S.PlainYearMonth.from({year:e,month:1,calendar:"hebrew"}).daysInYear}getDaysInJewishYear(){return E.getDaysInJewishYear(this.getJewishYear())}static isCheshvanLong(e){return E.getDaysInJewishYear(e)%10===5}isCheshvanLong(){return E.isCheshvanLong(this.getJewishYear())}static isKislevShort(e){return E.getDaysInJewishYear(e)%10===3}isKislevShort(){return E.isKislevShort(this.getJewishYear())}getCheshvanKislevKviah(){return this.isCheshvanLong()&&!this.isKislevShort()?E.SHELAIMIM:!this.isCheshvanLong()&&this.isKislevShort()?E.CHASERIM:E.KESIDRAN}static getDaysInJewishMonth(e,a){let n=e-6;return n<1&&(n+=S.PlainDate.from({year:a,month:e,day:1,calendar:"hebrew"}).monthsInYear),S.PlainDate.from({year:a,month:n,day:15,calendar:"hebrew"}).daysInMonth}getDaysInJewishMonth(){return this.getDate().withCalendar("hebrew").daysInMonth}getMolad(){let e=new E(this.getChalakimSinceMoladTohu());return e.getMoladHours()>=6&&e.setDate(e.getDate().add({days:1})),e.setMoladHours((e.getMoladHours()+18)%24),e}static moladToAbsDate(e){return Math.trunc(e/E.CHALAKIM_PER_DAY)+E.JEWISH_EPOCH}setMoladTime(e){let a=e;this.setMoladHours(Math.trunc(a/E.CHALAKIM_PER_HOUR)),a=a-this.getMoladHours()*E.CHALAKIM_PER_HOUR,this.setMoladMinutes(Math.trunc(a/E.CHALAKIM_PER_MINUTE)),this.setMoladChalakim(a-this.moladMinutes*E.CHALAKIM_PER_MINUTE)}getDaysSinceStartOfJewishYear(){return this.date.withCalendar("hebrew").with({month:1,day:1}).subtract({days:1}).until(this.date.withCalendar("hebrew")).total("days")}constructor(e,a,n){if(this.date=S.Now.plainDateISO(),a)this.setJewishDate(e,a,n);else if(e instanceof Date)this.setDate(S.Instant.fromEpochMilliseconds(e.valueOf()).toZonedDateTimeISO("UTC").toPlainDate());else if(e instanceof S.PlainDate)this.setDate(e);else if(typeof e=="number"){let o=e;this.absDateToDate(E.moladToAbsDate(o));let r=Math.trunc(o/E.CHALAKIM_PER_DAY),i=Math.trunc(o-r*E.CHALAKIM_PER_DAY);this.setMoladTime(i)}}setDate(e){if(e.year<1)throw new Z(`Dates with a BC era are not supported. The year ${e.year} is invalid.`);this.date=e}setGregorianDate(e,a,n){E.validateGregorianDate(e,a,n),this.setInternalGregorianDate(e,a+1,n)}setInternalGregorianDate(e,a,n){n>E.getLastDayOfGregorianMonth(a,e)&&(n=E.getLastDayOfGregorianMonth(a,e)),this.date=new S.PlainDate(e,a,n)}setJewishDate(e,a,n,o=0,r=0,i=0){E.validateJewishDate(e,a,n,o,r,i),n>E.getDaysInJewishMonth(a,e)&&(n=E.getDaysInJewishMonth(a,e));let s=a-6;s<1&&(s+=S.PlainDate.from({year:e,month:a,day:n,calendar:"hebrew"}).monthsInYear),this.date=S.PlainDate.from({year:e,month:s,day:n,calendar:"hebrew"}).withCalendar("iso8601")}getDate(){return this.date}resetDate(){this.setDate(S.Now.plainDateISO())}toString(){let e=["Nissan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Teves","Shevat","Adar","Adar II","Adar I"],a;return this.isJewishLeapYear()&&this.getJewishMonth()===E.ADAR?a=e[13]:a=e[this.getJewishMonth()-1],`${this.getJewishDayOfMonth()} ${a}, ${this.getJewishYear()}`}forward(e,a){if(![H.DATE,H.MONTH,H.YEAR].includes(e))throw new Z("Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.");if(a<1)throw new Z("JewishDate.forward() does not support amounts less than 1. See JewishDate.back()");e===H.DATE?this.date=this.date.add({days:a}):e===H.MONTH?this.date=this.date.add({months:a}):e===H.YEAR&&(this.date=this.date.add({years:a}))}back(){this.date=this.date.subtract({days:1})}equals(e){return e instanceof E&&S.PlainDate.compare(this.date,e.getDate())==0}compareTo(e){return S.PlainDate.compare(this.date,e.getDate())}getGregorianMonth(){return this.date.withCalendar("iso8601").month-1}getGregorianDayOfMonth(){return this.date.withCalendar("iso8601").day}getGregorianYear(){return this.date.withCalendar("iso8601").year}getJewishMonth(){let e=this.date.withCalendar("hebrew"),a=6;return e.monthsInYear==13&&++a,e.month<=a?e.month+6:e.month-a}getJewishDayOfMonth(){return this.date.withCalendar("hebrew").day}getJewishYear(){return this.date.withCalendar("hebrew").year}getDayOfWeek(){let e=this.date.dayOfWeek+1;return e==8&&(e=1),e}setGregorianMonth(e){E.validateGregorianMonth(e),this.date=this.date.withCalendar("iso8601").with({month:e+1})}setGregorianYear(e){E.validateGregorianYear(e),this.date=this.date.withCalendar("iso8601").with({year:e})}setGregorianDayOfMonth(e){E.validateGregorianDayOfMonth(e),this.date=this.date.withCalendar("iso8601").with({day:e})}setJewishMonth(e){let a=this.date.withCalendar("hebrew");this.setJewishDate(a.year,e,a.day)}setJewishYear(e){let a=this.date.withCalendar("hebrew");this.setJewishDate(e,this.getJewishMonth(),a.day),this.date=this.date.withCalendar("hebrew").with({year:e}).withCalendar("iso8601")}setJewishDayOfMonth(e){this.date=this.date.withCalendar("hebrew").with({day:e}).withCalendar("iso8601")}clone(){let e=new E(this.date);return e.setMoladHours(this.moladHours),e.setMoladMinutes(this.moladMinutes),e.setMoladChalakim(this.moladChalakim),e}};E.NISSAN=1,E.IYAR=2,E.SIVAN=3,E.TAMMUZ=4,E.AV=5,E.ELUL=6,E.TISHREI=7,E.CHESHVAN=8,E.KISLEV=9,E.TEVES=10,E.SHEVAT=11,E.ADAR=12,E.ADAR_II=13,E.JEWISH_EPOCH=-1373429,E.CHALAKIM_PER_MINUTE=18,E.CHALAKIM_PER_HOUR=1080,E.CHALAKIM_PER_DAY=25920,E.CHALAKIM_PER_MONTH=765433,E.CHALAKIM_MOLAD_TOHU=31524,E.CHASERIM=0,E.KESIDRAN=1,E.SHELAIMIM=2;var P=E;function mn(t,e,a,n=!0){let o=[1];return n&&o.push(0),o.includes(S.PlainDate.compare(e,t))&&o.includes(S.PlainDate.compare(a,e))}var Ra=class{getMasechtaNumber(){return this.masechtaNumber}setMasechtaNumber(e){this.masechtaNumber=e}constructor(e,a){this.masechtaNumber=e,this.daf=a}getDaf(){return this.daf}setDaf(e){this.daf=e}};var re=class re{static getDafYomiBavli(e){let a=[64,157,105,121,22,88,56,40,35,31,32,29,27,122,112,91,66,49,90,82,119,119,176,113,24,49,76,14,120,110,142,61,34,34,28,22,4,9,5,73],n=e.getDate(),o,r=this.getJulianDay(n),i=0,s=0;if(S.PlainDate.compare(n,re.dafYomiStartDate)==-1)throw new Z(`${e} is prior to organized Daf Yomi Bavli cycles that started on ${re.dafYomiStartDate}`);S.PlainDate.compare(n,re.shekalimChangeDate)==1?(i=8+(r-re.shekalimJulianChangeDay)/2711,s=(r-re.shekalimJulianChangeDay)%2711):(i=1+(r-re.dafYomiJulianStartDay)/2702,s=(r-re.dafYomiJulianStartDay)%2702);let u=0,h=-1,c=0;i<=7?a[4]=13:a[4]=22;for(let d of a)if(h++,u=u+d-1,sr.days.find(i=>a.equals(a.withCalendar("hebrew").with(i))))}};var{FRIDAY:y0,SATURDAY:gn}=H,Ts=(g=>(g[g.NONE=0]="NONE",g[g.BERESHIS=1]="BERESHIS",g[g.NOACH=2]="NOACH",g[g.LECH_LECHA=3]="LECH_LECHA",g[g.VAYERA=4]="VAYERA",g[g.CHAYEI_SARA=5]="CHAYEI_SARA",g[g.TOLDOS=6]="TOLDOS",g[g.VAYETZEI=7]="VAYETZEI",g[g.VAYISHLACH=8]="VAYISHLACH",g[g.VAYESHEV=9]="VAYESHEV",g[g.MIKETZ=10]="MIKETZ",g[g.VAYIGASH=11]="VAYIGASH",g[g.VAYECHI=12]="VAYECHI",g[g.SHEMOS=13]="SHEMOS",g[g.VAERA=14]="VAERA",g[g.BO=15]="BO",g[g.BESHALACH=16]="BESHALACH",g[g.YISRO=17]="YISRO",g[g.MISHPATIM=18]="MISHPATIM",g[g.TERUMAH=19]="TERUMAH",g[g.TETZAVEH=20]="TETZAVEH",g[g.KI_SISA=21]="KI_SISA",g[g.VAYAKHEL=22]="VAYAKHEL",g[g.PEKUDEI=23]="PEKUDEI",g[g.VAYIKRA=24]="VAYIKRA",g[g.TZAV=25]="TZAV",g[g.SHMINI=26]="SHMINI",g[g.TAZRIA=27]="TAZRIA",g[g.METZORA=28]="METZORA",g[g.ACHREI_MOS=29]="ACHREI_MOS",g[g.KEDOSHIM=30]="KEDOSHIM",g[g.EMOR=31]="EMOR",g[g.BEHAR=32]="BEHAR",g[g.BECHUKOSAI=33]="BECHUKOSAI",g[g.BAMIDBAR=34]="BAMIDBAR",g[g.NASSO=35]="NASSO",g[g.BEHAALOSCHA=36]="BEHAALOSCHA",g[g.SHLACH=37]="SHLACH",g[g.KORACH=38]="KORACH",g[g.CHUKAS=39]="CHUKAS",g[g.BALAK=40]="BALAK",g[g.PINCHAS=41]="PINCHAS",g[g.MATOS=42]="MATOS",g[g.MASEI=43]="MASEI",g[g.DEVARIM=44]="DEVARIM",g[g.VAESCHANAN=45]="VAESCHANAN",g[g.EIKEV=46]="EIKEV",g[g.REEH=47]="REEH",g[g.SHOFTIM=48]="SHOFTIM",g[g.KI_SEITZEI=49]="KI_SEITZEI",g[g.KI_SAVO=50]="KI_SAVO",g[g.NITZAVIM=51]="NITZAVIM",g[g.VAYEILECH=52]="VAYEILECH",g[g.HAAZINU=53]="HAAZINU",g[g.VZOS_HABERACHA=54]="VZOS_HABERACHA",g[g.VAYAKHEL_PEKUDEI=55]="VAYAKHEL_PEKUDEI",g[g.TAZRIA_METZORA=56]="TAZRIA_METZORA",g[g.ACHREI_MOS_KEDOSHIM=57]="ACHREI_MOS_KEDOSHIM",g[g.BEHAR_BECHUKOSAI=58]="BEHAR_BECHUKOSAI",g[g.CHUKAS_BALAK=59]="CHUKAS_BALAK",g[g.MATOS_MASEI=60]="MATOS_MASEI",g[g.NITZAVIM_VAYEILECH=61]="NITZAVIM_VAYEILECH",g[g.SHKALIM=62]="SHKALIM",g[g.ZACHOR=63]="ZACHOR",g[g.PARA=64]="PARA",g[g.HACHODESH=65]="HACHODESH",g[g.SHUVA=66]="SHUVA",g[g.SHIRA=67]="SHIRA",g[g.HAGADOL=68]="HAGADOL",g[g.CHAZON=69]="CHAZON",g[g.NACHAMU=70]="NACHAMU",g))(Ts||{}),m=class m extends P{constructor(a,n,o,r){super(a,n,o);this.inIsrael=!1;this.isMukafChoma=!1;this.useModernHolidays=!1;r&&this.setInIsrael(r)}isUseModernHolidays(){return this.useModernHolidays}setUseModernHolidays(a){this.useModernHolidays=a}setInIsrael(a){this.inIsrael=a}getInIsrael(){return this.inIsrael}getIsMukafChoma(){return this.isMukafChoma}setIsMukafChoma(a){this.isMukafChoma=a}isBirkasHachamah(){let a=m.getJewishCalendarElapsedDays(this.getJewishYear());return a+=Math.trunc(this.getDaysSinceStartOfJewishYear()),a%(28*365.25)===172}getParshaYearType(){let a=this.getDate().withCalendar("hebrew").with({day:1,month:1});if(a.monthsInYear==13)switch(a.dayOfWeek){case 1:if(this.isKislevShort())return this.getInIsrael()?14:6;if(this.isCheshvanLong())return this.getInIsrael()?15:7;break;case 2:return this.getInIsrael()?15:7;case 4:if(this.isKislevShort())return 8;if(this.isCheshvanLong())return 9;break;case 6:if(this.isKislevShort())return 10;if(this.isCheshvanLong())return this.getInIsrael()?16:11;break}else switch(a.dayOfWeek){case 1:if(this.isKislevShort())return 0;if(this.isCheshvanLong())return this.getInIsrael()?12:1;break;case 2:return this.getInIsrael()?12:1;case 4:if(this.isCheshvanLong())return 3;if(!this.isKislevShort())return this.getInIsrael()?13:2;break;case 6:if(this.isKislevShort())return 4;if(this.isCheshvanLong())return 5;break}return-1}getParshah(){if(this.getDayOfWeek()!==gn)return 0;let a=this.getParshaYearType(),o=m.getJewishCalendarElapsedDays(this.getJewishYear())%7+Math.trunc(this.getDaysSinceStartOfJewishYear());return a>=0?m.parshalist[a][o/7]:0}getSpecialShabbos(){if(this.getDayOfWeek()!==gn)return 0;if((this.getJewishMonth()===m.SHEVAT&&!this.isJewishLeapYear()||this.getJewishMonth()===m.ADAR&&this.isJewishLeapYear())&&[25,27,29].includes(this.getJewishDayOfMonth()))return 62;if(this.getJewishMonth()===m.ADAR&&!this.isJewishLeapYear()||this.getJewishMonth()===m.ADAR_II){if(this.getJewishDayOfMonth()===1)return 62;if([8,9,11,13].includes(this.getJewishDayOfMonth()))return 63;if([18,20,22,23].includes(this.getJewishDayOfMonth()))return 64;if([25,27,29].includes(this.getJewishDayOfMonth()))return 65}if(this.getJewishMonth()===m.NISSAN){if(this.getJewishDayOfMonth()==1)return 65;if(this.getJewishDayOfMonth()>=8&&this.getJewishDayOfMonth()<=14)return 68}if(this.getJewishMonth()==m.AV){if(this.getJewishDayOfMonth()>=4&&this.getJewishDayOfMonth()<=9)return 69;if(this.getJewishDayOfMonth()>=10&&this.getJewishDayOfMonth()<=16)return 70}return this.getJewishMonth()==m.TISHREI&&this.getJewishDayOfMonth()>=3&&this.getJewishDayOfMonth()<=8?66:this.getParshah()==16?67:0}getUpcomingParshah(){let a=this.clone(),n=(H.SATURDAY-this.getDayOfWeek()+7)%7;for(this.getDayOfWeek()!=H.SATURDAY?a.forward(H.DATE,n):a.forward(H.DATE,7);a.getParshah()==0;)a.forward(H.DATE,7);return a.getParshah()}getYomTovIndex(){let a=this.getJewishDayOfMonth(),n=this.getDayOfWeek();switch(this.getJewishMonth()){case m.NISSAN:if(a===14)return m.EREV_PESACH;if(a===15||a===21||!this.inIsrael&&(a===16||a===22))return m.PESACH;if(a>=17&&a<=20||a===16&&this.inIsrael)return m.CHOL_HAMOED_PESACH;if(this.isUseModernHolidays()&&(a===26&&n===5||a===28&&n===2||a===27&&n!==1&&n!==6))return m.YOM_HASHOAH;break;case m.IYAR:if(this.isUseModernHolidays()&&(a===4&&n===3||(a===3||a===2)&&n===4||a===5&&n===2))return m.YOM_HAZIKARON;if(this.isUseModernHolidays()&&(a===5&&n===4||(a===4||a===3)&&n===5||a===6&&n===3))return m.YOM_HAATZMAUT;if(a===14)return m.PESACH_SHENI;if(a===18)return m.LAG_BAOMER;if(this.isUseModernHolidays()&&a===28)return m.YOM_YERUSHALAYIM;break;case m.SIVAN:if(a===5)return m.EREV_SHAVUOS;if(a===6||a===7&&!this.inIsrael)return m.SHAVUOS;break;case m.TAMMUZ:if(a===17&&n!==7||a===18&&n===1)return m.SEVENTEEN_OF_TAMMUZ;break;case m.AV:if(n===1&&a===10||n!==7&&a===9)return m.TISHA_BEAV;if(a===15)return m.TU_BEAV;break;case m.ELUL:if(a===29)return m.EREV_ROSH_HASHANA;break;case m.TISHREI:if(a===1||a===2)return m.ROSH_HASHANA;if(a===3&&n!==7||a===4&&n===1)return m.FAST_OF_GEDALYAH;if(a===9)return m.EREV_YOM_KIPPUR;if(a===10)return m.YOM_KIPPUR;if(a===14)return m.EREV_SUCCOS;if(a===15||a===16&&!this.inIsrael)return m.SUCCOS;if(a>=17&&a<=20||a===16&&this.inIsrael)return m.CHOL_HAMOED_SUCCOS;if(a===21)return m.HOSHANA_RABBA;if(a===22)return m.SHEMINI_ATZERES;if(a===23&&!this.inIsrael)return m.SIMCHAS_TORAH;break;case m.KISLEV:if(a>=25)return m.CHANUKAH;break;case m.TEVES:if(a===1||a===2||a===3&&this.isKislevShort())return m.CHANUKAH;if(a===10)return m.TENTH_OF_TEVES;break;case m.SHEVAT:if(a===15)return m.TU_BESHVAT;break;case m.ADAR:if(this.isJewishLeapYear()){if(a===14)return m.PURIM_KATAN;if(a===15)return m.SHUSHAN_PURIM_KATAN}else{if((a===11||a===12)&&n===5||a===13&&!(n===6||n===7))return m.FAST_OF_ESTHER;if(a===14)return m.PURIM;if(a===15)return m.SHUSHAN_PURIM}break;case m.ADAR_II:if((a===11||a===12)&&n===5||a===13&&!(n===6||n===7))return m.FAST_OF_ESTHER;if(a===14)return m.PURIM;if(a===15)return m.SHUSHAN_PURIM;break}return-1}isYomTov(){let a=this.getYomTovIndex();return this.isErevYomTov()&&(a!==m.HOSHANA_RABBA||a===m.CHOL_HAMOED_PESACH&&this.getJewishDayOfMonth()!==20)||this.isTaanis()&&a!==m.YOM_KIPPUR?!1:this.getYomTovIndex()!==-1}isYomTovAssurBemelacha(){let a=[m.PESACH,m.SHAVUOS,m.SUCCOS,m.SHEMINI_ATZERES,m.SIMCHAS_TORAH,m.ROSH_HASHANA,m.YOM_KIPPUR],n=this.getYomTovIndex();return a.includes(n)}isAssurBemelacha(){return this.getDayOfWeek()===gn||this.isYomTovAssurBemelacha()}hasCandleLighting(){return this.isTomorrowShabbosOrYomTov()}isTomorrowShabbosOrYomTov(){return this.getDayOfWeek()===y0||this.isErevYomTov()||this.isErevYomTovSheni()}isErevYomTovSheni(){return this.getJewishMonth()===m.TISHREI&&this.getJewishDayOfMonth()===1||!this.getInIsrael()&&(this.getJewishMonth()===m.NISSAN&&[15,21].includes(this.getJewishDayOfMonth())||this.getJewishMonth()===m.TISHREI&&[15,22].includes(this.getJewishDayOfMonth())||this.getJewishMonth()===m.SIVAN&&this.getJewishDayOfMonth()===6)}isAseresYemeiTeshuva(){return this.getJewishMonth()===m.TISHREI&&this.getJewishDayOfMonth()<=10}isPesach(){let a=this.getYomTovIndex();return a==m.PESACH||a==m.CHOL_HAMOED_PESACH}isCholHamoedPesach(){return this.getYomTovIndex()===m.CHOL_HAMOED_PESACH}isShavuos(){return this.getYomTovIndex()==m.SHAVUOS}isRoshHashana(){return this.getYomTovIndex()==m.ROSH_HASHANA}isYomKippur(){return this.getYomTovIndex()==m.YOM_KIPPUR}isSuccos(){let a=this.getYomTovIndex();return a==m.SUCCOS||a==m.CHOL_HAMOED_SUCCOS||a==m.HOSHANA_RABBA}isHoshanaRabba(){return this.getYomTovIndex()==m.HOSHANA_RABBA}isShminiAtzeres(){return this.getYomTovIndex()==m.SHEMINI_ATZERES}isSimchasTorah(){return this.getYomTovIndex()==m.SIMCHAS_TORAH}isCholHamoedSuccos(){return this.getYomTovIndex()===m.CHOL_HAMOED_SUCCOS}isCholHamoed(){return this.isCholHamoedPesach()||this.isCholHamoedSuccos()}isErevYomTov(){let a=[m.EREV_PESACH,m.EREV_SHAVUOS,m.EREV_ROSH_HASHANA,m.EREV_YOM_KIPPUR,m.EREV_SUCCOS,m.HOSHANA_RABBA],n=this.getYomTovIndex();return a.includes(n)||n===m.CHOL_HAMOED_PESACH&&this.getJewishDayOfMonth()===20}isErevRoshChodesh(){return this.getJewishDayOfMonth()===29&&this.getJewishMonth()!==m.ELUL}isYomKippurKatan(){let a=this.getDayOfWeek(),n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return n==P.ELUL||n==P.TISHREI||n==P.KISLEV||n==P.NISSAN?!1:o==29&&a!=H.FRIDAY&&a!=H.SATURDAY||(o==27||o==28)&&a==H.THURSDAY}isBeHaB(){let a=this.getDayOfWeek(),n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return(n==P.CHESHVAN||n==P.IYAR)&&(a==H.MONDAY&&o>4&&o<18||a==H.THURSDAY&&o>7&&o<14)}isTaanis(){let a=[m.SEVENTEEN_OF_TAMMUZ,m.TISHA_BEAV,m.YOM_KIPPUR,m.FAST_OF_GEDALYAH,m.TENTH_OF_TEVES,m.FAST_OF_ESTHER],n=this.getYomTovIndex();return a.includes(n)}isTaanisBechoros(){let a=this.getJewishDayOfMonth(),n=this.getDayOfWeek();return this.getJewishMonth()===m.NISSAN&&(a===14&&n!==H.SATURDAY||a===12&&n===H.THURSDAY)}getDayOfChanukah(){let a=this.getJewishDayOfMonth();return this.isChanukah()?this.getJewishMonth()===m.KISLEV?a-24:this.isKislevShort()?a+5:a+6:-1}isChanukah(){return this.getYomTovIndex()===m.CHANUKAH}isPurim(){return this.isMukafChoma?this.getYomTovIndex()==m.SHUSHAN_PURIM:this.getYomTovIndex()==m.PURIM}isRoshChodesh(){return this.getJewishDayOfMonth()===1&&this.getJewishMonth()!==m.TISHREI||this.getJewishDayOfMonth()===30}isMacharChodesh(){return this.getDayOfWeek()===gn&&(this.getJewishDayOfMonth()===30||this.getJewishDayOfMonth()===29)}isShabbosMevorchim(){return this.getDayOfWeek()===gn&&this.getJewishDayOfMonth()>=23&&this.getJewishDayOfMonth()<=29&&this.getJewishMonth()!==m.ELUL}getDayOfOmer(){let a=-1,n=this.getJewishMonth(),o=this.getJewishDayOfMonth();return n===m.NISSAN&&o>=16?a=o-15:n===m.IYAR?a=o+15:n===m.SIVAN&&o<6&&(a=o+44),a}getMoladAsDate(){let a=this.getMolad(),n="Jerusalem, Israel",o=31.778,r=35.2354,i="+02:00",s=new Oa(n,o,r,i),u=a.getMoladChalakim()*10/3,h=Math.trunc(1e3*(u-Math.trunc(u)));return S.ZonedDateTime.from({timeZone:s.getTimeZone(),year:a.getGregorianYear(),month:a.getGregorianMonth()+1,day:a.getGregorianDayOfMonth(),hour:a.getMoladHours(),minute:a.getMoladMinutes(),second:Math.trunc(u),millisecond:h}).subtract({nanoseconds:Math.trunc(s.getLocalMeanTimeOffset())})}getTchilasZmanKidushLevana3Days(){return this.getMoladAsDate().add({hours:72})}getTchilasZmanKidushLevana7Days(){return this.getMoladAsDate().add({hours:168})}getSofZmanKidushLevanaBetweenMoldos(){return this.getMoladAsDate().add({days:14,hours:18,minutes:22,seconds:1,milliseconds:666})}getSofZmanKidushLevana15Days(){return this.getMoladAsDate().add({days:15})}getDafYomiBavli(){return Bo.getDafYomiBavli(this)}getDafYomiYerushalmi(){return Vo.getDafYomiYerushalmi(this)}getChafetzChayimYomi(){return Fo.getChafetzChayimYomi(this)}getTekufasTishreiElapsedDays(){let a=m.getJewishCalendarElapsedDays(this.getJewishYear())+(this.getDaysSinceStartOfJewishYear()-1)+.5,n=(this.getJewishYear()-1)*365.25;return Math.floor(a-n)}isIsruChag(){return this.getYomTovIndex()==m.ISRU_CHAG}equals(a){return S.PlainDate.compare(this.getDate(),a.getDate())===0&&this.getInIsrael()===a.getInIsrael()}};m.EREV_PESACH=0,m.PESACH=1,m.CHOL_HAMOED_PESACH=2,m.PESACH_SHENI=3,m.EREV_SHAVUOS=4,m.SHAVUOS=5,m.SEVENTEEN_OF_TAMMUZ=6,m.TISHA_BEAV=7,m.TU_BEAV=8,m.EREV_ROSH_HASHANA=9,m.ROSH_HASHANA=10,m.FAST_OF_GEDALYAH=11,m.EREV_YOM_KIPPUR=12,m.YOM_KIPPUR=13,m.EREV_SUCCOS=14,m.SUCCOS=15,m.CHOL_HAMOED_SUCCOS=16,m.HOSHANA_RABBA=17,m.SHEMINI_ATZERES=18,m.SIMCHAS_TORAH=19,m.CHANUKAH=21,m.TENTH_OF_TEVES=22,m.TU_BESHVAT=23,m.FAST_OF_ESTHER=24,m.PURIM=25,m.SHUSHAN_PURIM=26,m.PURIM_KATAN=27,m.ROSH_CHODESH=28,m.YOM_HASHOAH=29,m.YOM_HAZIKARON=30,m.YOM_HAATZMAUT=31,m.YOM_YERUSHALAYIM=32,m.LAG_BAOMER=33,m.SHUSHAN_PURIM_KATAN=34,m.ISRU_CHAG=35,m.YOM_KIPPUR_KATAN=36,m.BEHAB=37,m.parshalist=[[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,61],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,0,35,36,37,38,59,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,58,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,55,24,25,0,26,56,57,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,51],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61],[0,52,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],[0,0,53,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,0,29,30,31,32,33,34,35,36,37,38,39,40,41,60,44,45,46,47,48,49,50,61]];var R=m;var rt=class rt extends Za{constructor(){super(...arguments);this.useElevation=!1;this.useAstronomicalChatzos=!0;this.useAstronomicalChatzosForOtherZmanim=!1;this.candleLightingOffset=18}isUseElevation(){return this.useElevation}setUseElevation(a){this.useElevation=a}isUseAstronomicalChatzos(){return this.useAstronomicalChatzos}setUseAstronomicalChatzos(a){this.useAstronomicalChatzos=a}isUseAstronomicalChatzosForOtherZmanim(){return this.useAstronomicalChatzosForOtherZmanim}setUseAstronomicalChatzosForOtherZmanim(a){this.useAstronomicalChatzosForOtherZmanim=a}getElevationAdjustedSunrise(){return this.isUseElevation()?super.getSunrise():this.getSeaLevelSunrise()}getElevationAdjustedSunset(){return this.isUseElevation()?super.getSunset():this.getSeaLevelSunset()}getTzais(){return this.getSunsetOffsetByDegrees(rt.ZENITH_8_POINT_5)}getAlosHashachar(){return this.getSunriseOffsetByDegrees(rt.ZENITH_16_POINT_1)}getAlos72(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:72})}getChatzos(){if(this.useAstronomicalChatzos)return this.getSunTransit();{let a=this.getChatzosAsHalfDay();return a??this.getSunTransit()}}getChatzosAsHalfDay(){return this.getSunTransit(this.getSeaLevelSunrise(),this.getSeaLevelSunset())}getSofZmanShma(a,n){return this.getShaahZmanisBasedZman(a,n,3)}getSofZmanShmaGRA(){return this.getSofZmanShma(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSofZmanShmaMGA(){return this.getSofZmanShma(this.getAlos72(),this.getTzais72())}getTzais72(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:72})}getCandleLighting(){var a;return(a=this.getSeaLevelSunset())==null?void 0:a.subtract({minutes:this.getCandleLightingOffset()})}getSofZmanTfila(a,n){return this.getShaahZmanisBasedZman(a,n,4)}getSofZmanTfilaGRA(){return this.getSofZmanTfila(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSofZmanTfilaMGA(){return this.getSofZmanTfila(this.getAlos72(),this.getTzais72())}getMinchaGedola(a,n){if(!a&&!n)return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),this.getSunset(),.5):this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset(),6.5);if(a&&n)return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),n,.5):this.getShaahZmanisBasedZman(a,n,6.5);throw new Z("Need valid parameters")}getSamuchLeMinchaKetana(a,n){return this.getShaahZmanisBasedZman(a,n,9)}getMinchaKetana(a=this.getElevationAdjustedSunrise(),n=this.getElevationAdjustedSunset()){return this.getShaahZmanisBasedZman(a,n,9.5)}getPlagHamincha(a=this.getElevationAdjustedSunrise(),n=this.getElevationAdjustedSunset()){return this.getShaahZmanisBasedZman(a,n,10.75)}getShaahZmanisGra(){return this.getTemporalHour(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getShaahZmanisMGA(){return this.getTemporalHour(this.getAlos72(),this.getTzais72())}getCandleLightingOffset(){return this.candleLightingOffset}setCandleLightingOffset(a){this.candleLightingOffset=a}getClassName(){return"com.kosherjava.zmanim.ZmanimCalendar"}isAssurBemlacha(a,n,o){let r=new R,i=this.getDate();r.setGregorianDate(i.year,i.month-1,i.day),r.setInIsrael(o);let s=this.getElevationAdjustedSunset();if(!s)throw new Lo;return r.hasCandleLighting()&&a>=s?!0:r.isAssurBemelacha()&&a<=n}getShaahZmanisBasedZman(a,n,o){let r=this.getTemporalHour(a,n),i=S.Duration.from({nanoseconds:Math.trunc(r.total("nanoseconds")*o)});return a.add(i)}getHalfDayBasedZman(a,n,o){if(a==null||n==null)return null;let r=a.until(n).total({unit:"nanoseconds"})/6,i=S.Duration.from({nanoseconds:Math.trunc(r*o)});return a.add(i)}getPercentOfShaahZmanisFromDegrees(a,n){let o=this.getSeaLevelSunrise(),r=this.getSeaLevelSunset(),i=null;if(n?i=this.getSunsetOffsetByDegrees(rt.GEOMETRIC_ZENITH+a):i=this.getSunriseOffsetByDegrees(rt.GEOMETRIC_ZENITH+a),o==null||r==null||i==null)return bl;let s=o.until(r).total("nanoseconds")/12,u;return n?u=r.until(i).total("nanoseconds"):u=i.until(o).total("nanoseconds"),u/s}};rt.ZENITH_16_POINT_1=rt.GEOMETRIC_ZENITH+16.1,rt.ZENITH_8_POINT_5=rt.GEOMETRIC_ZENITH+8.5;var Zt=rt;var Es=(t,e)=>S.ZonedDateTime.compare(t,e)*-1,T=class T extends Zt{constructor(){super(...arguments);this.ateretTorahSunsetOffset=40}getShaahZmanis19Point8Degrees(){return this.getTemporalHour(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getShaahZmanis18Degrees(){return this.getTemporalHour(this.getAlos18Degrees(),this.getTzais18Degrees())}getShaahZmanis26Degrees(){return this.getTemporalHour(this.getAlos26Degrees(),this.getTzais26Degrees())}getShaahZmanis16Point1Degrees(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getShaahZmanis60Minutes(){return this.getTemporalHour(this.getAlos60(),this.getTzais60())}getShaahZmanis72Minutes(){return this.getShaahZmanisMGA()}getShaahZmanis72MinutesZmanis(){return this.getTemporalHour(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getShaahZmanis90Minutes(){return this.getTemporalHour(this.getAlos90(),this.getTzais90())}getShaahZmanis90MinutesZmanis(){return this.getTemporalHour(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getShaahZmanis96MinutesZmanis(){return this.getTemporalHour(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getShaahZmanisAteretTorah(){return this.getTemporalHour(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getShaahZmanisAlos16Point1ToTzais3Point8(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point8Degrees())}getShaahZmanisAlos16Point1ToTzais3Point7(){return this.getTemporalHour(this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point7Degrees())}getShaahZmanis96Minutes(){return this.getTemporalHour(this.getAlos96(),this.getTzais96())}getShaahZmanis120Minutes(){return this.getTemporalHour(this.getAlos120(),this.getTzais120())}getShaahZmanis120MinutesZmanis(){return this.getTemporalHour(this.getAlos120Zmanis(),this.getTzais120Zmanis())}getPlagHamincha120MinutesZmanis(){return this.getPlagHamincha(this.getAlos120Zmanis(),this.getTzais120Zmanis())}getPlagHamincha120Minutes(){return this.getPlagHamincha(this.getAlos120(),this.getTzais120())}getAlos60(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:60})}getAlos72Zmanis(){return this.getZmanisBasedOffset(-1.2)}getAlos96(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:96})}getAlos90Zmanis(){return this.getZmanisBasedOffset(-1.5)}getAlos96Zmanis(){return this.getZmanisBasedOffset(-1.6)}getAlos90(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:90})}getAlos120(){var a;return(a=this.getElevationAdjustedSunrise())==null?void 0:a.subtract({minutes:120})}getAlos120Zmanis(){return this.getZmanisBasedOffset(-2)}getAlos26Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_26_DEGREES)}getAlos18Degrees(){return this.getSunriseOffsetByDegrees(T.ASTRONOMICAL_ZENITH)}getAlos19Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_19_DEGREES)}getAlos19Point8Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_19_POINT_8)}getAlos16Point1Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_16_POINT_1)}getMisheyakir11Point5Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_11_POINT_5)}getMisheyakir11Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_11_DEGREES)}getMisheyakir10Point2Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_10_POINT_2)}getMisheyakir7Point65Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_7_POINT_65)}getMisheyakir9Point5Degrees(){return this.getSunriseOffsetByDegrees(T.ZENITH_9_POINT_5)}getSofZmanShmaMGA19Point8Degrees(){return this.getSofZmanShma(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getSofZmanShmaMGA16Point1Degrees(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSofZmanShmaMGA18Degrees(){return this.getSofZmanShma(this.getAlos18Degrees(),this.getTzais18Degrees())}getSofZmanShmaMGA72Minutes(){return this.getSofZmanShmaMGA()}getSofZmanShmaMGA72MinutesZmanis(){return this.getSofZmanShma(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getSofZmanShmaMGA90Minutes(){return this.getSofZmanShma(this.getAlos90(),this.getTzais90())}getSofZmanShmaMGA90MinutesZmanis(){return this.getSofZmanShma(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getSofZmanShmaMGA96Minutes(){return this.getSofZmanShma(this.getAlos96(),this.getTzais96())}getSofZmanShmaMGA96MinutesZmanis(){return this.getSofZmanShma(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getSofZmanShma3HoursBeforeChatzos(){var a;return(a=this.getChatzos())==null?void 0:a.subtract({minutes:180})}getSofZmanShmaMGA120Minutes(){return this.getSofZmanShma(this.getAlos120(),this.getTzais120())}getSofZmanShmaAlos16Point1ToSunset(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getElevationAdjustedSunset())}getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(){return this.getSofZmanShma(this.getAlos16Point1Degrees(),this.getTzaisGeonim7Point083Degrees())}getSofZmanShmaKolEliyahu(){var o;let a=this.getFixedLocalChatzos();if(a===null||this.getSunrise()===null)return null;let n=S.Duration.from({nanoseconds:Math.trunc(((o=this.getElevationAdjustedSunrise())==null?void 0:o.until(a).total("nanoseconds"))/2)});return a.subtract(n)}getSofZmanTfilaMGA19Point8Degrees(){return this.getSofZmanTfila(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getSofZmanTfilaMGA16Point1Degrees(){return this.getSofZmanTfila(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSofZmanTfilaMGA18Degrees(){return this.getSofZmanTfila(this.getAlos18Degrees(),this.getTzais18Degrees())}getSofZmanTfilaMGA72Minutes(){return this.getSofZmanTfilaMGA()}getSofZmanTfilaMGA72MinutesZmanis(){return this.getSofZmanTfila(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getSofZmanTfilaMGA90Minutes(){return this.getSofZmanTfila(this.getAlos90(),this.getTzais90())}getSofZmanTfilaMGA90MinutesZmanis(){return this.getSofZmanTfila(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getSofZmanTfilaMGA96Minutes(){return this.getSofZmanTfila(this.getAlos96(),this.getTzais96())}getSofZmanTfilaMGA96MinutesZmanis(){return this.getSofZmanTfila(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getSofZmanTfilaMGA120Minutes(){return this.getSofZmanTfila(this.getAlos120(),this.getTzais120())}getSofZmanTfila2HoursBeforeChatzos(){var a;return(a=this.getChatzos())==null?void 0:a.subtract({minutes:120})}getMinchaGedola30Minutes(){var a;return(a=this.getChatzos())==null?void 0:a.add({minutes:30})}getMinchaGedola72Minutes(){return this.getMinchaGedola(this.getAlos72(),this.getTzais72())}getMinchaGedola16Point1Degrees(){return this.isUseAstronomicalChatzosForOtherZmanim()?this.getHalfDayBasedZman(this.getChatzos(),this.getTzais16Point1Degrees(),.5):this.getMinchaGedola(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getMinchaGedolaAhavatShalom(){var a;return!this.getMinchaGedola30Minutes()||!this.getMinchaGedola()||!this.getShaahZmanisAlos16Point1ToTzais3Point7()?(console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(),this.getAlos16Point1Degrees(),this.getTzaisGeonim3Point7Degrees()),null):[this.getMinchaGedola30Minutes(),(a=this.getChatzos())==null?void 0:a.add({nanoseconds:Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7().total("nanoseconds")/2)})].sort(Es)[0]}getMinchaGedolaGreaterThan30(){return this.getMinchaGedola30Minutes()===null||this.getMinchaGedola()===null?null:[this.getMinchaGedola30Minutes(),this.getMinchaGedola()].sort(Es)[0]}getMinchaKetana16Point1Degrees(){return this.getMinchaKetana(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getMinchaKetanaAhavatShalom(){var a,n;return(n=this.getTzaisGeonim3Point8Degrees())==null?void 0:n.subtract({nanoseconds:Math.trunc(((a=this.getShaahZmanisAlos16Point1ToTzais3Point8())==null?void 0:a.total("nanoseconds"))*2.5)})}getMinchaKetana72Minutes(){return this.getMinchaKetana(this.getAlos72(),this.getTzais72())}getPlagHamincha60Minutes(){return this.getPlagHamincha(this.getAlos60(),this.getTzais60())}getPlagHamincha72Minutes(){return this.getPlagHamincha(this.getAlos72(),this.getTzais72())}getPlagHamincha90Minutes(){return this.getPlagHamincha(this.getAlos90(),this.getTzais90())}getPlagHamincha96Minutes(){return this.getPlagHamincha(this.getAlos96(),this.getTzais96())}getPlagHamincha96MinutesZmanis(){return this.getPlagHamincha(this.getAlos96Zmanis(),this.getTzais96Zmanis())}getPlagHamincha90MinutesZmanis(){return this.getPlagHamincha(this.getAlos90Zmanis(),this.getTzais90Zmanis())}getPlagHamincha72MinutesZmanis(){return this.getPlagHamincha(this.getAlos72Zmanis(),this.getTzais72Zmanis())}getPlagHamincha16Point1Degrees(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getPlagHamincha19Point8Degrees(){return this.getPlagHamincha(this.getAlos19Point8Degrees(),this.getTzais19Point8Degrees())}getPlagHamincha26Degrees(){return this.getPlagHamincha(this.getAlos26Degrees(),this.getTzais26Degrees())}getPlagHamincha18Degrees(){return this.getPlagHamincha(this.getAlos18Degrees(),this.getTzais18Degrees())}getPlagAlosToSunset(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getElevationAdjustedSunset())}getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(){return this.getPlagHamincha(this.getAlos16Point1Degrees(),this.getTzaisGeonim7Point083Degrees())}getPlagAhavatShalom(){var n,o;let a=S.Duration.from({nanoseconds:((n=this.getShaahZmanisAlos16Point1ToTzais3Point8())==null?void 0:n.total("nanoseconds"))*1.25});return(o=this.getTzaisGeonim3Point8Degrees())==null?void 0:o.subtract(a)}getBainHashmashosRT13Point24Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_13_POINT_24)}getBainHashmashosRT58Point5Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:58,seconds:30})}getBainHashmashosRT13Point5MinutesBefore7Point083Degrees(){var a;return(a=this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_083))==null?void 0:a.subtract({minutes:13,seconds:30})}getBainHashmashosRT2Stars(){var r;let a=this.getAlos19Point8Degrees(),n=this.getElevationAdjustedSunrise();if(a===null||n===null)return null;let o=-a.until(n).total("nanoseconds");return(r=this.getElevationAdjustedSunset())==null?void 0:r.add({nanoseconds:o*(5/18)})}getBainHashmashosYereim18Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:18})}getBainHashmashosYereim3Point05Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_3_POINT_05)}getBainHashmashosYereim16Point875Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:16,seconds:52,milliseconds:500})}getBainHashmashosYereim2Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_2_POINT_8)}getBainHashmashosYereim13Point5Minutes(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.subtract({minutes:13,seconds:30})}getBainHashmashosYereim2Point1Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_MINUS_2_POINT_1)}getTzaisGeonim3Point7Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_7)}getTzaisGeonim3Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_8)}getTzaisGeonim5Point95Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_5_POINT_95)}getTzaisGeonim3Point65Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_65)}getTzaisGeonim3Point676Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_3_POINT_676)}getTzaisGeonim4Point61Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_61)}getTzaisGeonim4Point37Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_37)}getTzaisGeonim5Point88Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_5_POINT_88)}getTzaisGeonim4Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_4_POINT_8)}getTzaisGeonim6Point45Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_6_POINT_45)}getTzaisGeonim7Point083Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_083)}getTzaisGeonim7Point67Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_7_POINT_67)}getTzaisGeonim8Point5Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_8_POINT_5)}getTzaisGeonim9Point3Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_9_POINT_3)}getTzaisGeonim9Point75Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_9_POINT_75)}getTzais60(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:60})}getTzaisAteretTorah(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:this.getAteretTorahSunsetOffset()})}getAteretTorahSunsetOffset(){return this.ateretTorahSunsetOffset}setAteretTorahSunsetOffset(a){this.ateretTorahSunsetOffset=a}getSofZmanShmaAteretTorah(){return this.getSofZmanShma(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getSofZmanTfilahAteretTorah(){return this.getSofZmanTfila(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMinchaGedolaAteretTorah(){return this.getMinchaGedola(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMinchaKetanaAteretTorah(){return this.getMinchaKetana(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getPlagHaminchaAteretTorah(){return this.getPlagHamincha(this.getAlos72Zmanis(),this.getTzaisAteretTorah())}getMesheyakirAteretTorah(a){var n;return(n=this.getAlos72Zmanis())==null?void 0:n.add({minutes:a})}getTzais72Zmanis(){return this.getZmanisBasedOffset(1.2)}getZmanisBasedOffset(a){var o,r;if(a==0)return;let n=S.Duration.from({nanoseconds:Math.trunc(this.getShaahZmanisGra().total("nanoseconds")*Math.abs(a))});return a>0?(o=this.getElevationAdjustedSunset())==null?void 0:o.add(n):(r=this.getElevationAdjustedSunrise())==null?void 0:r.subtract(n)}getTzais90Zmanis(){return this.getZmanisBasedOffset(1.5)}getTzais96Zmanis(){return this.getZmanisBasedOffset(1.6)}getTzais90(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:90})}getTzais120(){return this.getElevationAdjustedSunset().add({minutes:120})}getTzais120Zmanis(){return this.getZmanisBasedOffset(2)}getTzais16Point1Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_16_POINT_1)}getTzais26Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_26_DEGREES)}getTzais18Degrees(){return this.getSunsetOffsetByDegrees(T.ASTRONOMICAL_ZENITH)}getTzais19Point8Degrees(){return this.getSunsetOffsetByDegrees(T.ZENITH_19_POINT_8)}getTzais96(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:96})}getFixedLocalChatzos(){return this.getLocalMeanTime(12)}getSofZmanShmaFixedLocal(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.subtract({minutes:180})}getSofZmanTfilaFixedLocal(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.subtract({minutes:120})}getSofZmanKidushLevanaBetweenMoldos(a,n){let o=new R(this.getDate());return o.getJewishDayOfMonth()<11||o.getJewishDayOfMonth()>16?null:this.getMoladBasedTime(o.getSofZmanKidushLevanaBetweenMoldos(),a,n,!1)}getMoladBasedTime(a,n,o,r){let i=this.getMidnightLastNight(),s=this.getMidnightTonight();return as?null:n!==null||o!==null?r&&!(an)?o:n:a}getSofZmanKidushLevana15Days(a=null,n=null){let o=new R(this.getDate());return o.getJewishDayOfMonth()<11||o.getJewishDayOfMonth()>17?null:this.getMoladBasedTime(o.getSofZmanKidushLevana15Days(),a,n,!1)}getTchilasZmanKidushLevana3Days(a=null,n=null){let o=new R;if(o.setGregorianDate(this.getDate().year,this.getDate().month-1,this.getDate().day),o.getJewishDayOfMonth()>5&&o.getJewishDayOfMonth()<30)return null;let r=this.getMoladBasedTime(o.getTchilasZmanKidushLevana3Days(),a,n,!0);return r===null&&o.getJewishDayOfMonth()===30&&(o.forward(H.MONTH,1),r=this.getMoladBasedTime(o.getTchilasZmanKidushLevana3Days(),null,null,!0)),r}getZmanMolad(){let a=new R(this.getDate());if(a.getJewishDayOfMonth()>2&&a.getJewishDayOfMonth()<27)return null;let n=this.getMoladBasedTime(a.getMoladAsDate(),null,null,!0);return n===null&&a.getJewishDayOfMonth()>26&&(a.setDate(a.getDate().add({months:1})),n=this.getMoladBasedTime(a.getMoladAsDate(),null,null,!0)),n}getMidnightLastNight(){return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({hour:0,minute:0,second:0,millisecond:0})}getMidnightTonight(){return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).add({days:1}).with({hour:0,minute:0,second:0,millisecond:0})}getTchilasZmanKidushLevana7Days(a=null,n=null){let o=new R(this.getDate());return o.getJewishDayOfMonth()<4||o.getJewishDayOfMonth()>9?null:this.getMoladBasedTime(o.getTchilasZmanKidushLevana7Days(),a,n,!0)}getSofZmanAchilasChametzGRA(){return this.getSofZmanTfilaGRA()}getSofZmanAchilasChametzMGA72Minutes(){return this.getSofZmanTfilaMGA72Minutes()}getSofZmanAchilasChametzMGA16Point1Degrees(){return this.getSofZmanTfilaMGA16Point1Degrees()}getSofZmanBiurChametzGRA(){return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset(),5)}getSofZmanBiurChametzMGA72Minutes(){return this.getShaahZmanisBasedZman(this.getAlos72(),this.getTzais72(),5)}getSofZmanBiurChametzMGA16Point1Degrees(){return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees(),5)}getSunriseBaalHatanya(){return this.getSunriseOffsetByDegrees(T.ZENITH_1_POINT_583)}getSunsetBaalHatanya(){return this.getSunsetOffsetByDegrees(T.ZENITH_1_POINT_583)}getShaahZmanisBaalHatanya(){return this.getTemporalHour(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getAlosBaalHatanya(){return this.getSunriseOffsetByDegrees(T.ZENITH_16_POINT_9)}getSofZmanShmaBaalHatanya(){return this.getSofZmanShma(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getSofZmanTfilaBaalHatanya(){return this.getSofZmanTfila(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getSofZmanAchilasChametzBaalHatanya(){return this.getSofZmanTfilaBaalHatanya()}getSofZmanBiurChametzBaalHatanya(){return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya(),5)}getMinchaGedolaBaalHatanya(){return this.getMinchaGedola(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getMinchaGedolaBaalHatanyaGreaterThan30(){return this.getMinchaGedola30Minutes()===null||this.getMinchaGedolaBaalHatanya()===null?null:[this.getMinchaGedola30Minutes(),this.getMinchaGedolaBaalHatanya()].sort(Es)[0]}getMinchaKetanaBaalHatanya(){return this.getMinchaKetana(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getPlagHaminchaBaalHatanya(){return this.getPlagHamincha(this.getSunriseBaalHatanya(),this.getSunsetBaalHatanya())}getTzaisBaalHatanya(){return this.getSunsetOffsetByDegrees(T.ZENITH_6_DEGREES)}getFixedLocalChatzosBasedZmanim(a,n,o){if(a==null||n==null)return null;let r=a.until(n).total("nanoseconds")/6;return a.add({nanoseconds:Math.trunc(r*o)})}getSofZmanShmaMGA18DegreesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA90MinutesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos90(),this.getFixedLocalChatzos(),3)}getSofZmanShmaMGA72MinutesToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getAlos72(),this.getFixedLocalChatzos(),3)}getSofZmanShmaGRASunriseToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getSunrise(),this.getFixedLocalChatzos(),3)}getSofZmanTfilaGRASunriseToFixedLocalChatzos(){return this.getFixedLocalChatzosBasedZmanim(this.getSunrise(),this.getFixedLocalChatzos(),4)}getMinchaGedolaGRAFixedLocalChatzos30Minutes(){var a;return(a=this.getFixedLocalChatzos())==null?void 0:a.add({minutes:30})}getMinchaKetanaGRAFixedLocalChatzosToSunset(){return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos(),this.getSunset(),3.5)}getPlagHaminchaGRAFixedLocalChatzosToSunset(){return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos(),this.getSunset(),4.75)}getTzais50(){var a;return(a=this.getElevationAdjustedSunset())==null?void 0:a.add({minutes:50})}getSamuchLeMinchaKetanaGRA(){return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise(),this.getElevationAdjustedSunset())}getSamuchLeMinchaKetana16Point1Degrees(){return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees(),this.getTzais16Point1Degrees())}getSamuchLeMinchaKetana72Minutes(){return this.getSamuchLeMinchaKetana(this.getAlos72(),this.getTzais72())}getClassName(){return"com.kosherjava.zmanim.ComplexZmanimCalendar"}};T.ZENITH_3_POINT_7=T.GEOMETRIC_ZENITH+3.7,T.ZENITH_3_POINT_8=T.GEOMETRIC_ZENITH+3.8,T.ZENITH_5_POINT_95=T.GEOMETRIC_ZENITH+5.95,T.ZENITH_7_POINT_083=T.GEOMETRIC_ZENITH+7+5/60,T.ZENITH_10_POINT_2=T.GEOMETRIC_ZENITH+10.2,T.ZENITH_11_DEGREES=T.GEOMETRIC_ZENITH+11,T.ZENITH_11_POINT_5=T.GEOMETRIC_ZENITH+11.5,T.ZENITH_13_POINT_24=T.GEOMETRIC_ZENITH+13.24,T.ZENITH_19_DEGREES=T.GEOMETRIC_ZENITH+19,T.ZENITH_19_POINT_8=T.GEOMETRIC_ZENITH+19.8,T.ZENITH_26_DEGREES=T.GEOMETRIC_ZENITH+26,T.ZENITH_4_POINT_37=T.GEOMETRIC_ZENITH+4.37,T.ZENITH_4_POINT_61=T.GEOMETRIC_ZENITH+4.61,T.ZENITH_4_POINT_8=T.GEOMETRIC_ZENITH+4.8,T.ZENITH_3_POINT_65=T.GEOMETRIC_ZENITH+3.65,T.ZENITH_3_POINT_676=T.GEOMETRIC_ZENITH+3.676,T.ZENITH_5_POINT_88=T.GEOMETRIC_ZENITH+5.88,T.ZENITH_1_POINT_583=T.GEOMETRIC_ZENITH+1.583,T.ZENITH_16_POINT_9=T.GEOMETRIC_ZENITH+16.9,T.ZENITH_6_DEGREES=T.GEOMETRIC_ZENITH+6,T.ZENITH_6_POINT_45=T.GEOMETRIC_ZENITH+6.45,T.ZENITH_7_POINT_65=T.GEOMETRIC_ZENITH+7.65,T.ZENITH_7_POINT_67=T.GEOMETRIC_ZENITH+7.67,T.ZENITH_9_POINT_3=T.GEOMETRIC_ZENITH+9.3,T.ZENITH_9_POINT_5=T.GEOMETRIC_ZENITH+9.5,T.ZENITH_9_POINT_75=T.GEOMETRIC_ZENITH+9.75,T.ZENITH_MINUS_2_POINT_1=T.GEOMETRIC_ZENITH-2.1,T.ZENITH_MINUS_2_POINT_8=T.GEOMETRIC_ZENITH-2.8,T.ZENITH_MINUS_3_POINT_05=T.GEOMETRIC_ZENITH-3.05;var La=T;var le=class le{constructor(e,a,n=0,o=0){this.hours=0;this.minutes=0;this.seconds=0;this.milliseconds=0;this.negative=!1;if(a)this.hours=e,this.minutes=a,this.seconds=n,this.milliseconds=o;else{let r=e;r<0&&(this.negative=!0,r=Math.abs(r)),this.hours=Math.trunc(r/le.HOUR_MILLIS),r=r-this.hours*le.HOUR_MILLIS,this.minutes=Math.trunc(r/le.MINUTE_MILLIS),r=r-this.minutes*le.MINUTE_MILLIS,this.seconds=Math.trunc(r/le.SECOND_MILLIS),r=r-this.seconds*le.SECOND_MILLIS,this.milliseconds=r}}isNegative(){return this.negative}setIsNegative(e){this.negative=e}getHours(){return this.hours}setHours(e){this.hours=e}getMinutes(){return this.minutes}setMinutes(e){this.minutes=e}getSeconds(){return this.seconds}setSeconds(e){this.seconds=e}getMilliseconds(){return this.milliseconds}setMilliseconds(e){this.milliseconds=e}getTime(){return this.hours*le.HOUR_MILLIS+this.minutes*le.MINUTE_MILLIS+this.seconds*le.SECOND_MILLIS+this.milliseconds}toString(){throw new Le("This method is deprecated, due to the fact that it depends on a circular dependency. Use `new ZmanimFormatter(TimeZone.getTimeZone('UTC')).format(time)` instead")}};le.SECOND_MILLIS=1e3,le.MINUTE_MILLIS=le.SECOND_MILLIS*60,le.HOUR_MILLIS=le.MINUTE_MILLIS*60;var ta=le;var fn=class{constructor(e,a){this.label=a,e instanceof S.ZonedDateTime?this.zman=e:typeof e=="number"&&(this.duration=e)}static compareDateOrder(e,a){let n=[e,a].map(o=>o.zman);return S.ZonedDateTime.compare(...n)}static compareNameOrder(e,a){return Ro.compareTo(e.label||"",a.label||"")}static compareDurationOrder(e,a){return vo.compare(e.duration||0,a.duration||0)}toString(){return` Label: ${this.label}`.concat(` Zman: ${this.zman}`).concat(` Duration: ${this.duration}`).concat(` diff --git a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js.map b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js.map index c3abfa1..151dbf4 100644 --- a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js.map +++ b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/.pnpm/temporal-polyfill@0.2.5/node_modules/temporal-polyfill/chunks/internal.js", "../node_modules/.pnpm/temporal-polyfill@0.2.5/node_modules/temporal-polyfill/chunks/classApi.js", "../node_modules/.pnpm/big.js@6.2.1/node_modules/big.js/big.mjs", "../src/polyfills/Utils.ts", "../src/polyfills/errors.ts", "../src/util/GeoLocation.ts", "../src/util/AstronomicalCalculator.ts", "../src/util/NOAACalculator.ts", "../src/AstronomicalCalendar.ts", "../src/hebrewcalendar/JewishDate.ts", "../src/hebrewcalendar/limud/Daf.ts", "../src/hebrewcalendar/limud/YomiCalculator.ts", "../src/hebrewcalendar/limud/YerushalmiYomiCalculator.ts", "../src/hebrewcalendar/limud/dataSets/ccy-nonleap.json", "../src/hebrewcalendar/limud/dataSets/ccy-leap.json", "../src/hebrewcalendar/limud/ChafetzChayimYomiCalculator.ts", "../src/hebrewcalendar/JewishCalendar.ts", "../src/ZmanimCalendar.ts", "../src/ComplexZmanimCalendar.ts", "../src/util/Time.ts", "../src/util/Zman.ts", "../src/util/ZmanimFormatter.ts", "../src/util/GeoLocationUtils.ts", "../src/util/SunTimesCalculator.ts", "../src/hebrewcalendar/TefilaRules.ts", "../src/hebrewcalendar/limud/Hiloulah.ts", "../src/hebrewcalendar/limud/TehilimYomi.ts", "../src/hebrewcalendar/limud/HaftarahShvui.ts", "../src/hebrewcalendar/HebrewDateFormatter.ts", "../src/kosher-zmanim.ts"], - "sourcesContent": ["function clampProp(e, n, t, o, r) {\n return clampEntity(n, getDefinedProp(e, n), t, o, r);\n}\n\nfunction clampEntity(e, n, t, o, r, i) {\n const a = clampNumber(n, t, o);\n if (r && n !== a) {\n throw new RangeError(numberOutOfRange(e, n, t, o, i));\n }\n return a;\n}\n\nfunction getDefinedProp(e, n) {\n const t = e[n];\n if (void 0 === t) {\n throw new TypeError(missingField(n));\n }\n return t;\n}\n\nfunction z(e) {\n return null !== e && /object|function/.test(typeof e);\n}\n\nfunction Jn(e, n = Map) {\n const t = new n;\n return (n, ...o) => {\n if (t.has(n)) {\n return t.get(n);\n }\n const r = e(n, ...o);\n return t.set(n, r), r;\n };\n}\n\nfunction D(e) {\n return p({\n name: e\n }, 1);\n}\n\nfunction p(e, n) {\n return T((e => ({\n value: e,\n configurable: 1,\n writable: !n\n })), e);\n}\n\nfunction O(e) {\n return T((e => ({\n get: e,\n configurable: 1\n })), e);\n}\n\nfunction h(e) {\n return {\n [Symbol.toStringTag]: {\n value: e,\n configurable: 1\n }\n };\n}\n\nfunction zipProps(e, n) {\n const t = {};\n let o = e.length;\n for (const r of n) {\n t[e[--o]] = r;\n }\n return t;\n}\n\nfunction T(e, n, t) {\n const o = {};\n for (const r in n) {\n o[r] = e(n[r], r, t);\n }\n return o;\n}\n\nfunction b(e, n, t) {\n const o = {};\n for (let r = 0; r < n.length; r++) {\n const i = n[r];\n o[i] = e(i, r, t);\n }\n return o;\n}\n\nfunction remapProps(e, n, t) {\n const o = {};\n for (let r = 0; r < e.length; r++) {\n o[n[r]] = t[e[r]];\n }\n return o;\n}\n\nfunction Vn(e, n) {\n const t = {};\n for (const o of e) {\n t[o] = n[o];\n }\n return t;\n}\n\nfunction V(e, n) {\n const t = {};\n for (const o in n) {\n e.has(o) || (t[o] = n[o]);\n }\n return t;\n}\n\nfunction nn(e) {\n e = {\n ...e\n };\n const n = Object.keys(e);\n for (const t of n) {\n void 0 === e[t] && delete e[t];\n }\n return e;\n}\n\nfunction C(e, n) {\n for (const t of n) {\n if (!(t in e)) {\n return 0;\n }\n }\n return 1;\n}\n\nfunction allPropsEqual(e, n, t) {\n for (const o of e) {\n if (n[o] !== t[o]) {\n return 0;\n }\n }\n return 1;\n}\n\nfunction zeroOutProps(e, n, t) {\n const o = {\n ...t\n };\n for (let t = 0; t < n; t++) {\n o[e[t]] = 0;\n }\n return o;\n}\n\nfunction E(e, ...n) {\n return (...t) => e(...n, ...t);\n}\n\nfunction capitalize(e) {\n return e[0].toUpperCase() + e.substring(1);\n}\n\nfunction sortStrings(e) {\n return e.slice().sort();\n}\n\nfunction padNumber(e, n) {\n return String(n).padStart(e, \"0\");\n}\n\nfunction compareNumbers(e, n) {\n return Math.sign(e - n);\n}\n\nfunction clampNumber(e, n, t) {\n return Math.min(Math.max(e, n), t);\n}\n\nfunction divModFloor(e, n) {\n return [ Math.floor(e / n), modFloor(e, n) ];\n}\n\nfunction modFloor(e, n) {\n return (e % n + n) % n;\n}\n\nfunction divModTrunc(e, n) {\n return [ divTrunc(e, n), modTrunc(e, n) ];\n}\n\nfunction divTrunc(e, n) {\n return Math.trunc(e / n) || 0;\n}\n\nfunction modTrunc(e, n) {\n return e % n || 0;\n}\n\nfunction hasHalf(e) {\n return .5 === Math.abs(e % 1);\n}\n\nfunction givenFieldsToBigNano(e, n, t) {\n let o = 0, r = 0;\n for (let i = 0; i <= n; i++) {\n const n = e[t[i]], a = Xr[i], s = Qr / a, [c, u] = divModTrunc(n, s);\n o += u * a, r += c;\n }\n const [i, a] = divModTrunc(o, Qr);\n return [ r + i, a ];\n}\n\nfunction nanoToGivenFields(e, n, t) {\n const o = {};\n for (let r = n; r >= 0; r--) {\n const n = Xr[r];\n o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);\n }\n return o;\n}\n\nfunction un(e) {\n return e === X ? si : [];\n}\n\nfunction cn(e) {\n return e === X ? li : [];\n}\n\nfunction ln(e) {\n return e === X ? [ \"year\", \"day\" ] : [];\n}\n\nfunction l(e) {\n if (void 0 !== e) {\n return m(e);\n }\n}\n\nfunction S(e) {\n if (void 0 !== e) {\n return d(e);\n }\n}\n\nfunction c(e) {\n if (void 0 !== e) {\n return u(e);\n }\n}\n\nfunction d(e) {\n return requireNumberIsPositive(u(e));\n}\n\nfunction u(e) {\n return requireNumberIsInteger(Mi(e));\n}\n\nfunction on(e) {\n if (null == e) {\n throw new TypeError(\"Cannot be null or undefined\");\n }\n return e;\n}\n\nfunction requirePropDefined(e, n) {\n if (null == n) {\n throw new RangeError(missingField(e));\n }\n return n;\n}\n\nfunction de(e) {\n if (!z(e)) {\n throw new TypeError(hr);\n }\n return e;\n}\n\nfunction requireType(e, n, t = e) {\n if (typeof n !== e) {\n throw new TypeError(invalidEntity(t, n));\n }\n return n;\n}\n\nfunction requireNumberIsInteger(e, n = \"number\") {\n if (!Number.isInteger(e)) {\n throw new RangeError(expectedInteger(n, e));\n }\n return e || 0;\n}\n\nfunction requireNumberIsPositive(e, n = \"number\") {\n if (e <= 0) {\n throw new RangeError(expectedPositive(n, e));\n }\n return e;\n}\n\nfunction toString(e) {\n if (\"symbol\" == typeof e) {\n throw new TypeError(pr);\n }\n return String(e);\n}\n\nfunction toStringViaPrimitive(e, n) {\n return z(e) ? String(e) : m(e, n);\n}\n\nfunction toBigInt(e) {\n if (\"string\" == typeof e) {\n return BigInt(e);\n }\n if (\"bigint\" != typeof e) {\n throw new TypeError(invalidBigInt(e));\n }\n return e;\n}\n\nfunction toNumber(e, n = \"number\") {\n if (\"bigint\" == typeof e) {\n throw new TypeError(forbiddenBigIntToNumber(n));\n }\n if (e = Number(e), !Number.isFinite(e)) {\n throw new RangeError(expectedFinite(n, e));\n }\n return e;\n}\n\nfunction toInteger(e, n) {\n return Math.trunc(toNumber(e, n)) || 0;\n}\n\nfunction toStrictInteger(e, n) {\n return requireNumberIsInteger(toNumber(e, n), n);\n}\n\nfunction toPositiveInteger(e, n) {\n return requireNumberIsPositive(toInteger(e, n), n);\n}\n\nfunction createBigNano(e, n) {\n let [t, o] = divModTrunc(n, Qr), r = e + t;\n const i = Math.sign(r);\n return i && i === -Math.sign(o) && (r -= i, o += i * Qr), [ r, o ];\n}\n\nfunction addBigNanos(e, n, t = 1) {\n return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);\n}\n\nfunction moveBigNano(e, n) {\n return createBigNano(e[0], e[1] + n);\n}\n\nfunction re(e, n) {\n return addBigNanos(n, e, -1);\n}\n\nfunction te(e, n) {\n return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);\n}\n\nfunction bigNanoOutside(e, n, t) {\n return -1 === te(e, n) || 1 === te(e, t);\n}\n\nfunction bigIntToBigNano(e, n = 1) {\n const t = BigInt(Qr / n);\n return [ Number(e / t), Number(e % t) * n ];\n}\n\nfunction he(e, n = 1) {\n const t = Qr / n, [o, r] = divModTrunc(e, t);\n return [ o, r * n ];\n}\n\nfunction bigNanoToBigInt(e, n = 1) {\n const [t, o] = e, r = Math.floor(o / n), i = Qr / n;\n return BigInt(t) * BigInt(i) + BigInt(r);\n}\n\nfunction oe(e, n = 1, t) {\n const [o, r] = e, [i, a] = divModTrunc(r, n);\n return o * (Qr / n) + (i + (t ? a / n : 0));\n}\n\nfunction divModBigNano(e, n, t = divModFloor) {\n const [o, r] = e, [i, a] = t(r, n);\n return [ o * (Qr / n) + i, a ];\n}\n\nfunction hashIntlFormatParts(e, n) {\n const t = e.formatToParts(n), o = {};\n for (const e of t) {\n o[e.type] = e.value;\n }\n return o;\n}\n\nfunction checkIsoYearMonthInBounds(e) {\n return clampProp(e, \"isoYear\", Li, Ai, 1), e.isoYear === Li ? clampProp(e, \"isoMonth\", 4, 12, 1) : e.isoYear === Ai && clampProp(e, \"isoMonth\", 1, 9, 1), \n e;\n}\n\nfunction checkIsoDateInBounds(e) {\n return checkIsoDateTimeInBounds({\n ...e,\n ...Dt,\n isoHour: 12\n }), e;\n}\n\nfunction checkIsoDateTimeInBounds(e) {\n const n = clampProp(e, \"isoYear\", Li, Ai, 1), t = n === Li ? 1 : n === Ai ? -1 : 0;\n return t && checkEpochNanoInBounds(isoToEpochNano({\n ...e,\n isoDay: e.isoDay + t,\n isoNanosecond: e.isoNanosecond - t\n })), e;\n}\n\nfunction checkEpochNanoInBounds(e) {\n if (!e || bigNanoOutside(e, Ui, qi)) {\n throw new RangeError(Cr);\n }\n return e;\n}\n\nfunction isoTimeFieldsToNano(e) {\n return givenFieldsToBigNano(e, 5, j)[1];\n}\n\nfunction nanoToIsoTimeAndDay(e) {\n const [n, t] = divModFloor(e, Qr);\n return [ nanoToGivenFields(t, 5, j), n ];\n}\n\nfunction epochNanoToSec(e) {\n return epochNanoToSecMod(e)[0];\n}\n\nfunction epochNanoToSecMod(e) {\n return divModBigNano(e, _r);\n}\n\nfunction isoToEpochMilli(e) {\n return isoArgsToEpochMilli(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);\n}\n\nfunction isoToEpochNano(e) {\n const n = isoToEpochMilli(e);\n if (void 0 !== n) {\n const [t, o] = divModTrunc(n, Gr);\n return [ t, o * be + (e.isoMicrosecond || 0) * Vr + (e.isoNanosecond || 0) ];\n }\n}\n\nfunction isoToEpochNanoWithOffset(e, n) {\n const [t, o] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) - n);\n return checkEpochNanoInBounds(isoToEpochNano({\n ...e,\n isoDay: e.isoDay + o,\n ...t\n }));\n}\n\nfunction isoArgsToEpochSec(...e) {\n return isoArgsToEpochMilli(...e) / Hr;\n}\n\nfunction isoArgsToEpochMilli(...e) {\n const [n, t] = isoToLegacyDate(...e), o = n.valueOf();\n if (!isNaN(o)) {\n return o - t * Gr;\n }\n}\n\nfunction isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {\n const s = e === Li ? 1 : e === Ai ? -1 : 0, c = new Date;\n return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];\n}\n\nfunction Ie(e, n) {\n let [t, o] = moveBigNano(e, n);\n o < 0 && (o += Qr, t -= 1);\n const [r, i] = divModFloor(o, be), [a, s] = divModFloor(i, Vr);\n return epochMilliToIso(t * Gr + r, a, s);\n}\n\nfunction epochMilliToIso(e, n = 0, t = 0) {\n const o = Math.ceil(Math.max(0, Math.abs(e) - zi) / Gr) * Math.sign(e), r = new Date(e - o * Gr);\n return zipProps(wi, [ r.getUTCFullYear(), r.getUTCMonth() + 1, r.getUTCDate() + o, r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds(), r.getUTCMilliseconds(), n, t ]);\n}\n\nfunction computeIsoDateParts(e) {\n return [ e.isoYear, e.isoMonth, e.isoDay ];\n}\n\nfunction computeIsoMonthsInYear() {\n return xi;\n}\n\nfunction computeIsoDaysInMonth(e, n) {\n switch (n) {\n case 2:\n return computeIsoInLeapYear(e) ? 29 : 28;\n\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n }\n return 31;\n}\n\nfunction computeIsoDaysInYear(e) {\n return computeIsoInLeapYear(e) ? 366 : 365;\n}\n\nfunction computeIsoInLeapYear(e) {\n return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);\n}\n\nfunction computeIsoDayOfWeek(e) {\n const [n, t] = isoToLegacyDate(e.isoYear, e.isoMonth, e.isoDay);\n return modFloor(n.getUTCDay() - t, 7) || 7;\n}\n\nfunction computeGregoryEraParts({isoYear: e}) {\n return e < 1 ? [ \"bce\", 1 - e ] : [ \"ce\", e ];\n}\n\nfunction computeJapaneseEraParts(e) {\n const n = isoToEpochMilli(e);\n if (n < $i) {\n return computeGregoryEraParts(e);\n }\n const t = hashIntlFormatParts(La(Ti), n), {era: o, eraYear: r} = parseIntlYear(t, Ti);\n return [ o, r ];\n}\n\nfunction checkIsoDateTimeFields(e) {\n return checkIsoDateFields(e), constrainIsoTimeFields(e, 1), e;\n}\n\nfunction checkIsoDateFields(e) {\n return constrainIsoDateFields(e, 1), e;\n}\n\nfunction isIsoDateFieldsValid(e) {\n return allPropsEqual(Oi, e, constrainIsoDateFields(e));\n}\n\nfunction constrainIsoDateFields(e, n) {\n const {isoYear: t} = e, o = clampProp(e, \"isoMonth\", 1, computeIsoMonthsInYear(), n);\n return {\n isoYear: t,\n isoMonth: o,\n isoDay: clampProp(e, \"isoDay\", 1, computeIsoDaysInMonth(t, o), n)\n };\n}\n\nfunction constrainIsoTimeFields(e, n) {\n return zipProps(j, [ clampProp(e, \"isoHour\", 0, 23, n), clampProp(e, \"isoMinute\", 0, 59, n), clampProp(e, \"isoSecond\", 0, 59, n), clampProp(e, \"isoMillisecond\", 0, 999, n), clampProp(e, \"isoMicrosecond\", 0, 999, n), clampProp(e, \"isoNanosecond\", 0, 999, n) ]);\n}\n\nfunction H(e) {\n return void 0 === e ? 0 : ua(de(e));\n}\n\nfunction wn(e, n = 0) {\n e = normalizeOptions(e);\n const t = la(e), o = fa(e, n);\n return [ ua(e), o, t ];\n}\n\nfunction ve(e) {\n return la(normalizeOptions(e));\n}\n\nfunction _t(e) {\n return e = normalizeOptions(e), sa(e, 9, 6, 1);\n}\n\nfunction refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {\n n = normalizeOptions(n);\n let a = sa(n, o, r), s = parseRoundingIncInteger(n), c = ha(n, i);\n const u = aa(n, o, r, 1);\n return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1), \n e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];\n}\n\nfunction refineRoundingOptions(e, n = 6, t) {\n let o = parseRoundingIncInteger(e = normalizeOptionsOrString(e, Hi));\n const r = ha(e, 7);\n let i = aa(e, n);\n return i = requirePropDefined(Hi, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];\n}\n\nfunction refineDateDisplayOptions(e) {\n return da(normalizeOptions(e));\n}\n\nfunction refineTimeDisplayOptions(e, n) {\n return refineTimeDisplayTuple(normalizeOptions(e), n);\n}\n\nfunction refineTimeDisplayTuple(e, n = 4) {\n const t = refineSubsecDigits(e);\n return [ ha(e, 4), ...refineSmallestUnitAndSubsecDigits(aa(e, n), t) ];\n}\n\nfunction refineSmallestUnitAndSubsecDigits(e, n) {\n return null != e ? [ Xr[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];\n}\n\nfunction parseRoundingIncInteger(e) {\n const n = e[_i];\n return void 0 === n ? 1 : toInteger(n, _i);\n}\n\nfunction refineRoundingInc(e, n, t, o) {\n const r = o ? Qr : Xr[n + 1];\n if (r) {\n const t = Xr[n];\n if (r % ((e = clampEntity(_i, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {\n throw new RangeError(invalidEntity(_i, e));\n }\n } else {\n e = clampEntity(_i, e, 1, t ? 10 ** 9 : 1, 1);\n }\n return e;\n}\n\nfunction refineSubsecDigits(e) {\n let n = e[Ji];\n if (void 0 !== n) {\n if (\"number\" != typeof n) {\n if (\"auto\" === toString(n)) {\n return;\n }\n throw new RangeError(invalidEntity(Ji, n));\n }\n n = clampEntity(Ji, Math.floor(n), 0, 9, 1);\n }\n return n;\n}\n\nfunction normalizeOptions(e) {\n return void 0 === e ? {} : de(e);\n}\n\nfunction normalizeOptionsOrString(e, n) {\n return \"string\" == typeof e ? {\n [n]: e\n } : de(e);\n}\n\nfunction U(e) {\n if (void 0 !== e) {\n if (z(e)) {\n return Object.assign(Object.create(null), e);\n }\n throw new TypeError(hr);\n }\n}\n\nfunction overrideOverflowOptions(e, n) {\n return e && Object.assign(Object.create(null), e, {\n overflow: Xi[n]\n });\n}\n\nfunction refineUnitOption(e, n, t = 9, o = 0, r) {\n let i = n[e];\n if (void 0 === i) {\n return r ? o : void 0;\n }\n if (i = toString(i), \"auto\" === i) {\n return r ? o : null;\n }\n let a = $r[i];\n if (void 0 === a && (a = Ei[i]), void 0 === a) {\n throw new RangeError(invalidChoice(e, i, $r));\n }\n return clampEntity(e, a, o, t, 1, Et), a;\n}\n\nfunction refineChoiceOption(e, n, t, o = 0) {\n const r = t[e];\n if (void 0 === r) {\n return o;\n }\n const i = toString(r), a = n[i];\n if (void 0 === a) {\n throw new RangeError(invalidChoice(e, i, n));\n }\n return a;\n}\n\nfunction checkLargestSmallestUnit(e, n) {\n if (n > e) {\n throw new RangeError(Ar);\n }\n}\n\nfunction _(e) {\n return {\n branding: Oe,\n epochNanoseconds: e\n };\n}\n\nfunction Yn(e, n, t) {\n return {\n branding: Te,\n calendar: t,\n timeZone: n,\n epochNanoseconds: e\n };\n}\n\nfunction ee(e, n = e.calendar) {\n return {\n branding: We,\n calendar: n,\n ...Vn(Yi, e)\n };\n}\n\nfunction v(e, n = e.calendar) {\n return {\n branding: J,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction createPlainYearMonthSlots(e, n = e.calendar) {\n return {\n branding: L,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction createPlainMonthDaySlots(e, n = e.calendar) {\n return {\n branding: q,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction Ge(e) {\n return {\n branding: xe,\n ...Vn(ki, e)\n };\n}\n\nfunction Vt(e) {\n return {\n branding: qt,\n sign: computeDurationSign(e),\n ...Vn(Ni, e)\n };\n}\n\nfunction M(e) {\n return epochNanoToSec(e.epochNanoseconds);\n}\n\nfunction y(e) {\n return divModBigNano(e.epochNanoseconds, be)[0];\n}\n\nfunction N(e) {\n return bigNanoToBigInt(e.epochNanoseconds, Vr);\n}\n\nfunction B(e) {\n return bigNanoToBigInt(e.epochNanoseconds);\n}\n\nfunction extractEpochNano(e) {\n return e.epochNanoseconds;\n}\n\nfunction I(e) {\n return \"string\" == typeof e ? e : m(e.id);\n}\n\nfunction isIdLikeEqual(e, n) {\n return e === n || I(e) === I(n);\n}\n\nfunction Ut(e, n, t, o, r) {\n const i = getMaxDurationUnit(o), [a, s] = ((e, n) => {\n const t = n((e = normalizeOptionsOrString(e, Vi))[Ki]);\n let o = ca(e);\n return o = requirePropDefined(Vi, o), [ o, t ];\n })(r, e);\n if (isUniformUnit(Math.max(a, i), s)) {\n return totalDayTimeDuration(o, a);\n }\n if (!s) {\n throw new RangeError(zr);\n }\n const [c, u, l] = createMarkerSystem(n, t, s), f = createMarkerToEpochNano(l), d = createMoveMarker(l), m = createDiffMarkers(l), p = d(u, c, o), h = m(u, c, p, a);\n return isUniformUnit(a, s) ? totalDayTimeDuration(h, a) : ((e, n, t, o, r, i, a) => {\n const s = computeDurationSign(e), [c, u] = clampRelativeDuration(o, bi(t, e), t, s, r, i, a), l = computeEpochNanoFrac(n, c, u);\n return e[F[t]] + l * s;\n })(h, f(p), a, u, c, f, d);\n}\n\nfunction totalDayTimeDuration(e, n) {\n return oe(durationFieldsToBigNano(e), Xr[n], 1);\n}\n\nfunction clampRelativeDuration(e, n, t, o, r, i, a) {\n const s = F[t], c = {\n ...n,\n [s]: n[s] + o\n }, u = a(e, r, n), l = a(e, r, c);\n return [ i(u), i(l) ];\n}\n\nfunction computeEpochNanoFrac(e, n, t) {\n const o = oe(re(n, t));\n if (!o) {\n throw new RangeError(vr);\n }\n return oe(re(n, e)) / o;\n}\n\nfunction ce(e, n) {\n const [t, o, r] = refineRoundingOptions(n, 5, 1);\n return _(roundBigNano(e.epochNanoseconds, t, o, r, 1));\n}\n\nfunction Pn(e, n, t) {\n let {epochNanoseconds: o, timeZone: r, calendar: i} = n;\n const [a, s, c] = refineRoundingOptions(t);\n if (0 === a && 1 === s) {\n return n;\n }\n const u = e(r);\n if (6 === a) {\n o = ((e, n, t, o) => {\n const r = fn(t, n), [i, a] = e(r), s = t.epochNanoseconds, c = we(n, i), u = we(n, a);\n if (bigNanoOutside(s, c, u)) {\n throw new RangeError(vr);\n }\n return roundWithMode(computeEpochNanoFrac(s, c, u), o) ? u : c;\n })(computeDayInterval, u, n, c);\n } else {\n const e = u.getOffsetNanosecondsFor(o);\n o = getMatchingInstantFor(u, roundDateTime(Ie(o, e), a, s, c), e, 2, 0, 1);\n }\n return Yn(o, r, i);\n}\n\nfunction dt(e, n) {\n return ee(roundDateTime(e, ...refineRoundingOptions(n)), e.calendar);\n}\n\nfunction Ee(e, n) {\n const [t, o, r] = refineRoundingOptions(n, 5);\n var i;\n return Ge((i = r, roundTimeToNano(e, computeNanoInc(t, o), i)[0]));\n}\n\nfunction dn(e, n) {\n const t = e(n.timeZone), o = fn(n, t), [r, i] = computeDayInterval(o), a = oe(re(we(t, r), we(t, i)), Kr, 1);\n if (a <= 0) {\n throw new RangeError(vr);\n }\n return a;\n}\n\nfunction Cn(e, n) {\n const {timeZone: t, calendar: o} = n, r = ((e, n, t) => we(n, e(fn(t, n))))(computeDayFloor, e(t), n);\n return Yn(r, t, o);\n}\n\nfunction roundDateTime(e, n, t, o) {\n return roundDateTimeToNano(e, computeNanoInc(n, t), o);\n}\n\nfunction roundDateTimeToNano(e, n, t) {\n const [o, r] = roundTimeToNano(e, n, t);\n return checkIsoDateTimeInBounds({\n ...moveByDays(e, r),\n ...o\n });\n}\n\nfunction roundTimeToNano(e, n, t) {\n return nanoToIsoTimeAndDay(roundByInc(isoTimeFieldsToNano(e), n, t));\n}\n\nfunction roundToMinute(e) {\n return roundByInc(e, Jr, 7);\n}\n\nfunction computeNanoInc(e, n) {\n return Xr[e] * n;\n}\n\nfunction computeDayInterval(e) {\n const n = computeDayFloor(e);\n return [ n, moveByDays(n, 1) ];\n}\n\nfunction computeDayFloor(e) {\n return Ci(6, e);\n}\n\nfunction roundDayTimeDurationByInc(e, n, t) {\n const o = Math.min(getMaxDurationUnit(e), 6);\n return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, o), n, t), o);\n}\n\nfunction roundRelativeDuration(e, n, t, o, r, i, a, s, c, u) {\n if (0 === o && 1 === r) {\n return e;\n }\n const l = isUniformUnit(o, s) ? isZonedEpochSlots(s) && o < 6 && t >= 6 ? nudgeZonedTimeDuration : nudgeDayTimeDuration : nudgeRelativeDuration;\n let [f, d, m] = l(e, n, t, o, r, i, a, s, c, u);\n return m && 7 !== o && (f = ((e, n, t, o, r, i, a, s) => {\n const c = computeDurationSign(e);\n for (let u = o + 1; u <= t; u++) {\n if (7 === u && 7 !== t) {\n continue;\n }\n const o = bi(u, e);\n o[F[u]] += c;\n const l = oe(re(a(s(r, i, o)), n));\n if (l && Math.sign(l) !== c) {\n break;\n }\n e = o;\n }\n return e;\n })(f, d, t, Math.max(6, o), a, s, c, u)), f;\n}\n\nfunction roundBigNano(e, n, t, o, r) {\n if (6 === n) {\n const n = (e => e[0] + e[1] / Qr)(e);\n return [ roundByInc(n, t, o), 0 ];\n }\n return roundBigNanoByInc(e, computeNanoInc(n, t), o, r);\n}\n\nfunction roundBigNanoByInc(e, n, t, o) {\n let [r, i] = e;\n o && i < 0 && (i += Qr, r -= 1);\n const [a, s] = divModFloor(roundByInc(i, n, t), Qr);\n return createBigNano(r + a, s);\n}\n\nfunction roundByInc(e, n, t) {\n return roundWithMode(e / n, t) * n;\n}\n\nfunction roundWithMode(e, n) {\n return ga[n](e);\n}\n\nfunction nudgeDayTimeDuration(e, n, t, o, r, i) {\n const a = computeDurationSign(e), s = durationFieldsToBigNano(e), c = roundBigNano(s, o, r, i), u = re(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));\n return [ {\n ...e,\n ...f\n }, addBigNanos(n, u), l ];\n}\n\nfunction nudgeZonedTimeDuration(e, n, t, o, r, i, a, s, c, u) {\n const l = computeDurationSign(e), f = oe(durationFieldsToBigNano(e, 5)), d = computeNanoInc(o, r);\n let m = roundByInc(f, d, i);\n const [p, h] = clampRelativeDuration(a, {\n ...e,\n ...Fi\n }, 6, l, s, c, u), g = m - oe(re(p, h));\n let T = 0;\n g && Math.sign(g) !== l ? n = moveBigNano(p, m) : (T += l, m = roundByInc(g, d, i), \n n = moveBigNano(h, m));\n const D = nanoToDurationTimeFields(m);\n return [ {\n ...e,\n ...D,\n days: e.days + T\n }, n, Boolean(T) ];\n}\n\nfunction nudgeRelativeDuration(e, n, t, o, r, i, a, s, c, u) {\n const l = computeDurationSign(e), f = F[o], d = bi(o, e);\n 7 === o && (e = {\n ...e,\n weeks: e.weeks + Math.trunc(e.days / 7)\n });\n const m = divTrunc(e[f], r) * r;\n d[f] = m;\n const [p, h] = clampRelativeDuration(a, d, o, r * l, s, c, u), g = m + computeEpochNanoFrac(n, p, h) * l * r, T = roundByInc(g, r, i), D = Math.sign(T - g) === l;\n return d[f] = T, [ d, D ? h : p, D ];\n}\n\nfunction me(e, n, t, o) {\n const [r, i, a, s] = (e => {\n const n = refineTimeDisplayTuple(e = normalizeOptions(e));\n return [ e.timeZone, ...n ];\n })(o), c = void 0 !== r;\n return ((e, n, t, o, r, i) => {\n t = roundBigNanoByInc(t, r, o, 1);\n const a = n.getOffsetNanosecondsFor(t);\n return formatIsoDateTimeFields(Ie(t, a), i) + (e ? Fe(roundToMinute(a)) : \"Z\");\n })(c, n(c ? e(r) : Ta), t.epochNanoseconds, i, a, s);\n}\n\nfunction In(e, n, t) {\n const [o, r, i, a, s, c] = (e => {\n e = normalizeOptions(e);\n const n = da(e), t = refineSubsecDigits(e), o = pa(e), r = ha(e, 4), i = aa(e, 4);\n return [ n, ma(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];\n })(t);\n return ((e, n, t, o, r, i, a, s, c, u) => {\n o = roundBigNanoByInc(o, c, s, 1);\n const l = e(t).getOffsetNanosecondsFor(o);\n return formatIsoDateTimeFields(Ie(o, l), u) + Fe(roundToMinute(l), a) + ((e, n) => 1 !== n ? \"[\" + (2 === n ? \"!\" : \"\") + I(e) + \"]\" : \"\")(t, i) + formatCalendar(n, r);\n })(e, n.calendar, n.timeZone, n.epochNanoseconds, o, r, i, a, s, c);\n}\n\nfunction Tt(e, n) {\n const [t, o, r, i] = (e => (e = normalizeOptions(e), [ da(e), ...refineTimeDisplayTuple(e) ]))(n);\n return a = e.calendar, s = t, c = i, formatIsoDateTimeFields(roundDateTimeToNano(e, r, o), c) + formatCalendar(a, s);\n var a, s, c;\n}\n\nfunction yt(e, n) {\n return t = e.calendar, o = e, r = refineDateDisplayOptions(n), formatIsoDateFields(o) + formatCalendar(t, r);\n var t, o, r;\n}\n\nfunction et(e, n) {\n return formatDateLikeIso(e.calendar, formatIsoYearMonthFields, e, refineDateDisplayOptions(n));\n}\n\nfunction W(e, n) {\n return formatDateLikeIso(e.calendar, formatIsoMonthDayFields, e, refineDateDisplayOptions(n));\n}\n\nfunction qe(e, n) {\n const [t, o, r] = refineTimeDisplayOptions(n);\n return i = r, formatIsoTimeFields(roundTimeToNano(e, o, t)[0], i);\n var i;\n}\n\nfunction zt(e, n) {\n const [t, o, r] = refineTimeDisplayOptions(n, 3);\n return o > 1 && (e = {\n ...e,\n ...roundDayTimeDurationByInc(e, o, t)\n }), ((e, n) => {\n const {sign: t} = e, o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = divModBigNano(durationFieldsToBigNano(o, 3), _r, divModTrunc);\n checkDurationTimeUnit(a);\n const c = formatSubsecNano(s, n), u = n >= 0 || !t || c;\n return (t < 0 ? \"-\" : \"\") + \"P\" + formatDurationFragments({\n Y: formatDurationNumber(o.years),\n M: formatDurationNumber(o.months),\n W: formatDurationNumber(o.weeks),\n D: formatDurationNumber(o.days)\n }) + (r || i || a || u ? \"T\" + formatDurationFragments({\n H: formatDurationNumber(r),\n M: formatDurationNumber(i),\n S: formatDurationNumber(a, u) + c\n }) : \"\");\n })(e, r);\n}\n\nfunction formatDateLikeIso(e, n, t, o) {\n const r = I(e), i = o > 1 || 0 === o && r !== X;\n return 1 === o ? r === X ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);\n}\n\nfunction formatDurationFragments(e) {\n const n = [];\n for (const t in e) {\n const o = e[t];\n o && n.push(o, t);\n }\n return n.join(\"\");\n}\n\nfunction formatIsoDateTimeFields(e, n) {\n return formatIsoDateFields(e) + \"T\" + formatIsoTimeFields(e, n);\n}\n\nfunction formatIsoDateFields(e) {\n return formatIsoYearMonthFields(e) + \"-\" + xr(e.isoDay);\n}\n\nfunction formatIsoYearMonthFields(e) {\n const {isoYear: n} = e;\n return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + \"-\" + xr(e.isoMonth);\n}\n\nfunction formatIsoMonthDayFields(e) {\n return xr(e.isoMonth) + \"-\" + xr(e.isoDay);\n}\n\nfunction formatIsoTimeFields(e, n) {\n const t = [ xr(e.isoHour), xr(e.isoMinute) ];\n return -1 !== n && t.push(xr(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * be + n * Vr + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)), \n t.join(\":\");\n}\n\nfunction Fe(e, n = 0) {\n if (1 === n) {\n return \"\";\n }\n const [t, o] = divModFloor(Math.abs(e), Kr), [r, i] = divModFloor(o, Jr), [a, s] = divModFloor(i, _r);\n return getSignStr(e) + xr(t) + \":\" + xr(r) + (a || s ? \":\" + xr(a) + formatSubsecNano(s) : \"\");\n}\n\nfunction formatCalendar(e, n) {\n if (1 !== n) {\n const t = I(e);\n if (n > 1 || 0 === n && t !== X) {\n return formatCalendarId(t, 2 === n);\n }\n }\n return \"\";\n}\n\nfunction formatCalendarId(e, n) {\n return \"[\" + (n ? \"!\" : \"\") + \"u-ca=\" + e + \"]\";\n}\n\nfunction formatSubsecNano(e, n) {\n let t = padNumber(9, e);\n return t = void 0 === n ? t.replace(Na, \"\") : t.slice(0, n), t ? \".\" + t : \"\";\n}\n\nfunction getSignStr(e) {\n return e < 0 ? \"-\" : \"+\";\n}\n\nfunction formatDurationNumber(e, n) {\n return e || n ? e.toLocaleString(\"fullwide\", {\n useGrouping: 0\n }) : \"\";\n}\n\nfunction _zonedEpochSlotsToIso(e, n) {\n const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = Ie(t, o);\n return {\n calendar: e.calendar,\n ...r,\n offsetNanoseconds: o\n };\n}\n\nfunction mn(e, n) {\n const t = fn(n, e);\n return {\n calendar: n.calendar,\n ...Vn(Yi, t),\n offset: Fe(t.offsetNanoseconds),\n timeZone: n.timeZone\n };\n}\n\nfunction getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {\n if (void 0 !== t && 1 === o && (1 === o || a)) {\n return isoToEpochNanoWithOffset(n, t);\n }\n const s = e.getPossibleInstantsFor(n);\n if (void 0 !== t && 3 !== o) {\n const e = ((e, n, t, o) => {\n const r = isoToEpochNano(n);\n o && (t = roundToMinute(t));\n for (const n of e) {\n let e = oe(re(n, r));\n if (o && (e = roundToMinute(e)), e === t) {\n return n;\n }\n }\n })(s, n, t, i);\n if (void 0 !== e) {\n return e;\n }\n if (0 === o) {\n throw new RangeError(kr);\n }\n }\n return a ? isoToEpochNano(n) : we(e, n, r, s);\n}\n\nfunction we(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {\n if (1 === o.length) {\n return o[0];\n }\n if (1 === t) {\n throw new RangeError(Yr);\n }\n if (o.length) {\n return o[3 === t ? 1 : 0];\n }\n const r = isoToEpochNano(n), i = ((e, n) => {\n const t = e.getOffsetNanosecondsFor(moveBigNano(n, -Qr));\n return ne(e.getOffsetNanosecondsFor(moveBigNano(n, Qr)) - t);\n })(e, r), a = i * (2 === t ? -1 : 1);\n return (o = e.getPossibleInstantsFor(Ie(r, a)))[2 === t ? 0 : o.length - 1];\n}\n\nfunction ae(e) {\n if (Math.abs(e) >= Qr) {\n throw new RangeError(wr);\n }\n return e;\n}\n\nfunction ne(e) {\n if (e > Qr) {\n throw new RangeError(Br);\n }\n return e;\n}\n\nfunction se(e, n, t) {\n return _(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {\n if (durationHasDateParts(e)) {\n throw new RangeError(qr);\n }\n return durationFieldsToBigNano(e, 5);\n })(e ? negateDurationFields(t) : t))));\n}\n\nfunction hn(e, n, t, o, r, i = Object.create(null)) {\n const a = n(o.timeZone), s = e(o.calendar);\n return {\n ...o,\n ...moveZonedEpochs(a, s, o, t ? negateDurationFields(r) : r, i)\n };\n}\n\nfunction ct(e, n, t, o, r = Object.create(null)) {\n const {calendar: i} = t;\n return ee(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);\n}\n\nfunction bt(e, n, t, o, r) {\n const {calendar: i} = t;\n return v(moveDate(e(i), t, n ? negateDurationFields(o) : o, r), i);\n}\n\nfunction Qe(e, n, t, o, r = Object.create(null)) {\n const i = t.calendar, a = e(i);\n let s = moveToDayOfMonthUnsafe(a, t);\n n && (o = xt(o)), o.sign < 0 && (s = a.dateAdd(s, {\n ...Si,\n months: 1\n }), s = moveByDays(s, -1));\n const c = a.dateAdd(s, o, r);\n return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(a, c), i);\n}\n\nfunction Ye(e, n, t) {\n return Ge(moveTime(n, e ? negateDurationFields(t) : t)[0]);\n}\n\nfunction moveZonedEpochs(e, n, t, o, r) {\n const i = durationFieldsToBigNano(o, 5);\n let a = t.epochNanoseconds;\n if (durationHasDateParts(o)) {\n const s = fn(t, e);\n a = addBigNanos(we(e, {\n ...moveDate(n, s, {\n ...o,\n ...Fi\n }, r),\n ...Vn(j, s)\n }), i);\n } else {\n a = addBigNanos(a, i), H(r);\n }\n return {\n epochNanoseconds: checkEpochNanoInBounds(a)\n };\n}\n\nfunction moveDateTime(e, n, t, o) {\n const [r, i] = moveTime(n, t);\n return checkIsoDateTimeInBounds({\n ...moveDate(e, n, {\n ...t,\n ...Fi,\n days: t.days + i\n }, o),\n ...r\n });\n}\n\nfunction moveDate(e, n, t, o) {\n if (t.years || t.months || t.weeks) {\n return e.dateAdd(n, t, o);\n }\n H(o);\n const r = t.days + durationFieldsToBigNano(t, 5)[0];\n return r ? checkIsoDateInBounds(moveByDays(n, r)) : n;\n}\n\nfunction moveToDayOfMonthUnsafe(e, n, t = 1) {\n return moveByDays(n, t - e.day(n));\n}\n\nfunction moveTime(e, n) {\n const [t, o] = durationFieldsToBigNano(n, 5), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);\n return [ r, t + i ];\n}\n\nfunction moveByDays(e, n) {\n return n ? {\n ...e,\n ...epochMilliToIso(isoToEpochMilli(e) + n * Gr)\n } : e;\n}\n\nfunction createMarkerSystem(e, n, t) {\n const o = e(t.calendar);\n return isZonedEpochSlots(t) ? [ t, o, n(t.timeZone) ] : [ {\n ...t,\n ...Dt\n }, o ];\n}\n\nfunction createMarkerToEpochNano(e) {\n return e ? extractEpochNano : isoToEpochNano;\n}\n\nfunction createMoveMarker(e) {\n return e ? E(moveZonedEpochs, e) : moveDateTime;\n}\n\nfunction createDiffMarkers(e) {\n return e ? E(diffZonedEpochsExact, e) : diffDateTimesExact;\n}\n\nfunction isZonedEpochSlots(e) {\n return e && e.epochNanoseconds;\n}\n\nfunction isUniformUnit(e, n) {\n return e <= 6 - (isZonedEpochSlots(n) ? 1 : 0);\n}\n\nfunction Wt(e, n, t, o, r, i, a) {\n const s = e(normalizeOptions(a).relativeTo), c = Math.max(getMaxDurationUnit(r), getMaxDurationUnit(i));\n if (isUniformUnit(c, s)) {\n return Vt(checkDurationUnits(((e, n, t, o) => {\n const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);\n if (!Number.isFinite(r[0])) {\n throw new RangeError(Cr);\n }\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(r, t)\n };\n })(r, i, c, o)));\n }\n if (!s) {\n throw new RangeError(zr);\n }\n o && (i = negateDurationFields(i));\n const [u, l, f] = createMarkerSystem(n, t, s), d = createMoveMarker(f), m = createDiffMarkers(f), p = d(l, u, r);\n return Vt(m(l, u, d(l, p, i), c));\n}\n\nfunction Gt(e, n, t, o, r) {\n const i = getMaxDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {\n e = normalizeOptionsOrString(e, Hi);\n let o = sa(e);\n const r = t(e[Ki]);\n let i = parseRoundingIncInteger(e);\n const a = ha(e, 7);\n let s = aa(e);\n if (void 0 === o && void 0 === s) {\n throw new RangeError(Ur);\n }\n return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s), \n i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];\n })(r, i, e), f = Math.max(i, a);\n if (!isZonedEpochSlots(l) && f <= 6) {\n return Vt(checkDurationUnits(((e, n, t, o, r) => {\n const i = roundBigNano(durationFieldsToBigNano(e), t, o, r);\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(i, n)\n };\n })(o, a, s, c, u)));\n }\n if (!l) {\n throw new RangeError(zr);\n }\n const [d, m, p] = createMarkerSystem(n, t, l), h = createMarkerToEpochNano(p), g = createMoveMarker(p), T = createDiffMarkers(p), D = g(m, d, o);\n let I = T(m, d, D, a);\n const M = o.sign, N = computeDurationSign(I);\n if (M && N && M !== N) {\n throw new RangeError(vr);\n }\n return N && (I = roundRelativeDuration(I, h(D), a, s, c, u, m, d, h, g)), Vt(I);\n}\n\nfunction Rt(e) {\n return -1 === e.sign ? xt(e) : e;\n}\n\nfunction xt(e) {\n return Vt(negateDurationFields(e));\n}\n\nfunction negateDurationFields(e) {\n const n = {};\n for (const t of F) {\n n[t] = -1 * e[t] || 0;\n }\n return n;\n}\n\nfunction Jt(e) {\n return !e.sign;\n}\n\nfunction computeDurationSign(e, n = F) {\n let t = 0;\n for (const o of n) {\n const n = Math.sign(e[o]);\n if (n) {\n if (t && t !== n) {\n throw new RangeError(Rr);\n }\n t = n;\n }\n }\n return t;\n}\n\nfunction checkDurationUnits(e) {\n for (const n of vi) {\n clampEntity(n, e[n], -ya, ya, 1);\n }\n return checkDurationTimeUnit(oe(durationFieldsToBigNano(e), _r)), e;\n}\n\nfunction checkDurationTimeUnit(e) {\n if (!Number.isSafeInteger(e)) {\n throw new RangeError(Zr);\n }\n}\n\nfunction durationFieldsToBigNano(e, n = 6) {\n return givenFieldsToBigNano(e, n, F);\n}\n\nfunction nanoToDurationDayTimeFields(e, n = 6) {\n const [t, o] = e, r = nanoToGivenFields(o, n, F);\n if (r[F[n]] += t * (Qr / Xr[n]), !Number.isFinite(r[F[n]])) {\n throw new RangeError(Cr);\n }\n return r;\n}\n\nfunction nanoToDurationTimeFields(e, n = 5) {\n return nanoToGivenFields(e, n, F);\n}\n\nfunction durationHasDateParts(e) {\n return Boolean(computeDurationSign(e, Pi));\n}\n\nfunction getMaxDurationUnit(e) {\n let n = 9;\n for (;n > 0 && !e[F[n]]; n--) {}\n return n;\n}\n\nfunction createSplitTuple(e, n) {\n return [ e, n ];\n}\n\nfunction computePeriod(e) {\n const n = Math.floor(e / Da) * Da;\n return [ n, n + Da ];\n}\n\nfunction pe(e) {\n const n = parseDateTimeLike(e = toStringViaPrimitive(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n let t;\n if (n.m) {\n t = 0;\n } else {\n if (!n.offset) {\n throw new RangeError(failedParse(e));\n }\n t = parseOffsetNano(n.offset);\n }\n return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), _(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));\n}\n\nfunction Xt(e) {\n const n = parseDateTimeLike(m(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n if (n.timeZone) {\n return finalizeZonedDateTime(n, n.offset ? parseOffsetNano(n.offset) : void 0);\n }\n if (n.m) {\n throw new RangeError(failedParse(e));\n }\n return finalizeDate(n);\n}\n\nfunction Mn(e, n) {\n const t = parseDateTimeLike(m(e));\n if (!t || !t.timeZone) {\n throw new RangeError(failedParse(e));\n }\n const {offset: o} = t, r = o ? parseOffsetNano(o) : void 0, [, i, a] = wn(n);\n return finalizeZonedDateTime(t, r, i, a);\n}\n\nfunction parseOffsetNano(e) {\n const n = parseOffsetNanoMaybe(e);\n if (void 0 === n) {\n throw new RangeError(failedParse(e));\n }\n return n;\n}\n\nfunction Ct(e) {\n const n = parseDateTimeLike(m(e));\n if (!n || n.m) {\n throw new RangeError(failedParse(e));\n }\n return ee(finalizeDateTime(n));\n}\n\nfunction At(e) {\n const n = parseDateTimeLike(m(e));\n if (!n || n.m) {\n throw new RangeError(failedParse(e));\n }\n return v(n.p ? finalizeDateTime(n) : finalizeDate(n));\n}\n\nfunction ot(e, n) {\n const t = parseYearMonthOnly(m(n));\n if (t) {\n return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));\n }\n const o = At(n);\n return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(e(o.calendar), o));\n}\n\nfunction requireIsoCalendar(e) {\n if (e.calendar !== X) {\n throw new RangeError(invalidSubstring(e.calendar));\n }\n}\n\nfunction Q(e, n) {\n const t = parseMonthDayOnly(m(n));\n if (t) {\n return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));\n }\n const o = At(n), {calendar: r} = o, i = e(r), [a, s, c] = i.h(o), [u, l] = i.I(a, s), [f, d] = i.N(u, l, c);\n return createPlainMonthDaySlots(checkIsoDateInBounds(i.P(f, d, c)), r);\n}\n\nfunction ze(e) {\n let n, t = (e => {\n const n = Ca.exec(e);\n return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;\n })(m(e));\n if (!t) {\n if (t = parseDateTimeLike(e), !t) {\n throw new RangeError(failedParse(e));\n }\n if (!t.p) {\n throw new RangeError(failedParse(e));\n }\n if (t.m) {\n throw new RangeError(invalidSubstring(\"Z\"));\n }\n requireIsoCalendar(t);\n }\n if ((n = parseYearMonthOnly(e)) && isIsoDateFieldsValid(n)) {\n throw new RangeError(failedParse(e));\n }\n if ((n = parseMonthDayOnly(e)) && isIsoDateFieldsValid(n)) {\n throw new RangeError(failedParse(e));\n }\n return Ge(constrainIsoTimeFields(t, 1));\n}\n\nfunction Kt(e) {\n const n = (e => {\n const n = za.exec(e);\n return n ? (e => {\n function parseUnit(e, r, i) {\n let a = 0, s = 0;\n if (i && ([a, o] = divModFloor(o, Xr[i])), void 0 !== e) {\n if (t) {\n throw new RangeError(invalidSubstring(e));\n }\n s = (e => {\n const n = parseInt(e);\n if (!Number.isFinite(n)) {\n throw new RangeError(invalidSubstring(e));\n }\n return n;\n })(e), n = 1, r && (o = parseSubsecNano(r) * (Xr[i] / _r), t = 1);\n }\n return a + s;\n }\n let n = 0, t = 0, o = 0, r = {\n ...zipProps(F, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),\n ...nanoToGivenFields(o, 2, F)\n };\n if (!n) {\n throw new RangeError(noValidFields(F));\n }\n return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;\n })(n) : void 0;\n })(m(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n return Vt(checkDurationUnits(n));\n}\n\nfunction sn(e) {\n const n = parseDateTimeLike(e) || parseYearMonthOnly(e) || parseMonthDayOnly(e);\n return n ? n.calendar : e;\n}\n\nfunction Ne(e) {\n const n = parseDateTimeLike(e);\n return n && (n.timeZone || n.m && Ta || n.offset) || e;\n}\n\nfunction finalizeZonedDateTime(e, n, t = 0, o = 0) {\n const r = ye(e.timeZone), i = ie(r);\n return Yn(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.v, e.m), r, an(e.calendar));\n}\n\nfunction finalizeDateTime(e) {\n return resolveSlotsCalendar(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e)));\n}\n\nfunction finalizeDate(e) {\n return resolveSlotsCalendar(checkIsoDateInBounds(checkIsoDateFields(e)));\n}\n\nfunction resolveSlotsCalendar(e) {\n return {\n ...e,\n calendar: an(e.calendar)\n };\n}\n\nfunction parseDateTimeLike(e) {\n const n = Ya.exec(e);\n return n ? (e => {\n const n = e[10], t = \"Z\" === (n || \"\").toUpperCase();\n return {\n isoYear: organizeIsoYearParts(e),\n isoMonth: parseInt(e[4]),\n isoDay: parseInt(e[5]),\n ...organizeTimeParts(e.slice(5)),\n ...organizeAnnotationParts(e[16]),\n p: Boolean(e[6]),\n m: t,\n offset: t ? void 0 : n\n };\n })(n) : void 0;\n}\n\nfunction parseYearMonthOnly(e) {\n const n = Ba.exec(e);\n return n ? (e => ({\n isoYear: organizeIsoYearParts(e),\n isoMonth: parseInt(e[4]),\n isoDay: 1,\n ...organizeAnnotationParts(e[5])\n }))(n) : void 0;\n}\n\nfunction parseMonthDayOnly(e) {\n const n = ka.exec(e);\n return n ? (e => ({\n isoYear: ji,\n isoMonth: parseInt(e[1]),\n isoDay: parseInt(e[2]),\n ...organizeAnnotationParts(e[3])\n }))(n) : void 0;\n}\n\nfunction parseOffsetNanoMaybe(e, n) {\n const t = Za.exec(e);\n return t ? ((e, n) => {\n const t = e[4] || e[5];\n if (n && t) {\n throw new RangeError(invalidSubstring(t));\n }\n return ae((parseInt0(e[2]) * Kr + parseInt0(e[3]) * Jr + parseInt0(e[4]) * _r + parseSubsecNano(e[5] || \"\")) * parseSign(e[1]));\n })(t, n) : void 0;\n}\n\nfunction organizeIsoYearParts(e) {\n const n = parseSign(e[1]), t = parseInt(e[2] || e[3]);\n if (n < 0 && !t) {\n throw new RangeError(invalidSubstring(-0));\n }\n return n * t;\n}\n\nfunction organizeTimeParts(e) {\n const n = parseInt0(e[3]);\n return {\n ...nanoToIsoTimeAndDay(parseSubsecNano(e[4] || \"\"))[0],\n isoHour: parseInt0(e[1]),\n isoMinute: parseInt0(e[2]),\n isoSecond: 60 === n ? 59 : n\n };\n}\n\nfunction organizeAnnotationParts(e) {\n let n, t;\n const o = [];\n if (e.replace(Ra, ((e, r, i) => {\n const a = Boolean(r), [s, c] = i.split(\"=\").reverse();\n if (c) {\n if (\"u-ca\" === c) {\n o.push(s), n || (n = a);\n } else if (a || /[A-Z]/.test(c)) {\n throw new RangeError(invalidSubstring(e));\n }\n } else {\n if (t) {\n throw new RangeError(invalidSubstring(e));\n }\n t = s;\n }\n return \"\";\n })), o.length > 1 && n) {\n throw new RangeError(invalidSubstring(e));\n }\n return {\n timeZone: t,\n calendar: o[0] || X\n };\n}\n\nfunction parseSubsecNano(e) {\n return parseInt(e.padEnd(9, \"0\"));\n}\n\nfunction createRegExp(e) {\n return new RegExp(`^${e}$`, \"i\");\n}\n\nfunction parseSign(e) {\n return e && \"+\" !== e ? -1 : 1;\n}\n\nfunction parseInt0(e) {\n return void 0 === e ? 0 : parseInt(e);\n}\n\nfunction Me(e) {\n return ye(m(e));\n}\n\nfunction ye(e) {\n const n = getTimeZoneEssence(e);\n return \"number\" == typeof n ? Fe(n) : n ? (e => {\n if (Ua.test(e)) {\n throw new RangeError(br);\n }\n return e.toLowerCase().split(\"/\").map(((e, n) => (e.length <= 3 || /\\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || \"in\" === e || \"chat\" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join(\"/\");\n })(e) : Ta;\n}\n\nfunction getTimeZoneAtomic(e) {\n const n = getTimeZoneEssence(e);\n return \"number\" == typeof n ? n : n ? n.resolvedOptions().timeZone : Ta;\n}\n\nfunction getTimeZoneEssence(e) {\n const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);\n return void 0 !== n ? n : e !== Ta ? qa(e) : void 0;\n}\n\nfunction Ze(e, n) {\n return te(e.epochNanoseconds, n.epochNanoseconds);\n}\n\nfunction yn(e, n) {\n return te(e.epochNanoseconds, n.epochNanoseconds);\n}\n\nfunction $t(e, n, t, o, r, i) {\n const a = e(normalizeOptions(i).relativeTo), s = Math.max(getMaxDurationUnit(o), getMaxDurationUnit(r));\n if (allPropsEqual(F, o, r)) {\n return 0;\n }\n if (isUniformUnit(s, a)) {\n return te(durationFieldsToBigNano(o), durationFieldsToBigNano(r));\n }\n if (!a) {\n throw new RangeError(zr);\n }\n const [c, u, l] = createMarkerSystem(n, t, a), f = createMarkerToEpochNano(l), d = createMoveMarker(l);\n return te(f(d(u, c, o)), f(d(u, c, r)));\n}\n\nfunction gt(e, n) {\n return rt(e, n) || He(e, n);\n}\n\nfunction rt(e, n) {\n return compareNumbers(isoToEpochMilli(e), isoToEpochMilli(n));\n}\n\nfunction He(e, n) {\n return compareNumbers(isoTimeFieldsToNano(e), isoTimeFieldsToNano(n));\n}\n\nfunction ue(e, n) {\n return !Ze(e, n);\n}\n\nfunction gn(e, n) {\n return !yn(e, n) && !!je(e.timeZone, n.timeZone) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction ft(e, n) {\n return !gt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction It(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction $e(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction x(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction Ve(e, n) {\n return !He(e, n);\n}\n\nfunction je(e, n) {\n if (e === n) {\n return 1;\n }\n const t = I(e), o = I(n);\n if (t === o) {\n return 1;\n }\n try {\n return getTimeZoneAtomic(t) === getTimeZoneAtomic(o);\n } catch (e) {}\n}\n\nfunction le(e, n, t, o) {\n const r = refineDiffOptions(e, U(o), 3, 5), i = diffEpochNanos(n.epochNanoseconds, t.epochNanoseconds, ...r);\n return Vt(e ? negateDurationFields(i) : i);\n}\n\nfunction Dn(e, n, t, o, r, i) {\n const a = getCommonCalendarSlot(o.calendar, r.calendar), s = U(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = te(m, d);\n let h;\n if (p) {\n if (c < 6) {\n h = diffEpochNanos(d, m, c, u, l, f);\n } else {\n const t = n(((e, n) => {\n if (!je(e, n)) {\n throw new RangeError(Fr);\n }\n return e;\n })(o.timeZone, r.timeZone)), i = e(a);\n h = diffZonedEpochsBig(i, t, o, r, p, c, s), h = roundRelativeDuration(h, m, c, u, l, f, i, o, extractEpochNano, E(moveZonedEpochs, t));\n }\n } else {\n h = Si;\n }\n return Vt(t ? negateDurationFields(h) : h);\n}\n\nfunction ut(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = te(d, f);\n let p;\n if (m) {\n if (s <= 6) {\n p = diffEpochNanos(f, d, s, c, u, l);\n } else {\n const n = e(i);\n p = diffDateTimesBig(n, t, o, m, s, a), p = roundRelativeDuration(p, d, s, c, u, l, n, t, isoToEpochNano, moveDateTime);\n }\n } else {\n p = Si;\n }\n return Vt(n ? negateDurationFields(p) : p);\n}\n\nfunction Ft(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r);\n return diffDateLike(n, (() => e(i)), t, o, ...refineDiffOptions(n, a, 6, 9, 6), a);\n}\n\nfunction Xe(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r), s = refineDiffOptions(n, a, 9, 9, 8), c = e(i);\n return diffDateLike(n, (() => c), moveToDayOfMonthUnsafe(c, t), moveToDayOfMonthUnsafe(c, o), ...s, a);\n}\n\nfunction diffDateLike(e, n, t, o, r, i, a, s, c) {\n const u = isoToEpochNano(t), l = isoToEpochNano(o);\n let f;\n if (te(l, u)) {\n if (6 === r) {\n f = diffEpochNanos(u, l, r, i, a, s);\n } else {\n const e = n();\n f = e.dateUntil(t, o, r, c), 6 === i && 1 === a || (f = roundRelativeDuration(f, l, r, i, a, s, e, t, isoToEpochNano, moveDate));\n }\n } else {\n f = Si;\n }\n return Vt(e ? negateDurationFields(f) : f);\n}\n\nfunction Ae(e, n, t, o) {\n const r = U(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = roundByInc(diffTimes(n, t), computeNanoInc(a, s), c), l = {\n ...Si,\n ...nanoToDurationTimeFields(u, i)\n };\n return Vt(e ? negateDurationFields(l) : l);\n}\n\nfunction diffZonedEpochsExact(e, n, t, o, r, i) {\n const a = te(o.epochNanoseconds, t.epochNanoseconds);\n return a ? r < 6 ? diffEpochNanosExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochsBig(n, e, t, o, a, r, i) : Si;\n}\n\nfunction diffDateTimesExact(e, n, t, o, r) {\n const i = isoToEpochNano(n), a = isoToEpochNano(t), s = te(a, i);\n return s ? o <= 6 ? diffEpochNanosExact(i, a, o) : diffDateTimesBig(e, n, t, s, o, r) : Si;\n}\n\nfunction diffZonedEpochsBig(e, n, t, o, r, i, a) {\n const [s, c, u] = ((e, n, t, o) => {\n function updateMid() {\n return l = {\n ...moveByDays(a, c++ * -o),\n ...i\n }, f = we(e, l), te(s, f) === -o;\n }\n const r = fn(n, e), i = Vn(j, r), a = fn(t, e), s = t.epochNanoseconds;\n let c = 0;\n const u = diffTimes(r, a);\n let l, f;\n if (Math.sign(u) === -o && c++, updateMid() && (-1 === o || updateMid())) {\n throw new RangeError(vr);\n }\n const d = oe(re(f, s));\n return [ r, l, d ];\n })(n, t, o, r);\n var l, f;\n return {\n ...6 === i ? (l = s, f = c, {\n ...Si,\n days: diffDays(l, f)\n }) : e.dateUntil(s, c, i, a),\n ...nanoToDurationTimeFields(u)\n };\n}\n\nfunction diffDateTimesBig(e, n, t, o, r, i) {\n const [a, s, c] = ((e, n, t) => {\n let o = n, r = diffTimes(e, n);\n return Math.sign(r) === -t && (o = moveByDays(n, -t), r += Qr * t), [ e, o, r ];\n })(n, t, o);\n return {\n ...e.dateUntil(a, s, r, i),\n ...nanoToDurationTimeFields(c)\n };\n}\n\nfunction diffEpochNanos(e, n, t, o, r, i) {\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(roundBigNano(re(e, n), o, r, i), t)\n };\n}\n\nfunction diffEpochNanosExact(e, n, t) {\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(re(e, n), t)\n };\n}\n\nfunction diffDays(e, n) {\n return diffEpochMilliByDay(isoToEpochMilli(e), isoToEpochMilli(n));\n}\n\nfunction diffEpochMilliByDay(e, n) {\n return Math.trunc((n - e) / Gr);\n}\n\nfunction diffTimes(e, n) {\n return isoTimeFieldsToNano(n) - isoTimeFieldsToNano(e);\n}\n\nfunction getCommonCalendarSlot(e, n) {\n if (!isIdLikeEqual(e, n)) {\n throw new RangeError(Er);\n }\n return e;\n}\n\nfunction createIntlCalendar(e) {\n function epochMilliToIntlFields(e) {\n return ((e, n) => ({\n ...parseIntlYear(e, n),\n F: e.month,\n day: parseInt(e.day)\n }))(hashIntlFormatParts(n, e), t);\n }\n const n = La(e), t = computeCalendarIdBase(e);\n return {\n id: e,\n O: createIntlFieldCache(epochMilliToIntlFields),\n B: createIntlYearDataCache(epochMilliToIntlFields)\n };\n}\n\nfunction createIntlFieldCache(e) {\n return Jn((n => {\n const t = isoToEpochMilli(n);\n return e(t);\n }), WeakMap);\n}\n\nfunction createIntlYearDataCache(e) {\n const n = e(0).year - Wi;\n return Jn((t => {\n let o, r = isoArgsToEpochMilli(t - n);\n const i = [], a = [];\n do {\n r += 400 * Gr;\n } while ((o = e(r)).year <= t);\n do {\n r += (1 - o.day) * Gr, o.year === t && (i.push(r), a.push(o.F)), r -= Gr;\n } while ((o = e(r)).year >= t);\n return {\n k: i.reverse(),\n C: Wr(a.reverse())\n };\n }));\n}\n\nfunction parseIntlYear(e, n) {\n let t, o, r = parseIntlPartsYear(e);\n if (e.era) {\n const i = Di[n];\n void 0 !== i && (t = \"islamic\" === n ? \"ah\" : e.era.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g, \"\"), \n \"bc\" === t || \"b\" === t ? t = \"bce\" : \"ad\" !== t && \"a\" !== t || (t = \"ce\"), o = r, \n r = eraYearToYear(o, i[t] || 0));\n }\n return {\n era: t,\n eraYear: o,\n year: r\n };\n}\n\nfunction parseIntlPartsYear(e) {\n return parseInt(e.relatedYear || e.year);\n}\n\nfunction computeIntlDateParts(e) {\n const {year: n, F: t, day: o} = this.O(e), {C: r} = this.B(n);\n return [ n, r[t] + 1, o ];\n}\n\nfunction computeIntlEpochMilli(e, n = 1, t = 1) {\n return this.B(e).k[n - 1] + (t - 1) * Gr;\n}\n\nfunction computeIntlLeapMonth(e) {\n const n = queryMonthStrings(this, e), t = queryMonthStrings(this, e - 1), o = n.length;\n if (o > t.length) {\n const e = getCalendarLeapMonthMeta(this);\n if (e < 0) {\n return -e;\n }\n for (let e = 0; e < o; e++) {\n if (n[e] !== t[e]) {\n return e + 1;\n }\n }\n }\n}\n\nfunction computeIntlDaysInYear(e) {\n return diffEpochMilliByDay(computeIntlEpochMilli.call(this, e), computeIntlEpochMilli.call(this, e + 1));\n}\n\nfunction computeIntlDaysInMonth(e, n) {\n const {k: t} = this.B(e);\n let o = n + 1, r = t;\n return o > t.length && (o = 1, r = this.B(e + 1).k), diffEpochMilliByDay(t[n - 1], r[o - 1]);\n}\n\nfunction computeIntlMonthsInYear(e) {\n return this.B(e).k.length;\n}\n\nfunction queryMonthStrings(e, n) {\n return Object.keys(e.B(n).C);\n}\n\nfunction rn(e) {\n return an(m(e));\n}\n\nfunction an(e) {\n if ((e = e.toLowerCase()) !== X && e !== gi && computeCalendarIdBase(e) !== computeCalendarIdBase(La(e).resolvedOptions().calendar)) {\n throw new RangeError(invalidCalendar(e));\n }\n return e;\n}\n\nfunction computeCalendarIdBase(e) {\n return \"islamicc\" === e && (e = \"islamic\"), e.split(\"-\")[0];\n}\n\nfunction computeNativeWeekOfYear(e) {\n return this.R(e)[0];\n}\n\nfunction computeNativeYearOfWeek(e) {\n return this.R(e)[1];\n}\n\nfunction computeNativeDayOfYear(e) {\n const [n] = this.h(e);\n return diffEpochMilliByDay(this.q(n), isoToEpochMilli(e)) + 1;\n}\n\nfunction parseMonthCode(e) {\n const n = Wa.exec(e);\n if (!n) {\n throw new RangeError(invalidMonthCode(e));\n }\n return [ parseInt(n[1]), Boolean(n[2]) ];\n}\n\nfunction monthCodeNumberToMonth(e, n, t) {\n return e + (n || t && e >= t ? 1 : 0);\n}\n\nfunction monthToMonthCodeNumber(e, n) {\n return e - (n && e >= n ? 1 : 0);\n}\n\nfunction eraYearToYear(e, n) {\n return (n + e) * (Math.sign(n) || 1) || 0;\n}\n\nfunction getCalendarEraOrigins(e) {\n return Di[getCalendarIdBase(e)];\n}\n\nfunction getCalendarLeapMonthMeta(e) {\n return Ii[getCalendarIdBase(e)];\n}\n\nfunction getCalendarIdBase(e) {\n return computeCalendarIdBase(e.id || X);\n}\n\nfunction Qt(e, n, t, o) {\n const r = refineCalendarFields(t, o, en, [], ri);\n if (void 0 !== r.timeZone) {\n const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);\n return {\n epochNanoseconds: getMatchingInstantFor(n(a), {\n ...o,\n ...i\n }, void 0 !== r.offset ? parseOffsetNano(r.offset) : void 0),\n timeZone: a\n };\n }\n return {\n ...t.dateFromFields(r),\n ...Dt\n };\n}\n\nfunction jn(e, n, t, o, r, i) {\n const a = refineCalendarFields(t, r, en, ti, ri), s = e(a.timeZone), [c, u, l] = wn(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);\n return Yn(getMatchingInstantFor(n(s), {\n ...f,\n ...d\n }, void 0 !== a.offset ? parseOffsetNano(a.offset) : void 0, u, l), s, o);\n}\n\nfunction Pt(e, n, t) {\n const o = refineCalendarFields(e, n, en, [], w), r = H(t);\n return ee(checkIsoDateTimeInBounds({\n ...e.dateFromFields(o, overrideOverflowOptions(t, r)),\n ...refineTimeBag(o, r)\n }));\n}\n\nfunction Yt(e, n, t, o = []) {\n const r = refineCalendarFields(e, n, en, o);\n return e.dateFromFields(r, t);\n}\n\nfunction nt(e, n, t, o) {\n const r = refineCalendarFields(e, n, fi, o);\n return e.yearMonthFromFields(r, t);\n}\n\nfunction K(e, n, t, o, r = []) {\n const i = refineCalendarFields(e, t, en, r);\n return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = ji), \n e.monthDayFromFields(i, o);\n}\n\nfunction Ue(e, n) {\n const t = H(n);\n return Ge(refineTimeBag(refineFields(e, ei, [], 1), t));\n}\n\nfunction Ht(e) {\n const n = refineFields(e, Ni);\n return Vt(checkDurationUnits({\n ...Si,\n ...n\n }));\n}\n\nfunction refineCalendarFields(e, n, t, o = [], r = []) {\n return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);\n}\n\nfunction refineFields(e, n, t, o = !t) {\n const r = {};\n let i, a = 0;\n for (const o of n) {\n if (o === i) {\n throw new RangeError(duplicateFields(o));\n }\n if (\"constructor\" === o || \"__proto__\" === o) {\n throw new RangeError(tn(o));\n }\n let n = e[o];\n if (void 0 !== n) {\n a = 1, Ga[o] && (n = Ga[o](n, o)), r[o] = n;\n } else if (t) {\n if (t.includes(o)) {\n throw new TypeError(missingField(o));\n }\n r[o] = hi[o];\n }\n i = o;\n }\n if (o && !a) {\n throw new TypeError(noValidFields(n));\n }\n return r;\n}\n\nfunction refineTimeBag(e, n) {\n return constrainIsoTimeFields(Ha({\n ...hi,\n ...e\n }), n);\n}\n\nfunction Sn(e, n, t, o, r, i) {\n const a = U(i), {calendar: s, timeZone: c} = t;\n return Yn(((e, n, t, o, r) => {\n const i = mergeCalendarFields(e, t, o, en, oi, ni), [a, s, c] = wn(r, 2);\n return getMatchingInstantFor(n, {\n ...e.dateFromFields(i, overrideOverflowOptions(r, a)),\n ...refineTimeBag(i, a)\n }, parseOffsetNano(i.offset), s, c);\n })(e(s), n(c), o, r, a), c, s);\n}\n\nfunction at(e, n, t, o, r) {\n const i = U(r);\n return ee(((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en, w), i = H(o);\n return checkIsoDateTimeInBounds({\n ...e.dateFromFields(r, overrideOverflowOptions(o, i)),\n ...refineTimeBag(r, i)\n });\n })(e(n.calendar), t, o, i));\n}\n\nfunction Zt(e, n, t, o, r) {\n const i = U(r);\n return ((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en);\n return e.dateFromFields(r, o);\n })(e(n.calendar), t, o, i);\n}\n\nfunction Ke(e, n, t, o, r) {\n const i = U(r);\n return createPlainYearMonthSlots(((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, fi);\n return e.yearMonthFromFields(r, o);\n })(e(n.calendar), t, o, i));\n}\n\nfunction k(e, n, t, o, r) {\n const i = U(r);\n return ((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en);\n return e.monthDayFromFields(r, o);\n })(e(n.calendar), t, o, i);\n}\n\nfunction Be(e, n, t) {\n return Ge(((e, n, t) => {\n const o = H(t);\n return refineTimeBag({\n ...Vn(ei, e),\n ...refineFields(n, ei)\n }, o);\n })(e, n, t));\n}\n\nfunction kt(e, n) {\n return Vt((t = e, o = n, checkDurationUnits({\n ...t,\n ...refineFields(o, Ni)\n })));\n var t, o;\n}\n\nfunction mergeCalendarFields(e, n, t, o, r = [], i = []) {\n const a = [ ...e.fields(o), ...r ].sort();\n let s = refineFields(n, a, i);\n const c = refineFields(t, a);\n return s = e.mergeFields(s, c), refineFields(s, a, []);\n}\n\nfunction convertToPlainMonthDay(e, n) {\n const t = refineCalendarFields(e, n, pi);\n return e.monthDayFromFields(t);\n}\n\nfunction convertToPlainYearMonth(e, n, t) {\n const o = refineCalendarFields(e, n, di);\n return e.yearMonthFromFields(o, t);\n}\n\nfunction convertToIso(e, n, t, o, r) {\n n = Vn(t = e.fields(t), n), o = refineFields(o, r = e.fields(r), []);\n let i = e.mergeFields(n, o);\n return i = refineFields(i, [ ...t, ...r ].sort(), []), e.dateFromFields(i);\n}\n\nfunction refineYear(e, n) {\n let {era: t, eraYear: o, year: r} = n;\n const i = getCalendarEraOrigins(e);\n if (void 0 !== t || void 0 !== o) {\n if (void 0 === t || void 0 === o) {\n throw new TypeError(Dr);\n }\n if (!i) {\n throw new RangeError(gr);\n }\n const e = i[t];\n if (void 0 === e) {\n throw new RangeError(invalidEra(t));\n }\n const n = eraYearToYear(o, e);\n if (void 0 !== r && r !== n) {\n throw new RangeError(Ir);\n }\n r = n;\n } else if (void 0 === r) {\n throw new TypeError(missingYear(i));\n }\n return r;\n}\n\nfunction refineMonth(e, n, t, o) {\n let {month: r, monthCode: i} = n;\n if (void 0 !== i) {\n const n = ((e, n, t, o) => {\n const r = e.U(t), [i, a] = parseMonthCode(n);\n let s = monthCodeNumberToMonth(i, a, r);\n if (a) {\n const n = getCalendarLeapMonthMeta(e);\n if (void 0 === n) {\n throw new RangeError(Pr);\n }\n if (n > 0) {\n if (s > n) {\n throw new RangeError(Pr);\n }\n if (void 0 === r) {\n if (1 === o) {\n throw new RangeError(Pr);\n }\n s--;\n }\n } else {\n if (s !== -n) {\n throw new RangeError(Pr);\n }\n if (void 0 === r && 1 === o) {\n throw new RangeError(Pr);\n }\n }\n }\n return s;\n })(e, i, t, o);\n if (void 0 !== r && r !== n) {\n throw new RangeError(Mr);\n }\n r = n, o = 1;\n } else if (void 0 === r) {\n throw new TypeError(Nr);\n }\n return clampEntity(\"month\", r, 1, e.L(t), o);\n}\n\nfunction refineDay(e, n, t, o, r) {\n return clampProp(n, \"day\", 1, e.j(o, t), r);\n}\n\nfunction spliceFields(e, n, t, o) {\n let r = 0;\n const i = [];\n for (const e of t) {\n void 0 !== n[e] ? r = 1 : i.push(e);\n }\n if (Object.assign(e, n), r) {\n for (const n of o || i) {\n delete e[n];\n }\n }\n}\n\nfunction Se(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));\n}\n\nfunction vn(e, n, t, o, r = X) {\n return Yn(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));\n}\n\nfunction pt(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = X) {\n return ee(checkIsoDateTimeInBounds(checkIsoDateTimeFields(T(toInteger, zipProps(wi, [ n, t, o, r, i, a, s, c, u ])))), e(l));\n}\n\nfunction Nt(e, n, t, o, r = X) {\n return v(checkIsoDateInBounds(checkIsoDateFields(T(toInteger, {\n isoYear: n,\n isoMonth: t,\n isoDay: o\n }))), e(r));\n}\n\nfunction tt(e, n, t, o = X, r = 1) {\n const i = toInteger(n), a = toInteger(t), s = e(o);\n return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({\n isoYear: i,\n isoMonth: a,\n isoDay: toInteger(r)\n })), s);\n}\n\nfunction G(e, n, t, o = X, r = ji) {\n const i = toInteger(n), a = toInteger(t), s = e(o);\n return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({\n isoYear: toInteger(r),\n isoMonth: i,\n isoDay: a\n })), s);\n}\n\nfunction ke(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {\n return Ge(constrainIsoTimeFields(T(toInteger, zipProps(j, [ e, n, t, o, r, i ])), 1));\n}\n\nfunction Lt(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {\n return Vt(checkDurationUnits(T(toStrictInteger, zipProps(F, [ e, n, t, o, r, i, a, s, c, u ]))));\n}\n\nfunction fe(e, n, t = X) {\n return Yn(e.epochNanoseconds, n, t);\n}\n\nfunction Zn(e) {\n return _(e.epochNanoseconds);\n}\n\nfunction ht(e, n) {\n return ee(fn(n, e));\n}\n\nfunction Bt(e, n) {\n return v(fn(n, e));\n}\n\nfunction bn(e, n, t) {\n return convertToPlainYearMonth(e(n.calendar), t);\n}\n\nfunction Fn(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction Re(e, n) {\n return Ge(fn(n, e));\n}\n\nfunction mt(e, n, t, o) {\n const r = ((e, n, t, o) => {\n const r = ve(o);\n return we(e(n), t, r);\n })(e, t, n, o);\n return Yn(checkEpochNanoInBounds(r), t, n.calendar);\n}\n\nfunction St(e, n, t) {\n const o = e(n.calendar);\n return createPlainYearMonthSlots({\n ...n,\n ...convertToPlainYearMonth(o, t)\n });\n}\n\nfunction Ot(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction vt(e, n, t, o, r) {\n const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : Dt;\n return Yn(we(t(i), {\n ...o,\n ...s\n }), i, o.calendar);\n}\n\nfunction wt(e, n = Dt) {\n return ee(checkIsoDateTimeInBounds({\n ...e,\n ...n\n }));\n}\n\nfunction jt(e, n, t) {\n return convertToPlainYearMonth(e(n.calendar), t);\n}\n\nfunction Mt(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction _e(e, n, t, o) {\n return ((e, n, t) => convertToIso(e, n, di, de(t), li))(e(n.calendar), t, o);\n}\n\nfunction R(e, n, t, o) {\n return ((e, n, t) => convertToIso(e, n, pi, de(t), si))(e(n.calendar), t, o);\n}\n\nfunction Je(e, n, t, o, r) {\n const i = de(r), a = n(i.plainDate), s = e(i.timeZone);\n return Yn(we(t(s), {\n ...a,\n ...o\n }), s, a.calendar);\n}\n\nfunction Le(e, n) {\n return ee(checkIsoDateTimeInBounds({\n ...e,\n ...n\n }));\n}\n\nfunction De(e) {\n return _(checkEpochNanoInBounds(he(e, _r)));\n}\n\nfunction Pe(e) {\n return _(checkEpochNanoInBounds(he(e, be)));\n}\n\nfunction Ce(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e), Vr)));\n}\n\nfunction ge(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));\n}\n\nfunction pn(e, n, t = Dt) {\n const o = n.timeZone, r = e(o), i = {\n ...fn(n, r),\n ...t\n };\n return Yn(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);\n}\n\nfunction Tn(e, n, t) {\n const o = n.timeZone, r = e(o), i = {\n ...fn(n, r),\n ...t\n }, a = getPreferredCalendarSlot(n.calendar, t.calendar);\n return Yn(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);\n}\n\nfunction lt(e, n = Dt) {\n return ee({\n ...e,\n ...n\n });\n}\n\nfunction st(e, n) {\n return ee({\n ...e,\n ...n\n }, getPreferredCalendarSlot(e.calendar, n.calendar));\n}\n\nfunction it(e, n) {\n return {\n ...e,\n calendar: n\n };\n}\n\nfunction On(e, n) {\n return {\n ...e,\n timeZone: n\n };\n}\n\nfunction getPreferredCalendarSlot(e, n) {\n if (e === n) {\n return e;\n }\n const t = I(e), o = I(n);\n if (t === o || t === X) {\n return n;\n }\n if (o === X) {\n return e;\n }\n throw new RangeError(Er);\n}\n\nfunction createNativeOpsCreator(e, n) {\n return t => t === X ? e : t === gi || t === Ti ? Object.assign(Object.create(e), {\n id: t\n }) : Object.assign(Object.create(n), Aa(t));\n}\n\nfunction createOptionsTransformer(e, n, t) {\n const o = new Set(t);\n return r => (((e, n) => {\n for (const t of n) {\n if (t in e) {\n return 1;\n }\n }\n return 0;\n })(r = V(o, r), e) || Object.assign(r, n), t && (r.timeZone = Ta, [ \"full\", \"long\" ].includes(r.timeStyle) && (r.timeStyle = \"medium\")), \n r);\n}\n\nfunction e(e, n = qn) {\n const [t, , , o] = e;\n return (r, i = Ns, ...a) => {\n const s = n(o && o(...a), r, i, t), c = s.resolvedOptions();\n return [ s, ...toEpochMillis(e, c, a) ];\n };\n}\n\nfunction qn(e, n, t, o) {\n if (t = o(t), e) {\n if (void 0 !== t.timeZone) {\n throw new TypeError(Lr);\n }\n t.timeZone = e;\n }\n return new En(n, t);\n}\n\nfunction toEpochMillis(e, n, t) {\n const [, o, r] = e;\n return t.map((e => (e.calendar && ((e, n, t) => {\n if ((t || e !== X) && e !== n) {\n throw new RangeError(Er);\n }\n })(I(e.calendar), n.calendar, r), o(e, n))));\n}\n\nfunction An(e) {\n const n = Bn();\n return Ie(n, e.getOffsetNanosecondsFor(n));\n}\n\nfunction Bn() {\n return he(Date.now(), be);\n}\n\nfunction Nn() {\n return ys || (ys = (new En).resolvedOptions().timeZone);\n}\n\nconst expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, pr = \"Cannot convert Symbol to string\", hr = \"Invalid object\", numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, tn = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, noValidFields = e => \"No valid fields: \" + e.join(), Z = \"Invalid bag\", invalidChoice = (e, n, t) => invalidEntity(e, n) + \"; must be \" + Object.keys(t).join(), A = \"Cannot use valueOf\", P = \"Invalid calling context\", gr = \"Forbidden era/eraYear\", Dr = \"Mismatching era/eraYear\", Ir = \"Mismatching year/eraYear\", invalidEra = e => `Invalid era: ${e}`, missingYear = e => \"Missing year\" + (e ? \"/era/eraYear\" : \"\"), invalidMonthCode = e => `Invalid monthCode: ${e}`, Mr = \"Mismatching month/monthCode\", Nr = \"Missing month/monthCode\", yr = \"Cannot guess year\", Pr = \"Invalid leap month\", g = \"Invalid protocol\", vr = \"Invalid protocol results\", Er = \"Mismatching Calendars\", invalidCalendar = e => `Invalid Calendar: ${e}`, Fr = \"Mismatching TimeZones\", br = \"Forbidden ICU TimeZone\", wr = \"Out-of-bounds offset\", Br = \"Out-of-bounds TimeZone gap\", kr = \"Invalid TimeZone offset\", Yr = \"Ambiguous offset\", Cr = \"Out-of-bounds date\", Zr = \"Out-of-bounds duration\", Rr = \"Cannot mix duration signs\", zr = \"Missing relativeTo\", qr = \"Cannot use large units\", Ur = \"Required smallestUnit or largestUnit\", Ar = \"smallestUnit > largestUnit\", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, Ln = e => `Cannot format ${e}`, kn = \"Mismatching types for formatting\", Lr = \"Cannot specify TimeZone\", Wr = /*@__PURE__*/ E(b, ((e, n) => n)), jr = /*@__PURE__*/ E(b, ((e, n, t) => t)), xr = /*@__PURE__*/ E(padNumber, 2), $r = {\n nanosecond: 0,\n microsecond: 1,\n millisecond: 2,\n second: 3,\n minute: 4,\n hour: 5,\n day: 6,\n week: 7,\n month: 8,\n year: 9\n}, Et = /*@__PURE__*/ Object.keys($r), Gr = 864e5, Hr = 1e3, Vr = 1e3, be = 1e6, _r = 1e9, Jr = 6e10, Kr = 36e11, Qr = 864e11, Xr = [ 1, Vr, be, _r, Jr, Kr, Qr ], w = /*@__PURE__*/ Et.slice(0, 6), ei = /*@__PURE__*/ sortStrings(w), ni = [ \"offset\" ], ti = [ \"timeZone\" ], oi = /*@__PURE__*/ w.concat(ni), ri = /*@__PURE__*/ oi.concat(ti), ii = [ \"era\", \"eraYear\" ], ai = /*@__PURE__*/ ii.concat([ \"year\" ]), si = [ \"year\" ], ci = [ \"monthCode\" ], ui = /*@__PURE__*/ [ \"month\" ].concat(ci), li = [ \"day\" ], fi = /*@__PURE__*/ ui.concat(si), di = /*@__PURE__*/ ci.concat(si), en = /*@__PURE__*/ li.concat(fi), mi = /*@__PURE__*/ li.concat(ui), pi = /*@__PURE__*/ li.concat(ci), hi = /*@__PURE__*/ jr(w, 0), X = \"iso8601\", gi = \"gregory\", Ti = \"japanese\", Di = {\n [gi]: {\n bce: -1,\n ce: 0\n },\n [Ti]: {\n bce: -1,\n ce: 0,\n meiji: 1867,\n taisho: 1911,\n showa: 1925,\n heisei: 1988,\n reiwa: 2018\n },\n ethioaa: {\n era0: 0\n },\n ethiopic: {\n era0: 0,\n era1: 5500\n },\n coptic: {\n era0: -1,\n era1: 0\n },\n roc: {\n beforeroc: -1,\n minguo: 0\n },\n buddhist: {\n be: 0\n },\n islamic: {\n ah: 0\n },\n indian: {\n saka: 0\n },\n persian: {\n ap: 0\n }\n}, Ii = {\n chinese: 13,\n dangi: 13,\n hebrew: -6\n}, m = /*@__PURE__*/ E(requireType, \"string\"), f = /*@__PURE__*/ E(requireType, \"boolean\"), Mi = /*@__PURE__*/ E(requireType, \"number\"), $ = /*@__PURE__*/ E(requireType, \"function\"), F = /*@__PURE__*/ Et.map((e => e + \"s\")), Ni = /*@__PURE__*/ sortStrings(F), yi = /*@__PURE__*/ F.slice(0, 6), Pi = /*@__PURE__*/ F.slice(6), vi = /*@__PURE__*/ Pi.slice(1), Ei = /*@__PURE__*/ Wr(F), Si = /*@__PURE__*/ jr(F, 0), Fi = /*@__PURE__*/ jr(yi, 0), bi = /*@__PURE__*/ E(zeroOutProps, F), j = [ \"isoNanosecond\", \"isoMicrosecond\", \"isoMillisecond\", \"isoSecond\", \"isoMinute\", \"isoHour\" ], Oi = [ \"isoDay\", \"isoMonth\", \"isoYear\" ], wi = /*@__PURE__*/ j.concat(Oi), Bi = /*@__PURE__*/ sortStrings(Oi), ki = /*@__PURE__*/ sortStrings(j), Yi = /*@__PURE__*/ sortStrings(wi), Dt = /*@__PURE__*/ jr(ki, 0), Ci = /*@__PURE__*/ E(zeroOutProps, wi), En = Intl.DateTimeFormat, Zi = \"en-GB\", Ri = 1e8, zi = Ri * Gr, qi = [ Ri, 0 ], Ui = [ -Ri, 0 ], Ai = 275760, Li = -271821, Wi = 1970, ji = 1972, xi = 12, $i = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), Gi = /*@__PURE__*/ Jn(computeJapaneseEraParts, WeakMap), Hi = \"smallestUnit\", Vi = \"unit\", _i = \"roundingIncrement\", Ji = \"fractionalSecondDigits\", Ki = \"relativeTo\", Qi = {\n constrain: 0,\n reject: 1\n}, Xi = /*@__PURE__*/ Object.keys(Qi), ea = {\n compatible: 0,\n reject: 1,\n earlier: 2,\n later: 3\n}, na = {\n reject: 0,\n use: 1,\n prefer: 2,\n ignore: 3\n}, ta = {\n auto: 0,\n never: 1,\n critical: 2,\n always: 3\n}, oa = {\n auto: 0,\n never: 1,\n critical: 2\n}, ra = {\n auto: 0,\n never: 1\n}, ia = {\n floor: 0,\n halfFloor: 1,\n ceil: 2,\n halfCeil: 3,\n trunc: 4,\n halfTrunc: 5,\n expand: 6,\n halfExpand: 7,\n halfEven: 8\n}, aa = /*@__PURE__*/ E(refineUnitOption, Hi), sa = /*@__PURE__*/ E(refineUnitOption, \"largestUnit\"), ca = /*@__PURE__*/ E(refineUnitOption, Vi), ua = /*@__PURE__*/ E(refineChoiceOption, \"overflow\", Qi), la = /*@__PURE__*/ E(refineChoiceOption, \"disambiguation\", ea), fa = /*@__PURE__*/ E(refineChoiceOption, \"offset\", na), da = /*@__PURE__*/ E(refineChoiceOption, \"calendarName\", ta), ma = /*@__PURE__*/ E(refineChoiceOption, \"timeZoneName\", oa), pa = /*@__PURE__*/ E(refineChoiceOption, \"offset\", ra), ha = /*@__PURE__*/ E(refineChoiceOption, \"roundingMode\", ia), L = \"PlainYearMonth\", q = \"PlainMonthDay\", J = \"PlainDate\", We = \"PlainDateTime\", xe = \"PlainTime\", Te = \"ZonedDateTime\", Oe = \"Instant\", qt = \"Duration\", ga = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], Ta = \"UTC\", Da = 5184e3, Ia = /*@__PURE__*/ isoArgsToEpochSec(1847), Ma = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), Na = /0+$/, fn = /*@__PURE__*/ Jn(_zonedEpochSlotsToIso, WeakMap), ya = 2 ** 32 - 1, ie = /*@__PURE__*/ Jn((e => {\n const n = getTimeZoneEssence(e);\n return \"object\" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);\n}));\n\nclass FixedTimeZone {\n constructor(e) {\n this.v = e;\n }\n getOffsetNanosecondsFor() {\n return this.v;\n }\n getPossibleInstantsFor(e) {\n return [ isoToEpochNanoWithOffset(e, this.v) ];\n }\n l() {}\n}\n\nclass IntlTimeZone {\n constructor(e) {\n this.$ = (e => {\n function getOffsetSec(e) {\n const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);\n return c === u ? c : pinch(t(a, s), c, u, e);\n }\n function pinch(n, t, o, r) {\n let i, a;\n for (;(void 0 === r || void 0 === (i = r < n[0] ? t : r >= n[1] ? o : void 0)) && (a = n[1] - n[0]); ) {\n const t = n[0] + Math.floor(a / 2);\n e(t) === o ? n[1] = t : n[0] = t + 1;\n }\n return i;\n }\n const n = Jn(e), t = Jn(createSplitTuple);\n let o = Ia, r = Ma;\n return {\n G(e) {\n const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;\n if (n === t) {\n return [ o ];\n }\n const i = getOffsetSec(o);\n return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];\n },\n V: getOffsetSec,\n l(e, i) {\n const a = clampNumber(e, o, r);\n let [s, c] = computePeriod(a);\n const u = Da * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a, \n 0);\n for (;l(); ) {\n const o = n(s), r = n(c);\n if (o !== r) {\n const n = t(s, c);\n pinch(n, o, r);\n const a = n[0];\n if ((compareNumbers(a, e) || 1) === i) {\n return a;\n }\n }\n s += u, c += u;\n }\n }\n };\n })((e => n => {\n const t = hashIntlFormatParts(e, n * Hr);\n return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;\n })(e));\n }\n getOffsetNanosecondsFor(e) {\n return this.$.V(epochNanoToSec(e)) * _r;\n }\n getPossibleInstantsFor(e) {\n const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * be + o.isoMicrosecond * Vr + o.isoNanosecond ];\n var o;\n return this.$.G(n).map((e => checkEpochNanoInBounds(moveBigNano(he(e, _r), t))));\n }\n l(e, n) {\n const [t, o] = epochNanoToSecMod(e), r = this.$.l(t + (n > 0 || o ? 1 : 0), n);\n if (void 0 !== r) {\n return he(r, _r);\n }\n }\n}\n\nconst Pa = \"([+\u2212-])\", va = \"(?:[.,](\\\\d{1,9}))?\", Ea = `(?:(?:${Pa}(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})`, Sa = \"(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})\" + va + \")?)?\", Fa = Pa + Sa, ba = Ea + \"-?(\\\\d{2})(?:[T ]\" + Sa + \"(Z|\" + Fa + \")?)?\", Oa = \"\\\\[(!?)([^\\\\]]*)\\\\]\", wa = `((?:${Oa}){0,9})`, Ba = /*@__PURE__*/ createRegExp(Ea + wa), ka = /*@__PURE__*/ createRegExp(\"(?:--)?(\\\\d{2})-?(\\\\d{2})\" + wa), Ya = /*@__PURE__*/ createRegExp(ba + wa), Ca = /*@__PURE__*/ createRegExp(\"T?\" + Sa + \"(?:\" + Fa + \")?\" + wa), Za = /*@__PURE__*/ createRegExp(Fa), Ra = /*@__PURE__*/ new RegExp(Oa, \"g\"), za = /*@__PURE__*/ createRegExp(`${Pa}?P(\\\\d+Y)?(\\\\d+M)?(\\\\d+W)?(\\\\d+D)?(?:T(?:(\\\\d+)${va}H)?(?:(\\\\d+)${va}M)?(?:(\\\\d+)${va}S)?)?`), qa = /*@__PURE__*/ Jn((e => new En(Zi, {\n timeZone: e,\n era: \"short\",\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n}))), Ua = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/, Aa = /*@__PURE__*/ Jn(createIntlCalendar), La = /*@__PURE__*/ Jn((e => new En(Zi, {\n calendar: e,\n timeZone: Ta,\n era: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\"\n}))), Wa = /^M(\\d{2})(L?)$/, ja = {\n era: toStringViaPrimitive,\n eraYear: toInteger,\n year: toInteger,\n month: toPositiveInteger,\n monthCode: toStringViaPrimitive,\n day: toPositiveInteger\n}, xa = /*@__PURE__*/ jr(w, toInteger), $a = /*@__PURE__*/ jr(F, toStrictInteger), Ga = /*@__PURE__*/ Object.assign({}, ja, xa, $a, {\n offset: toStringViaPrimitive\n}), Ha = /*@__PURE__*/ E(remapProps, w, j), Va = {\n dateAdd(e, n, t) {\n const o = H(t);\n let r, {years: i, months: a, weeks: s, days: c} = n;\n if (c += durationFieldsToBigNano(n, 5)[0], i || a) {\n r = ((e, n, t, o, r) => {\n let [i, a, s] = e.h(n);\n if (t) {\n const [n, o] = e.I(i, a);\n i += t, a = monthCodeNumberToMonth(n, o, e.U(i)), a = clampEntity(\"month\", a, 1, e.L(i), r);\n }\n return o && ([i, a] = e._(i, a, o)), s = clampEntity(\"day\", s, 1, e.j(i, a), r), \n e.q(i, a, s);\n })(this, e, i, a, o);\n } else {\n if (!s && !c) {\n return e;\n }\n r = isoToEpochMilli(e);\n }\n return r += (7 * s + c) * Gr, checkIsoDateInBounds(epochMilliToIso(r));\n },\n dateUntil(e, n, t) {\n if (t <= 7) {\n let o = 0, r = diffDays({\n ...e,\n ...Dt\n }, {\n ...n,\n ...Dt\n });\n return 7 === t && ([o, r] = divModTrunc(r, 7)), {\n ...Si,\n weeks: o,\n days: r\n };\n }\n const o = this.h(e), r = this.h(n);\n let [i, a, s] = ((e, n, t, o, r, i, a) => {\n let s = r - n, c = i - t, u = a - o;\n if (s || c) {\n const l = Math.sign(s || c);\n let f = e.j(r, i), d = 0;\n if (Math.sign(u) === -l) {\n const o = f;\n [r, i] = e._(r, i, -l), s = r - n, c = i - t, f = e.j(r, i), d = l < 0 ? -o : f;\n }\n if (u = a - Math.min(o, f) + d, s) {\n const [o, a] = e.I(n, t), [u, f] = e.I(r, i);\n if (c = u - o || Number(f) - Number(a), Math.sign(c) === -l) {\n const t = l < 0 && -e.L(r);\n s = (r -= l) - n, c = i - monthCodeNumberToMonth(o, a, e.U(r)) + (t || e.L(r));\n }\n }\n }\n return [ s, c, u ];\n })(this, ...o, ...r);\n return 8 === t && (a += this.J(i, o[0]), i = 0), {\n ...Si,\n years: i,\n months: a,\n days: s\n };\n },\n dateFromFields(e, n) {\n const t = H(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);\n return v(checkIsoDateInBounds(this.P(o, r, i)), this.id || X);\n },\n yearMonthFromFields(e, n) {\n const t = H(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);\n return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.P(o, r, 1)), this.id || X);\n },\n monthDayFromFields(e, n) {\n const t = H(n), o = !this.id, {monthCode: r, year: i, month: a} = e;\n let s, c, u, l, f;\n if (void 0 !== r) {\n [s, c] = parseMonthCode(r), f = getDefinedProp(e, \"day\");\n const n = this.N(s, c, f);\n if (!n) {\n throw new RangeError(yr);\n }\n if ([u, l] = n, void 0 !== a && a !== l) {\n throw new RangeError(Mr);\n }\n o && (l = clampEntity(\"month\", l, 1, xi, 1), f = clampEntity(\"day\", f, 1, computeIsoDaysInMonth(void 0 !== i ? i : u, l), t));\n } else {\n u = void 0 === i && o ? ji : refineYear(this, e), l = refineMonth(this, e, u, t), \n f = refineDay(this, e, l, u, t);\n const n = this.U(u);\n c = l === n, s = monthToMonthCodeNumber(l, n);\n const r = this.N(s, c, f);\n if (!r) {\n throw new RangeError(yr);\n }\n [u, l] = r;\n }\n return createPlainMonthDaySlots(checkIsoDateInBounds(this.P(u, l, f)), this.id || X);\n },\n fields(e) {\n return getCalendarEraOrigins(this) && e.includes(\"year\") ? [ ...e, ...ii ] : e;\n },\n mergeFields(e, n) {\n const t = Object.assign(Object.create(null), e);\n return spliceFields(t, n, ui), getCalendarEraOrigins(this) && (spliceFields(t, n, ai), \n this.id === Ti && spliceFields(t, n, mi, ii)), t;\n },\n inLeapYear(e) {\n const [n] = this.h(e);\n return this.K(n);\n },\n monthsInYear(e) {\n const [n] = this.h(e);\n return this.L(n);\n },\n daysInMonth(e) {\n const [n, t] = this.h(e);\n return this.j(n, t);\n },\n daysInYear(e) {\n const [n] = this.h(e);\n return this.X(n);\n },\n dayOfYear: computeNativeDayOfYear,\n era(e) {\n return this.ee(e)[0];\n },\n eraYear(e) {\n return this.ee(e)[1];\n },\n monthCode(e) {\n const [n, t] = this.h(e), [o, r] = this.I(n, t);\n return ((e, n) => \"M\" + xr(e) + (n ? \"L\" : \"\"))(o, r);\n },\n dayOfWeek: computeIsoDayOfWeek,\n daysInWeek() {\n return 7;\n }\n}, _a = {\n dayOfYear: computeNativeDayOfYear,\n h: computeIsoDateParts,\n q: isoArgsToEpochMilli\n}, Ja = /*@__PURE__*/ Object.assign({}, _a, {\n weekOfYear: computeNativeWeekOfYear,\n yearOfWeek: computeNativeYearOfWeek,\n R(e) {\n function computeWeekShift(e) {\n return (7 - e < n ? 7 : 0) - e;\n }\n function computeWeeksInYear(e) {\n const n = computeIsoDaysInYear(l + e), t = e || 1, o = computeWeekShift(modFloor(a + n * t, 7));\n return c = (n + (o - s) * t) / 7;\n }\n const n = this.id ? 1 : 4, t = computeIsoDayOfWeek(e), o = this.dayOfYear(e), r = modFloor(t - 1, 7), i = o - 1, a = modFloor(r - i, 7), s = computeWeekShift(a);\n let c, u = Math.floor((i - s) / 7) + 1, l = e.isoYear;\n return u ? u > computeWeeksInYear(0) && (u = 1, l++) : (u = computeWeeksInYear(-1), \n l--), [ u, l, c ];\n }\n}), Ka = {\n dayOfYear: computeNativeDayOfYear,\n h: computeIntlDateParts,\n q: computeIntlEpochMilli,\n weekOfYear: computeNativeWeekOfYear,\n yearOfWeek: computeNativeYearOfWeek,\n R() {\n return [];\n }\n}, Y = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, Va, Ja, {\n h: computeIsoDateParts,\n ee(e) {\n return this.id === gi ? computeGregoryEraParts(e) : this.id === Ti ? Gi(e) : [];\n },\n I: (e, n) => [ n, 0 ],\n N(e, n) {\n if (!n) {\n return [ ji, e ];\n }\n },\n K: computeIsoInLeapYear,\n U() {},\n L: computeIsoMonthsInYear,\n J: e => e * xi,\n j: computeIsoDaysInMonth,\n X: computeIsoDaysInYear,\n P: (e, n, t) => ({\n isoYear: e,\n isoMonth: n,\n isoDay: t\n }),\n q: isoArgsToEpochMilli,\n _: (e, n, t) => (e += divTrunc(t, xi), (n += modTrunc(t, xi)) < 1 ? (e--, n += xi) : n > xi && (e++, \n n -= xi), [ e, n ]),\n year(e) {\n return e.isoYear;\n },\n month(e) {\n return e.isoMonth;\n },\n day: e => e.isoDay\n}), /*@__PURE__*/ Object.assign({}, Va, Ka, {\n h: computeIntlDateParts,\n ee(e) {\n const n = this.O(e);\n return [ n.era, n.eraYear ];\n },\n I(e, n) {\n const t = computeIntlLeapMonth.call(this, e);\n return [ monthToMonthCodeNumber(n, t), t === n ];\n },\n N(e, n, t) {\n let [o, r, i] = computeIntlDateParts.call(this, {\n isoYear: ji,\n isoMonth: xi,\n isoDay: 31\n });\n const a = computeIntlLeapMonth.call(this, o), s = r === a;\n 1 === (compareNumbers(e, monthToMonthCodeNumber(r, a)) || compareNumbers(Number(n), Number(s)) || compareNumbers(t, i)) && o--;\n for (let r = 0; r < 100; r++) {\n const i = o - r, a = computeIntlLeapMonth.call(this, i), s = monthCodeNumberToMonth(e, n, a);\n if (n === (s === a) && t <= computeIntlDaysInMonth.call(this, i, s)) {\n return [ i, s ];\n }\n }\n },\n K(e) {\n const n = computeIntlDaysInYear.call(this, e);\n return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);\n },\n U: computeIntlLeapMonth,\n L: computeIntlMonthsInYear,\n J(e, n) {\n const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;\n let i = 0;\n for (let e = n; e !== t; e += o) {\n i += computeIntlMonthsInYear.call(this, e + r);\n }\n return i;\n },\n j: computeIntlDaysInMonth,\n X: computeIntlDaysInYear,\n P(e, n, t) {\n return epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t));\n },\n q: computeIntlEpochMilli,\n _(e, n, t) {\n if (t) {\n if (n += t, !Number.isSafeInteger(n)) {\n throw new RangeError(Cr);\n }\n if (t < 0) {\n for (;n < 1; ) {\n n += computeIntlMonthsInYear.call(this, --e);\n }\n } else {\n let t;\n for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {\n n -= t, e++;\n }\n }\n }\n return [ e, n ];\n },\n year(e) {\n return this.O(e).year;\n },\n month(e) {\n const {year: n, F: t} = this.O(e), {C: o} = this.B(n);\n return o[t] + 1;\n },\n day(e) {\n return this.O(e).day;\n }\n})), Qa = \"numeric\", Xa = [ \"timeZoneName\" ], es = {\n month: Qa,\n day: Qa\n}, ns = {\n year: Qa,\n month: Qa\n}, ts = /*@__PURE__*/ Object.assign({}, ns, {\n day: Qa\n}), os = {\n hour: Qa,\n minute: Qa,\n second: Qa\n}, rs = /*@__PURE__*/ Object.assign({}, ts, os), is = /*@__PURE__*/ Object.assign({}, rs, {\n timeZoneName: \"short\"\n}), as = /*@__PURE__*/ Object.keys(ns), ss = /*@__PURE__*/ Object.keys(es), cs = /*@__PURE__*/ Object.keys(ts), us = /*@__PURE__*/ Object.keys(os), ls = [ \"dateStyle\" ], fs = /*@__PURE__*/ as.concat(ls), ds = /*@__PURE__*/ ss.concat(ls), ms = /*@__PURE__*/ cs.concat(ls, [ \"weekday\" ]), ps = /*@__PURE__*/ us.concat([ \"dayPeriod\", \"timeStyle\" ]), hs = /*@__PURE__*/ ms.concat(ps), gs = /*@__PURE__*/ hs.concat(Xa), Ts = /*@__PURE__*/ Xa.concat(ps), Ds = /*@__PURE__*/ Xa.concat(ms), Is = /*@__PURE__*/ Xa.concat([ \"day\", \"weekday\" ], ps), Ms = /*@__PURE__*/ Xa.concat([ \"year\", \"weekday\" ], ps), Ns = {}, t = [ /*@__PURE__*/ createOptionsTransformer(hs, rs), y ], s = [ /*@__PURE__*/ createOptionsTransformer(gs, is), y, 0, (e, n) => {\n const t = I(e.timeZone);\n if (n && I(n.timeZone) !== t) {\n throw new RangeError(Fr);\n }\n return t;\n} ], n = [ /*@__PURE__*/ createOptionsTransformer(hs, rs, Xa), isoToEpochMilli ], o = [ /*@__PURE__*/ createOptionsTransformer(ms, ts, Ts), isoToEpochMilli ], r = [ /*@__PURE__*/ createOptionsTransformer(ps, os, Ds), e => isoTimeFieldsToNano(e) / be ], a = [ /*@__PURE__*/ createOptionsTransformer(fs, ns, Is), isoToEpochMilli, 1 ], i = [ /*@__PURE__*/ createOptionsTransformer(ds, es, Ms), isoToEpochMilli, 1 ];\n\nlet ys;\n\nexport { qt as DurationBranding, Oe as InstantBranding, J as PlainDateBranding, We as PlainDateTimeBranding, q as PlainMonthDayBranding, xe as PlainTimeBranding, L as PlainYearMonthBranding, En as RawDateTimeFormat, Te as ZonedDateTimeBranding, Rt as absDuration, Wt as addDurations, oe as bigNanoToNumber, E as bindArgs, mn as buildZonedIsoFields, te as compareBigNanos, $t as compareDurations, Ze as compareInstants, rt as compareIsoDateFields, gt as compareIsoDateTimeFields, He as compareIsoTimeFields, yn as compareZonedDateTimes, dn as computeZonedHoursInDay, Cn as computeZonedStartOfDay, Lt as constructDurationSlots, Se as constructInstantSlots, Nt as constructPlainDateSlots, pt as constructPlainDateTimeSlots, G as constructPlainMonthDaySlots, ke as constructPlainTimeSlots, tt as constructPlainYearMonthSlots, vn as constructZonedDateTimeSlots, U as copyOptions, Vt as createDurationSlots, qn as createFormatForPrep, e as createFormatPrepper, O as createGetterDescriptors, _ as createInstantSlots, D as createNameDescriptors, Y as createNativeStandardOps, v as createPlainDateSlots, ee as createPlainDateTimeSlots, Ge as createPlainTimeSlots, p as createPropDescriptors, h as createStringTagDescriptors, Yn as createZonedDateTimeSlots, o as dateConfig, en as dateFieldNamesAlpha, n as dateTimeConfig, re as diffBigNanos, le as diffInstants, ut as diffPlainDateTimes, Ft as diffPlainDates, Ae as diffPlainTimes, Xe as diffPlainYearMonth, Dn as diffZonedDateTimes, F as durationFieldNamesAsc, kt as durationWithFields, Ce as epochMicroToInstant, Pe as epochMilliToInstant, ge as epochNanoToInstant, Ie as epochNanoToIso, De as epochSecToInstant, V as excludePropsByName, nn as excludeUndefinedProps, tn as forbiddenField, A as forbiddenValueOf, zt as formatDurationIso, me as formatInstantIso, Fe as formatOffsetNano, yt as formatPlainDateIso, Tt as formatPlainDateTimeIso, W as formatPlainMonthDayIso, qe as formatPlainTimeIso, et as formatPlainYearMonthIso, In as formatZonedDateTimeIso, Bn as getCurrentEpochNano, An as getCurrentIsoDateTime, Nn as getCurrentTimeZoneId, Jt as getDurationBlank, N as getEpochMicro, y as getEpochMilli, B as getEpochNano, M as getEpochSec, I as getId, ln as getRequiredDateFields, cn as getRequiredMonthDayFields, un as getRequiredYearMonthFields, we as getSingleInstantFor, C as hasAllPropsByName, t as instantConfig, fe as instantToZonedDateTime, ue as instantsEqual, Z as invalidBag, P as invalidCallingContext, Ln as invalidFormatType, g as invalidProtocol, z as isObjectLike, je as isTimeZoneSlotsEqual, X as isoCalendarId, Dt as isoTimeFieldDefaults, j as isoTimeFieldNamesAsc, b as mapPropNames, T as mapProps, Jn as memoize, kn as mismatchingFormatTypes, i as monthDayConfig, se as moveInstant, bt as movePlainDate, ct as movePlainDateTime, Ye as movePlainTime, Qe as movePlainYearMonth, hn as moveZonedDateTime, be as nanoInMilli, xt as negateDuration, he as numberToBigNano, sn as parseCalendarId, Kt as parseDuration, pe as parseInstant, At as parsePlainDate, Ct as parsePlainDateTime, Q as parsePlainMonthDay, ze as parsePlainTime, ot as parsePlainYearMonth, Xt as parseRelativeToSlots, Ne as parseTimeZoneId, Mn as parseZonedDateTime, Ot as plainDateTimeToPlainMonthDay, St as plainDateTimeToPlainYearMonth, mt as plainDateTimeToZonedDateTime, at as plainDateTimeWithFields, st as plainDateTimeWithPlainDate, lt as plainDateTimeWithPlainTime, ft as plainDateTimesEqual, wt as plainDateToPlainDateTime, Mt as plainDateToPlainMonthDay, jt as plainDateToPlainYearMonth, vt as plainDateToZonedDateTime, Zt as plainDateWithFields, It as plainDatesEqual, R as plainMonthDayToPlainDate, k as plainMonthDayWithFields, x as plainMonthDaysEqual, Le as plainTimeToPlainDateTime, Je as plainTimeToZonedDateTime, Be as plainTimeWithFields, Ve as plainTimesEqual, _e as plainYearMonthToPlainDate, Ke as plainYearMonthWithFields, $e as plainYearMonthsEqual, Vn as pluckProps, ie as queryNativeTimeZone, rn as refineCalendarId, _t as refineDateDiffOptions, Ht as refineDurationBag, ve as refineEpochDisambigOptions, Qt as refineMaybeZonedDateTimeBag, H as refineOverflowOptions, Yt as refinePlainDateBag, Pt as refinePlainDateTimeBag, K as refinePlainMonthDayBag, Ue as refinePlainTimeBag, nt as refinePlainYearMonthBag, Me as refineTimeZoneId, jn as refineZonedDateTimeBag, wn as refineZonedFieldOptions, f as requireBoolean, $ as requireFunction, u as requireInteger, c as requireIntegerOrUndefined, on as requireNonNullish, de as requireObjectLike, d as requirePositiveInteger, S as requirePositiveIntegerOrUndefined, m as requireString, l as requireStringOrUndefined, an as resolveCalendarId, ye as resolveTimeZoneId, Gt as roundDuration, ce as roundInstant, dt as roundPlainDateTime, Ee as roundPlainTime, Pn as roundZonedDateTime, it as slotsWithCalendar, On as slotsWithTimeZone, r as timeConfig, w as timeFieldNamesAsc, Ut as totalDuration, Et as unitNamesAsc, ne as validateTimeZoneGap, ae as validateTimeZoneOffset, a as yearMonthConfig, s as zonedConfig, Zn as zonedDateTimeToInstant, Bt as zonedDateTimeToPlainDate, ht as zonedDateTimeToPlainDateTime, Fn as zonedDateTimeToPlainMonthDay, Re as zonedDateTimeToPlainTime, bn as zonedDateTimeToPlainYearMonth, Sn as zonedDateTimeWithFields, Tn as zonedDateTimeWithPlainDate, pn as zonedDateTimeWithPlainTime, gn as zonedDateTimesEqual, fn as zonedEpochSlotsToIso };\n", "function createSlotClass(e, t, n, o, r) {\n function Class(...e) {\n if (!(this instanceof Class)) {\n throw new TypeError(P);\n }\n oo(this, t(...e));\n }\n function bindMethod(e, t) {\n return Object.defineProperties((function(...t) {\n return e.call(this, getSpecificSlots(this), ...t);\n }), D(t));\n }\n function getSpecificSlots(t) {\n const n = no(t);\n if (!n || n.branding !== e) {\n throw new TypeError(P);\n }\n return n;\n }\n return Object.defineProperties(Class.prototype, {\n ...O(T(bindMethod, n)),\n ...p(T(bindMethod, o)),\n ...h(\"Temporal.\" + e)\n }), Object.defineProperties(Class, {\n ...p(r),\n ...D(e)\n }), [ Class, e => {\n const t = Object.create(Class.prototype);\n return oo(t, e), t;\n }, getSpecificSlots ];\n}\n\nfunction createProtocolValidator(e) {\n return e = e.concat(\"id\").sort(), t => {\n if (!C(t, e)) {\n throw new TypeError(g);\n }\n return t;\n };\n}\n\nfunction rejectInvalidBag(e) {\n if (no(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {\n throw new TypeError(Z);\n }\n return e;\n}\n\nfunction createCalendarFieldMethods(e, t) {\n const n = {};\n for (const o in e) {\n n[o] = ({o: e}, n) => {\n const r = no(n) || {}, {branding: a} = r, i = a === J || t.includes(a) ? r : toPlainDateSlots(n);\n return e[o](i);\n };\n }\n return n;\n}\n\nfunction createCalendarGetters(e) {\n const t = {};\n for (const n in e) {\n t[n] = e => {\n const {calendar: t} = e;\n return (o = t, \"string\" == typeof o ? Y(o) : (r = o, Object.assign(Object.create(co), {\n i: r\n })))[n](e);\n var o, r;\n };\n }\n return t;\n}\n\nfunction neverValueOf() {\n throw new TypeError(A);\n}\n\nfunction createCalendarFromSlots({calendar: e}) {\n return \"string\" == typeof e ? new lr(e) : e;\n}\n\nfunction toPlainMonthDaySlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n if (n && n.branding === q) {\n return H(t), n;\n }\n const o = extractCalendarSlotFromBag(e);\n return K(Qo(o || X), !o, e, t);\n }\n const n = Q(Y, e);\n return H(t), n;\n}\n\nfunction getOffsetNanosecondsForAdapter(e, t, n) {\n return o = t.call(e, Co(_(n))), ae(u(o));\n var o;\n}\n\nfunction createAdapterOps(e, t = ho) {\n const n = Object.keys(t).sort(), o = {};\n for (const r of n) {\n o[r] = E(t[r], e, $(e[r]));\n }\n return o;\n}\n\nfunction createTimeZoneOps(e, t) {\n return \"string\" == typeof e ? ie(e) : createAdapterOps(e, t);\n}\n\nfunction createTimeZoneOffsetOps(e) {\n return createTimeZoneOps(e, Do);\n}\n\nfunction toInstantSlots(e) {\n if (z(e)) {\n const t = no(e);\n if (t) {\n switch (t.branding) {\n case Oe:\n return t;\n\n case Te:\n return _(t.epochNanoseconds);\n }\n }\n }\n return pe(e);\n}\n\nfunction toTemporalInstant() {\n return Co(_(he(this.valueOf(), be)));\n}\n\nfunction getImplTransition(e, t, n) {\n const o = t.l(toInstantSlots(n).epochNanoseconds, e);\n return o ? Co(_(o)) : null;\n}\n\nfunction refineTimeZoneSlot(e) {\n return z(e) ? (no(e) || {}).timeZone || Fo(e) : (e => ye(Ne(m(e))))(e);\n}\n\nfunction toPlainTimeSlots(e, t) {\n if (z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case xe:\n return H(t), n;\n\n case We:\n return H(t), Ge(n);\n\n case Te:\n return H(t), Re(createTimeZoneOffsetOps, n);\n }\n return Ue(e, t);\n }\n return H(t), ze(e);\n}\n\nfunction optionalToPlainTimeFields(e) {\n return void 0 === e ? void 0 : toPlainTimeSlots(e);\n}\n\nfunction toPlainYearMonthSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n return n && n.branding === L ? (H(t), n) : nt(Ho(getCalendarSlotFromBag(e)), e, t);\n }\n const n = ot(Y, e);\n return H(t), n;\n}\n\nfunction toPlainDateTimeSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case We:\n return H(t), n;\n\n case J:\n return H(t), ee({\n ...n,\n ...Dt\n });\n\n case Te:\n return H(t), ht(createTimeZoneOffsetOps, n);\n }\n return Pt(Ko(getCalendarSlotFromBag(e)), e, t);\n }\n const n = Ct(e);\n return H(t), n;\n}\n\nfunction toPlainDateSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case J:\n return H(t), n;\n\n case We:\n return H(t), v(n);\n\n case Te:\n return H(t), Bt(createTimeZoneOffsetOps, n);\n }\n return Yt(Ko(getCalendarSlotFromBag(e)), e, t);\n }\n const n = At(e);\n return H(t), n;\n}\n\nfunction dayAdapter(e, t, n) {\n return d(t.call(e, Yo(v(n, e))));\n}\n\nfunction createCompoundOpsCreator(e) {\n return t => \"string\" == typeof t ? Y(t) : ((e, t) => {\n const n = Object.keys(t).sort(), o = {};\n for (const r of n) {\n o[r] = E(t[r], e, e[r]);\n }\n return o;\n })(t, e);\n}\n\nfunction toDurationSlots(e) {\n if (z(e)) {\n const t = no(e);\n return t && t.branding === qt ? t : Ht(e);\n }\n return Kt(e);\n}\n\nfunction refinePublicRelativeTo(e) {\n if (void 0 !== e) {\n if (z(e)) {\n const t = no(e) || {};\n switch (t.branding) {\n case Te:\n case J:\n return t;\n\n case We:\n return v(t);\n }\n const n = getCalendarSlotFromBag(e);\n return {\n ...Qt(refineTimeZoneSlot, createTimeZoneOps, Ko(n), e),\n calendar: n\n };\n }\n return Xt(e);\n }\n}\n\nfunction getCalendarSlotFromBag(e) {\n return extractCalendarSlotFromBag(e) || X;\n}\n\nfunction extractCalendarSlotFromBag(e) {\n const {calendar: t} = e;\n if (void 0 !== t) {\n return refineCalendarSlot(t);\n }\n}\n\nfunction refineCalendarSlot(e) {\n return z(e) ? (no(e) || {}).calendar || cr(e) : (e => an(sn(m(e))))(e);\n}\n\nfunction toZonedDateTimeSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n if (n && n.branding === Te) {\n return wn(t), n;\n }\n const o = getCalendarSlotFromBag(e);\n return jn(refineTimeZoneSlot, createTimeZoneOps, Ko(o), o, e, t);\n }\n return Mn(e, t);\n}\n\nfunction adaptDateMethods(e) {\n return T((e => t => e(slotsToIso(t))), e);\n}\n\nfunction slotsToIso(e) {\n return fn(e, createTimeZoneOffsetOps);\n}\n\nfunction createDateTimeFormatClass() {\n const e = En.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(En), DateTimeFormat = function(e, t = {}) {\n if (!(this instanceof DateTimeFormat)) {\n return new DateTimeFormat(e, t);\n }\n Or.set(this, ((e, t = {}) => {\n const n = new En(e, t), o = n.resolvedOptions(), r = o.locale, a = Vn(Object.keys(t), o), i = Jn(createFormatPrepperForBranding), prepFormat = (...e) => {\n let t;\n const o = e.map(((e, n) => {\n const o = no(e), r = (o || {}).branding;\n if (n && t && t !== r) {\n throw new TypeError(kn);\n }\n return t = r, o;\n }));\n return t ? i(t)(r, a, ...o) : [ n, ...e ];\n };\n return prepFormat.u = n, prepFormat;\n })(e, t));\n };\n for (const e in t) {\n const n = t[e], o = e.startsWith(\"format\") && createFormatMethod(e);\n \"function\" == typeof n.value ? n.value = \"constructor\" === e ? DateTimeFormat : o || createProxiedMethod(e) : o && (n.get = function() {\n return o.bind(this);\n });\n }\n return n.prototype.value = Object.create(e, t), Object.defineProperties(DateTimeFormat, n), \n DateTimeFormat;\n}\n\nfunction createFormatMethod(e) {\n return function(...t) {\n const n = Or.get(this), [o, ...r] = n(...t);\n return o[e](...r);\n };\n}\n\nfunction createProxiedMethod(e) {\n return function(...t) {\n return Or.get(this).u[e](...t);\n };\n}\n\nfunction createFormatPrepperForBranding(t) {\n const n = xn[t];\n if (!n) {\n throw new TypeError(Ln(t));\n }\n return e(n, Jn(qn));\n}\n\nimport { createFormatPrepper as e, instantConfig as t, dateTimeConfig as n, dateConfig as o, timeConfig as r, yearMonthConfig as a, monthDayConfig as i, zonedConfig as s, requireStringOrUndefined as l, requireIntegerOrUndefined as c, requireInteger as u, requirePositiveInteger as d, requireBoolean as f, requireString as m, requirePositiveIntegerOrUndefined as S, createGetterDescriptors as O, mapProps as T, createPropDescriptors as p, createStringTagDescriptors as h, createNameDescriptors as D, invalidCallingContext as P, hasAllPropsByName as C, invalidProtocol as g, invalidBag as Z, mapPropNames as b, durationFieldNamesAsc as F, getId as I, createPlainDateSlots as v, timeFieldNamesAsc as w, isoTimeFieldNamesAsc as j, getEpochSec as M, getEpochMilli as y, getEpochMicro as N, getEpochNano as B, createNativeStandardOps as Y, forbiddenValueOf as A, bindArgs as E, excludePropsByName as V, PlainDateBranding as J, PlainYearMonthBranding as L, PlainMonthDayBranding as q, plainMonthDayWithFields as k, plainMonthDaysEqual as x, plainMonthDayToPlainDate as R, formatPlainMonthDayIso as W, constructPlainMonthDaySlots as G, copyOptions as U, isObjectLike as z, refineOverflowOptions as H, refinePlainMonthDayBag as K, parsePlainMonthDay as Q, isoCalendarId as X, requireFunction as $, createInstantSlots as _, createPlainDateTimeSlots as ee, compareBigNanos as te, validateTimeZoneGap as ne, bigNanoToNumber as oe, diffBigNanos as re, validateTimeZoneOffset as ae, queryNativeTimeZone as ie, moveInstant as se, diffInstants as le, roundInstant as ce, instantsEqual as ue, requireObjectLike as de, instantToZonedDateTime as fe, formatInstantIso as me, constructInstantSlots as Se, InstantBranding as Oe, ZonedDateTimeBranding as Te, parseInstant as pe, numberToBigNano as he, epochSecToInstant as De, epochMilliToInstant as Pe, epochMicroToInstant as Ce, epochNanoToInstant as ge, compareInstants as Ze, nanoInMilli as be, formatOffsetNano as Fe, epochNanoToIso as Ie, refineEpochDisambigOptions as ve, getSingleInstantFor as we, isTimeZoneSlotsEqual as je, refineTimeZoneId as Me, resolveTimeZoneId as ye, parseTimeZoneId as Ne, plainTimeWithFields as Be, movePlainTime as Ye, diffPlainTimes as Ae, roundPlainTime as Ee, plainTimesEqual as Ve, plainTimeToZonedDateTime as Je, plainTimeToPlainDateTime as Le, formatPlainTimeIso as qe, constructPlainTimeSlots as ke, PlainTimeBranding as xe, zonedDateTimeToPlainTime as Re, PlainDateTimeBranding as We, createPlainTimeSlots as Ge, refinePlainTimeBag as Ue, parsePlainTime as ze, compareIsoTimeFields as He, plainYearMonthWithFields as Ke, movePlainYearMonth as Qe, diffPlainYearMonth as Xe, plainYearMonthsEqual as $e, plainYearMonthToPlainDate as _e, formatPlainYearMonthIso as et, constructPlainYearMonthSlots as tt, refinePlainYearMonthBag as nt, parsePlainYearMonth as ot, compareIsoDateFields as rt, plainDateTimeWithFields as at, slotsWithCalendar as it, plainDateTimeWithPlainDate as st, plainDateTimeWithPlainTime as lt, movePlainDateTime as ct, diffPlainDateTimes as ut, roundPlainDateTime as dt, plainDateTimesEqual as ft, plainDateTimeToZonedDateTime as mt, plainDateTimeToPlainYearMonth as St, plainDateTimeToPlainMonthDay as Ot, formatPlainDateTimeIso as Tt, constructPlainDateTimeSlots as pt, zonedDateTimeToPlainDateTime as ht, isoTimeFieldDefaults as Dt, refinePlainDateTimeBag as Pt, parsePlainDateTime as Ct, compareIsoDateTimeFields as gt, plainDateWithFields as Zt, movePlainDate as bt, diffPlainDates as Ft, plainDatesEqual as It, plainDateToZonedDateTime as vt, plainDateToPlainDateTime as wt, plainDateToPlainYearMonth as jt, plainDateToPlainMonthDay as Mt, formatPlainDateIso as yt, constructPlainDateSlots as Nt, zonedDateTimeToPlainDate as Bt, refinePlainDateBag as Yt, parsePlainDate as At, unitNamesAsc as Et, createDurationSlots as Vt, getDurationBlank as Jt, constructDurationSlots as Lt, DurationBranding as qt, durationWithFields as kt, negateDuration as xt, absDuration as Rt, addDurations as Wt, roundDuration as Gt, totalDuration as Ut, formatDurationIso as zt, refineDurationBag as Ht, parseDuration as Kt, refineMaybeZonedDateTimeBag as Qt, parseRelativeToSlots as Xt, compareDurations as $t, refineDateDiffOptions as _t, dateFieldNamesAlpha as en, forbiddenField as tn, excludeUndefinedProps as nn, requireNonNullish as on, refineCalendarId as rn, resolveCalendarId as an, parseCalendarId as sn, getRequiredDateFields as ln, getRequiredMonthDayFields as cn, getRequiredYearMonthFields as un, computeZonedHoursInDay as dn, zonedEpochSlotsToIso as fn, buildZonedIsoFields as mn, zonedDateTimeWithFields as Sn, slotsWithTimeZone as On, zonedDateTimeWithPlainDate as Tn, zonedDateTimeWithPlainTime as pn, moveZonedDateTime as hn, diffZonedDateTimes as Dn, roundZonedDateTime as Pn, computeZonedStartOfDay as Cn, zonedDateTimesEqual as gn, zonedDateTimeToInstant as Zn, zonedDateTimeToPlainYearMonth as bn, zonedDateTimeToPlainMonthDay as Fn, formatZonedDateTimeIso as In, constructZonedDateTimeSlots as vn, refineZonedFieldOptions as wn, refineZonedDateTimeBag as jn, parseZonedDateTime as Mn, compareZonedDateTimes as yn, getCurrentTimeZoneId as Nn, getCurrentEpochNano as Bn, createZonedDateTimeSlots as Yn, getCurrentIsoDateTime as An, RawDateTimeFormat as En, pluckProps as Vn, memoize as Jn, invalidFormatType as Ln, createFormatForPrep as qn, mismatchingFormatTypes as kn } from \"./internal.js\";\n\nconst xn = {\n Instant: t,\n PlainDateTime: n,\n PlainDate: o,\n PlainTime: r,\n PlainYearMonth: a,\n PlainMonthDay: i\n}, Rn = /*@__PURE__*/ e(t), Wn = /*@__PURE__*/ e(s), Gn = /*@__PURE__*/ e(n), Un = /*@__PURE__*/ e(o), zn = /*@__PURE__*/ e(r), Hn = /*@__PURE__*/ e(a), Kn = /*@__PURE__*/ e(i), Qn = {\n era: l,\n eraYear: c,\n year: u,\n month: d,\n daysInMonth: d,\n daysInYear: d,\n inLeapYear: f,\n monthsInYear: d\n}, Xn = {\n monthCode: m\n}, $n = {\n day: d\n}, _n = {\n dayOfWeek: d,\n dayOfYear: d,\n weekOfYear: S,\n yearOfWeek: c,\n daysInWeek: d\n}, eo = /*@__PURE__*/ Object.assign({}, Qn, Xn, $n, _n), to = /*@__PURE__*/ new WeakMap, no = /*@__PURE__*/ to.get.bind(to), oo = /*@__PURE__*/ to.set.bind(to), ro = {\n ...createCalendarFieldMethods(Qn, [ L ]),\n ...createCalendarFieldMethods(_n, []),\n ...createCalendarFieldMethods(Xn, [ L, q ]),\n ...createCalendarFieldMethods($n, [ q ])\n}, ao = /*@__PURE__*/ createCalendarGetters(eo), io = /*@__PURE__*/ createCalendarGetters({\n ...Qn,\n ...Xn\n}), so = /*@__PURE__*/ createCalendarGetters({\n ...Xn,\n ...$n\n}), lo = {\n calendarId: e => I(e.calendar)\n}, co = /*@__PURE__*/ T(((e, t) => function(n) {\n const {i: o} = this;\n return e(o[t](Yo(v(n, o))));\n}), eo), uo = /*@__PURE__*/ b((e => t => t[e]), F.concat(\"sign\")), fo = /*@__PURE__*/ b(((e, t) => e => e[j[t]]), w), mo = {\n epochSeconds: M,\n epochMilliseconds: y,\n epochMicroseconds: N,\n epochNanoseconds: B\n}, So = /*@__PURE__*/ E(V, new Set([ \"branding\" ])), [Oo, To, po] = createSlotClass(q, E(G, refineCalendarSlot), {\n ...lo,\n ...so\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return To(k(_o, e, this, rejectInvalidBag(t), n));\n },\n equals: (e, t) => x(e, toPlainMonthDaySlots(t)),\n toPlainDate(e, t) {\n return Yo(R($o, e, this, t));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Kn(t, n, e);\n return o.format(r);\n },\n toString: W,\n toJSON: e => W(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => To(toPlainMonthDaySlots(e, t))\n}), ho = {\n getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,\n getPossibleInstantsFor(e, t, n) {\n const o = [ ...t.call(e, No(ee(n, X))) ].map((e => go(e).epochNanoseconds)), r = o.length;\n return r > 1 && (o.sort(te), ne(oe(re(o[0], o[r - 1])))), o;\n }\n}, Do = {\n getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter\n}, [Po, Co, go] = createSlotClass(Oe, Se, mo, {\n add: (e, t) => Co(se(0, e, toDurationSlots(t))),\n subtract: (e, t) => Co(se(1, e, toDurationSlots(t))),\n until: (e, t, n) => ar(le(0, e, toInstantSlots(t), n)),\n since: (e, t, n) => ar(le(1, e, toInstantSlots(t), n)),\n round: (e, t) => Co(ce(e, t)),\n equals: (e, t) => ue(e, toInstantSlots(t)),\n toZonedDateTime(e, t) {\n const n = de(t);\n return dr(fe(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));\n },\n toZonedDateTimeISO: (e, t) => dr(fe(e, refineTimeZoneSlot(t))),\n toLocaleString(e, t, n) {\n const [o, r] = Rn(t, n, e);\n return o.format(r);\n },\n toString: (e, t) => me(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),\n toJSON: e => me(refineTimeZoneSlot, createTimeZoneOffsetOps, e),\n valueOf: neverValueOf\n}, {\n from: e => Co(toInstantSlots(e)),\n fromEpochSeconds: e => Co(De(e)),\n fromEpochMilliseconds: e => Co(Pe(e)),\n fromEpochMicroseconds: e => Co(Ce(e)),\n fromEpochNanoseconds: e => Co(ge(e)),\n compare: (e, t) => Ze(toInstantSlots(e), toInstantSlots(t))\n}), [Zo, bo] = createSlotClass(\"TimeZone\", (e => {\n const t = Me(e);\n return {\n branding: \"TimeZone\",\n id: t,\n o: ie(t)\n };\n}), {\n id: e => e.id\n}, {\n getPossibleInstantsFor: ({o: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => Co(_(e)))),\n getOffsetNanosecondsFor: ({o: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),\n getOffsetStringFor(e, t) {\n const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, Do).getOffsetNanosecondsFor(n);\n return Fe(o);\n },\n getPlainDateTimeFor(e, t, n = X) {\n const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, Do).getOffsetNanosecondsFor(o);\n return No(ee(Ie(o, r), refineCalendarSlot(n)));\n },\n getInstantFor(e, t, n) {\n const o = toPlainDateTimeSlots(t), r = ve(n), a = createAdapterOps(this);\n return Co(_(we(a, o, r)));\n },\n getNextTransition: ({o: e}, t) => getImplTransition(1, e, t),\n getPreviousTransition: ({o: e}, t) => getImplTransition(-1, e, t),\n equals(e, t) {\n return !!je(this, refineTimeZoneSlot(t));\n },\n toString: e => e.id,\n toJSON: e => e.id\n}, {\n from(e) {\n const t = refineTimeZoneSlot(e);\n return \"string\" == typeof t ? new Zo(t) : t;\n }\n}), Fo = /*@__PURE__*/ createProtocolValidator(Object.keys(ho)), [Io, vo] = createSlotClass(xe, ke, fo, {\n getISOFields: So,\n with(e, t, n) {\n return vo(Be(this, rejectInvalidBag(t), n));\n },\n add: (e, t) => vo(Ye(0, e, toDurationSlots(t))),\n subtract: (e, t) => vo(Ye(1, e, toDurationSlots(t))),\n until: (e, t, n) => ar(Ae(0, e, toPlainTimeSlots(t), n)),\n since: (e, t, n) => ar(Ae(1, e, toPlainTimeSlots(t), n)),\n round: (e, t) => vo(Ee(e, t)),\n equals: (e, t) => Ve(e, toPlainTimeSlots(t)),\n toZonedDateTime: (e, t) => dr(Je(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),\n toPlainDateTime: (e, t) => No(Le(e, toPlainDateSlots(t))),\n toLocaleString(e, t, n) {\n const [o, r] = zn(t, n, e);\n return o.format(r);\n },\n toString: qe,\n toJSON: e => qe(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => vo(toPlainTimeSlots(e, t)),\n compare: (e, t) => He(toPlainTimeSlots(e), toPlainTimeSlots(t))\n}), [wo, jo, Mo] = createSlotClass(L, E(tt, refineCalendarSlot), {\n ...lo,\n ...io\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return jo(Ke(Xo, e, this, rejectInvalidBag(t), n));\n },\n add: (e, t, n) => jo(Qe(nr, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => jo(Qe(nr, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Xe(or, 0, e, toPlainYearMonthSlots(t), n)),\n since: (e, t, n) => ar(Xe(or, 1, e, toPlainYearMonthSlots(t), n)),\n equals: (e, t) => $e(e, toPlainYearMonthSlots(t)),\n toPlainDate(e, t) {\n return Yo(_e($o, e, this, t));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Hn(t, n, e);\n return o.format(r);\n },\n toString: et,\n toJSON: e => et(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => jo(toPlainYearMonthSlots(e, t)),\n compare: (e, t) => rt(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))\n}), [yo, No] = createSlotClass(We, E(pt, refineCalendarSlot), {\n ...lo,\n ...ao,\n ...fo\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return No(at($o, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => No(it(e, refineCalendarSlot(t))),\n withPlainDate: (e, t) => No(st(e, toPlainDateSlots(t))),\n withPlainTime: (e, t) => No(lt(e, optionalToPlainTimeFields(t))),\n add: (e, t, n) => No(ct(er, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => No(ct(er, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(ut(tr, 0, e, toPlainDateTimeSlots(t), n)),\n since: (e, t, n) => ar(ut(tr, 1, e, toPlainDateTimeSlots(t), n)),\n round: (e, t) => No(dt(e, t)),\n equals: (e, t) => ft(e, toPlainDateTimeSlots(t)),\n toZonedDateTime: (e, t, n) => dr(mt(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),\n toPlainDate: e => Yo(v(e)),\n toPlainTime: e => vo(Ge(e)),\n toPlainYearMonth(e) {\n return jo(St(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Ot(Qo, e, this));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Gn(t, n, e);\n return o.format(r);\n },\n toString: Tt,\n toJSON: e => Tt(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => No(toPlainDateTimeSlots(e, t)),\n compare: (e, t) => gt(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))\n}), [Bo, Yo, Ao] = createSlotClass(J, E(Nt, refineCalendarSlot), {\n ...lo,\n ...ao\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return Yo(Zt($o, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => Yo(it(e, refineCalendarSlot(t))),\n add: (e, t, n) => Yo(bt(er, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => Yo(bt(er, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Ft(tr, 0, e, toPlainDateSlots(t), n)),\n since: (e, t, n) => ar(Ft(tr, 1, e, toPlainDateSlots(t), n)),\n equals: (e, t) => It(e, toPlainDateSlots(t)),\n toZonedDateTime(e, t) {\n const n = !z(t) || t instanceof Zo ? {\n timeZone: t\n } : t;\n return dr(vt(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));\n },\n toPlainDateTime: (e, t) => No(wt(e, optionalToPlainTimeFields(t))),\n toPlainYearMonth(e) {\n return jo(jt(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Mt(Qo, e, this));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Un(t, n, e);\n return o.format(r);\n },\n toString: yt,\n toJSON: e => yt(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => Yo(toPlainDateSlots(e, t)),\n compare: (e, t) => rt(toPlainDateSlots(e), toPlainDateSlots(t))\n}), Eo = {\n fields(e, t, n) {\n return [ ...t.call(e, n) ];\n }\n}, Vo = /*@__PURE__*/ Object.assign({\n dateFromFields(e, t, n, o) {\n return Ao(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), Jo = /*@__PURE__*/ Object.assign({\n yearMonthFromFields(e, t, n, o) {\n return Mo(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), Lo = /*@__PURE__*/ Object.assign({\n monthDayFromFields(e, t, n, o) {\n return po(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), qo = {\n mergeFields(e, t, n, o) {\n return de(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));\n }\n}, ko = /*@__PURE__*/ Object.assign({}, Vo, qo), xo = /*@__PURE__*/ Object.assign({}, Jo, qo), Ro = /*@__PURE__*/ Object.assign({}, Lo, qo), Wo = {\n dateAdd(e, t, n, o, r) {\n return Ao(t.call(e, Yo(v(n, e)), ar(Vt(o)), r));\n }\n}, Go = /*@__PURE__*/ Object.assign({}, Wo, {\n dateUntil(e, t, n, o, r, a) {\n return ir(t.call(e, Yo(v(n, e)), Yo(v(o, e)), Object.assign(Object.create(null), a, {\n largestUnit: Et[r]\n })));\n }\n}), Uo = /*@__PURE__*/ Object.assign({}, Wo, {\n day: dayAdapter\n}), zo = /*@__PURE__*/ Object.assign({}, Go, {\n day: dayAdapter\n}), Ho = /*@__PURE__*/ createCompoundOpsCreator(Jo), Ko = /*@__PURE__*/ createCompoundOpsCreator(Vo), Qo = /*@__PURE__*/ createCompoundOpsCreator(Lo), Xo = /*@__PURE__*/ createCompoundOpsCreator(xo), $o = /*@__PURE__*/ createCompoundOpsCreator(ko), _o = /*@__PURE__*/ createCompoundOpsCreator(Ro), er = /*@__PURE__*/ createCompoundOpsCreator(Wo), tr = /*@__PURE__*/ createCompoundOpsCreator(Go), nr = /*@__PURE__*/ createCompoundOpsCreator(Uo), or = /*@__PURE__*/ createCompoundOpsCreator(zo), [rr, ar, ir] = createSlotClass(qt, Lt, {\n ...uo,\n blank: Jt\n}, {\n with: (e, t) => ar(kt(e, t)),\n negated: e => ar(xt(e)),\n abs: e => ar(Rt(e)),\n add: (e, t, n) => ar(Wt(refinePublicRelativeTo, tr, createTimeZoneOps, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => ar(Wt(refinePublicRelativeTo, tr, createTimeZoneOps, 1, e, toDurationSlots(t), n)),\n round: (e, t) => ar(Gt(refinePublicRelativeTo, tr, createTimeZoneOps, e, t)),\n total: (e, t) => Ut(refinePublicRelativeTo, tr, createTimeZoneOps, e, t),\n toLocaleString(e, t, n) {\n return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : zt(e);\n },\n toString: zt,\n toJSON: e => zt(e),\n valueOf: neverValueOf\n}, {\n from: e => ar(toDurationSlots(e)),\n compare: (e, t, n) => $t(refinePublicRelativeTo, er, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)\n}), sr = {\n toString: e => e.id,\n toJSON: e => e.id,\n ...ro,\n dateAdd: ({id: e, o: t}, n, o, r) => Yo(v(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),\n dateUntil: ({o: e}, t, n, o) => ar(Vt(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), _t(o)))),\n dateFromFields: ({id: e, o: t}, n, o) => Yo(Yt(t, n, o, ln(e))),\n yearMonthFromFields: ({id: e, o: t}, n, o) => jo(nt(t, n, o, un(e))),\n monthDayFromFields: ({id: e, o: t}, n, o) => To(K(t, 0, n, o, cn(e))),\n fields({o: e}, t) {\n const n = new Set(en), o = [];\n for (const e of t) {\n if (m(e), !n.has(e)) {\n throw new RangeError(tn(e));\n }\n n.delete(e), o.push(e);\n }\n return e.fields(o);\n },\n mergeFields: ({o: e}, t, n) => e.mergeFields(nn(on(t)), nn(on(n)))\n}, [lr] = createSlotClass(\"Calendar\", (e => {\n const t = rn(e);\n return {\n branding: \"Calendar\",\n id: t,\n o: Y(t)\n };\n}), {\n id: e => e.id\n}, sr, {\n from(e) {\n const t = refineCalendarSlot(e);\n return \"string\" == typeof t ? new lr(t) : t;\n }\n}), cr = /*@__PURE__*/ createProtocolValidator(Object.keys(sr).slice(4)), [ur, dr] = createSlotClass(Te, E(vn, refineCalendarSlot, refineTimeZoneSlot), {\n ...mo,\n ...lo,\n ...adaptDateMethods(ao),\n ...adaptDateMethods(fo),\n offset: e => Fe(slotsToIso(e).offsetNanoseconds),\n offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,\n timeZoneId: e => I(e.timeZone),\n hoursInDay: e => dn(createTimeZoneOps, e)\n}, {\n getISOFields: e => mn(createTimeZoneOffsetOps, e),\n getCalendar: createCalendarFromSlots,\n getTimeZone: ({timeZone: e}) => \"string\" == typeof e ? new Zo(e) : e,\n with(e, t, n) {\n return dr(Sn($o, createTimeZoneOps, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => dr(it(e, refineCalendarSlot(t))),\n withTimeZone: (e, t) => dr(On(e, refineTimeZoneSlot(t))),\n withPlainDate: (e, t) => dr(Tn(createTimeZoneOps, e, toPlainDateSlots(t))),\n withPlainTime: (e, t) => dr(pn(createTimeZoneOps, e, optionalToPlainTimeFields(t))),\n add: (e, t, n) => dr(hn(er, createTimeZoneOps, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => dr(hn(er, createTimeZoneOps, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Vt(Dn(tr, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),\n since: (e, t, n) => ar(Vt(Dn(tr, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),\n round: (e, t) => dr(Pn(createTimeZoneOps, e, t)),\n startOfDay: e => dr(Cn(createTimeZoneOps, e)),\n equals: (e, t) => gn(e, toZonedDateTimeSlots(t)),\n toInstant: e => Co(Zn(e)),\n toPlainDateTime: e => No(ht(createTimeZoneOffsetOps, e)),\n toPlainDate: e => Yo(Bt(createTimeZoneOffsetOps, e)),\n toPlainTime: e => vo(Re(createTimeZoneOffsetOps, e)),\n toPlainYearMonth(e) {\n return jo(bn(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Fn(Qo, e, this));\n },\n toLocaleString(e, t, n = {}) {\n const [o, r] = Wn(t, n, e);\n return o.format(r);\n },\n toString: (e, t) => In(createTimeZoneOffsetOps, e, t),\n toJSON: e => In(createTimeZoneOffsetOps, e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => dr(toZonedDateTimeSlots(e, t)),\n compare: (e, t) => yn(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))\n}), fr = /*@__PURE__*/ Object.defineProperties({}, {\n ...h(\"Temporal.Now\"),\n ...p({\n timeZoneId: () => Nn(),\n instant: () => Co(_(Bn())),\n zonedDateTime: (e, t = Nn()) => dr(Yn(Bn(), refineTimeZoneSlot(t), refineCalendarSlot(e))),\n zonedDateTimeISO: (e = Nn()) => dr(Yn(Bn(), refineTimeZoneSlot(e), X)),\n plainDateTime: (e, t = Nn()) => No(ee(An(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),\n plainDateTimeISO: (e = Nn()) => No(ee(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), X)),\n plainDate: (e, t = Nn()) => Yo(v(An(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),\n plainDateISO: (e = Nn()) => Yo(v(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), X)),\n plainTimeISO: (e = Nn()) => vo(Ge(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))\n })\n}), mr = /*@__PURE__*/ Object.defineProperties({}, {\n ...h(\"Temporal\"),\n ...p({\n PlainYearMonth: wo,\n PlainMonthDay: Oo,\n PlainDate: Bo,\n PlainTime: Io,\n PlainDateTime: yo,\n ZonedDateTime: ur,\n Instant: Po,\n Calendar: lr,\n TimeZone: Zo,\n Duration: rr,\n Now: fr\n })\n}), Sr = /*@__PURE__*/ createDateTimeFormatClass(), Or = /*@__PURE__*/ new WeakMap, Tr = /*@__PURE__*/ Object.defineProperties(Object.create(Intl), p({\n DateTimeFormat: Sr\n}));\n\nexport { Sr as DateTimeFormat, Tr as IntlExtended, mr as Temporal, toTemporalInstant };\n", "/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\nvar DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n/*\r\n * Create and return a Big constructor.\r\n */\r\nfunction _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n}\r\n\r\n\r\n/*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\nfunction parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\nfunction round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\nfunction stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n}\r\n\r\n\r\n// Prototype/instance methods\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\nP.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\nP.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\nP.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\nP.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\nP.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\nP.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\nP.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\nP.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\nP.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\nP.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\nP.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\nP[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Big as a primitve number.\r\n */\r\nP.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\nP.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n};\r\n\r\n\r\n// Export\r\n\r\n\r\nexport var Big = _Big_();\r\n\r\n/// \r\nexport default Big;\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nexport namespace Utils {\r\n // https://stackoverflow.com/a/40577337/8037425\r\n export function getAllMethodNames(obj: object, excludeContructors: boolean = false): string[] {\r\n let _obj: object | null = obj;\r\n const methods: Set = new Set();\r\n\r\n // eslint-disable-next-line no-cond-assign\r\n while ((_obj = Reflect.getPrototypeOf(_obj)) && Reflect.getPrototypeOf(_obj)) {\r\n const keys: Array = Reflect.ownKeys(_obj) as Array;\r\n keys.filter((key: string) => !excludeContructors || key !== 'constructor')\r\n .forEach((key: string) => methods.add(key));\r\n }\r\n\r\n // Convert Symbols to strings, if there are any\r\n return Array.from(methods, value => value.toString())\r\n .sort();\r\n }\r\n}\r\n\r\nexport namespace TimeZone {\r\n /**\r\n * Returns the amount of time in nanoseconds to add to UTC to get\r\n * standard time in this time zone. Because this value is not\r\n * affected by daylight saving time, it is called raw\r\n * offset.\r\n *\r\n * Since JS doesn't have a native function for this, use the lesser offset of January and July.\r\n *\r\n * @return the amount of raw offset time in nanoseconds to add to UTC.\r\n */\r\n export function getRawOffset(timeZoneId: string): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n const msCount = [\r\n { month: 7, day: 1, year: new Date().getFullYear(), timeZone: timeZoneId },\r\n { month: 1, day: 1, year: new Date().getFullYear(), timeZone: timeZoneId }\r\n ]\r\n .map(monthDay => Temporal.ZonedDateTime.from(monthDay).toInstant())\r\n .map(instant => timeZone.getOffsetNanosecondsFor(instant))\r\n\r\n return Math.min(...msCount);\r\n }\r\n\r\n /**\r\n * Returns a name in the specified style of this TimeZone suitable for presentation to the user in the default locale.\r\n * @param {string} timeZoneId\r\n */\r\n export function getDisplayName(timeZoneId: string): string | null {\r\n let dtf = new Intl.DateTimeFormat('en-US', { timeZone: timeZoneId, timeZoneName: 'long' });\r\n return dtf.formatToParts().find(part => part.type === 'timeZoneName')!.value; // result: 'Eastern Standard Time'\r\n }\r\n\r\n /**\r\n * Returns the amount of time to be added to local standard time to get local wall clock time.\r\n * The default implementation returns 3600000000000 nanoseconds (i.e., one hour) if a call to useDaylightTime() returns true.\r\n * Otherwise, 0 (zero) is returned.\r\n * @param {string} timeZoneId\r\n * @return {number}\r\n */\r\n export function getDSTSavings(timeZoneId: string): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n const msCount = [\r\n { month: 7, day: 1, year: new Date().getFullYear() },\r\n { month: 1, day: 1, year: new Date().getFullYear() }\r\n ]\r\n .map(monthDay => Temporal.PlainDate.from(monthDay))\r\n .map(plainMonthDay => timeZone.getInstantFor!(plainMonthDay))\r\n .map(instant => timeZone.getOffsetNanosecondsFor(instant))\r\n\r\n return Math.abs(msCount[0] - msCount[1]);\r\n }\r\n\r\n /**\r\n * Returns the offset of this time zone from UTC at the specified date. If Daylight Saving Time is in effect at the\r\n * specified date, the offset value is adjusted with the amount of daylight saving.\r\n *\r\n * This method returns a historically correct offset value if an underlying TimeZone implementation subclass\r\n * supports historical Daylight Saving Time schedule and GMT offset changes.\r\n * @param {string} timeZoneId\r\n * @param {number} millisSinceEpoch\r\n */\r\n export function getOffset(timeZoneId: string, millisSinceEpoch: number): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n return timeZone.getOffsetNanosecondsFor(Temporal.Instant.fromEpochMilliseconds(millisSinceEpoch));\r\n }\r\n}\r\n\r\n/**\r\n * java.util.Calendar\r\n */\r\nexport namespace Calendar {\r\n export const JANUARY: number = 0;\r\n export const FEBRUARY: number = 1;\r\n export const MARCH: number = 2;\r\n export const APRIL: number = 3;\r\n export const MAY: number = 4;\r\n export const JUNE: number = 5;\r\n export const JULY: number = 6;\r\n export const AUGUST: number = 7;\r\n export const SEPTEMBER: number = 8;\r\n export const OCTOBER: number = 9;\r\n export const NOVEMBER: number = 10;\r\n export const DECEMBER: number = 11;\r\n\r\n export const SUNDAY: number = 1;\r\n export const MONDAY: number = 2;\r\n export const TUESDAY: number = 3;\r\n export const WEDNESDAY: number = 4;\r\n export const THURSDAY: number = 5;\r\n export const FRIDAY: number = 6;\r\n export const SATURDAY: number = 7;\r\n\r\n export const DATE = 5;\r\n export const MONTH = 2;\r\n export const YEAR = 1;\r\n}\r\n\r\n/**\r\n * java.lang.Math\r\n */\r\nexport namespace MathUtils {\r\n /**\r\n * java.lang.Math.toRadians\r\n * @param degrees\r\n */\r\n export function degreesToRadians(degrees: number): number {\r\n return degrees * Math.PI / 180;\r\n }\r\n\r\n /**\r\n * java.lang.Math.toDegrees\r\n * @param radians\r\n */\r\n export function radiansToDegrees(radians: number): number {\r\n return radians * 180 / Math.PI;\r\n }\r\n}\r\n\r\n/**\r\n * java.lang.String\r\n */\r\nexport namespace StringUtils {\r\n /**\r\n * Compares two strings lexicographically.\r\n * The comparison is based on the Unicode value of each character in\r\n * the strings. The character sequence represented by this\r\n * {@code String} object is compared lexicographically to the\r\n * character sequence represented by the argument string. The result is\r\n * a negative integer if this {@code String} object\r\n * lexicographically precedes the argument string. The result is a\r\n * positive integer if this {@code String} object lexicographically\r\n * follows the argument string. The result is zero if the strings\r\n * are equal; {@code compareTo} returns {@code 0} exactly when\r\n * the {@link #equals(Object)} method would return {@code true}.\r\n *

\r\n * This is the definition of lexicographic ordering. If two strings are\r\n * different, then either they have different characters at some index\r\n * that is a valid index for both strings, or their lengths are different,\r\n * or both. If they have different characters at one or more index\r\n * positions, let k be the smallest such index; then the string\r\n * whose character at position k has the smaller value, as\r\n * determined by using the < operator, lexicographically precedes the\r\n * other string. In this case, {@code compareTo} returns the\r\n * difference of the two character values at position {@code k} in\r\n * the two string -- that is, the value:\r\n *

\r\n   * this.charAt(k)-anotherString.charAt(k)\r\n   * 
\r\n * If there is no index position at which they differ, then the shorter\r\n * string lexicographically precedes the longer string. In this case,\r\n * {@code compareTo} returns the difference of the lengths of the\r\n * strings -- that is, the value:\r\n *
\r\n   * this.length()-anotherString.length()\r\n   * 
\r\n *\r\n * @param string1\r\n * @param string2 the {@code String} to be compared.\r\n * @return the value {@code 0} if the argument string is equal to\r\n * this string; a value less than {@code 0} if this string\r\n * is lexicographically less than the string argument; and a\r\n * value greater than {@code 0} if this string is\r\n * lexicographically greater than the string argument.\r\n */\r\n export function compareTo(string1: string, string2: string): number {\r\n let k: number = 0;\r\n while (k < Math.min(string1.length, string2.length)) {\r\n if (string1.substr(k, 1) !== string2.substr(k, 1)) {\r\n return string1.charCodeAt(k) - string2.charCodeAt(k);\r\n }\r\n k++;\r\n }\r\n return string1.length - string2.length;\r\n }\r\n}\r\n\r\nexport namespace IntegerUtils {\r\n /**\r\n * Compares 2 numbers\r\n * @param x\r\n * @param y\r\n */\r\n export function compare(x: number, y: number): number {\r\n if (x === y) return 0;\r\n return x > y ? 1 : -1;\r\n }\r\n\r\n}\r\n\r\n// export const Long_MIN_VALUE = 0;\r\nexport const Long_MIN_VALUE = NaN;\r\n\r\n/**\r\n * @param {number} num\r\n * @param {number} places - The number of places to pad with zeros\r\n * @returns {string} - The formatted integer\r\n */\r\nexport function padZeros(num: number, places: number): string {\r\n const int = Math.trunc(num);\r\n if (int >= Math.pow(10, places)) return int.toString();\r\n return '0'.repeat(places).concat(int.toString()).slice(-places);\r\n}", "/* eslint-disable max-classes-per-file */\r\nclass BaseCustomError extends Error {\r\n constructor(message?: string) {\r\n super(message);\r\n this.name = this.constructor.name;\r\n }\r\n}\r\n\r\nexport class NullPointerException extends BaseCustomError {\r\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\nexport class IllegalArgumentException extends BaseCustomError {}\r\n\r\nexport class UnsupportedError extends BaseCustomError {}\r\n", "import { MathUtils, TimeZone } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * A class that contains location information such as latitude and longitude required for astronomical calculations. The\r\n * elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for\r\n * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the\r\n * algorithm.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n * @version 1.1\r\n */\r\nexport class GeoLocation {\r\n /**\r\n * @see #getLatitude()\r\n * @see #setLatitude(double)\r\n * @see #setLatitude(int, int, double, String)\r\n */\r\n private latitude!: number;\r\n\r\n /**\r\n * @see #getLongitude()\r\n * @see #setLongitude(double)\r\n * @see #setLongitude(int, int, double, String)\r\n */\r\n private longitude!: number;\r\n\r\n /**\r\n * @see #getLocationName()\r\n * @see #setLocationName(String)\r\n */\r\n private locationName: string | null = null;\r\n\r\n /**\r\n * @see #getTimeZone()\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string;\r\n\r\n /**\r\n * @see #getElevation()\r\n * @see #setElevation(double)\r\n */\r\n private elevation!: number;\r\n\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /** constant for nanoseconds in a minute (60 * 1000 * 1000 * 1000) */\r\n private static readonly MINUTE_NANOS = Temporal.Duration.from({ minutes: 1 }).total('nanoseconds');\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n private static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanoseconds');\r\n\r\n /**\r\n * Method to get the elevation in Meters.\r\n *\r\n * @return Returns the elevation in Meters.\r\n */\r\n public getElevation(): number {\r\n return this.elevation;\r\n }\r\n\r\n /**\r\n * Method to set the elevation in Meters above sea level.\r\n *\r\n * @param elevation\r\n * The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.\r\n */\r\n public setElevation(elevation: number): void {\r\n if (elevation < 0) {\r\n throw new IllegalArgumentException('Elevation cannot be negative');\r\n }\r\n this.elevation = elevation;\r\n }\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param timeZone\r\n * the TimeZone for the location.\r\n */\r\n\r\n /*\r\n public GeoLocation(String name, double latitude, double longitude, TimeZone timeZone) {\r\n this(name, latitude, longitude, 0, timeZone);\r\n }\r\n */\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param elevation\r\n * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating\r\n * sunrise and set.\r\n * @param timeZoneId\r\n * the TimeZone for the location.\r\n */\r\n constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);\r\n constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);\r\n constructor(name: string | null, latitude: number, longitude: number, elevationOrTimeZoneId?: number | string, timeZoneId?: string) {\r\n let elevation: number = 0;\r\n if (timeZoneId) {\r\n elevation = elevationOrTimeZoneId as number;\r\n } else {\r\n timeZoneId = elevationOrTimeZoneId as string;\r\n }\r\n\r\n this.setLocationName(name);\r\n this.setLatitude(latitude);\r\n this.setLongitude(longitude);\r\n this.setElevation(elevation);\r\n this.setTimeZone(timeZoneId);\r\n }\r\n\r\n /**\r\n * Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of\r\n * GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich . No daylight savings time will be used.\r\n */\r\n /*\r\n public GeoLocation() {\r\n setLocationName(\"Greenwich, England\");\r\n setLongitude(0); // added for clarity\r\n setLatitude(51.4772);\r\n setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude.\r\n *\r\n * @param latitude\r\n * The degrees of latitude to set. The values should be between -90° and 90°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example 40.095965 would be\r\n * used for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be\r\n * used.\r\n */\r\n\r\n /*\r\n public setLatitude(latitude: number): void {\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException(\"Latitude must be between -90 and 90\");\r\n }\r\n this.latitude = latitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of latitude to set between 0° and 90°. For example 40 would be used for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limit.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * N for north and S for south. An IllegalArgumentException will be thrown if the value is not S or N.\r\n */\r\n public setLatitude(degrees: number, minutes: number, seconds: number, direction: 'N' | 'S'): void;\r\n public setLatitude(latitude: number): void;\r\n public setLatitude(degreesOrLatitude: number, minutes?: number, seconds?: number, direction?: 'N' | 'S'): void {\r\n if (!minutes) {\r\n const latitude: number = degreesOrLatitude;\r\n\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException('Latitude must be between -90 and 90');\r\n }\r\n\r\n this.latitude = latitude;\r\n } else {\r\n const degrees: number = degreesOrLatitude;\r\n\r\n let tempLat: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (tempLat > 90 || tempLat < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Latitude must be between 0 and 90. Use direction of S instead of negative.');\r\n }\r\n if (direction === 'S') {\r\n tempLat *= -1;\r\n } else if (!(direction === 'N')) {\r\n throw new IllegalArgumentException('Latitude direction must be N or S');\r\n }\r\n this.latitude = tempLat;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the latitude.\r\n */\r\n public getLatitude(): number {\r\n return this.latitude;\r\n }\r\n\r\n /**\r\n * Method to set the longitude in a double format.\r\n *\r\n * @param longitude\r\n * The degrees of longitude to set in a double format between -180° and 180°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example -74.2094 would be\r\n * used for Lakewood, NJ. Note: for longitudes east of the Prime Meridian (Greenwich) a negative value\r\n * should be used.\r\n */\r\n\r\n /*\r\n public setLongitude(longitude: number): void {\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException(\"Longitude must be between -180 and 180\");\r\n }\r\n this.longitude = longitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the longitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of longitude to set between 0° and 180°. As an example 74 would be set for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limits.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * E for east of the Prime Meridian or W for west of it.\r\n * An IllegalArgumentException will be thrown if\r\n * the value is not E or W.\r\n */\r\n public setLongitude(degrees: number, minutes: number, seconds: number, direction: 'E' | 'W'): void;\r\n public setLongitude(longitude: number): void;\r\n public setLongitude(degreesOrLongitude: number, minutes?: number, seconds?: number, direction?: 'E' | 'W'): void {\r\n if (!minutes) {\r\n const longitude: number = degreesOrLongitude;\r\n\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException('Longitude must be between -180 and 180');\r\n }\r\n\r\n this.longitude = longitude;\r\n } else {\r\n const degrees: number = degreesOrLongitude;\r\n\r\n let longTemp: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (longTemp > 180 || this.longitude < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Longitude must be between 0 and 180. Use a direction of W instead of negative.');\r\n }\r\n if (direction === 'W') {\r\n longTemp *= -1;\r\n } else if (!(direction === 'E')) {\r\n throw new IllegalArgumentException('Longitude direction must be E or W');\r\n }\r\n this.longitude = longTemp;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the longitude.\r\n */\r\n public getLongitude(): number {\r\n return this.longitude;\r\n }\r\n\r\n /**\r\n * @return Returns the location name.\r\n */\r\n public getLocationName(): string | null {\r\n return this.locationName;\r\n }\r\n\r\n /**\r\n * @param name\r\n * The setter method for the display name.\r\n */\r\n public setLocationName(name: string | null): void {\r\n this.locationName = name;\r\n }\r\n\r\n /**\r\n * @return Returns the timeZone.\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the\r\n * {@link AstronomicalCalendar}, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset. This situation will arise if the\r\n * AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.\r\n *\r\n * @param timeZone\r\n * The timeZone to set.\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * A method that will return the location's local mean time offset in nanoseconds from local standard time. The globe is split into 360°, with\r\n * 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 ==\r\n * 0), at solar {@link AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead,\r\n * so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user\r\n * who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is\r\n * -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes\r\n * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is\r\n * unaware of dates.\r\n *\r\n * @return the offset in nanoseconds not accounting for Daylight saving time. A positive value will be returned\r\n * East of the 15° timezone line, and a negative value West of it.\r\n * @since 1.1\r\n */\r\n public getLocalMeanTimeOffset(): number {\r\n return this.getLongitude() * 4 * GeoLocation.MINUTE_NANOS - TimeZone.getRawOffset(this.getTimeZone());\r\n }\r\n\r\n /**\r\n * Adjust the date for antimeridian crossover. This is\r\n * needed to deal with edge cases such as Samoa that use a different calendar date than expected based on their\r\n * geographic location.\r\n *\r\n * The actual Time Zone offset may deviate from the expected offset based on the longitude. Since the 'absolute time'\r\n * calculations are always based on longitudinal offset from UTC for a given date, the date is presumed to only\r\n * increase East of the Prime Meridian, and to only decrease West of it. For Time Zones that cross the antimeridian,\r\n * the date will be artificially adjusted before calculation to conform with this presumption.\r\n *\r\n * For example, Apia, Samoa with a longitude of -171.75 uses a local offset of +14:00. When calculating sunrise for\r\n * 2018-02-03, the calculator should operate using 2018-02-02 since the expected zone is -11. After determining the\r\n * UTC time, the local DST offset of UTC+14:00 should be applied\r\n * to bring the date back to 2018-02-03.\r\n *\r\n * @return the number of days to adjust the date This will typically be 0 unless the date crosses the antimeridian\r\n */\r\n public getAntimeridianAdjustment(): -1 | 1 | 0 {\r\n const localHoursOffset: number = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_NANOS;\r\n\r\n // if the offset is 20 hours or more in the future (never expected anywhere other\r\n // than a location using a timezone across the anti meridian to the east such as Samoa)\r\n if (localHoursOffset >= 20) {\r\n // roll the date forward a day\r\n return 1;\r\n } else if (localHoursOffset <= -20) {\r\n // if the offset is 20 hours or more in the past (no current location is known\r\n // that crosses the antimeridian to the west, but better safe than sorry)\r\n // roll the date back a day\r\n return -1;\r\n }\r\n // 99.999% of the world will have no adjustment\r\n return 0;\r\n }\r\n\r\n /**\r\n * Calculate the initial geodesic bearing between this\r\n * Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the initial bearing\r\n */\r\n public getGeodesicInitialBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the final geodesic bearing between this Object\r\n * and a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol\r\n * XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the final bearing\r\n */\r\n public getGeodesicFinalBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @see #vincentyFormula(GeoLocation, int)\r\n * @param location\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public getGeodesicDistance(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}), final bearing (\r\n * {@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return geodesic distance in Meters\r\n */\r\n private vincentyFormula(location: GeoLocation, formula: number): number {\r\n const a: number = 6378137;\r\n const b: number = 6356752.3142;\r\n const f: number = 1 / 298.257223563; // WGS-84 ellipsiod\r\n const L: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(this.getLatitude())));\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude())));\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = (cosU1 * cosU2 * sinLambda) / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha\r\n * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma\r\n * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocation.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocation.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocation.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line bearing from the current location to\r\n * the GeoLocation passed in.\r\n *\r\n * @param location\r\n * destination location\r\n * @return the bearing in degrees\r\n */\r\n public getRhumbLineBearing(location: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current location\r\n * to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public getRhumbLineDistance(location: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude()) - MathUtils.degreesToRadians(this.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude()) - MathUtils.degreesToRadians(this.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(this.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String representing the serialized Object. Very\r\n * similar to the toString method but the return value is in an xml format. The format currently used (subject to\r\n * change) is:\r\n *\r\n *
\r\n   *   <GeoLocation>\r\n   *        <LocationName>Lakewood, NJ</LocationName>\r\n   *        <Latitude>40.0828&deg</Latitude>\r\n   *        <Longitude>-74.2094&deg</Longitude>\r\n   *        <Elevation>0 Meters</Elevation>\r\n   *        <TimezoneName>America/New_York</TimezoneName>\r\n   *        <TimeZoneDisplayName>Eastern Standard Time</TimeZoneDisplayName>\r\n   *        <TimezoneGMTOffset>-5</TimezoneGMTOffset>\r\n   *        <TimezoneDSTOffset>1</TimezoneDSTOffset>\r\n   *   </GeoLocation>\r\n   * 
\r\n *\r\n * @return The XML formatted String.\r\n * @deprecated\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toXML(): void {\r\n throw new UnsupportedError('This method is deprecated');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) return true;\r\n if (!(object instanceof GeoLocation)) return false;\r\n\r\n const geo: GeoLocation = object as GeoLocation;\r\n return this.latitude === geo.latitude\r\n && this.longitude === geo.longitude\r\n && this.elevation === geo.elevation\r\n && this.locationName === geo.locationName\r\n && this.timeZoneId === geo.getTimeZone();\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#toString()\r\n */\r\n public toString(): string {\r\n return (`Location Name:\\t\\t\\t${this.getLocationName()}`)\r\n .concat(`\\nLatitude:\\t\\t\\t${this.getLatitude().toString()}\\u00B0`)\r\n .concat(`\\nLongitude:\\t\\t\\t${this.getLongitude().toString()}\\u00B0`)\r\n .concat(`\\nElevation:\\t\\t\\t${this.getElevation().toString()} Meters`)\r\n .concat(`\\nTimezone ID:\\t\\t\\t${this.getTimeZone()}`)\r\n .concat(`\\nTimezone Display Name:\\t\\t${TimeZone.getDisplayName(this.getTimeZone())}`)\r\n .concat(`\\nTimezone GMT Offset:\\t\\t${(TimeZone.getRawOffset(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`)\r\n .concat(`\\nTimezone DST Offset:\\t\\t${(TimeZone.getDSTSavings(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`);\r\n }\r\n\r\n /**\r\n * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the clone will be changed from the original, it is critical\r\n * that {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} is called after cloning in order for the\r\n * AstronomicalCalendar to output times in the expected offset.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): GeoLocation {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\nimport type { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at\r\n * runtime, easily allowing comparison the results of using different algorithms.\r\n * TODO: Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link\r\n * #setRefraction(double) setting the refraction}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2020\r\n */\r\nexport abstract class AstronomicalCalculator {\r\n /**\r\n * The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of\r\n * 34.478885263888294\r\n *\r\n * @see #getRefraction()\r\n */\r\n private refraction: number = 34 / 60;\r\n // private double refraction = 34.478885263888294 / 60d;\r\n\r\n /**\r\n * The commonly used average solar radius in minutes of a degree.\r\n *\r\n * @see #getSolarRadius()\r\n */\r\n private solarRadius: number = 16 / 60;\r\n\r\n /**\r\n * The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the\r\n * sunrise and sunset calculations. The value currently defaults to 6356.9 KM.\r\n *\r\n * @see #getEarthRadius()\r\n * @see #setEarthRadius(double)\r\n */\r\n private earthRadius: number = 6356.9; // in KM\r\n\r\n /**\r\n * A method that returns the earth radius in KM. The value currently defaults to 6356.9 KM if not set.\r\n *\r\n * @return the earthRadius the earth radius in KM.\r\n */\r\n public getEarthRadius(): number {\r\n return this.earthRadius;\r\n }\r\n\r\n /**\r\n * A method that allows setting the earth's radius.\r\n *\r\n * @param earthRadius\r\n * the earthRadius to set in KM\r\n */\r\n public setEarthRadius(earthRadius: number): void {\r\n this.earthRadius = earthRadius;\r\n }\r\n\r\n /**\r\n * The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°\r\n */\r\n private static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /**\r\n * Returns the default class for calculating sunrise and sunset. This is currently the {@link NOAACalculator},\r\n * but this may change.\r\n *\r\n * @return AstronomicalCalculator the default class for calculating sunrise and sunset. In the current\r\n * implementation the default calculator returned is the {@link NOAACalculator}.\r\n * @deprecated This depends on a circular dependency. Use
new NOAACalculator()
instead\r\n */\r\n public static getDefault(): void {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new NOAACalculator()` instead.');\r\n }\r\n\r\n /**\r\n * Returns the name of the algorithm.\r\n *\r\n * @return the descriptive name of the algorithm.\r\n */\r\n public abstract getCalculatorName(): string;\r\n\r\n /**\r\n * Setter method for the descriptive name of the calculator. This will typically not have to be set\r\n *\r\n * @param calculatorName\r\n * descriptive name of the algorithm.\r\n */\r\n\r\n /**\r\n * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90 degrees. for sunrise typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number,\r\n adjustForElevation: boolean): number; // eslint-disable-line @typescript-eslint/indent\r\n\r\n /**\r\n * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;\r\n\r\n /**\r\n\t * Return solar noon (UTC) for the given day at the\r\n\t * given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates\r\n\t * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating\r\n\t * the time as halfway between sunrise and sunset.\r\n\t * \r\n\t * @param calendar\r\n\t * Used to calculate day of year.\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times. \r\n\t * \r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public abstract getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;\r\n\r\n /**\r\n * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher\r\n * elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon\r\n * used at sea level. This is only used for sunrise and sunset and not times before or after it such as\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight() nautical twilight} since those\r\n * calculations are based on the level of available light at the given dip below the horizon, something that is not\r\n * affected by elevation, the adjustment should only made if the zenith == 90° {@link #adjustZenith adjusted}\r\n * for refraction and solar radius. The algorithm used is\r\n *\r\n *
\r\n   * elevationAdjustment = Math.toDegrees(Math.acos(earthRadiusInMeters / (earthRadiusInMeters + elevationMeters)));\r\n   * 
\r\n *\r\n * The source of this algorithm is Calendrical Calculations by Edward M.\r\n * Reingold and Nachum Dershowitz. An alternate algorithm that produces an almost identical (but not accurate)\r\n * result found in Ma'aglay Tzedek by Moishe Kosower and other sources is:\r\n *\r\n *
\r\n   * elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);\r\n   * 
\r\n *\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return the adjusted zenith\r\n */\r\n public getElevationAdjustment(elevation: number): number {\r\n // double elevationAdjustment = 0.0347 * Math.sqrt(elevation);\r\n const elevationAdjustment: number = MathUtils.radiansToDegrees(Math.acos(this.earthRadius / (this.earthRadius + (elevation / 1000))));\r\n return elevationAdjustment;\r\n }\r\n\r\n /**\r\n * Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and\r\n * elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle\r\n * that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the\r\n * Earth were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun\r\n * is not a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to\r\n * true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge\r\n * to be obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16\r\n * minutes of arc (this can be changed via the {@link #setSolarRadius(double)} method , and atmospheric refraction\r\n * accounts for 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total\r\n * of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset. Since a\r\n * person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to\r\n * account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.\r\n * For values below and above this no correction is done. As an example, astronomical twilight is when the sun is\r\n * 18° below the horizon or {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH 108°\r\n * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes\r\n * for various tzais and alos times such as the\r\n * {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in\r\n * {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.\r\n *\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction\r\n * refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for\r\n * sunrise and sunset (if the zenith == 90°)\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public adjustZenith(zenith: number, elevation: number) {\r\n let adjustedZenith: number = zenith;\r\n if (zenith === AstronomicalCalculator.GEOMETRIC_ZENITH) { // only adjust if it is exactly sunrise or sunset\r\n adjustedZenith = zenith + (this.getSolarRadius() + this.getRefraction() + this.getElevationAdjustment(elevation));\r\n }\r\n return adjustedZenith;\r\n }\r\n\r\n /**\r\n * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 arc\r\n * minutes. The Errata and\r\n * Notes for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists\r\n * the actual average refraction value as 34.478885263888294 or approximately 34' 29\". The refraction value as well\r\n * as the solarRadius and elevation adjustment are added to the zenith used to calculate sunrise and sunset.\r\n *\r\n * @return The refraction in arc minutes.\r\n */\r\n public getRefraction(): number {\r\n return this.refraction;\r\n }\r\n\r\n /**\r\n * A method to allow overriding the default refraction of the calculator.\r\n * @todo At some point in the future, an AtmosphericModel or Refraction object that models the atmosphere of different\r\n * locations might be used for increased accuracy.\r\n *\r\n * @param refraction\r\n * The refraction in arc minutes.\r\n * @see #getRefraction()\r\n */\r\n public setRefraction(refraction: number): void {\r\n this.refraction = refraction;\r\n }\r\n\r\n /**\r\n * Method to get the sun's radius. The default value is 16 arc minutes. The sun's radius as it appears from earth is\r\n * almost universally given as 16 arc minutes but in fact it differs by the time of the year. At the perihelion it has an apparent radius of 16.293, while at the\r\n * aphelion it has an apparent radius of 15.755. There is little\r\n * affect for most location, but at high and low latitudes the difference becomes more apparent. My Calculations for\r\n * the difference at the location of the Royal Observatory, Greenwich show\r\n * only a 4.494 second difference between the perihelion and aphelion radii, but moving into the arctic circle the\r\n * difference becomes more noticeable. Tests for Tromso, Norway (latitude 69.672312, longitude 19.049787) show that\r\n * on May 17, the rise of the midnight sun, a 2 minute 23 second difference is observed between the perihelion and\r\n * aphelion radii using the USNO algorithm, but only 1 minute and 6 seconds difference using the NOAA algorithm.\r\n * Areas farther north show an even greater difference. Note that these test are not real valid test cases because\r\n * they show the extreme difference on days that are not the perihelion or aphelion, but are shown for illustrative\r\n * purposes only.\r\n *\r\n * @return The sun's radius in arc minutes.\r\n */\r\n public getSolarRadius(): number {\r\n return this.solarRadius;\r\n }\r\n\r\n /**\r\n * Method to set the sun's radius.\r\n *\r\n * @param solarRadius\r\n * The sun's radius in arc minutes.\r\n * @see #getSolarRadius()\r\n */\r\n public setSolarRadius(solarRadius: number): void {\r\n this.solarRadius = solarRadius;\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalculator {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n\r\n public equals(object: object) {\r\n return this === object;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nenum SolarEvent {\r\n /**SUNRISE A solar event related to sunrise*/SUNRISE, /**SUNSET A solar event related to sunset*/SUNSET\r\n // possibly add the following in the future, if added, an IllegalArgumentException should be thrown in getSunHourAngle\r\n // /**NOON A solar event related to noon*/NOON, /**MIDNIGHT A solar event related to midnight*/MIDNIGHT\r\n}\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith\r\n * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class NOAACalculator extends AstronomicalCalculator {\r\n /**\r\n * The Julian day of January 1, 2000\r\n */\r\n private static readonly JULIAN_DAY_JAN_1_2000: number = 2451545;\r\n\r\n /**\r\n * Julian days per century\r\n */\r\n private static readonly JULIAN_DAYS_PER_CENTURY: number = 36525;\r\n\r\n\t/**\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getCalculatorName()\r\n\t */\r\n\tpublic getCalculatorName(): string {\r\n\t\treturn \"US National Oceanic and Atmospheric Administration Algorithm\"; // Implementation of the Jean Meeus algorithm\r\n\t}\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunrise: number = NOAACalculator.getSunRiseSetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith, SolarEvent.SUNRISE);\r\n sunrise = sunrise / 60;\r\n\r\n return sunrise > 0 ? sunrise % 24 : sunrise % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunset: number = NOAACalculator.getSunRiseSetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith, SolarEvent.SUNSET);\r\n sunset = sunset / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n return sunset > 0 ? sunset % 24 : sunset % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Calendar\r\n *\r\n * @param calendar\r\n * The Java Calendar\r\n * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days\r\n * should be added later.\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = Math.trunc(2 - a + a / 4);\r\n\r\n return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5;\r\n }\r\n\r\n /**\r\n * Convert Julian day to centuries since J2000.0.\r\n *\r\n * @param julianDay\r\n * the Julian Day to convert\r\n * @return the centuries since 2000 Julian corresponding to the Julian Day\r\n */\r\n private static getJulianCenturiesFromJulianDay(julianDay: number): number {\r\n return (julianDay - NOAACalculator.JULIAN_DAY_JAN_1_2000) / NOAACalculator.JULIAN_DAYS_PER_CENTURY;\r\n }\r\n\r\n /**\r\n * Convert centuries since J2000.0 to Julian day.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Julian Day corresponding to the Julian centuries passed in\r\n */\r\n private static getJulianDayFromJulianCenturies(julianCenturies: number): number {\r\n return julianCenturies * NOAACalculator.JULIAN_DAYS_PER_CENTURY + NOAACalculator.JULIAN_DAY_JAN_1_2000;\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Longitude of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Longitude of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanLongitude(julianCenturies: number): number {\r\n let longitude: number = 280.46646 + julianCenturies * (36000.76983 + 0.0003032 * julianCenturies);\r\n return longitude > 0 ? longitude % 360 : longitude % 360 + 360; // ensure that the longitude is >= 0 and < 360\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Anomaly of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Anomaly of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanAnomaly(julianCenturies: number): number {\r\n return 357.52911 + julianCenturies * (35999.05029 - 0.0001537 * julianCenturies); // in degrees\r\n }\r\n\r\n /**\r\n * Return the eccentricity of earth's orbit.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the unitless eccentricity\r\n */\r\n private static getEarthOrbitEccentricity(julianCenturies: number): number {\r\n return 0.016708634 - julianCenturies * (0.000042037 + 0.0000001267 * julianCenturies); // unitless\r\n }\r\n\r\n /**\r\n * Returns the equation of center for the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the equation of center for the sun in degrees\r\n */\r\n private static getSunEquationOfCenter(julianCenturies: number): number {\r\n const m: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n const mrad: number = MathUtils.degreesToRadians(m);\r\n const sinm: number = Math.sin(mrad);\r\n const sin2m: number = Math.sin(mrad + mrad);\r\n const sin3m: number = Math.sin(mrad + mrad + mrad);\r\n\r\n return sinm * (1.914602 - julianCenturies * (0.004817 + 0.000014 * julianCenturies)) + sin2m\r\n * (0.019993 - 0.000101 * julianCenturies) + sin3m * 0.000289; // in degrees\r\n }\r\n\r\n /**\r\n * Return the true longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the sun's true longitude in degrees\r\n */\r\n private static getSunTrueLongitude(julianCenturies: number): number {\r\n const sunLongitude: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const center: number = NOAACalculator.getSunEquationOfCenter(julianCenturies);\r\n\r\n return sunLongitude + center; // in degrees\r\n }\r\n\r\n // /**\r\n // * Returns the true anamoly of the sun.\r\n // *\r\n // * @param julianCenturies\r\n // * the number of Julian centuries since J2000.0\r\n // * @return the sun's true anamoly in degrees\r\n // */\r\n // private static double getSunTrueAnomaly(double julianCenturies) {\r\n // double meanAnomaly = getSunGeometricMeanAnomaly(julianCenturies);\r\n // double equationOfCenter = getSunEquationOfCenter(julianCenturies);\r\n //\r\n // return meanAnomaly + equationOfCenter; // in degrees\r\n // }\r\n\r\n /**\r\n * Return the apparent longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return sun's apparent longitude in degrees\r\n */\r\n private static getSunApparentLongitude(julianCenturies: number): number {\r\n const sunTrueLongitude: number = NOAACalculator.getSunTrueLongitude(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n const lambda: number = sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(MathUtils.degreesToRadians(omega));\r\n return lambda; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the mean obliquity of the ecliptic (Axial tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the mean obliquity in degrees\r\n */\r\n private static getMeanObliquityOfEcliptic(julianCenturies: number): number {\r\n const seconds: number = 21.448 - julianCenturies\r\n * (46.8150 + julianCenturies * (0.00059 - julianCenturies * (0.001813)));\r\n return 23 + (26 + (seconds / 60)) / 60; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the corrected obliquity of the ecliptic (Axial\r\n * tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the corrected obliquity in degrees\r\n */\r\n private static getObliquityCorrection(julianCenturies: number): number {\r\n const obliquityOfEcliptic: number = NOAACalculator.getMeanObliquityOfEcliptic(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n return obliquityOfEcliptic + 0.00256 * Math.cos(MathUtils.degreesToRadians(omega)); // in degrees\r\n }\r\n\r\n /**\r\n * Return the declination of the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return\r\n * the sun's declination in degrees\r\n */\r\n private static getSunDeclination(julianCenturies: number): number {\r\n const obliquityCorrection: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const lambda: number = NOAACalculator.getSunApparentLongitude(julianCenturies);\r\n\r\n const sint: number = Math.sin(MathUtils.degreesToRadians(obliquityCorrection)) * Math.sin(MathUtils.degreesToRadians(lambda));\r\n const theta: number = MathUtils.radiansToDegrees(Math.asin(sint));\r\n return theta; // in degrees\r\n }\r\n\r\n /**\r\n * Return the Equation of Time - the difference between\r\n * true solar time and mean solar time\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return equation of time in minutes of time\r\n */\r\n private static getEquationOfTime(julianCenturies: number): number {\r\n const epsilon: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const geomMeanLongSun: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const eccentricityEarthOrbit: number = NOAACalculator.getEarthOrbitEccentricity(julianCenturies);\r\n const geomMeanAnomalySun: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n let y: number = Math.tan(MathUtils.degreesToRadians(epsilon) / 2);\r\n y *= y;\r\n\r\n const sin2l0: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sinm: number = Math.sin(MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n const cos2l0: number = Math.cos(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin4l0: number = Math.sin(4 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin2m: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n\r\n const equationOfTime: number = y * sin2l0 - 2 * eccentricityEarthOrbit * sinm + 4 * eccentricityEarthOrbit * y\r\n * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * eccentricityEarthOrbit * eccentricityEarthOrbit * sin2m;\r\n return MathUtils.radiansToDegrees(equationOfTime) * 4; // in minutes of time\r\n }\r\n\r\n /**\r\n * Return the hour angle of the sun at sunrise for the\r\n * latitude.\r\n *\r\n * @param lat\r\n * , the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @param solarEvent\r\n\t * If the hour angle is for sunrise or sunset\r\n * @return hour angle of sunrise in radians\r\n */\r\n private static getSunHourAngle(lat: number, solarDec: number, zenith: number, solarEvent: SolarEvent): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n let hourAngle: number = (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad)));\r\n if (solarEvent == SolarEvent.SUNSET) {\r\n hourAngle = -hourAngle;\r\n }\r\n return hourAngle;\r\n }\r\n\r\n /**\r\n * Return the Solar Elevation for the\r\n * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the\r\n * horizon. Not corrected for altitude.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param lat\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees\r\n */\r\n\r\n /*public static getSolarElevation(date: Temporal.PlainDate, lat: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n return MathUtils.radiansToDegrees(Math.asin((Math.sin(latRad) * Math.sin(decRad))\r\n + (Math.cos(latRad) * Math.cos(decRad) * Math.cos(hourAngleRad))));\r\n } */\r\n\r\n /**\r\n * Return the Solar Azimuth for the\r\n * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0\r\n * degrees.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param latitude\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return FIXME\r\n */\r\n\r\n /* public static getSolarAzimuth(date: Temporal.PlainDate, latitude: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(latitude);\r\n\r\n return MathUtils.radiansToDegrees(Math.atan(Math.sin(hourAngleRad)\r\n / ((Math.cos(hourAngleRad) * Math.sin(latRad)) - (Math.tan(decRad) * Math.cos(latRad))))) + 180;\r\n } */\r\n\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const julianDay = NOAACalculator.getJulianDay(calendar);\r\n const julianCenturies = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\t\t\r\n let noon = NOAACalculator.getSolarNoonUTC(julianCenturies, -geoLocation.getLongitude());\r\n noon = noon / 60;\r\n\r\n return noon > 0 ? noon % 24 : noon % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of solar noon for the given day at the given location\r\n * on earth.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSolarNoonUTC(julianCenturies: number, longitude: number): number {\r\n // First pass uses approximate solar noon to calculate eqtime\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + longitude / 360);\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n const solNoonUTC: number = 720 + (longitude * 4) - eqTime; // min\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) - 0.5 + solNoonUTC / 1440);\r\n\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n return 720 + (longitude * 4) - eqTime; // min\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunset for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * : longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero Universal Coordinated Time (UTC)\r\n */\r\n private static getSunRiseSetUTC(julianDay: number, latitude: number, longitude: number, zenith: number, solarEvent:SolarEvent): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First calculates sunrise and approx length of day\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngle(latitude, solarDec, zenith, solarEvent);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta;\r\n let timeUTC: number = 720 + timeDiff - eqTime;\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngle(latitude, solarDec, zenith, solarEvent);\r\n\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n}\r\n", "import { Big } from 'big.js';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './util/AstronomicalCalculator.ts';\r\nimport { NOAACalculator } from './util/NOAACalculator.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from './polyfills/errors.ts';\r\nimport { TimeZone } from './polyfills/Utils.ts';\r\n\r\nenum SolarEvent {\r\n SUNRISE, SUNSET, NOON, MIDNIGHT\r\n}\r\n\r\n/**\r\n * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise} and {@link #getSunset()\r\n * sunset} times. This class contains a {@link #getCalendar() Calendar} and can therefore use the standard Calendar\r\n * functionality to change dates etc... The calculation engine used to calculate the astronomical times can be changed\r\n * to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with the\r\n * {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations\r\n * are included in the util package.\r\n * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This\r\n * is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never\r\n * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far\r\n * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the\r\n * year. When the calculations encounter this condition a null will be returned when a\r\n * {@link java.util.Date} is expected and {@link Long#MIN_VALUE} when a long is expected. The\r\n * reason that Exceptions are not thrown in these cases is because the lack of a rise/set or twilight is\r\n * not an exception, but an expected condition in many parts of the world.\r\n *\r\n * Here is a simple example of how to use the API to calculate sunrise.\r\n * First create the Calendar for the location you would like to calculate sunrise or sunset times for:\r\n *\r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * AstronomicalCalendar ac = new AstronomicalCalendar(location);\r\n * 
\r\n *\r\n * To get the time of sunrise, first set the date you want (if not set, the date will default to today):\r\n *\r\n *
\r\n * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n * Date sunrise = ac.getSunrise();\r\n * 
\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n */\r\nexport class AstronomicalCalendar {\r\n /**\r\n * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below\r\n * the horizon at sunrise and sunset.\r\n * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith\r\n * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not\r\n * be used for calculations above or below 90° since they are usually calculated as an offset to 90°.\r\n */\r\n public static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /** Sun's zenith at civil twilight (96°). */\r\n public static readonly CIVIL_ZENITH: number = 96;\r\n\r\n /** Sun's zenith at nautical twilight (102°). */\r\n public static readonly NAUTICAL_ZENITH: number = 102;\r\n\r\n /** Sun's zenith at astronomical twilight (108°). */\r\n public static readonly ASTRONOMICAL_ZENITH: number = 108;\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n public static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanosecond');\r\n\r\n /**\r\n * The Java Calendar encapsulated by this class to track the current date used by the class\r\n */\r\n private date!: Temporal.PlainDate;\r\n\r\n /**\r\n * the {@link GeoLocation} used for calculations.\r\n */\r\n private geoLocation!: GeoLocation;\r\n\r\n /**\r\n * the internal {@link AstronomicalCalculator} used for calculating solar based times.\r\n */\r\n private astronomicalCalculator!: AstronomicalCalculator;\r\n\r\n /**\r\n * The getSunrise method Returns a Date representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used\r\n * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.\r\n *\r\n * @return the Date representing the exact sunrise time. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunrise()\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n */\r\n public getSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the\r\n * base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @return the Date representing the exact sea-level sunrise time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSeaLevelSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSeaLevelSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of civil twilight\r\n\t * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n\t * \r\n\t * @return The Date of the beginning of civil twilight using a zenith of 96°. If the calculation\r\n\t * can't be computed, null will be returned. See detailed explanation on top of the page.\r\n\t * @see #CIVIL_ZENITH\r\n\t */\r\n public getBeginCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of nautical twilight using a zenith of {@link\r\n * #NAUTICAL_ZENITH 102°}.\r\n * \r\n * @return The Date of the beginning of nautical twilight using a zenith of 102°. If the\r\n * calculation can't be computed null will be returned. See detailed explanation on top of the page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getBeginNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of astronomical twilight using a zenith of\r\n\t * {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return The Date of the beginning of astronomical twilight using a zenith of 108°. If the\r\n * calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * The getSunset method Returns a Date representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for\r\n * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:\r\n * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone\r\n * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this\r\n * case the sunset date will be incremented to the following date.\r\n *\r\n * @return the Date representing the exact sunset time. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunset()\r\n * @see AstronomicalCalendar#getUTCSunset\r\n */\r\n public getSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the\r\n * base for dusk calculations that are calculated as a dip below the horizon after sunset.\r\n *\r\n * @return the Date representing the exact sea-level sunset time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset 2see {@link #getSunset()}\r\n */\r\n public getSeaLevelSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSeaLevelSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * A method that returns the end of civil twilight\r\n\t * using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n *\r\n * @return The Date of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If\r\n * the calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #CIVIL_ZENITH\r\n */\r\n public getEndCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.\r\n *\r\n * @return The Date of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}\r\n * . If the calculation can't be computed, null will be returned. See detailed explanation on top of the\r\n * page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getEndNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return the Date of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH\r\n * 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top\r\n * of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getEndAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of\r\n * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use\r\n * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a\r\n * parameter.\r\n * @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunriseOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const dawn: number = this.getUTCSunrise(offsetZenith);\r\n if (Number.isNaN(dawn)) return null;\r\n return this.getDateFromTime(dawn, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()\r\n * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an\r\n * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative\r\n * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after\r\n * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n * @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(offsetZenith);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n */\r\n\r\n /*\r\n constructor() {\r\n this(new GeoLocation());\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes in geolocation information as a\r\n * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar\r\n * calculations is the the {@link NOAACalculator}.\r\n *\r\n * @param geoLocation\r\n * The location information used for calculating astronomical sun times.\r\n *\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.\r\n */\r\n constructor(geoLocation: GeoLocation) {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n this.setGeoLocation(geoLocation); // duplicate call\r\n this.setAstronomicalCalculator(new NOAACalculator());\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n */\r\n public getUTCSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible\r\n * light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This\r\n * forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSeaLevelSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and\r\n * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the\r\n * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated\r\n * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after\r\n * sunset.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time before sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n */\r\n public getUTCSeaLevelSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns an {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted}\r\n * temporal (solar) hour. The day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} is split into 12\r\n * equal parts with each one being a temporal hour.\r\n *\r\n * @see #getSunrise()\r\n * @see #getSunset()\r\n * @see #getTemporalHour(Date, Date)\r\n *\r\n * @return the long millisecond length of a temporal hour. If the calculation can't be computed,\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour(Date, Date)\r\n */\r\n\r\n /*\r\n public getTemporalHour(): number {\r\n return this.getTemporalHour(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset\r\n * passed as parameters to this method. An example of the use of this method would be the calculation of a\r\n * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and\r\n * {@link #getSeaLevelSunset() sea level sunset} as parameters.\r\n *\r\n * @param startOfday\r\n * The start of the day.\r\n * @param endOfDay\r\n * The end of the day.\r\n *\r\n * @return the long millisecond length of the temporal hour. If the calculation can't be computed a\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour()\r\n */\r\n public getTemporalHour(startOfday: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()) {\r\n if (startOfday === null || endOfDay === null) {\r\n return;\r\n }\r\n const intValue = startOfday.until(endOfDay).total({ unit: 'nanoseconds' }) / 12;\r\n return Temporal.Duration.from({ nanoseconds: Math.trunc(intValue) })\r\n }\r\n\r\n /**\r\n * A method that returns \"solar\" midnight, or the time when the sun is at its nadir.\r\n * Note: this method is experimental and might be removed.\r\n * \r\n * @return the Date of Solar Midnight (chatzos layla). If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSolarMidnight(): Temporal.ZonedDateTime | null {\r\n const clonedCal = this.clone();\r\n clonedCal.setDate(this.getDate().add({ days: 1 }));\r\n return this.getSunTransit()!\r\n .add({nanoseconds: Math.trunc(this.getSunTransit()?.until(clonedCal.getSunTransit()!).total({ unit: \"nanoseconds\" })! / 2)});\r\n }\r\n\r\n /**\r\n * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is\r\n * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the\r\n * real transit time due to changes in declination (the lengthening or shortening day).\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or\r\n * any arbitrary start of day) passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any\r\n * arbitrary end of day) passed to this method.\r\n *\r\n * @return the Date representing Sun's transit. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, null will be returned. See detailed explanation on top of the page.\r\n */\r\n public getSunTransit(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n if (startOfDay) {\r\n if (!endOfDay)\r\n throw new IllegalArgumentException('No argument for the end of day provided');\r\n\r\n const temporalHour = this.getTemporalHour(startOfDay, endOfDay)!;\r\n let offsetTime = startOfDay;\r\n for (let index = 0; index < 6; index++) {\r\n offsetTime = offsetTime.add(temporalHour);\r\n }\r\n\r\n return offsetTime;\r\n }\r\n\r\n const noon = this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(), this.getGeoLocation());\r\n return this.getDateFromTime(noon, SolarEvent.NOON);\r\n }\r\n\r\n public getSunLowerTransit(): Temporal.ZonedDateTime {\r\n\t\tlet cal: Temporal.PlainDate = this.getAdjustedDate();\r\n\t\tconst lowerGeoLocation: GeoLocation = this.getGeoLocation().clone();\r\n\t\tconst meridian: number = lowerGeoLocation.getLongitude();\r\n\t\tlet lowerMeridian: number = meridian + 180;\r\n\t\tif (lowerMeridian > 180){\r\n\t\t\tlowerMeridian = lowerMeridian - 360;\r\n cal = cal.subtract({ days: 1 })\r\n\t\t}\r\n\t\tlowerGeoLocation.setLongitude(lowerMeridian);\r\n\t\tconst noon: number = this.getAstronomicalCalculator().getUTCNoon(cal, lowerGeoLocation);\r\n\t\treturn this.getDateFromTime(noon, SolarEvent.MIDNIGHT)!;\r\n\t}\r\n\r\n /**\r\n * A method that returns a Date from the time passed in as a parameter.\r\n *\r\n * @param time\r\n * The time to be set as the time for the Date. The time expected is in the format: 18.75\r\n * for 6:45:00 PM.\r\n * @param isSunrise true if the time is sunrise, and false if it is sunset\r\n * @return The Date.\r\n */\r\n protected getDateFromTime(time: number, solarEvent: SolarEvent): Temporal.ZonedDateTime | null {\r\n if (Number.isNaN(time)) {\r\n return null;\r\n }\r\n let calculatedTime: number = time;\r\n\r\n const adjustedDate: Temporal.PlainDate = this.getAdjustedDate();\r\n let cal = adjustedDate.toZonedDateTime(\"UTC\");\r\n\r\n const hours: number = Math.trunc(calculatedTime); // retain only the hours\r\n calculatedTime -= hours;\r\n const minutes: number = Math.trunc(calculatedTime *= 60); // retain only the minutes\r\n calculatedTime -= minutes;\r\n const seconds: number = Math.trunc(calculatedTime *= 60); // retain only the seconds\r\n calculatedTime -= seconds; // remaining milliseconds\r\n const milliseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= milliseconds;\r\n const microseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= microseconds; // remaining nanoseconds\r\n\r\n\r\n // Check if a date transition has occurred, or is about to occur - this indicates the date of the event is\r\n // actually not the target date, but the day prior or after\r\n const localTimeHours: number = Math.trunc(this.getGeoLocation().getLongitude() / 15);\r\n if (solarEvent == SolarEvent.SUNRISE && localTimeHours + hours > 18) {\r\n cal = cal.subtract({ days: 1 });\r\n } else if (solarEvent == SolarEvent.SUNSET && localTimeHours + hours < 6) {\r\n cal = cal.add({ days: 1 });\r\n } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours + hours > 12) {\r\n\t\t\tcal = cal.subtract({ days: 1 });\r\n\t\t}\r\n\r\n return cal.with({\r\n hour: hours,\r\n minute: minutes,\r\n second: seconds,\r\n millisecond: milliseconds,\r\n microsecond: microseconds,\r\n nanosecond: Math.trunc(calculatedTime * 1000)\r\n }).withTimeZone(this.geoLocation.getTimeZone());\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon before sunrise that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon before sunrise that match the offset in minutes passed it as a parameter.\r\n * @see #getSunsetSolarDipFromOffset(double)\r\n */\r\n public getSunriseSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise()?.subtract({ minutes })!;\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.0001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees === null || ((minutes < 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes > 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon after sunset that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon after sunset that match the offset in minutes passed it as a parameter.\r\n * @see #getSunriseSolarDipFromOffset(double)\r\n */\r\n public getSunsetSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()?.add({ minutes })!\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * FIXME broken for czc.getRiseSetSolarDipFromOffset(-72, czc.getSunrise());\r\n * and broken in other was as well\r\n * @param minutes\r\n * @param riseSet\r\n * @return\r\n */\r\n /*\r\n public getRiseSetSolarDipFromOffset(minutes: number, riseSet: DateTime): number {\r\n let offsetByDegrees: DateTime | null = riseSet;\r\n const offsetByTime: DateTime | null = AstronomicalCalendar.getTimeOffset(riseSet, minutes * AstronomicalCalendar.MIUTE_MILLIS);\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n return degrees.valueOf();\r\n }\r\n */\r\n\r\n /**\r\n\t * A method that returns local mean time (LMT) time\r\n\t * converted to regular clock time for the number of hours (0.0 to 23.999...) passed to this method. This time is\r\n\t * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates\r\n\t * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm.\r\n\t * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is\r\n\t * multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a noon time of 11:56:53am. This\r\n\t * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT.\r\n\t * \r\n\t * @param hours\r\n\t * \t\t\tthe hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of\r\n\t * \t\t\t0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range.\r\n\t * @return the Date representing the local mean time (LMT) for the number of hours passed in. In Lakewood, NJ, passing 12\r\n\t * (noon) will return 11:56:50am.\r\n\t * @see GeoLocation#getLocalMeanTimeOffset()\r\n\t */\r\n\tpublic getLocalMeanTime(hours:number): Temporal.ZonedDateTime | null {\r\n\t\tif(hours < 0 || hours >= 24) {\r\n\t\t\tthrow new IllegalArgumentException(\"Hours must between 0 and 23.9999...\");\r\n\t\t}\r\n \r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / AstronomicalCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(hours - rawOffsetHours, SolarEvent.SUNRISE)?.subtract({ nanoseconds: geoLocation.getLocalMeanTimeOffset() })!;\r\n\t}\r\n\r\n /**\r\n * Adjusts the Calendar to deal with edge cases where the location crosses the antimeridian.\r\n *\r\n * @see GeoLocation#getAntimeridianAdjustment()\r\n * @return the adjusted Calendar\r\n */\r\n private getAdjustedDate(): Temporal.PlainDate {\r\n const offset: -1 | 0 | 1 = this.getGeoLocation().getAntimeridianAdjustment();\r\n if (offset === 0) return this.getDate();\r\n return this.getDate().add({ days: offset });\r\n }\r\n\r\n /**\r\n * @return an XML formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toXML(AstronomicalCalendar) toXML} method.\r\n * @see ZmanimFormatter#toXML(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated (This depends on a circular dependency).\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency.');\r\n }\r\n\r\n /**\r\n * @return a JSON formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toJSON(AstronomicalCalendar) toJSON} method.\r\n * @see ZmanimFormatter#toJSON(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated This depends on a circular dependency. Use
ZmanimFormatter.toJSON(astronomicalCalendar)
instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toJSON(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency. '\r\n + 'Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) {\r\n return true;\r\n }\r\n if (!(object instanceof AstronomicalCalendar)) {\r\n return false;\r\n }\r\n const aCal: AstronomicalCalendar = object as AstronomicalCalendar;\r\n return this.getDate().equals(aCal.getDate()) && this.getGeoLocation().equals(aCal.getGeoLocation())\r\n && this.getAstronomicalCalculator() === aCal.getAstronomicalCalculator();\r\n }\r\n\r\n /**\r\n * A method that returns the currently set {@link GeoLocation} which contains location information used for the\r\n * astronomical calculations.\r\n *\r\n * @return Returns the geoLocation.\r\n */\r\n public getGeoLocation(): GeoLocation {\r\n return this.geoLocation;\r\n }\r\n\r\n /**\r\n * Sets the {@link GeoLocation} Object to be used for astronomical calculations.\r\n *\r\n * @param geoLocation\r\n * The geoLocation to set.\r\n */\r\n public setGeoLocation(geoLocation: GeoLocation): void {\r\n this.geoLocation = geoLocation;\r\n }\r\n\r\n /**\r\n * A method that returns the currently set AstronomicalCalculator.\r\n *\r\n * @return Returns the astronomicalCalculator.\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator)\r\n */\r\n public getAstronomicalCalculator(): AstronomicalCalculator {\r\n return this.astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * A method to set the {@link AstronomicalCalculator} used for astronomical calculations. The Zmanim package ships\r\n * with a number of different implementations of the abstract {@link AstronomicalCalculator} based on\r\n * different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link\r\n * com.kosherjava.zmanim.util.SunTimesCalculator} based on the US\r\n * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms.\r\n *\r\n * @param astronomicalCalculator\r\n * The astronomicalCalculator to set.\r\n */\r\n public setAstronomicalCalculator(astronomicalCalculator: AstronomicalCalculator): void {\r\n this.astronomicalCalculator = astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * returns the Calendar object encapsulated in this class.\r\n *\r\n * @return Returns the calendar.\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * @param calendar\r\n * The calendar to set.\r\n */\r\n public setDate(date: Temporal.PlainDate | Date | string | number): void {\r\n if (date instanceof Temporal.PlainDate) {\r\n this.date = date;\r\n } else if (date instanceof Date) {\r\n this.date = Temporal.Instant.fromEpochMilliseconds(date.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate();\r\n } else if (typeof date === 'string') {\r\n this.date = Temporal.PlainDate.from(date);\r\n }\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the cloned {@link GeoLocation} will\r\n * be changed from the original, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset after being cloned.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalendar {\r\n const clonedCalendar: AstronomicalCalendar = new AstronomicalCalendar(this.geoLocation);\r\n clonedCalendar.setDate(this.date);\r\n clonedCalendar.setAstronomicalCalculator(this.astronomicalCalculator);\r\n\r\n return clonedCalendar;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.AstronomicalCalendar';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}\r\n * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar\r\n * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally\r\n * in any calculations. This class also does not have a concept of a time (which the Date class does). Please\r\n * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the\r\n * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from\r\n * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359\r\n * CE Julian as recorded by Rav Hai Gaon) would be just an\r\n * approximation.\r\n *\r\n * This open source Java code was written by Avrom Finkelstien from his C++\r\n * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug\r\n * fixing.\r\n *\r\n * Some of Avrom's original C++ code was translated from C/C++\r\n * code in Calendrical Calculations by Nachum Dershowitz and Edward M.\r\n * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark\r\n * \"ND+ER\" indicates that the method was taken from this source with minor modifications.\r\n *\r\n * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from\r\n * the ICU (International Components for Unicode) project, formerly part of\r\n * IBM's DeveloperWorks.\r\n *\r\n * @see JewishCalendar\r\n * @see HebrewDateFormatter\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class JewishDate {\r\n /**\r\n * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly NISSAN: number = 1;\r\n\r\n /**\r\n * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly IYAR: number = 2;\r\n\r\n /**\r\n * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly SIVAN: number = 3;\r\n\r\n /**\r\n * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly TAMMUZ: number = 4;\r\n\r\n /**\r\n * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year\r\n * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year})\r\n * month of the year.\r\n */\r\n public static readonly AV: number = 5;\r\n\r\n /**\r\n * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly ELUL: number = 6;\r\n\r\n /**\r\n * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at this month, it would actually be the 1st month of the year.\r\n */\r\n public static readonly TISHREI: number = 7;\r\n\r\n /**\r\n * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish\r\n * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.\r\n */\r\n public static readonly CHESHVAN: number = 8;\r\n\r\n /**\r\n * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.\r\n */\r\n public static readonly KISLEV: number = 9;\r\n\r\n /**\r\n * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 4th month of the year.\r\n */\r\n public static readonly TEVES: number = 10;\r\n\r\n /**\r\n * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.\r\n */\r\n public static readonly SHEVAT: number = 11;\r\n\r\n /**\r\n * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth\r\n * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually\r\n * be the 6th month of the year.\r\n */\r\n public static readonly ADAR: number = 12;\r\n\r\n /**\r\n * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric\r\n * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11,\r\n * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month\r\n * of the year.\r\n */\r\n public static readonly ADAR_II: number = 13;\r\n\r\n /**\r\n * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations.\r\n * Day 1 is January 1, 0001 Gregorian\r\n */\r\n private static readonly JEWISH_EPOCH: number = -1373429;\r\n\r\n /** The number of chalakim (18) in a minute. */\r\n private static readonly CHALAKIM_PER_MINUTE: number = 18;\r\n\r\n /** The number of chalakim (1080) in an hour. */\r\n private static readonly CHALAKIM_PER_HOUR: number = 1080;\r\n\r\n /** The number of chalakim (25,920) in a 24 hour day. */\r\n private static readonly CHALAKIM_PER_DAY: number = 25920; // 24 * 1080\r\n\r\n /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793\r\n * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */\r\n private static readonly CHALAKIM_PER_MONTH: number = 765433; // (29 * 24 + 12) * 1080 + 793\r\n\r\n /**\r\n * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) *\r\n * 1080 + 204 = 31524\r\n */\r\n private static readonly CHALAKIM_MOLAD_TOHU: number = 31524;\r\n\r\n /**\r\n * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly CHASERIM: number = 0;\r\n\r\n /**\r\n * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly KESIDRAN: number = 1;\r\n\r\n /**\r\n * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly SHELAIMIM: number = 2;\r\n\r\n private date: Temporal.PlainDate;\r\n\r\n /** the internal count of molad hours. */\r\n private moladHours!: number;\r\n\r\n /** the internal count of molad minutes. */\r\n private moladMinutes!: number;\r\n\r\n /** the internal count of molad chalakim. */\r\n private moladChalakim!: number;\r\n\r\n /**\r\n * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad hours\r\n * @see #setMoladHours(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladHours(): number {\r\n return this.moladHours;\r\n }\r\n\r\n /**\r\n * Sets the molad hours.\r\n *\r\n * @param moladHours\r\n * the molad hours to set\r\n * @see #getMoladHours()\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladHours(moladHours: number): void {\r\n this.moladHours = moladHours;\r\n }\r\n\r\n /**\r\n * Returns the molad minutes. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad minutes\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladMinutes(): number {\r\n return this.moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to\r\n * 44 and chalakim to 1.\r\n *\r\n * @param moladMinutes\r\n * the molad minutes to set\r\n * @see #getMoladMinutes()\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladMinutes(moladMinutes: number): void {\r\n this.moladMinutes = moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and\r\n * chalakim to 1.\r\n *\r\n * @param moladChalakim\r\n * the molad chalakim/parts to set\r\n * @see #getMoladChalakim()\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladChalakim(moladChalakim: number): void {\r\n this.moladChalakim = moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad chalakim/parts\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladChalakim(): number {\r\n return this.moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the last day in a gregorian month\r\n *\r\n * @param month\r\n * the Gregorian month\r\n * @return the last day of the Gregorian month\r\n */\r\n public getLastDayOfGregorianMonth(month: number): number {\r\n return this.date.with({ month }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days in a given month in a given month and year.\r\n *\r\n * @param month\r\n * the month. As with other cases in this class, this is 1-based, not zero-based.\r\n * @param year\r\n * the year (only impacts February)\r\n * @return the number of days in the month in the given year\r\n */\r\n private static getLastDayOfGregorianMonth(month: number, year: number): number {\r\n switch (month) {\r\n case 2:\r\n if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {\r\n return 29;\r\n }\r\n return 28;\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n return 30;\r\n default:\r\n return 31;\r\n }\r\n }\r\n\r\n /**\r\n * Computes the Gregorian date from the absolute date. ND+ER\r\n * @param absDate - the absolute date\r\n */\r\n private absDateToDate(absDate: number): void {\r\n let year: number = Math.trunc(absDate / 366); // Search forward year by year from approximate year\r\n while (absDate >= JewishDate.gregorianDateToAbsDate(year + 1, 1, 1)) {\r\n year++;\r\n }\r\n\r\n let month: number = 1; // Search forward month by month from January\r\n while (absDate > JewishDate.gregorianDateToAbsDate(year, month, JewishDate.getLastDayOfGregorianMonth(month, year))) {\r\n month++;\r\n }\r\n\r\n const dayOfMonth: number = absDate - JewishDate.gregorianDateToAbsDate(year, month, 1) + 1;\r\n this.setInternalGregorianDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Computes the absolute date from a Gregorian date. ND+ER\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for\r\n * January\r\n * @param dayOfMonth\r\n * the day of the month (1st, 2nd, etc...)\r\n * @return the absolute Gregorian day\r\n */\r\n private static gregorianDateToAbsDate(year: number, month: number, dayOfMonth: number): number {\r\n let absDate: number = dayOfMonth;\r\n for (let m: number = month - 1; m > 0; m--) {\r\n absDate += JewishDate.getLastDayOfGregorianMonth(m, year); // days in prior months of the year\r\n }\r\n return (absDate // days this year\r\n + 365 * (year - 1) // days in previous years ignoring leap days\r\n + Math.trunc((year - 1) / 4) // Julian leap days before this year\r\n - Math.trunc((year - 1) / 100) // minus prior century years\r\n + Math.trunc((year - 1) / 400)); // plus prior years divisible by 400\r\n }\r\n\r\n /**\r\n * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear()\r\n */\r\n private static isJewishLeapYear(year: number): boolean {\r\n return ((7 * year) + 1) % 19 < 7;\r\n }\r\n\r\n /**\r\n * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year\r\n * cycle are leap years.\r\n *\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n public isJewishLeapYear(): boolean {\r\n return JewishDate.isJewishLeapYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year}\r\n * or 13 on a leap year.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return 12 on a non leap year or 13 on a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n private static getLastMonthOfJewishYear(year: number): number {\r\n return JewishDate.isJewishLeapYear(year) ? JewishDate.ADAR_II : JewishDate.ADAR;\r\n }\r\n\r\n /**\r\n * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean\r\n * conjunction of Tishri of the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the\r\n * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday\r\n * evening).\r\n */\r\n public static getJewishCalendarElapsedDays(year: number): number {\r\n const chalakimSince: number = JewishDate.getChalakimSinceMoladTohu(year, JewishDate.TISHREI);\r\n const moladDay: number = Math.trunc(chalakimSince / JewishDate.CHALAKIM_PER_DAY);\r\n const moladParts: number = Math.trunc(chalakimSince - moladDay * JewishDate.CHALAKIM_PER_DAY);\r\n // delay Rosh Hashana for the 4 dechiyos\r\n return JewishDate.addDechiyos(year, moladDay, moladParts);\r\n }\r\n\r\n // private static int getJewishCalendarElapsedDaysOLD(int year) {\r\n // // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // // Molad Tohu = BeHaRaD - Monday, 5 hours (11 PM) and 204 chalakim\r\n // final int chalakimTashTZag = 793; // chalakim in a lunar month\r\n // final int chalakimTohuRaD = 204; // chalakim from original molad Tohu BeHaRaD\r\n // final int hoursTohuHa = 5; // hours from original molad Tohu BeHaRaD\r\n // final int dayTohu = 1; // Monday (0 based)\r\n //\r\n // int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n // + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n // + ((7 * ((year - 1) % 19) + 1) / 19); // Leap months this cycle\r\n // // start with Molad Tohu BeHaRaD\r\n // // start with RaD of BeHaRaD and add TaShTzaG (793) chalakim plus elapsed chalakim\r\n // int partsElapsed = chalakimTohuRaD + chalakimTashTZag * (monthsElapsed % 1080);\r\n // // start with Ha hours of BeHaRaD, add 12 hour remainder of lunar month add hours elapsed\r\n // int hoursElapsed = hoursTohuHa + 12 * monthsElapsed + 793 * (monthsElapsed / 1080) + partsElapsed / 1080;\r\n // // start with Monday of BeHaRaD = 1 (0 based), add 29 days of the lunar months elapsed\r\n // int conjunctionDay = dayTohu + 29 * monthsElapsed + hoursElapsed / 24;\r\n // int conjunctionParts = 1080 * (hoursElapsed % 24) + partsElapsed % 1080;\r\n // return addDechiyos(year, conjunctionDay, conjunctionParts);\r\n // }\r\n\r\n /**\r\n * Adds the 4 dechiyos for molad Tishrei. These are:\r\n *
    \r\n *
  1. Lo ADU Rosh - Rosh Hashana can't fall on a Sunday, Wednesday or Friday. If the molad fell on one of these\r\n * days, Rosh Hashana is delayed to the following day.
  2. \r\n *
  3. Molad Zaken - If the molad of Tishrei falls after 12 noon, Rosh Hashana is delayed to the following day. If\r\n * the following day is ADU, it will be delayed an additional day.
  4. \r\n *
  5. GaTRaD - If on a non leap year the molad of Tishrei falls on a Tuesday (Ga) on or after 9 hours (T) and 204\r\n * chalakim (TRaD) it is delayed till Thursday (one day delay, plus one day for Lo ADU Rosh)
  6. \r\n *
  7. BeTuTaKFoT - if the year following a leap year falls on a Monday (Be) on or after 15 hours (Tu) and 589\r\n * chalakim (TaKFoT) it is delayed till Tuesday
  8. \r\n *
\r\n *\r\n * @param year - the year\r\n * @param moladDay - the molad day\r\n * @param moladParts - the molad parts\r\n * @return the number of elapsed days in the JewishCalendar adjusted for the 4 dechiyos.\r\n */\r\n private static addDechiyos(year: number, moladDay: number, moladParts: number): number {\r\n let roshHashanaDay: number = moladDay; // if no dechiyos\r\n // delay Rosh Hashana for the dechiyos of the Molad - new moon 1 - Molad Zaken, 2- GaTRaD 3- BeTuTaKFoT\r\n if ((moladParts >= 19440) // Dechiya of Molad Zaken - molad is >= midday (18 hours * 1080 chalakim)\r\n || (((moladDay % 7) === 2) // start Dechiya of GaTRaD - Ga = is a Tuesday\r\n && (moladParts >= 9924) // TRaD = 9 hours, 204 parts or later (9 * 1080 + 204)\r\n && !JewishDate.isJewishLeapYear(year)) // of a non-leap year - end Dechiya of GaTRaD\r\n || (((moladDay % 7) === 1) // start Dechiya of BeTuTaKFoT - Be = is on a Monday\r\n && (moladParts >= 16789) // TRaD = 15 hours, 589 parts or later (15 * 1080 + 589)\r\n && (JewishDate.isJewishLeapYear(year - 1)))) { // in a year following a leap year - end Dechiya of BeTuTaKFoT\r\n roshHashanaDay += 1; // Then postpone Rosh HaShanah one day\r\n }\r\n // start 4th Dechiya - Lo ADU Rosh - Rosh Hashana can't occur on A- sunday, D- Wednesday, U - Friday\r\n if (((roshHashanaDay % 7) === 0) // If Rosh HaShanah would occur on Sunday,\r\n || ((roshHashanaDay % 7) === 3) // or Wednesday,\r\n || ((roshHashanaDay % 7) === 5)) { // or Friday - end 4th Dechiya - Lo ADU Rosh\r\n roshHashanaDay++; // Then postpone it one (more) day\r\n }\r\n return roshHashanaDay;\r\n }\r\n\r\n /**\r\n * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the year\r\n * and month passed in.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @param month\r\n * the Jewish month the Jewish month, with the month numbers starting from Nisan. Use the JewishDate\r\n * constants such as {@link JewishDate#TISHREI}.\r\n * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu\r\n */\r\n private static getChalakimSinceMoladTohu(year: number, month: number): number {\r\n // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // chalakim since Molad Tohu BeHaRaD - 1 day, 5 hours and 204 chalakim\r\n const monthOfYear: number = JewishDate.getJewishMonthOfYear(year, month);\r\n const monthsElapsed: number = (235 * Math.trunc((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n + Math.trunc((7 * ((year - 1) % 19) + 1) / 19) // Leap months this cycle\r\n + (monthOfYear - 1); // add elapsed months till the start of the molad of the month\r\n // return chalakim prior to BeHaRaD + number of chalakim since\r\n return JewishDate.CHALAKIM_MOLAD_TOHU + (JewishDate.CHALAKIM_PER_MONTH * monthsElapsed);\r\n }\r\n\r\n /**\r\n * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the Jewish\r\n * year and month that this Object is set to.\r\n *\r\n * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu\r\n */\r\n public getChalakimSinceMoladTohu(): number {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n return JewishDate.getChalakimSinceMoladTohu(hebrewCalendar.year, this.getJewishMonth());\r\n }\r\n\r\n /**\r\n * Converts the {@link JewishDate#NISSAN} based constants used by this class to numeric month starting from\r\n * {@link JewishDate#TISHREI}. This is required for Molad claculations.\r\n *\r\n * @param year\r\n * The Jewish year\r\n * @param month\r\n * The Jewish Month\r\n * @return the Jewish month of the year starting with Tishrei\r\n */\r\n private static getJewishMonthOfYear(year: number, month: number): number {\r\n const jDate = new JewishDate(year, month, 1)\r\n return jDate.date.withCalendar(\"hebrew\").month;\r\n }\r\n\r\n /**\r\n * Validates the components of a Jewish date for validity. It will throw an {@link IllegalArgumentException} if the\r\n * Jewish date is earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * {@link #isJewishLeapYear(int) leap year}), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 >\r\n * 59 or chalakim < 0 > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into\r\n * minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793/TaShTzaG).\r\n *\r\n * @param year\r\n * the Jewish year to validate. It will reject any year <= 3761 (lower than the year 1 Gregorian).\r\n * @param month\r\n * the Jewish month to validate. It will reject a month < 1 or > 12 (or 13 on a leap year) .\r\n * @param dayOfMonth\r\n * the day of the Jewish month to validate. It will reject any value < 1 or > 30 TODO: check calling\r\n * methods to see if there is any reason that the class can validate that 30 is invalid for some months.\r\n * @param hours\r\n * the hours (for molad calculations). It will reject an hour < 0 or > 23\r\n * @param minutes\r\n * the minutes (for molad calculations). It will reject a minute < 0 or > 59\r\n * @param chalakim\r\n * the chalakim/parts (for molad calculations). It will reject a chalakim < 0 or > 17. For larger numbers\r\n * such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44\r\n * minutes and 1 chelek in the case of 793/TaShTzaG)\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n private static validateJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void {\r\n if (month < JewishDate.NISSAN || month > JewishDate.getLastMonthOfJewishYear(year)) {\r\n throw new IllegalArgumentException(`The Jewish month has to be between 1 and 12 (or 13 on a leap year). ${month} is invalid for the year ${year}.`);\r\n }\r\n if (dayOfMonth < 1 || dayOfMonth > 30) {\r\n throw new IllegalArgumentException(`The Jewish day of month can't be < 1 or > 30. ${dayOfMonth} is invalid.`);\r\n }\r\n // reject dates prior to 18 Teves, 3761 (1/1/1 AD). This restriction can be relaxed if the date coding is\r\n // changed/corrected\r\n if ((year < 3761) || (year === 3761 && (month >= JewishDate.TISHREI && month < JewishDate.TEVES))\r\n || (year === 3761 && month === JewishDate.TEVES && dayOfMonth < 18)) {\r\n throw new IllegalArgumentException(`A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian) can't be set. ${year}, ${month}, ${dayOfMonth} is invalid.`);\r\n }\r\n if (hours < 0 || hours > 23) {\r\n throw new IllegalArgumentException(`Hours < 0 or > 23 can't be set. ${hours} is invalid.`);\r\n }\r\n\r\n if (minutes < 0 || minutes > 59) {\r\n throw new IllegalArgumentException(`Minutes < 0 or > 59 can't be set. ${minutes} is invalid.`);\r\n }\r\n\r\n if (chalakim < 0 || chalakim > 17) {\r\n throw new IllegalArgumentException(`Chalakim/parts < 0 or > 17 can't be set. ${chalakim} is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates the components of a Gregorian date for validity. It will throw an {@link IllegalArgumentException} if a\r\n * year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in.\r\n *\r\n * @param year\r\n * the Gregorian year to validate. It will reject any year < 1.\r\n * @param month\r\n * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a\r\n * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.\r\n * @param dayOfMonth\r\n * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31\r\n * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to\r\n * see if there is any reason that the class needs days > the maximum.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n * @see #validateGregorianYear(int)\r\n * @see #validateGregorianMonth(int)\r\n * @see #validateGregorianDayOfMonth(int)\r\n */\r\n private static validateGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n JewishDate.validateGregorianYear(year);\r\n }\r\n\r\n /**\r\n * Validates a Gregorian month for validity.\r\n *\r\n * @param month\r\n * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a\r\n * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.\r\n */\r\n private static validateGregorianMonth(month: number): void {\r\n if (month > 11 || month < 0) {\r\n throw new IllegalArgumentException(`The Gregorian month has to be between 0 - 11. ${month} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates a Gregorian day of month for validity.\r\n *\r\n * @param dayOfMonth\r\n * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31\r\n * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to\r\n * see if there is any reason that the class needs days > the maximum.\r\n */\r\n private static validateGregorianDayOfMonth(dayOfMonth: number): void {\r\n if (dayOfMonth <= 0) {\r\n throw new IllegalArgumentException(`The day of month can't be less than 1. ${dayOfMonth} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates a Gregorian year for validity.\r\n *\r\n * @param year\r\n * the Gregorian year to validate. It will reject any year < 1.\r\n */\r\n private static validateGregorianYear(year: number): void {\r\n if (year < 1) {\r\n throw new IllegalArgumentException(`Years < 1 can't be calculated. ${year} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the number of days for a given Jewish year. ND+ER\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days for a given Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n */\r\n public static getDaysInJewishYear(year: number): number {\r\n return Temporal.PlainYearMonth.from({ year, month: 1, calendar: \"hebrew\" }).daysInYear;\r\n }\r\n\r\n /**\r\n * Returns the number of days for the current year that the calendar is set to.\r\n *\r\n * @return the number of days for the Object's current Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n * @see #isJewishLeapYear()\r\n */\r\n public getDaysInJewishYear(): number {\r\n return JewishDate.getDaysInJewishYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns if Cheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered)\r\n * year Cheshvan is short. ND+ER\r\n *\r\n * @param year\r\n * the year\r\n * @return true if Cheshvan is long in Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #getCheshvanKislevKviah()\r\n */\r\n private static isCheshvanLong(year: number): boolean {\r\n return JewishDate.getDaysInJewishYear(year) % 10 === 5;\r\n }\r\n\r\n /**\r\n * Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method\r\n * name isLong is done since in a Kesidran (ordered) year Cheshvan is short.\r\n *\r\n * @return true if Cheshvan is long for the current year that the calendar is set to\r\n * @see #isCheshvanLong()\r\n */\r\n public isCheshvanLong(): boolean {\r\n return JewishDate.isCheshvanLong(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns if Kislev is short (29 days VS 30 days) in a given Jewish year. The method name isShort is done since in\r\n * a Kesidran (ordered) year Kislev is long. ND+ER\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return true if Kislev is short for the given Jewish year.\r\n * @see #isKislevShort()\r\n * @see #getCheshvanKislevKviah()\r\n */\r\n private static isKislevShort(year: number): boolean {\r\n return JewishDate.getDaysInJewishYear(year) % 10 === 3;\r\n }\r\n\r\n /**\r\n * Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a\r\n * Kesidran (ordered) year Kislev is long.\r\n *\r\n * @return true if Kislev is short for the year that this class is set to\r\n */\r\n public isKislevShort(): boolean {\r\n return JewishDate.isKislevShort(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return\r\n * {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev\r\n * is 30 days and {@link #CHASERIM} if both are 29 days.\r\n *\r\n * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and\r\n * Kislev is 30 days and {@link #CHASERIM} if both are 29 days.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n */\r\n public getCheshvanKislevKviah(): number {\r\n if (this.isCheshvanLong() && !this.isKislevShort()) {\r\n return JewishDate.SHELAIMIM;\r\n } else if (!this.isCheshvanLong() && this.isKislevShort()) {\r\n return JewishDate.CHASERIM;\r\n }\r\n return JewishDate.KESIDRAN;\r\n }\r\n\r\n /**\r\n * Returns the number of days of a Jewish month for a given month and year.\r\n *\r\n * @param month\r\n * the Jewish month\r\n * @param year\r\n * the Jewish Year\r\n * @return the number of days for a given Jewish month\r\n */\r\n private static getDaysInJewishMonth(month: number, year: number): number {\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: 1, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n return Temporal.PlainDate.from({ year, month: fixedMonth, day: 15, calendar: \"hebrew\" }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days of the Jewish month that the calendar is currently set to.\r\n *\r\n * @return the number of days for the Jewish month that the calendar is currently set to.\r\n */\r\n public getDaysInJewishMonth(): number {\r\n return this.getDate().withCalendar(\"hebrew\").daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad\r\n * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim()\r\n * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This\r\n * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5,\r\n * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7.\r\n *\r\n * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours},\r\n * {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set.\r\n */\r\n public getMolad(): JewishDate {\r\n const moladDate: JewishDate = new JewishDate(this.getChalakimSinceMoladTohu());\r\n if (moladDate.getMoladHours() >= 6) {\r\n moladDate.setDate(moladDate.getDate().add({ days: 1 }));\r\n }\r\n moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24);\r\n return moladDate;\r\n }\r\n\r\n /**\r\n * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in.\r\n *\r\n * @param chalakim\r\n * the number of chalakim since the beginning of Sunday prior to BaHaRaD\r\n * @return the number of days from the Jewish epoch\r\n */\r\n private static moladToAbsDate(chalakim: number): number {\r\n return Math.trunc(chalakim / JewishDate.CHALAKIM_PER_DAY) + JewishDate.JEWISH_EPOCH;\r\n }\r\n\r\n /**\r\n * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of chalakim/parts\r\n * starting at the beginning of Sunday prior to the molad Tohu BeHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) - prior to the start of the Jewish calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080\r\n * chalakim after sunset on Sunday evening).\r\n *\r\n * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD\r\n */\r\n\r\n /*\r\n public JewishDate(molad: number) {\r\n this.absDateToDate(JewishDate.moladToAbsDate(molad));\r\n // long chalakimSince = getChalakimSinceMoladTohu(year, JewishDate.TISHREI);// tishrei\r\n const conjunctionDay: number = Math.trunc(molad / JewishDate.CHALAKIM_PER_DAY);\r\n const conjunctionParts: number = Math.trunc(molad - conjunctionDay * JewishDate.CHALAKIM_PER_DAY);\r\n this.setMoladTime(conjunctionParts);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the molad time (hours minutes and chalakim) based on the number of chalakim since the start of the day.\r\n *\r\n * @param chalakim\r\n * the number of chalakim since the start of the day.\r\n */\r\n private setMoladTime(chalakim: number): void {\r\n let adjustedChalakim: number = chalakim;\r\n this.setMoladHours(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_HOUR));\r\n adjustedChalakim = adjustedChalakim - (this.getMoladHours() * JewishDate.CHALAKIM_PER_HOUR);\r\n this.setMoladMinutes(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_MINUTE));\r\n this.setMoladChalakim(adjustedChalakim - this.moladMinutes * JewishDate.CHALAKIM_PER_MINUTE);\r\n }\r\n\r\n /**\r\n * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in.\r\n *\r\n * @return the number of days\r\n */\r\n public getDaysSinceStartOfJewishYear(): number {\r\n const roshHashanah = this.date.withCalendar(\"hebrew\").with({ month: 1, day: 1 }).subtract({ days: 1 })\r\n return roshHashanah.until(this.date.withCalendar(\"hebrew\")).total(\"days\")\r\n }\r\n\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number);\r\n constructor(molad: number);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrPlainDateOrDateOrMolad?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number) {\r\n this.date = Temporal.Now.plainDateISO();\r\n if (jewishMonth) {\r\n this.setJewishDate(jewishYearOrPlainDateOrDateOrMolad as number, jewishMonth, jewishDayOfMonth!);\r\n } else if (jewishYearOrPlainDateOrDateOrMolad instanceof Date) {\r\n this.setDate(Temporal.Instant.fromEpochMilliseconds(jewishYearOrPlainDateOrDateOrMolad.valueOf()).toZonedDateTimeISO('UTC').toPlainDate());\r\n } else if (jewishYearOrPlainDateOrDateOrMolad instanceof Temporal.PlainDate) {\r\n this.setDate(jewishYearOrPlainDateOrDateOrMolad);\r\n } else if (typeof jewishYearOrPlainDateOrDateOrMolad === 'number') {\r\n const molad = jewishYearOrPlainDateOrDateOrMolad;\r\n this.absDateToDate(JewishDate.moladToAbsDate(molad));\r\n // long chalakimSince = getChalakimSinceMoladTohu(year, JewishDate.TISHREI);// tishrei\r\n const conjunctionDay: number = Math.trunc(molad / JewishDate.CHALAKIM_PER_DAY);\r\n const conjunctionParts: number = Math.trunc(molad - conjunctionDay * JewishDate.CHALAKIM_PER_DAY);\r\n this.setMoladTime(conjunctionParts);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n /*\r\n public JewishDate(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n this.setJewishDate(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Default constructor will set a default date to the current system date.\r\n */\r\n /*\r\n public JewishDate() {\r\n this.resetDate();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Date Date} paremeter.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the January 1, 1 AD\r\n */\r\n /*\r\n public JewishDate(date: Date) {\r\n this.setDate(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.\r\n *\r\n * @param calendar\r\n * the Calendar to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n\r\n /*\r\n public JewishDate(calendar: GregorianCalendar) {\r\n this.setDate(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Calendar to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n public setDate(date: Temporal.PlainDate): void {\r\n if (date.year < 1) {\r\n throw new IllegalArgumentException(`Dates with a BC era are not supported. The year ${date.year} is invalid.`);\r\n }\r\n\r\n this.date = date;\r\n }\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the year 1 AD\r\n */\r\n\r\n /*\r\n public setDate(date: Date): void {\r\n const cal: GregorianCalendar = new GregorianCalendar();\r\n cal.setTime(date);\r\n this.setDate(cal);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected\r\n * for January.\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Like the Java Calendar, this class expects 0 for January\r\n * @param dayOfMonth\r\n * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of\r\n * the month will be set\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n */\r\n public setGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianDate(year, month, dayOfMonth);\r\n this.setInternalGregorianDate(year, month + 1, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While\r\n * public getters and setters have 0 based months matching the Java Calendar classes, This class internally\r\n * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java\r\n * Calendar classes.\r\n *\r\n * @param year - the year\r\n * @param month - the month\r\n * @param dayOfMonth - the day of month\r\n */\r\n private setInternalGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n // make sure date is a valid date for the given month, if not, set to last day of month\r\n if (dayOfMonth > JewishDate.getLastDayOfGregorianMonth(month, year)) {\r\n dayOfMonth = JewishDate.getLastDayOfGregorianMonth(month, year);\r\n }\r\n\r\n this.date = new Temporal.PlainDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year) or the day of month is < 1 or > 30 is passed in\r\n */\r\n\r\n /*\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void {\r\n this.setJewishDate(year, month, dayOfMonth, 0, 0, 0);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n *\r\n * @param hours\r\n * the hour of the day. Used for Molad calculations\r\n * @param minutes\r\n * the minutes. Used for Molad calculations\r\n * @param chalakim\r\n * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be\r\n * used for larger numbers.\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number = 0, minutes: number = 0, chalakim: number = 0): void {\r\n JewishDate.validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim);\r\n\r\n // if 30 is passed for a month that only has 29 days (for example by rolling the month from a month that had 30\r\n // days to a month that only has 29) set the date to 29th\r\n if (dayOfMonth > JewishDate.getDaysInJewishMonth(month, year)) {\r\n dayOfMonth = JewishDate.getDaysInJewishMonth(month, year);\r\n }\r\n\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: dayOfMonth, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n this.date = Temporal.PlainDate.from({ year, month: fixedMonth, day: dayOfMonth, calendar: \"hebrew\" }).withCalendar(\"iso8601\")\r\n }\r\n\r\n /**\r\n * Returns this object's date as a {@link java.util.Calendar} object.\r\n *\r\n * @return The {@link java.util.Calendar}\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * Resets this date to the current system date.\r\n */\r\n public resetDate(): void {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n }\r\n\r\n /**\r\n * Returns a string containing the Jewish date in the form, \"day Month, year\" e.g. \"21 Shevat, 5729\". For more\r\n * complex formatting, use the formatter classes.\r\n *\r\n * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.\r\n *\r\n * @return the Jewish date in the form \"day Month, year\" e.g. \"21 Shevat, 5729\"\r\n * @see HebrewDateFormatter#format(JewishDate)\r\n */\r\n public toString(): string {\r\n const transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n let formattedMonth: string;\r\n if (this.isJewishLeapYear() && this.getJewishMonth() === JewishDate.ADAR) {\r\n formattedMonth = transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n } else {\r\n formattedMonth = transliteratedMonths[this.getJewishMonth() - 1];\r\n }\r\n\r\n return `${this.getJewishDayOfMonth()} ${formattedMonth}, ${this.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates\r\n * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class\r\n * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n *
\r\n   * \r\n   *     Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n   *     cal.add(Calendar.MONTH, 3); // add 3 Gregorian months\r\n   *     jewishDate.setDate(cal); // set the updated calendar back to this class\r\n   * \r\n   * 
\r\n *\r\n * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}\r\n * @param amount the positive amount to move forward\r\n * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}\r\n * or {@link Calendar#YEAR} or if the amount is less than 1\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public forward(field: number, amount: number): void {\r\n if (![Calendar.DATE, Calendar.MONTH, Calendar.YEAR].includes(field)) {\r\n throw new IllegalArgumentException('Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.');\r\n }\r\n if (amount < 1) {\r\n throw new IllegalArgumentException('JewishDate.forward() does not support amounts less than 1. See JewishDate.back()');\r\n }\r\n if (field === Calendar.DATE) {\r\n this.date = this.date.add({ days: amount })\r\n } else if (field === Calendar.MONTH) {\r\n this.date = this.date.add({ months: amount })\r\n } else if (field === Calendar.YEAR) {\r\n this.date = this.date.add({ years: amount })\r\n }\r\n }\r\n\r\n /**\r\n * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not\r\n * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such\r\n * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or\r\n * {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n *
\r\n   * \r\n   *     Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n   *     cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months\r\n   *     jewishDate.setDate(cal); // set the updated calendar back to this class\r\n   * \r\n   * 
\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public back(): void {\r\n this.date = this.date.subtract({ days: 1 })\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(object: JewishDate): boolean {\r\n return (object instanceof JewishDate && Temporal.PlainDate.compare(this.date, object.getDate()) == 0);\r\n }\r\n\r\n /**\r\n * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this\r\n * date is \"less than\" (before) the date, greater than 0 if this date is \"greater than\" (after) the date, or 0 if\r\n * they are equal.\r\n */\r\n public compareTo(jewishDate: JewishDate): number {\r\n return Temporal.PlainDate.compare(this.date, jewishDate.getDate());\r\n }\r\n\r\n /**\r\n * Returns the Gregorian month (between 0-11).\r\n *\r\n * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.\r\n */\r\n public getGregorianMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").month - 1;\r\n }\r\n\r\n /**\r\n * Returns the Gregorian day of the month.\r\n *\r\n * @return the Gregorian day of the mont\r\n */\r\n public getGregorianDayOfMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").day;\r\n }\r\n\r\n /**\r\n * Returns the Gregotian year.\r\n *\r\n * @return the Gregorian year\r\n */\r\n public getGregorianYear(): number {\r\n return this.date.withCalendar(\"iso8601\").year;\r\n }\r\n\r\n /**\r\n * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to\r\n * 13 for Adar II\r\n *\r\n * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and\r\n * goes to 13 for Adar II\r\n */\r\n public getJewishMonth(): number {\r\n let hebCal = this.date.withCalendar(\"hebrew\");\r\n\r\n let cutOffNum = 6;\r\n if (hebCal.monthsInYear == 13)\r\n ++cutOffNum;\r\n\r\n if (hebCal.month <= cutOffNum)\r\n return hebCal.month + 6;\r\n else\r\n return hebCal.month - cutOffNum;\r\n }\r\n\r\n /**\r\n * Returns the Jewish day of month.\r\n *\r\n * @return the Jewish day of the month\r\n */\r\n public getJewishDayOfMonth(): number {\r\n return this.date.withCalendar(\"hebrew\").day;\r\n }\r\n\r\n /**\r\n * Returns the Jewish year.\r\n *\r\n * @return the Jewish year\r\n */\r\n public getJewishYear(): number {\r\n return this.date.withCalendar(\"hebrew\").year;\r\n }\r\n\r\n /**\r\n * Returns the day of the week as a number between 1-7.\r\n *\r\n * @return the day of the week as a number between 1-7.\r\n */\r\n public getDayOfWeek(): 1|2|3|4|5|6|7 {\r\n let dayOfWeek = this.date.dayOfWeek + 1;\r\n if (dayOfWeek == 8)\r\n dayOfWeek = 1;\r\n // @ts-ignore\r\n return dayOfWeek;\r\n }\r\n\r\n /**\r\n * Sets the Gregorian month.\r\n *\r\n * @param month\r\n * the Gregorian month\r\n *\r\n * @throws IllegalArgumentException\r\n * if a month < 0 or > 11 is passed in\r\n */\r\n public setGregorianMonth(month: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ month: month + 1 })\r\n }\r\n\r\n /**\r\n * sets the Gregorian year.\r\n *\r\n * @param year\r\n * the Gregorian year.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1 is passed in\r\n */\r\n public setGregorianYear(year: number): void {\r\n JewishDate.validateGregorianYear(year);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ year })\r\n }\r\n\r\n /**\r\n * sets the Gregorian Day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Gregorian Day of month.\r\n * @throws IllegalArgumentException\r\n * if the day of month of < 1 is passed in\r\n */\r\n public setGregorianDayOfMonth(dayOfMonth: number): void {\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ day: dayOfMonth })\r\n }\r\n\r\n /**\r\n * sets the Jewish month.\r\n *\r\n * @param month\r\n * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan\r\n * and goes to 13 for Adar II\r\n * @throws IllegalArgumentException\r\n * if a month < 1 or > 12 (or 13 on a leap year) is passed in\r\n */\r\n public setJewishMonth(month: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(hebrewCalendar.year, month, hebrewCalendar.day);\r\n }\r\n\r\n /**\r\n * sets the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @throws IllegalArgumentException\r\n * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day\r\n * previously set are < 18 Teves (preior to Jan 1, 1 AD)\r\n */\r\n public setJewishYear(year: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(year, this.getJewishMonth(), hebrewCalendar.day);\r\n\r\n this.date = this.date.withCalendar(\"hebrew\").with({ year }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * sets the Jewish day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Jewish day of month\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30 is passed in\r\n */\r\n public setJewishDayOfMonth(dayOfMonth: number): void {\r\n this.date = this.date.withCalendar(\"hebrew\").with({ day: dayOfMonth }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n *\r\n * @see Object#clone()\r\n */\r\n public clone(): JewishDate {\r\n const clone: JewishDate = new JewishDate(this.date);\r\n clone.setMoladHours(this.moladHours);\r\n clone.setMoladMinutes(this.moladMinutes);\r\n clone.setMoladChalakim(this.moladChalakim);\r\n\r\n return clone;\r\n }\r\n}\r\n\r\nexport function rangeDates(start: Temporal.PlainDate, middle:Temporal.PlainDate, end: Temporal.PlainDate, inclusive=true) {\r\n const acceptedValues = [1];\r\n if (inclusive)\r\n acceptedValues.push(0);\r\n\r\n return acceptedValues.includes(Temporal.PlainDate.compare(middle, start)) && acceptedValues.includes(Temporal.PlainDate.compare(end, middle))\r\n};", "/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport abstract class Daf {\r\n /**\r\n * {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.\r\n */\r\n private masechtaNumber: number;\r\n\r\n /**\r\n * See {@link #getDaf()} and {@link #setDaf(int)}.\r\n */\r\n private daf: number;\r\n\r\n /**\r\n * Gets the masechta number of the currently set Daf.\r\n * @return the masechtaNumber\r\n * @see #setMasechtaNumber(int)\r\n */\r\n public getMasechtaNumber(): number {\r\n return this.masechtaNumber;\r\n }\r\n\r\n /**\r\n * Set the masechta number in the order of the Daf Yomi.\r\n *\r\n * @param masechtaNumber\r\n * the masechta number in the order of the Daf Yomi to set.\r\n */\r\n public setMasechtaNumber(masechtaNumber: number): void {\r\n this.masechtaNumber = masechtaNumber;\r\n }\r\n\r\n /**\r\n * Constructor that creates a Daf setting the {@link #setMasechtaNumber(int) masechta number} and\r\n\t * {@link #setDaf(int) daf number}.\r\n\t * \r\n\t * @param masechtaNumber the masechta number in the order of the Daf Yomi to set as the current masechta.\r\n\t * @param daf the daf (page) number to set.\r\n */\r\n constructor(masechtaNumber: number, daf: number) {\r\n this.masechtaNumber = masechtaNumber;\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the daf (page) number of the Daf Yomi.\r\n\t * @return the daf (page) number of the Daf Yomi.\r\n */\r\n public getDaf(): number {\r\n return this.daf;\r\n }\r\n\r\n /**\r\n * Sets the daf (page) number of the Daf Yomi.\r\n\t * @param daf the daf (page) number.\r\n */\r\n public setDaf(daf: number): void {\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public abstract getMasechtaTransliterated(): string;\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public abstract getMasechta(): string;\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Daf Yomi Bavli page (daf) for a given date. To calculate Daf Yomi Yerushalmi\r\n * use the {@link YerushalmiYomiCalculator}. The library may cover Mishna Yomi etc. at some point in the future.\r\n *\r\n * @author © Bob Newell (original C code)\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n * @version 0.0.1\r\n */\r\nexport class YomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Bavli cycle of September 11, 1923 / Rosh Hashana 5684.\r\n */\r\n private static readonly dafYomiStartDate: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1923,\r\n month: Calendar.SEPTEMBER + 1,\r\n day: 11,\r\n });\r\n\r\n /** The start date of the first Daf Yomi Bavli cycle in the Julian calendar. Used internally for claculations. */\r\n private static readonly dafYomiJulianStartDay: number = YomiCalculator.getJulianDay(YomiCalculator.dafYomiStartDate);\r\n\r\n /**\r\n * The date that the pagination for the Daf Yomi Maseches Shekalim changed to use the commonly used Vilna\r\n * Shas pagination from the no longer commonly available Zhitomir / Slavuta Shas used by Rabbi Meir Shapiro.\r\n */\r\n private static readonly shekalimChangeDate: Temporal.PlainDate = Temporal.PlainDate.from({ year: 1975, month: Calendar.JUNE + 1, day: 24 });\r\n\r\n /** The Julian date that the cycle for Shekalim changed.\r\n * @see #getDafYomiBavli(JewishCalendar) for details.\r\n */\r\n private static readonly shekalimJulianChangeDay: number = YomiCalculator.getJulianDay(YomiCalculator.shekalimChangeDate);\r\n\r\n /**\r\n * Returns the Daf Yomi Bavli {@link DafBavliYomi} for a given date. The first Daf Yomi cycle\r\n * started on Rosh Hashana 5684 (September 11, 1923) and calculations prior to this date will result in an\r\n * IllegalArgumentException thrown. For historical calculations (supported by this method), it is important to note\r\n * that a change in length of the cycle was instituted starting in the eighth Daf Yomi cycle beginning on June 24,\r\n * 1975. The Daf Yomi Bavli cycle has a single masechta of the Talmud Yerushalmi - Shekalim as part of the cycle.\r\n * Unlike the Bavli where the number of daf per masechta was standardized since the original Bomberg Edition published from 1520 - 1523, there is no\r\n * uniform page length in the Yerushalmi. The early cycles had the Yerushalmi Shekalim length of 13 days following the\r\n * Slavuta/Zhytomyr\r\n * Shas used by Rabbi Meir Shapiro. With the start of the eighth Daf Yomi\r\n * cycle beginning on June 24, 1975 the length of the Yerushalmi Shekalim was changed from 13 to 22 daf to follow\r\n * the Vilna Shas that is in common use today.\r\n *\r\n * @param calendar\r\n * the calendar date for calculation\r\n * @return the {@link DafBavliYomi}.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the September 11, 1923 start date of the first Daf Yomi cycle\r\n */\r\n public static getDafYomiBavli(calendar: JewishDate): DafBavliYomi {\r\n /*\r\n * The number of daf per masechta. Since the number of blatt in Shekalim changed on the 8th Daf Yomi cycle\r\n * beginning on June 24, 1975 from 13 to 22, the actual calculation for blattPerMasechta[4] will later be\r\n * adjusted based on the cycle.\r\n */\r\n const blattPerMasechta: number[] = [64, 157, 105, 121, 22, 88, 56, 40, 35, 31, 32, 29, 27, 122, 112, 91, 66, 49, 90, 82,\r\n 119, 119, 176, 113, 24, 49, 76, 14, 120, 110, 142, 61, 34, 34, 28, 22, 4, 9, 5, 73];\r\n\r\n const date: Temporal.PlainDate = calendar.getDate();\r\n\r\n let dafYomi: DafBavliYomi;\r\n const julianDay: number = this.getJulianDay(date);\r\n let cycleNo: number = 0;\r\n let dafNo: number = 0;\r\n if (Temporal.PlainDate.compare(date,YomiCalculator.dafYomiStartDate) == -1) {\r\n // TODO: should we return a null or throw an IllegalArgumentException?\r\n throw new IllegalArgumentException(`${calendar} is prior to organized Daf Yomi Bavli cycles that started on ${YomiCalculator.dafYomiStartDate}`);\r\n }\r\n if (Temporal.PlainDate.compare(date, YomiCalculator.shekalimChangeDate) == 1) {\r\n cycleNo = 8 + ((julianDay - YomiCalculator.shekalimJulianChangeDay) / 2711);\r\n dafNo = ((julianDay - YomiCalculator.shekalimJulianChangeDay) % 2711);\r\n } else {\r\n cycleNo = 1 + ((julianDay - YomiCalculator.dafYomiJulianStartDay) / 2702);\r\n dafNo = ((julianDay - YomiCalculator.dafYomiJulianStartDay) % 2702);\r\n }\r\n\r\n let total: number = 0;\r\n let masechta: number = -1;\r\n let blatt: number = 0;\r\n\r\n /* Fix Shekalim for old cycles. */\r\n if (cycleNo <= 7) {\r\n blattPerMasechta[4] = 13;\r\n } else {\r\n blattPerMasechta[4] = 22; // correct any change that may have been changed from a prior calculation\r\n }\r\n /* Finally find the daf. */\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const blattInMasechta of blattPerMasechta) {\r\n masechta++;\r\n total = total + blattInMasechta - 1;\r\n if (dafNo < total) {\r\n blatt = 1 + blattInMasechta - (total - dafNo);\r\n /* Fiddle with the weird ones near the end. */\r\n if (masechta === 36) {\r\n blatt += 21;\r\n } else if (masechta === 37) {\r\n blatt += 24;\r\n } else if (masechta === 38) {\r\n blatt += 32;\r\n }\r\n dafYomi = new DafBavliYomi(masechta, blatt);\r\n break;\r\n }\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Date.\r\n *\r\n * @param date\r\n * The Java Date\r\n * @return the Julian day number corresponding to the date\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = 2 - a + Math.trunc(a / 4);\r\n return Math.trunc(Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5);\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafBavliYomi extends Daf {\r\n /**\r\n * See {@link #getMasechtaTransliterated()} and {@link #setMasechtaTransliterated(String[])}.\r\n */\r\n private static masechtosBavliTransliterated: string[] = ['Berachos', 'Shabbos', 'Eruvin', 'Pesachim', 'Shekalim',\r\n 'Yoma', 'Sukkah', 'Beitzah', 'Rosh Hashana', 'Taanis', 'Megillah', 'Moed Katan', 'Chagigah', 'Yevamos',\r\n 'Kesubos', 'Nedarim', 'Nazir', 'Sotah', 'Gitin', 'Kiddushin', 'Bava Kamma', 'Bava Metzia', 'Bava Basra',\r\n 'Sanhedrin', 'Makkos', 'Shevuos', 'Avodah Zarah', 'Horiyos', 'Zevachim', 'Menachos', 'Chullin', 'Bechoros',\r\n 'Arachin', 'Temurah', 'Kerisos', 'Meilah', 'Kinnim', 'Tamid', 'Midos', 'Niddah'];\r\n\r\n /**\r\n * See {@link #getMasechta()}.\r\n */\r\n private static readonly masechtosBavli: string[] = ['\\u05D1\\u05E8\\u05DB\\u05D5\\u05EA', '\\u05E9\\u05D1\\u05EA',\r\n '\\u05E2\\u05D9\\u05E8\\u05D5\\u05D1\\u05D9\\u05DF', '\\u05E4\\u05E1\\u05D7\\u05D9\\u05DD',\r\n '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD', '\\u05D9\\u05D5\\u05DE\\u05D0', '\\u05E1\\u05D5\\u05DB\\u05D4',\r\n '\\u05D1\\u05D9\\u05E6\\u05D4', '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA', '\\u05DE\\u05D2\\u05D9\\u05DC\\u05D4',\r\n '\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E7\\u05D8\\u05DF', '\\u05D7\\u05D2\\u05D9\\u05D2\\u05D4',\r\n '\\u05D9\\u05D1\\u05DE\\u05D5\\u05EA', '\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA', '\\u05E0\\u05D3\\u05E8\\u05D9\\u05DD',\r\n '\\u05E0\\u05D6\\u05D9\\u05E8', '\\u05E1\\u05D5\\u05D8\\u05D4', '\\u05D2\\u05D9\\u05D8\\u05D9\\u05DF',\r\n '\\u05E7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\\u05DF', '\\u05D1\\u05D1\\u05D0 \\u05E7\\u05DE\\u05D0',\r\n '\\u05D1\\u05D1\\u05D0 \\u05DE\\u05E6\\u05D9\\u05E2\\u05D0', '\\u05D1\\u05D1\\u05D0 \\u05D1\\u05EA\\u05E8\\u05D0',\r\n '\\u05E1\\u05E0\\u05D4\\u05D3\\u05E8\\u05D9\\u05DF', '\\u05DE\\u05DB\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA', '\\u05E2\\u05D1\\u05D5\\u05D3\\u05D4 \\u05D6\\u05E8\\u05D4',\r\n '\\u05D4\\u05D5\\u05E8\\u05D9\\u05D5\\u05EA', '\\u05D6\\u05D1\\u05D7\\u05D9\\u05DD', '\\u05DE\\u05E0\\u05D7\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC\\u05D9\\u05DF', '\\u05D1\\u05DB\\u05D5\\u05E8\\u05D5\\u05EA', '\\u05E2\\u05E8\\u05DB\\u05D9\\u05DF',\r\n '\\u05EA\\u05DE\\u05D5\\u05E8\\u05D4', '\\u05DB\\u05E8\\u05D9\\u05EA\\u05D5\\u05EA', '\\u05DE\\u05E2\\u05D9\\u05DC\\u05D4',\r\n '\\u05E7\\u05D9\\u05E0\\u05D9\\u05DD', '\\u05EA\\u05DE\\u05D9\\u05D3', '\\u05DE\\u05D9\\u05D3\\u05D5\\u05EA',\r\n '\\u05E0\\u05D3\\u05D4'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi. The list of mashechtos\r\n\t * is: Berachos, Shabbos, Eruvin, Pesachim, Shekalim, Yoma, Sukkah, Beitzah, Rosh Hashana, Taanis, Megillah, Moed Katan,\r\n\t * Chagigah, Yevamos, Kesubos, Nedarim, Nazir, Sotah, Gitin, Kiddushin, Bava Kamma, Bava Metzia, Bava Basra, Sanhedrin,\r\n\t * Makkos, Shevuos, Avodah Zarah, Horiyos, Zevachim, Menachos, Chullin, Bechoros, Arachin, Temurah, Kerisos, Meilah,\r\n\t * Kinnim, Tamid, Midos and Niddah.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafBavliYomi.masechtosBavliTransliterated[this.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars.\r\n\t * The default values use Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set.\r\n * @see #getMasechtaTransliterated()\r\n */\r\n public static setMasechtaTransliterated(masechtosBavliTransliterated: string[]): void {\r\n DafBavliYomi.masechtosBavliTransliterated = masechtosBavliTransliterated;\r\n }\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew. The list is in the following format
\r\n * [\"ברכות\",\r\n * \"שבת\", \"עירובין\",\r\n * \"פסחים\", \"שקלים\", \"יומא\",\r\n * \"סוכה\", \"ביצה\", \"ראש השנה\",\r\n * \"תענית\", \"מגילה\", \"מועד\r\n * קטן\", \"חגיגה\", \"יבמות\",\r\n * \"כתובות\", \"נדרים\",\"נזיר\",\r\n * \"סוטה\", \"גיטין\", \"קידושין\",\r\n * \"בבא קמא\", \"בבא מציעא\",\r\n * \"בבא בתרא\", \"סנהדרין\",\r\n * \"מכות\", \"שבועות\", \"עבודה\r\n * זרה\", \"הוריות\", \"זבחים\",\r\n * \"מנחות\", \"חולין\", \"בכורות\",\r\n * \"ערכין\", \"תמורה\", \"כריתות\",\r\n * \"מעילה\", \"קינים\", \"תמיד\",\r\n * \"מידות\", \"נדה\"].\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafBavliYomi.masechtosBavli[this.getMasechtaNumber()];\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate, rangeDates } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Talmud Yerusalmi Daf Yomi page ({@link DafYomiYerushalmi}) for the a given date.\r\n *\r\n * @author © elihaidv\r\n * @author © Eliyahu Hershfeld 2017 - 2019\r\n */\r\nexport class YerushalmiYomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Yerushalmi cycle of February 2, 1980 / 15 Shevat, 5740.\r\n */\r\n private static readonly DAF_YOMI_START_DAY: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1980,\r\n month: Calendar.FEBRUARY + 1,\r\n day: 2,\r\n });\r\n\r\n /** The number of pages in the Talmud Yerushalmi. */\r\n private static readonly WHOLE_SHAS_DAFS: number = 1554;\r\n\r\n /** The number of pages per masechta (tractate). */\r\n private static readonly BLATT_PER_MASECHTA: number[] = [68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22,\r\n 22, 42, 26, 26, 33, 34, 22, 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13];\r\n\r\n /**\r\n * Returns the Daf Yomi\r\n * Yerusalmi page ({@link DafYomiYerushalmi}) for a given date.\r\n * The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat) 5740 (February, 2, 1980) and calculations\r\n * prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or\r\n * Yom Kippur.\r\n *\r\n * @param jewishCalendar\r\n * the calendar date for calculation\r\n * @return the {@link DafYomiYerushalmi} or null if the date is on Tisha B'Av or Yom Kippur.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the February 2, 1980, the start date of the first Daf Yomi Yerushalmi cycle\r\n */\r\n public static getDafYomiYerushalmi(jewishCalendar: JewishDate) {\r\n let nextCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n let prevCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n const requested: Temporal.PlainDate = jewishCalendar.getDate();\r\n let masechta: number = 0;\r\n let dafYomi: DafYomiYerushalmi;\r\n\r\n const hebrewDate = jewishCalendar.getDate().withCalendar(\"hebrew\");\r\n if (hebrewDate.month == 1 && hebrewDate.day == 10) {\r\n return null;\r\n }\r\n\r\n if (jewishCalendar.getJewishMonth() == JewishDate.AV) {\r\n if ((hebrewDate.day == 9 && hebrewDate.dayOfWeek !== 6) || (hebrewDate.day == 10 && hebrewDate.dayOfWeek == 7))\r\n return null;\r\n }\r\n\r\n if (Temporal.PlainDate.compare(requested, YerushalmiYomiCalculator.DAF_YOMI_START_DAY) == -1) {\r\n throw new IllegalArgumentException(`${requested} is prior to organized Daf Yomi Yerushalmi cycles that started on ${YerushalmiYomiCalculator.DAF_YOMI_START_DAY}`);\r\n }\r\n\r\n // Start to calculate current cycle. Initialize the start day\r\n // nextCycle = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n\r\n // Go cycle by cycle, until we get the next cycle\r\n while (Temporal.PlainDate.compare(nextCycle, requested) == -1) {\r\n prevCycle = nextCycle;\r\n\r\n // Adds the number of whole shas dafs, and then the number of days that not have daf.\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.WHOLE_SHAS_DAFS });\r\n // This needs to be a separate step\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, nextCycle) });\r\n }\r\n\r\n // Get the number of days from cycle start until request.\r\n const dafNo: number = requested.since(prevCycle).total({ unit: 'days' });\r\n\r\n // Get the number of special days to subtract\r\n const specialDays: number = YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, requested);\r\n let total: number = dafNo - specialDays;\r\n\r\n // Finally find the daf.\r\n for (let i: number = 0; i < YerushalmiYomiCalculator.BLATT_PER_MASECHTA.length; i++) {\r\n if (total <= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i]) {\r\n dafYomi = new DafYomiYerushalmi(masechta, total + 1);\r\n break;\r\n }\r\n total -= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i];\r\n masechta++;\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the number of special days (Yom Kippur and Tisha B'Av) on which there is no daf, between the two given dates\r\n *\r\n * @param start - start date to calculate\r\n * @param end - end date to calculate\r\n * @return the number of special days\r\n */\r\n private static getNumOfSpecialDays(start: Temporal.PlainDate, end: Temporal.PlainDate): number {\r\n // Find the start and end Jewish years\r\n const jewishStartYear: number = new JewishDate(start).getJewishYear();\r\n const jewishEndYear: number = new JewishDate(end).getJewishYear();\r\n\r\n // Value to return\r\n let specialDays: number = 0;\r\n\r\n // Instant of special dates\r\n const yomKippur: JewishDate = new JewishDate(jewishStartYear, 7, 10);\r\n const tishaBeav: JewishDate = new JewishDate(jewishStartYear, 5, 9);\r\n\r\n // Go over the years and find special dates\r\n for (let i: number = jewishStartYear; i <= jewishEndYear; i++) {\r\n yomKippur.setJewishYear(i);\r\n tishaBeav.setJewishYear(i);\r\n\r\n if (rangeDates(start, yomKippur.getDate(), end)) specialDays++;\r\n if (rangeDates(start, tishaBeav.getDate(), end)) specialDays++;\r\n }\r\n\r\n return specialDays;\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafYomiYerushalmi extends Daf {\r\n /**\r\n * See {@link #getYerushalmiMasechtaTransliterated()}.\r\n */\r\n private static masechtosYerushalmiTransliterated: string[] = ['Berachos', \"Pe'ah\", 'Demai', 'Kilayim', \"Shevi'is\",\r\n 'Terumos', \"Ma'asros\", \"Ma'aser Sheni\", 'Chalah', 'Orlah', 'Bikurim', 'Shabbos', 'Eruvin', 'Pesachim',\r\n 'Beitzah', 'Rosh Hashanah', 'Yoma', 'Sukah', \"Ta'anis\", 'Shekalim', 'Megilah', 'Chagigah', 'Moed Katan',\r\n 'Yevamos', 'Kesuvos', 'Sotah', 'Nedarim', 'Nazir', 'Gitin', 'Kidushin', 'Bava Kama', 'Bava Metzia',\r\n 'Bava Basra', 'Sanhedrin', 'Makos', 'Shevuos', 'Avodah Zarah', 'Horayos', 'Nidah', 'No Daf Today' ];\r\n\r\n /**\r\n * See {@link #getYerushalmiMasechta()}.\r\n */\r\n private static readonly masechtosYerushalmi: string[] = ['\\u05d1\\u05e8\\u05db\\u05d5\\u05ea', '\\u05e4\\u05d9\\u05d0\\u05d4',\r\n '\\u05d3\\u05de\\u05d0\\u05d9', '\\u05db\\u05dc\\u05d0\\u05d9\\u05d9\\u05dd', '\\u05e9\\u05d1\\u05d9\\u05e2\\u05d9\\u05ea',\r\n '\\u05ea\\u05e8\\u05d5\\u05de\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8 \\u05e9\\u05e0\\u05d9',\r\n '\\u05d7\\u05dc\\u05d4', '\\u05e2\\u05d5\\u05e8\\u05dc\\u05d4', '\\u05d1\\u05d9\\u05db\\u05d5\\u05e8\\u05d9\\u05dd',\r\n '\\u05e9\\u05d1\\u05ea', '\\u05e2\\u05d9\\u05e8\\u05d5\\u05d1\\u05d9\\u05df', '\\u05e4\\u05e1\\u05d7\\u05d9\\u05dd',\r\n '\\u05d1\\u05d9\\u05e6\\u05d4', '\\u05e8\\u05d0\\u05e9 \\u05d4\\u05e9\\u05e0\\u05d4', '\\u05d9\\u05d5\\u05de\\u05d0',\r\n '\\u05e1\\u05d5\\u05db\\u05d4', '\\u05ea\\u05e2\\u05e0\\u05d9\\u05ea', '\\u05e9\\u05e7\\u05dc\\u05d9\\u05dd', '\\u05de\\u05d2\\u05d9\\u05dc\\u05d4',\r\n '\\u05d7\\u05d2\\u05d9\\u05d2\\u05d4', '\\u05de\\u05d5\\u05e2\\u05d3 \\u05e7\\u05d8\\u05df', '\\u05d9\\u05d1\\u05de\\u05d5\\u05ea',\r\n '\\u05db\\u05ea\\u05d5\\u05d1\\u05d5\\u05ea', '\\u05e1\\u05d5\\u05d8\\u05d4', '\\u05e0\\u05d3\\u05e8\\u05d9\\u05dd', '\\u05e0\\u05d6\\u05d9\\u05e8',\r\n '\\u05d2\\u05d9\\u05d8\\u05d9\\u05df', '\\u05e7\\u05d9\\u05d3\\u05d5\\u05e9\\u05d9\\u05df', '\\u05d1\\u05d1\\u05d0 \\u05e7\\u05de\\u05d0',\r\n '\\u05d1\\u05d1\\u05d0 \\u05de\\u05e6\\u05d9\\u05e2\\u05d0', '\\u05d1\\u05d1\\u05d0 \\u05d1\\u05ea\\u05e8\\u05d0',\r\n '\\u05e9\\u05d1\\u05d5\\u05e2\\u05d5\\u05ea', '\\u05de\\u05db\\u05d5\\u05ea', '\\u05e1\\u05e0\\u05d4\\u05d3\\u05e8\\u05d9\\u05df',\r\n '\\u05e2\\u05d1\\u05d5\\u05d3\\u05d4 \\u05d6\\u05e8\\u05d4', '\\u05d4\\u05d5\\u05e8\\u05d9\\u05d5\\u05ea', '\\u05e0\\u05d9\\u05d3\\u05d4',\r\n '\\u05d0\\u05d9\\u05df \\u05d3\\u05e3 \\u05d4\\u05d9\\u05d5\\u05dd'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi in Yerushalmi. The list of\r\n\t * mashechtos is:\r\n\t * Berachos, Pe'ah, Demai, Kilayim, Shevi'is, Terumos, Ma'asros, Ma'aser Sheni, Chalah, Orlah, Bikurim, \r\n\t * Shabbos, Eruvin, Pesachim, Beitzah, Rosh Hashanah, Yoma, Sukah, Ta'anis, Shekalim, Megilah, Chagigah, \r\n\t * Moed Katan, Yevamos, Kesuvos, Sotah, Nedarim, Nazir, Gitin, Kidushin, Bava Kama, Bava Metzia,\r\n\t * Bava Basra, Shevuos, Makos, Sanhedrin, Avodah Zarah, Horayos, Nidah and No Daf Today.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmiTransliterated[super.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set.\r\n */\r\n public static setMasechtaTransliterated(masechtosYerushalmiTransliterated: string[]): void {\r\n DafYomiYerushalmi.masechtosYerushalmiTransliterated = masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtosTransliterated(): string[] {\r\n return this.masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos.\r\n\t * \r\n\t * @return the array of Hebrew masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtos():string[] {\r\n return this.masechtosYerushalmi;\r\n }\r\n\r\n /**\r\n * Returns the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n\t * \r\n\t * @return the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmi[this.getMasechtaNumber()];\r\n }\r\n}", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-4.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.1-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.11-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.6-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.4-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.14-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.3-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.7-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"3-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "import { JewishDate } from \"../JewishDate.ts\";\r\nimport ccyNl from \"./dataSets/ccy-nonleap.json\" assert { type: \"json\" }\r\nimport ccyL from \"./dataSets/ccy-leap.json\" assert { type: \"json\" }\r\n\r\nexport class ChafetzChayimYomiCalculator {\r\n\tpublic static getChafetzChayimYomi(jewishCalendar: JewishDate) {\r\n\t\tconst hebrewDateToday = jewishCalendar.getDate().withCalendar(\"hebrew\")\r\n\r\n\t\tconst ccCal = (jewishCalendar.isJewishLeapYear() ? ccyL : ccyNl);\r\n\t\tconst limudToday = ccCal\r\n\t\t\t.find(limud => limud.days\r\n\t\t\t\t.find(dateObj => hebrewDateToday.equals(hebrewDateToday.withCalendar(\"hebrew\").with(dateObj)))\r\n\t\t\t)\r\n\r\n\t\treturn limudToday;\r\n\t}\r\n}", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from '../util/GeoLocation.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { DafBavliYomi, YomiCalculator } from './limud/YomiCalculator.ts';\r\nimport { DafYomiYerushalmi, YerushalmiYomiCalculator } from './limud/YerushalmiYomiCalculator.ts';\r\nimport { ChafetzChayimYomiCalculator } from './limud/ChafetzChayimYomiCalculator.ts';\r\n\r\nconst { FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * List of parshiyos or special Shabasos. {@link #NONE} indicates a week without a parsha, while the enum for\r\n * the parsha of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special Shabasos of\r\n * Shekalim, Zachor, Para, Hachodesh, as well as Shabbos Shuva, Shira, Hagadol, Chazon and Nachamu are also represented in this collection\r\n * of parshiyos.\r\n * @see #getSpecialShabbos()\r\n * @see #getParshah()\r\n */\r\nexport enum Parsha {\r\n /** NONE - A week without any parsha such as Shabbos Chol Hamoed */\r\n NONE,\r\n BERESHIS, NOACH, LECH_LECHA, VAYERA, CHAYEI_SARA, TOLDOS, VAYETZEI,\r\n VAYISHLACH, VAYESHEV, MIKETZ, VAYIGASH, VAYECHI, SHEMOS, VAERA, BO,\r\n BESHALACH, YISRO, MISHPATIM, TERUMAH, TETZAVEH, KI_SISA, VAYAKHEL,\r\n PEKUDEI, VAYIKRA, TZAV, SHMINI, TAZRIA, METZORA, ACHREI_MOS, KEDOSHIM,\r\n EMOR, BEHAR, BECHUKOSAI, BAMIDBAR, NASSO, BEHAALOSCHA, SHLACH, KORACH,\r\n CHUKAS, BALAK, PINCHAS, MATOS, MASEI, DEVARIM, VAESCHANAN, EIKEV,\r\n REEH, SHOFTIM, KI_SEITZEI, KI_SAVO, NITZAVIM, VAYEILECH, HAAZINU,\r\n VZOS_HABERACHA,\r\n /** The double parsha of Vayakhel & Peudei */\r\n VAYAKHEL_PEKUDEI,\r\n /** The double parsha of Tazria & Metzora */\r\n TAZRIA_METZORA,\r\n /** The double parsha of Achrei Mos & Kedoshim */\r\n ACHREI_MOS_KEDOSHIM,\r\n /** The double parsha of Behar & Bechukosai */\r\n BEHAR_BECHUKOSAI,\r\n /** The double parsha of Chukas & Balak */\r\n CHUKAS_BALAK,\r\n /** The double parsha of Matos & Masei */\r\n MATOS_MASEI,\r\n /** The double parsha of Nitzavim & Vayelech */\r\n NITZAVIM_VAYEILECH,\r\n /** The special parsha of Shekalim */\r\n SHKALIM,\r\n /** The special parsha of Zachor */\r\n ZACHOR,\r\n /** The special parsha of Para */\r\n PARA,\r\n /** The special parsha of Hachodesh */\r\n HACHODESH,\r\n SHUVA,\r\n SHIRA,\r\n HAGADOL,\r\n CHAZON,\r\n NACHAMU,\r\n}\r\n\r\n/**\r\n * The JewishCalendar extends the JewishDate class and adds calendar methods.\r\n *\r\n * This open source Java code was originally ported by Avrom Finkelstien\r\n * from his C++ code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements\r\n * and some bug fixing. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel\r\n * scheme. The default is the outside Israel scheme.\r\n * The parsha code was ported by Y. Paritcher from his libzmanim code.\r\n *\r\n * TODO: Some do not belong in this class, but here is a partial list of what should still be implemented in some form:\r\n *
    \r\n *
  1. Add Isru Chag
  2. \r\n *
  3. Mishna yomis etc
  4. \r\n *
\r\n *\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Y. Paritcher 2019\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class JewishCalendar extends JewishDate {\r\n /** The 14th day of Nisan, the day before of Pesach (Passover). */\r\n public static readonly EREV_PESACH: number = 0;\r\n\r\n /** The holiday of Pesach (Passover) on the 15th (and 16th out of Israel) day of Nisan. */\r\n public static readonly PESACH: number = 1;\r\n\r\n /** Chol Hamoed (interim days) of Pesach (Passover) */\r\n public static readonly CHOL_HAMOED_PESACH: number = 2;\r\n\r\n /** Pesach Sheni, the 14th day of Iyar, a minor holiday. */\r\n public static readonly PESACH_SHENI: number = 3;\r\n\r\n /** Erev Shavuos (the day before Shavuos), the 5th of Sivan */\r\n public static readonly EREV_SHAVUOS: number = 4;\r\n\r\n /** Shavuos (Pentecost), the 6th of Sivan */\r\n public static readonly SHAVUOS: number = 5;\r\n\r\n /** The fast of the 17th day of Tamuz */\r\n public static readonly SEVENTEEN_OF_TAMMUZ: number = 6;\r\n\r\n /** The fast of the 9th of Av */\r\n public static readonly TISHA_BEAV: number = 7;\r\n\r\n /** The 15th day of Av, a minor holiday */\r\n public static readonly TU_BEAV: number = 8;\r\n\r\n /** Erev Rosh Hashana (the day before Rosh Hashana), the 29th of Elul */\r\n public static readonly EREV_ROSH_HASHANA: number = 9;\r\n\r\n /** Rosh Hashana, the first of Tishrei. */\r\n public static readonly ROSH_HASHANA: number = 10;\r\n\r\n /** The fast of Gedalyah, the 3rd of Tishrei. */\r\n public static readonly FAST_OF_GEDALYAH: number = 11;\r\n\r\n /** The 9th day of Tishrei, the day before of Yom Kippur. */\r\n public static readonly EREV_YOM_KIPPUR: number = 12;\r\n\r\n /** The holiday of Yom Kippur, the 10th day of Tishrei */\r\n public static readonly YOM_KIPPUR: number = 13;\r\n\r\n /** The 14th day of Tishrei, the day before of Succos/Sukkos (Tabernacles). */\r\n public static readonly EREV_SUCCOS: number = 14;\r\n\r\n /** The holiday of Succos/Sukkos (Tabernacles), the 15th (and 16th out of Israel) day of Tishrei */\r\n public static readonly SUCCOS: number = 15;\r\n\r\n /** Chol Hamoed (interim days) of Succos/Sukkos (Tabernacles) */\r\n public static readonly CHOL_HAMOED_SUCCOS: number = 16;\r\n\r\n /** Hoshana Rabba, the 7th day of Succos/Sukkos that occurs on the 21st of Tishrei. */\r\n public static readonly HOSHANA_RABBA: number = 17;\r\n\r\n /** Shmini Atzeres, the 8th day of Succos/Sukkos is an independent holiday that occurs on the 22nd of Tishrei. */\r\n public static readonly SHEMINI_ATZERES: number = 18;\r\n\r\n /** Simchas Torah, the 9th day of Succos/Sukkos, or the second day of Shmini Atzeres that is celebrated\r\n * {@link #getInIsrael() out of Israel} on the 23rd of Tishrei.\r\n */\r\n public static readonly SIMCHAS_TORAH: number = 19;\r\n\r\n // public static final int EREV_CHANUKAH = 20;// probably remove this\r\n\r\n /** The holiday of Chanukah. 8 days starting on the 25th day Kislev. */\r\n public static readonly CHANUKAH: number = 21;\r\n\r\n /** The fast of the 10th day of Teves. */\r\n public static readonly TENTH_OF_TEVES: number = 22;\r\n\r\n /** Tu Bishvat on the 15th day of Shevat, a minor holiday. */\r\n public static readonly TU_BESHVAT: number = 23;\r\n\r\n /** The fast of Esther, usually on the 13th day of Adar (or Adar II on leap years). It is earlier on some years. */\r\n public static readonly FAST_OF_ESTHER: number = 24;\r\n\r\n /** The holiday of Purim on the 14th day of Adar (or Adar II on leap years). */\r\n public static readonly PURIM: number = 25;\r\n\r\n /** The holiday of Shushan Purim on the 15th day of Adar (or Adar II on leap years). */\r\n public static readonly SHUSHAN_PURIM: number = 26;\r\n\r\n /** The holiday of Purim Katan on the 14th day of Adar I on a leap year when Purim is on Adar II, a minor holiday. */\r\n public static readonly PURIM_KATAN: number = 27;\r\n\r\n /**\r\n * Rosh Chodesh, the new moon on the first day of the Jewish month, and the 30th day of the previous month in the\r\n * case of a month with 30 days.\r\n */\r\n public static readonly ROSH_CHODESH: number = 28;\r\n\r\n /** Yom HaShoah, Holocaust Remembrance Day, usually held on the 27th of Nisan. If it falls on a Friday, it is moved\r\n * to the 26th, and if it falls on a Sunday it is moved to the 28th. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_HASHOAH: number = 29;\r\n\r\n /**\r\n * Yom HaZikaron, Israeli Memorial Day, held a day before Yom Ha'atzmaut. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_HAZIKARON: number = 30;\r\n\r\n /** Yom Ha'atzmaut, Israel Independence Day, the 5th of Iyar, but if it occurs on a Friday or Saturday, the holiday is\r\n * moved back to Thursday, the 3rd of 4th of Iyar, and if it falls on a Monday, it is moved forward to Tuesday the\r\n * 6th of Iyar. A {@link #isUseModernHolidays() modern holiday}. */\r\n public static readonly YOM_HAATZMAUT: number = 31;\r\n\r\n /**\r\n * Yom Yerushalayim or Jerusalem Day, on 28 Iyar. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_YERUSHALAYIM: number = 32;\r\n\r\n /** The 33rd day of the Omer, the 18th of Iyar, a minor holiday. */\r\n public static readonly LAG_BAOMER: number = 33;\r\n\r\n /** The holiday of Purim Katan on the 15th day of Adar I on a leap year when Purim is on Adar II, a minor holiday. */\r\n public static readonly SHUSHAN_PURIM_KATAN: number = 34;\r\n\r\n /** The day following the last day of Pesach, Shavuos and Sukkos.*/\r\n public static readonly ISRU_CHAG = 35;\r\n\r\n /**\r\n\t * The day before Rosh Chodesh (moved to Thursday if Rosh Chodesh is on a Friday or Shabbos) in most months.\r\n\t * This constant is not actively in use.\r\n\t * @see #isYomKippurKatan()\r\n\t */\r\n public static readonly YOM_KIPPUR_KATAN = 36;\r\n\r\n /**\r\n\t * The Monday, Thursday and Monday after the first Shabbos after Rosh Chodesh Cheshvan and Iyar) are BeHab\r\n\t * days. This constant is not actively in use.\r\n\t * @see #isBeHaB()\r\n\t */\r\n public static readonly BEHAB = 37;\r\n\r\n /**\r\n * Is the calendar set to Israel, where some holidays have different rules.\r\n * @see #getInIsrael()\r\n * @see #setInIsrael(boolean)\r\n */\r\n private inIsrael: boolean = false;\r\n\r\n /**\r\n\t * Is the calendar set to have Purim demukafim, where Purim is celebrated on Shushan Purim.\r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n private isMukafChoma: boolean = false;\r\n\r\n /**\r\n * Is the calendar set to use modern Israeli holidays such as Yom Haatzmaut.\r\n * @see #isUseModernHolidays()\r\n * @see #setUseModernHolidays(boolean)\r\n */\r\n private useModernHolidays: boolean = false;\r\n\r\n /**\r\n * An array of parshiyos in the 17 possible combinations.\r\n */\r\n public static readonly parshalist: Parsha[][] = [\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.ACHREI_MOS, Parsha.NONE, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.ACHREI_MOS, Parsha.NONE, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n ];\r\n\r\n /**\r\n * Is this calendar set to return modern Israeli national holidays. By default this value is false. The holidays\r\n\t * are {@link #YOM_HASHOAH Yom HaShoah}, {@link #YOM_HAZIKARON Yom Hazikaron}, {@link\r\n * #YOM_HAATZMAUT Yom Ha'atzmaut} and {@link #YOM_YERUSHALAYIM Yom Yerushalayim}.\r\n * \r\n * @return the useModernHolidays true if set to return modern Israeli national holidays\r\n * \r\n * @see #setUseModernHolidays(boolean)\r\n */\r\n public isUseModernHolidays(): boolean {\r\n return this.useModernHolidays;\r\n }\r\n\r\n /**\r\n * Sets the calendar to return modern Israeli national holidays. By default this value is false. The holidays are:\r\n\t * {@link #YOM_HASHOAH Yom HaShoah}, {@link #YOM_HAZIKARON Yom Hazikaron}, {@link\r\n * #YOM_HAATZMAUT Yom Ha'atzmaut} and {@link #YOM_YERUSHALAYIM Yom Yerushalayim}.\r\n * \r\n * @param useModernHolidays\r\n * the useModernHolidays to set\r\n * \r\n * @see #isUseModernHolidays()\r\n */\r\n public setUseModernHolidays(useModernHolidays: boolean): void {\r\n this.useModernHolidays = useModernHolidays;\r\n }\r\n\r\n /**\r\n * Default constructor will set a default date to the current system date.\r\n */\r\n /*\r\n public JewishCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Date Date} parameter.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(date: Date) {\r\n super(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter.\r\n *\r\n * @param calendar\r\n * the Calendar to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(calendar: GregorianCalendar) {\r\n super(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n\r\n /*\r\n public JewishCalendar(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n super(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish date and whether in Israel\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @param inIsrael\r\n * whether in Israel. This affects Yom Tov calculations\r\n */\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number, inIsrael?: boolean);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrDateTimeOrDate?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number, inIsrael?: boolean) {\r\n // @ts-ignore\r\n super(jewishYearOrDateTimeOrDate, jewishMonth, jewishDayOfMonth);\r\n if (inIsrael) this.setInIsrael(inIsrael);\r\n }\r\n\r\n /**\r\n * Sets whether to use Israel holiday scheme or not. Default is false.\r\n *\r\n * @param inIsrael\r\n * set to true for calculations for Israel\r\n * \r\n\t * @see #getInIsrael()\r\n */\r\n public setInIsrael(inIsrael: boolean): void {\r\n this.inIsrael = inIsrael;\r\n }\r\n\r\n /**\r\n * Gets whether Israel holiday scheme is used or not. The default (if not set) is false.\r\n *\r\n * @return if the calendar is set to Israel\r\n\t * \r\n\t * @see #setInIsrael(boolean)\r\n */\r\n public getInIsrael(): boolean {\r\n return this.inIsrael;\r\n }\r\n\r\n /**\r\n\t * Returns if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @return if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public getIsMukafChoma():boolean {\r\n return this.isMukafChoma;\r\n }\r\n\r\n /**\r\n\t * Sets if the location is surrounded by a wall from the time of Yehoshua, and Shushan Purim should be\r\n\t * celebrated as opposed to regular Purim. This should be set for Yerushalayim, Shushan and other cities.\r\n\t * @param isMukafChoma is the city surrounded by a wall from the time of Yehoshua.\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t */\r\n public setIsMukafChoma(isMukafChoma:boolean):void {\r\n this.isMukafChoma = isMukafChoma;\r\n }\r\n\r\n /**\r\n * Birkas Hachamah is recited every 28 years based on\r\n * Tekufas Shmuel (Julian years) that a year is 365.25 days. The Rambam in Hilchos Kiddush Hachodesh 9:3\r\n\t * states that tekufas Nissan of year 1 was 7 days + 9 hours before molad Nissan. This is calculated as every\r\n\t * 10,227 days (28 * 365.25). \r\n\t * @return true for a day that Birkas Hachamah is recited.\r\n */\r\n public isBirkasHachamah(): boolean {\r\n // elapsed days since molad ToHu\r\n let elapsedDays: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear());\r\n // elapsed days to the current calendar date\r\n elapsedDays += Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n /* Molad Nissan year 1 was 177 days after molad tohu of Tishrei. We multiply 29.5 days * 6 months from Tishrei\r\n\t\t * to Nissan = 177. Subtract 7 days since tekufas Nissan was 7 days and 9 hours before the molad as stated in the Rambam\r\n\t\t * and we are now at 170 days. Because getJewishCalendarElapsedDays and getDaysSinceStartOfJewishYear use the value for\r\n\t\t * Rosh Hashana as 1, we have to add 1 day for a total of 171. To this add a day since the tekufah is on a Tuesday\r\n\t\t * night and we push off the bracha to Wednesday AM resulting in the 172 used in the calculation.\r\n\t\t */\r\n // 28 years of 365.25 days + the offset from molad tohu mentioned above\r\n return elapsedDays % (28 * 365.25) === 172;\r\n }\r\n\r\n /**\r\n * Return the type of year for parsha calculations. The algorithm follows the\r\n\t * Luach Arba'ah Shearim in the Tur Ohr Hachaim.\r\n\t * @return the type of year for parsha calculations.\r\n * @todo Use constants in this class.\r\n */\r\n private getParshaYearType(): number {\r\n const roshHashanah = this.getDate().withCalendar(\"hebrew\").with({ day: 1, month: 1 });\r\n if (roshHashanah.monthsInYear == 13) {\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 14;\r\n }\r\n return 6;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n }\r\n break;\r\n // GaK\r\n case 2: // Tuesday\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n case 4: // Thursday\r\n // HaCh\r\n if (this.isKislevShort()) {\r\n return 8;\r\n }\r\n\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 9;\r\n }\r\n\r\n break;\r\n case 6: // Saturday\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 10;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 16;\r\n }\r\n return 11;\r\n }\r\n\r\n break;\r\n }\r\n } else {\r\n // not a leap year\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n return 0;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n }\r\n\r\n break;\r\n case 2: // TUESDAY\r\n // GaK\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n case 4: // THURSDAY\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 3;\r\n }\r\n\r\n // HaK\r\n if (!this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 13;\r\n }\r\n return 2;\r\n }\r\n\r\n break;\r\n case 6: // SATURDAY\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 4;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n return 5;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns this week's {@link Parsha} if it is Shabbos.\r\n * returns Parsha.NONE if a weekday or if there is no parsha that week (for example Yomtov is on Shabbos)\r\n * @return the current parsha\r\n */\r\n public getParshah(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY) {\r\n return Parsha.NONE;\r\n }\r\n\r\n const yearType: number = this.getParshaYearType();\r\n const roshHashanaDayOfWeek: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) % 7;\r\n const day: number = roshHashanaDayOfWeek + Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n // negative year should be impossible, but lets cover all bases\r\n if (yearType >= 0) {\r\n return JewishCalendar.parshalist[yearType][day / 7];\r\n }\r\n\r\n // keep the compiler happy\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA,\r\n * Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).\r\n * @return one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.\r\n */\r\n public getSpecialShabbos(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY)\r\n return Parsha.NONE;\r\n\r\n if (((this.getJewishMonth() === JewishCalendar.SHEVAT && !this.isJewishLeapYear())\r\n || (this.getJewishMonth() === JewishCalendar.ADAR && this.isJewishLeapYear()))\r\n && [25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ((this.getJewishMonth() === JewishCalendar.ADAR && !this.isJewishLeapYear())\r\n || this.getJewishMonth() === JewishCalendar.ADAR_II) {\r\n if (this.getJewishDayOfMonth() === 1) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ([8, 9, 11, 13].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.ZACHOR;\r\n }\r\n\r\n if ([18, 20, 22, 23].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.PARA;\r\n }\r\n\r\n if ([25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.HACHODESH;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() === JewishCalendar.NISSAN) {\r\n if (this.getJewishDayOfMonth() == 1)\r\n return Parsha.HACHODESH;\r\n\r\n if (this.getJewishDayOfMonth() >= 8 && this.getJewishDayOfMonth() <= 14)\r\n return Parsha.HAGADOL;\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.AV) {\r\n if (this.getJewishDayOfMonth() >= 4 && this.getJewishDayOfMonth() <= 9) {\r\n return Parsha.CHAZON;\r\n }\r\n if (this.getJewishDayOfMonth() >= 10 && this.getJewishDayOfMonth() <= 16) {\r\n return Parsha.NACHAMU;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.TISHREI && this.getJewishDayOfMonth() >= 3 && this.getJewishDayOfMonth() <= 8)\r\n return Parsha.SHUVA;\r\n\r\n if (this.getParshah() == Parsha.BESHALACH)\r\n return Parsha.SHIRA;\r\n\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n\t * Returns the upcoming {@link Parsha Parsha} regardless of if it is the weekday or Shabbos (where next\r\n\t * Shabbos's Parsha will be returned. This is unlike {@link #getParshah()} that returns {@link Parsha#NONE} if\r\n\t * the date is not Shabbos. If the upcoming Shabbos is a Yom Tov and has no Parsha, the\r\n\t * following week's Parsha will be returned.\r\n\t * \r\n\t * @return the upcoming parsha.\r\n\t */\r\n\tpublic getUpcomingParshah(): Parsha {\r\n\t\tconst clone = this.clone() as JewishCalendar;\r\n\t\tconst daysToShabbos = (Calendar.SATURDAY - this.getDayOfWeek() + 7) % 7;\r\n\t\tif (this.getDayOfWeek() != Calendar.SATURDAY) {\r\n\t\t\tclone.forward(Calendar.DATE, daysToShabbos);\r\n\t\t} else {\r\n\t\t\tclone.forward(Calendar.DATE, 7);\r\n\t\t}\r\n\t\twhile(clone.getParshah() == Parsha.NONE) { //Yom Kippur / Sukkos or Pesach with 2 potential non-parsha Shabbosim in a row\r\n\t\t\tclone.forward(Calendar.DATE, 7);\r\n\t\t}\r\n\t\treturn clone.getParshah();\r\n\t}\r\n\r\n /**\r\n * Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this\r\n * day. There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done in the\r\n * ZmanimFormatter#\r\n *\r\n * @todo consider using enums instead of the constant ints.\r\n *\r\n * @return the index of the holiday such as the constant {@link #LAG_BAOMER} or {@link #YOM_KIPPUR} or a -1 if it is not a holiday.\r\n * @see HebrewDateFormatter\r\n */\r\n public getYomTovIndex(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n\r\n // check by month (starting from Nissan)\r\n switch (this.getJewishMonth()) {\r\n case JewishCalendar.NISSAN:\r\n if (day === 14) {\r\n return JewishCalendar.EREV_PESACH;\r\n } else if (day === 15 || day === 21 || (!this.inIsrael && (day === 16 || day === 22))) {\r\n return JewishCalendar.PESACH;\r\n } else if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\r\n if (this.isUseModernHolidays()\r\n && ((day === 26 && dayOfWeek === 5) || (day === 28 && dayOfWeek === 2)\r\n || (day === 27 && dayOfWeek !== 1 && dayOfWeek !== 6))) {\r\n return JewishCalendar.YOM_HASHOAH;\r\n }\r\n break;\r\n case JewishCalendar.IYAR:\r\n if (this.isUseModernHolidays()\r\n && ((day === 4 && dayOfWeek === 3) || ((day === 3 || day === 2) && dayOfWeek === 4)\r\n || (day === 5 && dayOfWeek === 2))) {\r\n return JewishCalendar.YOM_HAZIKARON;\r\n }\r\n\r\n // if 5 Iyar falls on Wed Yom Haatzmaut is that day. If it fal1s on Friday or Shabbos it is moved back to\r\n // Thursday. If it falls on Monday it is moved to Tuesday\r\n if (this.isUseModernHolidays() && ((day === 5 && dayOfWeek === 4)\r\n || ((day === 4 || day === 3) && dayOfWeek === 5) || (day === 6 && dayOfWeek === 3))) {\r\n return JewishCalendar.YOM_HAATZMAUT;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PESACH_SHENI;\r\n }\r\n\r\n if (day === 18) {\r\n return JewishCalendar.LAG_BAOMER;\r\n }\r\n\r\n if (this.isUseModernHolidays() && day === 28) {\r\n return JewishCalendar.YOM_YERUSHALAYIM;\r\n }\r\n break;\r\n case JewishCalendar.SIVAN:\r\n if (day === 5) {\r\n return JewishCalendar.EREV_SHAVUOS;\r\n } else if (day === 6 || (day === 7 && !this.inIsrael)) {\r\n return JewishCalendar.SHAVUOS;\r\n }\r\n break;\r\n case JewishCalendar.TAMMUZ:\r\n // push off the fast day if it falls on Shabbos\r\n if ((day === 17 && dayOfWeek !== 7) || (day === 18 && dayOfWeek === 1)) {\r\n return JewishCalendar.SEVENTEEN_OF_TAMMUZ;\r\n }\r\n break;\r\n case JewishCalendar.AV:\r\n // if Tisha B'av falls on Shabbos, push off until Sunday\r\n if ((dayOfWeek === 1 && day === 10) || (dayOfWeek !== 7 && day === 9)) {\r\n return JewishCalendar.TISHA_BEAV;\r\n } else if (day === 15) {\r\n return JewishCalendar.TU_BEAV;\r\n }\r\n break;\r\n case JewishCalendar.ELUL:\r\n if (day === 29) {\r\n return JewishCalendar.EREV_ROSH_HASHANA;\r\n }\r\n break;\r\n case JewishCalendar.TISHREI:\r\n if (day === 1 || day === 2) {\r\n return JewishCalendar.ROSH_HASHANA;\r\n } else if ((day === 3 && dayOfWeek !== 7) || (day === 4 && dayOfWeek === 1)) {\r\n // push off Tzom Gedalia if it falls on Shabbos\r\n return JewishCalendar.FAST_OF_GEDALYAH;\r\n } else if (day === 9) {\r\n return JewishCalendar.EREV_YOM_KIPPUR;\r\n } else if (day === 10) {\r\n return JewishCalendar.YOM_KIPPUR;\r\n } else if (day === 14) {\r\n return JewishCalendar.EREV_SUCCOS;\r\n }\r\n\r\n if (day === 15 || (day === 16 && !this.inIsrael)) {\r\n return JewishCalendar.SUCCOS;\r\n }\r\n\r\n if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n if (day === 21) {\r\n return JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\r\n if (day === 22) {\r\n return JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\r\n if (day === 23 && !this.inIsrael) {\r\n return JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n break;\r\n case JewishCalendar.KISLEV: // no yomtov in CHESHVAN\r\n // if (day == 24) {\r\n // return EREV_CHANUKAH;\r\n // } else\r\n if (day >= 25) {\r\n return JewishCalendar.CHANUKAH;\r\n }\r\n break;\r\n case JewishCalendar.TEVES:\r\n if (day === 1 || day === 2 || (day === 3 && this.isKislevShort())) {\r\n return JewishCalendar.CHANUKAH;\r\n } else if (day === 10) {\r\n return JewishCalendar.TENTH_OF_TEVES;\r\n }\r\n break;\r\n case JewishCalendar.SHEVAT:\r\n if (day === 15) {\r\n return JewishCalendar.TU_BESHVAT;\r\n }\r\n break;\r\n case JewishCalendar.ADAR:\r\n if (!this.isJewishLeapYear()) {\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n } else {\r\n // else if a leap year\r\n if (day === 14) {\r\n return JewishCalendar.PURIM_KATAN;\r\n }\r\n\r\n if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM_KATAN;\r\n }\r\n }\r\n break;\r\n case JewishCalendar.ADAR_II:\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n break;\r\n }\r\n // if we get to this stage, then there are no holidays for the given date return -1\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Yom Tov. The method returns true even for holidays such as {@link #CHANUKAH} and minor\r\n * ones such as {@link #TU_BEAV} and {@link #PESACH_SHENI}. Erev Yom Tov (with the exception of {@link #HOSHANA_RABBA},\r\n * Erev the second days of Pesach) returns false, as do {@link #isTaanis() fast days} besides {@link #YOM_KIPPUR}. Use\r\n * {@link #isAssurBemelacha()} to find the days that have a prohibition of work.\r\n *\r\n * @return true if the current day is a Yom Tov\r\n *\r\n * @see #getYomTovIndex()\r\n * @see #isErevYomTov()\r\n * @see #isErevYomTovSheni()\r\n * @see #isTaanis()\r\n * @see #isAssurBemelacha()\r\n * @see #isCholHamoed()\r\n */\r\n public isYomTov(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n\r\n if ((this.isErevYomTov() && (holidayIndex !== JewishCalendar.HOSHANA_RABBA\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() !== 20)))\r\n || (this.isTaanis() && holidayIndex !== JewishCalendar.YOM_KIPPUR)) {\r\n return false;\r\n }\r\n\r\n return this.getYomTovIndex() !== -1;\r\n }\r\n\r\n /**\r\n * Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a\r\n * non-Yom Tov day, even if it is Shabbos.\r\n *\r\n * @return if the Yom Tov day has a melacha (work) prohibition.\r\n */\r\n public isYomTovAssurBemelacha(): boolean {\r\n const yamimTovimAssurBemelacha = [\r\n JewishCalendar.PESACH,\r\n JewishCalendar.SHAVUOS,\r\n JewishCalendar.SUCCOS,\r\n JewishCalendar.SHEMINI_ATZERES,\r\n JewishCalendar.SIMCHAS_TORAH,\r\n JewishCalendar.ROSH_HASHANA,\r\n JewishCalendar.YOM_KIPPUR,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return yamimTovimAssurBemelacha.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.\r\n * This method will return false for a.\r\n * @return if the day is a Yom Tov that is assur bemlacha or Shabbos\r\n */\r\n public isAssurBemelacha(): boolean {\r\n return this.getDayOfWeek() === SATURDAY || this.isYomTovAssurBemelacha();\r\n }\r\n\r\n /**\r\n * Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the\r\n * first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical\r\n * to calling {@link #isTomorrowShabbosOrYomTov()}.\r\n *\r\n * @return if the day has candle lighting\r\n */\r\n public hasCandleLighting(): boolean {\r\n return this.isTomorrowShabbosOrYomTov();\r\n }\r\n\r\n /**\r\n * Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos, erev\r\n * Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov out of\r\n * Israel. It is identical to calling {@link #hasCandleLighting()}.\r\n * @return will return if the next day is Shabbos or Yom Tov\r\n */\r\n public isTomorrowShabbosOrYomTov(): boolean {\r\n return this.getDayOfWeek() === FRIDAY || this.isErevYomTov() || this.isErevYomTovSheni();\r\n }\r\n\r\n /**\r\n * Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana\r\n * everywhere, and the second days of Yom Tov in chutz laaretz (out of Israel).\r\n *\r\n * @return if the day is the second day of Yom Tov.\r\n */\r\n public isErevYomTovSheni(): boolean {\r\n return (this.getJewishMonth() === JewishCalendar.TISHREI && (this.getJewishDayOfMonth() === 1))\r\n || (!this.getInIsrael()\r\n && ((this.getJewishMonth() === JewishCalendar.NISSAN && [15, 21].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.TISHREI && [15, 22].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.SIVAN && this.getJewishDayOfMonth() === 6)));\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Aseret Yemei Teshuva.\r\n *\r\n * @return if the current day is Aseret Yemei Teshuvah\r\n */\r\n public isAseresYemeiTeshuva(): boolean {\r\n return this.getJewishMonth() === JewishCalendar.TISHREI && this.getJewishDayOfMonth() <= 10;\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * \r\n\t * @return true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedPesach()\r\n\t * @see #PESACH\r\n\t * @see #CHOL_HAMOED_PESACH\r\n\t */\r\n public isPesach():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.PESACH || holidayIndex == JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach\r\n * @see #isYomTov()\r\n * @see #isPessach()\r\n * @see #CHOL_HAMOED_PESACH\r\n */\r\n public isCholHamoedPesach(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shavuos.\r\n\t *\r\n\t * @return true if the current day is Shavuos.\r\n\t * @see #isYomTov()\r\n\t * @see #SHAVUOS\r\n\t */\r\n public isShavuos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHAVUOS;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Rosh Hashana.\r\n\t *\r\n\t * @return true if the current day is Rosh Hashana.\r\n\t * @see #isYomTov()\r\n\t * @see #ROSH_HASHANA\r\n\t */\r\n public isRoshHashana():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ROSH_HASHANA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Yom Kippur.\r\n\t *\r\n\t * @return true if the current day is Yom Kippur.\r\n\t * @see #isYomTov()\r\n\t * @see #YOM_KIPPUR\r\n\t */\r\n public isYomKippur():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.YOM_KIPPUR;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos).\r\n\t * It will return false for {@link #isShminiAtzeres() Shmini Atzeres} and {@link #isSimchasTorah() Simchas Torah}.\r\n\t * \r\n\t * @return true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos.\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedSuccos()\r\n\t * @see #isHoshanaRabba()\r\n\t * @see #SUCCOS\r\n\t * @see #CHOL_HAMOED_SUCCOS\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isSuccos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SUCCOS || holidayIndex == JewishCalendar.CHOL_HAMOED_SUCCOS || holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Hoshana Rabba.\r\n\t *\r\n\t * @return true true if the current day is Hoshana Rabba.\r\n\t * @see #isYomTov()\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isHoshanaRabba():boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shmini Atzeres.\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SHEMINI_ATZERES\r\n\t */\r\n public isShminiAtzeres():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Simchas Torah. This will always return false if {@link #getInIsrael() in Israel}\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SIMCHAS_TORAH\r\n\t */\r\n public isSimchasTorah():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n //if in Israel, Holiday index of SIMCHAS_TORAH will not be returned by getYomTovIndex()\r\n return holidayIndex == JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoedSuccos(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach or Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach or Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_PESACH\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoed(): boolean {\r\n return this.isCholHamoedPesach() || this.isCholHamoedSuccos();\r\n }\r\n\r\n /**\r\n * Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and last days),\r\n * Shavuos, Rosh Hashana, Yom Kippur and Succos and Hoshana Rabba.\r\n *\r\n * @return true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom Kippur and Succos\r\n * @see #isYomTov()\r\n * @see #isErevYomTovSheni()\r\n */\r\n public isErevYomTov(): boolean {\r\n const erevYomTov = [\r\n JewishCalendar.EREV_PESACH,\r\n JewishCalendar.EREV_SHAVUOS,\r\n JewishCalendar.EREV_ROSH_HASHANA,\r\n JewishCalendar.EREV_YOM_KIPPUR,\r\n JewishCalendar.EREV_SUCCOS,\r\n JewishCalendar.HOSHANA_RABBA,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return erevYomTov.includes(holidayIndex)\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() === 20);\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n *\r\n * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n * @see #isRoshChodesh()\r\n */\r\n public isErevRoshChodesh(): boolean {\r\n // Erev Rosh Hashana is not Erev Rosh Chodesh.\r\n return (this.getJewishDayOfMonth() === 29 && this.getJewishMonth() !== JewishCalendar.ELUL);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Yom Kippur Katan. Returns false for Erev Rosh Hashana,\r\n\t * Erev Rosh Chodesh Cheshvan, Teves and Iyyar. If Erev Rosh Chodesh occurs\r\n\t * on a Friday or Shabbos, Yom Kippur Katan is moved back to Thursday.\r\n\t * \r\n\t * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana.\r\n\t * @see #isRoshChodesh()\r\n\t */\r\n\tpublic isYomKippurKatan(): boolean {\r\n\t\tconst dayOfWeek = this.getDayOfWeek();\r\n\t\tconst month = this.getJewishMonth();\r\n\t\tconst day = this.getJewishDayOfMonth();\r\n\t\tif(month == JewishDate.ELUL || month == JewishDate.TISHREI || month == JewishDate.KISLEV || month == JewishDate.NISSAN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(day == 29 && dayOfWeek != Calendar.FRIDAY && dayOfWeek != Calendar.SATURDAY) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif((day == 27 || day == 28) && dayOfWeek == Calendar.THURSDAY ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n /**\r\n\t * The Monday, Thursday and Monday after the first Shabbos after {@link #isRoshChodesh() Rosh Chodesh}\r\n\t * {@link JewishDate#CHESHVAN Cheshvan} and {@link JewishDate#IYAR Iyar} are BeHaB days. If the last Monday of Iyar's BeHaB coincides with {@link\r\n * #PESACH_SHENI Pesach Sheni}, the method currently considers it both Pesach Sheni and BeHaB.\r\n * As seen in an Ohr Sameach article on the subject The\r\n * unknown Days: BeHaB Vs. Pesach Sheini? there are some customs that delay the day to various points in the future.\r\n * @return true if the day is BeHaB.\r\n */\r\n public isBeHaB(): boolean {\r\n const dayOfWeek = this.getDayOfWeek();\r\n const month = this.getJewishMonth();\r\n const day = this.getJewishDayOfMonth();\r\n\r\n if (month == JewishDate.CHESHVAN || month == JewishDate.IYAR) {\r\n if((dayOfWeek == Calendar.MONDAY && day > 4 && day < 18)\r\n || (dayOfWeek == Calendar.THURSDAY && day > 7 && day < 14)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av, Yom Kippur, Fast of\r\n * Gedalyah, 10 of Teves and the Fast of Esther\r\n *\r\n * @return true if today is a fast day\r\n */\r\n public isTaanis(): boolean {\r\n const taaniyos = [\r\n JewishCalendar.SEVENTEEN_OF_TAMMUZ,\r\n JewishCalendar.TISHA_BEAV,\r\n JewishCalendar.YOM_KIPPUR,\r\n JewishCalendar.FAST_OF_GEDALYAH,\r\n JewishCalendar.TENTH_OF_TEVES,\r\n JewishCalendar.FAST_OF_ESTHER,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return taaniyos.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Return true if the day is Taanis Bechoros (on erev Pesach). It will return true for the 14th of Nissan if it is not\r\n * on Shabbos, or if the 12th of Nissan occurs on a Thursday\r\n *\r\n * @return true if today is the fast of Bechoros\r\n */\r\n public isTaanisBechoros(): boolean {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n // on 14 Nisan unless that is Shabbos where the fast is moved back to Thursday\r\n return this.getJewishMonth() === JewishCalendar.NISSAN && ((day === 14 && dayOfWeek !== Calendar.SATURDAY)\r\n || (day === 12 && dayOfWeek === Calendar.THURSDAY));\r\n }\r\n\r\n /**\r\n * Returns the day of Chanukah or -1 if it is not Chanukah.\r\n *\r\n * @return the day of Chanukah or -1 if it is not Chanukah.\r\n * @see #isChanukah()\r\n */\r\n public getDayOfChanukah(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n if (this.isChanukah()) {\r\n if (this.getJewishMonth() === JewishCalendar.KISLEV) {\r\n return day - 24;\r\n }\r\n // teves\r\n return this.isKislevShort() ? day + 5 : day + 6;\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is one of the 8 days of Chanukah.\r\n * @return if the current day is one of the 8 days of Chanukah.\r\n * @see #getDayOfChanukah()\r\n */\r\n public isChanukah(): boolean {\r\n return this.getYomTovIndex() === JewishCalendar.CHANUKAH;\r\n }\r\n\r\n \t/**\r\n\t * Returns if the day is Purim (Shushan Purim\r\n\t * in a mukaf choma and regular Purim in a non-mukaf choma). \r\n\t * @return if the day is Purim (Shushan Purim in a mukaf choma and regular Purin in a non-mukaf choma)\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public isPurim():boolean {\r\n if (this.isMukafChoma) {\r\n return this.getYomTovIndex() == JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n\r\n return this.getYomTovIndex() == JewishCalendar.PURIM;\r\n }\r\n\r\n /**\r\n * Returns if the day is Rosh Chodesh. Rosh Hashana will return false\r\n *\r\n * @return true if it is Rosh Chodesh. Rosh Hashana will return false\r\n */\r\n public isRoshChodesh(): boolean {\r\n // Rosh Hashana is not rosh chodesh. Elul never has 30 days\r\n return (this.getJewishDayOfMonth() === 1 && this.getJewishMonth() !== JewishCalendar.TISHREI) || this.getJewishDayOfMonth() === 30;\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos and sunday is Rosh Chodesh.\r\n *\r\n * @return true if it is Shabbos and sunday is Rosh Chodesh.\r\n */\r\n public isMacharChodesh(): boolean {\r\n return (this.getDayOfWeek() === SATURDAY && (this.getJewishDayOfMonth() === 30 || this.getJewishDayOfMonth() === 29));\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos Mevorchim.\r\n *\r\n * @return true if it is Shabbos Mevorchim.\r\n */\r\n public isShabbosMevorchim(): boolean {\r\n return this.getDayOfWeek() === SATURDAY\r\n && this.getJewishDayOfMonth() >= 23\r\n && this.getJewishDayOfMonth() <= 29\r\n && this.getJewishMonth() !== JewishCalendar.ELUL;\r\n }\r\n\r\n /**\r\n * Returns the int value of the Omer day or -1 if the day is not in the omer\r\n *\r\n * @return The Omer count as an int or -1 if it is not a day of the Omer.\r\n */\r\n public getDayOfOmer(): number {\r\n let omer: number = -1; // not a day of the Omer\r\n const month: number = this.getJewishMonth();\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n // if Nissan and second day of Pesach and on\r\n if (month === JewishCalendar.NISSAN && day >= 16) {\r\n omer = day - 15;\r\n // if Iyar\r\n } else if (month === JewishCalendar.IYAR) {\r\n omer = day + 15;\r\n // if Sivan and before Shavuos\r\n } else if (month === JewishCalendar.SIVAN && day < 6) {\r\n omer = day + 44;\r\n }\r\n return omer;\r\n }\r\n\r\n /**\r\n * Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This\r\n * method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude\r\n * of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method\r\n * intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the\r\n * default (or set) Timezone.\r\n *\r\n * @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)\r\n */\r\n public getMoladAsDate(): Temporal.ZonedDateTime {\r\n const molad: JewishDate = this.getMolad();\r\n const locationName: string = 'Jerusalem, Israel';\r\n\r\n const latitude: number = 31.778; // Har Habayis latitude\r\n const longitude: number = 35.2354; // Har Habayis longitude\r\n\r\n // The raw molad Date (point in time) must be generated using standard time. Using \"Asia/Jerusalem\" timezone will result in the time\r\n // being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual time in DST will be done by the date\r\n // formatter class used to display the Date.\r\n const yerushalayimStandardTZ: string = '+02:00';\r\n const geo: GeoLocation = new GeoLocation(locationName, latitude, longitude, yerushalayimStandardTZ);\r\n\r\n const moladSeconds: number = (molad.getMoladChalakim() * 10) / 3;\r\n // subtract local time difference of 20.94 minutes (20 minutes and 56.496 seconds) to get to Standard time\r\n const milliseconds: number = Math.trunc(1000 * (moladSeconds - Math.trunc(moladSeconds)));\r\n\r\n return Temporal.ZonedDateTime.from({\r\n timeZone: geo.getTimeZone(),\r\n year: molad.getGregorianYear(),\r\n month: molad.getGregorianMonth() + 1,\r\n day: molad.getGregorianDayOfMonth(),\r\n hour: molad.getMoladHours(),\r\n minute: molad.getMoladMinutes(),\r\n second: Math.trunc(moladSeconds),\r\n millisecond: milliseconds,\r\n })\r\n .subtract({ nanoseconds: Math.trunc(geo.getLocalMeanTimeOffset()) });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 3 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana3Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 72 });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber. See the Bach's opinion on this time. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 7 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana7Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 168 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and\r\n * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying alos before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment halfway between molad and molad.\r\n * @see #getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({\r\n days: 14,\r\n hours: 18,\r\n minutes: 22,\r\n seconds: 1,\r\n milliseconds: 666,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down\r\n * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber\r\n * agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid\r\n * Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during\r\n * the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos\r\n * before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 15 days after the molad.\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date)\r\n */\r\n public getSofZmanKidushLevana15Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ days: 15 });\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafBavliYomi}\r\n */\r\n public getDafYomiBavli(): DafBavliYomi {\r\n return YomiCalculator.getDafYomiBavli(this);\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafYomiYerushalmi}\r\n */\r\n public getDafYomiYerushalmi(): DafYomiYerushalmi | null {\r\n return YerushalmiYomiCalculator.getDafYomiYerushalmi(this);\r\n }\r\n\r\n /**\r\n * Returns the equivalent Chafetz Chayim Yomi page for the date that this is set to\r\n */\r\n public getChafetzChayimYomi() {\r\n return ChafetzChayimYomiCalculator.getChafetzChayimYomi(this);\r\n }\r\n\r\n /**\r\n\t * Returns the elapsed days since Tekufas Tishrei. This uses Tekufas Shmuel (identical to the Julian Year with a solar year length of 365.25 days).\r\n\t * The notation used below is D = days, H = hours and C = chalakim. Molad BaHaRad was 2D,5H,204C or 5H,204C from the start of Rosh Hashana year 1. For molad\r\n\t * Nissan add 177D, 4H and 438C (6 * 29D, 12H and 793C), or 177D,9H,642C after Rosh Hashana year 1.\r\n\t * Tekufas Nissan was 7D, 9H and 642C before molad Nissan according to the Rambam, or 170D, 0H and\r\n\t * 0C after Rosh Hashana year 1. Tekufas Tishrei was 182D and 3H (365.25 / 2) before tekufas\r\n\t * Nissan, or 12D and 15H before Rosh Hashana of year 1. Outside of Israel we start reciting Tal\r\n\t * Umatar in Birkas Hashanim from 60 days after tekufas Tishrei. The 60 days include the day of\r\n\t * the tekufah and the day we start reciting Tal Umatar. 60 days from the tekufah == 47D and 9H\r\n\t * from Rosh Hashana year 1.\r\n\t * \r\n\t * @return the number of elapsed days since tekufas Tishrei.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate()\r\n\t * @see #isVeseinTalUmatarStartingTonight()\r\n\t * @see #isVeseinTalUmatarRecited()\r\n\t */\r\n public getTekufasTishreiElapsedDays():number {\r\n // Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all\r\n // 4 years of the secular leap year cycle to share 47 days. Truncate 47D and 9H to 47D for simplicity.\r\n const days:number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) + (this.getDaysSinceStartOfJewishYear() - 1) + 0.5;\r\n // days of completed solar years\r\n const solar:number = (this.getJewishYear() - 1) * 365.25;\r\n return Math.floor(days - solar);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t * \r\n\t * @return true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t */\r\n public isIsruChag():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ISRU_CHAG;\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(jewishCalendar: JewishCalendar): boolean {\r\n return Temporal.PlainDate.compare(this.getDate(), jewishCalendar.getDate()) === 0 && this.getInIsrael() === jewishCalendar.getInIsrael();\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill';\r\n\r\nimport { AstronomicalCalendar } from './AstronomicalCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\nimport { IllegalArgumentException, NullPointerException } from './polyfills/errors.ts';\r\nimport { Long_MIN_VALUE } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim\r\n * (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the\r\n * Zmanim library. For a much more extensive list of zmanim, use the {@link ComplexZmanimCalendar} that\r\n * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for\r\n * simple examples on using the API. \r\n * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance\r\n * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his\r\n * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)\r\n * and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel\r\n * Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n * 34 and\r\n * 42 is of the opinion that elevation should be\r\n * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should\r\n * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for\r\n * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link\r\n * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},\r\n * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}\r\n * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to\r\n * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since\r\n * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of\r\n * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use\r\n * of elevation.\r\n * For additional information on the halachic impact of elevation on zmanim see:\r\n * \r\n * \r\n *

Note: It is important to read the technical notes on top of the {@link AstronomicalCalculator} documentation\r\n * before using this code.\r\n *

I would like to thank Rabbi Yaakov Shakow, the\r\n * author of Luach Ikvei Hayom who spent a considerable amount of time reviewing, correcting and making suggestions on the\r\n * documentation in this library.\r\n *

Disclaimer:

I did my best to get accurate results, but please double-check before relying on these\r\n * zmanim for halacha lema'aseh.\r\n * \r\n * \r\n * @author © Eliyahu Hershfeld 2004 - 2022\r\n */\r\nexport class ZmanimCalendar extends AstronomicalCalendar {\r\n /**\r\n\t * Is elevation factored in for some zmanim (see {@link #isUseElevation()} for additional information).\r\n\t * @see #isUseElevation()\r\n\t * @see #setUseElevation(boolean)\r\n\t */\r\n private useElevation: boolean = false;\r\n\r\n /**\r\n\t * Is elevation above sea level calculated for times besides sunrise and sunset. According to Rabbi Dovid Yehuda\r\n\t * Bursztyn in his Zmanim Kehilchasam (second edition published\r\n\t * in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and sunset should use elevation. However\r\n\t * Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n\t * 34 and 42 is of the opinion that elevation should be\r\n\t * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons\r\n\t * should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for\r\n\t * zmanim calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will\r\n\t * impact sunrise and sunset based zmanim such as {@link #getSunrise()}, {@link #getSunset()},\r\n\t * {@link #getSofZmanShmaGRA()}, alos based zmanim such as {@link #getSofZmanShmaMGA()} that are based on a\r\n\t * fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact\r\n * zmanim that are a degree based offset of sunrise and sunset, such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()}.\r\n * \r\n * @return if the use of elevation is active\r\n * \r\n * @see #setUseElevation(boolean)\r\n */\r\n public isUseElevation(): boolean {\r\n return this.useElevation;\r\n }\r\n\r\n /**\r\n\t * Sets whether elevation above sea level is factored into zmanim calculations for times besides sunrise and sunset.\r\n\t * See {@link #isUseElevation()} for more details. \r\n\t * @see #isUseElevation()\r\n\t * \r\n\t * @param useElevation set to true to use elevation in zmanim calculations\r\n\t */\r\n public setUseElevation(useElevation: boolean): void {\r\n this.useElevation = useElevation;\r\n }\r\n\r\n /**\r\n\t * Is astronomical chatzos used for zmanim calculations. The default value of true will\r\n\t * keep the standard astronomical chatzos calculation, while setting it to false will use half of\r\n\t * a solar day calculation for chatzos.\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t */\r\n\tprivate useAstronomicalChatzos:boolean = true;\r\n\r\n\t/**\r\n\t * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For\r\n\t * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos\r\n\t * would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t */\r\n\tpublic isUseAstronomicalChatzos(): boolean {\r\n\t\treturn this.useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t */\r\n\tpublic setUseAstronomicalChatzos(useAstronomicalChatzos: boolean) {\r\n\t\tthis.useAstronomicalChatzos = useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. The default value of false will keep the standard start to end of day calculations, while setting\r\n\t * it to true will use half of a solar day calculation for zmanim.\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t */\r\n\tprivate useAstronomicalChatzosForOtherZmanim:boolean = false;\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than\r\n\t * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t */\r\n\tpublic isUseAstronomicalChatzosForOtherZmanim():boolean {\r\n\t\treturn this.useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t */\r\n\tpublic setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean) {\r\n\t\tthis.useAstronomicalChatzosForOtherZmanim = useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n /**\r\n\t * The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn\r\n\t * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n\t * a mil (Rambam and others). The sun's position at\r\n\t * 72 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is\r\n\t * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n\t * \r\n\t * @see #getAlosHashachar()\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()\r\n\t */\r\n protected static readonly ZENITH_16_POINT_1: number = ZmanimCalendar.GEOMETRIC_ZENITH + 16.1;\r\n\r\n /**\r\n\t * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the position of the sun 36\r\n\t * minutes after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which\r\n\t * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,\r\n\t * which is later than the required 3 medium stars.\r\n\t * \r\n\t * @see #getTzais()\r\n\t * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()\r\n\t */\r\n protected static readonly ZENITH_8_POINT_5: number = ZmanimCalendar.GEOMETRIC_ZENITH + 8.5;\r\n\r\n /**\r\n\t * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the\r\n\t * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.\r\n\t */\r\n private candleLightingOffset: number = 18;\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the\r\n\t * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunrise()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunrise()\r\n\t */\r\n protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunrise();\r\n }\r\n return this.getSeaLevelSunrise();\r\n }\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),\r\n\t * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunset()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunset()\r\n\t */\r\n protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunset();\r\n }\r\n return this.getSeaLevelSunset();\r\n }\r\n\r\n /**\r\n\t * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the\r\n\t * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, a time that Rabbi Meir\r\n\t * Posen in his the Ohr Meir calculated that 3 small\r\n\t * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant.\r\n\t * \r\n\t * @see #ZENITH_8_POINT_5\r\n\t * \r\n\t * @return The Date of nightfall. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t * @see #ZENITH_8_POINT_5\r\n\t * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais\r\n\t */\r\n public getTzais(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n\t * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n\t * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. This is based on the\r\n\t * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is\r\n\t * takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes before {@link #getSunrise sunrise} in Jerusalem\r\n\t * on the around the equinox /\r\n\t * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.\r\n\t * \r\n\t * @see #ZENITH_16_POINT_1\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * \r\n\t * @return The Date of dawn. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getAlosHashachar(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n\t * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time\r\n\t * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but\r\n\t * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between\r\n\t * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the\r\n\t * distance of 4 Mil.\r\n\t * \r\n\t * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n\t * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n\t * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getAlos72() {\r\n return this.getElevationAdjustedSunrise()\r\n\t\t?.subtract({ minutes: 72 });\r\n }\r\n\r\n /**\r\n\t * This method returns chatzos (midday) following most opinions that chatzos is the midpoint\r\n\t * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea level sunset}. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. The returned value is identical to {@link #getSunTransit()}. In reality due to lengthening or\r\n\t * shortening of day, this is not necessarily the exact midpoint of the day, but it is very close.\r\n\t * \r\n\t * @see AstronomicalCalendar#getSunTransit()\r\n\t * @return the Date of chatzos. If the calculation can't be computed such as in the Arctic Circle\r\n\t * where there is at least one day where the sun does not rise, and one where it does not set, a null will\r\n\t * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getChatzos(): Temporal.ZonedDateTime | null {\r\n if (this.useAstronomicalChatzos) {\r\n\t\treturn this.getSunTransit(); // can be null of the calculator does not support astronomical chatzos\r\n\t} else {\r\n\t\tconst halfDayChatzos = this.getChatzosAsHalfDay();\r\n\t\tif(halfDayChatzos == null) {\r\n\t\t\treturn this.getSunTransit(); // can be null if the calculator does not support astronomical chatzos\r\n\t\t} else {\r\n\t\t\treturn halfDayChatzos;\r\n\t\t}\r\n\t}\r\n }\r\n\r\n \t/**\r\n\t * Returns chatzos calculated as halfway between sunrise and sunset. Many are of the opinion opinion that\r\n\t * chatzos is calculated as the the midpoint between {@link #getSeaLevelSunrise sea level sunrise} and\r\n\t * {@link #getSeaLevelSunset sea level sunset}, despite it not being the most accurate way to calculate it. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. In reality due to lengthening or shortening of day, this is not necessarily the exact midpoint of\r\n\t * the day, but it is very close. This method allows you to use the NOAACalculator and still calculate chatzos\r\n\t * as six shaaos zmaniyos after sunrise. There are currently two {@link\r\n\t * com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the {@link\r\n\t * com.kosherjava.zmanim.util.NOAACalculator} and the {@link com.kosherjava.zmanim.util.SunTimesCalculator}.\r\n\t * The SunTimesCalculator calculates chatzos as halfway between sunrise and sunset (and of six shaaos\r\n\t * zmaniyos), while the NOAACalculator calculates it as astronomical chatzos that is slightly more\r\n\t * accurate. This method allows you to use the NOAACalculator and still calculate chatzos as six shaaos\r\n\t * zmaniyos after sunrise. See The Definition\r\n\t * of Chatzos for a detailed explanation of the ways to calculate Chatzos.\r\n\t *\r\n\t * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see AstronomicalCalendar#getSunTransit(Date, Date)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * \r\n\t * @return the Date of the latest chatzos. If the calculation can't be computed such\r\n\t * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n\t * it does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n\tpublic getChatzosAsHalfDay(): Temporal.ZonedDateTime {\r\n\t\treturn this.getSunTransit(this.getSeaLevelSunrise()!, this.getSeaLevelSunset()!)!;\r\n\t}\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman krias shema (time to recite shema in the morning)\r\n\t * that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of\r\n\t * the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return sof zman krias shema according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman krias shema. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to\r\n\t * this method.\r\n\t * @return the Date of the latest zman shema based on the start and end of day times passed to this\r\n\t * method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day\r\n\t * a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n\t * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 3);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see #isUseElevation()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()\r\n\t * @return the Date of the latest zman shema according to the GRA. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned. See the detailed explanation on top of the {@link\r\n\t * AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShmaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date of the latest zman shema. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()\r\n\t * @see ComplexZmanimCalendar#getAlos72()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that \r\n\t */\r\n public getSofZmanShmaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that\r\n\t * tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes\r\n\t * a Mil. According to the Machtzis Hashekel in\r\n\t * Orach Chaim 235:3, the Pri Megadim in Orach\r\n\t * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard\r\n\t * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting) a 72\r\n\t * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.\r\n\t * \r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @return the Date representing 72 minutes after sunset. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getTzais72() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 72 })\r\n }\r\n\r\n /**\r\n\t * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before\r\n\t * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be\r\n\t * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments\r\n\t * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset\r\n\t * to {@link #getTimeOffset(Date, long)}.\r\n\t * \r\n\t * @return candle lighting time. If the calculation can't be computed such as in the Arctic Circle where there is at\r\n\t * least one day a year where the sun does not rise, and one where it does not set, a null will be returned.\r\n\t * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t * \r\n\t * @see #getSeaLevelSunset()\r\n\t * @see #getCandleLightingOffset()\r\n\t * @see #setCandleLightingOffset(double)\r\n\t */\r\n public getCandleLighting() {\r\n return this.getSeaLevelSunset()?.subtract({ minutes: this.getCandleLightingOffset() });\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman tfilah (time to recite the morning prayers)\r\n\t * that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day.\r\n\t * As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman tfilah. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman tfilah. This can be sunset or any tzais passed\r\n\t * to this method.\r\n\t * @return the Date of the latest zman tfilah based on the start and end of day times passed\r\n\t * to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least\r\n\t * one day a year where the sun does not rise, and one where it does not set, a null will be returned. See\r\n\t * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 4);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()\r\n\t * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set), a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisMGA()\r\n\t * @see #getAlos72()\r\n\t */\r\n public getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n * A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers)\r\n * that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha gedola according to the opinion of the\r\n * GRA.\r\n * \r\n * @param startOfDay\r\n * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed\r\n * to this method.\r\n * @return the Date of the time of Mincha gedola based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime | undefined): Temporal.ZonedDateTime {\r\n\tif (!startOfDay && !endOfDay) {\r\n\t\tif(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, this.getSunset()!, 0.5)!;\r\n\t\t} else {\r\n\t\t\treturn this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 6.5)!;\r\n\t\t}\r\n\t} else if (startOfDay && endOfDay) {\r\n\t\tif(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, endOfDay, 0.5)!;\r\n\t\t} else {\r\n\t\t\treturn this.getShaahZmanisBasedZman(startOfDay, endOfDay, 6.5)!;\r\n\t\t}\r\n\t}\r\n\r\n\tthrow new IllegalArgumentException(\"Need valid parameters\");\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half\r\n\t * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * shaos zmaniyos (temporal hours) after the\r\n\t * start of the day, calculated using the start and end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.\r\n\t * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea\r\n\t * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n\t * setting) to this method will return samuch lemincha ketana according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos\r\n\t * passed to to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais\r\n\t * passed to this method.\r\n\t * @return the Date of the time of Mincha ketana based on the start and end of day times\r\n\t * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n\t * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n\t * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()\r\n\t */\r\n public getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9);\r\n }\r\n\r\n /**\r\n * A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in\r\n * the opinion of the Rambam and others) that is\r\n * 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha ketana according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @return the Date of the time of Mincha ketana based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9.5);\r\n }\r\n\r\n /**\r\n * A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is\r\n * 10.75 hours after the start of the day, (or 1.25 hours before the end of the day) based on the start and end of\r\n * the day passed to the method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return plag mincha according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @return the Date of the time of plag hamincha based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 10.75);\r\n }\r\n\r\n /**\r\n * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}\r\n * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on\r\n * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n *\r\n * @see #getPlagHamincha(Date, Date)\r\n * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()\r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n\r\n /*\r\n public getPlagHamincha(): Date {\r\n return this.getPlagHamincha(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to\r\n * the opinion of the GRA. This calculation divides\r\n * the day based on the opinion of the GRA that the day runs from from {@link #getSeaLevelSunrise() sea\r\n * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal\r\n * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can\r\n * account for elevation.\r\n *\r\n * @return the long millisecond length of a shaah zmanis calculated from sunrise to sunset.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSeaLevelSunset()\r\n * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()\r\n */\r\n public getShaahZmanisGra() {\r\n return this.getTemporalHour(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos\r\n * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and tfila).\r\n * Dawn for this calculation is 72 minutes before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset\r\n * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation setting).\r\n * This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating a\r\n * shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComplexZmanimCalendar}.\r\n *\r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisMGA() {\r\n return this.getTemporalHour(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ZmanimCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes a {@link GeoLocation} as a parameter.\r\n *\r\n * @param location\r\n * the location\r\n */\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which\r\n * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some\r\n * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom\r\n * for candle lighting time.\r\n *\r\n * @return Returns the currently set candle lighting offset in minutes.\r\n * @see #getCandleLighting()\r\n * @see #setCandleLightingOffset(double)\r\n */\r\n public getCandleLightingOffset(): number {\r\n return this.candleLightingOffset;\r\n }\r\n\r\n /**\r\n * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is\r\n * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15\r\n * minutes, while the custom in Jerusalem is to use a 40 minute offset.\r\n *\r\n * @param candleLightingOffset\r\n * The candle lighting offset to set in minutes.\r\n * @see #getCandleLighting()\r\n * @see #getCandleLightingOffset()\r\n */\r\n public setCandleLightingOffset(candleLightingOffset: number): void {\r\n this.candleLightingOffset = candleLightingOffset;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ZmanimCalendar';\r\n }\r\n\r\n /**\r\n * This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition.\r\n * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this\r\n * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the\r\n * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.\r\n *\r\n * @param currentTime the current time\r\n * @param tzais the time of tzais\r\n * @param inIsrael whether to use Israel holiday scheme or not\r\n *\r\n * @return true if melacha is prohibited or false if it is not.\r\n *\r\n * @see JewishCalendar#isAssurBemelacha()\r\n * @see JewishCalendar#hasCandleLighting()\r\n * @see JewishCalendar#setInIsrael(boolean)\r\n */\r\n public isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n const date = this.getDate();\r\n jewishCalendar.setGregorianDate(date.year, date.month - 1, date.day);\r\n jewishCalendar.setInIsrael(inIsrael);\r\n\r\n // erev shabbos, YT or YT sheni and after shkiah\r\n const sunset = this.getElevationAdjustedSunset();\r\n if (!sunset) throw new NullPointerException();\r\n if (jewishCalendar.hasCandleLighting() && currentTime >= sunset) {\r\n return true;\r\n }\r\n\r\n // is shabbos or YT and it is before tzais\r\n return jewishCalendar.isAssurBemelacha() && currentTime <= tzais;\r\n }\r\n\r\n /**\r\n * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the\r\n * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the\r\n * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on\r\n * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the\r\n * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha\r\n * according to the opinion of the GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the zman. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the zman. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param hours\r\n * the number of shaahos zmaniyos (temporal hours) to offset from the start of day\r\n * @return the Date of the time of zman with the shaahos zmaniyos (temporal hours)\r\n * in the day offset from the start of day passed to this method. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the {@link\r\n * AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null {\r\n const shaahZmanis = this.getTemporalHour(startOfDay, endOfDay)!;\r\n\tconst tweakDuration = Temporal.Duration.from({ nanoseconds: Math.trunc(shaahZmanis.total('nanoseconds') * hours) })\r\n\r\n return startOfDay!.add(tweakDuration)\r\n }\r\n\r\n /**\r\n\t * A utility method to calculate zmanim based on Rav Moshe\r\n\t * Feinstein and others as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n\t * of Staten Island and other calendars. The day is split in two, from alos / sunrise to chatzos, and the\r\n\t * second half of the day, from chatzos to sunset / tzais. Morning based times are calculated. based on the first\r\n\t * 6 hours of the day, and afternoon times based on the second half of the day. As an example, passing 0.5, a start of\r\n\t * chatzos and an end of day as sunset will return the time of mincha gedola GRA as half an hour zmanis\r\n\t * based on the second half of the day.\r\n\t * \r\n\t * @param startOfHalfDay\r\n\t * The start of the half day. This would be alos or sunrise for morning based times such as sof zman krias\r\n\t * shema and chatzos for afternoon based times such as mincha gedola.\r\n\t * @param endOfHalfDay\r\n\t * The end of the half day. This would be chatzos for morning based times such as sof zman krias shema\r\n\t * and sunset or tzais for afternoon based times such as mincha gedola.\r\n\t * @param hours\r\n\t * The number of sha'os zmaniyos (hours) to offset the beginning of the first or second half of the day. For example,\r\n\t * 3 for sof zman Shma, 0.5 for mincha gedola (half an hour after chatzos) and 4.75 for plag\r\n\t * hamincha.\r\n\t * \r\n\t * @return the Date of zman based on calculation of the first or second half of the day. If the\r\n\t * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the\r\n\t * sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n\t * on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n\t */\r\n\tpublic getHalfDayBasedZman(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n\t\tif (startOfHalfDay == null || endOfHalfDay == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst intValue = startOfHalfDay.until(endOfHalfDay).total({ unit: 'nanoseconds' }) / 6;\r\n\t\tconst duration = Temporal.Duration.from({ nanoseconds: Math.trunc(intValue * hours) });\r\n\r\n\t\treturn startOfHalfDay.add(duration);\r\n\t}\r\n\r\n /**\r\n\t * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree\r\n\t * offset. For the equilux where there\r\n\t * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location\r\n\t * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis\r\n\t * for those who want to use the Minchas Cohen in Ma'amar 2:4\r\n\t * and the Pri Chadash who calculate tzais as a percentage\r\n\t * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based\r\n\t * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.\r\n\t * \r\n\t * @param degrees\r\n\t * the number of degrees below the horizon after sunset.\r\n\t * @param sunset\r\n\t * if true the calculation should be degrees after sunset, or if false, degrees before sunrise.\r\n\t * @return the double percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon\r\n\t * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed\r\n\t * explanation on top of the page.\r\n\t */\r\n\tpublic getPercentOfShaahZmanisFromDegrees(degrees:number, sunset: boolean):number|null {\r\n\t\tconst seaLevelSunrise: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n\t\tconst seaLevelSunset: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n\t\tlet twilight: Temporal.ZonedDateTime | null = null;\r\n\t\tif (sunset) {\r\n\t\t\ttwilight = this.getSunsetOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t} else {\r\n\t\t\ttwilight = this.getSunriseOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t}\r\n\t\tif (seaLevelSunrise == null || seaLevelSunset == null || twilight == null) {\r\n\t\t\treturn Long_MIN_VALUE;\r\n\t\t}\r\n\t\tconst shaahZmanis = seaLevelSunrise.until(seaLevelSunset).total('nanoseconds') / 12;\r\n\t\tlet riseSetToTwilight;\r\n\t\tif (sunset) {\r\n\t\t\triseSetToTwilight = seaLevelSunset.until(twilight).total('nanoseconds');\r\n\t\t} else {\r\n\t\t\triseSetToTwilight = twilight.until(seaLevelSunrise).total('nanoseconds');\r\n\t\t}\r\n\t\treturn riseSetToTwilight / shaahZmanis;\r\n\t}\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar, TimeZone } from './polyfills/Utils.ts';\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\n\r\nconst rZTDsort: typeof Temporal.ZonedDateTime.compare = (a,b) => {\r\n\tconst pSort = Temporal.ZonedDateTime.compare(a, b);\r\n\treturn pSort * -1 as Temporal.ComparisonResult;\r\n}\r\n\r\n/**\r\n *

This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis\r\n * for most zmanim in this class are from the sefer Yisroel\r\n * Vehazmanim by Rabbi Yisrael Dovid Harfenes.\r\n * As an example of the number of different zmanim made available by this class, there are methods to return 18\r\n * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this\r\n * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for\r\n * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the\r\n * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating\r\n * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest\r\n * for calculation beyond zmanim calculations. Here are some examples.\r\n *

First create the Calendar for the location you would like to calculate:\r\n * \r\n *

\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * // Optionally set the date or it will default to today's date\r\n * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);
\r\n *

\r\n * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from\r\n * year to year, if your version of Java does not have an up to date timezone database, create a\r\n * {@link java.util.SimpleTimeZone} with the known start and end of DST.\r\n * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),\r\n * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:\r\n *

\r\n *

\r\n *  Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);
\r\n *

\r\n * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting\r\n * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used:\r\n * \r\n *

\r\n * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);
\r\n *

\r\n * or even simpler using the included convenience methods\r\n *

\r\n * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());
\r\n *

\r\n * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is\r\n * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate\r\n * the Trumas Hadeshen's alos to\r\n * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.\r\n * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before\r\n * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais\r\n * do not use identical degree-based offsets, this leads to chatzos being at a time other than the\r\n * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note\r\n * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.\r\n *
\r\n *

\r\n * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
\r\n *

\r\n * Something a drop more challenging, but still simple, would be calculating a zman using the same \"complex\"\r\n * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not\r\n * supported by this library, such as calculating the point that one should be makpid\r\n * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day.\r\n *

    \r\n * \t
  1. Calculate the shaah zmanis in milliseconds for this day
  2. \r\n * \t
  3. Add 9 of these shaos zmaniyos to alos starting at 12°
  4. \r\n *
\r\n *
\r\n *
\r\n * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\tshaahZmanis * 9);
\r\n *

\r\n * Calculating this sof zman achila according to the GRA\r\n * is simplicity itself.\r\n *

\r\n * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);
\r\n * \r\n *

Documentation from the {@link ZmanimCalendar} parent class

\r\n * {@inheritDoc}\r\n * \r\n * @author © Eliyahu Hershfeld 2004 - 2023\r\n */\r\nexport class ComplexZmanimCalendar extends ZmanimCalendar {\r\n /**\r\n * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the\r\n * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun\r\n * is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.\r\n * \r\n * @see #getTzaisGeonim3Point7Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_7: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.7;\r\n\r\n /**\r\n * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the\r\n * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun\r\n * is 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.\r\n * \r\n * @see #getTzaisGeonim3Point8Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.8;\r\n\r\n /**\r\n * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun 24 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim5Point95Degrees()\r\n */\r\n protected static readonly ZENITH_5_POINT_95: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 5.95;\r\n\r\n /**\r\n * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as\r\n * 7°5' or 7° and 5 minutes. This calculation is used for calculating alos (dawn) and\r\n * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium sized\r\n * stars by Dr. Baruch Cohen in his calendar published in in 1899 in Strasbourg, France. This calculates to\r\n * 7.0833333° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Sh\"Ut\r\n * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh\"Ut Bnei Tziyon, Tenuvas Sadeh and\r\n * it is very close to the time of the Mekor Chesed of the Sefer chasidim.\r\n * It is close to the position of the sun 30 minutes after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and\r\n * 7.199° at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for details.\r\n * @todo Hyperlink the proper sources.\r\n * \r\n * @see #getTzaisGeonim7Point083Degrees()\r\n * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_083: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7 + (5 / 60);\r\n\r\n /**\r\n * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 45 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux which\r\n * calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir10Point2Degrees()\r\n */\r\n protected static readonly ZENITH_10_POINT_2: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 10.2;\r\n\r\n /**\r\n * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 48 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which\r\n * calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir11Degrees()\r\n */\r\n protected static readonly ZENITH_11_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 11;\r\n\r\n /**\r\n * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 52 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which\r\n * calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir11Point5Degrees()\r\n */\r\n protected static readonly ZENITH_11_POINT_5: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 11.5;\r\n\r\n /**\r\n * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating Rabbeinu Tam's bain hashmashos according to some opinions.\r\n * NOTE: See comments on {@link #getBainHashmashosRT13Point24Degrees} for additional details about the degrees.\r\n * \r\n * @see #getBainHashmashosRT13Point24Degrees\r\n * \r\n */\r\n protected static readonly ZENITH_13_POINT_24: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 13.24;\r\n\r\n /**\r\n * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos according to some opinions.\r\n * \r\n * @see #getAlos19Degrees()\r\n * @see #ZENITH_19_POINT_8\r\n */\r\n protected static readonly ZENITH_19_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 19;\r\n\r\n /**\r\n * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is\r\n * based on the position of the sun 90 minutes after sunset in Jerusalem around the equinox / equilux which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n * @see #getAlos90()\r\n * @see #getTzais90()\r\n * @see #ZENITH_19_DEGREES\r\n */\r\n protected static readonly ZENITH_19_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 19.8;\r\n\r\n /**\r\n * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is\r\n * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem oaround the equinox / equilux which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since the level of darkness when the sun is\r\n * 26° and at a point when the level of darkness is long past the 18° point where the darkest point is reached,\r\n * it should only be used lechumra such as delaying the start of nighttime mitzvos or avoiding eating\r\n * this early on a fast day.\r\n * \r\n * @see #getAlos26Degrees()\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n */\r\n protected static readonly ZENITH_26_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 26;\r\n\r\n /**\r\n * The zenith of 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5-minute Mil)\r\n * in Jerusalem around the equinox / equilux,\r\n * which calculates to 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim4Point37Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_37: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.37;\r\n\r\n /**\r\n * The zenith of 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24-minute Mil) in\r\n * Jerusalem around the equinox\r\n * / equilux, which calculates to 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo add documentation links\r\n * \r\n * @see #getTzaisGeonim4Point61Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_61: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.61;\r\n\r\n /**\r\n * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n * @see #getTzaisGeonim4Point8Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.8;\r\n\r\n /**\r\n * The zenith of 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim3Point65Degrees() 13.5 minutes} after sunset (3/4 of an 18-minute Mil)\r\n * in Jerusalem around the equinox / equilux which\r\n * calculates to 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim3Point65Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_65: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.65;\r\n\r\n /**\r\n * The zenith of 3.676° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n */\r\n protected static readonly ZENITH_3_POINT_676: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.676;\r\n\r\n /**\r\n * The zenith of 5.88° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n */\r\n protected static readonly ZENITH_5_POINT_88: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 5.88;\r\n\r\n /**\r\n * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the\r\n * Baal Hatanya.\r\n *\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n */\r\n protected static readonly ZENITH_1_POINT_583: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 1.583;\r\n\r\n /**\r\n * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos\r\n * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn\r\n * and netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n * a mil (Rambam and others). The sun's position at 72\r\n * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is\r\n * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n *\r\n * @see #getAlosBaalHatanya()\r\n */\r\n protected static readonly ZENITH_16_POINT_9: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 16.9;\r\n\r\n /**\r\n * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos\r\n * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn\r\n * and netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n * a mil (Rambam and others). The sun's position at 72\r\n * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is\r\n * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n *\r\n * @see #getAlosBaalHatanya()\r\n */\r\n protected static readonly ZENITH_6_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 6;\r\n\r\n /**\r\n * The zenith of 6.45° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This is based on the calculations of Rabbi Yechiel Michel Tucazinsky of the position of\r\n * the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset in Jerusalem, and at the\r\n * height of the summer solstice, this zman is 28 minutes after shkiah. This computes to 6.45°\r\n * below {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 it the commonly\r\n * used zman in Israel. It should be noted that this differs from the 6.1°/6.2° calculation for\r\n * Rabbi Tucazinsky's time as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515).\r\n * \r\n * @see #getTzaisGeonim6Point45Degrees()\r\n */\r\n protected static readonly ZENITH_6_POINT_45: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 6.45;\r\n\r\n /**\r\n * The zenith of 7.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions.\r\n * \r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_65: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7.65;\r\n\r\n /**\r\n * The zenith of 7.67° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais according to some opinions.\r\n * \r\n * @see #getTzaisGeonim7Point67Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_67: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7.67;\r\n\r\n /**\r\n * The zenith of 9.3° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions.\r\n * \r\n * @see #getTzaisGeonim9Point3Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_3: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.3;\r\n\r\n /**\r\n * The zenith of 9.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions.\r\n * \r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_5: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.5;\r\n\r\n /**\r\n * The zenith of 9.75° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions.\r\n * \r\n * @see #getTzaisGeonim9Point75Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_75: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.75;\r\n\r\n /**\r\n * The zenith of 2.1° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 13.5 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this. \r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_2_POINT_1: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 2.1;\r\n\r\n /**\r\n * The zenith of 2.8° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 16.875 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_2_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 2.8;\r\n\r\n /**\r\n * The zenith of 3.05° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 18 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this.\r\n * \r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_3_POINT_05: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 3.05;\r\n\r\n /**\r\n * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah. \r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n\r\n private ateretTorahSunsetOffset: number = 40;\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ComplexZmanimCalendar() {\r\n super();\r\n }\r\n*/\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 19.8° dip. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 19.8°\r\n * below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 19.8° below the western\r\n * geometric horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis19Point8Degrees() {\r\n return this.getTemporalHour(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides\r\n * the day based on the opinion of the Magen Avraham\r\n * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the\r\n * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric\r\n * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis18Degrees() {\r\n return this.getTemporalHour(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is\r\n * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when\r\n * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this\r\n * method are extremely late or early and at a point when the sky is a long time past the 18° point where the\r\n * darkest point is reached, zmanim that use this should only be used lechumra, such as\r\n * delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n */\r\n public getShaahZmanis26Degrees() {\r\n return this.getTemporalHour(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation\r\n * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the\r\n * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below\r\n * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a\r\n * shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzais16Point1Degrees()\r\n * @see #getSofZmanShmaMGA16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n * @see #getMinchaGedola16Point1Degrees()\r\n * @see #getMinchaKetana16Point1Degrees()\r\n * @see #getPlagHamincha16Point1Degrees()\r\n */\r\n\r\n public getShaahZmanis16Point1Degrees() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each\r\n * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n */\r\n public getShaahZmanis60Minutes() {\r\n return this.getTemporalHour(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day\r\n * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes\r\n * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part\r\n * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis72Minutes() {\r\n return this.getShaahZmanisMGA();\r\n }\r\n\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation\r\n * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day\r\n * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day\r\n * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzais72Zmanis()\r\n */\r\n public getShaahZmanis72MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise\r\n * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis90Minutes() {\r\n return this.getTemporalHour(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes\r\n * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal\r\n * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90Zmanis()\r\n * @see #getTzais90Zmanis()\r\n */\r\n public getShaahZmanis90MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the\r\n * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes\r\n * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12\r\n * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos96Zmanis()\r\n * @see #getTzais96Zmanis()\r\n */\r\n public getShaahZmanis96MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th\r\n * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before\r\n * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40\r\n * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()\r\n * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this\r\n * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across\r\n * the sky}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getShaahZmanisAteretTorah() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute\r\n * added for Rav Yosi.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaKetanaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point8() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point8Degrees());\r\n }\r\n \r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Gedola calculation.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaGedolaAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point7() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise\r\n * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah\r\n * zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis96Minutes() {\r\n return this.getTemporalHour(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and\r\n * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time\r\n * past the 18° point where the darkest point is reached, zmanim that use this should only be used\r\n * lechumra only, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis26Degrees()\r\n */\r\n public getShaahZmanis120Minutes() {\r\n return this.getTemporalHour(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are\r\n * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point\r\n * is reached, zmanim that use this should only be used lechumra such as delaying the start of\r\n * nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120Zmanis()\r\n */\r\n public getShaahZmanis120MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on sunrise\r\n * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after\r\n * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after\r\n * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very\r\n * late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120MinutesZmanis()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getPlagHamincha26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is\r\n * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link\r\n * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early\r\n * alos and a very late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getPlagHamincha26Degrees()\r\n */\r\n public getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the \r\n * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.\r\n * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that\r\n * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who\r\n * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the\r\n * Ra'avan is of the opinion that the time to walk a\r\n * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a\r\n * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an\r\n * 18-minute mil. Time based offset calculations are based on the opinion of the\r\n * Rishonim who stated that the time of the neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to\r\n * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a\r\n * degree-based calculation based on 60 minutes.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n *\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getAlos60() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before\r\n * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th\r\n * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to\r\n * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}\r\n * (depending on the {@link #isUseElevation()} setting).\r\n * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation\r\n * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.2);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or\r\n * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based\r\n * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset\r\n * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary\r\n * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos96() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90\r\n * minutes which is 1/8th of a day (12 * 60) / 8 = 90\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.5);\r\n }\r\n\r\n /**\r\n * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96\r\n * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.6);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level\r\n * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based\r\n * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it\r\n * takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos90() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 90 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes\r\n * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time\r\n * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations\r\n * for alos are based on the* opinion of the Rishonim\r\n * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of\r\n * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since\r\n * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast\r\n * day, and not as the start time for mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and method returns alos (dawn) calculated using\r\n * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based\r\n * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /\r\n * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link\r\n * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending\r\n * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link\r\n * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such\r\n * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be\r\n * performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-2);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link\r\n * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same\r\n * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This\r\n * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should\r\n * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for\r\n * mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_26_DEGREES\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getAlos26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the\r\n * eastern geometric horizon before sunrise.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the\r\n * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and \r\n * Rabbi Yaakov Shakow's Luach Ikvei Hayom.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos19Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_DEGREES);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation\r\n * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_19_POINT_8\r\n * @see #getAlos90()\r\n */\r\n public getAlos19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation\r\n * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_16_POINT_1\r\n * @see #getAlos72()\r\n */\r\n public getAlos16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,\r\n * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo recalculate.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_POINT_5\r\n */\r\n public getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,\r\n * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic\r\n * Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for\r\n * this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_DEGREES\r\n */\r\n public getMisheyakir11Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_DEGREES);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2\r\n * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates\r\n * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_10_POINT_2\r\n */\r\n public getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_10_POINT_2);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65\r\n * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute\r\n * zman around the\r\n * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)\r\n * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.\r\n * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36\r\n * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach\r\n * in the name of the Satmar Rov that one should be stringent\r\n * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,\r\n * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow\r\n * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_7_POINT_65\r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n public getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5\r\n * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's\r\n * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to\r\n * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz\r\n * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This\r\n * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,\r\n * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also\r\n * follows the opinion of Rabbi Shmuel Kamenetsky who provided\r\n * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of\r\n * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_9_POINT_5\r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n public getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This\r\n * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall\r\n * with both being 19.8° below sunrise or sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from\r\n * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of\r\n * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link\r\n * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion\r\n * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to\r\n * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link\r\n * #getSofZmanShmaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShmaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}\r\n * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated\r\n * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *\r\n * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}\r\n * after {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}\r\n * after {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96MinutesZmanis()\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated\r\n * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.\r\n * Generally known as part of the \"Komarno\" zmanim after Rav Yitzchak Eizik of\r\n * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the \r\n * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary\r\n * Lechem Mishneh on Brachos 1:2. It is\r\n * next brought down about 100 years later by the Yaavetz\r\n * (in his siddur, Mor Uktziah Orach\r\n * Chaim 1, Lechem Shamayim, Brachos 1:2\r\n * and She'elos Yaavetz vol. 1 no. 40),\r\n * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.\r\n * See Yisrael Vehazmanim vol. 1 7:3, page 55 -\r\n * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed\r\n * local chatzos} for calculating this type of zman.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n */\r\n public getSofZmanShma3HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 180 })\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.\r\n * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes\r\n * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3\r\n * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that\r\n * is very much a chumra.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based\r\n * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \\u05D7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\r\n * \\u05D5\\u05DB\\u05DC\\u05DC\\u05D5\\u05EA \\u05D4\\u05E8\\u05D6\\u05F4\\u05D4 and the \\u05DE\\u05E0\\u05D5\\u05E8\\u05D4 \\u05D4\\u05D8\\u05D4\\u05D5\\u05E8\\u05D4 as\r\n * mentioned by Yisrael Vehazmanim vol 1, sec. 7,\r\n * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)\r\n * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link\r\n * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this day. If the calculation can't\r\n * be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated\r\n * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3\r\n * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on\r\n * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the\r\n * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from\r\n * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getFixedLocalChatzos()\r\n * \r\n * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in\r\n * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method\r\n * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.\r\n */\r\n public getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null {\r\n const chatzos = this.getFixedLocalChatzos()!;\r\n if (chatzos === null || this.getSunrise() === null) {\r\n return null;\r\n }\r\n let diff = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getElevationAdjustedSunrise()?.until(chatzos).total(\"nanoseconds\")! / 2) });\r\n return chatzos.subtract(diff)\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before\r\n * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to\r\n * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72\r\n * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}\r\n * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after\r\n * {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}\r\n * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after\r\n * {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4\r\n * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120\r\n * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of\r\n * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman\r\n * that is very much a chumra.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate\r\n * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n */\r\n public getSofZmanTfila2HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}\r\n * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as\r\n * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when\r\n * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See\r\n * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One\r\n * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.\r\n * See Shulchan Aruch Orach Chayim 234:1 and\r\n * the Shaar Hatziyon seif katan ches.\r\n * \r\n * @return the Date of 30 minutes after chatzos. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedola30Minutes() {\r\n return this.getChatzos()?.add({ minutes: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72\r\n * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For\r\n * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getAlos72()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n if(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, this.getTzais16Point1Degrees()!, 0.5);\r\n\t\t} else {\r\n\t\t\treturn this.getMinchaGedola(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n\t\t}\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah\r\n * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link\r\n * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.\r\n * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}\r\n * (though that calculation is based on mincha gedola GRA).\r\n * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * \r\n * @return the Date of the mincha gedola. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim3Point7Degrees()\r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point7()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null {\r\n if (!this.getMinchaGedola30Minutes() || !this.getMinchaGedola() || !this.getShaahZmanisAlos16Point1ToTzais3Point7()) {\r\n console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(), this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees())\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getChatzos()?.add({nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7()!.total(\"nanoseconds\") / 2)})!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedola()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is\r\n * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}\r\n * will be returned.\r\n *\r\n * @return the Date of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedola() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedola()!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the\r\n * opinion of the Rambam and others. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos\r\n * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos\r\n * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at\r\n * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to\r\n * the opinion of the Rambam and others. For more information\r\n * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. \r\n * \r\n * @return the the Date of the time of mincha ketana. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getMinchaKetanaAhavatShalom() {\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract({\r\n nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 2.5)\r\n })\r\n }\r\n\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day\r\n * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray\r\n * mincha according to the opinion of the Rambam\r\n * and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60\r\n * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after\r\n * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis60Minutes()\r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n */\r\n public getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after\r\n * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis72Minutes()\r\n */\r\n public getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after\r\n * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis90Minutes()\r\n */\r\n public getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the Magen\r\n * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75\r\n * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after\r\n * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n */\r\n public getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as\r\n * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after\r\n * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link\r\n * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}\r\n * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it\r\n * should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n */\r\n public getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link\r\n * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n */\r\n public getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link\r\n * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link\r\n * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late\r\n * tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link\r\n * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link\r\n * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n */\r\n public getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the opinion\r\n * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.\r\n * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()\r\n * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()\r\n * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *\r\n * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getPlagAlosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the opinion that the day starts at\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()\r\n * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal\r\n * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a\r\n * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated\r\n * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the\r\n * opinion of Rabbi Yaakov Moshe Hillel as published in\r\n * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated\r\n * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos\r\n * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and\r\n * ending at tzais 3.8°.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getMinchaKetanaAhavatShalom()\r\n */\r\n public getPlagAhavatShalom() {\r\n const distance = Temporal.Duration.from({ nanoseconds: this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 1.25 });\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract(distance)\r\n }\r\n\r\n /**\r\n * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is\r\n * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)\r\n * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()\r\n * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact\r\n * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.\r\n * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second\r\n * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10\r\n * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper\r\n * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.\r\n * @todo recalculate the above based on equilux/equinox calculations.\r\n * \r\n * @return the Date of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}\r\n * (90°). If the calculation can't be computed such as northern and southern locations even south of the\r\n * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon\r\n * for this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_13_POINT_24\r\n * @see #getBainHashmashosRT58Point5Minutes()\r\n */\r\n public getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_13_POINT_24);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5\r\n * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4\r\n * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.\r\n * \r\n * @return the Date of 58.5 minutes after sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n */\r\n public getBainHashmashosRT58Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 58, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an\r\n * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.\r\n * \r\n * @return the Date of the bain hashmashos of Rabbeinu Tam in this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083)?.subtract({ minutes: 13, seconds: 30 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the\r\n * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between\r\n * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time\r\n * for bain hashmashos of Rabbeinu Tam.\r\n * \r\n * @return the Date of bain hashmashos of Rabbeinu Tam for this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getBainHashmashosRT2Stars() {\r\n const alos19Point8: Temporal.ZonedDateTime | null = this.getAlos19Point8Degrees();\r\n const sunrise: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise();\r\n if (alos19Point8 === null || sunrise === null) {\r\n return null;\r\n }\r\n\r\n const inverseOfSunriseToAlot = -alos19Point8.until(sunrise).total(\"nanoseconds\")\r\n\r\n return this.getElevationAdjustedSunset()?.add({ nanoseconds: inverseOfSunriseToAlot * (5 / 18) });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes\r\n * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4\r\n * of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date of 18 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim18Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 18 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 3.05° above the horizon around the equinox / equilux,\r\n * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional\r\n * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down\r\n * by Rabbi\r\n * Yedidya Manet in his Zmanei Halacha\r\n * Lema\u2019aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim\r\n * zmanim. The 0.5166° refraction is also used by the Luach Itim\r\n * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested\r\n * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim\u2019s Bein Hashmashos.\r\n * \r\n * @todo recalculate based on equinox/equilux\r\n * @return the Date of the sun's position 3.05° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_3_POINT_05\r\n * @see #getBainHashmashosYereim18Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_3_POINT_05);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875\r\n * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos\r\n * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date of 16.875 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n public getBainHashmashosYereim16Point875Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 16, seconds: 52, milliseconds: 500 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.8° above the horizon around the equinox / equilux,\r\n * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date of the sun's position 2.8° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_8\r\n * @see #getBainHashmashosYereim16Point875Minutes()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes\r\n * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of\r\n * a Mil before sunset and tzais or nightfall starts at sunset.\r\n * \r\n * @return the Date of 13.5 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim13Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 13, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.1° above the horizon around the equinox / equilux in\r\n * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,\r\n * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date of the sun's position 2.1° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_1\r\n * @see #getBainHashmashosYereim13Point5Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 3.7° below sea level.\r\n * @see #ZENITH_3_POINT_7\r\n */\r\n public getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_7);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 3.8° below sea level.\r\n * @see #ZENITH_3_POINT_8\r\n */\r\n public getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 5.95° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_95\r\n */\r\n public getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_95);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 3.65° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_3_POINT_65\r\n */\r\n public getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western\r\n * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be\r\n * relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 3.676° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_3_POINT_676\r\n */\r\n public getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_676);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a mil based\r\n * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the\r\n * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 4.61° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_61\r\n */\r\n public getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_61);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil, based on a 22.5\r\n * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 4.37° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_37\r\n */\r\n public getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_37);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a 24-minute Mil,\r\n * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the\r\n * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early\r\n * zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @todo Additional detailed documentation needed.\r\n * @return the Date representing the time when the sun is 5.88° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_88\r\n */\r\n public getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_88);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on the\r\n * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's\r\n * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * @todo Additional documentation needed.\r\n * \r\n * @return the Date representing the time when the sun is 4.8° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_8\r\n */\r\n public getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by\r\n * Rabbi Yechiel Michel Tucazinsky. It is\r\n * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset\r\n * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This\r\n * computes to 6.45° below the western horizon.\r\n * @todo Additional documentation details needed.\r\n * \r\n * @return the Date representing the time when the sun is 6.45° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_6_POINT_45\r\n */\r\n public getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_POINT_45);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the\r\n * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\\u2032}) below the western horizon. This is often\r\n * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized\r\n * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben f\u00FCr\r\n * den Beginn der Nacht und des Tages f\u00FCr die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.\r\n * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his\r\n * Sh\"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),\r\n * as did the Sh\"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes\r\n * after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°\r\n * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.\r\n * \r\n * @return the Date representing the time when the sun is 7.083° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_083\r\n */\r\n public getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083);\r\n }\r\n\r\n /**\r\n * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes\r\n * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's\r\n * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding\r\n * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in\r\n * chapter 10 (page 87) and\r\n * chapter 12 (page 108). Also see the\r\n * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.\r\n * This zman is also listed in the Divrei\r\n * Shalom Vol. III, chapter 75, and Bais Av\"i\r\n * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not\r\n * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based\r\n * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed\r\n * to it.\r\n * @todo add hyperlinks to source of Divrei Shalom.\r\n * @return the Date representing the time when the sun is 7.67° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_67\r\n */\r\n public getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_67);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 8.5° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_8_POINT_5\r\n */\r\n public getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is\r\n * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 9.3° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_3);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60\r\n * minutes after sunset around the equinox / equilux, the\r\n * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to\r\n * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of\r\n * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented\r\n * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @todo recalculate based on equinox / equilux.\r\n * @return the Date representing the time when the sun is 9.75° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see #getTzais60()\r\n */\r\n public getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_75);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes\r\n * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the\r\n * 60 minute concept at {@link #getAlos60()}.\r\n * \r\n * @return the Date representing 60 minutes after sea level sunset. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getTzais60() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * This method returns tzais usually calculated as 40 minutes (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom\r\n * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman\r\n * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman\r\n * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change\r\n * by calling {@link #setAteretTorahSunsetOffset(double)}.\r\n * \r\n * @return the Date representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})\r\n * after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getTzaisAteretTorah() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: this.getAteretTorahSunsetOffset() });\r\n }\r\n\r\n /**\r\n * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.\r\n * This affects most zmanim, since almost all zmanim use subset as part of their calculation.\r\n * \r\n * @return the number of minutes after sunset for Tzait.\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getAteretTorahSunsetOffset(): number {\r\n return this.ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is\r\n * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception\r\n * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.\r\n * This offset impacts all Ateret Torah zmanim.\r\n * \r\n * @param ateretTorahSunsetOffset\r\n * the number of minutes after sunset to use as an offset for the Ateret Torah tzais\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void {\r\n this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added\r\n * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos\r\n * will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getShaahZmanisAteretTorah()\r\n */\r\n public getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation\r\n * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()\r\n * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes\r\n * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos\r\n * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time\r\n * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the calculation of Chacham Yosef\r\n * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}\r\n * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest\r\n * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha\r\n * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The\r\n * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetanaAteretTorah()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72Zmanis()!, this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the calculation of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha\r\n * according to the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.\r\n * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is\r\n * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset\r\n * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and\r\n * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()\r\n * dawn}.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as in the Arctic Circle\r\n * where there is at least one day a year where the sun does not rise, and one where it does not set, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY\r\n * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the\r\n * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to\r\n * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to\r\n * Chacham Baruch Ben Haim). Since there is no\r\n * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of\r\n * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any\r\n * specific calculation for misheyakir. For that reason, this method is not a public method.\r\n *\r\n * @param minutes\r\n * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}\r\n * @return the Date of misheyakir. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n private getMesheyakirAteretTorah(minutes: number) {\r\n return this.getAlos72Zmanis()?.add({ minutes })\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's\r\n * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to\r\n * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the\r\n * equinox. This does not match reality, since there is no direct relationship between the length of the day and\r\n * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the\r\n * winter with the shortest daylight, the twilight period is longer than during the equinoxes.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getTzais72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.2);\r\n }\r\n\r\n /**\r\n * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. \r\n * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn\r\n * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the\r\n * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk)\r\n * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it is sunrise\r\n * or sunset based).\r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise\r\n * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n private getZmanisBasedOffset(hours: 0): undefined;\r\n private getZmanisBasedOffset(hours: Exclude): Temporal.ZonedDateTime;\r\n private getZmanisBasedOffset(hours: number): Temporal.ZonedDateTime | undefined {\r\n if (hours == 0)\r\n return;\r\n\r\n const shaahZmanis = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getShaahZmanisGra()!.total('nanoseconds') * Math.abs(hours)) });\r\n\r\n if (hours > 0) {\r\n return this.getElevationAdjustedSunset()?.add(shaahZmanis);\r\n } else {\r\n return this.getElevationAdjustedSunrise()?.subtract(shaahZmanis);\r\n }\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link\r\n * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)\r\n * zman.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getTzais90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.5);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getTzais96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.6);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a\r\n * Mil according to the Rambam's opinion\r\n * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5\r\n * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}\r\n * uses solar position calculations based on this time.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos90()\r\n */\r\n public getTzais90() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 90 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (nightfall) based on the calculations\r\n * of Rav Chaim Naeh that the time to walk the\r\n * distance of a Mil according to the Rambam's opinion\r\n * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated\r\n * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link\r\n * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman\r\n * is extremely late and at a point that is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n */\r\n public getTzais120() {\r\n return this.getElevationAdjustedSunset()!.add({ minutes: 120 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman\r\n * is extremely late and at a point when the it is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getTzais120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(2);\r\n }\r\n\r\n /**\r\n * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is\r\n * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais\r\n * around the equinox / equilux in\r\n * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See\r\n * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages\r\n * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the\r\n * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a\r\n * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais72()\r\n * @see #getAlos16Point1Degrees() for more information on this calculation.\r\n */\r\n public getTzais16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais based on when the sun is 26°\r\n * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.\r\n * Since the zman is extremely late and at a point when it is long past the 18° point where the\r\n * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime\r\n * mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getTzais26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n */\r\n public getTzais18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais90()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getTzais19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how\r\n * this is calculated see the comments on {@link #getAlos96()}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96()\r\n */\r\n public getTzais96() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from\r\n * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°\r\n * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00\r\n * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.\r\n * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This\r\n * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied\r\n * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.\r\n * \r\n * @return the Date representing the local chatzos\r\n * @see GeoLocation#getLocalMeanTimeOffset()\r\n */\r\n public getFixedLocalChatzos() {\r\n return this.getLocalMeanTime(12.0);\r\n }\r\n\r\n /**\r\n * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3\r\n * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim\r\n * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular\r\n * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to\r\n * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()}.\r\n * \r\n * @return the Date of the latest zman krias shema calculated as 3 clock hours before\r\n * {@link #getFixedLocalChatzos()}.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n * @see #getSofZmanTfilaFixedLocal()\r\n * \r\n * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.\r\n * This will likely be removed in v3.0.\r\n */\r\n public getSofZmanShmaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 180 });\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing\r\n * differing opinions on how the zman is calculated. According to many opinions {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.\r\n * \r\n * @return the Date of the latest zman tfila.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n * \r\n * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed\r\n * clock hours. This will likely be removed in v3.0.\r\n */\r\n public getSofZmanTfilaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kidush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time\r\n * between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad.\r\n * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in\r\n * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,\r\n * the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameter\r\n * are null, no daytime adjustment will be made.\r\n * @return the Date representing the moment halfway between molad and molad. If the time occurs between\r\n * alos and tzais, alos will be returned\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see #getSofZmanKidushLevana15Days(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime) : Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French\r\n // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana\r\n // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the\r\n // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { \r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana\r\n * can only be said during the day, there are parameters to limit it to between alos and tzais. If\r\n * the time occurs between alos and tzais, tzais will be returned.\r\n * \r\n * @param moladBasedTime\r\n * the molad based time such as molad, tchilas and sof zman Kiddush Levana\r\n * @param alos\r\n * optional start of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either alos or tzais are null.\r\n * @param tzais\r\n * optional end of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either tzais or alos are null\r\n * @param techila\r\n * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and\r\n * and if it is the end, return the end of the previous night (alos passed in). Ignored if either\r\n * alos or tzais are null.\r\n * @return the molad based time. If the zman does not occur during the current date, null will be returned. \r\n */\r\n private getMoladBasedTime(moladBasedTime: Temporal.ZonedDateTime, alos: Temporal.ZonedDateTime | null, tzais: Temporal.ZonedDateTime | null, techila: boolean): Temporal.ZonedDateTime | null {\r\n const lastMidnight: Temporal.ZonedDateTime = this.getMidnightLastNight();\r\n const midnightTonight: Temporal.ZonedDateTime = this.getMidnightTonight();\r\n\r\n if (!((moladBasedTime < lastMidnight) || (moladBasedTime > midnightTonight))) {\r\n if (alos !== null || tzais !== null) {\r\n return techila && !(moladBasedTime < tzais! || moladBasedTime > alos!)\r\n ? tzais\r\n : alos;\r\n }\r\n return moladBasedTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the\r\n * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of\r\n * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,\r\n * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during\r\n * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a\r\n * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and\r\n * tzais, alos will be returned\r\n * \r\n * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevana15Days()\r\n */\r\n public getSofZmanKidushLevana15Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in\r\n // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush\r\n // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will\r\n // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) {\r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the molad.\r\n * If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to\r\n * this method) it will return the following tzais. If null is passed for either alos or tzais, the actual\r\n * tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending\r\n * at tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getTchilasZmanKidushLevana3Days()\r\n */\r\n public getTchilasZmanKidushLevana3Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n jewishCalendar.setGregorianDate(this.getDate().year, this.getDate().month - 1, this.getDate().day);\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh. The 3rd day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day\r\n // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) {\r\n return null;\r\n }\r\n\r\n let zman: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true);\r\n\r\n // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when\r\n // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32)\r\n if (zman === null && jewishCalendar.getJewishDayOfMonth() === 30) {\r\n jewishCalendar.forward(Calendar.MONTH, 1);\r\n zman = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true);\r\n }\r\n\r\n return zman;\r\n }\r\n\r\n /**\r\n * Returns the point in time of Molad as a Date Object. For the traditional day of week, hour,\r\n * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed\r\n * {@link HebrewDateFormatter} that will have formatting for this.\r\n * \r\n * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.\r\n * \r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getMoladAsDate()\r\n */\r\n public getZmanMolad(): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa\r\n // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on\r\n // Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) {\r\n return null;\r\n }\r\n\r\n let molad: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n\r\n // deal with molad that happens on the end of the previous month\r\n if (molad === null && jewishCalendar.getJewishDayOfMonth() > 26) {\r\n jewishCalendar.setDate(jewishCalendar.getDate().add({ months: 1 }))\r\n molad = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n }\r\n return molad;\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return previous midnight\r\n */\r\n private getMidnightLastNight(): Temporal.ZonedDateTime {\r\n // reset hour, minutes, seconds and millis\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return following midnight\r\n */\r\n private getMidnightTonight(): Temporal.ZonedDateTime {\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone())\r\n .add({ days: 1 })\r\n .with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7\r\n * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between\r\n * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it\r\n * return the next tzais.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos\r\n * and ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days(Date, Date)\r\n * @see #getTchilasZmanKidushLevana7Days()\r\n * @see JewishCalendar#getTchilasZmanKidushLevana7Days()\r\n */\r\n public getTchilasZmanKidushLevana7Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day\r\n // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) {\r\n return null;\r\n }\r\n\r\n return this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true);\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to\r\n * the opinion of theGRA. This time is identical to the {@link\r\n * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are\r\n * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the\r\n * GRA that the day is calculated from sunrise to sunset.\r\n * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @see ZmanimCalendar#getSofZmanTfilaGRA()\r\n * @return the Date one is allowed eating chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaGRA();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the\r\n * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()\r\n * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is\r\n * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date of the latest time of eating chametz. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n * @see #getSofZmanTfilaMGA72Minutes()\r\n */\r\n public getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA72Minutes();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of theMagen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link\r\n * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest time of eating chametz. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n */\r\n public getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA16Point1Degrees();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the GRA. This time is 5 hours into the day based on the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea\r\n * level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link\r\n * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of\r\n * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link\r\n * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after\r\n * {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n */\r\n public getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos72()!, this.getTzais72()!, 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5\r\n * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()\r\n * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees(), 5);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are\r\n * calculated as a dip below the horizon before sunrise.\r\n *\r\n * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's\r\n * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which\r\n * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom\r\n * DovBer Levine's commentary on The Baal\r\n * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°\r\n * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by\r\n * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after\r\n * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman\r\n * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n *\r\n * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the\r\n * published time for netz / sunrise.\r\n * \r\n * @return the Date representing the exact sea-level netz amiti (sunrise) time. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * \r\n * @see #getSunrise()\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunriseBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated\r\n * as a dip below the horizon after sunset.\r\n * \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n *\r\n * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.\r\n *\r\n * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n * \r\n * @return the Date representing the exact sea-level shkiah amiti (sunset) time. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getSunset()\r\n * @see #getSeaLevelSunset()\r\n * @see #getSunriseBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunsetBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the\r\n * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset. \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated \r\n * based on the Baal Hatanya's netz\r\n * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides\r\n * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}\r\n * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link\r\n * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.\r\n * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link\r\n * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.\r\n * @return the long millisecond length of a shaah zmanis calculated from\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti\r\n * (\"real\" sunset)}. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a\r\n * year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n public getShaahZmanisBaalHatanya() {\r\n return this.getTemporalHour(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * Returns the Baal Hatanya's alos\r\n * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}\r\n * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.\r\n * \r\n * @see #ZENITH_16_POINT_9\r\n * @return The Date of dawn. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getAlosBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_9);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3\r\n * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from\r\n * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanShma(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest zman shema according to the Baal Hatanya. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4\r\n * hours into the day based on the opinion of the Baal Hatanya that the day is\r\n * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanTfila(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah\r\n * Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getSofZmanTfilaBaalHatanya()\r\n * @return the Date one is allowed eating chametz on Erev Pesach. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaBaalHatanya();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya(), 5)\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray\r\n * mincha. The Rambam is of the opinion that it is\r\n * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the\r\n * Ra\"sh,\r\n * Tur, GRA and others are of the opinion that mincha can be prayed\r\n * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()\r\n * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based\r\n * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5\r\n * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (\"real\" sunrise)}.\r\n * \r\n * @see #getMinchaGedola(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaKetanaBaalHatanya()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getSunriseBaalHatanya()!, this.getSunsetBaalHatanya()!);\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()\r\n * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise\r\n * {@link #getMinchaGedolaBaalHatanya()} will be returned.\r\n * \r\n * @return the Date of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedolaBaalHatanya() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedolaBaalHatanya()!\r\n ].sort(rZTDsort)[0];\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana. This is the preferred earliest time to pray\r\n * mincha in the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya()\r\n * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the\r\n * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link\r\n * #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getMinchaKetana(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaGedolaBaalHatanya()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This\r\n * calculation is based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getPlagHamincha(Date, Date)\r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon\r\n * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see\r\n * {@link #ZENITH_6_DEGREES}.\r\n *\r\n * @return The Date of nightfall. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_6_DEGREES\r\n */\r\n public getTzaisBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_DEGREES);\r\n }\r\n\r\n /**\r\n * A utility methos to calculate zmanim based on Rav Moshe\r\n * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the\r\n * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated\r\n * based on the first 6 hours, and afternoon times based on the second half of the day.\r\n * \r\n * @param startOfHalfDay\r\n * The start of the half day. This would be alos or sunrise for morning based times and fixed\r\n * local chatzos for the second half of the day.\r\n * @param endOfHalfDay\r\n * The end of the half day. This would be fixed local chatzos for morning based times and sunset\r\n * or tzais for afternoon based times.\r\n * @param hours\r\n * the number of hours to offset the beginning of the first or second half of the day\r\n * \r\n * @return the Date of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n */\r\n public getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n if (startOfHalfDay == null || endOfHalfDay == null) {\r\n return null;\r\n }\r\n const shaahZmanis = startOfHalfDay.until(endOfHalfDay).total('nanoseconds') / 6;\r\n return startOfHalfDay.add({ nanoseconds: Math.trunc(shaahZmanis * hours) });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos90()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos72()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()\r\n * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos\r\n * zmaniyos (solar hours) after sunrise or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))\r\n * according to the opinion of the GRA that the day is\r\n * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at\r\n * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila\r\n * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 4);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of\r\n * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed\r\n * local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n */\r\n public getMinchaGedolaGRAFixedLocalChatzos30Minutes() {\r\n return this.getFixedLocalChatzos()?.add({ minutes: 30 });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to\r\n * the opinion of the Rambam and others) calculated according\r\n * to the GRA that is 3.5 shaos zmaniyos (solar\r\n * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 3.5);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the\r\n * GRA that the day ends at sunset and is 4.75 shaos\r\n * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getPlagHamincha()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 4.75);\r\n }\r\n \r\n /**\r\n * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should\r\n * not be used for latitudes different than the NY area.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getTzais50() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 50 });\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link\r\n * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}\r\n * setting), calculated according to the GRA using a day starting at\r\n * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.\r\n * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos\r\n * 16.1°}. See the Mechaber and Mishna Berurah\r\n * 232 for details.\r\n * \r\n * @see #getShaahZmanisGra()\r\n * @see #getSamuchLeMinchaKetana16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise()!, this.getElevationAdjustedSunset()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity\r\n * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating\r\n * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ComplexZmanimCalendar';\r\n }\r\n}\r\n", "import { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in\r\n * this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and\r\n * milliseconds of a {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2011\r\n * @version 0.9.0\r\n */\r\n\r\nexport class Time {\r\n /** milliseconds in a second. */\r\n private static readonly SECOND_MILLIS: number = 1000;\r\n\r\n /** milliseconds in a minute. */\r\n private static readonly MINUTE_MILLIS: number = Time.SECOND_MILLIS * 60;\r\n\r\n /** milliseconds in an hour. */\r\n private static readonly HOUR_MILLIS: number = Time.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * @see #getHours()\r\n */\r\n private hours: number = 0;\r\n\r\n /**\r\n * @see #getMinutes()\r\n */\r\n private minutes: number = 0;\r\n\r\n /**\r\n * @see #getSeconds()\r\n */\r\n private seconds: number = 0;\r\n\r\n /**\r\n * @see #getMilliseconds()\r\n */\r\n private milliseconds: number = 0;\r\n\r\n /**\r\n * @see #isNegative()\r\n * @see #setIsNegative(boolean)\r\n */\r\n private negative: boolean = false;\r\n\r\n /**\r\n * Constructor with parameters for the hours, minutes, seconds and millisecods.\r\n *\r\n * @param hours the hours to set\r\n * @param minutes the minutes to set\r\n * @param seconds the seconds to set\r\n * @param milliseconds the milliseconds to set\r\n */\r\n constructor(hours: number, minutes: number, seconds: number, milliseconds: number);\r\n /**\r\n * A constructor that sets the time by milliseconds. The milliseconds are converted to hours, minutes, seconds\r\n * and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * @param millis the milliseconds to set.\r\n */\r\n constructor(millis: number);\r\n /**\r\n * A constructor with 2 overloads:\r\n * - A constructor that sets the time by milliseconds.\r\n * The milliseconds are converted to hours, minutes, seconds and milliseconds. If the\r\n * milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * - A constructor with parameters for the hours, minutes, seconds and millisecods.\r\n * @param hoursOrMillis\r\n * @param minutes\r\n * @param seconds\r\n * @param milliseconds\r\n */\r\n constructor(hoursOrMillis: number, minutes?: number, seconds: number = 0, milliseconds: number = 0) {\r\n if (minutes) {\r\n this.hours = hoursOrMillis;\r\n this.minutes = minutes;\r\n this.seconds = seconds;\r\n this.milliseconds = milliseconds;\r\n } else {\r\n let adjustedMillis: number = hoursOrMillis;\r\n if (adjustedMillis < 0) {\r\n this.negative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = Math.trunc(adjustedMillis / Time.HOUR_MILLIS);\r\n adjustedMillis = adjustedMillis - this.hours * Time.HOUR_MILLIS;\r\n\r\n this.minutes = Math.trunc(adjustedMillis / Time.MINUTE_MILLIS);\r\n adjustedMillis = adjustedMillis - this.minutes * Time.MINUTE_MILLIS;\r\n\r\n this.seconds = Math.trunc(adjustedMillis / Time.SECOND_MILLIS);\r\n adjustedMillis = adjustedMillis - this.seconds * Time.SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n }\r\n\r\n /*\r\n public Time(millis: number) {\r\n this((int) millis);\r\n }\r\n\r\n public Time(millis: number) {\r\n adjustedMillis: number = millis;\r\n if (adjustedMillis < 0) {\r\n this.isNegative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = adjustedMillis / HOUR_MILLIS;\r\n adjustedMillis = adjustedMillis - this.hours * HOUR_MILLIS;\r\n\r\n this.minutes = adjustedMillis / MINUTE_MILLIS;\r\n adjustedMillis = adjustedMillis - this.minutes * MINUTE_MILLIS;\r\n\r\n this.seconds = adjustedMillis / SECOND_MILLIS;\r\n adjustedMillis = adjustedMillis - this.seconds * SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n */\r\n\r\n /**\r\n * Does the time represent a negative time 9such as using this to subtract time from another Time.\r\n * @return if the time is negative.\r\n */\r\n public isNegative(): boolean {\r\n return this.negative;\r\n }\r\n\r\n /**\r\n * Set this to represent a negative time.\r\n * @param isNegative that the Time represents negative time\r\n */\r\n public setIsNegative(isNegative: boolean): void {\r\n this.negative = isNegative;\r\n }\r\n\r\n /**\r\n * @return Returns the hour.\r\n */\r\n public getHours(): number {\r\n return this.hours;\r\n }\r\n\r\n /**\r\n * @param hours\r\n * The hours to set.\r\n */\r\n public setHours(hours: number): void {\r\n this.hours = hours;\r\n }\r\n\r\n /**\r\n * @return Returns the minutes.\r\n */\r\n public getMinutes(): number {\r\n return this.minutes;\r\n }\r\n\r\n /**\r\n * @param minutes\r\n * The minutes to set.\r\n */\r\n public setMinutes(minutes: number): void {\r\n this.minutes = minutes;\r\n }\r\n\r\n /**\r\n * @return Returns the seconds.\r\n */\r\n public getSeconds(): number {\r\n return this.seconds;\r\n }\r\n\r\n /**\r\n * @param seconds\r\n * The seconds to set.\r\n */\r\n public setSeconds(seconds: number): void {\r\n this.seconds = seconds;\r\n }\r\n\r\n /**\r\n * @return Returns the milliseconds.\r\n */\r\n public getMilliseconds(): number {\r\n return this.milliseconds;\r\n }\r\n\r\n /**\r\n * @param milliseconds\r\n * The milliseconds to set.\r\n */\r\n public setMilliseconds(milliseconds: number): void {\r\n this.milliseconds = milliseconds;\r\n }\r\n\r\n /**\r\n * Returns the time in milliseconds by converting hours, minutes and seconds into milliseconds.\r\n * @return the time in milliseconds\r\n */\r\n public getTime(): number {\r\n return this.hours * Time.HOUR_MILLIS + this.minutes * Time.MINUTE_MILLIS + this.seconds * Time.SECOND_MILLIS\r\n + this.milliseconds;\r\n }\r\n\r\n /**\r\n * @deprecated This depends on a circular dependency. Use
new ZmanimFormatter(TimeZone.getTimeZone(\"UTC\")).format(time)
instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): string {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new ZmanimFormatter(TimeZone.getTimeZone(\\'UTC\\')).format(time)` instead');\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { IntegerUtils, StringUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times.\r\n * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a\r\n * zman.\r\n *\r\n * Here is an example of various ways of sorting zmanim.\r\n *

First create the Calendar for the location you would like to calculate:\r\n *\r\n *

\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * Zman sunset = new Zman(czc.getSunset(), \"Sunset\");\r\n * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), \"Shaah zmanis 16.1\");\r\n * Zman sunrise = new Zman(czc.getSunrise(), \"Sunrise\");\r\n * Zman shaah = new Zman(czc.getShaahZmanisGra(), \"Shaah zmanis GRA\");\r\n * ArrayList<Zman> zl = new ArrayList<Zman>();\r\n * zl.add(sunset);\r\n * zl.add(shaah16);\r\n * zl.add(sunrise);\r\n * zl.add(shaah);\r\n * //will sort sunset, shaah 1.6, sunrise, shaah GRA\r\n * System.out.println(zl);\r\n * Collections.sort(zl, Zman.DATE_ORDER);\r\n * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order)\r\n * Collections.sort(zl, Zman.DURATION_ORDER);\r\n * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6\r\n * Collections.sort(zl, Zman.NAME_ORDER);\r\n * // will sort shaah 1.6, shaah GRA, sunrise, sunset\r\n * 
\r\n *\r\n * @author © Eliyahu Hershfeld 2007-2020\r\n * @todo Add secondary sorting. As of now the {@code Comparator}s in this class do not sort by secondary order. This means that when sorting a\r\n * {@link java.util.Collection} of zmanim and using the {@link #DATE_ORDER} {@code Comparator} will have the duration based zmanim\r\n * at the end, but they will not be sorted by duration. This should be N/A for label based sorting.\r\n */\r\nexport class Zman {\r\n /**\r\n * The name / label of the zman.\r\n */\r\n label: string | null;\r\n\r\n /**\r\n * The {@link Date} of the zman\r\n */\r\n zman?: Temporal.ZonedDateTime;\r\n\r\n /**\r\n * The duration if the zman is a {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various\r\n * shaah zmanis base times such as {@link ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}).\r\n */\r\n duration?: number;\r\n\r\n /**\r\n * A longer description or explanation of a zman.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The constructor setting a {@link Date} based zman and a label.\r\n * @param date the Date of the zman.\r\n * @param label the label of the zman such as \"Sof Zman Krias Shema GRA\".\r\n * @see #Zman(long, String)\r\n */\r\n constructor(date: Temporal.ZonedDateTime, label: string | null);\r\n /**\r\n * The constructor setting a duration based zman such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as\r\n * {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label.\r\n * @param duration a duration based zman such as ({@link AstronomicalCalendar#getTemporalHour()}\r\n * @param label the label of the zman such as \"Shaah Zmanis GRA\".\r\n * @see #Zman(Date, String)\r\n */\r\n constructor(duration: number, label: string | null);\r\n constructor(dateOrDuration: number | Temporal.ZonedDateTime, label: string | null) {\r\n this.label = label;\r\n if (dateOrDuration instanceof Temporal.ZonedDateTime) {\r\n this.zman = dateOrDuration;\r\n } else if (typeof dateOrDuration === 'number') {\r\n this.duration = dateOrDuration;\r\n }\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by date/time order. Compares its two arguments by the zman's date/time\r\n * order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will handle cases where either the {@code Zman} is a null or {@link #getZman()} returns a null.\r\n */\r\n static compareDateOrder(zman1: Zman, zman2: Zman): number {\r\n const times = [zman1, zman2].map(zman => zman.zman) as [Temporal.ZonedDateTime, Temporal.ZonedDateTime];\r\n return Temporal.ZonedDateTime.compare(...times)\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label\r\n * name order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will will sort cases where either the {@code Zman} is a null or {@link #label} returns a null\r\n * as empty {@code String}s.\r\n */\r\n static compareNameOrder(zman1: Zman, zman2: Zman): number {\r\n return StringUtils.compareTo(zman1.label || '', zman2.label || '');\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort duration based zmanim such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times\r\n * such as {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative\r\n * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.\r\n * Please note that this class will will sort cases where {@code Zman} is a null.\r\n */\r\n static compareDurationOrder(zman1: Zman, zman2: Zman): number {\r\n return IntegerUtils.compare(zman1.duration || 0, zman2.duration || 0);\r\n }\r\n\r\n toString(): string {\r\n return (`\\nLabel:\\t\\t\\t${this.label}`)\r\n .concat(`\\nZman:\\t\\t\\t${this.zman}`)\r\n .concat(`\\nDuration:\\t\\t\\t${this.duration}`)\r\n .concat(`\\nDescription:\\t\\t\\t${this.description}`);\r\n }\r\n}\r\n\r\nexport type ZmanWithZmanDate = Zman & { zman: Temporal.ZonedDateTime };\r\nexport type ZmanWithDuration = Zman & { duration: number };\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { TimeZone, Utils, padZeros } from '../polyfills/Utils.ts';\r\nimport { Time } from './Time.ts';\r\nimport { AstronomicalCalendar } from '../AstronomicalCalendar.ts';\r\nimport { ZmanimCalendar } from '../ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from '../ComplexZmanimCalendar.ts';\r\nimport { Zman, ZmanWithDuration, ZmanWithZmanDate } from './Zman.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\nconst methodBlacklist = [\r\n 'getAdjustedDate',\r\n 'getDate',\r\n 'getElevationAdjustedSunrise',\r\n 'getElevationAdjustedSunset',\r\n 'getMidnightLastNight',\r\n 'getMidnightTonight',\r\n 'getSunriseBaalHatanya',\r\n 'getSunsetBaalHatanya',\r\n];\r\n\r\nconst methodWhitelist = [\r\n // These methods have parameters, but have default values.\r\n 'getMinchaGedola',\r\n 'getMinchaKetana',\r\n 'getPlagHamincha',\r\n 'getSofZmanKidushLevana15Days',\r\n 'getSofZmanKidushLevanaBetweenMoldos',\r\n 'getSunTransit',\r\n 'getTchilasZmanKidushLevana3Days',\r\n 'getTchilasZmanKidushLevana7Days',\r\n 'getTemporalHour',\r\n];\r\n\r\nenum timeFormats {\r\n SEXAGESIMAL_XSD_FORMAT,\r\n DECIMAL_FORMAT,\r\n SEXAGESIMAL_FORMAT,\r\n SEXAGESIMAL_SECONDS_FORMAT,\r\n SEXAGESIMAL_MILLIS_FORMAT,\r\n}\r\n\r\n/**\r\n * A class used to format both non {@link java.util.Date} times generated by the Zmanim package as well as Dates. For\r\n * example the {@link AstronomicalCalendar#getTemporalHour()} returns the length of the hour in\r\n * milliseconds. This class can format this time.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2019\r\n * @version 1.2\r\n */\r\nexport class ZmanimFormatter {\r\n /**\r\n * Setting to prepent a zero to single digit hours.\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private prependZeroHours: boolean = false;\r\n\r\n /**\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private useSeconds: boolean = false;\r\n\r\n /**\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private useMillis: boolean = false;\r\n\r\n /**\r\n * the formatter for minutes as seconds.\r\n */\r\n private static readonly minuteSecondNF: number = 2;\r\n\r\n /**\r\n * the formatter for hours.\r\n */\r\n private hourNF!: number;\r\n\r\n /**\r\n * the formatter for minutes as milliseconds.\r\n */\r\n private static readonly milliNF: number = 3;\r\n\r\n /**\r\n * @see #setDateFormat(SimpleDateFormat)\r\n */\r\n private dateFormat!: Parameters;\r\n\r\n /**\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string; // TimeZone.getTimeZone(\"UTC\");\r\n\r\n /**\r\n * @return the timeZone\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * @param timeZoneId\r\n * the timeZone to set\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * Format using hours, minutes, seconds and milliseconds using the xsd:time format. This format will return\r\n * 00.00.00.0 when formatting 0.\r\n */\r\n public static readonly SEXAGESIMAL_XSD_FORMAT: number = timeFormats.SEXAGESIMAL_XSD_FORMAT;\r\n\r\n /**\r\n * Defaults to {@link #SEXAGESIMAL_XSD_FORMAT}.\r\n * @see #setTimeFormat(int)\r\n */\r\n private timeFormat: number = ZmanimFormatter.SEXAGESIMAL_XSD_FORMAT;\r\n\r\n /**\r\n * Format using standard decimal format with 5 positions after the decimal.\r\n */\r\n public static readonly DECIMAL_FORMAT: number = timeFormats.DECIMAL_FORMAT;\r\n\r\n /** Format using hours and minutes. */\r\n public static readonly SEXAGESIMAL_FORMAT: number = timeFormats.SEXAGESIMAL_FORMAT;\r\n\r\n /** Format using hours, minutes and seconds. */\r\n public static readonly SEXAGESIMAL_SECONDS_FORMAT: number = timeFormats.SEXAGESIMAL_SECONDS_FORMAT;\r\n\r\n /** Format using hours, minutes, seconds and milliseconds. */\r\n public static readonly SEXAGESIMAL_MILLIS_FORMAT: number = timeFormats.SEXAGESIMAL_MILLIS_FORMAT;\r\n\r\n /** constant for milliseconds in a minute (60,000) */\r\n public static readonly MINUTE_MILLIS: number = 60 * 1000;\r\n\r\n /** constant for milliseconds in an hour (3,600,000) */\r\n public static readonly HOUR_MILLIS: number = ZmanimFormatter.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * Format using the XSD Duration format. This is in the format of PT1H6M7.869S (P for period (duration), T for time,\r\n * H, M and S indicate hours, minutes and seconds.\r\n */\r\n public static readonly XSD_DURATION_FORMAT: number = 5;\r\n\r\n public static readonly XSD_DATE_FORMAT: Parameters = ['toISODate']//'yyyy-LL-dd\\'T\\'HH:mm:ss';\r\n\r\n /**\r\n * constructor that defaults to this will use the format \"h:mm:ss\" for dates and 00.00.00.0 for {@link Time}.\r\n * @param timeZone the TimeZone Object\r\n */\r\n /*\r\n public ZmanimFormatter(timeZone: TimeZone) {\r\n this(0, new SimpleDateFormat(\"h:mm:ss\"), timeZone);\r\n }\r\n */\r\n\r\n // public ZmanimFormatter() {\r\n // this(0, new SimpleDateFormat(\"h:mm:ss\"), TimeZone.getTimeZone(\"UTC\"));\r\n // }\r\n\r\n /**\r\n * ZmanimFormatter constructor using a formatter\r\n *\r\n * @param format\r\n * int The formatting style to use. Using ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT will format the time\r\n * time of 90*60*1000 + 1 as 1:30:00\r\n * @param dateFormat the SimpleDateFormat Object\r\n * @param timeZone the TimeZone Object\r\n */\r\n constructor(timeZoneId: string);\r\n constructor(format: number, dateFormat: Parameters, timeZoneId: string);\r\n constructor(formatOrTimeZone: number | string, dateFormat?: Parameters, timeZoneId?: string) {\r\n let format: number;\r\n if (dateFormat) {\r\n format = formatOrTimeZone as number;\r\n } else {\r\n format = 0;\r\n dateFormat = ['', { hour: this.prependZeroHours ? '2-digit' : 'numeric', minute: '2-digit', second: '2-digit'}];\r\n timeZoneId = formatOrTimeZone as string;\r\n }\r\n\r\n this.setTimeZone(timeZoneId!);\r\n\r\n this.setTimeFormat(format);\r\n this.setDateFormat(dateFormat);\r\n }\r\n\r\n /**\r\n * Sets the format to use for formatting.\r\n *\r\n * @param format\r\n * int the format constant to use.\r\n */\r\n public setTimeFormat(format: timeFormats): void {\r\n this.timeFormat = format;\r\n switch (format) {\r\n case ZmanimFormatter.SEXAGESIMAL_XSD_FORMAT:\r\n this.setSettings(true, true, true);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_FORMAT:\r\n this.setSettings(false, false, false);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT:\r\n this.setSettings(false, true, false);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_MILLIS_FORMAT:\r\n this.setSettings(false, true, true);\r\n break;\r\n // case DECIMAL_FORMAT:\r\n // default:\r\n }\r\n }\r\n\r\n /**\r\n * Sets the SimpleDateFormat Object\r\n * @param dateFormat the SimpleDateFormat Object to set\r\n */\r\n public setDateFormat(dateFormat: Parameters): void {\r\n this.dateFormat = dateFormat;\r\n }\r\n\r\n /**\r\n * returns the SimpleDateFormat Object\r\n * @return the SimpleDateFormat Object\r\n */\r\n public getDateFormat(): Parameters {\r\n return this.dateFormat;\r\n }\r\n\r\n /**\r\n * Sets various format settings.\r\n * @param prependZeroHours if to prepend a zero for single digit hours (so that 1 'oclock is displayed as 01)\r\n * @param useSeconds should seconds be used in the time format\r\n * @param useMillis should milliseconds be used informatting time.\r\n */\r\n private setSettings(prependZeroHours: boolean, useSeconds: boolean, useMillis: boolean): void {\r\n this.prependZeroHours = prependZeroHours;\r\n this.useSeconds = useSeconds;\r\n this.useMillis = useMillis;\r\n }\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param milliseconds\r\n * The time in milliseconds.\r\n * @return String The formatted String\r\n */\r\n /*\r\n public format(milliseconds: number): string {\r\n return this.format(milliseconds);\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param millis\r\n * The time in milliseconds.\r\n * @return String The formatted String\r\n */\r\n\r\n /*\r\n public format(millis: number): string {\r\n return format(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats {@link Time}objects.\r\n *\r\n * @param time\r\n * The time Object to be formatted.\r\n * @return String The formatted String\r\n */\r\n public format(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n if (this.timeFormat === ZmanimFormatter.XSD_DURATION_FORMAT) {\r\n return ZmanimFormatter.formatXSDDurationTime(time);\r\n }\r\n let sb: string = padZeros(time.getHours(), this.hourNF)\r\n .concat(':')\r\n .concat(padZeros(time.getMinutes(), ZmanimFormatter.minuteSecondNF));\r\n if (this.useSeconds) {\r\n sb = sb.concat(':')\r\n .concat(padZeros(time.getSeconds(), ZmanimFormatter.minuteSecondNF));\r\n }\r\n if (this.useMillis) {\r\n sb = sb.concat('.')\r\n .concat(padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF));\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Formats a date using this class's {@link #getDateFormat() date format}.\r\n *\r\n * @param dateTime - the date to format\r\n * @return the formatted String\r\n */\r\n public formatDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _dateTime = dateTime.with({ timeZone: this.getTimeZone() });\r\n\r\n // @ts-ignore\r\n return _dateTime.toLocaleString(...this.dateFormat);\r\n }\r\n\r\n /**\r\n * The date:date-time function returns the current date and time as a date/time string. The date/time string that's\r\n * returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.3.8 dateTime] of [XML Schema 1.1 Part 2: Datatypes]. The date/time format is\r\n * basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema 1.1 Part 2: Datatypes] and [ISO 8601] for details. The date/time string format must include a\r\n * time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the\r\n * difference from UTC represented as hh:mm.\r\n * @param dateTime - the UTC Date Object\r\n * @return the XSD dateTime\r\n */\r\n public getXSDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n return dateTime.with({ timeZone: this.getTimeZone() }).toString();\r\n }\r\n\r\n /**\r\n * Represent the hours and minutes with two-digit strings.\r\n *\r\n * @param digits\r\n * hours or minutes.\r\n * @return two-digit String representation of hrs or minutes.\r\n */\r\n private static formatDigits(digits: number): string {\r\n const dd: string = Math.abs(digits).toString();\r\n return dd.length === 1 ? `0${dd}` : dd;\r\n }\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param millis\r\n * the duration in milliseconds\r\n * @return the xsd:duration formatted String\r\n */\r\n\r\n /*\r\n public formatXSDDurationTime(millis: number): string {\r\n return formatXSDDurationTime(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param time\r\n * the duration as a Time object\r\n * @return the xsd:duration formatted String\r\n */\r\n public static formatXSDDurationTime(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n let duration: string;\r\n if (time.getHours() !== 0 || time.getMinutes() !== 0 || time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = 'P'.concat('T');\r\n\r\n if (time.getHours() !== 0) duration = duration.concat(`${time.getHours()}H`);\r\n\r\n if (time.getMinutes() !== 0) duration = duration.concat(`${time.getMinutes()}M`);\r\n\r\n if (time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = duration.concat(`${time.getSeconds()}.${padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF)}`);\r\n duration = duration.concat('S');\r\n }\r\n\r\n if (duration.length === 1) duration.concat('T0S'); // zero seconds\r\n\r\n if (time.isNegative()) {\r\n duration = '-' + duration;\r\n }\r\n }\r\n return duration!.toString();\r\n }\r\n\r\n public static formatDecimal(num: number): string {\r\n const hasDecimal = num - Math.trunc(num) > 0;\r\n return hasDecimal ? num.toString() : num.toFixed(1);\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String representing the serialized Object. The\r\n * format used is:\r\n *\r\n *
\r\n   *  <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n   *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n   *     <TemporalHour>PT54M17.529S</TemporalHour>\r\n   *     ...\r\n   *   </AstronomicalTimes>\r\n   * 
\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}. The output of this method is\r\n * returned by the {@link #toString() toString}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The XML formatted String. The format will be:\r\n *\r\n *
\r\n   *  <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n   *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n   *     <TemporalHour>PT54M17.529S</TemporalHour>\r\n   *     ...\r\n   *  </AstronomicalTimes>\r\n   * 
\r\n *\r\n * TODO: add proper schema, and support for nulls. XSD duration (for solar hours), should probably return\r\n * nil and not P\r\n * @deprecated\r\n */\r\n public static toXML(): void {\r\n throw new UnsupportedError('This method is not supported.');\r\n }\r\n\r\n /**\r\n * A method that returns a JSON formatted String representing the serialized Object. The\r\n * format used is:\r\n *
\r\n   * {\r\n   *    "metadata":{\r\n   *      "date":"1969-02-08",\r\n   *      "type":"AstronomicalCalendar",\r\n   *      "algorithm":"US Naval Almanac Algorithm",\r\n   *      "location":"Lakewood, NJ",\r\n   *      "latitude":"40.095965",\r\n   *      "longitude":"-74.22213",\r\n   *      "elevation:"31.0",\r\n   *      "timeZoneName":"Eastern Standard Time",\r\n   *      "timeZoneID":"America/New_York",\r\n   *      "timeZoneOffset":"-5"},\r\n   *    "AstronomicalTimes":{\r\n   *     "Sunrise":"2007-02-18T06:45:27-05:00",\r\n   *     "TemporalHour":"PT54M17.529S"\r\n   *     ...\r\n   *     }\r\n   * }\r\n   * 
\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The JSON formatted String. The format will be:\r\n *
\r\n   * {\r\n   *    "metadata":{\r\n   *      "date":"1969-02-08",\r\n   *      "type":"AstronomicalCalendar",\r\n   *      "algorithm":"US Naval Almanac Algorithm",\r\n   *      "location":"Lakewood, NJ",\r\n   *      "latitude":"40.095965",\r\n   *      "longitude":"-74.22213",\r\n   *      "elevation:"31.0",\r\n   *      "timeZoneName":"Eastern Standard Time",\r\n   *      "timeZoneID":"America/New_York",\r\n   *      "timeZoneOffset":"-5"},\r\n   *    "AstronomicalTimes":{\r\n   *     "Sunrise":"2007-02-18T06:45:27-05:00",\r\n   *     "TemporalHour":"PT54M17.529S"\r\n   *     ...\r\n   *     }\r\n   * }\r\n   * 
\r\n */\r\n public static toJSON(astronomicalCalendar: AstronomicalCalendar): JsonOutput {\r\n const json: JsonOutput = {\r\n metadata: ZmanimFormatter.getOutputMetadata(astronomicalCalendar),\r\n };\r\n const key: string = ZmanimFormatter.getOutputKey(astronomicalCalendar);\r\n json[key] = ZmanimFormatter.getZmanimOutput(astronomicalCalendar);\r\n\r\n return json;\r\n }\r\n\r\n private static getOutputKey(astronomicalCalendar: AstronomicalCalendar) {\r\n switch (true) {\r\n case astronomicalCalendar instanceof ComplexZmanimCalendar:\r\n return 'Zmanim';\r\n case astronomicalCalendar instanceof ZmanimCalendar:\r\n return 'BasicZmanim';\r\n case astronomicalCalendar instanceof AstronomicalCalendar:\r\n default:\r\n return 'AstronomicalTimes';\r\n }\r\n }\r\n\r\n private static getOutputMetadata(astronomicalCalendar: AstronomicalCalendar): OutputMetadata {\r\n return {\r\n date: astronomicalCalendar.getDate().toString(),\r\n type: astronomicalCalendar.getClassName(),\r\n algorithm: astronomicalCalendar.getAstronomicalCalculator().getCalculatorName(),\r\n location: astronomicalCalendar.getGeoLocation().getLocationName(),\r\n latitude: astronomicalCalendar.getGeoLocation().getLatitude().toString(),\r\n longitude: astronomicalCalendar.getGeoLocation().getLongitude().toString(),\r\n elevation: ZmanimFormatter.formatDecimal(astronomicalCalendar.getGeoLocation().getElevation()),\r\n timeZoneName: TimeZone.getDisplayName(astronomicalCalendar.getGeoLocation().getTimeZone())!,\r\n timeZoneID: astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n timeZoneOffset: ZmanimFormatter.formatDecimal(TimeZone.getOffset(astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n astronomicalCalendar.getDate().toZonedDateTime(astronomicalCalendar.getGeoLocation().getTimeZone()).epochMilliseconds) / ZmanimFormatter.HOUR_MILLIS),\r\n };\r\n }\r\n\r\n private static getZmanimOutput(astronomicalCalendar: AstronomicalCalendar) {\r\n const formatter: ZmanimFormatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, ZmanimFormatter.XSD_DATE_FORMAT,\r\n astronomicalCalendar.getGeoLocation().getTimeZone());\r\n\r\n /*\r\n let dateList: Set = new Set();\r\n let durationList: Set = new Set();\r\n */\r\n const dateList: ZmanWithZmanDate[] = [];\r\n let durationList: ZmanWithDuration[] = [];\r\n const otherList: string[] = [];\r\n\r\n // Get all the methods in the calendar\r\n Utils.getAllMethodNames(astronomicalCalendar, true)\r\n // Filter out methods that we don't want\r\n .filter(method => includeMethod(method, astronomicalCalendar))\r\n // Call each method and get the return values\r\n .map(method => ({\r\n methodName: method,\r\n value: astronomicalCalendar[method as keyof AstronomicalCalendar],\r\n }))\r\n // Filter for return values of type Date or number\r\n .filter(methodObj => methodObj.value instanceof Temporal.ZonedDateTime || typeof methodObj.value === 'number' || methodObj.value === null)\r\n // Separate the Dates and numbers\r\n .forEach(methodObj => {\r\n const tagName: string = methodObj.methodName.substring(3);\r\n if (methodObj.value instanceof Temporal.ZonedDateTime) {\r\n // dateList.add(new KosherZmanim.Zman(methodObj.value, tagName));\r\n const zman: ZmanWithZmanDate = {\r\n zman: methodObj.value,\r\n label: tagName,\r\n };\r\n dateList.push(zman);\r\n } else if (typeof methodObj.value === 'number') {\r\n // durationList.add(new KosherZmanim.Zman(methodObj.value, tagName));\r\n const zman: ZmanWithDuration = {\r\n duration: methodObj.value,\r\n label: tagName,\r\n };\r\n durationList.push(zman);\r\n } else {\r\n otherList.push(tagName);\r\n }\r\n });\r\n\r\n dateList.sort(Zman.compareDateOrder);\r\n // Filter for values in milliseconds, and not values in minutes\r\n durationList = durationList.filter((zman: ZmanWithDuration) => zman.duration > 1000)\r\n .sort(Zman.compareDurationOrder);\r\n\r\n const timesData = {\r\n ...Object.fromEntries(dateList.map(zman => [zman.label, formatter.formatDateTime(zman.zman)])),\r\n ...Object.fromEntries(durationList.map(zman => [zman.label, formatter.format(Math.trunc(zman.duration))])),\r\n ...Object.fromEntries(otherList.map(tagName => [tagName, 'N/A'])),\r\n };\r\n\r\n return timesData;\r\n }\r\n}\r\n\r\n/**\r\n * Determines if a method should be output by the {@link #toJSON(AstronomicalCalendar)}\r\n *\r\n * @param {string} method - the method in question\r\n * @param {AstronomicalCalendar} astronomicalCalendar - The astronomical calendar, to be able to\r\n * check the parameterlist\r\n * @return if the method should be included in serialization\r\n */\r\nfunction includeMethod(method: string, astronomicalCalendar: AstronomicalCalendar): boolean {\r\n if (method in methodWhitelist) return true;\r\n\r\n // Filter out excluded methods\r\n return !(method in methodBlacklist)\r\n // Filter out methods with parameters since we don't know what value(s) to pass\r\n && (astronomicalCalendar as any as Record)[method].length === 0\r\n // Filter out methods that don't start with 'get'\r\n && method.startsWith('get');\r\n}\r\n\r\nexport interface JsonOutput {\r\n metadata: OutputMetadata\r\n\r\n [key: string]: object;\r\n}\r\n\r\nexport interface OutputMetadata {\r\n date: string;\r\n type: string;\r\n algorithm: string;\r\n location: string | null;\r\n latitude: string;\r\n longitude: string;\r\n elevation: string;\r\n timeZoneName: string;\r\n timeZoneID: string;\r\n timeZoneOffset: string;\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A class for various location calculations\r\n * Most of the code in this class is ported from Chris Veness'\r\n * LGPL Javascript Implementation\r\n *\r\n * @author © Eliyahu Hershfeld 2009 - 2020\r\n * @deprecated All methods in this class are available in the {@link GeoLocation} class, and this class that duplicates that\r\n * code will be removed in a future release.\r\n */\r\nexport class GeoLocationUtils {\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation, GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /**\r\n * Calculate the geodesic initial bearing between this Object and\r\n * a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol XXII\r\n * no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic bearing\r\n */\r\n public static getGeodesicInitialBearing(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the geodesic final bearing between this Object\r\n * and a second Object passed to this method using Thaddeus Vincenty's\r\n * inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics\r\n * on the Ellipsoid with application of nested equations\", Survey Review, vol XXII no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic bearing\r\n */\r\n public static getGeodesicFinalBearing(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters\r\n * between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty,\r\n * \"Direct and Inverse Solutions of Geodesics on the\r\n * Ellipsoid with application of nested equations\", Survey Review, vol XXII no 176, 1975. This uses the\r\n * WGS-84 geodetic model.\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public static getGeodesicDistance(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculates the initial geodesic bearing, final bearing or\r\n * geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}),\r\n * final bearing ({@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return\r\n * the geodesic distance, initial or final bearing (based on the formula passed in) between the location\r\n * and destination in Meters\r\n * @see #getGeodesicDistance(GeoLocation, GeoLocation)\r\n * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)\r\n * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)\r\n */\r\n private static vincentyFormula(location: GeoLocation, destination: GeoLocation, formula: number): number {\r\n const a: number = 6378137; // length of semi-major axis of the ellipsoid (radius at equator) in metres based on WGS-84\r\n const b: number = 6356752.3142; // length of semi-minor axis of the ellipsoid (radius at the poles) in meters based on WGS-84\r\n const f: number = 1 / 298.257223563; // flattening of the ellipsoid based on WGS-84\r\n const L: number = MathUtils.degreesToRadians(destination.getLongitude() - location.getLongitude()); // difference in longitude of two points;\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude()))); // reduced latitude (latitude on the auxiliary sphere)\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(destination.getLatitude()))); // reduced latitude (latitude on the auxiliary sphere)\r\n\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda)\r\n * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = cosU1 * cosU2 * sinLambda / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1\r\n * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1\r\n * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocationUtils.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocationUtils.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocationUtils.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line\r\n * bearing from the current location to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the bearing in degrees\r\n */\r\n public static getRhumbLineBearing(location: GeoLocation, destination: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(destination.getLongitude() - location.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(destination.getLatitude())\r\n / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current\r\n * location to the GeoLocation passed in. Ported from Chris Veness'\r\n * Javascript Implementation.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public static getRhumbLineDistance(location: GeoLocation, destination: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude())\r\n - MathUtils.degreesToRadians(destination.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude())\r\n - MathUtils.degreesToRadians(destination.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(destination.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(destination.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm\r\n * written by Kevin\r\n * Boone that is based on the US Naval Observatory'sAlmanac for Computer algorithm ( Amazon, Barnes & Noble) and is\r\n * used with his permission. Added to Kevin's code is adjustment of the zenith to account for elevation.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2019\r\n * @author © Kevin Boone 2000\r\n * @version 1.1\r\n */\r\nexport class SunTimesCalculator extends AstronomicalCalculator {\r\n /**\r\n * @see AstronomicalCalculator#getCalculatorName()\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public getCalculatorName(): string {\r\n return 'US Naval Almanac Algorithm';\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n const doubleTime: number = SunTimesCalculator.getTimeUTC(date, geoLocation.getLongitude(), geoLocation.getLatitude(),\r\n adjustedZenith, true);\r\n return doubleTime;\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n const doubleTime: number = SunTimesCalculator.getTimeUTC(date, geoLocation.getLongitude(), geoLocation.getLatitude(),\r\n adjustedZenith, false);\r\n return doubleTime;\r\n }\r\n\r\n /**\r\n * The number of degrees of longitude that corresponds to one hour time difference.\r\n */\r\n private static readonly DEG_PER_HOUR: number = 360 / 24;\r\n\r\n /**\r\n * sin of an angle in degrees\r\n */\r\n private static sinDeg(deg: number): number {\r\n // return Math.sin(deg * 2 * Math.PI / 360);\r\n return Math.sin(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * acos of an angle, result in degrees\r\n */\r\n private static acosDeg(x: number): number {\r\n // return Math.acos(x) * 360 / (2 * Math.PI);\r\n return MathUtils.radiansToDegrees(Math.acos(x));\r\n }\r\n\r\n /**\r\n * asin of an angle, result in degrees\r\n */\r\n private static asinDeg(x: number): number {\r\n // return Math.asin(x) * 360 / (2 * Math.PI);\r\n return MathUtils.radiansToDegrees(Math.asin(x));\r\n }\r\n\r\n /**\r\n * tan of an angle in degrees\r\n */\r\n private static tanDeg(deg: number): number {\r\n // return Math.tan(deg * 2 * Math.PI / 360);\r\n return Math.tan(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * Calculate cosine of the angle in degrees\r\n *\r\n * @param deg degrees\r\n * @return cosine of the angle in degrees\r\n */\r\n private static cosDeg(deg: number): number {\r\n // return Math.cos(deg * 2 * Math.PI / 360);\r\n return Math.cos(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * Get time difference between location's longitude and the Meridian, in hours. West of Meridian has a negative time\r\n * difference\r\n */\r\n private static getHoursFromMeridian(longitude: number): number {\r\n return longitude / SunTimesCalculator.DEG_PER_HOUR;\r\n }\r\n\r\n /**\r\n * Calculate the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We\r\n * need this figure to derive the Sun's mean anomaly.\r\n *\r\n * @param dayOfYear the day of year\r\n * @param hoursFromMeridian hours from the meridian\r\n * @param isSunrise true for sunrise and false for sunset\r\n *\r\n * @return the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We\r\n * need this figure to derive the Sun's mean anomaly.\r\n */\r\n private static getApproxTimeDays(dayOfYear: number, hoursFromMeridian: number, isSunrise: boolean): number {\r\n if (isSunrise) {\r\n return dayOfYear + ((6 - hoursFromMeridian) / 24);\r\n }\r\n // sunset\r\n return dayOfYear + ((18 - hoursFromMeridian) / 24);\r\n }\r\n\r\n /**\r\n * Calculate the Sun's mean anomaly in degrees, at sunrise or sunset, given the longitude in degrees\r\n *\r\n * @param dayOfYear the day of the year\r\n * @param longitude longitude\r\n * @param isSunrise true for sunrise and false for sunset\r\n * @return the Sun's mean anomaly in degrees\r\n */\r\n private static getMeanAnomaly(dayOfYear: number, longitude: number, isSunrise: boolean): number {\r\n return (0.9856 * SunTimesCalculator.getApproxTimeDays(dayOfYear, SunTimesCalculator.getHoursFromMeridian(longitude), isSunrise)) - 3.289;\r\n }\r\n\r\n /**\r\n * Calculates the Sun's true longitude in degrees. The result is an angle gte 0 and lt 360. Requires the Sun's mean\r\n * anomaly, also in degrees\r\n */\r\n private static getSunTrueLongitude(sunMeanAnomaly: number): number {\r\n let l: number = sunMeanAnomaly + (1.916 * SunTimesCalculator.sinDeg(sunMeanAnomaly)) + (0.020 * SunTimesCalculator.sinDeg(2 * sunMeanAnomaly)) + 282.634;\r\n\r\n // get longitude into 0-360 degree range\r\n if (l >= 360) {\r\n l = l - 360;\r\n }\r\n if (l < 0) {\r\n l = l + 360;\r\n }\r\n return l;\r\n }\r\n\r\n /**\r\n * Calculates the Sun's right ascension in hours, given the Sun's true longitude in degrees. Input and output are\r\n * angles gte 0 and lt 360.\r\n */\r\n private static getSunRightAscensionHours(sunTrueLongitude: number): number {\r\n const a: number = 0.91764 * SunTimesCalculator.tanDeg(sunTrueLongitude);\r\n let ra: number = 360 / (2 * Math.PI) * Math.atan(a);\r\n\r\n const lQuadrant: number = Math.floor(sunTrueLongitude / 90) * 90;\r\n const raQuadrant: number = Math.floor(ra / 90) * 90;\r\n ra += (lQuadrant - raQuadrant);\r\n\r\n return ra / SunTimesCalculator.DEG_PER_HOUR; // convert to hours\r\n }\r\n\r\n /**\r\n * Calculate the cosine of the Sun's local hour angle\r\n *\r\n * @param sunTrueLongitude the sun's true longitude\r\n * @param latitude the latitude\r\n * @param zenith the zenith\r\n * @return the cosine of the Sun's local hour angle\r\n */\r\n private static getCosLocalHourAngle(sunTrueLongitude: number, latitude: number, zenith: number): number {\r\n const sinDec: number = 0.39782 * SunTimesCalculator.sinDeg(sunTrueLongitude);\r\n const cosDec: number = SunTimesCalculator.cosDeg(SunTimesCalculator.asinDeg(sinDec));\r\n return (SunTimesCalculator.cosDeg(zenith) - (sinDec * SunTimesCalculator.sinDeg(latitude))) / (cosDec * SunTimesCalculator.cosDeg(latitude));\r\n }\r\n\r\n /**\r\n * Calculate local mean time of rising or setting. By `local' is meant the exact time at the location, assuming that\r\n * there were no time zone. That is, the time difference between the location and the Meridian depended entirely on\r\n * the longitude. We can't do anything with this time directly; we must convert it to UTC and then to a local time.\r\n * The result is expressed as a fractional number of hours since midnight\r\n *\r\n * @param localHour the local hour\r\n * @param sunRightAscensionHours the sun's right ascention in hours\r\n * @param approxTimeDays approximate time days\r\n *\r\n * @return the fractional number of hours since midnight as a double\r\n */\r\n private static getLocalMeanTime(localHour: number, sunRightAscensionHours: number, approxTimeDays: number): number {\r\n return localHour + sunRightAscensionHours - (0.06571 * approxTimeDays) - 6.622;\r\n }\r\n\r\n /**\r\n * Get sunrise or sunset time in UTC, according to flag.\r\n *\r\n * @param year\r\n * 4-digit year\r\n * @param month\r\n * month, 1-12 (not the zero based Java month\r\n * @param day\r\n * day of month, 1-31\r\n * @param longitude\r\n * in degrees, longitudes west of Meridian are negative\r\n * @param latitude\r\n * in degrees, latitudes south of equator are negative\r\n * @param zenith\r\n * Sun's zenith, in degrees\r\n * @param type\r\n * type of calculation to carry out {@link #TYPE_SUNRISE} or {@link #TYPE_SUNRISE}.\r\n *\r\n * @return the time as a double. If an error was encountered in the calculation (expected behavior for some\r\n * locations such as near the poles, {@link Double.NaN} will be returned.\r\n */\r\n private static getTimeUTC(date: Temporal.PlainDate, longitude: number, latitude: number, zenith: number,\r\n isSunrise: boolean): number {\r\n const dayOfYear: number = date.dayOfYear;\r\n const sunMeanAnomaly: number = SunTimesCalculator.getMeanAnomaly(dayOfYear, longitude, isSunrise);\r\n const sunTrueLong: number = SunTimesCalculator.getSunTrueLongitude(sunMeanAnomaly);\r\n const sunRightAscensionHours: number = SunTimesCalculator.getSunRightAscensionHours(sunTrueLong);\r\n const cosLocalHourAngle: number = SunTimesCalculator.getCosLocalHourAngle(sunTrueLong, latitude, zenith);\r\n\r\n let localHourAngle: number;\r\n if (isSunrise) {\r\n localHourAngle = 360 - SunTimesCalculator.acosDeg(cosLocalHourAngle);\r\n } else { // sunset\r\n localHourAngle = SunTimesCalculator.acosDeg(cosLocalHourAngle);\r\n }\r\n const localHour: number = localHourAngle / SunTimesCalculator.DEG_PER_HOUR;\r\n\r\n const localMeanTime: number = SunTimesCalculator.getLocalMeanTime(localHour, sunRightAscensionHours,\r\n SunTimesCalculator.getApproxTimeDays(dayOfYear, SunTimesCalculator.getHoursFromMeridian(longitude), isSunrise));\r\n let processedTime: number = localMeanTime - SunTimesCalculator.getHoursFromMeridian(longitude);\r\n while (processedTime < 0) {\r\n processedTime += 24;\r\n }\r\n while (processedTime >= 24) {\r\n processedTime -= 24;\r\n }\r\n return processedTime;\r\n }\r\n\r\n /**\r\n\t * Return the Universal Coordinated Time (UTC)\r\n\t * of solar noon for the given day at the given location\r\n\t * on earth. This implementation returns solar noon as the time halfway between sunrise and sunset.\r\n\t * Other calculators may return true solar noon. See The Definition of Chatzos for details on solar\r\n\t * noon calculations.\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see NOAACalculator\r\n\t * \r\n\t * @param calendar\r\n\t * The Calendar representing the date to calculate solar noon for\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times.\r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const sunrise = this.getUTCSunrise(calendar, geoLocation, 90, false);\r\n const sunset = this.getUTCSunset(calendar, geoLocation, 90, false);\r\n let noon = (sunrise + ((sunset - sunrise) / 2));\r\n if(noon < 0) {\r\n\t\t\tnoon += 12;\r\n\t\t}\r\n\t\tif(noon < sunrise) {\r\n\t\t\tnoon -= 12;\r\n\t\t} \r\n\t\treturn noon;\r\n }\r\n}\r\n", "/*\r\n * Zmanim Java API\r\n * Copyright (C) 2019 - 2022 Eliyahu Hershfeld\r\n * Copyright (C) 2019 - 2021 Y Paritcher\r\n *\r\n * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General\r\n * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)\r\n * any later version.\r\n *\r\n * This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied\r\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r\n * details.\r\n * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to\r\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA,\r\n * or connect to: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html\r\n */\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { JewishCalendar } from './JewishCalendar.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nconst { SUNDAY, FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * Tefila Rules is a utility class that covers the various halachos and minhagim regarding\r\n * changes to daily tefila / prayers, based on the Jewish calendar. This is mostly useful for use in\r\n * developing siddur type applications, but it is also valuable for shul calendars that set\r\n * tefila times based on if tachanun is\r\n * recited that day. There are many settings in this class to cover the vast majority of minhagim, but\r\n * there are likely some not covered here. The source for many of the chasidishe minhagim can be found\r\n * in the Minhag Yisrael Torah on Orach\r\n * Chaim 131.\r\n * Dates used in specific communities such as specific yahrzeits or a holidays like Purim Mezhbizh\r\n * (Medzhybizh) celebrated on 11 {@link JewishDate#TEVES Teves} or Purim Saragossa celebrated on\r\n * the (17th or) 18th of {@link JewishDate#SHEVAT Shevat} are not (and likely will not be) supported by\r\n * this class.\r\n *

Sample code:\r\n *

\r\n * TefilaRules tr = new TefilaRules();\r\n * JewishCalendar jewishCalendar = new JewishCalendar();\r\n * HebrewDateFormatter hdf = new HebrewDateFormatter();\r\n * jewishCalendar.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jd));\r\n * jewishCalendar.setJewishDate(5783, JewishDate.ADAR, 17);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * tr.setTachanunRecitedWeekOfPurim(false);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));
\r\n * \r\n * @author © Y. Paritcher 2019 - 2021\r\n * @author © Eliyahu Hershfeld 2019 - 2022\r\n * \r\n * @todo The following items may be added at a future date.\r\n *
    \r\n *
  1. Lamnatzaiach
  2. \r\n *
  3. Mizmor Lesoda
  4. \r\n *
  5. Behab
  6. \r\n *
  7. Selichos
  8. \r\n *
  9. ...
  10. \r\n *
\r\n */\r\nexport class TefilaRules {\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t * @see #setTachanunRecitedEndOfTishrei(boolean)\r\n\t */\r\n private tachanunRecitedEndOfTishrei:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n private tachanunRecitedWeekAfterShavuos:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited13SivanOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n private tachanunRecitedPesachSheni:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited15IyarOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n private tachanunRecitedMinchaErevLagBaomer:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n private tachanunRecitedShivasYemeiHamiluim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfHod:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfPurim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n private tachanunRecitedFridays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n private tachanunRecitedSundays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n private tachanunRecitedMinchaAllYear:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isMizmorLesodaRecited(JewishCalendar)\r\n\t * @see #setMizmorLesodaRecitedErevYomKippurAndPesach(boolean)\r\n\t */\r\n private mizmorLesodaRecitedErevYomKippurAndPesach: boolean = false;\r\n\r\n /**\r\n * Returns if tachanun is recited during shacharis on the day in question. There are the many\r\n\t * minhag based settings that are available in this class.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during shacharis.\r\n\t * @see #isTachanunRecitedMincha(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedShacharis(jewishCalendar: JewishCalendar):boolean {\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY\r\n\t\t|| (!this.tachanunRecitedSundays && jewishCalendar.getDayOfWeek() == SUNDAY)\r\n\t\t|| (!this.tachanunRecitedFridays && jewishCalendar.getDayOfWeek() == FRIDAY)\r\n\t\t\t\t|| month == JewishDate.NISSAN\r\n\t\t\t\t|| (month == JewishDate.TISHREI && ((!this.tachanunRecitedEndOfTishrei && day > 8)\r\n\t\t\t\t|| (this.tachanunRecitedEndOfTishrei && (day > 8 && day < 22))))\r\n\t\t\t\t|| (month == JewishDate.SIVAN && (this.tachanunRecitedWeekAfterShavuos && day < 7\r\n\t\t\t\t\t\t|| !this.tachanunRecitedWeekAfterShavuos && day < (!jewishCalendar.getInIsrael()\r\n\t\t\t\t\t\t\t\t&& !this.tachanunRecited13SivanOutOfIsrael ? 14 : 13)))\r\n\t\t\t\t|| (jewishCalendar.isYomTov() && (!jewishCalendar.isTaanis()\r\n\t\t\t\t\t\t|| (!this.tachanunRecitedPesachSheni && holidayIndex == JewishCalendar.PESACH_SHENI))) // Erev YT is included in isYomTov()\r\n\t\t\t\t|| (!jewishCalendar.getInIsrael() && !this.tachanunRecitedPesachSheni && !this.tachanunRecited15IyarOutOfIsrael\r\n\t\t\t\t\t\t&& jewishCalendar.getJewishMonth() == JewishDate.IYAR && day == 15)\r\n\t\t\t\t|| holidayIndex == JewishCalendar.TISHA_BEAV || jewishCalendar.isIsruChag()\r\n\t\t\t\t|| jewishCalendar.isRoshChodesh()\r\n\t\t\t\t|| (!this.tachanunRecitedShivasYemeiHamiluim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 22)\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfPurim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 10 && day < 18)\r\n\t\t\t\t|| (jewishCalendar.isUseModernHolidays()\r\n\t\t\t\t\t\t&& (holidayIndex == JewishCalendar.YOM_HAATZMAUT || holidayIndex == JewishCalendar.YOM_YERUSHALAYIM))\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfHod && month == JewishDate.IYAR && day > 13 && day < 21)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n\t * Returns if tachanun is recited during mincha on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during mincha.\r\n\t * @see #isTachanunRecitedShacharis(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedMincha(jewishCalendar: JewishCalendar):boolean {\r\n let tomorrow:JewishCalendar = new JewishCalendar();\r\n tomorrow = jewishCalendar.clone() as JewishCalendar;\r\n tomorrow.forward(Calendar.DATE, 1);\r\n\t\t\r\n if (!this.tachanunRecitedMinchaAllYear\r\n\t\t\t\t\t|| jewishCalendar.getDayOfWeek() == Calendar.FRIDAY\r\n\t\t\t\t\t|| !this.isTachanunRecitedShacharis(jewishCalendar) \r\n\t\t\t\t\t|| (!this.isTachanunRecitedShacharis(tomorrow) && \r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI))\r\n\t\t\t\t\t|| !this.tachanunRecitedMinchaErevLagBaomer && tomorrow.getYomTovIndex() == JewishCalendar.LAG_BAOMER) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\t\r\n /**\r\n\t * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN Marcheshvan}.\r\n\t * Outside Israel recitation starts on the evening of December 4th (or 5th if it is the year before a civil leap year)\r\n\t * in the 21st century and shifts a day forward every century not evenly divisible by 400. This method will return true\r\n\t * if vesein tal umatar on the current Jewish date that starts on the previous night, so Dec 5/6 will be\r\n\t * returned by this method in the 21st century. vesein tal umatar is not recited on Shabbos and the\r\n\t * start date will be delayed a day when the start day is on a Shabbos (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartDate(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n\t\t\t // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 7) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SUNDAY) { // When starting on Sunday, it can be the start date or delayed from Shabbos\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 48 || jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n\t\t\t\r\n }\r\n return false; // keep the compiler happy\r\n }\r\n\t\r\n /**\r\n\t * Returns if true if tonight is the first night to start reciting Vesein Tal Umatar Livracha (\r\n\t * Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN\r\n\t * Marcheshvan} (so the 6th will return true). Outside Israel recitation starts on the evening\r\n\t * of December 4th (or 5th if it is the year before a civil leap year) in the 21st century and shifts a\r\n\t * day forward every century not evenly divisible by 400. Vesein tal umatar is not recited on\r\n\t * Shabbos and the start date will be delayed a day when the start day is on a Shabbos\r\n\t * (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar\r\n\t * Livracha (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartingTonight(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 6) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY) { // When starting on motzai Shabbos, it can be the start date or delayed from Friday night\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47 || jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n\t\t\t\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. This will return\r\n\t * true for the entire season, even on Shabbos when it is not recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarRecited(jewishCalendar:JewishCalendar):boolean {\r\n if (jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() < 15) {\r\n return true;\r\n }\r\n if (jewishCalendar.getJewishMonth() < JewishDate.CHESHVAN) {\r\n return false;\r\n }\r\n if (jewishCalendar.getInIsrael()) {\r\n return jewishCalendar.getJewishMonth() != JewishDate.CHESHVAN || jewishCalendar.getJewishDayOfMonth() >= 7;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() >= 47;\r\n\t\t\r\n }\r\n\t\r\n /**\r\n\t * Returns if Vesein Beracha is recited. It is recited from 15 {@link JewishDate#NISSAN Nissan} to the\r\n\t * point that {@link #isVeseinTalUmatarRecited(JewishCalendar) vesein tal umatar is recited}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Vesein Beracha is recited.\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinBerachaRecited(jewishCalendar: JewishCalendar):boolean {\r\n return !this.isVeseinTalUmatarRecited(jewishCalendar);\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. The date is 22\r\n\t * {@link JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the start date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachStartDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.TISHREI && jewishCalendar.getJewishDayOfMonth() == 22;\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. The date is 15\r\n\t * {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the end date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachEndDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() == 15;\r\n }\r\n\r\n /**\r\n\t * Returns if Mashiv Haruach Umorid Hageshem is recited. This period starts on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei} and ends on the 15th day of {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Mashiv Haruach Umorid Hageshem is recited.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t */\r\n public isMashivHaruachRecited(jewishCalendar:JewishCalendar):boolean {\r\n const startDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.TISHREI, 22);\r\n const endDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.NISSAN, 15);\r\n return jewishCalendar.compareTo(startDate) > 0 && jewishCalendar.compareTo(endDate) < 0;\r\n }\r\n\r\n /**\r\n\t * Returns if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is\r\n\t * recited. This period starts on the 15th day of {@link JewishDate#NISSAN Nissan} and ends on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited.\r\n\t */\r\n public isMoridHatalRecited(jewishCalendar:JewishCalendar):boolean {\r\n return !this.isMashivHaruachRecited(jewishCalendar) || this.isMashivHaruachStartDate(jewishCalendar) || this.isMashivHaruachEndDate(jewishCalendar);\r\n }\r\n\t\r\n /**\r\n\t * Returns if Hallel is recited on the day in question. This will return true for both Hallel shalem\r\n\t * and Chatzi Hallel. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete Hallel\r\n\t * is recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Hallel is recited.\r\n\t * @see #isHallelShalemRecited(JewishCalendar)\r\n\t */\r\n public isHallelRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n\t\t\r\n if (jewishCalendar.isRoshChodesh()) { //RH returns false for RC\r\n return true;\r\n }\r\n if (jewishCalendar.isChanukah()) {\r\n return true;\r\n }\r\n switch (month) {\r\n case JewishDate.NISSAN:\r\n if (day >= 15 && ((inIsrael && day <= 21) || (!inIsrael && day <= 22))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.IYAR: // modern holidays\r\n if (jewishCalendar.isUseModernHolidays() && (holidayIndex == JewishCalendar.YOM_HAATZMAUT\r\n\t\t\t\t\t\t|| holidayIndex == JewishCalendar.YOM_YERUSHALAYIM)) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.SIVAN:\r\n if (day == 6 || (!inIsrael && (day == 7))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.TISHREI:\r\n if (day >= 15 && (day <= 22 || (!inIsrael && (day <= 23)))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if hallel shalem is recited on the day in question. This will always return false if {@link\r\n\t * #isHallelRecited(JewishCalendar)} returns false.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if hallel shalem is recited.\r\n\t * @see #isHallelRecited(JewishCalendar)\r\n\t */\r\n public isHallelShalemRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n if (this.isHallelRecited(jewishCalendar)) {\r\n if ((jewishCalendar.isRoshChodesh() && ! jewishCalendar.isChanukah())\r\n\t\t\t\t\t|| (month == JewishDate.NISSAN && ((inIsrael && day > 15) || (!inIsrael && day > 16)))) {\r\n return false;\r\n } \r\n return true;\r\n\t\t\t\r\n } \r\n return false;\r\n }\r\n\t\r\n /**\r\n\t * Returns if Al HaNissim is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if al hanissim is recited.\r\n\t * @see JewishCalendar#isChanukah()\r\n\t * @see JewishCalendar#isPurim()\r\n\t * @see JewishCalendar#getIsMukafChoma()\r\n\t */\r\n public isAlHanissimRecited(jewishCalendar:JewishCalendar): boolean {\r\n\t return jewishCalendar.isPurim() || jewishCalendar.isChanukah();\r\n }\r\n\t\r\n /**\r\n\t * Returns if Yaaleh Veyavo is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Yaaleh Veyavo is recited.\r\n\t * @see JewishCalendar#isPesach()\r\n\t * @see JewishCalendar#isShavuos()\r\n\t * @see JewishCalendar#isRoshHashana()\r\n\t * @see JewishCalendar#isYomKippur()\r\n\t * @see JewishCalendar#isSuccos()\r\n\t * @see JewishCalendar#isShminiAtzeres()\r\n\t * @see JewishCalendar#isSimchasTorah()\r\n\t * @see JewishCalendar#isRoshChodesh()\r\n\t */\r\n public isYaalehVeyavoRecited(jewishCalendar:JewishCalendar):boolean {\r\n\t return jewishCalendar.isPesach() || jewishCalendar.isShavuos() || jewishCalendar.isRoshHashana() || jewishCalendar.isYomKippur()\r\n\t \t\t|| jewishCalendar.isSuccos() || jewishCalendar.isShminiAtzeres() || jewishCalendar.isSimchasTorah()\r\n\t \t\t|| jewishCalendar.isRoshChodesh();\r\n }\r\n\r\n /**\r\n * Returns if Is Mizmor Lesoda is recited on the day in question. \r\n * @param jewishCalendar the Jewish calendar day.\r\n * @return if Mizmor Lesoda is recited.\r\n * \r\n * @see #isMizmorLesodaRecitedErevYomKippurAndPesach()\r\n * \r\n */\r\n public isMizmorLesodaRecited(jewishCalendar: JewishCalendar): boolean {\r\n\t if(jewishCalendar.isAssurBemelacha()) {\r\n\t\t return false;\r\n\t }\r\n\r\n\t const holidayIndex: number = jewishCalendar.getYomTovIndex();\r\n\t if (!this.isMizmorLesodaRecitedErevYomKippurAndPesach()\r\n\t\t\t && (holidayIndex == JewishCalendar.EREV_YOM_KIPPUR\r\n\t\t\t\t\t || holidayIndex == JewishCalendar.EREV_PESACH\r\n\t\t\t\t\t || jewishCalendar.isCholHamoedPesach())) {\r\n\t\t return false;\r\n\t }\r\n\t return true;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the week of Purim, from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year). Some\r\n\t * chasidishe communities do not recite tachanun during this period. See the Minhag Yisrael Torah 131 and Darkei Chaim Veshalom 191who discuss the\r\n\t * minhag not to recite tachanun. Also see the Mishmeres Shalom (Hadras Shalom) who discusses the\r\n\t * minhag of not reciting it on the 16th and 17th.\r\n\t * @return If tachanun is set to be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year).\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfPurim():boolean {\r\n return this.tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II Adar II} (on a leap year).\r\n\t * @param tachanunRecitedWeekOfPurim Sets if tachanun is to recited during the week of Purim from the 11th\r\n\t * through the 17th of {@link JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II\r\n\t * Adar II} (on a leap year). Some chasidishe communities do not recite tachanun\r\n\t * during this period.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t */\r\n public setTachanunRecitedWeekOfPurim(tachanunRecitedWeekOfPurim:boolean):void {\r\n this.tachanunRecitedWeekOfPurim = tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR Iyar},\r\n\t * or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some chasidishe communities\r\n\t * do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar.\r\n\t * @return If tachanun is set to be recited during the sefira week of Hod (14 - 20 {@link\r\n\t * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfHod():boolean {\r\n return this.tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR\r\n\t * Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @param tachanunRecitedWeekOfHod Sets if tachanun should be recited during the sefira week of\r\n\t * Hod.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t */\r\n public setTachanunRecitedWeekOfHod(tachanunRecitedWeekOfHod:boolean):void {\r\n this.tachanunRecitedWeekOfHod = tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and the Pri\r\n\t * Chadash 131:7 state that some places to not recite tachanun during this period. The Sh\"UT Chasam Sofer on Choshen\r\n\t * Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses\r\n\t * Hagdola who also states that it should not be recited. The Aderes wanted to institute saying tachanun during this\r\n\t * period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the minhag in Yerushalayim.\r\n\t * The Aruch Hashulchan is of the opinion that that this minhag is incorrect, and it should be recited, and The Chazon\r\n\t * Ish also recited tachanun during this period. See the Dirshu edition of the Mishna Berurah for details.\r\n\t * @return If tachanun is set to be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei)\r\n\t */\r\n public isTachanunRecitedEndOfTishrei():boolean {\r\n return this.tachanunRecitedEndOfTishrei;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @param tachanunRecitedEndOfTishrei is tachanun recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t */\r\n public setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei:boolean):void {\r\n this.tachanunRecitedEndOfTishrei = tachanunRecitedEndOfTishrei;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week after Shavuos. This is the opinion of the Pri Megadim\r\n\t * quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim for\r\n\t * 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68\r\n\t * recited tachanun during this week.\r\n\t * \r\n\t * @return If tachanun is set to be recited during the week after Shavuos.\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n public isTachanunRecitedWeekAfterShavuos():boolean {\r\n return this.tachanunRecitedWeekAfterShavuos;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week after Shavuos.\r\n\t * @param tachanunRecitedWeekAfterShavuos is tachanun recited during the week after Shavuos.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public setTachanunRecitedWeekAfterShavuos(tachanunRecitedWeekAfterShavuos:boolean):void {\r\n this.tachanunRecitedWeekAfterShavuos = tachanunRecitedWeekAfterShavuos;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun is recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the Sheyarei Kneses Hagedola 131:12that\r\n\t * tachanun should not be recited on this day. Rav Shlomo Zalman Orbach in Halichos Shlomo on\r\n\t * Shavuos 12:16:25 is of the opinion that even in chutz laaretz it should be recited since the yemei\r\n\t * Tashlumin are counted based on Israel since that is where the karbanos are brought. Both\r\n\t * {@link #isTachanunRecitedShacharis(JewishCalendar)} and {@link #isTachanunRecitedMincha(JewishCalendar)}\r\n\t * only return false if the location is not set to {@link JewishCalendar#getInIsrael() Israel} and both\r\n\t * {@link #tachanunRecitedWeekAfterShavuos} and {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * \r\n\t * @return If tachanun is set to be recited on the 13th of {@link JewishDate#SIVAN Sivan} out of Israel.\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(isTachanunRecitedThirteenSivanOutOfIsrael)\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public isTachanunRecited13SivanOutOfIsrael():boolean {\r\n return this.tachanunRecited13SivanOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. \r\n\t * @param tachanunRecitedThirteenSivanOutOfIsrael sets if tachanun should be recited on the 13th of {@link\r\n\t * JewishDate#SIVAN Sivan} out of Israel. Both {@link #isTachanunRecitedShacharis(JewishCalendar)} and\r\n\t * {@link #isTachanunRecitedMincha(JewishCalendar)} only return false if the location is not set to {@link\r\n\t * JewishCalendar#getInIsrael() Israel} and both {@link #tachanunRecitedWeekAfterShavuos} and\r\n\t * {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t */\r\n public setTachanunRecited13SivanOutOfIsrael(tachanunRecitedThirteenSivanOutOfIsrael:boolean):void {\r\n this.tachanunRecited13SivanOutOfIsrael = tachanunRecitedThirteenSivanOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 states\r\n\t * that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the sephardim.\r\n\t * the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar).\r\n\t * The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in Rav Sheraya\r\n\t * Devlitzky's comments).\r\n\t * \r\n\t * @return If tachanun is recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n public isTachanunRecitedPesachSheni():boolean {\r\n return this.tachanunRecitedPesachSheni;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @param tachanunRecitedPesachSheni sets if tachanun should be recited on Pesach Sheni.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public setTachanunRecitedPesachSheni(tachanunRecitedPesachSheni:boolean):void {\r\n this.tachanunRecitedPesachSheni = tachanunRecitedPesachSheni;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI\r\n\t * Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is true this will be\r\n\t * ignored even if false.\r\n\t * \r\n\t * @return if tachanun is recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link\r\n\t * JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If {@link #isTachanunRecitedPesachSheni()}\r\n\t * is true this will be ignored even if false.\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public isTachanunRecited15IyarOutOfIsrael():boolean {\r\n return this.tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 15th of {@link JewishDate#IYAR Iyar} (Yom Tov Sheni shel Galuyos of\r\n\t * {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel. Ignored if {@link\r\n\t * #isTachanunRecitedPesachSheni()} is true.\r\n\t * \r\n\t * @param tachanunRecited15IyarOutOfIsrael if tachanun should be recited on the 15th of {@link JewishDate#IYAR\r\n\t * Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t */\r\n public setTachanunRecited15IyarOutOfIsrael(tachanunRecited15IyarOutOfIsrael: boolean): void {\r\n this.tachanunRecited15IyarOutOfIsrael = tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @return if tachanun is recited in mincha on erev\r\n\t * {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaErevLagBaomer():boolean {\r\n return this.tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @param tachanunRecitedMinchaErevLagBaomer sets if tachanun should be recited on mincha\r\n\t * of erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t */\r\n public setTachanunRecitedMinchaErevLagBaomer(tachanunRecitedMinchaErevLagBaomer:boolean): void {\r\n this.tachanunRecitedMinchaErevLagBaomer = tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} on a\r\n\t * leap year to the end of the month. Some chasidishe communities do not say tachanun\r\n\t * during this week. See Darkei\r\n\t * Chaim Veshalom 191.\r\n\t * @return if tachanun is recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n public isTachanunRecitedShivasYemeiHamiluim():boolean {\r\n return this.tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the Shivas Yemei Hamiluim, from the 23 of\r\n\t * {@link JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @param tachanunRecitedShivasYemeiHamiluim sets if tachanun should be recited during the\r\n\t * Shivas Yemei Hamiluim.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t */\r\n public setTachanunRecitedShivasYemeiHamiluim(tachanunRecitedShivasYemeiHamiluim:boolean):void {\r\n this.tachanunRecitedShivasYemeiHamiluim = tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Fridays. Some chasidishe communities do not recite\r\n\t * tachanun on Fridays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. This is also the minhag in Satmar.\r\n\t * @return if tachanun is recited on Fridays.\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n public isTachanunRecitedFridays():boolean {\r\n return this.tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Fridays. \r\n\t * @param tachanunRecitedFridays sets if tachanun should be recited on Fridays. Some chasidishe\r\n\t * communities do not recite tachanun on Fridays.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t */\r\n public setTachanunRecitedFridays(tachanunRecitedFridays:boolean):void {\r\n this.tachanunRecitedFridays = tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Sundays. Some chasidishe communities do not recite\r\n\t * tachanun on Sundays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. \r\n\t * @return if tachanun is recited on Sundays.\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n public isTachanunRecitedSundays():boolean {\r\n return this.tachanunRecitedSundays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Sundays. \r\n\t * @param tachanunRecitedSundays sets if tachanun should be recited on Sundays. Some chasidishe\r\n\t * communities do not recite tachanun on Sundays.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t */\r\n public setTachanunRecitedSundays(tachanunRecitedSundays:boolean):void {\r\n this.tachanunRecitedSundays = tachanunRecitedSundays;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited in Mincha the entire year. Some chasidishe communities do not recite\r\n\t * tachanun by Mincha all year round. SeeNemukei Orach Chaim 131:3.\r\n\t * @return if tachanun is recited in Mincha the entire year.\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaAllYear():boolean {\r\n return this.tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited in Mincha the entire year.\r\n\t * @param tachanunRecitedMinchaAllYear sets if tachanun should be recited by mincha all year. If set\r\n\t * to false, {@link #isTachanunRecitedMincha(JewishCalendar)} will always return false. If set to true (the\r\n\t * default), it will use the regular rules.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n public setTachanunRecitedMinchaAllYear(tachanunRecitedMinchaAllYear:boolean):void {\r\n this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if Mizmor Lesoda should be recited on Erev Yom Kippur, Erev Pesach and Chol\r\n\t * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do. The\r\n\t * default value is false.\r\n\t * @param mizmorLesodaRecitedErevYomKippurAndPesach Sets if Mizmor Lesoda should be recited on Erev Yom\r\n\t * Kippur, Erev Pesach and Chol Hamoed Pesach. If set to true (the default value is\r\n\t * false).\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n\tpublic setMizmorLesodaRecitedErevYomKippurAndPesach(mizmorLesodaRecitedErevYomKippurAndPesach: boolean): void {\r\n\t\tthis.mizmorLesodaRecitedErevYomKippurAndPesach = mizmorLesodaRecitedErevYomKippurAndPesach;\r\n\t}\r\n\r\n\t/**\r\n\t * Is Mizmor Lesoda set to be recited on Erev Yom Kippur, Erev Pesach and Chol\r\n\t * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do.\r\n\t * The default value is false.\r\n\t * @return if Mizmor Lesoda is set to be recited on Erev Yom Kippur, Erev Pesach and\r\n\t * Chol Hamoed Pesach. If set to true (the default value is false).\r\n\t * @see #isMizmorLesodaRecited(JewishCalendar)\r\n\t */\r\n\tpublic isMizmorLesodaRecitedErevYomKippurAndPesach(): boolean {\r\n\t\treturn this.mizmorLesodaRecitedErevYomKippurAndPesach;\r\n\t}\r\n}", "import { JewishDate } from \"../JewishDate.ts\";\r\ntype hiloulahObj = { name: string; src: string; }[]\r\n\r\nexport class HiloulahYomiCalculator {\r\n\tfolderWithHiloulotJSON = (new URL(import.meta.url)).pathname.substring(0, (new URL(import.meta.url)).pathname.lastIndexOf('/'));\r\n\tinitFlag = false;\r\n\thiloulot_en: Record = {};\r\n\thiloulot_he: Record = {};\r\n\tconstructor (dir = (new URL(import.meta.url)).pathname.substring(0, (new URL(import.meta.url)).pathname.lastIndexOf('/'))) {\r\n\t\tthis.folderWithHiloulotJSON = dir;\r\n\t\tthis.init()\r\n\t\t\t.then(() => this.initFlag = true)\r\n\t}\r\n\r\n\tpublic async init() {\r\n\t\tthis.hiloulot_en = (await (await fetch(this.folderWithHiloulotJSON + '/hiloulah-en.json')).json()) as Record;\r\n\t\tthis.hiloulot_he = (await (await fetch(this.folderWithHiloulotJSON + '/hiloulah-he.json')).json()) as Record;\r\n\t}\r\n\r\n\tpublic async getHiloulah(jewishCalendar: JewishDate) {\r\n\t\tif (!this.initFlag) {\r\n\t\t\tawait this.init();\r\n\t\t\tthis.initFlag = true;\r\n\t\t}\r\n\t\tconst key = jewishCalendar.getJewishMonth().toString().padStart(2, '0') + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0')\r\n\r\n\t\tlet en = (key in this.hiloulot_en ? this.hiloulot_en[key] : []);\r\n\t\tlet he = (key in this.hiloulot_he ? this.hiloulot_he[key] : []);\r\n\r\n\t\tif (!jewishCalendar.isJewishLeapYear() && jewishCalendar.getJewishMonth() == JewishDate.ADAR) {\r\n\t\t\ten = Array.from(new Set(...([\"12\", \"13\"]\r\n\t\t\t\t.map(numString => numString + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0'))\r\n\t\t\t\t.map(key => (key in this.hiloulot_en ? this.hiloulot_en[key] : [])))))\r\n\t\t\the = Array.from(new Set(...([\"12\", \"13\"]\r\n\t\t\t\t.map(numString => numString + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0'))\r\n\t\t\t\t.map(key => (key in this.hiloulot_he ? this.hiloulot_he[key] : [])))))\r\n\t\t}\r\n\r\n\t\treturn { en, he }\r\n\t}\r\n}", "import { Calendar } from '../../polyfills/Utils.ts';\r\nconst { SUNDAY, FRIDAY, SATURDAY } = Calendar;\r\n\r\nimport { JewishDate } from \"../JewishDate\";\r\nexport default class TehilimYomi {\r\n static byDayOfMonth(jDate: JewishDate) {\r\n return ({\r\n 1: [1, 9],\r\n 2: [10, 17],\r\n 3: [18, 22],\r\n 4: [23, 28],\r\n 5: [29, 34],\r\n 6: [35, 38],\r\n 7: [39, 43],\r\n 8: [44, 48],\r\n 9: [49, 54],\r\n 10: [55, 59],\r\n 11: [60, 65],\r\n 12: [66, 68],\r\n 13: [69, 71],\r\n 14: [72, 76],\r\n 15: [77, 78],\r\n 16: [79, 82],\r\n 17: [83, 87],\r\n 18: [88, 89],\r\n 19: [90, 96],\r\n 20: [97, 103],\r\n 21: [104, 105],\r\n 22: [106, 107],\r\n 23: [108, 112],\r\n 24: [113, 118],\r\n 25: ['119:1', '119:96'],\r\n 26: ['119:97', '119:176'],\r\n 27: [120, 134],\r\n 28: [135, 139],\r\n 29: [140, (jDate.getDaysInJewishMonth() == 29 ? 150 : 144)],\r\n 30: [145, 150]\r\n }[jDate.getJewishDayOfMonth()]) as [number, number] | [string, string]\r\n }\r\n\r\n static byWeek(jDate: JewishDate) {\r\n return ({\r\n [Calendar.SUNDAY]: [1, 29],\r\n [Calendar.MONDAY]: [30, 50],\r\n [Calendar.TUESDAY]: [51, 72],\r\n [Calendar.WEDNESDAY]: [73, 89],\r\n [Calendar.THURSDAY]: [90, 106],\r\n [Calendar.FRIDAY]: [107, 119],\r\n [Calendar.SATURDAY]: [120, 150]\r\n }[jDate.getDayOfWeek()]) as [number, number]\r\n }\r\n}", "import { Parsha, JewishCalendar } from \"../JewishCalendar\";\r\nimport { Temporal } from \"temporal-polyfill\";\r\n\r\n/**\r\n * This class's main goal is to return the Weekly Haftorah reading said after the Weekly Parasha\r\n * reading. Which readings to say were taken from the Chumash \"L'maan Shemo B'Ahavah\" according to\r\n * the Sepharadic Minhag.\r\n * @see WeeklyParashaReadings\r\n */\r\nexport default class WeeklyHaftarahReading {\r\n\r\n\t/**\r\n\t * This method returns a string that contains the weekly Haftorah. The {@link JewishCalendar}\r\n\t * object passed into this method should be set to Saturday because the {@link JewishCalendar#getParshah()}\r\n\t * method returns {@link com.kosherjava.zmanim.hebrewcalendar.JewishCalendar.Parsha#NONE} during\r\n\t * the week.\r\n\t * @param jCal the JewishCalendar object set to Saturday\r\n\t * @return The haftorah for this week as a string\r\n\t */\r\n\tpublic static getThisWeeksHaftarah(jCal: JewishCalendar): { text: string; source: string; } {\r\n\t\tconst specialShabbatot = {\r\n\t\t\t[Parsha.SHKALIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05DB\u05E8\u05EA \u05D9\u05D4\u05D5\u05D9\u05D3\u05E2\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.ZACHOR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8 \u05E9\u05DE\u05D5\u05D0\u05DC\",\r\n\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05D8\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.PARA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DC\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.HACHODESH]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D4'\r\n\t\t\t},\r\n\t\t\t[Parsha.HAGADOL]: {\r\n\t\t\t\ttext: \"\u05D5\u05E2\u05E8\u05D1\u05D4\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05D0\u05DB\u05D9 \u05D2'\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (jCal.getSpecialShabbos() in specialShabbatot)\r\n\t\t\t// @ts-ignore\r\n\t\t\treturn specialShabbatot[jCal.getSpecialShabbos()]\r\n\r\n\t\t// Rosh Hodesh & Erev Rosh Hodesh has its own Haftarot. Use that except if it's Matot Maseh, Re'eh or just Hanukah\r\n\t\t// Then default to weekly parasha.\r\n\r\n\t\t// The initial code wanted to make it more flexible and have each Parasha in its own ability to override ERH & RH,\r\n\t\t// but we refactored away from that since we know that only 2 Parashiot & 1 Event have the exception\r\n\t\t// Also, it combined Noah & Ki These, but we don't have that luxury because we're saving space on everything else.\r\n\t\t// (ironic it didn't combine Pekudeh & Wayaqhel-Pekudeh, among others)\r\n\r\n\t\tif (jCal.isChanukah())\r\n\t\t\treturn ([7, 8].includes(jCal.getDayOfChanukah())\r\n\t\t\t\t? {\r\n\t\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t\t} : {\r\n\t\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05D5\u05E9\u05DE\u05D7\u05D9\",\r\n\t\t\t\t\tsource: '\u05D6\u05DB\u05E8\u05D9\u05D4 \u05D1'\r\n\t\t\t\t})\r\n\r\n\t\tif (![Parsha.MATOS_MASEI, Parsha.REEH].includes(jCal.getParshah())) {\r\n\t\t\tif (jCal.isErevRoshChodesh()) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttext: \"\u05DE\u05D7\u05E8 \u05D7\u05D5\u05D3\u05E9\",\r\n\t\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05DB'\r\n\t\t\t\t};\r\n\t\t\t} else if (jCal.isRoshChodesh()) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D5'\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst tammuz17 = jCal.clone()\r\n\t\ttammuz17.setJewishDate(tammuz17.getJewishYear(), JewishCalendar.TAMMUZ, 17)\r\n\r\n\t\t// @ts-ignore\r\n\t\treturn {\r\n\t\t\t[Parsha.BERESHIS]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NOACH]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05E2\u05E7\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.LECH_LECHA]: {\r\n\t\t\t\ttext: \"\u05DC\u05DE\u05D4 \u05EA\u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYERA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E9\u05D4 \u05D0\u05D7\u05EA\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.CHAYEI_SARA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05DE\u05DC\u05DA \u05D3\u05D5\u05D3\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.TOLDOS]: {\r\n\t\t\t\ttext: \"\u05DE\u05E9\u05D0 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05D0\u05DB\u05D9 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYETZEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05E2\u05DE\u05D9 \u05EA\u05DC\u05D5\u05D0\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYISHLACH]: {\r\n\t\t\t\ttext: \"\u05D7\u05D6\u05D5\u05DF \u05E2\u05D5\u05D1\u05D3\u05D9\u05D4\",\r\n\t\t\t\tsource: '\u05E2\u05D5\u05D1\u05D3\u05D9\u05D4'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYESHEV]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05E2\u05DE\u05D5\u05E1 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.MIKETZ]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E7\u05E5 \u05E9\u05DC\u05DE\u05D4\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYIGASH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DC\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYECHI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E7\u05E8\u05D1\u05D5\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHEMOS]: {\r\n\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAERA]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB\"\u05D7'\r\n\t\t\t},\r\n\t\t\t[Parsha.BO]: {\r\n\t\t\t\ttext: \"\u05D4\u05D3\u05D1\u05E8 \u05D0\u05E9\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DE\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.BESHALACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05EA\u05E9\u05E8 \u05D3\u05D1\u05D5\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.YISRO]: {\r\n\t\t\t\ttext: \"\u05D1\u05E9\u05E0\u05EA \u05DE\u05D5\u05EA\",\r\n\t\t\t\tsource: \"\u05D9\u05E9\u05E2\u05D9\u05D4 \u05D5\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MISHPATIM]: {\r\n\t\t\t\ttext: \"\u05D4\u05D3\u05D1\u05E8 \u05D0\u05E9\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DC\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.TERUMAH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D5\u05D4 \u05E0\u05EA\u05DF\",\r\n\t\t\t\tsource: \"\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.TETZAVEH]: {\r\n\t\t\t\ttext: \"\u05D0\u05EA\u05D4 \u05D1\u05DF \u05D0\u05D3\u05DD\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SISA]: {\r\n\t\t\t\ttext: '\u05D5\u05D9\u05E9\u05DC\u05D7 \u05D0\u05D7\u05D0\u05D1',\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D9\"\u05D7'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYAKHEL]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E9\u05DC\u05D7 \u05D4\u05DE\u05DC\u05DA\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.PEKUDEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYAKHEL_PEKUDEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYIKRA]: {\r\n\t\t\t\ttext: \"\u05E2\u05DD \u05D6\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.TZAV]: {text: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\u05E1\", source: \"\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D6\"},\r\n\t\t\t[Parsha.SHMINI]: {text: \"\u05D5\u05D9\u05E1\u05E3 \u05E2\u05D5\u05D3\", source: \"\u05E9\u05DE\u05D5\u05D0\u05DC \u05D1 \u05D5\"},\r\n\t\t\t[Parsha.TAZRIA]: {text: \"\u05D5\u05D0\u05D9\u05E9 \u05D1\u05D0\", source: \"\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D3\"},\r\n\t\t\t[Parsha.METZORA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E8\u05D1\u05E2\u05D4 \u05D0\u05E0\u05E9\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.TAZRIA_METZORA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E8\u05D1\u05E2\u05D4 \u05D0\u05E0\u05E9\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.ACHREI_MOS]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.KEDOSHIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB'\r\n\t\t\t},\r\n\t\t\t[Parsha.ACHREI_MOS_KEDOSHIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB'\r\n\t\t\t},\r\n\t\t\t[Parsha.EMOR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05DB\u05D4\u05E0\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DC\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.BECHUKOSAI]: {\r\n\t\t\t\ttext: \"\u05D9\u05D4\u05D9\u05D4 \u05E2\u05D6\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D8\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAR_BECHUKOSAI]: {\r\n\t\t\t\ttext: \"\u05D9\u05D4\u05D9\u05D4 \u05E2\u05D6\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D8\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.BAMIDBAR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4 \u05DE\u05E1\u05E4\u05E8\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NASSO]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D0\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D9\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAALOSCHA]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05D5\u05E9\u05DE\u05D7\u05D9\",\r\n\t\t\t\tsource: '\u05D6\u05DB\u05E8\u05D9\u05D4 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHLACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E9\u05DC\u05D7\",\r\n\t\t\t\tsource: '\u05D9\u05D4\u05D5\u05E9\u05E2 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.KORACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.CHUKAS]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E4\u05EA\u05D7\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.BALAK]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4\",\r\n\t\t\t\tsource: \"\u05DE\u05D9\u05DB\u05D4 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.CHUKAS_BALAK]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4\",\r\n\t\t\t\tsource: \"\u05DE\u05D9\u05DB\u05D4 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.PINCHAS]:\r\n\t\t\t\t(Temporal.PlainDate.compare(jCal.getDate(), tammuz17.getDate()) == -1\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\ttext: \"\u05D5\u05D9\u05D3 \u05D9\u05D4\u05D5\u05D4\",\r\n\t\t\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D9\"\u05D7'\r\n\t\t\t\t\t} : {\r\n\t\t\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D0\"\r\n\t\t\t\t\t}),\r\n\t\t\t[Parsha.MATOS]: {\r\n\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D0\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MASEI]: {\r\n\t\t\t\ttext: \"\u05E9\u05DE\u05E2\u05D5 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D1\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MATOS_MASEI]: {\r\n\t\t\t\ttext: \"\u05E9\u05DE\u05E2\u05D5 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D1\"\r\n\t\t\t},\r\n\t\t\t[Parsha.DEVARIM]: {\r\n\t\t\t\ttext: \"\u05D7\u05D6\u05D5\u05DF\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAESCHANAN]: {\r\n\t\t\t\ttext: \"\u05E0\u05D7\u05DE\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE'\r\n\t\t\t},\r\n\t\t\t[Parsha.EIKEV]: {\r\n\t\t\t\ttext: \"\u05D5\u05EA\u05D0\u05DE\u05E8 \u05E6\u05D9\u05D5\u05DF\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D8'\r\n\t\t\t},\r\n\t\t\t[Parsha.REEH]: {\r\n\t\t\t\ttext: \"\u05E2\u05E0\u05D9\u05D4 \u05E1\u05E2\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHOFTIM]: {\r\n\t\t\t\ttext: \"\u05D0\u05E0\u05DB\u05D9 \u05D0\u05E0\u05DB\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SEITZEI]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05E2\u05E7\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SAVO]: {\r\n\t\t\t\ttext: \"\u05E7\u05D5\u05DE\u05D9 \u05D0\u05D5\u05E8\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NITZAVIM]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05E9 \u05D0\u05E9\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYEILECH]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05D1\u05D4\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.NITZAVIM_VAYEILECH]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05E9 \u05D0\u05E9\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.HAAZINU]:\r\n\t\t\t\t(jCal.getJewishMonth() == JewishCalendar.TISHREI && jCal.getJewishDayOfMonth() >= 10\r\n\t\t\t\t\t? (jCal.getJewishDayOfMonth() == 10\r\n\t\t\t\t\t\t? { text: \"\u05E1\u05DC\u05D5 \u05E1\u05DC\u05D5\", source: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D6' }\r\n\t\t\t\t\t\t: { text: \"\u05D5\u05D9\u05D3\u05D1\u05E8 \u05D3\u05D5\u05D3\", source: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D1 \u05DB\"\u05D1' })\r\n\t\t\t\t\t: { text: \"\u05E9\u05D5\u05D1\u05D4\", source: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D3' }),\r\n\t\t\t[Parsha.VZOS_HABERACHA]: { text: \"\u05D5\u05D9\u05D4\u05D9 \u05D0\u05D7\u05E8\u05D9\", source: '\u05D9\u05D4\u05D5\u05E9\u05E2 \u05D0' },\r\n\t\t}[jCal.getParshah()]\r\n\t}\r\n}\r\n", "import { Daf } from './limud/Daf.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { JewishCalendar, Parsha } from './JewishCalendar.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\nimport { DafYomiYerushalmi } from './limud/YerushalmiYomiCalculator.ts';\r\n\r\n/**\r\n * The HebrewDateFormatter class formats a {@link JewishDate}.\r\n *\r\n * The class formats Jewish dates, numbers, Daf Yomi (Bavli and Yerushalmi), the Omer,\r\n * Parshas Hashavua (including the special parshiyos of Shekalim, Zachor, Parah\r\n * and Hachodesh), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings.\r\n * Sample full date output includes (using various options):\r\n *
    \r\n *
  • 21 Shevat, 5729
  • \r\n *
  • כא שבט תשכט
  • \r\n *
  • כ״א שבט ה׳תשכ״ט
  • \r\n *
  • כ״א שבט תש״פ or\r\n * כ״א שבט תש״ף
  • \r\n *
  • כ׳ שבט ו׳ אלפים
  • \r\n *
\r\n *\r\n * @see JewishDate\r\n * @see JewishCalendar\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class HebrewDateFormatter {\r\n /**\r\n * See {@link #isHebrewFormat()} and {@link #setHebrewFormat(boolean)}.\r\n */\r\n private hebrewFormat: boolean = false;\r\n\r\n /**\r\n * See {@link #isUseLongHebrewYears()} and {@link #setUseLongHebrewYears(boolean)}.\r\n */\r\n private useLonghebrewYears: boolean = false;\r\n\r\n /**\r\n * See {@link #isUseGershGershayim()} and {@link #setUseGershGershayim(boolean)}.\r\n */\r\n\r\n private useGershGershayim: boolean = true;\r\n /**\r\n * See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}.\r\n */\r\n\r\n private longWeekFormat: boolean = true;\r\n /**\r\n * See {@link #isUseFinalFormLetters()} and {@link #setUseFinalFormLetters(boolean)}.\r\n */\r\n\r\n private useFinalFormLetters: boolean = false;\r\n\r\n /**\r\n * The internal DateFormat.  See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}.\r\n */\r\n private weekFormat: Intl.DateTimeFormatOptions | null = null;\r\n\r\n /**\r\n * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method\r\n\t * uses this for transliterated parsha formatting.  This list can be overridden (for Sephardi\r\n\t * English transliteration for example) by setting the {@link #setTransliteratedParshiosList(EnumMap)}.  The list\r\n\t * includes double and special parshiyos is set as \"Bereshis, Noach, Lech Lecha, Vayera, Chayei Sara,\r\n\t * Toldos, Vayetzei, Vayishlach, Vayeshev, Miketz, Vayigash, Vayechi, Shemos, Vaera, Bo, Beshalach, Yisro, Mishpatim,\r\n\t * Terumah, Tetzaveh, Ki Sisa, Vayakhel, Pekudei, Vayikra, Tzav, Shmini, Tazria, Metzora, Achrei Mos, Kedoshim, Emor,\r\n\t * Behar, Bechukosai, Bamidbar, Nasso, Beha'aloscha, Sh'lach, Korach, Chukas, Balak, Pinchas, Matos, Masei, Devarim,\r\n\t * Vaeschanan, Eikev, Re'eh, Shoftim, Ki Seitzei, Ki Savo, Nitzavim, Vayeilech, Ha'Azinu, Vezos Habracha,\r\n\t * Vayakhel Pekudei, Tazria Metzora, Achrei Mos Kedoshim, Behar Bechukosai, Chukas Balak, Matos Masei, Nitzavim Vayeilech,\r\n\t * Shekalim, Zachor, Parah, Hachodesh,Shuva, Shira, Hagadol, Chazon, Nachamu\".\r\n *\r\n * @see #formatParsha(JewishCalendar)\r\n */\r\n private transliteratedParshaMap: Record = {\r\n [Parsha.NONE]: '',\r\n [Parsha.BERESHIS]: 'Bereshis',\r\n [Parsha.NOACH]: 'Noach',\r\n [Parsha.LECH_LECHA]: 'Lech Lecha',\r\n [Parsha.VAYERA]: 'Vayera',\r\n [Parsha.CHAYEI_SARA]: 'Chayei Sara',\r\n [Parsha.TOLDOS]: 'Toldos',\r\n [Parsha.VAYETZEI]: 'Vayetzei',\r\n [Parsha.VAYISHLACH]: 'Vayishlach',\r\n [Parsha.VAYESHEV]: 'Vayeshev',\r\n [Parsha.MIKETZ]: 'Miketz',\r\n [Parsha.VAYIGASH]: 'Vayigash',\r\n [Parsha.VAYECHI]: 'Vayechi',\r\n [Parsha.SHEMOS]: 'Shemos',\r\n [Parsha.VAERA]: 'Vaera',\r\n [Parsha.BO]: 'Bo',\r\n [Parsha.BESHALACH]: 'Beshalach',\r\n [Parsha.YISRO]: 'Yisro',\r\n [Parsha.MISHPATIM]: 'Mishpatim',\r\n [Parsha.TERUMAH]: 'Terumah',\r\n [Parsha.TETZAVEH]: 'Tetzaveh',\r\n [Parsha.KI_SISA]: 'Ki Sisa',\r\n [Parsha.VAYAKHEL]: 'Vayakhel',\r\n [Parsha.PEKUDEI]: 'Pekudei',\r\n [Parsha.VAYIKRA]: 'Vayikra',\r\n [Parsha.TZAV]: 'Tzav',\r\n [Parsha.SHMINI]: 'Shmini',\r\n [Parsha.TAZRIA]: 'Tazria',\r\n [Parsha.METZORA]: 'Metzora',\r\n [Parsha.ACHREI_MOS]: 'Achrei Mos',\r\n [Parsha.KEDOSHIM]: 'Kedoshim',\r\n [Parsha.EMOR]: 'Emor',\r\n [Parsha.BEHAR]: 'Behar',\r\n [Parsha.BECHUKOSAI]: 'Bechukosai',\r\n [Parsha.BAMIDBAR]: 'Bamidbar',\r\n [Parsha.NASSO]: 'Nasso',\r\n [Parsha.BEHAALOSCHA]: 'Beha\\'aloscha',\r\n [Parsha.SHLACH]: 'Sh\\'lach',\r\n [Parsha.KORACH]: 'Korach',\r\n [Parsha.CHUKAS]: 'Chukas',\r\n [Parsha.BALAK]: 'Balak',\r\n [Parsha.PINCHAS]: 'Pinchas',\r\n [Parsha.MATOS]: 'Matos',\r\n [Parsha.MASEI]: 'Masei',\r\n [Parsha.DEVARIM]: 'Devarim',\r\n [Parsha.VAESCHANAN]: 'Vaeschanan',\r\n [Parsha.EIKEV]: 'Eikev',\r\n [Parsha.REEH]: 'Re\\'eh',\r\n [Parsha.SHOFTIM]: 'Shoftim',\r\n [Parsha.KI_SEITZEI]: 'Ki Seitzei',\r\n [Parsha.KI_SAVO]: 'Ki Savo',\r\n [Parsha.NITZAVIM]: 'Nitzavim',\r\n [Parsha.VAYEILECH]: 'Vayeilech',\r\n [Parsha.HAAZINU]: 'Ha\\'Azinu',\r\n [Parsha.VZOS_HABERACHA]: 'Vezos Habracha',\r\n [Parsha.VAYAKHEL_PEKUDEI]: 'Vayakhel Pekudei',\r\n [Parsha.TAZRIA_METZORA]: 'Tazria Metzora',\r\n [Parsha.ACHREI_MOS_KEDOSHIM]: 'Achrei Mos Kedoshim',\r\n [Parsha.BEHAR_BECHUKOSAI]: 'Behar Bechukosai',\r\n [Parsha.CHUKAS_BALAK]: 'Chukas Balak',\r\n [Parsha.MATOS_MASEI]: 'Matos Masei',\r\n [Parsha.NITZAVIM_VAYEILECH]: 'Nitzavim Vayeilech',\r\n [Parsha.SHKALIM]: 'Shekalim',\r\n [Parsha.ZACHOR]: 'Zachor',\r\n [Parsha.PARA]: 'Parah',\r\n [Parsha.HACHODESH]: 'Hachodesh',\r\n [Parsha.SHUVA]: 'Shuva',\r\n [Parsha.SHIRA]: 'Shira',\r\n [Parsha.HAGADOL]: 'Hagadol',\r\n [Parsha.CHAZON]: 'Chazon',\r\n [Parsha.NACHAMU]: 'Nachamu',\r\n };\r\n\r\n /**\r\n * Unicode {@link EnumMap} of Hebrew parshiyos.  The list includes double and special parshiyos and\r\n\t * contains \"בראשית, נח, לך לך,\r\n * וירא, חיי שרה,\r\n * תולדות, ויצא, וישלח,\r\n * וישב, מקץ, ויגש, ויחי,\r\n * שמות, וארא, בא, בשלח,\r\n * יתרו, משפטים, תרומה,\r\n * תצוה, כי תשא, ויקהל,\r\n * פקודי, ויקרא, צו,\r\n * שמיני, תזריע, מצרע,\r\n * אחרי מות, קדושים,\r\n * אמור, בהר, בחקתי,\r\n * במדבר, נשא, בהעלתך,\r\n * שלח לך, קרח, חוקת, בלק,\r\n * פינחס, מטות, מסעי,\r\n * דברים, ואתחנן, עקב,\r\n * ראה, שופטים, כי תצא,\r\n * כי תבוא, D9;צבים, וילך,\r\n * האזינו, וזאת הברכה,\r\n * ויקהל פקודי, תזריע\r\n * מצרע, אחרי מות\r\n * קדושים, בהר בחקתי,\r\n * חוקת בלק, מטות מסעי,\r\n * נצבים וילך, שקלים,\r\n\t * זכור, פרה, החדש,\r\n\t * שובה,שירה,הגדול,\r\n\t * חזון,נחמו\"\r\n */\r\n private readonly hebrewParshaMap: Record = {\r\n [Parsha.NONE]: '',\r\n [Parsha.BERESHIS]: '\\u05D1\\u05E8\\u05D0\\u05E9\\u05D9\\u05EA',\r\n [Parsha.NOACH]: '\\u05E0\\u05D7',\r\n [Parsha.LECH_LECHA]: '\\u05DC\\u05DA \\u05DC\\u05DA',\r\n [Parsha.VAYERA]: '\\u05D5\\u05D9\\u05E8\\u05D0',\r\n [Parsha.CHAYEI_SARA]: '\\u05D7\\u05D9\\u05D9 \\u05E9\\u05E8\\u05D4',\r\n [Parsha.TOLDOS]: '\\u05EA\\u05D5\\u05DC\\u05D3\\u05D5\\u05EA',\r\n [Parsha.VAYETZEI]: '\\u05D5\\u05D9\\u05E6\\u05D0',\r\n [Parsha.VAYISHLACH]: '\\u05D5\\u05D9\\u05E9\\u05DC\\u05D7',\r\n [Parsha.VAYESHEV]: '\\u05D5\\u05D9\\u05E9\\u05D1',\r\n [Parsha.MIKETZ]: '\\u05DE\\u05E7\\u05E5',\r\n [Parsha.VAYIGASH]: '\\u05D5\\u05D9\\u05D2\\u05E9',\r\n [Parsha.VAYECHI]: '\\u05D5\\u05D9\\u05D7\\u05D9',\r\n [Parsha.SHEMOS]: '\\u05E9\\u05DE\\u05D5\\u05EA',\r\n [Parsha.VAERA]: '\\u05D5\\u05D0\\u05E8\\u05D0',\r\n [Parsha.BO]: '\\u05D1\\u05D0',\r\n [Parsha.BESHALACH]: '\\u05D1\\u05E9\\u05DC\\u05D7',\r\n [Parsha.YISRO]: '\\u05D9\\u05EA\\u05E8\\u05D5',\r\n [Parsha.MISHPATIM]: '\\u05DE\\u05E9\\u05E4\\u05D8\\u05D9\\u05DD',\r\n [Parsha.TERUMAH]: '\\u05EA\\u05E8\\u05D5\\u05DE\\u05D4',\r\n [Parsha.TETZAVEH]: '\\u05EA\\u05E6\\u05D5\\u05D4',\r\n [Parsha.KI_SISA]: '\\u05DB\\u05D9 \\u05EA\\u05E9\\u05D0',\r\n [Parsha.VAYAKHEL]: '\\u05D5\\u05D9\\u05E7\\u05D4\\u05DC',\r\n [Parsha.PEKUDEI]: '\\u05E4\\u05E7\\u05D5\\u05D3\\u05D9',\r\n [Parsha.VAYIKRA]: '\\u05D5\\u05D9\\u05E7\\u05E8\\u05D0',\r\n [Parsha.TZAV]: '\\u05E6\\u05D5',\r\n [Parsha.SHMINI]: '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9',\r\n [Parsha.TAZRIA]: '\\u05EA\\u05D6\\u05E8\\u05D9\\u05E2',\r\n [Parsha.METZORA]: '\\u05DE\\u05E6\\u05E8\\u05E2',\r\n [Parsha.ACHREI_MOS]: '\\u05D0\\u05D7\\u05E8\\u05D9 \\u05DE\\u05D5\\u05EA',\r\n [Parsha.KEDOSHIM]: '\\u05E7\\u05D3\\u05D5\\u05E9\\u05D9\\u05DD',\r\n [Parsha.EMOR]: '\\u05D0\\u05DE\\u05D5\\u05E8',\r\n [Parsha.BEHAR]: '\\u05D1\\u05D4\\u05E8',\r\n [Parsha.BECHUKOSAI]: '\\u05D1\\u05D7\\u05E7\\u05EA\\u05D9',\r\n [Parsha.BAMIDBAR]: '\\u05D1\\u05DE\\u05D3\\u05D1\\u05E8',\r\n [Parsha.NASSO]: '\\u05E0\\u05E9\\u05D0',\r\n [Parsha.BEHAALOSCHA]: '\\u05D1\\u05D4\\u05E2\\u05DC\\u05EA\\u05DA',\r\n [Parsha.SHLACH]: '\\u05E9\\u05DC\\u05D7 \\u05DC\\u05DA',\r\n [Parsha.KORACH]: '\\u05E7\\u05E8\\u05D7',\r\n [Parsha.CHUKAS]: '\\u05D7\\u05D5\\u05E7\\u05EA',\r\n [Parsha.BALAK]: '\\u05D1\\u05DC\\u05E7',\r\n [Parsha.PINCHAS]: '\\u05E4\\u05D9\\u05E0\\u05D7\\u05E1',\r\n [Parsha.MATOS]: '\\u05DE\\u05D8\\u05D5\\u05EA',\r\n [Parsha.MASEI]: '\\u05DE\\u05E1\\u05E2\\u05D9',\r\n [Parsha.DEVARIM]: '\\u05D3\\u05D1\\u05E8\\u05D9\\u05DD',\r\n [Parsha.VAESCHANAN]: '\\u05D5\\u05D0\\u05EA\\u05D7\\u05E0\\u05DF',\r\n [Parsha.EIKEV]: '\\u05E2\\u05E7\\u05D1',\r\n [Parsha.REEH]: '\\u05E8\\u05D0\\u05D4',\r\n [Parsha.SHOFTIM]: '\\u05E9\\u05D5\\u05E4\\u05D8\\u05D9\\u05DD',\r\n [Parsha.KI_SEITZEI]: '\\u05DB\\u05D9 \\u05EA\\u05E6\\u05D0',\r\n [Parsha.KI_SAVO]: '\\u05DB\\u05D9 \\u05EA\\u05D1\\u05D5\\u05D0',\r\n [Parsha.NITZAVIM]: '\\u05E0\\u05E6\\u05D1\\u05D9\\u05DD',\r\n [Parsha.VAYEILECH]: '\\u05D5\\u05D9\\u05DC\\u05DA',\r\n [Parsha.HAAZINU]: '\\u05D4\\u05D0\\u05D6\\u05D9\\u05E0\\u05D5',\r\n [Parsha.VZOS_HABERACHA]: '\\u05D5\\u05D6\\u05D0\\u05EA \\u05D4\\u05D1\\u05E8\\u05DB\\u05D4 ',\r\n [Parsha.VAYAKHEL_PEKUDEI]: '\\u05D5\\u05D9\\u05E7\\u05D4\\u05DC \\u05E4\\u05E7\\u05D5\\u05D3\\u05D9',\r\n [Parsha.TAZRIA_METZORA]: '\\u05EA\\u05D6\\u05E8\\u05D9\\u05E2 \\u05DE\\u05E6\\u05E8\\u05E2',\r\n [Parsha.ACHREI_MOS_KEDOSHIM]: '\\u05D0\\u05D7\\u05E8\\u05D9 \\u05DE\\u05D5\\u05EA \\u05E7\\u05D3\\u05D5\\u05E9\\u05D9\\u05DD',\r\n [Parsha.BEHAR_BECHUKOSAI]: '\\u05D1\\u05D4\\u05E8 \\u05D1\\u05D7\\u05E7\\u05EA\\u05D9',\r\n [Parsha.CHUKAS_BALAK]: '\\u05D7\\u05D5\\u05E7\\u05EA \\u05D1\\u05DC\\u05E7',\r\n [Parsha.MATOS_MASEI]: '\\u05DE\\u05D8\\u05D5\\u05EA \\u05DE\\u05E1\\u05E2\\u05D9',\r\n [Parsha.NITZAVIM_VAYEILECH]: '\\u05E0\\u05E6\\u05D1\\u05D9\\u05DD \\u05D5\\u05D9\\u05DC\\u05DA',\r\n [Parsha.SHKALIM]: '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD',\r\n [Parsha.ZACHOR]: '\\u05D6\\u05DB\\u05D5\\u05E8',\r\n [Parsha.PARA]: '\\u05E4\\u05E8\\u05D4',\r\n [Parsha.HACHODESH]: '\\u05D4\\u05D7\\u05D3\\u05E9',\r\n [Parsha.SHUVA]: '\\u05E9\\u05D5\\u05D1\\u05D4',\r\n [Parsha.SHIRA]: '\\u05E9\\u05D9\\u05E8\\u05D4',\r\n [Parsha.HAGADOL]: '\\u05D4\\u05D2\\u05D3\\u05D5\\u05DC',\r\n [Parsha.CHAZON]: '\\u05D7\\u05D6\\u05D5\\u05DF',\r\n [Parsha.NACHAMU]: '\\u05E0\\u05D7\\u05DE\\u05D5',\r\n };\r\n\r\n /**\r\n * returns if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as\r\n * ראשון or short such as א when formatting the day of week in\r\n * {@link #isHebrewFormat() Hebrew}.\r\n *\r\n * @return the longWeekFormat\r\n * @see #setLongWeekFormat(boolean)\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public isLongWeekFormat(): boolean {\r\n return this.longWeekFormat;\r\n }\r\n\r\n /**\r\n * Setting to control if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as\r\n * ראשון or short such as א when formatting the day of week in\r\n * {@link #isHebrewFormat() Hebrew}.\r\n *\r\n * @param longWeekFormat\r\n * the longWeekFormat to set\r\n */\r\n public setLongWeekFormat(longWeekFormat: boolean): void {\r\n this.longWeekFormat = longWeekFormat;\r\n\r\n this.weekFormat = {\r\n weekday: longWeekFormat ? 'long' : 'short',\r\n };\r\n }\r\n\r\n /**\r\n * The gersh character is the ׳ char\r\n * that is similar to a single quote and is used in formatting Hebrew numbers.\r\n */\r\n private static readonly GERESH: string = '\\u05F3';\r\n\r\n /**\r\n * The gershyim character is the ״ char\r\n * that is similar to a double quote and is used in formatting Hebrew numbers.\r\n */\r\n private static readonly GERSHAYIM: string = '\\u05F4';\r\n\r\n /**\r\n * Transliterated month names.  Defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\",\r\n * \"Kislev\", \"Teves\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\" ].\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n private transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n /**\r\n * The Hebrew omer prefix charachter. It defaults to ב producing בעומר,\r\n * but can be set to ל to produce לעומר (or any other prefix).\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n private hebrewOmerPrefix: string = '\\u05D1';\r\n\r\n /**\r\n * The default value for formatting Shabbos (Saturday).  Defaults to Shabbos.\r\n * @see #getTransliteratedShabbosDayOfWeek()\r\n * @see #setTransliteratedShabbosDayOfWeek(String)\r\n */\r\n private transliteratedShabbosDayOfweek: string = 'Shabbos';\r\n\r\n /**\r\n * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation \"Shabbos\".\r\n * This can be overwritten using the {@link #setTransliteratedShabbosDayOfWeek(String)}\r\n *\r\n * @return the transliteratedShabbos. The default list of months uses Ashkenazi pronunciation \"Shabbos\".\r\n * @see #setTransliteratedShabbosDayOfWeek(String)\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public getTransliteratedShabbosDayOfWeek(): string {\r\n return this.transliteratedShabbosDayOfweek;\r\n }\r\n\r\n /**\r\n * Setter to override the default transliterated name of \"Shabbos\" to alternate spelling such as \"Shabbat\" used by\r\n * the {@link #formatDayOfWeek(JewishDate)}\r\n *\r\n * @param transliteratedShabbos\r\n * the transliteratedShabbos to set\r\n *\r\n * @see #getTransliteratedShabbosDayOfWeek()\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public setTransliteratedShabbosDayOfWeek(transliteratedShabbos: string): void {\r\n this.transliteratedShabbosDayOfweek = transliteratedShabbos;\r\n }\r\n\r\n /**\r\n * See {@link #getTransliteratedHolidayList()} and {@link #setTransliteratedHolidayList(String[])}.\r\n */\r\n private transliteratedHolidays: string[] = ['Erev Pesach', 'Pesach', 'Chol Hamoed Pesach', 'Pesach Sheni',\r\n 'Erev Shavuos', 'Shavuos', 'Seventeenth of Tammuz', 'Tishah B\\'Av', 'Tu B\\'Av', 'Erev Rosh Hashana',\r\n 'Rosh Hashana', 'Fast of Gedalyah', 'Erev Yom Kippur', 'Yom Kippur', 'Erev Succos', 'Succos',\r\n 'Chol Hamoed Succos', 'Hoshana Rabbah', 'Shemini Atzeres', 'Simchas Torah', 'Erev Chanukah', 'Chanukah',\r\n 'Tenth of Teves', 'Tu B\\'Shvat', 'Fast of Esther', 'Purim', 'Shushan Purim', 'Purim Katan', 'Rosh Chodesh',\r\n 'Yom HaShoah', 'Yom Hazikaron', 'Yom Ha\\'atzmaut', 'Yom Yerushalayim', 'Lag B\\'Omer', 'Shushan Purim Katan',\r\n 'Isru Chag'];\r\n\r\n /**\r\n * Returns the list of holidays transliterated into Latin chars. This is used by the\r\n * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses\r\n * Ashkenazi pronunciation in typical American English spelling.\r\n *\r\n * @return the list of transliterated holidays. The default list is currently [\"Erev Pesach\", \"Pesach\",\r\n * \"Chol Hamoed Pesach\", \"Pesach Sheni\", \"Erev Shavuos\", \"Shavuos\", \"Seventeenth of Tammuz\", \"Tishah B'Av\",\r\n * \"Tu B'Av\", \"Erev Rosh Hashana\", \"Rosh Hashana\", \"Fast of Gedalyah\", \"Erev Yom Kippur\", \"Yom Kippur\",\r\n * \"Erev Succos\", \"Succos\", \"Chol Hamoed Succos\", \"Hoshana Rabbah\", \"Shemini Atzeres\", \"Simchas Torah\",\r\n * \"Erev Chanukah\", \"Chanukah\", \"Tenth of Teves\", \"Tu B'Shvat\", \"Fast of Esther\", \"Purim\", \"Shushan Purim\",\r\n * \"Purim Katan\", \"Rosh Chodesh\", \"Yom HaShoah\", \"Yom Hazikaron\", \"Yom Ha'atzmaut\", \"Yom Yerushalayim\",\r\n * \"Lag B'Omer\",\"Shushan Purim Katan\",\"Isru Chag\"].\r\n *\r\n * @see #setTransliteratedMonthList(String[])\r\n * @see #formatYomTov(JewishCalendar)\r\n * @see #isHebrewFormat()\r\n */\r\n public getTransliteratedHolidayList(): string[] {\r\n return this.transliteratedHolidays;\r\n }\r\n\r\n /**\r\n * Sets the list of holidays transliterated into Latin chars. This is used by the\r\n * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String.\r\n *\r\n * @param transliteratedHolidays\r\n * the transliteratedHolidays to set. Ensure that the sequence exactly matches the list returned by the\r\n * default\r\n */\r\n public setTransliteratedHolidayList(transliteratedHolidays: string[]): void {\r\n this.transliteratedHolidays = transliteratedHolidays;\r\n }\r\n\r\n /**\r\n * Hebrew holiday array in the following format.
[\"ערב פסח\",\r\n * \"פסח\", \"חול המועד\r\n * פסח\", \"פסח שני\", \"ערב\r\n * שבועות\", \"שבועות\",\r\n * \"שבעה עשר בתמוז\",\r\n * \"תשעה באב\",\r\n * \"ט״ו באב\",\r\n * \"ערב ראש השנה\",\r\n * \"ראש השנה\",\r\n * \"צום גדליה\",\r\n * \"ערב יום כיפור\",\r\n * \"יום כיפור\",\r\n * \"ערב סוכות\",\r\n * \"סוכות\",\r\n * \"חול המועד סוכות\",\r\n * \"הושענא רבה\",\r\n * \"שמיני עצרת\",\r\n * \"שמחת תורה\",\r\n * \"ערב חנוכה\",\r\n * \"חנוכה\", \"עשרה בטבת\",\r\n * \"ט״ו בשבט\",\r\n * \"תענית אסתר\",\r\n * \"פורים\",\r\n * \"פורים שושן\",\r\n * \"פורים קטן\",\r\n * \"ראש חודש\",\r\n * \"יום השואה\",\r\n * \"יום הזיכרון\",\r\n * \"יום העצמאות\",\r\n * \"יום ירושלים\",\r\n * \"ל״ג בעומר\",\r\n * \"פורים שושן קטן\"]\r\n */\r\n private static readonly hebrewHolidays: string[] = ['\\u05E2\\u05E8\\u05D1 \\u05E4\\u05E1\\u05D7', '\\u05E4\\u05E1\\u05D7',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E4\\u05E1\\u05D7',\r\n '\\u05E4\\u05E1\\u05D7 \\u05E9\\u05E0\\u05D9', '\\u05E2\\u05E8\\u05D1 \\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05E2\\u05D4 \\u05E2\\u05E9\\u05E8 \\u05D1\\u05EA\\u05DE\\u05D5\\u05D6',\r\n '\\u05EA\\u05E9\\u05E2\\u05D4 \\u05D1\\u05D0\\u05D1', '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05D0\\u05D1',\r\n '\\u05E2\\u05E8\\u05D1 \\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4', '\\u05E6\\u05D5\\u05DD \\u05D2\\u05D3\\u05DC\\u05D9\\u05D4',\r\n '\\u05E2\\u05E8\\u05D1 \\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8',\r\n '\\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8', '\\u05E2\\u05E8\\u05D1 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D4\\u05D5\\u05E9\\u05E2\\u05E0\\u05D0 \\u05E8\\u05D1\\u05D4',\r\n '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9 \\u05E2\\u05E6\\u05E8\\u05EA',\r\n '\\u05E9\\u05DE\\u05D7\\u05EA \\u05EA\\u05D5\\u05E8\\u05D4', '\\u05E2\\u05E8\\u05D1 \\u05D7\\u05E0\\u05D5\\u05DB\\u05D4',\r\n '\\u05D7\\u05E0\\u05D5\\u05DB\\u05D4', '\\u05E2\\u05E9\\u05E8\\u05D4 \\u05D1\\u05D8\\u05D1\\u05EA',\r\n '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05E9\\u05D1\\u05D8', '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA \\u05D0\\u05E1\\u05EA\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD', '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E7\\u05D8\\u05DF', '\\u05E8\\u05D0\\u05E9 \\u05D7\\u05D5\\u05D3\\u05E9',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E9\\u05D5\\u05D0\\u05D4',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05D6\\u05D9\\u05DB\\u05E8\\u05D5\\u05DF',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E2\\u05E6\\u05DE\\u05D0\\u05D5\\u05EA',\r\n '\\u05D9\\u05D5\\u05DD \\u05D9\\u05E8\\u05D5\\u05E9\\u05DC\\u05D9\\u05DD',\r\n '\\u05DC\\u05F4\\u05D2 \\u05D1\\u05E2\\u05D5\\u05DE\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF \\u05E7\\u05D8\\u05DF',\r\n '\\u05D0\\u05E1\\u05E8\\u05D5 \\u05D7\\u05D2'];\r\n\r\n /**\r\n * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters.\r\n *\r\n * @param jewishCalendar the JewishCalendar\r\n * @return the formatted holiday or an empty String if the day is not a holiday.\r\n * @see #isHebrewFormat()\r\n */\r\n public formatYomTov(jewishCalendar: JewishCalendar): string {\r\n const index: number = jewishCalendar.getYomTovIndex();\r\n if (index === JewishCalendar.CHANUKAH) {\r\n const dayOfChanukah: number = jewishCalendar.getDayOfChanukah();\r\n return this.hebrewFormat\r\n ? (`${this.formatHebrewNumber(dayOfChanukah)} ${HebrewDateFormatter.hebrewHolidays[index]}`)\r\n : (`${this.transliteratedHolidays[index]} ${dayOfChanukah}`);\r\n }\r\n if (index === -1) return '';\r\n return this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[index] : this.transliteratedHolidays[index];\r\n }\r\n\r\n /**\r\n * Formats a day as Rosh Chodesh in the format of in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String will be returned.\r\n * @param jewishCalendar the JewishCalendar\r\n * @return The formatted String in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String will be returned.\r\n */\r\n public formatRoshChodesh(jewishCalendar: JewishCalendar): string {\r\n if (!jewishCalendar.isRoshChodesh()) return '';\r\n\r\n let formattedRoshChodesh: string;\r\n let month: number = jewishCalendar.getJewishMonth();\r\n if (jewishCalendar.getJewishDayOfMonth() === 30) {\r\n if (month < JewishCalendar.ADAR || (month === JewishCalendar.ADAR && jewishCalendar.isJewishLeapYear())) {\r\n month++;\r\n } else { // roll to Nissan\r\n month = JewishCalendar.NISSAN;\r\n }\r\n }\r\n\r\n // This method is only about formatting, so we shouldn't make any changes to the params passed in...\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _jewishCalendar = jewishCalendar.clone() as JewishCalendar;\r\n _jewishCalendar.setJewishMonth(month);\r\n formattedRoshChodesh = this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[JewishCalendar.ROSH_CHODESH]\r\n : this.transliteratedHolidays[JewishCalendar.ROSH_CHODESH];\r\n formattedRoshChodesh += ` ${this.formatMonth(_jewishCalendar)}`;\r\n return formattedRoshChodesh;\r\n }\r\n\r\n /**\r\n * Returns if the formatter is set to use Hebrew formatting in the various formatting methods.\r\n *\r\n * @return the hebrewFormat\r\n * @see #setHebrewFormat(boolean)\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public isHebrewFormat(): boolean {\r\n return this.hebrewFormat;\r\n }\r\n\r\n /**\r\n * Sets the formatter to format in Hebrew in the various formatting methods.\r\n *\r\n * @param hebrewFormat\r\n * the hebrewFormat to set\r\n * @see #isHebrewFormat()\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public setHebrewFormat(hebrewFormat: boolean): void {\r\n this.hebrewFormat = hebrewFormat;\r\n }\r\n\r\n /**\r\n * Returns the Hebrew Omer prefix.  By default it is the letter ב producing\r\n * בעומר, but it can be set to ל to produce\r\n * לעומר (or any other prefix) using the {@link #setHebrewOmerPrefix(String)}.\r\n *\r\n * @return the hebrewOmerPrefix\r\n *\r\n * @see #hebrewOmerPrefix\r\n * @see #setHebrewOmerPrefix(String)\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public getHebrewOmerPrefix(): string {\r\n return this.hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Method to set the Hebrew Omer prefix. By default it is the letter ב, but this allows setting it to a\r\n * ל (or any other prefix).\r\n *\r\n * @param hebrewOmerPrefix\r\n * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל.\r\n * @see #getHebrewOmerPrefix()\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public setHebrewOmerPrefix(hebrewOmerPrefix: string): void {\r\n this.hebrewOmerPrefix = hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Returns the list of months transliterated into Latin chars. The default list of months uses Ashkenazi\r\n * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar -\r\n * \"Adar\", \"Adar II\", \"Adar I\"\r\n *\r\n * @return the list of months beginning in Nissan and ending in in \"Adar\", \"Adar II\", \"Adar I\". The default list is\r\n * currently [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\", \"Kislev\", \"Teves\",\r\n * \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public getTransliteratedMonthList(): string[] {\r\n return this.transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default\r\n * uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedMonths\r\n * an array of 14 month names that defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tamuz\", \"Av\", \"Elul\", \"Tishrei\",\r\n * \"Heshvan\", \"Kislev\", \"Tevet\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #getTransliteratedMonthList()\r\n */\r\n public setTransliteratedMonthList(transliteratedMonths: string[]): void {\r\n this.transliteratedMonths = transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Unicode list of Hebrew months in the following format [\"\\u05E0\\u05D9\\u05E1\\u05DF\",\"\\u05D0\\u05D9\\u05D9\\u05E8\",\r\n * \"\\u05E1\\u05D9\\u05D5\\u05DF\",\"\\u05EA\\u05DE\\u05D5\\u05D6\",\"\\u05D0\\u05D1\",\"\\u05D0\\u05DC\\u05D5\\u05DC\",\r\n * \"\\u05EA\\u05E9\\u05E8\\u05D9\",\"\\u05D7\\u05E9\\u05D5\\u05DF\",\"\\u05DB\\u05E1\\u05DC\\u05D5\",\"\\u05D8\\u05D1\\u05EA\",\r\n * \"\\u05E9\\u05D1\\u05D8\",\"\\u05D0\\u05D3\\u05E8\",\"\\u05D0\\u05D3\\u05E8 \\u05D1\",\"\\u05D0\\u05D3\\u05E8 \\u05D0\"]\r\n *\r\n * @see #formatMonth(JewishDate)\r\n */\r\n private hebrewMonths: string[] = ['\\u05E0\\u05D9\\u05E1\\u05DF', '\\u05D0\\u05D9\\u05D9\\u05E8',\r\n '\\u05E1\\u05D9\\u05D5\\u05DF', '\\u05EA\\u05DE\\u05D5\\u05D6', '\\u05D0\\u05D1', '\\u05D0\\u05DC\\u05D5\\u05DC',\r\n '\\u05EA\\u05E9\\u05E8\\u05D9', '\\u05D7\\u05E9\\u05D5\\u05DF', '\\u05DB\\u05E1\\u05DC\\u05D5',\r\n '\\u05D8\\u05D1\\u05EA', '\\u05E9\\u05D1\\u05D8', '\\u05D0\\u05D3\\u05E8', '\\u05D0\\u05D3\\u05E8 \\u05D1',\r\n '\\u05D0\\u05D3\\u05E8 \\u05D0'];\r\n\r\n /**\r\n * Unicode list of Hebrew days of week in the format of [\"ראשון\",\r\n * \"שני\",\"שלישי\",\"רביעי\",\r\n * \"חמישי\",\"ששי\",\"שבת\"]\r\n */\r\n private static readonly hebrewDaysOfWeek: string[] = ['\\u05E8\\u05D0\\u05E9\\u05D5\\u05DF', '\\u05E9\\u05E0\\u05D9',\r\n '\\u05E9\\u05DC\\u05D9\\u05E9\\u05D9', '\\u05E8\\u05D1\\u05D9\\u05E2\\u05D9', '\\u05D7\\u05DE\\u05D9\\u05E9\\u05D9',\r\n '\\u05E9\\u05E9\\u05D9', '\\u05E9\\u05D1\\u05EA'];\r\n\r\n /**\r\n * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format\r\n * ראשון etc. If Hebrew formatting is not in use it will return it in the format\r\n * of Sunday etc. There are various formatting options that will affect the output.\r\n *\r\n * @param jewishDate the JewishDate Object\r\n * @return the formatted day of week\r\n * @see #isHebrewFormat()\r\n * @see #isLongWeekFormat()\r\n */\r\n public formatDayOfWeek(jewishDate: JewishDate): string {\r\n if (this.hebrewFormat) {\r\n if (this.isLongWeekFormat()) {\r\n return HebrewDateFormatter.hebrewDaysOfWeek[jewishDate.getDayOfWeek() - 1];\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n return this.formatHebrewNumber(300);\r\n }\r\n\r\n return this.formatHebrewNumber(jewishDate.getDayOfWeek());\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n if (this.isLongWeekFormat()) {\r\n return this.getTransliteratedShabbosDayOfWeek();\r\n }\r\n\r\n return this.getTransliteratedShabbosDayOfWeek().substring(0, 3);\r\n }\r\n\r\n const dateTime = jewishDate.getDate();\r\n return this.weekFormat\r\n ? dateTime.toLocaleString(undefined, this.weekFormat)\r\n : dateTime.toString();\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and\r\n * numbers. When true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output\r\n * would display as כא שבט תשכ.\r\n *\r\n * @return true if set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers.\r\n */\r\n public isUseGershGershayim(): boolean {\r\n return this.useGershGershayim;\r\n }\r\n\r\n /**\r\n * Sets whether to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers. The default\r\n * value is true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output would\r\n * display as כא שבט תשכ (or\r\n * כא שבט תשך). Single digit days or month or years such as כ׳\r\n * שבט ו׳ אלפים show the use of the Geresh.\r\n *\r\n * @param useGershGershayim\r\n * set to false to omit the Geresh ׳ and Gershayim ״ in formatting\r\n */\r\n public setUseGershGershayim(useGershGershayim: boolean): void {\r\n this.useGershGershayim = useGershGershayim;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the מנצפ״ך letters when\r\n * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or\r\n * or תש״ף if true. Traditionally non-final form letters are used, so the year\r\n * 5780 would be formatted as תש״פ if the default false is used here. If this returns\r\n * true, the format תש״ף would be used.\r\n *\r\n * @return true if set to use final form letters when formatting Hebrew years. The default value is false.\r\n */\r\n public isUseFinalFormLetters(): boolean {\r\n return this.useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally years ending in 20, 40, 50, 80 and 90 are formatted using non-final\r\n * form letters for example תש״פ for the year 5780. Setting this to true (the default\r\n * is false) will use the final form letters for מנצפ״ך and will format\r\n * the year 5780 as תש״ף.\r\n *\r\n * @param useFinalFormLetters\r\n * Set this to true to use final form letters when formatting Hebrew years.\r\n */\r\n public setUseFinalFormLetters(useFinalFormLetters: boolean): void {\r\n this.useFinalFormLetters = useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the thousands digit when formatting. When formatting a Hebrew Year,\r\n * traditionally the thousands digit is omitted and output for a year such as 5729 (1969 Gregorian) would be\r\n * calculated for 729 and format as תשכ״ט. When set to true the long format year such\r\n * as ה׳ תשכ״ט for 5729/1969 is returned.\r\n *\r\n * @return true if set to use the thousands digit when formatting Hebrew dates and numbers.\r\n */\r\n public isUseLongHebrewYears(): boolean {\r\n return this.useLonghebrewYears;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally the thousands digit is omitted and output for a year such as 5729\r\n * (1969 Gregorian) would be calculated for 729 and format as תשכ״ט. This method\r\n * allows setting this to true to return the long format year such as ה׳\r\n * תשכ״ט for 5729/1969.\r\n *\r\n * @param useLongHebrewYears\r\n * Set this to true to use the long formatting\r\n */\r\n public setUseLongHebrewYears(useLongHebrewYears: boolean): void {\r\n this.useLonghebrewYears = useLongHebrewYears;\r\n }\r\n\r\n /**\r\n * Formats the Jewish date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n *\r\n * @param jewishDate\r\n * the JewishDate to be formatted\r\n * @return the formatted date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n */\r\n public format(jewishDate: JewishDate): string {\r\n if (this.isHebrewFormat()) {\r\n return `${this.formatHebrewNumber(jewishDate.getJewishDayOfMonth())} ${this.formatMonth(jewishDate)} ${this.formatHebrewNumber(jewishDate.getJewishYear())}`;\r\n }\r\n return `${jewishDate.getJewishDayOfMonth()} ${this.formatMonth(jewishDate)}, ${jewishDate.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Returns a string of the current Hebrew month such as \"Tishrei\". Returns a string of the current Hebrew month such\r\n * as \"אדר ב׳\".\r\n *\r\n * @param jewishDate\r\n * the JewishDate to format\r\n * @return the formatted month name\r\n * @see #isHebrewFormat()\r\n * @see #setHebrewFormat(boolean)\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public formatMonth(jewishDate: JewishDate): string {\r\n const month: number = jewishDate.getJewishMonth();\r\n if (this.isHebrewFormat()) {\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.hebrewMonths[13] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : ''); // return Adar I, not Adar in a leap year\r\n } else if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR_II) {\r\n return this.hebrewMonths[12] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : '');\r\n }\r\n return this.hebrewMonths[month - 1];\r\n }\r\n\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n }\r\n\r\n return this.transliteratedMonths[month - 1];\r\n }\r\n\r\n /**\r\n * Returns a String of the Omer day in the form ל״ג בעומר if\r\n * Hebrew Format is set, or \"Omer X\" or \"Lag B'Omer\" if not. An empty string if there is no Omer this day.\r\n *\r\n * @param jewishCalendar\r\n * the JewishCalendar to be formatted\r\n *\r\n * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default\r\n * formatting has a ב׳ prefix that would output בעומר, but this\r\n * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output\r\n * ל״ג לעומר.\r\n * @see #isHebrewFormat()\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n public formatOmer(jewishCalendar: JewishCalendar): string {\r\n const omer: number = jewishCalendar.getDayOfOmer();\r\n if (omer === -1) {\r\n return '';\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return `${this.formatHebrewNumber(omer)} ${this.hebrewOmerPrefix}\u05E2\u05D5\u05DE\u05E8`;\r\n }\r\n\r\n if (omer === 33) { // if Lag B'Omer\r\n return this.transliteratedHolidays[33];\r\n }\r\n\r\n return `Omer ${omer}`;\r\n }\r\n\r\n /**\r\n * Formats a molad.\r\n * TODO: Experimental and incomplete\r\n *\r\n * @param moladChalakim - the chalakim of the molad\r\n * @return the formatted molad. FIXME: define proper format in English and Hebrew.\r\n */\r\n private static formatMolad(moladChalakim: number): string {\r\n let adjustedChalakim: number = moladChalakim;\r\n const MINUTE_CHALAKIM: number = 18;\r\n const HOUR_CHALAKIM: number = 1080;\r\n const DAY_CHALAKIM: number = 24 * HOUR_CHALAKIM;\r\n\r\n let days: number = adjustedChalakim / DAY_CHALAKIM;\r\n adjustedChalakim -= (days * DAY_CHALAKIM);\r\n const hours: number = Math.trunc(adjustedChalakim / HOUR_CHALAKIM);\r\n if (hours >= 6) {\r\n days += 1;\r\n }\r\n adjustedChalakim -= (hours * HOUR_CHALAKIM);\r\n const minutes: number = Math.trunc(adjustedChalakim / MINUTE_CHALAKIM);\r\n adjustedChalakim -= minutes * MINUTE_CHALAKIM;\r\n return `Day: ${days % 7} hours: ${hours}, minutes: ${minutes}, chalakim: ${adjustedChalakim}`;\r\n }\r\n\r\n /**\r\n * Returns the kviah in the traditional 3 letter Hebrew format where the first letter represents the day of week of\r\n * Rosh Hashana, the second letter represents the lengths of Cheshvan and Kislev ({@link JewishDate#SHELAIMIM\r\n * Shelaimim} , {@link JewishDate#KESIDRAN Kesidran} or {@link JewishDate#CHASERIM Chaserim}) and the 3rd letter\r\n * represents the day of week of Pesach. For example 5729 (1969) would return בשה (Rosh Hashana on\r\n * Monday, Shelaimim, and Pesach on Thursday), while 5771 (2011) would return השג (Rosh Hashana on\r\n * Thursday, Shelaimim, and Pesach on Tuesday).\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @return the Hebrew String such as בשה for 5729 (1969) and השג for 5771\r\n * (2011).\r\n */\r\n public getFormattedKviah(jewishYear: number): string {\r\n const jewishDate: JewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana\r\n const kviah: number = jewishDate.getCheshvanKislevKviah();\r\n const roshHashanaDayOfweek: number = jewishDate.getDayOfWeek();\r\n let returnValue: string = this.formatHebrewNumber(roshHashanaDayOfweek);\r\n returnValue += (kviah === JewishDate.CHASERIM ? '\\u05D7' : kviah === JewishDate.SHELAIMIM ? '\\u05E9' : '\\u05DB');\r\n jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year\r\n const pesachDayOfweek: number = jewishDate.getDayOfWeek();\r\n returnValue += this.formatHebrewNumber(pesachDayOfweek);\r\n returnValue = returnValue.replace(new RegExp(HebrewDateFormatter.GERESH, 'g'), ''); // geresh is never used in the kviah format\r\n // boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear);\r\n // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh\r\n // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for\r\n // a 385 day year\r\n return returnValue;\r\n }\r\n\r\n /**\r\n * Formats the Daf Yomi Yerushalmi in the format\r\n * of \"עירובין נ״ב\" in {@link #isHebrewFormat() Hebrew}, or\r\n * the transliterated format of \"Eruvin 52\".\r\n *\r\n * @param daf the Daf to be formatted.\r\n * @return the formatted daf.\r\n */\r\n public formatDafYomi(daf: Daf): string {\r\n if (daf == null) {\r\n if (this.hebrewFormat) {\r\n return DafYomiYerushalmi.getMasechtos()[39];\r\n }\r\n\r\n return DafYomiYerushalmi.getMasechtosTransliterated()[39];\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return daf.getMasechta() + ' ' + this.formatHebrewNumber(daf.getDaf());\r\n }\r\n\r\n return daf.getMasechtaTransliterated() + ' ' + daf.getDaf();\r\n }\r\n\r\n /**\r\n * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.\r\n *
    \r\n *
  • Single digit numbers such as 3, 30 and 100 will be returned with a ׳ (Geresh) appended as at the end. For example ג׳,\r\n * ל׳ and ק׳
  • \r\n *
  • multi digit numbers such as 21 and 769 will be returned with a ״ (Gershayim) between the second to last and last letters. For\r\n * example כ״א, תשכ״ט
  • \r\n *
  • 15 and 16 will be returned as ט״ו and ט״ז
  • \r\n *
  • Single digit numbers (years assumed) such as 6000 (%1000=0) will be returned as ו׳\r\n * אלפים
  • \r\n *
  • 0 will return אפס
  • \r\n *
\r\n *\r\n * @param num\r\n * the number to be formatted. It will trow an IllegalArgumentException if the number is < 0 or > 9999.\r\n * @return the Hebrew formatted number such as תשכ״ט\r\n * @see #isUseFinalFormLetters()\r\n * @see #isUseGershGershayim()\r\n * @see #isHebrewFormat()\r\n *\r\n */\r\n public formatHebrewNumber(num: number): string {\r\n if (num !== Math.trunc(num)) throw new IllegalArgumentException('number must be an integer.');\r\n\r\n if (num < 0) {\r\n throw new IllegalArgumentException('negative numbers can\\'t be formatted');\r\n } else if (num > 9999) {\r\n throw new IllegalArgumentException('numbers > 9999 can\\'t be formatted');\r\n }\r\n\r\n const ALAFIM: string = '\\u05D0\\u05DC\\u05E4\\u05D9\\u05DD';\r\n const EFES: string = '\\u05D0\\u05E4\\u05E1';\r\n\r\n const jHundreds: string[] = ['', '\\u05E7', '\\u05E8', '\\u05E9', '\\u05EA', '\\u05EA\\u05E7', '\\u05EA\\u05E8',\r\n '\\u05EA\\u05E9', '\\u05EA\\u05EA', '\\u05EA\\u05EA\\u05E7'];\r\n const jTens: string[] = ['', '\\u05D9', '\\u05DB', '\\u05DC', '\\u05DE', '\\u05E0', '\\u05E1', '\\u05E2',\r\n '\\u05E4', '\\u05E6'];\r\n const jTenEnds: string[] = ['', '\\u05D9', '\\u05DA', '\\u05DC', '\\u05DD', '\\u05DF', '\\u05E1', '\\u05E2',\r\n '\\u05E3', '\\u05E5'];\r\n const tavTaz: string[] = ['\\u05D8\\u05D5', '\\u05D8\\u05D6'];\r\n const jOnes: string[] = ['', '\\u05D0', '\\u05D1', '\\u05D2', '\\u05D3', '\\u05D4', '\\u05D5', '\\u05D6',\r\n '\\u05D7', '\\u05D8'];\r\n\r\n if (num === 0) { // do we really need this? Should it be applicable to a date?\r\n return EFES;\r\n }\r\n const shortNumber: number = num % 1000; // discard thousands\r\n // next check for all possible single Hebrew digit years\r\n const singleDigitNumber: boolean = (shortNumber < 11 || (shortNumber < 100 && shortNumber % 10 === 0) || (shortNumber <= 400 && shortNumber % 100 === 0));\r\n const thousands: number = Math.trunc(num / 1000); // get # thousands\r\n let sb: string = '';\r\n // append thousands to String\r\n if (num % 1000 === 0) { // in year is 5000, 4000 etc\r\n sb = sb.concat(jOnes[thousands]);\r\n if (this.isUseGershGershayim()) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH);\r\n }\r\n sb = sb.concat(' ');\r\n sb = sb.concat(ALAFIM); // add # of thousands plus word thousand (overide alafim boolean)\r\n return sb;\r\n } else if (this.useLonghebrewYears && num >= 1000) { // if alafim boolean display thousands\r\n sb = sb.concat(jOnes[thousands]);\r\n if (this.isUseGershGershayim()) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH); // append thousands quote\r\n }\r\n sb = sb.concat(' ');\r\n }\r\n num = num % 1000; // remove 1000s\r\n const hundreds: number = Math.trunc(num / 100); // # of hundreds\r\n sb = sb.concat(jHundreds[hundreds]); // add hundreds to String\r\n num = num % 100; // remove 100s\r\n if (num === 15) { // special case 15\r\n sb = sb.concat(tavTaz[0]);\r\n } else if (num === 16) { // special case 16\r\n sb = sb.concat(tavTaz[1]);\r\n } else {\r\n const tens: number = Math.trunc(num / 10);\r\n if (num % 10 === 0) { // if evenly divisable by 10\r\n if (!singleDigitNumber) {\r\n if (this.isUseFinalFormLetters()) {\r\n sb = sb.concat(jTenEnds[tens]); // years like 5780 will end with a final form ף\r\n } else {\r\n sb = sb.concat(jTens[tens]); // years like 5780 will end with a regular פ\r\n }\r\n } else {\r\n sb = sb.concat(jTens[tens]); // standard letters so years like 5050 will end with a regular nun\r\n }\r\n } else {\r\n sb = sb.concat(jTens[tens]);\r\n num = num % 10;\r\n sb = sb.concat(jOnes[num]);\r\n }\r\n }\r\n if (this.isUseGershGershayim()) {\r\n if (singleDigitNumber) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH); // append single quote\r\n } else { // append double quote before last digit\r\n sb = sb.substr(0, sb.length - 1)\r\n .concat(HebrewDateFormatter.GERSHAYIM)\r\n .concat(sb.substr(sb.length - 1, 1));\r\n }\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Returns the list of transliterated parshiyos used by this formatter.\r\n *\r\n * @return the list of transliterated Parshios\r\n */\r\n public getTransliteratedParshiosList(): Record {\r\n return this.transliteratedParshaMap;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of parshiyos transliterated into into Latin chars. The\r\n * default uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedParshaMap\r\n * the transliterated Parshios as an EnumMap to set\r\n * @see #getTransliteratedParshiosList()\r\n */\r\n public setTransliteratedParshiosList(transliteratedParshaMap: Record): void {\r\n this.transliteratedParshaMap = transliteratedParshaMap;\r\n }\r\n\r\n /**\r\n * Returns a String with the name of the current parsha(ios). If the formatter is set to format in Hebrew, returns\r\n * a string of the current parsha(ios) in Hebrew for example בראשית or\r\n * נצבים וילך or an empty string if\r\n * are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin chars. The\r\n * default uses Ashkenazi pronunciation in typical American English spelling, for example Bereshis or\r\n * Nitzavim Vayeilech or an empty string if there are none.\r\n *\r\n * @param jewishCalendar the JewishCalendar Object\r\n * @return today's parsha(ios) in Hebrew for example, if the formatter is set to format in Hebrew, returns a string\r\n * of the current parsha(ios) in Hebrew for example בראשית or\r\n * נצבים וילך or an empty string if\r\n * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin\r\n * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example\r\n * Bereshis or Nitzavim Vayeilech or an empty string if there are none.\r\n */\r\n public formatParsha(jewishCalendarOrParsha: JewishCalendar|Parsha): string {\r\n if (jewishCalendarOrParsha instanceof JewishCalendar) {\r\n const parsha: Parsha = jewishCalendarOrParsha.getParshah();\r\n return this.formatParsha(parsha)\r\n } else {\r\n return this.hebrewFormat\r\n ? this.hebrewParshaMap[jewishCalendarOrParsha] || ''\r\n : this.transliteratedParshaMap[jewishCalendarOrParsha] || '';\r\n }\r\n }\r\n\r\n /**\r\n * Returns a String with the name of the current special parsha of Shekalim, Zachor, Parah or Hachodesh or an\r\n * empty String for a non-special parsha. If the formatter is set to format in Hebrew, it returns a string of\r\n * the current special parsha in Hebrew, for example שקלים,\r\n * זכור, פרה or החדש. An empty\r\n * string if the date is not a special parsha. If not set to Hebrew, it returns a string of the special parsha\r\n * transliterated into Latin chars. The default uses Ashkenazi pronunciation in typical American English spelling\r\n * Shekalim, Zachor, Parah or Hachodesh.\r\n *\r\n * @param jewishCalendar the JewishCalendar Object\r\n * @return today's special parsha. If the formatter is set to format in Hebrew, returns a string\r\n * of the current special parsha in Hebrew for in the format of שקלים,\r\n * זכור, פרה or החדש or an empty\r\n * string if there are none. If not set to Hebrew, it returns a string of the special parsha transliterated\r\n * into Latin chars. The default uses Ashkenazi pronunciation in typical American English spelling of Shekalim,\r\n * Zachor, Parah or Hachodesh. An empty string if there are none.\r\n */\r\n public formatSpecialParsha(jewishCalendar: JewishCalendar): string {\r\n const specialParsha: Parsha = jewishCalendar.getSpecialShabbos();\r\n return this.hebrewFormat\r\n ? this.hebrewParshaMap[specialParsha] || ''\r\n : this.transliteratedParshaMap[specialParsha] || '';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\nimport _Big from 'big.js';\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from './ComplexZmanimCalendar.ts';\r\nimport { JsonOutput, ZmanimFormatter } from './util/ZmanimFormatter.ts';\r\nimport { rangeDates } from './hebrewcalendar/JewishDate.ts';\r\n\r\nexport function getZmanimJson(options: Options): JsonOutput {\r\n const geoLocation: GeoLocation = new GeoLocation(options.locationName || null, options.latitude, options.longitude,\r\n options.elevation || 0, options.timeZoneId);\r\n\r\n const zmanimCalendar: ZmanimCalendar = options.complexZmanim\r\n ? new ComplexZmanimCalendar(geoLocation)\r\n : new ZmanimCalendar(geoLocation);\r\n\r\n zmanimCalendar.setDate(options.date || Temporal.Now.plainDateISO());\r\n return ZmanimFormatter.toJSON(zmanimCalendar);\r\n}\r\n\r\nexport interface Options {\r\n /**\r\n * @default Current date and time\r\n */\r\n date?: Date | string | number | Temporal.PlainDate;\r\n /**\r\n * IANA timezone ID\r\n */\r\n timeZoneId: string;\r\n locationName?: string;\r\n latitude: number;\r\n longitude: number;\r\n /**\r\n * @default 0\r\n */\r\n elevation?: number;\r\n /**\r\n * Whether to use `ComplexZmanimCalendar` instead of `ZmanimCalendar`\r\n * @default false\r\n */\r\n complexZmanim?: boolean;\r\n}\r\n\r\nconst temporalExtended = { rangeDates };\r\n\r\nexport * from './util/Time.ts';\r\nexport * from './util/GeoLocation.ts';\r\nexport * from './util/GeoLocationUtils.ts';\r\nexport * from './util/Zman.ts';\r\nexport * from './polyfills/Utils.ts';\r\n\r\nexport * from './util/NOAACalculator.ts';\r\nexport * from './util/SunTimesCalculator.ts';\r\n\r\nexport * from './AstronomicalCalendar.ts';\r\nexport * from './ZmanimCalendar.ts';\r\nexport * from './ComplexZmanimCalendar.ts';\r\n\r\nexport { JewishDate } from './hebrewcalendar/JewishDate.ts';\r\nexport * from './hebrewcalendar/JewishCalendar.ts';\r\nexport * from './hebrewcalendar/TefilaRules.ts';\r\n\r\n//export * from './hebrewcalendar/Daf';\r\nexport * from './hebrewcalendar/limud/YomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/YerushalmiYomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/ChafetzChayimYomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/Hiloulah.ts'\r\nexport { default as TehilimYomi } from './hebrewcalendar/limud/TehilimYomi.ts';\r\nexport { default as Haftara } from './hebrewcalendar/limud/HaftarahShvui.ts'\r\n\r\nexport * from './hebrewcalendar/HebrewDateFormatter.ts';\r\nexport * from './util/ZmanimFormatter.ts';\r\n\r\nexport { _Big, Temporal, temporalExtended };"], - "mappings": "AAAA,SAASA,GAAUC,EAAGC,EAAGC,EAAGC,EAAGC,EAAG,CAChC,OAAOC,GAAYJ,EAAGK,GAAeN,EAAGC,CAAC,EAAGC,EAAGC,EAAGC,CAAC,CACrD,CAEA,SAASC,GAAYL,EAAGC,EAAGC,EAAGC,EAAGC,EAAGG,EAAG,CACrC,IAAMC,EAAIC,GAAYR,EAAGC,EAAGC,CAAC,EAC7B,GAAIC,GAAKH,IAAMO,EACb,MAAM,IAAI,WAAWE,GAAiBV,EAAGC,EAAGC,EAAGC,EAAGI,CAAC,CAAC,EAEtD,OAAOC,CACT,CAEA,SAASF,GAAeN,EAAGC,EAAG,CAC5B,IAAMC,EAAIF,EAAEC,CAAC,EACb,GAAeC,IAAX,OACF,MAAM,IAAI,UAAUS,GAAaV,CAAC,CAAC,EAErC,OAAOC,CACT,CAEA,SAASU,GAAEZ,EAAG,CACZ,OAAgBA,IAAT,MAAc,kBAAkB,KAAK,OAAOA,CAAC,CACtD,CAEA,SAASa,GAAGb,EAAGC,EAAI,IAAK,CACtB,IAAMC,EAAI,IAAID,EACd,MAAO,CAAC,KAAM,IAAM,CAClB,GAAIC,EAAE,IAAI,CAAC,EACT,OAAOA,EAAE,IAAI,CAAC,EAEhB,IAAM,EAAIF,EAAE,EAAG,GAAG,CAAC,EACnB,OAAOE,EAAE,IAAI,EAAG,CAAC,EAAG,CACtB,CACF,CAEA,SAASY,G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ACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,8FACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2DACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,4JACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,yFACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sCACb,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,YACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,OACf,CACJ,EC9lEA,IAAAC,GAAA,CACI,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2GACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,8FACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2DACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,4JACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,yFACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sCACb,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,YACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA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H,EAAQ,cAC3C,IAAII,GAAsBH,CAAW,EACrC,IAAII,GAAeJ,CAAW,EAElC,OAAAE,EAAe,QAAQH,EAAQ,MAAQM,EAAS,IAAI,aAAa,CAAC,EAC3DC,GAAgB,OAAOJ,CAAc,CAC9C,CAyBA,IAAMK,GAAmB,CAAE,WAAAC,EAAW", + "sourcesContent": ["function clampProp(e, n, t, o, r) {\n return clampEntity(n, getDefinedProp(e, n), t, o, r);\n}\n\nfunction clampEntity(e, n, t, o, r, i) {\n const a = clampNumber(n, t, o);\n if (r && n !== a) {\n throw new RangeError(numberOutOfRange(e, n, t, o, i));\n }\n return a;\n}\n\nfunction getDefinedProp(e, n) {\n const t = e[n];\n if (void 0 === t) {\n throw new TypeError(missingField(n));\n }\n return t;\n}\n\nfunction z(e) {\n return null !== e && /object|function/.test(typeof e);\n}\n\nfunction Jn(e, n = Map) {\n const t = new n;\n return (n, ...o) => {\n if (t.has(n)) {\n return t.get(n);\n }\n const r = e(n, ...o);\n return t.set(n, r), r;\n };\n}\n\nfunction D(e) {\n return p({\n name: e\n }, 1);\n}\n\nfunction p(e, n) {\n return T((e => ({\n value: e,\n configurable: 1,\n writable: !n\n })), e);\n}\n\nfunction O(e) {\n return T((e => ({\n get: e,\n configurable: 1\n })), e);\n}\n\nfunction h(e) {\n return {\n [Symbol.toStringTag]: {\n value: e,\n configurable: 1\n }\n };\n}\n\nfunction zipProps(e, n) {\n const t = {};\n let o = e.length;\n for (const r of n) {\n t[e[--o]] = r;\n }\n return t;\n}\n\nfunction T(e, n, t) {\n const o = {};\n for (const r in n) {\n o[r] = e(n[r], r, t);\n }\n return o;\n}\n\nfunction b(e, n, t) {\n const o = {};\n for (let r = 0; r < n.length; r++) {\n const i = n[r];\n o[i] = e(i, r, t);\n }\n return o;\n}\n\nfunction remapProps(e, n, t) {\n const o = {};\n for (let r = 0; r < e.length; r++) {\n o[n[r]] = t[e[r]];\n }\n return o;\n}\n\nfunction Vn(e, n) {\n const t = {};\n for (const o of e) {\n t[o] = n[o];\n }\n return t;\n}\n\nfunction V(e, n) {\n const t = {};\n for (const o in n) {\n e.has(o) || (t[o] = n[o]);\n }\n return t;\n}\n\nfunction nn(e) {\n e = {\n ...e\n };\n const n = Object.keys(e);\n for (const t of n) {\n void 0 === e[t] && delete e[t];\n }\n return e;\n}\n\nfunction C(e, n) {\n for (const t of n) {\n if (!(t in e)) {\n return 0;\n }\n }\n return 1;\n}\n\nfunction allPropsEqual(e, n, t) {\n for (const o of e) {\n if (n[o] !== t[o]) {\n return 0;\n }\n }\n return 1;\n}\n\nfunction zeroOutProps(e, n, t) {\n const o = {\n ...t\n };\n for (let t = 0; t < n; t++) {\n o[e[t]] = 0;\n }\n return o;\n}\n\nfunction E(e, ...n) {\n return (...t) => e(...n, ...t);\n}\n\nfunction capitalize(e) {\n return e[0].toUpperCase() + e.substring(1);\n}\n\nfunction sortStrings(e) {\n return e.slice().sort();\n}\n\nfunction padNumber(e, n) {\n return String(n).padStart(e, \"0\");\n}\n\nfunction compareNumbers(e, n) {\n return Math.sign(e - n);\n}\n\nfunction clampNumber(e, n, t) {\n return Math.min(Math.max(e, n), t);\n}\n\nfunction divModFloor(e, n) {\n return [ Math.floor(e / n), modFloor(e, n) ];\n}\n\nfunction modFloor(e, n) {\n return (e % n + n) % n;\n}\n\nfunction divModTrunc(e, n) {\n return [ divTrunc(e, n), modTrunc(e, n) ];\n}\n\nfunction divTrunc(e, n) {\n return Math.trunc(e / n) || 0;\n}\n\nfunction modTrunc(e, n) {\n return e % n || 0;\n}\n\nfunction hasHalf(e) {\n return .5 === Math.abs(e % 1);\n}\n\nfunction givenFieldsToBigNano(e, n, t) {\n let o = 0, r = 0;\n for (let i = 0; i <= n; i++) {\n const n = e[t[i]], a = Xr[i], s = Qr / a, [c, u] = divModTrunc(n, s);\n o += u * a, r += c;\n }\n const [i, a] = divModTrunc(o, Qr);\n return [ r + i, a ];\n}\n\nfunction nanoToGivenFields(e, n, t) {\n const o = {};\n for (let r = n; r >= 0; r--) {\n const n = Xr[r];\n o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);\n }\n return o;\n}\n\nfunction un(e) {\n return e === X ? si : [];\n}\n\nfunction cn(e) {\n return e === X ? li : [];\n}\n\nfunction ln(e) {\n return e === X ? [ \"year\", \"day\" ] : [];\n}\n\nfunction l(e) {\n if (void 0 !== e) {\n return m(e);\n }\n}\n\nfunction S(e) {\n if (void 0 !== e) {\n return d(e);\n }\n}\n\nfunction c(e) {\n if (void 0 !== e) {\n return u(e);\n }\n}\n\nfunction d(e) {\n return requireNumberIsPositive(u(e));\n}\n\nfunction u(e) {\n return requireNumberIsInteger(Mi(e));\n}\n\nfunction on(e) {\n if (null == e) {\n throw new TypeError(\"Cannot be null or undefined\");\n }\n return e;\n}\n\nfunction requirePropDefined(e, n) {\n if (null == n) {\n throw new RangeError(missingField(e));\n }\n return n;\n}\n\nfunction de(e) {\n if (!z(e)) {\n throw new TypeError(hr);\n }\n return e;\n}\n\nfunction requireType(e, n, t = e) {\n if (typeof n !== e) {\n throw new TypeError(invalidEntity(t, n));\n }\n return n;\n}\n\nfunction requireNumberIsInteger(e, n = \"number\") {\n if (!Number.isInteger(e)) {\n throw new RangeError(expectedInteger(n, e));\n }\n return e || 0;\n}\n\nfunction requireNumberIsPositive(e, n = \"number\") {\n if (e <= 0) {\n throw new RangeError(expectedPositive(n, e));\n }\n return e;\n}\n\nfunction toString(e) {\n if (\"symbol\" == typeof e) {\n throw new TypeError(pr);\n }\n return String(e);\n}\n\nfunction toStringViaPrimitive(e, n) {\n return z(e) ? String(e) : m(e, n);\n}\n\nfunction toBigInt(e) {\n if (\"string\" == typeof e) {\n return BigInt(e);\n }\n if (\"bigint\" != typeof e) {\n throw new TypeError(invalidBigInt(e));\n }\n return e;\n}\n\nfunction toNumber(e, n = \"number\") {\n if (\"bigint\" == typeof e) {\n throw new TypeError(forbiddenBigIntToNumber(n));\n }\n if (e = Number(e), !Number.isFinite(e)) {\n throw new RangeError(expectedFinite(n, e));\n }\n return e;\n}\n\nfunction toInteger(e, n) {\n return Math.trunc(toNumber(e, n)) || 0;\n}\n\nfunction toStrictInteger(e, n) {\n return requireNumberIsInteger(toNumber(e, n), n);\n}\n\nfunction toPositiveInteger(e, n) {\n return requireNumberIsPositive(toInteger(e, n), n);\n}\n\nfunction createBigNano(e, n) {\n let [t, o] = divModTrunc(n, Qr), r = e + t;\n const i = Math.sign(r);\n return i && i === -Math.sign(o) && (r -= i, o += i * Qr), [ r, o ];\n}\n\nfunction addBigNanos(e, n, t = 1) {\n return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);\n}\n\nfunction moveBigNano(e, n) {\n return createBigNano(e[0], e[1] + n);\n}\n\nfunction re(e, n) {\n return addBigNanos(n, e, -1);\n}\n\nfunction te(e, n) {\n return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);\n}\n\nfunction bigNanoOutside(e, n, t) {\n return -1 === te(e, n) || 1 === te(e, t);\n}\n\nfunction bigIntToBigNano(e, n = 1) {\n const t = BigInt(Qr / n);\n return [ Number(e / t), Number(e % t) * n ];\n}\n\nfunction he(e, n = 1) {\n const t = Qr / n, [o, r] = divModTrunc(e, t);\n return [ o, r * n ];\n}\n\nfunction bigNanoToBigInt(e, n = 1) {\n const [t, o] = e, r = Math.floor(o / n), i = Qr / n;\n return BigInt(t) * BigInt(i) + BigInt(r);\n}\n\nfunction oe(e, n = 1, t) {\n const [o, r] = e, [i, a] = divModTrunc(r, n);\n return o * (Qr / n) + (i + (t ? a / n : 0));\n}\n\nfunction divModBigNano(e, n, t = divModFloor) {\n const [o, r] = e, [i, a] = t(r, n);\n return [ o * (Qr / n) + i, a ];\n}\n\nfunction hashIntlFormatParts(e, n) {\n const t = e.formatToParts(n), o = {};\n for (const e of t) {\n o[e.type] = e.value;\n }\n return o;\n}\n\nfunction checkIsoYearMonthInBounds(e) {\n return clampProp(e, \"isoYear\", Li, Ai, 1), e.isoYear === Li ? clampProp(e, \"isoMonth\", 4, 12, 1) : e.isoYear === Ai && clampProp(e, \"isoMonth\", 1, 9, 1), \n e;\n}\n\nfunction checkIsoDateInBounds(e) {\n return checkIsoDateTimeInBounds({\n ...e,\n ...Dt,\n isoHour: 12\n }), e;\n}\n\nfunction checkIsoDateTimeInBounds(e) {\n const n = clampProp(e, \"isoYear\", Li, Ai, 1), t = n === Li ? 1 : n === Ai ? -1 : 0;\n return t && checkEpochNanoInBounds(isoToEpochNano({\n ...e,\n isoDay: e.isoDay + t,\n isoNanosecond: e.isoNanosecond - t\n })), e;\n}\n\nfunction checkEpochNanoInBounds(e) {\n if (!e || bigNanoOutside(e, Ui, qi)) {\n throw new RangeError(Cr);\n }\n return e;\n}\n\nfunction isoTimeFieldsToNano(e) {\n return givenFieldsToBigNano(e, 5, j)[1];\n}\n\nfunction nanoToIsoTimeAndDay(e) {\n const [n, t] = divModFloor(e, Qr);\n return [ nanoToGivenFields(t, 5, j), n ];\n}\n\nfunction epochNanoToSec(e) {\n return epochNanoToSecMod(e)[0];\n}\n\nfunction epochNanoToSecMod(e) {\n return divModBigNano(e, _r);\n}\n\nfunction isoToEpochMilli(e) {\n return isoArgsToEpochMilli(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);\n}\n\nfunction isoToEpochNano(e) {\n const n = isoToEpochMilli(e);\n if (void 0 !== n) {\n const [t, o] = divModTrunc(n, Gr);\n return [ t, o * be + (e.isoMicrosecond || 0) * Vr + (e.isoNanosecond || 0) ];\n }\n}\n\nfunction isoToEpochNanoWithOffset(e, n) {\n const [t, o] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) - n);\n return checkEpochNanoInBounds(isoToEpochNano({\n ...e,\n isoDay: e.isoDay + o,\n ...t\n }));\n}\n\nfunction isoArgsToEpochSec(...e) {\n return isoArgsToEpochMilli(...e) / Hr;\n}\n\nfunction isoArgsToEpochMilli(...e) {\n const [n, t] = isoToLegacyDate(...e), o = n.valueOf();\n if (!isNaN(o)) {\n return o - t * Gr;\n }\n}\n\nfunction isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {\n const s = e === Li ? 1 : e === Ai ? -1 : 0, c = new Date;\n return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];\n}\n\nfunction Ie(e, n) {\n let [t, o] = moveBigNano(e, n);\n o < 0 && (o += Qr, t -= 1);\n const [r, i] = divModFloor(o, be), [a, s] = divModFloor(i, Vr);\n return epochMilliToIso(t * Gr + r, a, s);\n}\n\nfunction epochMilliToIso(e, n = 0, t = 0) {\n const o = Math.ceil(Math.max(0, Math.abs(e) - zi) / Gr) * Math.sign(e), r = new Date(e - o * Gr);\n return zipProps(wi, [ r.getUTCFullYear(), r.getUTCMonth() + 1, r.getUTCDate() + o, r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds(), r.getUTCMilliseconds(), n, t ]);\n}\n\nfunction computeIsoDateParts(e) {\n return [ e.isoYear, e.isoMonth, e.isoDay ];\n}\n\nfunction computeIsoMonthsInYear() {\n return xi;\n}\n\nfunction computeIsoDaysInMonth(e, n) {\n switch (n) {\n case 2:\n return computeIsoInLeapYear(e) ? 29 : 28;\n\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n }\n return 31;\n}\n\nfunction computeIsoDaysInYear(e) {\n return computeIsoInLeapYear(e) ? 366 : 365;\n}\n\nfunction computeIsoInLeapYear(e) {\n return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);\n}\n\nfunction computeIsoDayOfWeek(e) {\n const [n, t] = isoToLegacyDate(e.isoYear, e.isoMonth, e.isoDay);\n return modFloor(n.getUTCDay() - t, 7) || 7;\n}\n\nfunction computeGregoryEraParts({isoYear: e}) {\n return e < 1 ? [ \"bce\", 1 - e ] : [ \"ce\", e ];\n}\n\nfunction computeJapaneseEraParts(e) {\n const n = isoToEpochMilli(e);\n if (n < $i) {\n return computeGregoryEraParts(e);\n }\n const t = hashIntlFormatParts(La(Ti), n), {era: o, eraYear: r} = parseIntlYear(t, Ti);\n return [ o, r ];\n}\n\nfunction checkIsoDateTimeFields(e) {\n return checkIsoDateFields(e), constrainIsoTimeFields(e, 1), e;\n}\n\nfunction checkIsoDateFields(e) {\n return constrainIsoDateFields(e, 1), e;\n}\n\nfunction isIsoDateFieldsValid(e) {\n return allPropsEqual(Oi, e, constrainIsoDateFields(e));\n}\n\nfunction constrainIsoDateFields(e, n) {\n const {isoYear: t} = e, o = clampProp(e, \"isoMonth\", 1, computeIsoMonthsInYear(), n);\n return {\n isoYear: t,\n isoMonth: o,\n isoDay: clampProp(e, \"isoDay\", 1, computeIsoDaysInMonth(t, o), n)\n };\n}\n\nfunction constrainIsoTimeFields(e, n) {\n return zipProps(j, [ clampProp(e, \"isoHour\", 0, 23, n), clampProp(e, \"isoMinute\", 0, 59, n), clampProp(e, \"isoSecond\", 0, 59, n), clampProp(e, \"isoMillisecond\", 0, 999, n), clampProp(e, \"isoMicrosecond\", 0, 999, n), clampProp(e, \"isoNanosecond\", 0, 999, n) ]);\n}\n\nfunction H(e) {\n return void 0 === e ? 0 : ua(de(e));\n}\n\nfunction wn(e, n = 0) {\n e = normalizeOptions(e);\n const t = la(e), o = fa(e, n);\n return [ ua(e), o, t ];\n}\n\nfunction ve(e) {\n return la(normalizeOptions(e));\n}\n\nfunction _t(e) {\n return e = normalizeOptions(e), sa(e, 9, 6, 1);\n}\n\nfunction refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {\n n = normalizeOptions(n);\n let a = sa(n, o, r), s = parseRoundingIncInteger(n), c = ha(n, i);\n const u = aa(n, o, r, 1);\n return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1), \n e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];\n}\n\nfunction refineRoundingOptions(e, n = 6, t) {\n let o = parseRoundingIncInteger(e = normalizeOptionsOrString(e, Hi));\n const r = ha(e, 7);\n let i = aa(e, n);\n return i = requirePropDefined(Hi, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];\n}\n\nfunction refineDateDisplayOptions(e) {\n return da(normalizeOptions(e));\n}\n\nfunction refineTimeDisplayOptions(e, n) {\n return refineTimeDisplayTuple(normalizeOptions(e), n);\n}\n\nfunction refineTimeDisplayTuple(e, n = 4) {\n const t = refineSubsecDigits(e);\n return [ ha(e, 4), ...refineSmallestUnitAndSubsecDigits(aa(e, n), t) ];\n}\n\nfunction refineSmallestUnitAndSubsecDigits(e, n) {\n return null != e ? [ Xr[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];\n}\n\nfunction parseRoundingIncInteger(e) {\n const n = e[_i];\n return void 0 === n ? 1 : toInteger(n, _i);\n}\n\nfunction refineRoundingInc(e, n, t, o) {\n const r = o ? Qr : Xr[n + 1];\n if (r) {\n const t = Xr[n];\n if (r % ((e = clampEntity(_i, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {\n throw new RangeError(invalidEntity(_i, e));\n }\n } else {\n e = clampEntity(_i, e, 1, t ? 10 ** 9 : 1, 1);\n }\n return e;\n}\n\nfunction refineSubsecDigits(e) {\n let n = e[Ji];\n if (void 0 !== n) {\n if (\"number\" != typeof n) {\n if (\"auto\" === toString(n)) {\n return;\n }\n throw new RangeError(invalidEntity(Ji, n));\n }\n n = clampEntity(Ji, Math.floor(n), 0, 9, 1);\n }\n return n;\n}\n\nfunction normalizeOptions(e) {\n return void 0 === e ? {} : de(e);\n}\n\nfunction normalizeOptionsOrString(e, n) {\n return \"string\" == typeof e ? {\n [n]: e\n } : de(e);\n}\n\nfunction U(e) {\n if (void 0 !== e) {\n if (z(e)) {\n return Object.assign(Object.create(null), e);\n }\n throw new TypeError(hr);\n }\n}\n\nfunction overrideOverflowOptions(e, n) {\n return e && Object.assign(Object.create(null), e, {\n overflow: Xi[n]\n });\n}\n\nfunction refineUnitOption(e, n, t = 9, o = 0, r) {\n let i = n[e];\n if (void 0 === i) {\n return r ? o : void 0;\n }\n if (i = toString(i), \"auto\" === i) {\n return r ? o : null;\n }\n let a = $r[i];\n if (void 0 === a && (a = Ei[i]), void 0 === a) {\n throw new RangeError(invalidChoice(e, i, $r));\n }\n return clampEntity(e, a, o, t, 1, Et), a;\n}\n\nfunction refineChoiceOption(e, n, t, o = 0) {\n const r = t[e];\n if (void 0 === r) {\n return o;\n }\n const i = toString(r), a = n[i];\n if (void 0 === a) {\n throw new RangeError(invalidChoice(e, i, n));\n }\n return a;\n}\n\nfunction checkLargestSmallestUnit(e, n) {\n if (n > e) {\n throw new RangeError(Ar);\n }\n}\n\nfunction _(e) {\n return {\n branding: Oe,\n epochNanoseconds: e\n };\n}\n\nfunction Yn(e, n, t) {\n return {\n branding: Te,\n calendar: t,\n timeZone: n,\n epochNanoseconds: e\n };\n}\n\nfunction ee(e, n = e.calendar) {\n return {\n branding: We,\n calendar: n,\n ...Vn(Yi, e)\n };\n}\n\nfunction v(e, n = e.calendar) {\n return {\n branding: J,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction createPlainYearMonthSlots(e, n = e.calendar) {\n return {\n branding: L,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction createPlainMonthDaySlots(e, n = e.calendar) {\n return {\n branding: q,\n calendar: n,\n ...Vn(Bi, e)\n };\n}\n\nfunction Ge(e) {\n return {\n branding: xe,\n ...Vn(ki, e)\n };\n}\n\nfunction Vt(e) {\n return {\n branding: qt,\n sign: computeDurationSign(e),\n ...Vn(Ni, e)\n };\n}\n\nfunction M(e) {\n return epochNanoToSec(e.epochNanoseconds);\n}\n\nfunction y(e) {\n return divModBigNano(e.epochNanoseconds, be)[0];\n}\n\nfunction N(e) {\n return bigNanoToBigInt(e.epochNanoseconds, Vr);\n}\n\nfunction B(e) {\n return bigNanoToBigInt(e.epochNanoseconds);\n}\n\nfunction extractEpochNano(e) {\n return e.epochNanoseconds;\n}\n\nfunction I(e) {\n return \"string\" == typeof e ? e : m(e.id);\n}\n\nfunction isIdLikeEqual(e, n) {\n return e === n || I(e) === I(n);\n}\n\nfunction Ut(e, n, t, o, r) {\n const i = getMaxDurationUnit(o), [a, s] = ((e, n) => {\n const t = n((e = normalizeOptionsOrString(e, Vi))[Ki]);\n let o = ca(e);\n return o = requirePropDefined(Vi, o), [ o, t ];\n })(r, e);\n if (isUniformUnit(Math.max(a, i), s)) {\n return totalDayTimeDuration(o, a);\n }\n if (!s) {\n throw new RangeError(zr);\n }\n const [c, u, l] = createMarkerSystem(n, t, s), f = createMarkerToEpochNano(l), d = createMoveMarker(l), m = createDiffMarkers(l), p = d(u, c, o), h = m(u, c, p, a);\n return isUniformUnit(a, s) ? totalDayTimeDuration(h, a) : ((e, n, t, o, r, i, a) => {\n const s = computeDurationSign(e), [c, u] = clampRelativeDuration(o, bi(t, e), t, s, r, i, a), l = computeEpochNanoFrac(n, c, u);\n return e[F[t]] + l * s;\n })(h, f(p), a, u, c, f, d);\n}\n\nfunction totalDayTimeDuration(e, n) {\n return oe(durationFieldsToBigNano(e), Xr[n], 1);\n}\n\nfunction clampRelativeDuration(e, n, t, o, r, i, a) {\n const s = F[t], c = {\n ...n,\n [s]: n[s] + o\n }, u = a(e, r, n), l = a(e, r, c);\n return [ i(u), i(l) ];\n}\n\nfunction computeEpochNanoFrac(e, n, t) {\n const o = oe(re(n, t));\n if (!o) {\n throw new RangeError(vr);\n }\n return oe(re(n, e)) / o;\n}\n\nfunction ce(e, n) {\n const [t, o, r] = refineRoundingOptions(n, 5, 1);\n return _(roundBigNano(e.epochNanoseconds, t, o, r, 1));\n}\n\nfunction Pn(e, n, t) {\n let {epochNanoseconds: o, timeZone: r, calendar: i} = n;\n const [a, s, c] = refineRoundingOptions(t);\n if (0 === a && 1 === s) {\n return n;\n }\n const u = e(r);\n if (6 === a) {\n o = ((e, n, t, o) => {\n const r = fn(t, n), [i, a] = e(r), s = t.epochNanoseconds, c = we(n, i), u = we(n, a);\n if (bigNanoOutside(s, c, u)) {\n throw new RangeError(vr);\n }\n return roundWithMode(computeEpochNanoFrac(s, c, u), o) ? u : c;\n })(computeDayInterval, u, n, c);\n } else {\n const e = u.getOffsetNanosecondsFor(o);\n o = getMatchingInstantFor(u, roundDateTime(Ie(o, e), a, s, c), e, 2, 0, 1);\n }\n return Yn(o, r, i);\n}\n\nfunction dt(e, n) {\n return ee(roundDateTime(e, ...refineRoundingOptions(n)), e.calendar);\n}\n\nfunction Ee(e, n) {\n const [t, o, r] = refineRoundingOptions(n, 5);\n var i;\n return Ge((i = r, roundTimeToNano(e, computeNanoInc(t, o), i)[0]));\n}\n\nfunction dn(e, n) {\n const t = e(n.timeZone), o = fn(n, t), [r, i] = computeDayInterval(o), a = oe(re(we(t, r), we(t, i)), Kr, 1);\n if (a <= 0) {\n throw new RangeError(vr);\n }\n return a;\n}\n\nfunction Cn(e, n) {\n const {timeZone: t, calendar: o} = n, r = ((e, n, t) => we(n, e(fn(t, n))))(computeDayFloor, e(t), n);\n return Yn(r, t, o);\n}\n\nfunction roundDateTime(e, n, t, o) {\n return roundDateTimeToNano(e, computeNanoInc(n, t), o);\n}\n\nfunction roundDateTimeToNano(e, n, t) {\n const [o, r] = roundTimeToNano(e, n, t);\n return checkIsoDateTimeInBounds({\n ...moveByDays(e, r),\n ...o\n });\n}\n\nfunction roundTimeToNano(e, n, t) {\n return nanoToIsoTimeAndDay(roundByInc(isoTimeFieldsToNano(e), n, t));\n}\n\nfunction roundToMinute(e) {\n return roundByInc(e, Jr, 7);\n}\n\nfunction computeNanoInc(e, n) {\n return Xr[e] * n;\n}\n\nfunction computeDayInterval(e) {\n const n = computeDayFloor(e);\n return [ n, moveByDays(n, 1) ];\n}\n\nfunction computeDayFloor(e) {\n return Ci(6, e);\n}\n\nfunction roundDayTimeDurationByInc(e, n, t) {\n const o = Math.min(getMaxDurationUnit(e), 6);\n return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, o), n, t), o);\n}\n\nfunction roundRelativeDuration(e, n, t, o, r, i, a, s, c, u) {\n if (0 === o && 1 === r) {\n return e;\n }\n const l = isUniformUnit(o, s) ? isZonedEpochSlots(s) && o < 6 && t >= 6 ? nudgeZonedTimeDuration : nudgeDayTimeDuration : nudgeRelativeDuration;\n let [f, d, m] = l(e, n, t, o, r, i, a, s, c, u);\n return m && 7 !== o && (f = ((e, n, t, o, r, i, a, s) => {\n const c = computeDurationSign(e);\n for (let u = o + 1; u <= t; u++) {\n if (7 === u && 7 !== t) {\n continue;\n }\n const o = bi(u, e);\n o[F[u]] += c;\n const l = oe(re(a(s(r, i, o)), n));\n if (l && Math.sign(l) !== c) {\n break;\n }\n e = o;\n }\n return e;\n })(f, d, t, Math.max(6, o), a, s, c, u)), f;\n}\n\nfunction roundBigNano(e, n, t, o, r) {\n if (6 === n) {\n const n = (e => e[0] + e[1] / Qr)(e);\n return [ roundByInc(n, t, o), 0 ];\n }\n return roundBigNanoByInc(e, computeNanoInc(n, t), o, r);\n}\n\nfunction roundBigNanoByInc(e, n, t, o) {\n let [r, i] = e;\n o && i < 0 && (i += Qr, r -= 1);\n const [a, s] = divModFloor(roundByInc(i, n, t), Qr);\n return createBigNano(r + a, s);\n}\n\nfunction roundByInc(e, n, t) {\n return roundWithMode(e / n, t) * n;\n}\n\nfunction roundWithMode(e, n) {\n return ga[n](e);\n}\n\nfunction nudgeDayTimeDuration(e, n, t, o, r, i) {\n const a = computeDurationSign(e), s = durationFieldsToBigNano(e), c = roundBigNano(s, o, r, i), u = re(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));\n return [ {\n ...e,\n ...f\n }, addBigNanos(n, u), l ];\n}\n\nfunction nudgeZonedTimeDuration(e, n, t, o, r, i, a, s, c, u) {\n const l = computeDurationSign(e), f = oe(durationFieldsToBigNano(e, 5)), d = computeNanoInc(o, r);\n let m = roundByInc(f, d, i);\n const [p, h] = clampRelativeDuration(a, {\n ...e,\n ...Fi\n }, 6, l, s, c, u), g = m - oe(re(p, h));\n let T = 0;\n g && Math.sign(g) !== l ? n = moveBigNano(p, m) : (T += l, m = roundByInc(g, d, i), \n n = moveBigNano(h, m));\n const D = nanoToDurationTimeFields(m);\n return [ {\n ...e,\n ...D,\n days: e.days + T\n }, n, Boolean(T) ];\n}\n\nfunction nudgeRelativeDuration(e, n, t, o, r, i, a, s, c, u) {\n const l = computeDurationSign(e), f = F[o], d = bi(o, e);\n 7 === o && (e = {\n ...e,\n weeks: e.weeks + Math.trunc(e.days / 7)\n });\n const m = divTrunc(e[f], r) * r;\n d[f] = m;\n const [p, h] = clampRelativeDuration(a, d, o, r * l, s, c, u), g = m + computeEpochNanoFrac(n, p, h) * l * r, T = roundByInc(g, r, i), D = Math.sign(T - g) === l;\n return d[f] = T, [ d, D ? h : p, D ];\n}\n\nfunction me(e, n, t, o) {\n const [r, i, a, s] = (e => {\n const n = refineTimeDisplayTuple(e = normalizeOptions(e));\n return [ e.timeZone, ...n ];\n })(o), c = void 0 !== r;\n return ((e, n, t, o, r, i) => {\n t = roundBigNanoByInc(t, r, o, 1);\n const a = n.getOffsetNanosecondsFor(t);\n return formatIsoDateTimeFields(Ie(t, a), i) + (e ? Fe(roundToMinute(a)) : \"Z\");\n })(c, n(c ? e(r) : Ta), t.epochNanoseconds, i, a, s);\n}\n\nfunction In(e, n, t) {\n const [o, r, i, a, s, c] = (e => {\n e = normalizeOptions(e);\n const n = da(e), t = refineSubsecDigits(e), o = pa(e), r = ha(e, 4), i = aa(e, 4);\n return [ n, ma(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];\n })(t);\n return ((e, n, t, o, r, i, a, s, c, u) => {\n o = roundBigNanoByInc(o, c, s, 1);\n const l = e(t).getOffsetNanosecondsFor(o);\n return formatIsoDateTimeFields(Ie(o, l), u) + Fe(roundToMinute(l), a) + ((e, n) => 1 !== n ? \"[\" + (2 === n ? \"!\" : \"\") + I(e) + \"]\" : \"\")(t, i) + formatCalendar(n, r);\n })(e, n.calendar, n.timeZone, n.epochNanoseconds, o, r, i, a, s, c);\n}\n\nfunction Tt(e, n) {\n const [t, o, r, i] = (e => (e = normalizeOptions(e), [ da(e), ...refineTimeDisplayTuple(e) ]))(n);\n return a = e.calendar, s = t, c = i, formatIsoDateTimeFields(roundDateTimeToNano(e, r, o), c) + formatCalendar(a, s);\n var a, s, c;\n}\n\nfunction yt(e, n) {\n return t = e.calendar, o = e, r = refineDateDisplayOptions(n), formatIsoDateFields(o) + formatCalendar(t, r);\n var t, o, r;\n}\n\nfunction et(e, n) {\n return formatDateLikeIso(e.calendar, formatIsoYearMonthFields, e, refineDateDisplayOptions(n));\n}\n\nfunction W(e, n) {\n return formatDateLikeIso(e.calendar, formatIsoMonthDayFields, e, refineDateDisplayOptions(n));\n}\n\nfunction qe(e, n) {\n const [t, o, r] = refineTimeDisplayOptions(n);\n return i = r, formatIsoTimeFields(roundTimeToNano(e, o, t)[0], i);\n var i;\n}\n\nfunction zt(e, n) {\n const [t, o, r] = refineTimeDisplayOptions(n, 3);\n return o > 1 && (e = {\n ...e,\n ...roundDayTimeDurationByInc(e, o, t)\n }), ((e, n) => {\n const {sign: t} = e, o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = divModBigNano(durationFieldsToBigNano(o, 3), _r, divModTrunc);\n checkDurationTimeUnit(a);\n const c = formatSubsecNano(s, n), u = n >= 0 || !t || c;\n return (t < 0 ? \"-\" : \"\") + \"P\" + formatDurationFragments({\n Y: formatDurationNumber(o.years),\n M: formatDurationNumber(o.months),\n W: formatDurationNumber(o.weeks),\n D: formatDurationNumber(o.days)\n }) + (r || i || a || u ? \"T\" + formatDurationFragments({\n H: formatDurationNumber(r),\n M: formatDurationNumber(i),\n S: formatDurationNumber(a, u) + c\n }) : \"\");\n })(e, r);\n}\n\nfunction formatDateLikeIso(e, n, t, o) {\n const r = I(e), i = o > 1 || 0 === o && r !== X;\n return 1 === o ? r === X ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);\n}\n\nfunction formatDurationFragments(e) {\n const n = [];\n for (const t in e) {\n const o = e[t];\n o && n.push(o, t);\n }\n return n.join(\"\");\n}\n\nfunction formatIsoDateTimeFields(e, n) {\n return formatIsoDateFields(e) + \"T\" + formatIsoTimeFields(e, n);\n}\n\nfunction formatIsoDateFields(e) {\n return formatIsoYearMonthFields(e) + \"-\" + xr(e.isoDay);\n}\n\nfunction formatIsoYearMonthFields(e) {\n const {isoYear: n} = e;\n return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + \"-\" + xr(e.isoMonth);\n}\n\nfunction formatIsoMonthDayFields(e) {\n return xr(e.isoMonth) + \"-\" + xr(e.isoDay);\n}\n\nfunction formatIsoTimeFields(e, n) {\n const t = [ xr(e.isoHour), xr(e.isoMinute) ];\n return -1 !== n && t.push(xr(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * be + n * Vr + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)), \n t.join(\":\");\n}\n\nfunction Fe(e, n = 0) {\n if (1 === n) {\n return \"\";\n }\n const [t, o] = divModFloor(Math.abs(e), Kr), [r, i] = divModFloor(o, Jr), [a, s] = divModFloor(i, _r);\n return getSignStr(e) + xr(t) + \":\" + xr(r) + (a || s ? \":\" + xr(a) + formatSubsecNano(s) : \"\");\n}\n\nfunction formatCalendar(e, n) {\n if (1 !== n) {\n const t = I(e);\n if (n > 1 || 0 === n && t !== X) {\n return formatCalendarId(t, 2 === n);\n }\n }\n return \"\";\n}\n\nfunction formatCalendarId(e, n) {\n return \"[\" + (n ? \"!\" : \"\") + \"u-ca=\" + e + \"]\";\n}\n\nfunction formatSubsecNano(e, n) {\n let t = padNumber(9, e);\n return t = void 0 === n ? t.replace(Na, \"\") : t.slice(0, n), t ? \".\" + t : \"\";\n}\n\nfunction getSignStr(e) {\n return e < 0 ? \"-\" : \"+\";\n}\n\nfunction formatDurationNumber(e, n) {\n return e || n ? e.toLocaleString(\"fullwide\", {\n useGrouping: 0\n }) : \"\";\n}\n\nfunction _zonedEpochSlotsToIso(e, n) {\n const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = Ie(t, o);\n return {\n calendar: e.calendar,\n ...r,\n offsetNanoseconds: o\n };\n}\n\nfunction mn(e, n) {\n const t = fn(n, e);\n return {\n calendar: n.calendar,\n ...Vn(Yi, t),\n offset: Fe(t.offsetNanoseconds),\n timeZone: n.timeZone\n };\n}\n\nfunction getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {\n if (void 0 !== t && 1 === o && (1 === o || a)) {\n return isoToEpochNanoWithOffset(n, t);\n }\n const s = e.getPossibleInstantsFor(n);\n if (void 0 !== t && 3 !== o) {\n const e = ((e, n, t, o) => {\n const r = isoToEpochNano(n);\n o && (t = roundToMinute(t));\n for (const n of e) {\n let e = oe(re(n, r));\n if (o && (e = roundToMinute(e)), e === t) {\n return n;\n }\n }\n })(s, n, t, i);\n if (void 0 !== e) {\n return e;\n }\n if (0 === o) {\n throw new RangeError(kr);\n }\n }\n return a ? isoToEpochNano(n) : we(e, n, r, s);\n}\n\nfunction we(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {\n if (1 === o.length) {\n return o[0];\n }\n if (1 === t) {\n throw new RangeError(Yr);\n }\n if (o.length) {\n return o[3 === t ? 1 : 0];\n }\n const r = isoToEpochNano(n), i = ((e, n) => {\n const t = e.getOffsetNanosecondsFor(moveBigNano(n, -Qr));\n return ne(e.getOffsetNanosecondsFor(moveBigNano(n, Qr)) - t);\n })(e, r), a = i * (2 === t ? -1 : 1);\n return (o = e.getPossibleInstantsFor(Ie(r, a)))[2 === t ? 0 : o.length - 1];\n}\n\nfunction ae(e) {\n if (Math.abs(e) >= Qr) {\n throw new RangeError(wr);\n }\n return e;\n}\n\nfunction ne(e) {\n if (e > Qr) {\n throw new RangeError(Br);\n }\n return e;\n}\n\nfunction se(e, n, t) {\n return _(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {\n if (durationHasDateParts(e)) {\n throw new RangeError(qr);\n }\n return durationFieldsToBigNano(e, 5);\n })(e ? negateDurationFields(t) : t))));\n}\n\nfunction hn(e, n, t, o, r, i = Object.create(null)) {\n const a = n(o.timeZone), s = e(o.calendar);\n return {\n ...o,\n ...moveZonedEpochs(a, s, o, t ? negateDurationFields(r) : r, i)\n };\n}\n\nfunction ct(e, n, t, o, r = Object.create(null)) {\n const {calendar: i} = t;\n return ee(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);\n}\n\nfunction bt(e, n, t, o, r) {\n const {calendar: i} = t;\n return v(moveDate(e(i), t, n ? negateDurationFields(o) : o, r), i);\n}\n\nfunction Qe(e, n, t, o, r = Object.create(null)) {\n const i = t.calendar, a = e(i);\n let s = moveToDayOfMonthUnsafe(a, t);\n n && (o = xt(o)), o.sign < 0 && (s = a.dateAdd(s, {\n ...Si,\n months: 1\n }), s = moveByDays(s, -1));\n const c = a.dateAdd(s, o, r);\n return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(a, c), i);\n}\n\nfunction Ye(e, n, t) {\n return Ge(moveTime(n, e ? negateDurationFields(t) : t)[0]);\n}\n\nfunction moveZonedEpochs(e, n, t, o, r) {\n const i = durationFieldsToBigNano(o, 5);\n let a = t.epochNanoseconds;\n if (durationHasDateParts(o)) {\n const s = fn(t, e);\n a = addBigNanos(we(e, {\n ...moveDate(n, s, {\n ...o,\n ...Fi\n }, r),\n ...Vn(j, s)\n }), i);\n } else {\n a = addBigNanos(a, i), H(r);\n }\n return {\n epochNanoseconds: checkEpochNanoInBounds(a)\n };\n}\n\nfunction moveDateTime(e, n, t, o) {\n const [r, i] = moveTime(n, t);\n return checkIsoDateTimeInBounds({\n ...moveDate(e, n, {\n ...t,\n ...Fi,\n days: t.days + i\n }, o),\n ...r\n });\n}\n\nfunction moveDate(e, n, t, o) {\n if (t.years || t.months || t.weeks) {\n return e.dateAdd(n, t, o);\n }\n H(o);\n const r = t.days + durationFieldsToBigNano(t, 5)[0];\n return r ? checkIsoDateInBounds(moveByDays(n, r)) : n;\n}\n\nfunction moveToDayOfMonthUnsafe(e, n, t = 1) {\n return moveByDays(n, t - e.day(n));\n}\n\nfunction moveTime(e, n) {\n const [t, o] = durationFieldsToBigNano(n, 5), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);\n return [ r, t + i ];\n}\n\nfunction moveByDays(e, n) {\n return n ? {\n ...e,\n ...epochMilliToIso(isoToEpochMilli(e) + n * Gr)\n } : e;\n}\n\nfunction createMarkerSystem(e, n, t) {\n const o = e(t.calendar);\n return isZonedEpochSlots(t) ? [ t, o, n(t.timeZone) ] : [ {\n ...t,\n ...Dt\n }, o ];\n}\n\nfunction createMarkerToEpochNano(e) {\n return e ? extractEpochNano : isoToEpochNano;\n}\n\nfunction createMoveMarker(e) {\n return e ? E(moveZonedEpochs, e) : moveDateTime;\n}\n\nfunction createDiffMarkers(e) {\n return e ? E(diffZonedEpochsExact, e) : diffDateTimesExact;\n}\n\nfunction isZonedEpochSlots(e) {\n return e && e.epochNanoseconds;\n}\n\nfunction isUniformUnit(e, n) {\n return e <= 6 - (isZonedEpochSlots(n) ? 1 : 0);\n}\n\nfunction Wt(e, n, t, o, r, i, a) {\n const s = e(normalizeOptions(a).relativeTo), c = Math.max(getMaxDurationUnit(r), getMaxDurationUnit(i));\n if (isUniformUnit(c, s)) {\n return Vt(checkDurationUnits(((e, n, t, o) => {\n const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);\n if (!Number.isFinite(r[0])) {\n throw new RangeError(Cr);\n }\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(r, t)\n };\n })(r, i, c, o)));\n }\n if (!s) {\n throw new RangeError(zr);\n }\n o && (i = negateDurationFields(i));\n const [u, l, f] = createMarkerSystem(n, t, s), d = createMoveMarker(f), m = createDiffMarkers(f), p = d(l, u, r);\n return Vt(m(l, u, d(l, p, i), c));\n}\n\nfunction Gt(e, n, t, o, r) {\n const i = getMaxDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {\n e = normalizeOptionsOrString(e, Hi);\n let o = sa(e);\n const r = t(e[Ki]);\n let i = parseRoundingIncInteger(e);\n const a = ha(e, 7);\n let s = aa(e);\n if (void 0 === o && void 0 === s) {\n throw new RangeError(Ur);\n }\n return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s), \n i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];\n })(r, i, e), f = Math.max(i, a);\n if (!isZonedEpochSlots(l) && f <= 6) {\n return Vt(checkDurationUnits(((e, n, t, o, r) => {\n const i = roundBigNano(durationFieldsToBigNano(e), t, o, r);\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(i, n)\n };\n })(o, a, s, c, u)));\n }\n if (!l) {\n throw new RangeError(zr);\n }\n const [d, m, p] = createMarkerSystem(n, t, l), h = createMarkerToEpochNano(p), g = createMoveMarker(p), T = createDiffMarkers(p), D = g(m, d, o);\n let I = T(m, d, D, a);\n const M = o.sign, N = computeDurationSign(I);\n if (M && N && M !== N) {\n throw new RangeError(vr);\n }\n return N && (I = roundRelativeDuration(I, h(D), a, s, c, u, m, d, h, g)), Vt(I);\n}\n\nfunction Rt(e) {\n return -1 === e.sign ? xt(e) : e;\n}\n\nfunction xt(e) {\n return Vt(negateDurationFields(e));\n}\n\nfunction negateDurationFields(e) {\n const n = {};\n for (const t of F) {\n n[t] = -1 * e[t] || 0;\n }\n return n;\n}\n\nfunction Jt(e) {\n return !e.sign;\n}\n\nfunction computeDurationSign(e, n = F) {\n let t = 0;\n for (const o of n) {\n const n = Math.sign(e[o]);\n if (n) {\n if (t && t !== n) {\n throw new RangeError(Rr);\n }\n t = n;\n }\n }\n return t;\n}\n\nfunction checkDurationUnits(e) {\n for (const n of vi) {\n clampEntity(n, e[n], -ya, ya, 1);\n }\n return checkDurationTimeUnit(oe(durationFieldsToBigNano(e), _r)), e;\n}\n\nfunction checkDurationTimeUnit(e) {\n if (!Number.isSafeInteger(e)) {\n throw new RangeError(Zr);\n }\n}\n\nfunction durationFieldsToBigNano(e, n = 6) {\n return givenFieldsToBigNano(e, n, F);\n}\n\nfunction nanoToDurationDayTimeFields(e, n = 6) {\n const [t, o] = e, r = nanoToGivenFields(o, n, F);\n if (r[F[n]] += t * (Qr / Xr[n]), !Number.isFinite(r[F[n]])) {\n throw new RangeError(Cr);\n }\n return r;\n}\n\nfunction nanoToDurationTimeFields(e, n = 5) {\n return nanoToGivenFields(e, n, F);\n}\n\nfunction durationHasDateParts(e) {\n return Boolean(computeDurationSign(e, Pi));\n}\n\nfunction getMaxDurationUnit(e) {\n let n = 9;\n for (;n > 0 && !e[F[n]]; n--) {}\n return n;\n}\n\nfunction createSplitTuple(e, n) {\n return [ e, n ];\n}\n\nfunction computePeriod(e) {\n const n = Math.floor(e / Da) * Da;\n return [ n, n + Da ];\n}\n\nfunction pe(e) {\n const n = parseDateTimeLike(e = toStringViaPrimitive(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n let t;\n if (n.m) {\n t = 0;\n } else {\n if (!n.offset) {\n throw new RangeError(failedParse(e));\n }\n t = parseOffsetNano(n.offset);\n }\n return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), _(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));\n}\n\nfunction Xt(e) {\n const n = parseDateTimeLike(m(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n if (n.timeZone) {\n return finalizeZonedDateTime(n, n.offset ? parseOffsetNano(n.offset) : void 0);\n }\n if (n.m) {\n throw new RangeError(failedParse(e));\n }\n return finalizeDate(n);\n}\n\nfunction Mn(e, n) {\n const t = parseDateTimeLike(m(e));\n if (!t || !t.timeZone) {\n throw new RangeError(failedParse(e));\n }\n const {offset: o} = t, r = o ? parseOffsetNano(o) : void 0, [, i, a] = wn(n);\n return finalizeZonedDateTime(t, r, i, a);\n}\n\nfunction parseOffsetNano(e) {\n const n = parseOffsetNanoMaybe(e);\n if (void 0 === n) {\n throw new RangeError(failedParse(e));\n }\n return n;\n}\n\nfunction Ct(e) {\n const n = parseDateTimeLike(m(e));\n if (!n || n.m) {\n throw new RangeError(failedParse(e));\n }\n return ee(finalizeDateTime(n));\n}\n\nfunction At(e) {\n const n = parseDateTimeLike(m(e));\n if (!n || n.m) {\n throw new RangeError(failedParse(e));\n }\n return v(n.p ? finalizeDateTime(n) : finalizeDate(n));\n}\n\nfunction ot(e, n) {\n const t = parseYearMonthOnly(m(n));\n if (t) {\n return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));\n }\n const o = At(n);\n return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(e(o.calendar), o));\n}\n\nfunction requireIsoCalendar(e) {\n if (e.calendar !== X) {\n throw new RangeError(invalidSubstring(e.calendar));\n }\n}\n\nfunction Q(e, n) {\n const t = parseMonthDayOnly(m(n));\n if (t) {\n return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));\n }\n const o = At(n), {calendar: r} = o, i = e(r), [a, s, c] = i.h(o), [u, l] = i.I(a, s), [f, d] = i.N(u, l, c);\n return createPlainMonthDaySlots(checkIsoDateInBounds(i.P(f, d, c)), r);\n}\n\nfunction ze(e) {\n let n, t = (e => {\n const n = Ca.exec(e);\n return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;\n })(m(e));\n if (!t) {\n if (t = parseDateTimeLike(e), !t) {\n throw new RangeError(failedParse(e));\n }\n if (!t.p) {\n throw new RangeError(failedParse(e));\n }\n if (t.m) {\n throw new RangeError(invalidSubstring(\"Z\"));\n }\n requireIsoCalendar(t);\n }\n if ((n = parseYearMonthOnly(e)) && isIsoDateFieldsValid(n)) {\n throw new RangeError(failedParse(e));\n }\n if ((n = parseMonthDayOnly(e)) && isIsoDateFieldsValid(n)) {\n throw new RangeError(failedParse(e));\n }\n return Ge(constrainIsoTimeFields(t, 1));\n}\n\nfunction Kt(e) {\n const n = (e => {\n const n = za.exec(e);\n return n ? (e => {\n function parseUnit(e, r, i) {\n let a = 0, s = 0;\n if (i && ([a, o] = divModFloor(o, Xr[i])), void 0 !== e) {\n if (t) {\n throw new RangeError(invalidSubstring(e));\n }\n s = (e => {\n const n = parseInt(e);\n if (!Number.isFinite(n)) {\n throw new RangeError(invalidSubstring(e));\n }\n return n;\n })(e), n = 1, r && (o = parseSubsecNano(r) * (Xr[i] / _r), t = 1);\n }\n return a + s;\n }\n let n = 0, t = 0, o = 0, r = {\n ...zipProps(F, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),\n ...nanoToGivenFields(o, 2, F)\n };\n if (!n) {\n throw new RangeError(noValidFields(F));\n }\n return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;\n })(n) : void 0;\n })(m(e));\n if (!n) {\n throw new RangeError(failedParse(e));\n }\n return Vt(checkDurationUnits(n));\n}\n\nfunction sn(e) {\n const n = parseDateTimeLike(e) || parseYearMonthOnly(e) || parseMonthDayOnly(e);\n return n ? n.calendar : e;\n}\n\nfunction Ne(e) {\n const n = parseDateTimeLike(e);\n return n && (n.timeZone || n.m && Ta || n.offset) || e;\n}\n\nfunction finalizeZonedDateTime(e, n, t = 0, o = 0) {\n const r = ye(e.timeZone), i = ie(r);\n return Yn(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.v, e.m), r, an(e.calendar));\n}\n\nfunction finalizeDateTime(e) {\n return resolveSlotsCalendar(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e)));\n}\n\nfunction finalizeDate(e) {\n return resolveSlotsCalendar(checkIsoDateInBounds(checkIsoDateFields(e)));\n}\n\nfunction resolveSlotsCalendar(e) {\n return {\n ...e,\n calendar: an(e.calendar)\n };\n}\n\nfunction parseDateTimeLike(e) {\n const n = Ya.exec(e);\n return n ? (e => {\n const n = e[10], t = \"Z\" === (n || \"\").toUpperCase();\n return {\n isoYear: organizeIsoYearParts(e),\n isoMonth: parseInt(e[4]),\n isoDay: parseInt(e[5]),\n ...organizeTimeParts(e.slice(5)),\n ...organizeAnnotationParts(e[16]),\n p: Boolean(e[6]),\n m: t,\n offset: t ? void 0 : n\n };\n })(n) : void 0;\n}\n\nfunction parseYearMonthOnly(e) {\n const n = Ba.exec(e);\n return n ? (e => ({\n isoYear: organizeIsoYearParts(e),\n isoMonth: parseInt(e[4]),\n isoDay: 1,\n ...organizeAnnotationParts(e[5])\n }))(n) : void 0;\n}\n\nfunction parseMonthDayOnly(e) {\n const n = ka.exec(e);\n return n ? (e => ({\n isoYear: ji,\n isoMonth: parseInt(e[1]),\n isoDay: parseInt(e[2]),\n ...organizeAnnotationParts(e[3])\n }))(n) : void 0;\n}\n\nfunction parseOffsetNanoMaybe(e, n) {\n const t = Za.exec(e);\n return t ? ((e, n) => {\n const t = e[4] || e[5];\n if (n && t) {\n throw new RangeError(invalidSubstring(t));\n }\n return ae((parseInt0(e[2]) * Kr + parseInt0(e[3]) * Jr + parseInt0(e[4]) * _r + parseSubsecNano(e[5] || \"\")) * parseSign(e[1]));\n })(t, n) : void 0;\n}\n\nfunction organizeIsoYearParts(e) {\n const n = parseSign(e[1]), t = parseInt(e[2] || e[3]);\n if (n < 0 && !t) {\n throw new RangeError(invalidSubstring(-0));\n }\n return n * t;\n}\n\nfunction organizeTimeParts(e) {\n const n = parseInt0(e[3]);\n return {\n ...nanoToIsoTimeAndDay(parseSubsecNano(e[4] || \"\"))[0],\n isoHour: parseInt0(e[1]),\n isoMinute: parseInt0(e[2]),\n isoSecond: 60 === n ? 59 : n\n };\n}\n\nfunction organizeAnnotationParts(e) {\n let n, t;\n const o = [];\n if (e.replace(Ra, ((e, r, i) => {\n const a = Boolean(r), [s, c] = i.split(\"=\").reverse();\n if (c) {\n if (\"u-ca\" === c) {\n o.push(s), n || (n = a);\n } else if (a || /[A-Z]/.test(c)) {\n throw new RangeError(invalidSubstring(e));\n }\n } else {\n if (t) {\n throw new RangeError(invalidSubstring(e));\n }\n t = s;\n }\n return \"\";\n })), o.length > 1 && n) {\n throw new RangeError(invalidSubstring(e));\n }\n return {\n timeZone: t,\n calendar: o[0] || X\n };\n}\n\nfunction parseSubsecNano(e) {\n return parseInt(e.padEnd(9, \"0\"));\n}\n\nfunction createRegExp(e) {\n return new RegExp(`^${e}$`, \"i\");\n}\n\nfunction parseSign(e) {\n return e && \"+\" !== e ? -1 : 1;\n}\n\nfunction parseInt0(e) {\n return void 0 === e ? 0 : parseInt(e);\n}\n\nfunction Me(e) {\n return ye(m(e));\n}\n\nfunction ye(e) {\n const n = getTimeZoneEssence(e);\n return \"number\" == typeof n ? Fe(n) : n ? (e => {\n if (Ua.test(e)) {\n throw new RangeError(br);\n }\n return e.toLowerCase().split(\"/\").map(((e, n) => (e.length <= 3 || /\\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || \"in\" === e || \"chat\" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join(\"/\");\n })(e) : Ta;\n}\n\nfunction getTimeZoneAtomic(e) {\n const n = getTimeZoneEssence(e);\n return \"number\" == typeof n ? n : n ? n.resolvedOptions().timeZone : Ta;\n}\n\nfunction getTimeZoneEssence(e) {\n const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);\n return void 0 !== n ? n : e !== Ta ? qa(e) : void 0;\n}\n\nfunction Ze(e, n) {\n return te(e.epochNanoseconds, n.epochNanoseconds);\n}\n\nfunction yn(e, n) {\n return te(e.epochNanoseconds, n.epochNanoseconds);\n}\n\nfunction $t(e, n, t, o, r, i) {\n const a = e(normalizeOptions(i).relativeTo), s = Math.max(getMaxDurationUnit(o), getMaxDurationUnit(r));\n if (allPropsEqual(F, o, r)) {\n return 0;\n }\n if (isUniformUnit(s, a)) {\n return te(durationFieldsToBigNano(o), durationFieldsToBigNano(r));\n }\n if (!a) {\n throw new RangeError(zr);\n }\n const [c, u, l] = createMarkerSystem(n, t, a), f = createMarkerToEpochNano(l), d = createMoveMarker(l);\n return te(f(d(u, c, o)), f(d(u, c, r)));\n}\n\nfunction gt(e, n) {\n return rt(e, n) || He(e, n);\n}\n\nfunction rt(e, n) {\n return compareNumbers(isoToEpochMilli(e), isoToEpochMilli(n));\n}\n\nfunction He(e, n) {\n return compareNumbers(isoTimeFieldsToNano(e), isoTimeFieldsToNano(n));\n}\n\nfunction ue(e, n) {\n return !Ze(e, n);\n}\n\nfunction gn(e, n) {\n return !yn(e, n) && !!je(e.timeZone, n.timeZone) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction ft(e, n) {\n return !gt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction It(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction $e(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction x(e, n) {\n return !rt(e, n) && isIdLikeEqual(e.calendar, n.calendar);\n}\n\nfunction Ve(e, n) {\n return !He(e, n);\n}\n\nfunction je(e, n) {\n if (e === n) {\n return 1;\n }\n const t = I(e), o = I(n);\n if (t === o) {\n return 1;\n }\n try {\n return getTimeZoneAtomic(t) === getTimeZoneAtomic(o);\n } catch (e) {}\n}\n\nfunction le(e, n, t, o) {\n const r = refineDiffOptions(e, U(o), 3, 5), i = diffEpochNanos(n.epochNanoseconds, t.epochNanoseconds, ...r);\n return Vt(e ? negateDurationFields(i) : i);\n}\n\nfunction Dn(e, n, t, o, r, i) {\n const a = getCommonCalendarSlot(o.calendar, r.calendar), s = U(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = te(m, d);\n let h;\n if (p) {\n if (c < 6) {\n h = diffEpochNanos(d, m, c, u, l, f);\n } else {\n const t = n(((e, n) => {\n if (!je(e, n)) {\n throw new RangeError(Fr);\n }\n return e;\n })(o.timeZone, r.timeZone)), i = e(a);\n h = diffZonedEpochsBig(i, t, o, r, p, c, s), h = roundRelativeDuration(h, m, c, u, l, f, i, o, extractEpochNano, E(moveZonedEpochs, t));\n }\n } else {\n h = Si;\n }\n return Vt(t ? negateDurationFields(h) : h);\n}\n\nfunction ut(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = te(d, f);\n let p;\n if (m) {\n if (s <= 6) {\n p = diffEpochNanos(f, d, s, c, u, l);\n } else {\n const n = e(i);\n p = diffDateTimesBig(n, t, o, m, s, a), p = roundRelativeDuration(p, d, s, c, u, l, n, t, isoToEpochNano, moveDateTime);\n }\n } else {\n p = Si;\n }\n return Vt(n ? negateDurationFields(p) : p);\n}\n\nfunction Ft(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r);\n return diffDateLike(n, (() => e(i)), t, o, ...refineDiffOptions(n, a, 6, 9, 6), a);\n}\n\nfunction Xe(e, n, t, o, r) {\n const i = getCommonCalendarSlot(t.calendar, o.calendar), a = U(r), s = refineDiffOptions(n, a, 9, 9, 8), c = e(i);\n return diffDateLike(n, (() => c), moveToDayOfMonthUnsafe(c, t), moveToDayOfMonthUnsafe(c, o), ...s, a);\n}\n\nfunction diffDateLike(e, n, t, o, r, i, a, s, c) {\n const u = isoToEpochNano(t), l = isoToEpochNano(o);\n let f;\n if (te(l, u)) {\n if (6 === r) {\n f = diffEpochNanos(u, l, r, i, a, s);\n } else {\n const e = n();\n f = e.dateUntil(t, o, r, c), 6 === i && 1 === a || (f = roundRelativeDuration(f, l, r, i, a, s, e, t, isoToEpochNano, moveDate));\n }\n } else {\n f = Si;\n }\n return Vt(e ? negateDurationFields(f) : f);\n}\n\nfunction Ae(e, n, t, o) {\n const r = U(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = roundByInc(diffTimes(n, t), computeNanoInc(a, s), c), l = {\n ...Si,\n ...nanoToDurationTimeFields(u, i)\n };\n return Vt(e ? negateDurationFields(l) : l);\n}\n\nfunction diffZonedEpochsExact(e, n, t, o, r, i) {\n const a = te(o.epochNanoseconds, t.epochNanoseconds);\n return a ? r < 6 ? diffEpochNanosExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochsBig(n, e, t, o, a, r, i) : Si;\n}\n\nfunction diffDateTimesExact(e, n, t, o, r) {\n const i = isoToEpochNano(n), a = isoToEpochNano(t), s = te(a, i);\n return s ? o <= 6 ? diffEpochNanosExact(i, a, o) : diffDateTimesBig(e, n, t, s, o, r) : Si;\n}\n\nfunction diffZonedEpochsBig(e, n, t, o, r, i, a) {\n const [s, c, u] = ((e, n, t, o) => {\n function updateMid() {\n return l = {\n ...moveByDays(a, c++ * -o),\n ...i\n }, f = we(e, l), te(s, f) === -o;\n }\n const r = fn(n, e), i = Vn(j, r), a = fn(t, e), s = t.epochNanoseconds;\n let c = 0;\n const u = diffTimes(r, a);\n let l, f;\n if (Math.sign(u) === -o && c++, updateMid() && (-1 === o || updateMid())) {\n throw new RangeError(vr);\n }\n const d = oe(re(f, s));\n return [ r, l, d ];\n })(n, t, o, r);\n var l, f;\n return {\n ...6 === i ? (l = s, f = c, {\n ...Si,\n days: diffDays(l, f)\n }) : e.dateUntil(s, c, i, a),\n ...nanoToDurationTimeFields(u)\n };\n}\n\nfunction diffDateTimesBig(e, n, t, o, r, i) {\n const [a, s, c] = ((e, n, t) => {\n let o = n, r = diffTimes(e, n);\n return Math.sign(r) === -t && (o = moveByDays(n, -t), r += Qr * t), [ e, o, r ];\n })(n, t, o);\n return {\n ...e.dateUntil(a, s, r, i),\n ...nanoToDurationTimeFields(c)\n };\n}\n\nfunction diffEpochNanos(e, n, t, o, r, i) {\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(roundBigNano(re(e, n), o, r, i), t)\n };\n}\n\nfunction diffEpochNanosExact(e, n, t) {\n return {\n ...Si,\n ...nanoToDurationDayTimeFields(re(e, n), t)\n };\n}\n\nfunction diffDays(e, n) {\n return diffEpochMilliByDay(isoToEpochMilli(e), isoToEpochMilli(n));\n}\n\nfunction diffEpochMilliByDay(e, n) {\n return Math.trunc((n - e) / Gr);\n}\n\nfunction diffTimes(e, n) {\n return isoTimeFieldsToNano(n) - isoTimeFieldsToNano(e);\n}\n\nfunction getCommonCalendarSlot(e, n) {\n if (!isIdLikeEqual(e, n)) {\n throw new RangeError(Er);\n }\n return e;\n}\n\nfunction createIntlCalendar(e) {\n function epochMilliToIntlFields(e) {\n return ((e, n) => ({\n ...parseIntlYear(e, n),\n F: e.month,\n day: parseInt(e.day)\n }))(hashIntlFormatParts(n, e), t);\n }\n const n = La(e), t = computeCalendarIdBase(e);\n return {\n id: e,\n O: createIntlFieldCache(epochMilliToIntlFields),\n B: createIntlYearDataCache(epochMilliToIntlFields)\n };\n}\n\nfunction createIntlFieldCache(e) {\n return Jn((n => {\n const t = isoToEpochMilli(n);\n return e(t);\n }), WeakMap);\n}\n\nfunction createIntlYearDataCache(e) {\n const n = e(0).year - Wi;\n return Jn((t => {\n let o, r = isoArgsToEpochMilli(t - n);\n const i = [], a = [];\n do {\n r += 400 * Gr;\n } while ((o = e(r)).year <= t);\n do {\n r += (1 - o.day) * Gr, o.year === t && (i.push(r), a.push(o.F)), r -= Gr;\n } while ((o = e(r)).year >= t);\n return {\n k: i.reverse(),\n C: Wr(a.reverse())\n };\n }));\n}\n\nfunction parseIntlYear(e, n) {\n let t, o, r = parseIntlPartsYear(e);\n if (e.era) {\n const i = Di[n];\n void 0 !== i && (t = \"islamic\" === n ? \"ah\" : e.era.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g, \"\"), \n \"bc\" === t || \"b\" === t ? t = \"bce\" : \"ad\" !== t && \"a\" !== t || (t = \"ce\"), o = r, \n r = eraYearToYear(o, i[t] || 0));\n }\n return {\n era: t,\n eraYear: o,\n year: r\n };\n}\n\nfunction parseIntlPartsYear(e) {\n return parseInt(e.relatedYear || e.year);\n}\n\nfunction computeIntlDateParts(e) {\n const {year: n, F: t, day: o} = this.O(e), {C: r} = this.B(n);\n return [ n, r[t] + 1, o ];\n}\n\nfunction computeIntlEpochMilli(e, n = 1, t = 1) {\n return this.B(e).k[n - 1] + (t - 1) * Gr;\n}\n\nfunction computeIntlLeapMonth(e) {\n const n = queryMonthStrings(this, e), t = queryMonthStrings(this, e - 1), o = n.length;\n if (o > t.length) {\n const e = getCalendarLeapMonthMeta(this);\n if (e < 0) {\n return -e;\n }\n for (let e = 0; e < o; e++) {\n if (n[e] !== t[e]) {\n return e + 1;\n }\n }\n }\n}\n\nfunction computeIntlDaysInYear(e) {\n return diffEpochMilliByDay(computeIntlEpochMilli.call(this, e), computeIntlEpochMilli.call(this, e + 1));\n}\n\nfunction computeIntlDaysInMonth(e, n) {\n const {k: t} = this.B(e);\n let o = n + 1, r = t;\n return o > t.length && (o = 1, r = this.B(e + 1).k), diffEpochMilliByDay(t[n - 1], r[o - 1]);\n}\n\nfunction computeIntlMonthsInYear(e) {\n return this.B(e).k.length;\n}\n\nfunction queryMonthStrings(e, n) {\n return Object.keys(e.B(n).C);\n}\n\nfunction rn(e) {\n return an(m(e));\n}\n\nfunction an(e) {\n if ((e = e.toLowerCase()) !== X && e !== gi && computeCalendarIdBase(e) !== computeCalendarIdBase(La(e).resolvedOptions().calendar)) {\n throw new RangeError(invalidCalendar(e));\n }\n return e;\n}\n\nfunction computeCalendarIdBase(e) {\n return \"islamicc\" === e && (e = \"islamic\"), e.split(\"-\")[0];\n}\n\nfunction computeNativeWeekOfYear(e) {\n return this.R(e)[0];\n}\n\nfunction computeNativeYearOfWeek(e) {\n return this.R(e)[1];\n}\n\nfunction computeNativeDayOfYear(e) {\n const [n] = this.h(e);\n return diffEpochMilliByDay(this.q(n), isoToEpochMilli(e)) + 1;\n}\n\nfunction parseMonthCode(e) {\n const n = Wa.exec(e);\n if (!n) {\n throw new RangeError(invalidMonthCode(e));\n }\n return [ parseInt(n[1]), Boolean(n[2]) ];\n}\n\nfunction monthCodeNumberToMonth(e, n, t) {\n return e + (n || t && e >= t ? 1 : 0);\n}\n\nfunction monthToMonthCodeNumber(e, n) {\n return e - (n && e >= n ? 1 : 0);\n}\n\nfunction eraYearToYear(e, n) {\n return (n + e) * (Math.sign(n) || 1) || 0;\n}\n\nfunction getCalendarEraOrigins(e) {\n return Di[getCalendarIdBase(e)];\n}\n\nfunction getCalendarLeapMonthMeta(e) {\n return Ii[getCalendarIdBase(e)];\n}\n\nfunction getCalendarIdBase(e) {\n return computeCalendarIdBase(e.id || X);\n}\n\nfunction Qt(e, n, t, o) {\n const r = refineCalendarFields(t, o, en, [], ri);\n if (void 0 !== r.timeZone) {\n const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);\n return {\n epochNanoseconds: getMatchingInstantFor(n(a), {\n ...o,\n ...i\n }, void 0 !== r.offset ? parseOffsetNano(r.offset) : void 0),\n timeZone: a\n };\n }\n return {\n ...t.dateFromFields(r),\n ...Dt\n };\n}\n\nfunction jn(e, n, t, o, r, i) {\n const a = refineCalendarFields(t, r, en, ti, ri), s = e(a.timeZone), [c, u, l] = wn(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);\n return Yn(getMatchingInstantFor(n(s), {\n ...f,\n ...d\n }, void 0 !== a.offset ? parseOffsetNano(a.offset) : void 0, u, l), s, o);\n}\n\nfunction Pt(e, n, t) {\n const o = refineCalendarFields(e, n, en, [], w), r = H(t);\n return ee(checkIsoDateTimeInBounds({\n ...e.dateFromFields(o, overrideOverflowOptions(t, r)),\n ...refineTimeBag(o, r)\n }));\n}\n\nfunction Yt(e, n, t, o = []) {\n const r = refineCalendarFields(e, n, en, o);\n return e.dateFromFields(r, t);\n}\n\nfunction nt(e, n, t, o) {\n const r = refineCalendarFields(e, n, fi, o);\n return e.yearMonthFromFields(r, t);\n}\n\nfunction K(e, n, t, o, r = []) {\n const i = refineCalendarFields(e, t, en, r);\n return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = ji), \n e.monthDayFromFields(i, o);\n}\n\nfunction Ue(e, n) {\n const t = H(n);\n return Ge(refineTimeBag(refineFields(e, ei, [], 1), t));\n}\n\nfunction Ht(e) {\n const n = refineFields(e, Ni);\n return Vt(checkDurationUnits({\n ...Si,\n ...n\n }));\n}\n\nfunction refineCalendarFields(e, n, t, o = [], r = []) {\n return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);\n}\n\nfunction refineFields(e, n, t, o = !t) {\n const r = {};\n let i, a = 0;\n for (const o of n) {\n if (o === i) {\n throw new RangeError(duplicateFields(o));\n }\n if (\"constructor\" === o || \"__proto__\" === o) {\n throw new RangeError(tn(o));\n }\n let n = e[o];\n if (void 0 !== n) {\n a = 1, Ga[o] && (n = Ga[o](n, o)), r[o] = n;\n } else if (t) {\n if (t.includes(o)) {\n throw new TypeError(missingField(o));\n }\n r[o] = hi[o];\n }\n i = o;\n }\n if (o && !a) {\n throw new TypeError(noValidFields(n));\n }\n return r;\n}\n\nfunction refineTimeBag(e, n) {\n return constrainIsoTimeFields(Ha({\n ...hi,\n ...e\n }), n);\n}\n\nfunction Sn(e, n, t, o, r, i) {\n const a = U(i), {calendar: s, timeZone: c} = t;\n return Yn(((e, n, t, o, r) => {\n const i = mergeCalendarFields(e, t, o, en, oi, ni), [a, s, c] = wn(r, 2);\n return getMatchingInstantFor(n, {\n ...e.dateFromFields(i, overrideOverflowOptions(r, a)),\n ...refineTimeBag(i, a)\n }, parseOffsetNano(i.offset), s, c);\n })(e(s), n(c), o, r, a), c, s);\n}\n\nfunction at(e, n, t, o, r) {\n const i = U(r);\n return ee(((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en, w), i = H(o);\n return checkIsoDateTimeInBounds({\n ...e.dateFromFields(r, overrideOverflowOptions(o, i)),\n ...refineTimeBag(r, i)\n });\n })(e(n.calendar), t, o, i));\n}\n\nfunction Zt(e, n, t, o, r) {\n const i = U(r);\n return ((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en);\n return e.dateFromFields(r, o);\n })(e(n.calendar), t, o, i);\n}\n\nfunction Ke(e, n, t, o, r) {\n const i = U(r);\n return createPlainYearMonthSlots(((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, fi);\n return e.yearMonthFromFields(r, o);\n })(e(n.calendar), t, o, i));\n}\n\nfunction k(e, n, t, o, r) {\n const i = U(r);\n return ((e, n, t, o) => {\n const r = mergeCalendarFields(e, n, t, en);\n return e.monthDayFromFields(r, o);\n })(e(n.calendar), t, o, i);\n}\n\nfunction Be(e, n, t) {\n return Ge(((e, n, t) => {\n const o = H(t);\n return refineTimeBag({\n ...Vn(ei, e),\n ...refineFields(n, ei)\n }, o);\n })(e, n, t));\n}\n\nfunction kt(e, n) {\n return Vt((t = e, o = n, checkDurationUnits({\n ...t,\n ...refineFields(o, Ni)\n })));\n var t, o;\n}\n\nfunction mergeCalendarFields(e, n, t, o, r = [], i = []) {\n const a = [ ...e.fields(o), ...r ].sort();\n let s = refineFields(n, a, i);\n const c = refineFields(t, a);\n return s = e.mergeFields(s, c), refineFields(s, a, []);\n}\n\nfunction convertToPlainMonthDay(e, n) {\n const t = refineCalendarFields(e, n, pi);\n return e.monthDayFromFields(t);\n}\n\nfunction convertToPlainYearMonth(e, n, t) {\n const o = refineCalendarFields(e, n, di);\n return e.yearMonthFromFields(o, t);\n}\n\nfunction convertToIso(e, n, t, o, r) {\n n = Vn(t = e.fields(t), n), o = refineFields(o, r = e.fields(r), []);\n let i = e.mergeFields(n, o);\n return i = refineFields(i, [ ...t, ...r ].sort(), []), e.dateFromFields(i);\n}\n\nfunction refineYear(e, n) {\n let {era: t, eraYear: o, year: r} = n;\n const i = getCalendarEraOrigins(e);\n if (void 0 !== t || void 0 !== o) {\n if (void 0 === t || void 0 === o) {\n throw new TypeError(Dr);\n }\n if (!i) {\n throw new RangeError(gr);\n }\n const e = i[t];\n if (void 0 === e) {\n throw new RangeError(invalidEra(t));\n }\n const n = eraYearToYear(o, e);\n if (void 0 !== r && r !== n) {\n throw new RangeError(Ir);\n }\n r = n;\n } else if (void 0 === r) {\n throw new TypeError(missingYear(i));\n }\n return r;\n}\n\nfunction refineMonth(e, n, t, o) {\n let {month: r, monthCode: i} = n;\n if (void 0 !== i) {\n const n = ((e, n, t, o) => {\n const r = e.U(t), [i, a] = parseMonthCode(n);\n let s = monthCodeNumberToMonth(i, a, r);\n if (a) {\n const n = getCalendarLeapMonthMeta(e);\n if (void 0 === n) {\n throw new RangeError(Pr);\n }\n if (n > 0) {\n if (s > n) {\n throw new RangeError(Pr);\n }\n if (void 0 === r) {\n if (1 === o) {\n throw new RangeError(Pr);\n }\n s--;\n }\n } else {\n if (s !== -n) {\n throw new RangeError(Pr);\n }\n if (void 0 === r && 1 === o) {\n throw new RangeError(Pr);\n }\n }\n }\n return s;\n })(e, i, t, o);\n if (void 0 !== r && r !== n) {\n throw new RangeError(Mr);\n }\n r = n, o = 1;\n } else if (void 0 === r) {\n throw new TypeError(Nr);\n }\n return clampEntity(\"month\", r, 1, e.L(t), o);\n}\n\nfunction refineDay(e, n, t, o, r) {\n return clampProp(n, \"day\", 1, e.j(o, t), r);\n}\n\nfunction spliceFields(e, n, t, o) {\n let r = 0;\n const i = [];\n for (const e of t) {\n void 0 !== n[e] ? r = 1 : i.push(e);\n }\n if (Object.assign(e, n), r) {\n for (const n of o || i) {\n delete e[n];\n }\n }\n}\n\nfunction Se(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));\n}\n\nfunction vn(e, n, t, o, r = X) {\n return Yn(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));\n}\n\nfunction pt(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = X) {\n return ee(checkIsoDateTimeInBounds(checkIsoDateTimeFields(T(toInteger, zipProps(wi, [ n, t, o, r, i, a, s, c, u ])))), e(l));\n}\n\nfunction Nt(e, n, t, o, r = X) {\n return v(checkIsoDateInBounds(checkIsoDateFields(T(toInteger, {\n isoYear: n,\n isoMonth: t,\n isoDay: o\n }))), e(r));\n}\n\nfunction tt(e, n, t, o = X, r = 1) {\n const i = toInteger(n), a = toInteger(t), s = e(o);\n return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({\n isoYear: i,\n isoMonth: a,\n isoDay: toInteger(r)\n })), s);\n}\n\nfunction G(e, n, t, o = X, r = ji) {\n const i = toInteger(n), a = toInteger(t), s = e(o);\n return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({\n isoYear: toInteger(r),\n isoMonth: i,\n isoDay: a\n })), s);\n}\n\nfunction ke(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {\n return Ge(constrainIsoTimeFields(T(toInteger, zipProps(j, [ e, n, t, o, r, i ])), 1));\n}\n\nfunction Lt(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {\n return Vt(checkDurationUnits(T(toStrictInteger, zipProps(F, [ e, n, t, o, r, i, a, s, c, u ]))));\n}\n\nfunction fe(e, n, t = X) {\n return Yn(e.epochNanoseconds, n, t);\n}\n\nfunction Zn(e) {\n return _(e.epochNanoseconds);\n}\n\nfunction ht(e, n) {\n return ee(fn(n, e));\n}\n\nfunction Bt(e, n) {\n return v(fn(n, e));\n}\n\nfunction bn(e, n, t) {\n return convertToPlainYearMonth(e(n.calendar), t);\n}\n\nfunction Fn(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction Re(e, n) {\n return Ge(fn(n, e));\n}\n\nfunction mt(e, n, t, o) {\n const r = ((e, n, t, o) => {\n const r = ve(o);\n return we(e(n), t, r);\n })(e, t, n, o);\n return Yn(checkEpochNanoInBounds(r), t, n.calendar);\n}\n\nfunction St(e, n, t) {\n const o = e(n.calendar);\n return createPlainYearMonthSlots({\n ...n,\n ...convertToPlainYearMonth(o, t)\n });\n}\n\nfunction Ot(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction vt(e, n, t, o, r) {\n const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : Dt;\n return Yn(we(t(i), {\n ...o,\n ...s\n }), i, o.calendar);\n}\n\nfunction wt(e, n = Dt) {\n return ee(checkIsoDateTimeInBounds({\n ...e,\n ...n\n }));\n}\n\nfunction jt(e, n, t) {\n return convertToPlainYearMonth(e(n.calendar), t);\n}\n\nfunction Mt(e, n, t) {\n return convertToPlainMonthDay(e(n.calendar), t);\n}\n\nfunction _e(e, n, t, o) {\n return ((e, n, t) => convertToIso(e, n, di, de(t), li))(e(n.calendar), t, o);\n}\n\nfunction R(e, n, t, o) {\n return ((e, n, t) => convertToIso(e, n, pi, de(t), si))(e(n.calendar), t, o);\n}\n\nfunction Je(e, n, t, o, r) {\n const i = de(r), a = n(i.plainDate), s = e(i.timeZone);\n return Yn(we(t(s), {\n ...a,\n ...o\n }), s, a.calendar);\n}\n\nfunction Le(e, n) {\n return ee(checkIsoDateTimeInBounds({\n ...e,\n ...n\n }));\n}\n\nfunction De(e) {\n return _(checkEpochNanoInBounds(he(e, _r)));\n}\n\nfunction Pe(e) {\n return _(checkEpochNanoInBounds(he(e, be)));\n}\n\nfunction Ce(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e), Vr)));\n}\n\nfunction ge(e) {\n return _(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));\n}\n\nfunction pn(e, n, t = Dt) {\n const o = n.timeZone, r = e(o), i = {\n ...fn(n, r),\n ...t\n };\n return Yn(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);\n}\n\nfunction Tn(e, n, t) {\n const o = n.timeZone, r = e(o), i = {\n ...fn(n, r),\n ...t\n }, a = getPreferredCalendarSlot(n.calendar, t.calendar);\n return Yn(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);\n}\n\nfunction lt(e, n = Dt) {\n return ee({\n ...e,\n ...n\n });\n}\n\nfunction st(e, n) {\n return ee({\n ...e,\n ...n\n }, getPreferredCalendarSlot(e.calendar, n.calendar));\n}\n\nfunction it(e, n) {\n return {\n ...e,\n calendar: n\n };\n}\n\nfunction On(e, n) {\n return {\n ...e,\n timeZone: n\n };\n}\n\nfunction getPreferredCalendarSlot(e, n) {\n if (e === n) {\n return e;\n }\n const t = I(e), o = I(n);\n if (t === o || t === X) {\n return n;\n }\n if (o === X) {\n return e;\n }\n throw new RangeError(Er);\n}\n\nfunction createNativeOpsCreator(e, n) {\n return t => t === X ? e : t === gi || t === Ti ? Object.assign(Object.create(e), {\n id: t\n }) : Object.assign(Object.create(n), Aa(t));\n}\n\nfunction createOptionsTransformer(e, n, t) {\n const o = new Set(t);\n return r => (((e, n) => {\n for (const t of n) {\n if (t in e) {\n return 1;\n }\n }\n return 0;\n })(r = V(o, r), e) || Object.assign(r, n), t && (r.timeZone = Ta, [ \"full\", \"long\" ].includes(r.timeStyle) && (r.timeStyle = \"medium\")), \n r);\n}\n\nfunction e(e, n = qn) {\n const [t, , , o] = e;\n return (r, i = Ns, ...a) => {\n const s = n(o && o(...a), r, i, t), c = s.resolvedOptions();\n return [ s, ...toEpochMillis(e, c, a) ];\n };\n}\n\nfunction qn(e, n, t, o) {\n if (t = o(t), e) {\n if (void 0 !== t.timeZone) {\n throw new TypeError(Lr);\n }\n t.timeZone = e;\n }\n return new En(n, t);\n}\n\nfunction toEpochMillis(e, n, t) {\n const [, o, r] = e;\n return t.map((e => (e.calendar && ((e, n, t) => {\n if ((t || e !== X) && e !== n) {\n throw new RangeError(Er);\n }\n })(I(e.calendar), n.calendar, r), o(e, n))));\n}\n\nfunction An(e) {\n const n = Bn();\n return Ie(n, e.getOffsetNanosecondsFor(n));\n}\n\nfunction Bn() {\n return he(Date.now(), be);\n}\n\nfunction Nn() {\n return ys || (ys = (new En).resolvedOptions().timeZone);\n}\n\nconst expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, pr = \"Cannot convert Symbol to string\", hr = \"Invalid object\", numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, tn = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, noValidFields = e => \"No valid fields: \" + e.join(), Z = \"Invalid bag\", invalidChoice = (e, n, t) => invalidEntity(e, n) + \"; must be \" + Object.keys(t).join(), A = \"Cannot use valueOf\", P = \"Invalid calling context\", gr = \"Forbidden era/eraYear\", Dr = \"Mismatching era/eraYear\", Ir = \"Mismatching year/eraYear\", invalidEra = e => `Invalid era: ${e}`, missingYear = e => \"Missing year\" + (e ? \"/era/eraYear\" : \"\"), invalidMonthCode = e => `Invalid monthCode: ${e}`, Mr = \"Mismatching month/monthCode\", Nr = \"Missing month/monthCode\", yr = \"Cannot guess year\", Pr = \"Invalid leap month\", g = \"Invalid protocol\", vr = \"Invalid protocol results\", Er = \"Mismatching Calendars\", invalidCalendar = e => `Invalid Calendar: ${e}`, Fr = \"Mismatching TimeZones\", br = \"Forbidden ICU TimeZone\", wr = \"Out-of-bounds offset\", Br = \"Out-of-bounds TimeZone gap\", kr = \"Invalid TimeZone offset\", Yr = \"Ambiguous offset\", Cr = \"Out-of-bounds date\", Zr = \"Out-of-bounds duration\", Rr = \"Cannot mix duration signs\", zr = \"Missing relativeTo\", qr = \"Cannot use large units\", Ur = \"Required smallestUnit or largestUnit\", Ar = \"smallestUnit > largestUnit\", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, Ln = e => `Cannot format ${e}`, kn = \"Mismatching types for formatting\", Lr = \"Cannot specify TimeZone\", Wr = /*@__PURE__*/ E(b, ((e, n) => n)), jr = /*@__PURE__*/ E(b, ((e, n, t) => t)), xr = /*@__PURE__*/ E(padNumber, 2), $r = {\n nanosecond: 0,\n microsecond: 1,\n millisecond: 2,\n second: 3,\n minute: 4,\n hour: 5,\n day: 6,\n week: 7,\n month: 8,\n year: 9\n}, Et = /*@__PURE__*/ Object.keys($r), Gr = 864e5, Hr = 1e3, Vr = 1e3, be = 1e6, _r = 1e9, Jr = 6e10, Kr = 36e11, Qr = 864e11, Xr = [ 1, Vr, be, _r, Jr, Kr, Qr ], w = /*@__PURE__*/ Et.slice(0, 6), ei = /*@__PURE__*/ sortStrings(w), ni = [ \"offset\" ], ti = [ \"timeZone\" ], oi = /*@__PURE__*/ w.concat(ni), ri = /*@__PURE__*/ oi.concat(ti), ii = [ \"era\", \"eraYear\" ], ai = /*@__PURE__*/ ii.concat([ \"year\" ]), si = [ \"year\" ], ci = [ \"monthCode\" ], ui = /*@__PURE__*/ [ \"month\" ].concat(ci), li = [ \"day\" ], fi = /*@__PURE__*/ ui.concat(si), di = /*@__PURE__*/ ci.concat(si), en = /*@__PURE__*/ li.concat(fi), mi = /*@__PURE__*/ li.concat(ui), pi = /*@__PURE__*/ li.concat(ci), hi = /*@__PURE__*/ jr(w, 0), X = \"iso8601\", gi = \"gregory\", Ti = \"japanese\", Di = {\n [gi]: {\n bce: -1,\n ce: 0\n },\n [Ti]: {\n bce: -1,\n ce: 0,\n meiji: 1867,\n taisho: 1911,\n showa: 1925,\n heisei: 1988,\n reiwa: 2018\n },\n ethioaa: {\n era0: 0\n },\n ethiopic: {\n era0: 0,\n era1: 5500\n },\n coptic: {\n era0: -1,\n era1: 0\n },\n roc: {\n beforeroc: -1,\n minguo: 0\n },\n buddhist: {\n be: 0\n },\n islamic: {\n ah: 0\n },\n indian: {\n saka: 0\n },\n persian: {\n ap: 0\n }\n}, Ii = {\n chinese: 13,\n dangi: 13,\n hebrew: -6\n}, m = /*@__PURE__*/ E(requireType, \"string\"), f = /*@__PURE__*/ E(requireType, \"boolean\"), Mi = /*@__PURE__*/ E(requireType, \"number\"), $ = /*@__PURE__*/ E(requireType, \"function\"), F = /*@__PURE__*/ Et.map((e => e + \"s\")), Ni = /*@__PURE__*/ sortStrings(F), yi = /*@__PURE__*/ F.slice(0, 6), Pi = /*@__PURE__*/ F.slice(6), vi = /*@__PURE__*/ Pi.slice(1), Ei = /*@__PURE__*/ Wr(F), Si = /*@__PURE__*/ jr(F, 0), Fi = /*@__PURE__*/ jr(yi, 0), bi = /*@__PURE__*/ E(zeroOutProps, F), j = [ \"isoNanosecond\", \"isoMicrosecond\", \"isoMillisecond\", \"isoSecond\", \"isoMinute\", \"isoHour\" ], Oi = [ \"isoDay\", \"isoMonth\", \"isoYear\" ], wi = /*@__PURE__*/ j.concat(Oi), Bi = /*@__PURE__*/ sortStrings(Oi), ki = /*@__PURE__*/ sortStrings(j), Yi = /*@__PURE__*/ sortStrings(wi), Dt = /*@__PURE__*/ jr(ki, 0), Ci = /*@__PURE__*/ E(zeroOutProps, wi), En = Intl.DateTimeFormat, Zi = \"en-GB\", Ri = 1e8, zi = Ri * Gr, qi = [ Ri, 0 ], Ui = [ -Ri, 0 ], Ai = 275760, Li = -271821, Wi = 1970, ji = 1972, xi = 12, $i = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), Gi = /*@__PURE__*/ Jn(computeJapaneseEraParts, WeakMap), Hi = \"smallestUnit\", Vi = \"unit\", _i = \"roundingIncrement\", Ji = \"fractionalSecondDigits\", Ki = \"relativeTo\", Qi = {\n constrain: 0,\n reject: 1\n}, Xi = /*@__PURE__*/ Object.keys(Qi), ea = {\n compatible: 0,\n reject: 1,\n earlier: 2,\n later: 3\n}, na = {\n reject: 0,\n use: 1,\n prefer: 2,\n ignore: 3\n}, ta = {\n auto: 0,\n never: 1,\n critical: 2,\n always: 3\n}, oa = {\n auto: 0,\n never: 1,\n critical: 2\n}, ra = {\n auto: 0,\n never: 1\n}, ia = {\n floor: 0,\n halfFloor: 1,\n ceil: 2,\n halfCeil: 3,\n trunc: 4,\n halfTrunc: 5,\n expand: 6,\n halfExpand: 7,\n halfEven: 8\n}, aa = /*@__PURE__*/ E(refineUnitOption, Hi), sa = /*@__PURE__*/ E(refineUnitOption, \"largestUnit\"), ca = /*@__PURE__*/ E(refineUnitOption, Vi), ua = /*@__PURE__*/ E(refineChoiceOption, \"overflow\", Qi), la = /*@__PURE__*/ E(refineChoiceOption, \"disambiguation\", ea), fa = /*@__PURE__*/ E(refineChoiceOption, \"offset\", na), da = /*@__PURE__*/ E(refineChoiceOption, \"calendarName\", ta), ma = /*@__PURE__*/ E(refineChoiceOption, \"timeZoneName\", oa), pa = /*@__PURE__*/ E(refineChoiceOption, \"offset\", ra), ha = /*@__PURE__*/ E(refineChoiceOption, \"roundingMode\", ia), L = \"PlainYearMonth\", q = \"PlainMonthDay\", J = \"PlainDate\", We = \"PlainDateTime\", xe = \"PlainTime\", Te = \"ZonedDateTime\", Oe = \"Instant\", qt = \"Duration\", ga = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], Ta = \"UTC\", Da = 5184e3, Ia = /*@__PURE__*/ isoArgsToEpochSec(1847), Ma = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), Na = /0+$/, fn = /*@__PURE__*/ Jn(_zonedEpochSlotsToIso, WeakMap), ya = 2 ** 32 - 1, ie = /*@__PURE__*/ Jn((e => {\n const n = getTimeZoneEssence(e);\n return \"object\" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);\n}));\n\nclass FixedTimeZone {\n constructor(e) {\n this.v = e;\n }\n getOffsetNanosecondsFor() {\n return this.v;\n }\n getPossibleInstantsFor(e) {\n return [ isoToEpochNanoWithOffset(e, this.v) ];\n }\n l() {}\n}\n\nclass IntlTimeZone {\n constructor(e) {\n this.$ = (e => {\n function getOffsetSec(e) {\n const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);\n return c === u ? c : pinch(t(a, s), c, u, e);\n }\n function pinch(n, t, o, r) {\n let i, a;\n for (;(void 0 === r || void 0 === (i = r < n[0] ? t : r >= n[1] ? o : void 0)) && (a = n[1] - n[0]); ) {\n const t = n[0] + Math.floor(a / 2);\n e(t) === o ? n[1] = t : n[0] = t + 1;\n }\n return i;\n }\n const n = Jn(e), t = Jn(createSplitTuple);\n let o = Ia, r = Ma;\n return {\n G(e) {\n const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;\n if (n === t) {\n return [ o ];\n }\n const i = getOffsetSec(o);\n return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];\n },\n V: getOffsetSec,\n l(e, i) {\n const a = clampNumber(e, o, r);\n let [s, c] = computePeriod(a);\n const u = Da * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a, \n 0);\n for (;l(); ) {\n const o = n(s), r = n(c);\n if (o !== r) {\n const n = t(s, c);\n pinch(n, o, r);\n const a = n[0];\n if ((compareNumbers(a, e) || 1) === i) {\n return a;\n }\n }\n s += u, c += u;\n }\n }\n };\n })((e => n => {\n const t = hashIntlFormatParts(e, n * Hr);\n return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;\n })(e));\n }\n getOffsetNanosecondsFor(e) {\n return this.$.V(epochNanoToSec(e)) * _r;\n }\n getPossibleInstantsFor(e) {\n const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * be + o.isoMicrosecond * Vr + o.isoNanosecond ];\n var o;\n return this.$.G(n).map((e => checkEpochNanoInBounds(moveBigNano(he(e, _r), t))));\n }\n l(e, n) {\n const [t, o] = epochNanoToSecMod(e), r = this.$.l(t + (n > 0 || o ? 1 : 0), n);\n if (void 0 !== r) {\n return he(r, _r);\n }\n }\n}\n\nconst Pa = \"([+\u2212-])\", va = \"(?:[.,](\\\\d{1,9}))?\", Ea = `(?:(?:${Pa}(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})`, Sa = \"(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})\" + va + \")?)?\", Fa = Pa + Sa, ba = Ea + \"-?(\\\\d{2})(?:[T ]\" + Sa + \"(Z|\" + Fa + \")?)?\", Oa = \"\\\\[(!?)([^\\\\]]*)\\\\]\", wa = `((?:${Oa}){0,9})`, Ba = /*@__PURE__*/ createRegExp(Ea + wa), ka = /*@__PURE__*/ createRegExp(\"(?:--)?(\\\\d{2})-?(\\\\d{2})\" + wa), Ya = /*@__PURE__*/ createRegExp(ba + wa), Ca = /*@__PURE__*/ createRegExp(\"T?\" + Sa + \"(?:\" + Fa + \")?\" + wa), Za = /*@__PURE__*/ createRegExp(Fa), Ra = /*@__PURE__*/ new RegExp(Oa, \"g\"), za = /*@__PURE__*/ createRegExp(`${Pa}?P(\\\\d+Y)?(\\\\d+M)?(\\\\d+W)?(\\\\d+D)?(?:T(?:(\\\\d+)${va}H)?(?:(\\\\d+)${va}M)?(?:(\\\\d+)${va}S)?)?`), qa = /*@__PURE__*/ Jn((e => new En(Zi, {\n timeZone: e,\n era: \"short\",\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n}))), Ua = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/, Aa = /*@__PURE__*/ Jn(createIntlCalendar), La = /*@__PURE__*/ Jn((e => new En(Zi, {\n calendar: e,\n timeZone: Ta,\n era: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\"\n}))), Wa = /^M(\\d{2})(L?)$/, ja = {\n era: toStringViaPrimitive,\n eraYear: toInteger,\n year: toInteger,\n month: toPositiveInteger,\n monthCode: toStringViaPrimitive,\n day: toPositiveInteger\n}, xa = /*@__PURE__*/ jr(w, toInteger), $a = /*@__PURE__*/ jr(F, toStrictInteger), Ga = /*@__PURE__*/ Object.assign({}, ja, xa, $a, {\n offset: toStringViaPrimitive\n}), Ha = /*@__PURE__*/ E(remapProps, w, j), Va = {\n dateAdd(e, n, t) {\n const o = H(t);\n let r, {years: i, months: a, weeks: s, days: c} = n;\n if (c += durationFieldsToBigNano(n, 5)[0], i || a) {\n r = ((e, n, t, o, r) => {\n let [i, a, s] = e.h(n);\n if (t) {\n const [n, o] = e.I(i, a);\n i += t, a = monthCodeNumberToMonth(n, o, e.U(i)), a = clampEntity(\"month\", a, 1, e.L(i), r);\n }\n return o && ([i, a] = e._(i, a, o)), s = clampEntity(\"day\", s, 1, e.j(i, a), r), \n e.q(i, a, s);\n })(this, e, i, a, o);\n } else {\n if (!s && !c) {\n return e;\n }\n r = isoToEpochMilli(e);\n }\n return r += (7 * s + c) * Gr, checkIsoDateInBounds(epochMilliToIso(r));\n },\n dateUntil(e, n, t) {\n if (t <= 7) {\n let o = 0, r = diffDays({\n ...e,\n ...Dt\n }, {\n ...n,\n ...Dt\n });\n return 7 === t && ([o, r] = divModTrunc(r, 7)), {\n ...Si,\n weeks: o,\n days: r\n };\n }\n const o = this.h(e), r = this.h(n);\n let [i, a, s] = ((e, n, t, o, r, i, a) => {\n let s = r - n, c = i - t, u = a - o;\n if (s || c) {\n const l = Math.sign(s || c);\n let f = e.j(r, i), d = 0;\n if (Math.sign(u) === -l) {\n const o = f;\n [r, i] = e._(r, i, -l), s = r - n, c = i - t, f = e.j(r, i), d = l < 0 ? -o : f;\n }\n if (u = a - Math.min(o, f) + d, s) {\n const [o, a] = e.I(n, t), [u, f] = e.I(r, i);\n if (c = u - o || Number(f) - Number(a), Math.sign(c) === -l) {\n const t = l < 0 && -e.L(r);\n s = (r -= l) - n, c = i - monthCodeNumberToMonth(o, a, e.U(r)) + (t || e.L(r));\n }\n }\n }\n return [ s, c, u ];\n })(this, ...o, ...r);\n return 8 === t && (a += this.J(i, o[0]), i = 0), {\n ...Si,\n years: i,\n months: a,\n days: s\n };\n },\n dateFromFields(e, n) {\n const t = H(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);\n return v(checkIsoDateInBounds(this.P(o, r, i)), this.id || X);\n },\n yearMonthFromFields(e, n) {\n const t = H(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);\n return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.P(o, r, 1)), this.id || X);\n },\n monthDayFromFields(e, n) {\n const t = H(n), o = !this.id, {monthCode: r, year: i, month: a} = e;\n let s, c, u, l, f;\n if (void 0 !== r) {\n [s, c] = parseMonthCode(r), f = getDefinedProp(e, \"day\");\n const n = this.N(s, c, f);\n if (!n) {\n throw new RangeError(yr);\n }\n if ([u, l] = n, void 0 !== a && a !== l) {\n throw new RangeError(Mr);\n }\n o && (l = clampEntity(\"month\", l, 1, xi, 1), f = clampEntity(\"day\", f, 1, computeIsoDaysInMonth(void 0 !== i ? i : u, l), t));\n } else {\n u = void 0 === i && o ? ji : refineYear(this, e), l = refineMonth(this, e, u, t), \n f = refineDay(this, e, l, u, t);\n const n = this.U(u);\n c = l === n, s = monthToMonthCodeNumber(l, n);\n const r = this.N(s, c, f);\n if (!r) {\n throw new RangeError(yr);\n }\n [u, l] = r;\n }\n return createPlainMonthDaySlots(checkIsoDateInBounds(this.P(u, l, f)), this.id || X);\n },\n fields(e) {\n return getCalendarEraOrigins(this) && e.includes(\"year\") ? [ ...e, ...ii ] : e;\n },\n mergeFields(e, n) {\n const t = Object.assign(Object.create(null), e);\n return spliceFields(t, n, ui), getCalendarEraOrigins(this) && (spliceFields(t, n, ai), \n this.id === Ti && spliceFields(t, n, mi, ii)), t;\n },\n inLeapYear(e) {\n const [n] = this.h(e);\n return this.K(n);\n },\n monthsInYear(e) {\n const [n] = this.h(e);\n return this.L(n);\n },\n daysInMonth(e) {\n const [n, t] = this.h(e);\n return this.j(n, t);\n },\n daysInYear(e) {\n const [n] = this.h(e);\n return this.X(n);\n },\n dayOfYear: computeNativeDayOfYear,\n era(e) {\n return this.ee(e)[0];\n },\n eraYear(e) {\n return this.ee(e)[1];\n },\n monthCode(e) {\n const [n, t] = this.h(e), [o, r] = this.I(n, t);\n return ((e, n) => \"M\" + xr(e) + (n ? \"L\" : \"\"))(o, r);\n },\n dayOfWeek: computeIsoDayOfWeek,\n daysInWeek() {\n return 7;\n }\n}, _a = {\n dayOfYear: computeNativeDayOfYear,\n h: computeIsoDateParts,\n q: isoArgsToEpochMilli\n}, Ja = /*@__PURE__*/ Object.assign({}, _a, {\n weekOfYear: computeNativeWeekOfYear,\n yearOfWeek: computeNativeYearOfWeek,\n R(e) {\n function computeWeekShift(e) {\n return (7 - e < n ? 7 : 0) - e;\n }\n function computeWeeksInYear(e) {\n const n = computeIsoDaysInYear(l + e), t = e || 1, o = computeWeekShift(modFloor(a + n * t, 7));\n return c = (n + (o - s) * t) / 7;\n }\n const n = this.id ? 1 : 4, t = computeIsoDayOfWeek(e), o = this.dayOfYear(e), r = modFloor(t - 1, 7), i = o - 1, a = modFloor(r - i, 7), s = computeWeekShift(a);\n let c, u = Math.floor((i - s) / 7) + 1, l = e.isoYear;\n return u ? u > computeWeeksInYear(0) && (u = 1, l++) : (u = computeWeeksInYear(-1), \n l--), [ u, l, c ];\n }\n}), Ka = {\n dayOfYear: computeNativeDayOfYear,\n h: computeIntlDateParts,\n q: computeIntlEpochMilli,\n weekOfYear: computeNativeWeekOfYear,\n yearOfWeek: computeNativeYearOfWeek,\n R() {\n return [];\n }\n}, Y = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, Va, Ja, {\n h: computeIsoDateParts,\n ee(e) {\n return this.id === gi ? computeGregoryEraParts(e) : this.id === Ti ? Gi(e) : [];\n },\n I: (e, n) => [ n, 0 ],\n N(e, n) {\n if (!n) {\n return [ ji, e ];\n }\n },\n K: computeIsoInLeapYear,\n U() {},\n L: computeIsoMonthsInYear,\n J: e => e * xi,\n j: computeIsoDaysInMonth,\n X: computeIsoDaysInYear,\n P: (e, n, t) => ({\n isoYear: e,\n isoMonth: n,\n isoDay: t\n }),\n q: isoArgsToEpochMilli,\n _: (e, n, t) => (e += divTrunc(t, xi), (n += modTrunc(t, xi)) < 1 ? (e--, n += xi) : n > xi && (e++, \n n -= xi), [ e, n ]),\n year(e) {\n return e.isoYear;\n },\n month(e) {\n return e.isoMonth;\n },\n day: e => e.isoDay\n}), /*@__PURE__*/ Object.assign({}, Va, Ka, {\n h: computeIntlDateParts,\n ee(e) {\n const n = this.O(e);\n return [ n.era, n.eraYear ];\n },\n I(e, n) {\n const t = computeIntlLeapMonth.call(this, e);\n return [ monthToMonthCodeNumber(n, t), t === n ];\n },\n N(e, n, t) {\n let [o, r, i] = computeIntlDateParts.call(this, {\n isoYear: ji,\n isoMonth: xi,\n isoDay: 31\n });\n const a = computeIntlLeapMonth.call(this, o), s = r === a;\n 1 === (compareNumbers(e, monthToMonthCodeNumber(r, a)) || compareNumbers(Number(n), Number(s)) || compareNumbers(t, i)) && o--;\n for (let r = 0; r < 100; r++) {\n const i = o - r, a = computeIntlLeapMonth.call(this, i), s = monthCodeNumberToMonth(e, n, a);\n if (n === (s === a) && t <= computeIntlDaysInMonth.call(this, i, s)) {\n return [ i, s ];\n }\n }\n },\n K(e) {\n const n = computeIntlDaysInYear.call(this, e);\n return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);\n },\n U: computeIntlLeapMonth,\n L: computeIntlMonthsInYear,\n J(e, n) {\n const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;\n let i = 0;\n for (let e = n; e !== t; e += o) {\n i += computeIntlMonthsInYear.call(this, e + r);\n }\n return i;\n },\n j: computeIntlDaysInMonth,\n X: computeIntlDaysInYear,\n P(e, n, t) {\n return epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t));\n },\n q: computeIntlEpochMilli,\n _(e, n, t) {\n if (t) {\n if (n += t, !Number.isSafeInteger(n)) {\n throw new RangeError(Cr);\n }\n if (t < 0) {\n for (;n < 1; ) {\n n += computeIntlMonthsInYear.call(this, --e);\n }\n } else {\n let t;\n for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {\n n -= t, e++;\n }\n }\n }\n return [ e, n ];\n },\n year(e) {\n return this.O(e).year;\n },\n month(e) {\n const {year: n, F: t} = this.O(e), {C: o} = this.B(n);\n return o[t] + 1;\n },\n day(e) {\n return this.O(e).day;\n }\n})), Qa = \"numeric\", Xa = [ \"timeZoneName\" ], es = {\n month: Qa,\n day: Qa\n}, ns = {\n year: Qa,\n month: Qa\n}, ts = /*@__PURE__*/ Object.assign({}, ns, {\n day: Qa\n}), os = {\n hour: Qa,\n minute: Qa,\n second: Qa\n}, rs = /*@__PURE__*/ Object.assign({}, ts, os), is = /*@__PURE__*/ Object.assign({}, rs, {\n timeZoneName: \"short\"\n}), as = /*@__PURE__*/ Object.keys(ns), ss = /*@__PURE__*/ Object.keys(es), cs = /*@__PURE__*/ Object.keys(ts), us = /*@__PURE__*/ Object.keys(os), ls = [ \"dateStyle\" ], fs = /*@__PURE__*/ as.concat(ls), ds = /*@__PURE__*/ ss.concat(ls), ms = /*@__PURE__*/ cs.concat(ls, [ \"weekday\" ]), ps = /*@__PURE__*/ us.concat([ \"dayPeriod\", \"timeStyle\" ]), hs = /*@__PURE__*/ ms.concat(ps), gs = /*@__PURE__*/ hs.concat(Xa), Ts = /*@__PURE__*/ Xa.concat(ps), Ds = /*@__PURE__*/ Xa.concat(ms), Is = /*@__PURE__*/ Xa.concat([ \"day\", \"weekday\" ], ps), Ms = /*@__PURE__*/ Xa.concat([ \"year\", \"weekday\" ], ps), Ns = {}, t = [ /*@__PURE__*/ createOptionsTransformer(hs, rs), y ], s = [ /*@__PURE__*/ createOptionsTransformer(gs, is), y, 0, (e, n) => {\n const t = I(e.timeZone);\n if (n && I(n.timeZone) !== t) {\n throw new RangeError(Fr);\n }\n return t;\n} ], n = [ /*@__PURE__*/ createOptionsTransformer(hs, rs, Xa), isoToEpochMilli ], o = [ /*@__PURE__*/ createOptionsTransformer(ms, ts, Ts), isoToEpochMilli ], r = [ /*@__PURE__*/ createOptionsTransformer(ps, os, Ds), e => isoTimeFieldsToNano(e) / be ], a = [ /*@__PURE__*/ createOptionsTransformer(fs, ns, Is), isoToEpochMilli, 1 ], i = [ /*@__PURE__*/ createOptionsTransformer(ds, es, Ms), isoToEpochMilli, 1 ];\n\nlet ys;\n\nexport { qt as DurationBranding, Oe as InstantBranding, J as PlainDateBranding, We as PlainDateTimeBranding, q as PlainMonthDayBranding, xe as PlainTimeBranding, L as PlainYearMonthBranding, En as RawDateTimeFormat, Te as ZonedDateTimeBranding, Rt as absDuration, Wt as addDurations, oe as bigNanoToNumber, E as bindArgs, mn as buildZonedIsoFields, te as compareBigNanos, $t as compareDurations, Ze as compareInstants, rt as compareIsoDateFields, gt as compareIsoDateTimeFields, He as compareIsoTimeFields, yn as compareZonedDateTimes, dn as computeZonedHoursInDay, Cn as computeZonedStartOfDay, Lt as constructDurationSlots, Se as constructInstantSlots, Nt as constructPlainDateSlots, pt as constructPlainDateTimeSlots, G as constructPlainMonthDaySlots, ke as constructPlainTimeSlots, tt as constructPlainYearMonthSlots, vn as constructZonedDateTimeSlots, U as copyOptions, Vt as createDurationSlots, qn as createFormatForPrep, e as createFormatPrepper, O as createGetterDescriptors, _ as createInstantSlots, D as createNameDescriptors, Y as createNativeStandardOps, v as createPlainDateSlots, ee as createPlainDateTimeSlots, Ge as createPlainTimeSlots, p as createPropDescriptors, h as createStringTagDescriptors, Yn as createZonedDateTimeSlots, o as dateConfig, en as dateFieldNamesAlpha, n as dateTimeConfig, re as diffBigNanos, le as diffInstants, ut as diffPlainDateTimes, Ft as diffPlainDates, Ae as diffPlainTimes, Xe as diffPlainYearMonth, Dn as diffZonedDateTimes, F as durationFieldNamesAsc, kt as durationWithFields, Ce as epochMicroToInstant, Pe as epochMilliToInstant, ge as epochNanoToInstant, Ie as epochNanoToIso, De as epochSecToInstant, V as excludePropsByName, nn as excludeUndefinedProps, tn as forbiddenField, A as forbiddenValueOf, zt as formatDurationIso, me as formatInstantIso, Fe as formatOffsetNano, yt as formatPlainDateIso, Tt as formatPlainDateTimeIso, W as formatPlainMonthDayIso, qe as formatPlainTimeIso, et as formatPlainYearMonthIso, In as formatZonedDateTimeIso, Bn as getCurrentEpochNano, An as getCurrentIsoDateTime, Nn as getCurrentTimeZoneId, Jt as getDurationBlank, N as getEpochMicro, y as getEpochMilli, B as getEpochNano, M as getEpochSec, I as getId, ln as getRequiredDateFields, cn as getRequiredMonthDayFields, un as getRequiredYearMonthFields, we as getSingleInstantFor, C as hasAllPropsByName, t as instantConfig, fe as instantToZonedDateTime, ue as instantsEqual, Z as invalidBag, P as invalidCallingContext, Ln as invalidFormatType, g as invalidProtocol, z as isObjectLike, je as isTimeZoneSlotsEqual, X as isoCalendarId, Dt as isoTimeFieldDefaults, j as isoTimeFieldNamesAsc, b as mapPropNames, T as mapProps, Jn as memoize, kn as mismatchingFormatTypes, i as monthDayConfig, se as moveInstant, bt as movePlainDate, ct as movePlainDateTime, Ye as movePlainTime, Qe as movePlainYearMonth, hn as moveZonedDateTime, be as nanoInMilli, xt as negateDuration, he as numberToBigNano, sn as parseCalendarId, Kt as parseDuration, pe as parseInstant, At as parsePlainDate, Ct as parsePlainDateTime, Q as parsePlainMonthDay, ze as parsePlainTime, ot as parsePlainYearMonth, Xt as parseRelativeToSlots, Ne as parseTimeZoneId, Mn as parseZonedDateTime, Ot as plainDateTimeToPlainMonthDay, St as plainDateTimeToPlainYearMonth, mt as plainDateTimeToZonedDateTime, at as plainDateTimeWithFields, st as plainDateTimeWithPlainDate, lt as plainDateTimeWithPlainTime, ft as plainDateTimesEqual, wt as plainDateToPlainDateTime, Mt as plainDateToPlainMonthDay, jt as plainDateToPlainYearMonth, vt as plainDateToZonedDateTime, Zt as plainDateWithFields, It as plainDatesEqual, R as plainMonthDayToPlainDate, k as plainMonthDayWithFields, x as plainMonthDaysEqual, Le as plainTimeToPlainDateTime, Je as plainTimeToZonedDateTime, Be as plainTimeWithFields, Ve as plainTimesEqual, _e as plainYearMonthToPlainDate, Ke as plainYearMonthWithFields, $e as plainYearMonthsEqual, Vn as pluckProps, ie as queryNativeTimeZone, rn as refineCalendarId, _t as refineDateDiffOptions, Ht as refineDurationBag, ve as refineEpochDisambigOptions, Qt as refineMaybeZonedDateTimeBag, H as refineOverflowOptions, Yt as refinePlainDateBag, Pt as refinePlainDateTimeBag, K as refinePlainMonthDayBag, Ue as refinePlainTimeBag, nt as refinePlainYearMonthBag, Me as refineTimeZoneId, jn as refineZonedDateTimeBag, wn as refineZonedFieldOptions, f as requireBoolean, $ as requireFunction, u as requireInteger, c as requireIntegerOrUndefined, on as requireNonNullish, de as requireObjectLike, d as requirePositiveInteger, S as requirePositiveIntegerOrUndefined, m as requireString, l as requireStringOrUndefined, an as resolveCalendarId, ye as resolveTimeZoneId, Gt as roundDuration, ce as roundInstant, dt as roundPlainDateTime, Ee as roundPlainTime, Pn as roundZonedDateTime, it as slotsWithCalendar, On as slotsWithTimeZone, r as timeConfig, w as timeFieldNamesAsc, Ut as totalDuration, Et as unitNamesAsc, ne as validateTimeZoneGap, ae as validateTimeZoneOffset, a as yearMonthConfig, s as zonedConfig, Zn as zonedDateTimeToInstant, Bt as zonedDateTimeToPlainDate, ht as zonedDateTimeToPlainDateTime, Fn as zonedDateTimeToPlainMonthDay, Re as zonedDateTimeToPlainTime, bn as zonedDateTimeToPlainYearMonth, Sn as zonedDateTimeWithFields, Tn as zonedDateTimeWithPlainDate, pn as zonedDateTimeWithPlainTime, gn as zonedDateTimesEqual, fn as zonedEpochSlotsToIso };\n", "function createSlotClass(e, t, n, o, r) {\n function Class(...e) {\n if (!(this instanceof Class)) {\n throw new TypeError(P);\n }\n oo(this, t(...e));\n }\n function bindMethod(e, t) {\n return Object.defineProperties((function(...t) {\n return e.call(this, getSpecificSlots(this), ...t);\n }), D(t));\n }\n function getSpecificSlots(t) {\n const n = no(t);\n if (!n || n.branding !== e) {\n throw new TypeError(P);\n }\n return n;\n }\n return Object.defineProperties(Class.prototype, {\n ...O(T(bindMethod, n)),\n ...p(T(bindMethod, o)),\n ...h(\"Temporal.\" + e)\n }), Object.defineProperties(Class, {\n ...p(r),\n ...D(e)\n }), [ Class, e => {\n const t = Object.create(Class.prototype);\n return oo(t, e), t;\n }, getSpecificSlots ];\n}\n\nfunction createProtocolValidator(e) {\n return e = e.concat(\"id\").sort(), t => {\n if (!C(t, e)) {\n throw new TypeError(g);\n }\n return t;\n };\n}\n\nfunction rejectInvalidBag(e) {\n if (no(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {\n throw new TypeError(Z);\n }\n return e;\n}\n\nfunction createCalendarFieldMethods(e, t) {\n const n = {};\n for (const o in e) {\n n[o] = ({o: e}, n) => {\n const r = no(n) || {}, {branding: a} = r, i = a === J || t.includes(a) ? r : toPlainDateSlots(n);\n return e[o](i);\n };\n }\n return n;\n}\n\nfunction createCalendarGetters(e) {\n const t = {};\n for (const n in e) {\n t[n] = e => {\n const {calendar: t} = e;\n return (o = t, \"string\" == typeof o ? Y(o) : (r = o, Object.assign(Object.create(co), {\n i: r\n })))[n](e);\n var o, r;\n };\n }\n return t;\n}\n\nfunction neverValueOf() {\n throw new TypeError(A);\n}\n\nfunction createCalendarFromSlots({calendar: e}) {\n return \"string\" == typeof e ? new lr(e) : e;\n}\n\nfunction toPlainMonthDaySlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n if (n && n.branding === q) {\n return H(t), n;\n }\n const o = extractCalendarSlotFromBag(e);\n return K(Qo(o || X), !o, e, t);\n }\n const n = Q(Y, e);\n return H(t), n;\n}\n\nfunction getOffsetNanosecondsForAdapter(e, t, n) {\n return o = t.call(e, Co(_(n))), ae(u(o));\n var o;\n}\n\nfunction createAdapterOps(e, t = ho) {\n const n = Object.keys(t).sort(), o = {};\n for (const r of n) {\n o[r] = E(t[r], e, $(e[r]));\n }\n return o;\n}\n\nfunction createTimeZoneOps(e, t) {\n return \"string\" == typeof e ? ie(e) : createAdapterOps(e, t);\n}\n\nfunction createTimeZoneOffsetOps(e) {\n return createTimeZoneOps(e, Do);\n}\n\nfunction toInstantSlots(e) {\n if (z(e)) {\n const t = no(e);\n if (t) {\n switch (t.branding) {\n case Oe:\n return t;\n\n case Te:\n return _(t.epochNanoseconds);\n }\n }\n }\n return pe(e);\n}\n\nfunction toTemporalInstant() {\n return Co(_(he(this.valueOf(), be)));\n}\n\nfunction getImplTransition(e, t, n) {\n const o = t.l(toInstantSlots(n).epochNanoseconds, e);\n return o ? Co(_(o)) : null;\n}\n\nfunction refineTimeZoneSlot(e) {\n return z(e) ? (no(e) || {}).timeZone || Fo(e) : (e => ye(Ne(m(e))))(e);\n}\n\nfunction toPlainTimeSlots(e, t) {\n if (z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case xe:\n return H(t), n;\n\n case We:\n return H(t), Ge(n);\n\n case Te:\n return H(t), Re(createTimeZoneOffsetOps, n);\n }\n return Ue(e, t);\n }\n return H(t), ze(e);\n}\n\nfunction optionalToPlainTimeFields(e) {\n return void 0 === e ? void 0 : toPlainTimeSlots(e);\n}\n\nfunction toPlainYearMonthSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n return n && n.branding === L ? (H(t), n) : nt(Ho(getCalendarSlotFromBag(e)), e, t);\n }\n const n = ot(Y, e);\n return H(t), n;\n}\n\nfunction toPlainDateTimeSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case We:\n return H(t), n;\n\n case J:\n return H(t), ee({\n ...n,\n ...Dt\n });\n\n case Te:\n return H(t), ht(createTimeZoneOffsetOps, n);\n }\n return Pt(Ko(getCalendarSlotFromBag(e)), e, t);\n }\n const n = Ct(e);\n return H(t), n;\n}\n\nfunction toPlainDateSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e) || {};\n switch (n.branding) {\n case J:\n return H(t), n;\n\n case We:\n return H(t), v(n);\n\n case Te:\n return H(t), Bt(createTimeZoneOffsetOps, n);\n }\n return Yt(Ko(getCalendarSlotFromBag(e)), e, t);\n }\n const n = At(e);\n return H(t), n;\n}\n\nfunction dayAdapter(e, t, n) {\n return d(t.call(e, Yo(v(n, e))));\n}\n\nfunction createCompoundOpsCreator(e) {\n return t => \"string\" == typeof t ? Y(t) : ((e, t) => {\n const n = Object.keys(t).sort(), o = {};\n for (const r of n) {\n o[r] = E(t[r], e, e[r]);\n }\n return o;\n })(t, e);\n}\n\nfunction toDurationSlots(e) {\n if (z(e)) {\n const t = no(e);\n return t && t.branding === qt ? t : Ht(e);\n }\n return Kt(e);\n}\n\nfunction refinePublicRelativeTo(e) {\n if (void 0 !== e) {\n if (z(e)) {\n const t = no(e) || {};\n switch (t.branding) {\n case Te:\n case J:\n return t;\n\n case We:\n return v(t);\n }\n const n = getCalendarSlotFromBag(e);\n return {\n ...Qt(refineTimeZoneSlot, createTimeZoneOps, Ko(n), e),\n calendar: n\n };\n }\n return Xt(e);\n }\n}\n\nfunction getCalendarSlotFromBag(e) {\n return extractCalendarSlotFromBag(e) || X;\n}\n\nfunction extractCalendarSlotFromBag(e) {\n const {calendar: t} = e;\n if (void 0 !== t) {\n return refineCalendarSlot(t);\n }\n}\n\nfunction refineCalendarSlot(e) {\n return z(e) ? (no(e) || {}).calendar || cr(e) : (e => an(sn(m(e))))(e);\n}\n\nfunction toZonedDateTimeSlots(e, t) {\n if (t = U(t), z(e)) {\n const n = no(e);\n if (n && n.branding === Te) {\n return wn(t), n;\n }\n const o = getCalendarSlotFromBag(e);\n return jn(refineTimeZoneSlot, createTimeZoneOps, Ko(o), o, e, t);\n }\n return Mn(e, t);\n}\n\nfunction adaptDateMethods(e) {\n return T((e => t => e(slotsToIso(t))), e);\n}\n\nfunction slotsToIso(e) {\n return fn(e, createTimeZoneOffsetOps);\n}\n\nfunction createDateTimeFormatClass() {\n const e = En.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(En), DateTimeFormat = function(e, t = {}) {\n if (!(this instanceof DateTimeFormat)) {\n return new DateTimeFormat(e, t);\n }\n Or.set(this, ((e, t = {}) => {\n const n = new En(e, t), o = n.resolvedOptions(), r = o.locale, a = Vn(Object.keys(t), o), i = Jn(createFormatPrepperForBranding), prepFormat = (...e) => {\n let t;\n const o = e.map(((e, n) => {\n const o = no(e), r = (o || {}).branding;\n if (n && t && t !== r) {\n throw new TypeError(kn);\n }\n return t = r, o;\n }));\n return t ? i(t)(r, a, ...o) : [ n, ...e ];\n };\n return prepFormat.u = n, prepFormat;\n })(e, t));\n };\n for (const e in t) {\n const n = t[e], o = e.startsWith(\"format\") && createFormatMethod(e);\n \"function\" == typeof n.value ? n.value = \"constructor\" === e ? DateTimeFormat : o || createProxiedMethod(e) : o && (n.get = function() {\n return o.bind(this);\n });\n }\n return n.prototype.value = Object.create(e, t), Object.defineProperties(DateTimeFormat, n), \n DateTimeFormat;\n}\n\nfunction createFormatMethod(e) {\n return function(...t) {\n const n = Or.get(this), [o, ...r] = n(...t);\n return o[e](...r);\n };\n}\n\nfunction createProxiedMethod(e) {\n return function(...t) {\n return Or.get(this).u[e](...t);\n };\n}\n\nfunction createFormatPrepperForBranding(t) {\n const n = xn[t];\n if (!n) {\n throw new TypeError(Ln(t));\n }\n return e(n, Jn(qn));\n}\n\nimport { createFormatPrepper as e, instantConfig as t, dateTimeConfig as n, dateConfig as o, timeConfig as r, yearMonthConfig as a, monthDayConfig as i, zonedConfig as s, requireStringOrUndefined as l, requireIntegerOrUndefined as c, requireInteger as u, requirePositiveInteger as d, requireBoolean as f, requireString as m, requirePositiveIntegerOrUndefined as S, createGetterDescriptors as O, mapProps as T, createPropDescriptors as p, createStringTagDescriptors as h, createNameDescriptors as D, invalidCallingContext as P, hasAllPropsByName as C, invalidProtocol as g, invalidBag as Z, mapPropNames as b, durationFieldNamesAsc as F, getId as I, createPlainDateSlots as v, timeFieldNamesAsc as w, isoTimeFieldNamesAsc as j, getEpochSec as M, getEpochMilli as y, getEpochMicro as N, getEpochNano as B, createNativeStandardOps as Y, forbiddenValueOf as A, bindArgs as E, excludePropsByName as V, PlainDateBranding as J, PlainYearMonthBranding as L, PlainMonthDayBranding as q, plainMonthDayWithFields as k, plainMonthDaysEqual as x, plainMonthDayToPlainDate as R, formatPlainMonthDayIso as W, constructPlainMonthDaySlots as G, copyOptions as U, isObjectLike as z, refineOverflowOptions as H, refinePlainMonthDayBag as K, parsePlainMonthDay as Q, isoCalendarId as X, requireFunction as $, createInstantSlots as _, createPlainDateTimeSlots as ee, compareBigNanos as te, validateTimeZoneGap as ne, bigNanoToNumber as oe, diffBigNanos as re, validateTimeZoneOffset as ae, queryNativeTimeZone as ie, moveInstant as se, diffInstants as le, roundInstant as ce, instantsEqual as ue, requireObjectLike as de, instantToZonedDateTime as fe, formatInstantIso as me, constructInstantSlots as Se, InstantBranding as Oe, ZonedDateTimeBranding as Te, parseInstant as pe, numberToBigNano as he, epochSecToInstant as De, epochMilliToInstant as Pe, epochMicroToInstant as Ce, epochNanoToInstant as ge, compareInstants as Ze, nanoInMilli as be, formatOffsetNano as Fe, epochNanoToIso as Ie, refineEpochDisambigOptions as ve, getSingleInstantFor as we, isTimeZoneSlotsEqual as je, refineTimeZoneId as Me, resolveTimeZoneId as ye, parseTimeZoneId as Ne, plainTimeWithFields as Be, movePlainTime as Ye, diffPlainTimes as Ae, roundPlainTime as Ee, plainTimesEqual as Ve, plainTimeToZonedDateTime as Je, plainTimeToPlainDateTime as Le, formatPlainTimeIso as qe, constructPlainTimeSlots as ke, PlainTimeBranding as xe, zonedDateTimeToPlainTime as Re, PlainDateTimeBranding as We, createPlainTimeSlots as Ge, refinePlainTimeBag as Ue, parsePlainTime as ze, compareIsoTimeFields as He, plainYearMonthWithFields as Ke, movePlainYearMonth as Qe, diffPlainYearMonth as Xe, plainYearMonthsEqual as $e, plainYearMonthToPlainDate as _e, formatPlainYearMonthIso as et, constructPlainYearMonthSlots as tt, refinePlainYearMonthBag as nt, parsePlainYearMonth as ot, compareIsoDateFields as rt, plainDateTimeWithFields as at, slotsWithCalendar as it, plainDateTimeWithPlainDate as st, plainDateTimeWithPlainTime as lt, movePlainDateTime as ct, diffPlainDateTimes as ut, roundPlainDateTime as dt, plainDateTimesEqual as ft, plainDateTimeToZonedDateTime as mt, plainDateTimeToPlainYearMonth as St, plainDateTimeToPlainMonthDay as Ot, formatPlainDateTimeIso as Tt, constructPlainDateTimeSlots as pt, zonedDateTimeToPlainDateTime as ht, isoTimeFieldDefaults as Dt, refinePlainDateTimeBag as Pt, parsePlainDateTime as Ct, compareIsoDateTimeFields as gt, plainDateWithFields as Zt, movePlainDate as bt, diffPlainDates as Ft, plainDatesEqual as It, plainDateToZonedDateTime as vt, plainDateToPlainDateTime as wt, plainDateToPlainYearMonth as jt, plainDateToPlainMonthDay as Mt, formatPlainDateIso as yt, constructPlainDateSlots as Nt, zonedDateTimeToPlainDate as Bt, refinePlainDateBag as Yt, parsePlainDate as At, unitNamesAsc as Et, createDurationSlots as Vt, getDurationBlank as Jt, constructDurationSlots as Lt, DurationBranding as qt, durationWithFields as kt, negateDuration as xt, absDuration as Rt, addDurations as Wt, roundDuration as Gt, totalDuration as Ut, formatDurationIso as zt, refineDurationBag as Ht, parseDuration as Kt, refineMaybeZonedDateTimeBag as Qt, parseRelativeToSlots as Xt, compareDurations as $t, refineDateDiffOptions as _t, dateFieldNamesAlpha as en, forbiddenField as tn, excludeUndefinedProps as nn, requireNonNullish as on, refineCalendarId as rn, resolveCalendarId as an, parseCalendarId as sn, getRequiredDateFields as ln, getRequiredMonthDayFields as cn, getRequiredYearMonthFields as un, computeZonedHoursInDay as dn, zonedEpochSlotsToIso as fn, buildZonedIsoFields as mn, zonedDateTimeWithFields as Sn, slotsWithTimeZone as On, zonedDateTimeWithPlainDate as Tn, zonedDateTimeWithPlainTime as pn, moveZonedDateTime as hn, diffZonedDateTimes as Dn, roundZonedDateTime as Pn, computeZonedStartOfDay as Cn, zonedDateTimesEqual as gn, zonedDateTimeToInstant as Zn, zonedDateTimeToPlainYearMonth as bn, zonedDateTimeToPlainMonthDay as Fn, formatZonedDateTimeIso as In, constructZonedDateTimeSlots as vn, refineZonedFieldOptions as wn, refineZonedDateTimeBag as jn, parseZonedDateTime as Mn, compareZonedDateTimes as yn, getCurrentTimeZoneId as Nn, getCurrentEpochNano as Bn, createZonedDateTimeSlots as Yn, getCurrentIsoDateTime as An, RawDateTimeFormat as En, pluckProps as Vn, memoize as Jn, invalidFormatType as Ln, createFormatForPrep as qn, mismatchingFormatTypes as kn } from \"./internal.js\";\n\nconst xn = {\n Instant: t,\n PlainDateTime: n,\n PlainDate: o,\n PlainTime: r,\n PlainYearMonth: a,\n PlainMonthDay: i\n}, Rn = /*@__PURE__*/ e(t), Wn = /*@__PURE__*/ e(s), Gn = /*@__PURE__*/ e(n), Un = /*@__PURE__*/ e(o), zn = /*@__PURE__*/ e(r), Hn = /*@__PURE__*/ e(a), Kn = /*@__PURE__*/ e(i), Qn = {\n era: l,\n eraYear: c,\n year: u,\n month: d,\n daysInMonth: d,\n daysInYear: d,\n inLeapYear: f,\n monthsInYear: d\n}, Xn = {\n monthCode: m\n}, $n = {\n day: d\n}, _n = {\n dayOfWeek: d,\n dayOfYear: d,\n weekOfYear: S,\n yearOfWeek: c,\n daysInWeek: d\n}, eo = /*@__PURE__*/ Object.assign({}, Qn, Xn, $n, _n), to = /*@__PURE__*/ new WeakMap, no = /*@__PURE__*/ to.get.bind(to), oo = /*@__PURE__*/ to.set.bind(to), ro = {\n ...createCalendarFieldMethods(Qn, [ L ]),\n ...createCalendarFieldMethods(_n, []),\n ...createCalendarFieldMethods(Xn, [ L, q ]),\n ...createCalendarFieldMethods($n, [ q ])\n}, ao = /*@__PURE__*/ createCalendarGetters(eo), io = /*@__PURE__*/ createCalendarGetters({\n ...Qn,\n ...Xn\n}), so = /*@__PURE__*/ createCalendarGetters({\n ...Xn,\n ...$n\n}), lo = {\n calendarId: e => I(e.calendar)\n}, co = /*@__PURE__*/ T(((e, t) => function(n) {\n const {i: o} = this;\n return e(o[t](Yo(v(n, o))));\n}), eo), uo = /*@__PURE__*/ b((e => t => t[e]), F.concat(\"sign\")), fo = /*@__PURE__*/ b(((e, t) => e => e[j[t]]), w), mo = {\n epochSeconds: M,\n epochMilliseconds: y,\n epochMicroseconds: N,\n epochNanoseconds: B\n}, So = /*@__PURE__*/ E(V, new Set([ \"branding\" ])), [Oo, To, po] = createSlotClass(q, E(G, refineCalendarSlot), {\n ...lo,\n ...so\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return To(k(_o, e, this, rejectInvalidBag(t), n));\n },\n equals: (e, t) => x(e, toPlainMonthDaySlots(t)),\n toPlainDate(e, t) {\n return Yo(R($o, e, this, t));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Kn(t, n, e);\n return o.format(r);\n },\n toString: W,\n toJSON: e => W(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => To(toPlainMonthDaySlots(e, t))\n}), ho = {\n getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,\n getPossibleInstantsFor(e, t, n) {\n const o = [ ...t.call(e, No(ee(n, X))) ].map((e => go(e).epochNanoseconds)), r = o.length;\n return r > 1 && (o.sort(te), ne(oe(re(o[0], o[r - 1])))), o;\n }\n}, Do = {\n getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter\n}, [Po, Co, go] = createSlotClass(Oe, Se, mo, {\n add: (e, t) => Co(se(0, e, toDurationSlots(t))),\n subtract: (e, t) => Co(se(1, e, toDurationSlots(t))),\n until: (e, t, n) => ar(le(0, e, toInstantSlots(t), n)),\n since: (e, t, n) => ar(le(1, e, toInstantSlots(t), n)),\n round: (e, t) => Co(ce(e, t)),\n equals: (e, t) => ue(e, toInstantSlots(t)),\n toZonedDateTime(e, t) {\n const n = de(t);\n return dr(fe(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));\n },\n toZonedDateTimeISO: (e, t) => dr(fe(e, refineTimeZoneSlot(t))),\n toLocaleString(e, t, n) {\n const [o, r] = Rn(t, n, e);\n return o.format(r);\n },\n toString: (e, t) => me(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),\n toJSON: e => me(refineTimeZoneSlot, createTimeZoneOffsetOps, e),\n valueOf: neverValueOf\n}, {\n from: e => Co(toInstantSlots(e)),\n fromEpochSeconds: e => Co(De(e)),\n fromEpochMilliseconds: e => Co(Pe(e)),\n fromEpochMicroseconds: e => Co(Ce(e)),\n fromEpochNanoseconds: e => Co(ge(e)),\n compare: (e, t) => Ze(toInstantSlots(e), toInstantSlots(t))\n}), [Zo, bo] = createSlotClass(\"TimeZone\", (e => {\n const t = Me(e);\n return {\n branding: \"TimeZone\",\n id: t,\n o: ie(t)\n };\n}), {\n id: e => e.id\n}, {\n getPossibleInstantsFor: ({o: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => Co(_(e)))),\n getOffsetNanosecondsFor: ({o: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),\n getOffsetStringFor(e, t) {\n const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, Do).getOffsetNanosecondsFor(n);\n return Fe(o);\n },\n getPlainDateTimeFor(e, t, n = X) {\n const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, Do).getOffsetNanosecondsFor(o);\n return No(ee(Ie(o, r), refineCalendarSlot(n)));\n },\n getInstantFor(e, t, n) {\n const o = toPlainDateTimeSlots(t), r = ve(n), a = createAdapterOps(this);\n return Co(_(we(a, o, r)));\n },\n getNextTransition: ({o: e}, t) => getImplTransition(1, e, t),\n getPreviousTransition: ({o: e}, t) => getImplTransition(-1, e, t),\n equals(e, t) {\n return !!je(this, refineTimeZoneSlot(t));\n },\n toString: e => e.id,\n toJSON: e => e.id\n}, {\n from(e) {\n const t = refineTimeZoneSlot(e);\n return \"string\" == typeof t ? new Zo(t) : t;\n }\n}), Fo = /*@__PURE__*/ createProtocolValidator(Object.keys(ho)), [Io, vo] = createSlotClass(xe, ke, fo, {\n getISOFields: So,\n with(e, t, n) {\n return vo(Be(this, rejectInvalidBag(t), n));\n },\n add: (e, t) => vo(Ye(0, e, toDurationSlots(t))),\n subtract: (e, t) => vo(Ye(1, e, toDurationSlots(t))),\n until: (e, t, n) => ar(Ae(0, e, toPlainTimeSlots(t), n)),\n since: (e, t, n) => ar(Ae(1, e, toPlainTimeSlots(t), n)),\n round: (e, t) => vo(Ee(e, t)),\n equals: (e, t) => Ve(e, toPlainTimeSlots(t)),\n toZonedDateTime: (e, t) => dr(Je(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),\n toPlainDateTime: (e, t) => No(Le(e, toPlainDateSlots(t))),\n toLocaleString(e, t, n) {\n const [o, r] = zn(t, n, e);\n return o.format(r);\n },\n toString: qe,\n toJSON: e => qe(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => vo(toPlainTimeSlots(e, t)),\n compare: (e, t) => He(toPlainTimeSlots(e), toPlainTimeSlots(t))\n}), [wo, jo, Mo] = createSlotClass(L, E(tt, refineCalendarSlot), {\n ...lo,\n ...io\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return jo(Ke(Xo, e, this, rejectInvalidBag(t), n));\n },\n add: (e, t, n) => jo(Qe(nr, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => jo(Qe(nr, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Xe(or, 0, e, toPlainYearMonthSlots(t), n)),\n since: (e, t, n) => ar(Xe(or, 1, e, toPlainYearMonthSlots(t), n)),\n equals: (e, t) => $e(e, toPlainYearMonthSlots(t)),\n toPlainDate(e, t) {\n return Yo(_e($o, e, this, t));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Hn(t, n, e);\n return o.format(r);\n },\n toString: et,\n toJSON: e => et(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => jo(toPlainYearMonthSlots(e, t)),\n compare: (e, t) => rt(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))\n}), [yo, No] = createSlotClass(We, E(pt, refineCalendarSlot), {\n ...lo,\n ...ao,\n ...fo\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return No(at($o, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => No(it(e, refineCalendarSlot(t))),\n withPlainDate: (e, t) => No(st(e, toPlainDateSlots(t))),\n withPlainTime: (e, t) => No(lt(e, optionalToPlainTimeFields(t))),\n add: (e, t, n) => No(ct(er, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => No(ct(er, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(ut(tr, 0, e, toPlainDateTimeSlots(t), n)),\n since: (e, t, n) => ar(ut(tr, 1, e, toPlainDateTimeSlots(t), n)),\n round: (e, t) => No(dt(e, t)),\n equals: (e, t) => ft(e, toPlainDateTimeSlots(t)),\n toZonedDateTime: (e, t, n) => dr(mt(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),\n toPlainDate: e => Yo(v(e)),\n toPlainTime: e => vo(Ge(e)),\n toPlainYearMonth(e) {\n return jo(St(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Ot(Qo, e, this));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Gn(t, n, e);\n return o.format(r);\n },\n toString: Tt,\n toJSON: e => Tt(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => No(toPlainDateTimeSlots(e, t)),\n compare: (e, t) => gt(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))\n}), [Bo, Yo, Ao] = createSlotClass(J, E(Nt, refineCalendarSlot), {\n ...lo,\n ...ao\n}, {\n getISOFields: So,\n getCalendar: createCalendarFromSlots,\n with(e, t, n) {\n return Yo(Zt($o, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => Yo(it(e, refineCalendarSlot(t))),\n add: (e, t, n) => Yo(bt(er, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => Yo(bt(er, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Ft(tr, 0, e, toPlainDateSlots(t), n)),\n since: (e, t, n) => ar(Ft(tr, 1, e, toPlainDateSlots(t), n)),\n equals: (e, t) => It(e, toPlainDateSlots(t)),\n toZonedDateTime(e, t) {\n const n = !z(t) || t instanceof Zo ? {\n timeZone: t\n } : t;\n return dr(vt(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));\n },\n toPlainDateTime: (e, t) => No(wt(e, optionalToPlainTimeFields(t))),\n toPlainYearMonth(e) {\n return jo(jt(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Mt(Qo, e, this));\n },\n toLocaleString(e, t, n) {\n const [o, r] = Un(t, n, e);\n return o.format(r);\n },\n toString: yt,\n toJSON: e => yt(e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => Yo(toPlainDateSlots(e, t)),\n compare: (e, t) => rt(toPlainDateSlots(e), toPlainDateSlots(t))\n}), Eo = {\n fields(e, t, n) {\n return [ ...t.call(e, n) ];\n }\n}, Vo = /*@__PURE__*/ Object.assign({\n dateFromFields(e, t, n, o) {\n return Ao(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), Jo = /*@__PURE__*/ Object.assign({\n yearMonthFromFields(e, t, n, o) {\n return Mo(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), Lo = /*@__PURE__*/ Object.assign({\n monthDayFromFields(e, t, n, o) {\n return po(t.call(e, Object.assign(Object.create(null), n), o));\n }\n}, Eo), qo = {\n mergeFields(e, t, n, o) {\n return de(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));\n }\n}, ko = /*@__PURE__*/ Object.assign({}, Vo, qo), xo = /*@__PURE__*/ Object.assign({}, Jo, qo), Ro = /*@__PURE__*/ Object.assign({}, Lo, qo), Wo = {\n dateAdd(e, t, n, o, r) {\n return Ao(t.call(e, Yo(v(n, e)), ar(Vt(o)), r));\n }\n}, Go = /*@__PURE__*/ Object.assign({}, Wo, {\n dateUntil(e, t, n, o, r, a) {\n return ir(t.call(e, Yo(v(n, e)), Yo(v(o, e)), Object.assign(Object.create(null), a, {\n largestUnit: Et[r]\n })));\n }\n}), Uo = /*@__PURE__*/ Object.assign({}, Wo, {\n day: dayAdapter\n}), zo = /*@__PURE__*/ Object.assign({}, Go, {\n day: dayAdapter\n}), Ho = /*@__PURE__*/ createCompoundOpsCreator(Jo), Ko = /*@__PURE__*/ createCompoundOpsCreator(Vo), Qo = /*@__PURE__*/ createCompoundOpsCreator(Lo), Xo = /*@__PURE__*/ createCompoundOpsCreator(xo), $o = /*@__PURE__*/ createCompoundOpsCreator(ko), _o = /*@__PURE__*/ createCompoundOpsCreator(Ro), er = /*@__PURE__*/ createCompoundOpsCreator(Wo), tr = /*@__PURE__*/ createCompoundOpsCreator(Go), nr = /*@__PURE__*/ createCompoundOpsCreator(Uo), or = /*@__PURE__*/ createCompoundOpsCreator(zo), [rr, ar, ir] = createSlotClass(qt, Lt, {\n ...uo,\n blank: Jt\n}, {\n with: (e, t) => ar(kt(e, t)),\n negated: e => ar(xt(e)),\n abs: e => ar(Rt(e)),\n add: (e, t, n) => ar(Wt(refinePublicRelativeTo, tr, createTimeZoneOps, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => ar(Wt(refinePublicRelativeTo, tr, createTimeZoneOps, 1, e, toDurationSlots(t), n)),\n round: (e, t) => ar(Gt(refinePublicRelativeTo, tr, createTimeZoneOps, e, t)),\n total: (e, t) => Ut(refinePublicRelativeTo, tr, createTimeZoneOps, e, t),\n toLocaleString(e, t, n) {\n return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : zt(e);\n },\n toString: zt,\n toJSON: e => zt(e),\n valueOf: neverValueOf\n}, {\n from: e => ar(toDurationSlots(e)),\n compare: (e, t, n) => $t(refinePublicRelativeTo, er, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)\n}), sr = {\n toString: e => e.id,\n toJSON: e => e.id,\n ...ro,\n dateAdd: ({id: e, o: t}, n, o, r) => Yo(v(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),\n dateUntil: ({o: e}, t, n, o) => ar(Vt(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), _t(o)))),\n dateFromFields: ({id: e, o: t}, n, o) => Yo(Yt(t, n, o, ln(e))),\n yearMonthFromFields: ({id: e, o: t}, n, o) => jo(nt(t, n, o, un(e))),\n monthDayFromFields: ({id: e, o: t}, n, o) => To(K(t, 0, n, o, cn(e))),\n fields({o: e}, t) {\n const n = new Set(en), o = [];\n for (const e of t) {\n if (m(e), !n.has(e)) {\n throw new RangeError(tn(e));\n }\n n.delete(e), o.push(e);\n }\n return e.fields(o);\n },\n mergeFields: ({o: e}, t, n) => e.mergeFields(nn(on(t)), nn(on(n)))\n}, [lr] = createSlotClass(\"Calendar\", (e => {\n const t = rn(e);\n return {\n branding: \"Calendar\",\n id: t,\n o: Y(t)\n };\n}), {\n id: e => e.id\n}, sr, {\n from(e) {\n const t = refineCalendarSlot(e);\n return \"string\" == typeof t ? new lr(t) : t;\n }\n}), cr = /*@__PURE__*/ createProtocolValidator(Object.keys(sr).slice(4)), [ur, dr] = createSlotClass(Te, E(vn, refineCalendarSlot, refineTimeZoneSlot), {\n ...mo,\n ...lo,\n ...adaptDateMethods(ao),\n ...adaptDateMethods(fo),\n offset: e => Fe(slotsToIso(e).offsetNanoseconds),\n offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,\n timeZoneId: e => I(e.timeZone),\n hoursInDay: e => dn(createTimeZoneOps, e)\n}, {\n getISOFields: e => mn(createTimeZoneOffsetOps, e),\n getCalendar: createCalendarFromSlots,\n getTimeZone: ({timeZone: e}) => \"string\" == typeof e ? new Zo(e) : e,\n with(e, t, n) {\n return dr(Sn($o, createTimeZoneOps, e, this, rejectInvalidBag(t), n));\n },\n withCalendar: (e, t) => dr(it(e, refineCalendarSlot(t))),\n withTimeZone: (e, t) => dr(On(e, refineTimeZoneSlot(t))),\n withPlainDate: (e, t) => dr(Tn(createTimeZoneOps, e, toPlainDateSlots(t))),\n withPlainTime: (e, t) => dr(pn(createTimeZoneOps, e, optionalToPlainTimeFields(t))),\n add: (e, t, n) => dr(hn(er, createTimeZoneOps, 0, e, toDurationSlots(t), n)),\n subtract: (e, t, n) => dr(hn(er, createTimeZoneOps, 1, e, toDurationSlots(t), n)),\n until: (e, t, n) => ar(Vt(Dn(tr, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),\n since: (e, t, n) => ar(Vt(Dn(tr, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),\n round: (e, t) => dr(Pn(createTimeZoneOps, e, t)),\n startOfDay: e => dr(Cn(createTimeZoneOps, e)),\n equals: (e, t) => gn(e, toZonedDateTimeSlots(t)),\n toInstant: e => Co(Zn(e)),\n toPlainDateTime: e => No(ht(createTimeZoneOffsetOps, e)),\n toPlainDate: e => Yo(Bt(createTimeZoneOffsetOps, e)),\n toPlainTime: e => vo(Re(createTimeZoneOffsetOps, e)),\n toPlainYearMonth(e) {\n return jo(bn(Ho, e, this));\n },\n toPlainMonthDay(e) {\n return To(Fn(Qo, e, this));\n },\n toLocaleString(e, t, n = {}) {\n const [o, r] = Wn(t, n, e);\n return o.format(r);\n },\n toString: (e, t) => In(createTimeZoneOffsetOps, e, t),\n toJSON: e => In(createTimeZoneOffsetOps, e),\n valueOf: neverValueOf\n}, {\n from: (e, t) => dr(toZonedDateTimeSlots(e, t)),\n compare: (e, t) => yn(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))\n}), fr = /*@__PURE__*/ Object.defineProperties({}, {\n ...h(\"Temporal.Now\"),\n ...p({\n timeZoneId: () => Nn(),\n instant: () => Co(_(Bn())),\n zonedDateTime: (e, t = Nn()) => dr(Yn(Bn(), refineTimeZoneSlot(t), refineCalendarSlot(e))),\n zonedDateTimeISO: (e = Nn()) => dr(Yn(Bn(), refineTimeZoneSlot(e), X)),\n plainDateTime: (e, t = Nn()) => No(ee(An(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),\n plainDateTimeISO: (e = Nn()) => No(ee(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), X)),\n plainDate: (e, t = Nn()) => Yo(v(An(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),\n plainDateISO: (e = Nn()) => Yo(v(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), X)),\n plainTimeISO: (e = Nn()) => vo(Ge(An(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))\n })\n}), mr = /*@__PURE__*/ Object.defineProperties({}, {\n ...h(\"Temporal\"),\n ...p({\n PlainYearMonth: wo,\n PlainMonthDay: Oo,\n PlainDate: Bo,\n PlainTime: Io,\n PlainDateTime: yo,\n ZonedDateTime: ur,\n Instant: Po,\n Calendar: lr,\n TimeZone: Zo,\n Duration: rr,\n Now: fr\n })\n}), Sr = /*@__PURE__*/ createDateTimeFormatClass(), Or = /*@__PURE__*/ new WeakMap, Tr = /*@__PURE__*/ Object.defineProperties(Object.create(Intl), p({\n DateTimeFormat: Sr\n}));\n\nexport { Sr as DateTimeFormat, Tr as IntlExtended, mr as Temporal, toTemporalInstant };\n", "/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\nvar DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n/*\r\n * Create and return a Big constructor.\r\n */\r\nfunction _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n}\r\n\r\n\r\n/*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\nfunction parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\nfunction round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\nfunction stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n}\r\n\r\n\r\n// Prototype/instance methods\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\nP.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\nP.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\nP.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\nP.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\nP.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\nP.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\nP.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\nP.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\nP.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\nP.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\nP.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\nP[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Big as a primitve number.\r\n */\r\nP.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\nP.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n};\r\n\r\n\r\n// Export\r\n\r\n\r\nexport var Big = _Big_();\r\n\r\n/// \r\nexport default Big;\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nexport namespace Utils {\r\n // https://stackoverflow.com/a/40577337/8037425\r\n export function getAllMethodNames(obj: object, excludeContructors: boolean = false): string[] {\r\n let _obj: object | null = obj;\r\n const methods: Set = new Set();\r\n\r\n // eslint-disable-next-line no-cond-assign\r\n while ((_obj = Reflect.getPrototypeOf(_obj)) && Reflect.getPrototypeOf(_obj)) {\r\n const keys: Array = Reflect.ownKeys(_obj) as Array;\r\n keys.filter((key: string) => !excludeContructors || key !== 'constructor')\r\n .forEach((key: string) => methods.add(key));\r\n }\r\n\r\n // Convert Symbols to strings, if there are any\r\n return Array.from(methods, value => value.toString())\r\n .sort();\r\n }\r\n}\r\n\r\nexport namespace TimeZone {\r\n /**\r\n * Returns the amount of time in nanoseconds to add to UTC to get\r\n * standard time in this time zone. Because this value is not\r\n * affected by daylight saving time, it is called raw\r\n * offset.\r\n *\r\n * Since JS doesn't have a native function for this, use the lesser offset of January and July.\r\n *\r\n * @return the amount of raw offset time in nanoseconds to add to UTC.\r\n */\r\n export function getRawOffset(timeZoneId: string): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n const msCount = [\r\n { month: 7, day: 1, year: new Date().getFullYear(), timeZone: timeZoneId },\r\n { month: 1, day: 1, year: new Date().getFullYear(), timeZone: timeZoneId }\r\n ]\r\n .map(monthDay => Temporal.ZonedDateTime.from(monthDay).toInstant())\r\n .map(instant => timeZone.getOffsetNanosecondsFor(instant))\r\n\r\n return Math.min(...msCount);\r\n }\r\n\r\n /**\r\n * Returns a name in the specified style of this TimeZone suitable for presentation to the user in the default locale.\r\n * @param {string} timeZoneId\r\n */\r\n export function getDisplayName(timeZoneId: string): string | null {\r\n let dtf = new Intl.DateTimeFormat('en-US', { timeZone: timeZoneId, timeZoneName: 'long' });\r\n return dtf.formatToParts().find(part => part.type === 'timeZoneName')!.value; // result: 'Eastern Standard Time'\r\n }\r\n\r\n /**\r\n * Returns the amount of time to be added to local standard time to get local wall clock time.\r\n * The default implementation returns 3600000000000 nanoseconds (i.e., one hour) if a call to useDaylightTime() returns true.\r\n * Otherwise, 0 (zero) is returned.\r\n * @param {string} timeZoneId\r\n * @return {number}\r\n */\r\n export function getDSTSavings(timeZoneId: string): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n const msCount = [\r\n { month: 7, day: 1, year: new Date().getFullYear() },\r\n { month: 1, day: 1, year: new Date().getFullYear() }\r\n ]\r\n .map(monthDay => Temporal.PlainDate.from(monthDay))\r\n .map(plainMonthDay => timeZone.getInstantFor!(plainMonthDay))\r\n .map(instant => timeZone.getOffsetNanosecondsFor(instant))\r\n\r\n return Math.abs(msCount[0] - msCount[1]);\r\n }\r\n\r\n /**\r\n * Returns the offset of this time zone from UTC at the specified date. If Daylight Saving Time is in effect at the\r\n * specified date, the offset value is adjusted with the amount of daylight saving.\r\n *\r\n * This method returns a historically correct offset value if an underlying TimeZone implementation subclass\r\n * supports historical Daylight Saving Time schedule and GMT offset changes.\r\n * @param {string} timeZoneId\r\n * @param {number} millisSinceEpoch\r\n */\r\n export function getOffset(timeZoneId: string, millisSinceEpoch: number): number {\r\n const timeZone = Temporal.TimeZone.from(timeZoneId);\r\n return timeZone.getOffsetNanosecondsFor(Temporal.Instant.fromEpochMilliseconds(millisSinceEpoch));\r\n }\r\n}\r\n\r\n/**\r\n * java.util.Calendar\r\n */\r\nexport namespace Calendar {\r\n export const JANUARY: number = 0;\r\n export const FEBRUARY: number = 1;\r\n export const MARCH: number = 2;\r\n export const APRIL: number = 3;\r\n export const MAY: number = 4;\r\n export const JUNE: number = 5;\r\n export const JULY: number = 6;\r\n export const AUGUST: number = 7;\r\n export const SEPTEMBER: number = 8;\r\n export const OCTOBER: number = 9;\r\n export const NOVEMBER: number = 10;\r\n export const DECEMBER: number = 11;\r\n\r\n export const SUNDAY: number = 1;\r\n export const MONDAY: number = 2;\r\n export const TUESDAY: number = 3;\r\n export const WEDNESDAY: number = 4;\r\n export const THURSDAY: number = 5;\r\n export const FRIDAY: number = 6;\r\n export const SATURDAY: number = 7;\r\n\r\n export const DATE = 5;\r\n export const MONTH = 2;\r\n export const YEAR = 1;\r\n}\r\n\r\n/**\r\n * java.lang.Math\r\n */\r\nexport namespace MathUtils {\r\n /**\r\n * java.lang.Math.toRadians\r\n * @param degrees\r\n */\r\n export function degreesToRadians(degrees: number): number {\r\n return degrees * Math.PI / 180;\r\n }\r\n\r\n /**\r\n * java.lang.Math.toDegrees\r\n * @param radians\r\n */\r\n export function radiansToDegrees(radians: number): number {\r\n return radians * 180 / Math.PI;\r\n }\r\n}\r\n\r\n/**\r\n * java.lang.String\r\n */\r\nexport namespace StringUtils {\r\n /**\r\n * Compares two strings lexicographically.\r\n * The comparison is based on the Unicode value of each character in\r\n * the strings. The character sequence represented by this\r\n * {@code String} object is compared lexicographically to the\r\n * character sequence represented by the argument string. The result is\r\n * a negative integer if this {@code String} object\r\n * lexicographically precedes the argument string. The result is a\r\n * positive integer if this {@code String} object lexicographically\r\n * follows the argument string. The result is zero if the strings\r\n * are equal; {@code compareTo} returns {@code 0} exactly when\r\n * the {@link #equals(Object)} method would return {@code true}.\r\n *

\r\n * This is the definition of lexicographic ordering. If two strings are\r\n * different, then either they have different characters at some index\r\n * that is a valid index for both strings, or their lengths are different,\r\n * or both. If they have different characters at one or more index\r\n * positions, let k be the smallest such index; then the string\r\n * whose character at position k has the smaller value, as\r\n * determined by using the < operator, lexicographically precedes the\r\n * other string. In this case, {@code compareTo} returns the\r\n * difference of the two character values at position {@code k} in\r\n * the two string -- that is, the value:\r\n *

\r\n   * this.charAt(k)-anotherString.charAt(k)\r\n   * 
\r\n * If there is no index position at which they differ, then the shorter\r\n * string lexicographically precedes the longer string. In this case,\r\n * {@code compareTo} returns the difference of the lengths of the\r\n * strings -- that is, the value:\r\n *
\r\n   * this.length()-anotherString.length()\r\n   * 
\r\n *\r\n * @param string1\r\n * @param string2 the {@code String} to be compared.\r\n * @return the value {@code 0} if the argument string is equal to\r\n * this string; a value less than {@code 0} if this string\r\n * is lexicographically less than the string argument; and a\r\n * value greater than {@code 0} if this string is\r\n * lexicographically greater than the string argument.\r\n */\r\n export function compareTo(string1: string, string2: string): number {\r\n let k: number = 0;\r\n while (k < Math.min(string1.length, string2.length)) {\r\n if (string1.substr(k, 1) !== string2.substr(k, 1)) {\r\n return string1.charCodeAt(k) - string2.charCodeAt(k);\r\n }\r\n k++;\r\n }\r\n return string1.length - string2.length;\r\n }\r\n}\r\n\r\nexport namespace IntegerUtils {\r\n /**\r\n * Compares 2 numbers\r\n * @param x\r\n * @param y\r\n */\r\n export function compare(x: number, y: number): number {\r\n if (x === y) return 0;\r\n return x > y ? 1 : -1;\r\n }\r\n\r\n}\r\n\r\n// export const Long_MIN_VALUE = 0;\r\nexport const Long_MIN_VALUE = NaN;\r\n\r\n/**\r\n * @param {number} num\r\n * @param {number} places - The number of places to pad with zeros\r\n * @returns {string} - The formatted integer\r\n */\r\nexport function padZeros(num: number, places: number): string {\r\n const int = Math.trunc(num);\r\n if (int >= Math.pow(10, places)) return int.toString();\r\n return '0'.repeat(places).concat(int.toString()).slice(-places);\r\n}", "/* eslint-disable max-classes-per-file */\r\nclass BaseCustomError extends Error {\r\n constructor(message?: string) {\r\n super(message);\r\n this.name = this.constructor.name;\r\n }\r\n}\r\n\r\nexport class NullPointerException extends BaseCustomError {\r\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\nexport class IllegalArgumentException extends BaseCustomError {}\r\n\r\nexport class UnsupportedError extends BaseCustomError {}\r\n", "import { MathUtils, TimeZone } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * A class that contains location information such as latitude and longitude required for astronomical calculations. The\r\n * elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for\r\n * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the\r\n * algorithm.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n * @version 1.1\r\n */\r\nexport class GeoLocation {\r\n /**\r\n * @see #getLatitude()\r\n * @see #setLatitude(double)\r\n * @see #setLatitude(int, int, double, String)\r\n */\r\n private latitude!: number;\r\n\r\n /**\r\n * @see #getLongitude()\r\n * @see #setLongitude(double)\r\n * @see #setLongitude(int, int, double, String)\r\n */\r\n private longitude!: number;\r\n\r\n /**\r\n * @see #getLocationName()\r\n * @see #setLocationName(String)\r\n */\r\n private locationName: string | null = null;\r\n\r\n /**\r\n * @see #getTimeZone()\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string;\r\n\r\n /**\r\n * @see #getElevation()\r\n * @see #setElevation(double)\r\n */\r\n private elevation!: number;\r\n\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /** constant for nanoseconds in a minute (60 * 1000 * 1000 * 1000) */\r\n private static readonly MINUTE_NANOS = Temporal.Duration.from({ minutes: 1 }).total('nanoseconds');\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n private static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanoseconds');\r\n\r\n /**\r\n * Method to get the elevation in Meters.\r\n *\r\n * @return Returns the elevation in Meters.\r\n */\r\n public getElevation(): number {\r\n return this.elevation;\r\n }\r\n\r\n /**\r\n * Method to set the elevation in Meters above sea level.\r\n *\r\n * @param elevation\r\n * The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.\r\n */\r\n public setElevation(elevation: number): void {\r\n if (elevation < 0) {\r\n throw new IllegalArgumentException('Elevation cannot be negative');\r\n }\r\n this.elevation = elevation;\r\n }\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param timeZone\r\n * the TimeZone for the location.\r\n */\r\n\r\n /*\r\n public GeoLocation(String name, double latitude, double longitude, TimeZone timeZone) {\r\n this(name, latitude, longitude, 0, timeZone);\r\n }\r\n */\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param elevation\r\n * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating\r\n * sunrise and set.\r\n * @param timeZoneId\r\n * the TimeZone for the location.\r\n */\r\n constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);\r\n constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);\r\n constructor(name: string | null, latitude: number, longitude: number, elevationOrTimeZoneId?: number | string, timeZoneId?: string) {\r\n let elevation: number = 0;\r\n if (timeZoneId) {\r\n elevation = elevationOrTimeZoneId as number;\r\n } else {\r\n timeZoneId = elevationOrTimeZoneId as string;\r\n }\r\n\r\n this.setLocationName(name);\r\n this.setLatitude(latitude);\r\n this.setLongitude(longitude);\r\n this.setElevation(elevation);\r\n this.setTimeZone(timeZoneId);\r\n }\r\n\r\n /**\r\n * Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of\r\n * GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich . No daylight savings time will be used.\r\n */\r\n /*\r\n public GeoLocation() {\r\n setLocationName(\"Greenwich, England\");\r\n setLongitude(0); // added for clarity\r\n setLatitude(51.4772);\r\n setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude.\r\n *\r\n * @param latitude\r\n * The degrees of latitude to set. The values should be between -90° and 90°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example 40.095965 would be\r\n * used for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be\r\n * used.\r\n */\r\n\r\n /*\r\n public setLatitude(latitude: number): void {\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException(\"Latitude must be between -90 and 90\");\r\n }\r\n this.latitude = latitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of latitude to set between 0° and 90°. For example 40 would be used for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limit.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * N for north and S for south. An IllegalArgumentException will be thrown if the value is not S or N.\r\n */\r\n public setLatitude(degrees: number, minutes: number, seconds: number, direction: 'N' | 'S'): void;\r\n public setLatitude(latitude: number): void;\r\n public setLatitude(degreesOrLatitude: number, minutes?: number, seconds?: number, direction?: 'N' | 'S'): void {\r\n if (!minutes) {\r\n const latitude: number = degreesOrLatitude;\r\n\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException('Latitude must be between -90 and 90');\r\n }\r\n\r\n this.latitude = latitude;\r\n } else {\r\n const degrees: number = degreesOrLatitude;\r\n\r\n let tempLat: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (tempLat > 90 || tempLat < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Latitude must be between 0 and 90. Use direction of S instead of negative.');\r\n }\r\n if (direction === 'S') {\r\n tempLat *= -1;\r\n } else if (!(direction === 'N')) {\r\n throw new IllegalArgumentException('Latitude direction must be N or S');\r\n }\r\n this.latitude = tempLat;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the latitude.\r\n */\r\n public getLatitude(): number {\r\n return this.latitude;\r\n }\r\n\r\n /**\r\n * Method to set the longitude in a double format.\r\n *\r\n * @param longitude\r\n * The degrees of longitude to set in a double format between -180° and 180°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example -74.2094 would be\r\n * used for Lakewood, NJ. Note: for longitudes east of the Prime Meridian (Greenwich) a negative value\r\n * should be used.\r\n */\r\n\r\n /*\r\n public setLongitude(longitude: number): void {\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException(\"Longitude must be between -180 and 180\");\r\n }\r\n this.longitude = longitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the longitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of longitude to set between 0° and 180°. As an example 74 would be set for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limits.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * E for east of the Prime Meridian or W for west of it.\r\n * An IllegalArgumentException will be thrown if\r\n * the value is not E or W.\r\n */\r\n public setLongitude(degrees: number, minutes: number, seconds: number, direction: 'E' | 'W'): void;\r\n public setLongitude(longitude: number): void;\r\n public setLongitude(degreesOrLongitude: number, minutes?: number, seconds?: number, direction?: 'E' | 'W'): void {\r\n if (!minutes) {\r\n const longitude: number = degreesOrLongitude;\r\n\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException('Longitude must be between -180 and 180');\r\n }\r\n\r\n this.longitude = longitude;\r\n } else {\r\n const degrees: number = degreesOrLongitude;\r\n\r\n let longTemp: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (longTemp > 180 || this.longitude < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Longitude must be between 0 and 180. Use a direction of W instead of negative.');\r\n }\r\n if (direction === 'W') {\r\n longTemp *= -1;\r\n } else if (!(direction === 'E')) {\r\n throw new IllegalArgumentException('Longitude direction must be E or W');\r\n }\r\n this.longitude = longTemp;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the longitude.\r\n */\r\n public getLongitude(): number {\r\n return this.longitude;\r\n }\r\n\r\n /**\r\n * @return Returns the location name.\r\n */\r\n public getLocationName(): string | null {\r\n return this.locationName;\r\n }\r\n\r\n /**\r\n * @param name\r\n * The setter method for the display name.\r\n */\r\n public setLocationName(name: string | null): void {\r\n this.locationName = name;\r\n }\r\n\r\n /**\r\n * @return Returns the timeZone.\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the\r\n * {@link AstronomicalCalendar}, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset. This situation will arise if the\r\n * AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.\r\n *\r\n * @param timeZone\r\n * The timeZone to set.\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * A method that will return the location's local mean time offset in nanoseconds from local standard time. The globe is split into 360°, with\r\n * 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 ==\r\n * 0), at solar {@link AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead,\r\n * so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user\r\n * who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is\r\n * -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes\r\n * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is\r\n * unaware of dates.\r\n *\r\n * @return the offset in nanoseconds not accounting for Daylight saving time. A positive value will be returned\r\n * East of the 15° timezone line, and a negative value West of it.\r\n * @since 1.1\r\n */\r\n public getLocalMeanTimeOffset(): number {\r\n return this.getLongitude() * 4 * GeoLocation.MINUTE_NANOS - TimeZone.getRawOffset(this.getTimeZone());\r\n }\r\n\r\n /**\r\n * Adjust the date for antimeridian crossover. This is\r\n * needed to deal with edge cases such as Samoa that use a different calendar date than expected based on their\r\n * geographic location.\r\n *\r\n * The actual Time Zone offset may deviate from the expected offset based on the longitude. Since the 'absolute time'\r\n * calculations are always based on longitudinal offset from UTC for a given date, the date is presumed to only\r\n * increase East of the Prime Meridian, and to only decrease West of it. For Time Zones that cross the antimeridian,\r\n * the date will be artificially adjusted before calculation to conform with this presumption.\r\n *\r\n * For example, Apia, Samoa with a longitude of -171.75 uses a local offset of +14:00. When calculating sunrise for\r\n * 2018-02-03, the calculator should operate using 2018-02-02 since the expected zone is -11. After determining the\r\n * UTC time, the local DST offset of UTC+14:00 should be applied\r\n * to bring the date back to 2018-02-03.\r\n *\r\n * @return the number of days to adjust the date This will typically be 0 unless the date crosses the antimeridian\r\n */\r\n public getAntimeridianAdjustment(): -1 | 1 | 0 {\r\n const localHoursOffset: number = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_NANOS;\r\n\r\n // if the offset is 20 hours or more in the future (never expected anywhere other\r\n // than a location using a timezone across the anti meridian to the east such as Samoa)\r\n if (localHoursOffset >= 20) {\r\n // roll the date forward a day\r\n return 1;\r\n } else if (localHoursOffset <= -20) {\r\n // if the offset is 20 hours or more in the past (no current location is known\r\n // that crosses the antimeridian to the west, but better safe than sorry)\r\n // roll the date back a day\r\n return -1;\r\n }\r\n // 99.999% of the world will have no adjustment\r\n return 0;\r\n }\r\n\r\n /**\r\n * Calculate the initial geodesic bearing between this\r\n * Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the initial bearing\r\n */\r\n public getGeodesicInitialBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the final geodesic bearing between this Object\r\n * and a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol\r\n * XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the final bearing\r\n */\r\n public getGeodesicFinalBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @see #vincentyFormula(GeoLocation, int)\r\n * @param location\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public getGeodesicDistance(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}), final bearing (\r\n * {@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return geodesic distance in Meters\r\n */\r\n private vincentyFormula(location: GeoLocation, formula: number): number {\r\n const a: number = 6378137;\r\n const b: number = 6356752.3142;\r\n const f: number = 1 / 298.257223563; // WGS-84 ellipsiod\r\n const L: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(this.getLatitude())));\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude())));\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = (cosU1 * cosU2 * sinLambda) / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha\r\n * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma\r\n * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocation.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocation.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocation.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line bearing from the current location to\r\n * the GeoLocation passed in.\r\n *\r\n * @param location\r\n * destination location\r\n * @return the bearing in degrees\r\n */\r\n public getRhumbLineBearing(location: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current location\r\n * to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public getRhumbLineDistance(location: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude()) - MathUtils.degreesToRadians(this.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude()) - MathUtils.degreesToRadians(this.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(this.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String representing the serialized Object. Very\r\n * similar to the toString method but the return value is in an xml format. The format currently used (subject to\r\n * change) is:\r\n *\r\n *
\r\n   *   <GeoLocation>\r\n   *        <LocationName>Lakewood, NJ</LocationName>\r\n   *        <Latitude>40.0828&deg</Latitude>\r\n   *        <Longitude>-74.2094&deg</Longitude>\r\n   *        <Elevation>0 Meters</Elevation>\r\n   *        <TimezoneName>America/New_York</TimezoneName>\r\n   *        <TimeZoneDisplayName>Eastern Standard Time</TimeZoneDisplayName>\r\n   *        <TimezoneGMTOffset>-5</TimezoneGMTOffset>\r\n   *        <TimezoneDSTOffset>1</TimezoneDSTOffset>\r\n   *   </GeoLocation>\r\n   * 
\r\n *\r\n * @return The XML formatted String.\r\n * @deprecated\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toXML(): void {\r\n throw new UnsupportedError('This method is deprecated');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) return true;\r\n if (!(object instanceof GeoLocation)) return false;\r\n\r\n const geo: GeoLocation = object as GeoLocation;\r\n return this.latitude === geo.latitude\r\n && this.longitude === geo.longitude\r\n && this.elevation === geo.elevation\r\n && this.locationName === geo.locationName\r\n && this.timeZoneId === geo.getTimeZone();\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#toString()\r\n */\r\n public toString(): string {\r\n return (`Location Name:\\t\\t\\t${this.getLocationName()}`)\r\n .concat(`\\nLatitude:\\t\\t\\t${this.getLatitude().toString()}\\u00B0`)\r\n .concat(`\\nLongitude:\\t\\t\\t${this.getLongitude().toString()}\\u00B0`)\r\n .concat(`\\nElevation:\\t\\t\\t${this.getElevation().toString()} Meters`)\r\n .concat(`\\nTimezone ID:\\t\\t\\t${this.getTimeZone()}`)\r\n .concat(`\\nTimezone Display Name:\\t\\t${TimeZone.getDisplayName(this.getTimeZone())}`)\r\n .concat(`\\nTimezone GMT Offset:\\t\\t${(TimeZone.getRawOffset(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`)\r\n .concat(`\\nTimezone DST Offset:\\t\\t${(TimeZone.getDSTSavings(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`);\r\n }\r\n\r\n /**\r\n * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the clone will be changed from the original, it is critical\r\n * that {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} is called after cloning in order for the\r\n * AstronomicalCalendar to output times in the expected offset.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): GeoLocation {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\nimport type { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at\r\n * runtime, easily allowing comparison the results of using different algorithms.\r\n * TODO: Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link\r\n * #setRefraction(double) setting the refraction}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2020\r\n */\r\nexport abstract class AstronomicalCalculator {\r\n /**\r\n * The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of\r\n * 34.478885263888294\r\n *\r\n * @see #getRefraction()\r\n */\r\n private refraction: number = 34 / 60;\r\n // private double refraction = 34.478885263888294 / 60d;\r\n\r\n /**\r\n * The commonly used average solar radius in minutes of a degree.\r\n *\r\n * @see #getSolarRadius()\r\n */\r\n private solarRadius: number = 16 / 60;\r\n\r\n /**\r\n * The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the\r\n * sunrise and sunset calculations. The value currently defaults to 6356.9 KM.\r\n *\r\n * @see #getEarthRadius()\r\n * @see #setEarthRadius(double)\r\n */\r\n private earthRadius: number = 6356.9; // in KM\r\n\r\n /**\r\n * A method that returns the earth radius in KM. The value currently defaults to 6356.9 KM if not set.\r\n *\r\n * @return the earthRadius the earth radius in KM.\r\n */\r\n public getEarthRadius(): number {\r\n return this.earthRadius;\r\n }\r\n\r\n /**\r\n * A method that allows setting the earth's radius.\r\n *\r\n * @param earthRadius\r\n * the earthRadius to set in KM\r\n */\r\n public setEarthRadius(earthRadius: number): void {\r\n this.earthRadius = earthRadius;\r\n }\r\n\r\n /**\r\n * The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°\r\n */\r\n private static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /**\r\n * Returns the default class for calculating sunrise and sunset. This is currently the {@link NOAACalculator},\r\n * but this may change.\r\n *\r\n * @return AstronomicalCalculator the default class for calculating sunrise and sunset. In the current\r\n * implementation the default calculator returned is the {@link NOAACalculator}.\r\n * @deprecated This depends on a circular dependency. Use
new NOAACalculator()
instead\r\n */\r\n public static getDefault(): void {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new NOAACalculator()` instead.');\r\n }\r\n\r\n /**\r\n * Returns the name of the algorithm.\r\n *\r\n * @return the descriptive name of the algorithm.\r\n */\r\n public abstract getCalculatorName(): string;\r\n\r\n /**\r\n * Setter method for the descriptive name of the calculator. This will typically not have to be set\r\n *\r\n * @param calculatorName\r\n * descriptive name of the algorithm.\r\n */\r\n\r\n /**\r\n * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90 degrees. for sunrise typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number,\r\n adjustForElevation: boolean): number; // eslint-disable-line @typescript-eslint/indent\r\n\r\n /**\r\n * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;\r\n\r\n /**\r\n\t * Return solar noon (UTC) for the given day at the\r\n\t * given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates\r\n\t * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating\r\n\t * the time as halfway between sunrise and sunset.\r\n\t * \r\n\t * @param calendar\r\n\t * Used to calculate day of year.\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times. \r\n\t * \r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public abstract getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;\r\n\r\n /**\r\n * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher\r\n * elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon\r\n * used at sea level. This is only used for sunrise and sunset and not times before or after it such as\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight() nautical twilight} since those\r\n * calculations are based on the level of available light at the given dip below the horizon, something that is not\r\n * affected by elevation, the adjustment should only made if the zenith == 90° {@link #adjustZenith adjusted}\r\n * for refraction and solar radius. The algorithm used is\r\n *\r\n *
\r\n   * elevationAdjustment = Math.toDegrees(Math.acos(earthRadiusInMeters / (earthRadiusInMeters + elevationMeters)));\r\n   * 
\r\n *\r\n * The source of this algorithm is Calendrical Calculations by Edward M.\r\n * Reingold and Nachum Dershowitz. An alternate algorithm that produces an almost identical (but not accurate)\r\n * result found in Ma'aglay Tzedek by Moishe Kosower and other sources is:\r\n *\r\n *
\r\n   * elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);\r\n   * 
\r\n *\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return the adjusted zenith\r\n */\r\n public getElevationAdjustment(elevation: number): number {\r\n // double elevationAdjustment = 0.0347 * Math.sqrt(elevation);\r\n const elevationAdjustment: number = MathUtils.radiansToDegrees(Math.acos(this.earthRadius / (this.earthRadius + (elevation / 1000))));\r\n return elevationAdjustment;\r\n }\r\n\r\n /**\r\n * Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and\r\n * elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle\r\n * that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the\r\n * Earth were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun\r\n * is not a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to\r\n * true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge\r\n * to be obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16\r\n * minutes of arc (this can be changed via the {@link #setSolarRadius(double)} method , and atmospheric refraction\r\n * accounts for 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total\r\n * of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset. Since a\r\n * person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to\r\n * account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.\r\n * For values below and above this no correction is done. As an example, astronomical twilight is when the sun is\r\n * 18° below the horizon or {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH 108°\r\n * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes\r\n * for various tzais and alos times such as the\r\n * {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in\r\n * {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.\r\n *\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction\r\n * refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for\r\n * sunrise and sunset (if the zenith == 90°)\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public adjustZenith(zenith: number, elevation: number) {\r\n let adjustedZenith: number = zenith;\r\n if (zenith === AstronomicalCalculator.GEOMETRIC_ZENITH) { // only adjust if it is exactly sunrise or sunset\r\n adjustedZenith = zenith + (this.getSolarRadius() + this.getRefraction() + this.getElevationAdjustment(elevation));\r\n }\r\n return adjustedZenith;\r\n }\r\n\r\n /**\r\n * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 arc\r\n * minutes. The Errata and\r\n * Notes for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists\r\n * the actual average refraction value as 34.478885263888294 or approximately 34' 29\". The refraction value as well\r\n * as the solarRadius and elevation adjustment are added to the zenith used to calculate sunrise and sunset.\r\n *\r\n * @return The refraction in arc minutes.\r\n */\r\n public getRefraction(): number {\r\n return this.refraction;\r\n }\r\n\r\n /**\r\n * A method to allow overriding the default refraction of the calculator.\r\n * @todo At some point in the future, an AtmosphericModel or Refraction object that models the atmosphere of different\r\n * locations might be used for increased accuracy.\r\n *\r\n * @param refraction\r\n * The refraction in arc minutes.\r\n * @see #getRefraction()\r\n */\r\n public setRefraction(refraction: number): void {\r\n this.refraction = refraction;\r\n }\r\n\r\n /**\r\n * Method to get the sun's radius. The default value is 16 arc minutes. The sun's radius as it appears from earth is\r\n * almost universally given as 16 arc minutes but in fact it differs by the time of the year. At the perihelion it has an apparent radius of 16.293, while at the\r\n * aphelion it has an apparent radius of 15.755. There is little\r\n * affect for most location, but at high and low latitudes the difference becomes more apparent. My Calculations for\r\n * the difference at the location of the Royal Observatory, Greenwich show\r\n * only a 4.494 second difference between the perihelion and aphelion radii, but moving into the arctic circle the\r\n * difference becomes more noticeable. Tests for Tromso, Norway (latitude 69.672312, longitude 19.049787) show that\r\n * on May 17, the rise of the midnight sun, a 2 minute 23 second difference is observed between the perihelion and\r\n * aphelion radii using the USNO algorithm, but only 1 minute and 6 seconds difference using the NOAA algorithm.\r\n * Areas farther north show an even greater difference. Note that these test are not real valid test cases because\r\n * they show the extreme difference on days that are not the perihelion or aphelion, but are shown for illustrative\r\n * purposes only.\r\n *\r\n * @return The sun's radius in arc minutes.\r\n */\r\n public getSolarRadius(): number {\r\n return this.solarRadius;\r\n }\r\n\r\n /**\r\n * Method to set the sun's radius.\r\n *\r\n * @param solarRadius\r\n * The sun's radius in arc minutes.\r\n * @see #getSolarRadius()\r\n */\r\n public setSolarRadius(solarRadius: number): void {\r\n this.solarRadius = solarRadius;\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalculator {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n\r\n public equals(object: object) {\r\n return this === object;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nenum SolarEvent {\r\n /**SUNRISE A solar event related to sunrise*/SUNRISE, /**SUNSET A solar event related to sunset*/SUNSET\r\n // possibly add the following in the future, if added, an IllegalArgumentException should be thrown in getSunHourAngle\r\n // /**NOON A solar event related to noon*/NOON, /**MIDNIGHT A solar event related to midnight*/MIDNIGHT\r\n}\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith\r\n * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class NOAACalculator extends AstronomicalCalculator {\r\n /**\r\n * The Julian day of January 1, 2000\r\n */\r\n private static readonly JULIAN_DAY_JAN_1_2000: number = 2451545;\r\n\r\n /**\r\n * Julian days per century\r\n */\r\n private static readonly JULIAN_DAYS_PER_CENTURY: number = 36525;\r\n\r\n\t/**\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getCalculatorName()\r\n\t */\r\n\tpublic getCalculatorName(): string {\r\n\t\treturn \"US National Oceanic and Atmospheric Administration Algorithm\"; // Implementation of the Jean Meeus algorithm\r\n\t}\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunrise: number = NOAACalculator.getSunRiseSetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith, SolarEvent.SUNRISE);\r\n sunrise = sunrise / 60;\r\n\r\n return sunrise > 0 ? sunrise % 24 : sunrise % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunset: number = NOAACalculator.getSunRiseSetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith, SolarEvent.SUNSET);\r\n sunset = sunset / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n return sunset > 0 ? sunset % 24 : sunset % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Calendar\r\n *\r\n * @param calendar\r\n * The Java Calendar\r\n * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days\r\n * should be added later.\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = Math.trunc(2 - a + a / 4);\r\n\r\n return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5;\r\n }\r\n\r\n /**\r\n * Convert Julian day to centuries since J2000.0.\r\n *\r\n * @param julianDay\r\n * the Julian Day to convert\r\n * @return the centuries since 2000 Julian corresponding to the Julian Day\r\n */\r\n private static getJulianCenturiesFromJulianDay(julianDay: number): number {\r\n return (julianDay - NOAACalculator.JULIAN_DAY_JAN_1_2000) / NOAACalculator.JULIAN_DAYS_PER_CENTURY;\r\n }\r\n\r\n /**\r\n * Convert centuries since J2000.0 to Julian day.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Julian Day corresponding to the Julian centuries passed in\r\n */\r\n private static getJulianDayFromJulianCenturies(julianCenturies: number): number {\r\n return julianCenturies * NOAACalculator.JULIAN_DAYS_PER_CENTURY + NOAACalculator.JULIAN_DAY_JAN_1_2000;\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Longitude of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Longitude of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanLongitude(julianCenturies: number): number {\r\n let longitude: number = 280.46646 + julianCenturies * (36000.76983 + 0.0003032 * julianCenturies);\r\n return longitude > 0 ? longitude % 360 : longitude % 360 + 360; // ensure that the longitude is >= 0 and < 360\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Anomaly of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Anomaly of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanAnomaly(julianCenturies: number): number {\r\n return 357.52911 + julianCenturies * (35999.05029 - 0.0001537 * julianCenturies); // in degrees\r\n }\r\n\r\n /**\r\n * Return the eccentricity of earth's orbit.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the unitless eccentricity\r\n */\r\n private static getEarthOrbitEccentricity(julianCenturies: number): number {\r\n return 0.016708634 - julianCenturies * (0.000042037 + 0.0000001267 * julianCenturies); // unitless\r\n }\r\n\r\n /**\r\n * Returns the equation of center for the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the equation of center for the sun in degrees\r\n */\r\n private static getSunEquationOfCenter(julianCenturies: number): number {\r\n const m: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n const mrad: number = MathUtils.degreesToRadians(m);\r\n const sinm: number = Math.sin(mrad);\r\n const sin2m: number = Math.sin(mrad + mrad);\r\n const sin3m: number = Math.sin(mrad + mrad + mrad);\r\n\r\n return sinm * (1.914602 - julianCenturies * (0.004817 + 0.000014 * julianCenturies)) + sin2m\r\n * (0.019993 - 0.000101 * julianCenturies) + sin3m * 0.000289; // in degrees\r\n }\r\n\r\n /**\r\n * Return the true longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the sun's true longitude in degrees\r\n */\r\n private static getSunTrueLongitude(julianCenturies: number): number {\r\n const sunLongitude: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const center: number = NOAACalculator.getSunEquationOfCenter(julianCenturies);\r\n\r\n return sunLongitude + center; // in degrees\r\n }\r\n\r\n // /**\r\n // * Returns the true anamoly of the sun.\r\n // *\r\n // * @param julianCenturies\r\n // * the number of Julian centuries since J2000.0\r\n // * @return the sun's true anamoly in degrees\r\n // */\r\n // private static double getSunTrueAnomaly(double julianCenturies) {\r\n // double meanAnomaly = getSunGeometricMeanAnomaly(julianCenturies);\r\n // double equationOfCenter = getSunEquationOfCenter(julianCenturies);\r\n //\r\n // return meanAnomaly + equationOfCenter; // in degrees\r\n // }\r\n\r\n /**\r\n * Return the apparent longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return sun's apparent longitude in degrees\r\n */\r\n private static getSunApparentLongitude(julianCenturies: number): number {\r\n const sunTrueLongitude: number = NOAACalculator.getSunTrueLongitude(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n const lambda: number = sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(MathUtils.degreesToRadians(omega));\r\n return lambda; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the mean obliquity of the ecliptic (Axial tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the mean obliquity in degrees\r\n */\r\n private static getMeanObliquityOfEcliptic(julianCenturies: number): number {\r\n const seconds: number = 21.448 - julianCenturies\r\n * (46.8150 + julianCenturies * (0.00059 - julianCenturies * (0.001813)));\r\n return 23 + (26 + (seconds / 60)) / 60; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the corrected obliquity of the ecliptic (Axial\r\n * tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the corrected obliquity in degrees\r\n */\r\n private static getObliquityCorrection(julianCenturies: number): number {\r\n const obliquityOfEcliptic: number = NOAACalculator.getMeanObliquityOfEcliptic(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n return obliquityOfEcliptic + 0.00256 * Math.cos(MathUtils.degreesToRadians(omega)); // in degrees\r\n }\r\n\r\n /**\r\n * Return the declination of the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return\r\n * the sun's declination in degrees\r\n */\r\n private static getSunDeclination(julianCenturies: number): number {\r\n const obliquityCorrection: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const lambda: number = NOAACalculator.getSunApparentLongitude(julianCenturies);\r\n\r\n const sint: number = Math.sin(MathUtils.degreesToRadians(obliquityCorrection)) * Math.sin(MathUtils.degreesToRadians(lambda));\r\n const theta: number = MathUtils.radiansToDegrees(Math.asin(sint));\r\n return theta; // in degrees\r\n }\r\n\r\n /**\r\n * Return the Equation of Time - the difference between\r\n * true solar time and mean solar time\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return equation of time in minutes of time\r\n */\r\n private static getEquationOfTime(julianCenturies: number): number {\r\n const epsilon: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const geomMeanLongSun: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const eccentricityEarthOrbit: number = NOAACalculator.getEarthOrbitEccentricity(julianCenturies);\r\n const geomMeanAnomalySun: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n let y: number = Math.tan(MathUtils.degreesToRadians(epsilon) / 2);\r\n y *= y;\r\n\r\n const sin2l0: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sinm: number = Math.sin(MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n const cos2l0: number = Math.cos(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin4l0: number = Math.sin(4 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin2m: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n\r\n const equationOfTime: number = y * sin2l0 - 2 * eccentricityEarthOrbit * sinm + 4 * eccentricityEarthOrbit * y\r\n * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * eccentricityEarthOrbit * eccentricityEarthOrbit * sin2m;\r\n return MathUtils.radiansToDegrees(equationOfTime) * 4; // in minutes of time\r\n }\r\n\r\n /**\r\n * Return the hour angle of the sun at sunrise for the\r\n * latitude.\r\n *\r\n * @param lat\r\n * , the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @param solarEvent\r\n\t * If the hour angle is for sunrise or sunset\r\n * @return hour angle of sunrise in radians\r\n */\r\n private static getSunHourAngle(lat: number, solarDec: number, zenith: number, solarEvent: SolarEvent): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n let hourAngle: number = (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad)));\r\n if (solarEvent == SolarEvent.SUNSET) {\r\n hourAngle = -hourAngle;\r\n }\r\n return hourAngle;\r\n }\r\n\r\n /**\r\n * Return the Solar Elevation for the\r\n * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the\r\n * horizon. Not corrected for altitude.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param lat\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees\r\n */\r\n\r\n /*public static getSolarElevation(date: Temporal.PlainDate, lat: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n return MathUtils.radiansToDegrees(Math.asin((Math.sin(latRad) * Math.sin(decRad))\r\n + (Math.cos(latRad) * Math.cos(decRad) * Math.cos(hourAngleRad))));\r\n } */\r\n\r\n /**\r\n * Return the Solar Azimuth for the\r\n * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0\r\n * degrees.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param latitude\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return FIXME\r\n */\r\n\r\n /* public static getSolarAzimuth(date: Temporal.PlainDate, latitude: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(latitude);\r\n\r\n return MathUtils.radiansToDegrees(Math.atan(Math.sin(hourAngleRad)\r\n / ((Math.cos(hourAngleRad) * Math.sin(latRad)) - (Math.tan(decRad) * Math.cos(latRad))))) + 180;\r\n } */\r\n\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const julianDay = NOAACalculator.getJulianDay(calendar);\r\n const julianCenturies = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\t\t\r\n let noon = NOAACalculator.getSolarNoonUTC(julianCenturies, -geoLocation.getLongitude());\r\n noon = noon / 60;\r\n\r\n return noon > 0 ? noon % 24 : noon % 24 + 24; // ensure that the time is >= 0 and < 24\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of solar noon for the given day at the given location\r\n * on earth.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSolarNoonUTC(julianCenturies: number, longitude: number): number {\r\n // First pass uses approximate solar noon to calculate eqtime\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + longitude / 360);\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n const solNoonUTC: number = 720 + (longitude * 4) - eqTime; // min\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) - 0.5 + solNoonUTC / 1440);\r\n\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n return 720 + (longitude * 4) - eqTime; // min\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunset for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * : longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero Universal Coordinated Time (UTC)\r\n */\r\n private static getSunRiseSetUTC(julianDay: number, latitude: number, longitude: number, zenith: number, solarEvent:SolarEvent): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First calculates sunrise and approx length of day\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngle(latitude, solarDec, zenith, solarEvent);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta;\r\n let timeUTC: number = 720 + timeDiff - eqTime;\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngle(latitude, solarDec, zenith, solarEvent);\r\n\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n}\r\n", "import { Big } from 'big.js';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './util/AstronomicalCalculator.ts';\r\nimport { NOAACalculator } from './util/NOAACalculator.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from './polyfills/errors.ts';\r\nimport { TimeZone } from './polyfills/Utils.ts';\r\n\r\nenum SolarEvent {\r\n SUNRISE, SUNSET, NOON, MIDNIGHT\r\n}\r\n\r\n/**\r\n * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise} and {@link #getSunset()\r\n * sunset} times. This class contains a {@link #getCalendar() Calendar} and can therefore use the standard Calendar\r\n * functionality to change dates etc... The calculation engine used to calculate the astronomical times can be changed\r\n * to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with the\r\n * {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations\r\n * are included in the util package.\r\n * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This\r\n * is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never\r\n * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far\r\n * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the\r\n * year. When the calculations encounter this condition a null will be returned when a\r\n * {@link java.util.Date} is expected and {@link Long#MIN_VALUE} when a long is expected. The\r\n * reason that Exceptions are not thrown in these cases is because the lack of a rise/set or twilight is\r\n * not an exception, but an expected condition in many parts of the world.\r\n *\r\n * Here is a simple example of how to use the API to calculate sunrise.\r\n * First create the Calendar for the location you would like to calculate sunrise or sunset times for:\r\n *\r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * AstronomicalCalendar ac = new AstronomicalCalendar(location);\r\n * 
\r\n *\r\n * To get the time of sunrise, first set the date you want (if not set, the date will default to today):\r\n *\r\n *
\r\n * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n * Date sunrise = ac.getSunrise();\r\n * 
\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n */\r\nexport class AstronomicalCalendar {\r\n /**\r\n * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below\r\n * the horizon at sunrise and sunset.\r\n * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith\r\n * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not\r\n * be used for calculations above or below 90° since they are usually calculated as an offset to 90°.\r\n */\r\n public static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /** Sun's zenith at civil twilight (96°). */\r\n public static readonly CIVIL_ZENITH: number = 96;\r\n\r\n /** Sun's zenith at nautical twilight (102°). */\r\n public static readonly NAUTICAL_ZENITH: number = 102;\r\n\r\n /** Sun's zenith at astronomical twilight (108°). */\r\n public static readonly ASTRONOMICAL_ZENITH: number = 108;\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n public static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanosecond');\r\n\r\n /**\r\n * The Java Calendar encapsulated by this class to track the current date used by the class\r\n */\r\n private date!: Temporal.PlainDate;\r\n\r\n /**\r\n * the {@link GeoLocation} used for calculations.\r\n */\r\n private geoLocation!: GeoLocation;\r\n\r\n /**\r\n * the internal {@link AstronomicalCalculator} used for calculating solar based times.\r\n */\r\n private astronomicalCalculator!: AstronomicalCalculator;\r\n\r\n /**\r\n * The getSunrise method Returns a Date representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used\r\n * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.\r\n *\r\n * @return the Date representing the exact sunrise time. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunrise()\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n */\r\n public getSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the\r\n * base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @return the Date representing the exact sea-level sunrise time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSeaLevelSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSeaLevelSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of civil twilight\r\n\t * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n\t * \r\n\t * @return The Date of the beginning of civil twilight using a zenith of 96°. If the calculation\r\n\t * can't be computed, null will be returned. See detailed explanation on top of the page.\r\n\t * @see #CIVIL_ZENITH\r\n\t */\r\n public getBeginCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of nautical twilight using a zenith of {@link\r\n * #NAUTICAL_ZENITH 102°}.\r\n * \r\n * @return The Date of the beginning of nautical twilight using a zenith of 102°. If the\r\n * calculation can't be computed null will be returned. See detailed explanation on top of the page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getBeginNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of astronomical twilight using a zenith of\r\n\t * {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return The Date of the beginning of astronomical twilight using a zenith of 108°. If the\r\n * calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * The getSunset method Returns a Date representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for\r\n * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:\r\n * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone\r\n * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this\r\n * case the sunset date will be incremented to the following date.\r\n *\r\n * @return the Date representing the exact sunset time. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunset()\r\n * @see AstronomicalCalendar#getUTCSunset\r\n */\r\n public getSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the\r\n * base for dusk calculations that are calculated as a dip below the horizon after sunset.\r\n *\r\n * @return the Date representing the exact sea-level sunset time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset 2see {@link #getSunset()}\r\n */\r\n public getSeaLevelSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSeaLevelSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * A method that returns the end of civil twilight\r\n\t * using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n *\r\n * @return The Date of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If\r\n * the calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #CIVIL_ZENITH\r\n */\r\n public getEndCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.\r\n *\r\n * @return The Date of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}\r\n * . If the calculation can't be computed, null will be returned. See detailed explanation on top of the\r\n * page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getEndNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return the Date of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH\r\n * 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top\r\n * of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getEndAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of\r\n * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use\r\n * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a\r\n * parameter.\r\n * @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunriseOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const dawn: number = this.getUTCSunrise(offsetZenith);\r\n if (Number.isNaN(dawn)) return null;\r\n return this.getDateFromTime(dawn, SolarEvent.SUNRISE);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()\r\n * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an\r\n * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative\r\n * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after\r\n * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n * @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(offsetZenith);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, SolarEvent.SUNSET);\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n */\r\n\r\n /*\r\n constructor() {\r\n this(new GeoLocation());\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes in geolocation information as a\r\n * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar\r\n * calculations is the the {@link NOAACalculator}.\r\n *\r\n * @param geoLocation\r\n * The location information used for calculating astronomical sun times.\r\n *\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.\r\n */\r\n constructor(geoLocation: GeoLocation) {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n this.setGeoLocation(geoLocation); // duplicate call\r\n this.setAstronomicalCalculator(new NOAACalculator());\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n */\r\n public getUTCSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible\r\n * light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This\r\n * forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSeaLevelSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and\r\n * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the\r\n * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated\r\n * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after\r\n * sunset.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time before sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n */\r\n public getUTCSeaLevelSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns an {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted}\r\n * temporal (solar) hour. The day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} is split into 12\r\n * equal parts with each one being a temporal hour.\r\n *\r\n * @see #getSunrise()\r\n * @see #getSunset()\r\n * @see #getTemporalHour(Date, Date)\r\n *\r\n * @return the long millisecond length of a temporal hour. If the calculation can't be computed,\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour(Date, Date)\r\n */\r\n\r\n /*\r\n public getTemporalHour(): number {\r\n return this.getTemporalHour(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset\r\n * passed as parameters to this method. An example of the use of this method would be the calculation of a\r\n * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and\r\n * {@link #getSeaLevelSunset() sea level sunset} as parameters.\r\n *\r\n * @param startOfday\r\n * The start of the day.\r\n * @param endOfDay\r\n * The end of the day.\r\n *\r\n * @return the long millisecond length of the temporal hour. If the calculation can't be computed a\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour()\r\n */\r\n public getTemporalHour(startOfday: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()) {\r\n if (startOfday === null || endOfDay === null) {\r\n return;\r\n }\r\n const intValue = startOfday.until(endOfDay).total({ unit: 'nanoseconds' }) / 12;\r\n return Temporal.Duration.from({ nanoseconds: Math.trunc(intValue) })\r\n }\r\n\r\n /**\r\n * A method that returns \"solar\" midnight, or the time when the sun is at its nadir.\r\n * Note: this method is experimental and might be removed.\r\n * \r\n * @return the Date of Solar Midnight (chatzos layla). If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSolarMidnight(): Temporal.ZonedDateTime | null {\r\n const clonedCal = this.clone();\r\n clonedCal.setDate(this.getDate().add({ days: 1 }));\r\n return this.getSunTransit()!\r\n .add({nanoseconds: Math.trunc(this.getSunTransit()?.until(clonedCal.getSunTransit()!).total({ unit: \"nanoseconds\" })! / 2)});\r\n }\r\n\r\n /**\r\n * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is\r\n * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the\r\n * real transit time due to changes in declination (the lengthening or shortening day).\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or\r\n * any arbitrary start of day) passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any\r\n * arbitrary end of day) passed to this method.\r\n *\r\n * @return the Date representing Sun's transit. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, null will be returned. See detailed explanation on top of the page.\r\n */\r\n public getSunTransit(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n if (startOfDay) {\r\n if (!endOfDay)\r\n throw new IllegalArgumentException('No argument for the end of day provided');\r\n\r\n const temporalHour = this.getTemporalHour(startOfDay, endOfDay)!;\r\n let offsetTime = startOfDay;\r\n for (let index = 0; index < 6; index++) {\r\n offsetTime = offsetTime.add(temporalHour);\r\n }\r\n\r\n return offsetTime;\r\n }\r\n\r\n const noon = this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(), this.getGeoLocation());\r\n return this.getDateFromTime(noon, SolarEvent.NOON);\r\n }\r\n\r\n public getSunLowerTransit(): Temporal.ZonedDateTime {\r\n\t\tlet cal: Temporal.PlainDate = this.getAdjustedDate();\r\n\t\tconst lowerGeoLocation: GeoLocation = this.getGeoLocation().clone();\r\n\t\tconst meridian: number = lowerGeoLocation.getLongitude();\r\n\t\tlet lowerMeridian: number = meridian + 180;\r\n\t\tif (lowerMeridian > 180){\r\n\t\t\tlowerMeridian = lowerMeridian - 360;\r\n cal = cal.subtract({ days: 1 })\r\n\t\t}\r\n\t\tlowerGeoLocation.setLongitude(lowerMeridian);\r\n\t\tconst noon: number = this.getAstronomicalCalculator().getUTCNoon(cal, lowerGeoLocation);\r\n\t\treturn this.getDateFromTime(noon, SolarEvent.MIDNIGHT)!;\r\n\t}\r\n\r\n /**\r\n * A method that returns a Date from the time passed in as a parameter.\r\n *\r\n * @param time\r\n * The time to be set as the time for the Date. The time expected is in the format: 18.75\r\n * for 6:45:00 PM.\r\n * @param isSunrise true if the time is sunrise, and false if it is sunset\r\n * @return The Date.\r\n */\r\n protected getDateFromTime(time: number, solarEvent: SolarEvent): Temporal.ZonedDateTime | null {\r\n if (Number.isNaN(time)) {\r\n return null;\r\n }\r\n let calculatedTime: number = time;\r\n\r\n const adjustedDate: Temporal.PlainDate = this.getAdjustedDate();\r\n let cal = adjustedDate.toZonedDateTime(\"UTC\");\r\n\r\n const hours: number = Math.trunc(calculatedTime); // retain only the hours\r\n calculatedTime -= hours;\r\n const minutes: number = Math.trunc(calculatedTime *= 60); // retain only the minutes\r\n calculatedTime -= minutes;\r\n const seconds: number = Math.trunc(calculatedTime *= 60); // retain only the seconds\r\n calculatedTime -= seconds; // remaining milliseconds\r\n const milliseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= milliseconds;\r\n const microseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= microseconds; // remaining nanoseconds\r\n\r\n\r\n // Check if a date transition has occurred, or is about to occur - this indicates the date of the event is\r\n // actually not the target date, but the day prior or after\r\n const localTimeHours: number = Math.trunc(this.getGeoLocation().getLongitude() / 15);\r\n if (solarEvent == SolarEvent.SUNRISE && localTimeHours + hours > 18) {\r\n cal = cal.subtract({ days: 1 });\r\n } else if (solarEvent == SolarEvent.SUNSET && localTimeHours + hours < 6) {\r\n cal = cal.add({ days: 1 });\r\n } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours + hours > 12) {\r\n\t\t\tcal = cal.subtract({ days: 1 });\r\n\t\t}\r\n\r\n return cal.with({\r\n hour: hours,\r\n minute: minutes,\r\n second: seconds,\r\n millisecond: milliseconds,\r\n microsecond: microseconds,\r\n nanosecond: Math.trunc(calculatedTime * 1000)\r\n }).withTimeZone(this.geoLocation.getTimeZone());\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon before sunrise that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon before sunrise that match the offset in minutes passed it as a parameter.\r\n * @see #getSunsetSolarDipFromOffset(double)\r\n */\r\n public getSunriseSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise()?.subtract({ minutes })!;\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.0001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees === null || ((minutes < 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes > 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon after sunset that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon after sunset that match the offset in minutes passed it as a parameter.\r\n * @see #getSunriseSolarDipFromOffset(double)\r\n */\r\n public getSunsetSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()?.add({ minutes })!\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * FIXME broken for czc.getRiseSetSolarDipFromOffset(-72, czc.getSunrise());\r\n * and broken in other was as well\r\n * @param minutes\r\n * @param riseSet\r\n * @return\r\n */\r\n /*\r\n public getRiseSetSolarDipFromOffset(minutes: number, riseSet: DateTime): number {\r\n let offsetByDegrees: DateTime | null = riseSet;\r\n const offsetByTime: DateTime | null = AstronomicalCalendar.getTimeOffset(riseSet, minutes * AstronomicalCalendar.MIUTE_MILLIS);\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n return degrees.valueOf();\r\n }\r\n */\r\n\r\n /**\r\n\t * A method that returns local mean time (LMT) time\r\n\t * converted to regular clock time for the number of hours (0.0 to 23.999...) passed to this method. This time is\r\n\t * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates\r\n\t * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm.\r\n\t * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is\r\n\t * multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a noon time of 11:56:53am. This\r\n\t * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT.\r\n\t * \r\n\t * @param hours\r\n\t * \t\t\tthe hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of\r\n\t * \t\t\t0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range.\r\n\t * @return the Date representing the local mean time (LMT) for the number of hours passed in. In Lakewood, NJ, passing 12\r\n\t * (noon) will return 11:56:50am.\r\n\t * @see GeoLocation#getLocalMeanTimeOffset()\r\n\t */\r\n\tpublic getLocalMeanTime(hours:number): Temporal.ZonedDateTime | null {\r\n\t\tif(hours < 0 || hours >= 24) {\r\n\t\t\tthrow new IllegalArgumentException(\"Hours must between 0 and 23.9999...\");\r\n\t\t}\r\n \r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / AstronomicalCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(hours - rawOffsetHours, SolarEvent.SUNRISE)?.subtract({ nanoseconds: geoLocation.getLocalMeanTimeOffset() })!;\r\n\t}\r\n\r\n /**\r\n * Adjusts the Calendar to deal with edge cases where the location crosses the antimeridian.\r\n *\r\n * @see GeoLocation#getAntimeridianAdjustment()\r\n * @return the adjusted Calendar\r\n */\r\n private getAdjustedDate(): Temporal.PlainDate {\r\n const offset: -1 | 0 | 1 = this.getGeoLocation().getAntimeridianAdjustment();\r\n if (offset === 0) return this.getDate();\r\n return this.getDate().add({ days: offset });\r\n }\r\n\r\n /**\r\n * @return an XML formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toXML(AstronomicalCalendar) toXML} method.\r\n * @see ZmanimFormatter#toXML(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated (This depends on a circular dependency).\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency.');\r\n }\r\n\r\n /**\r\n * @return a JSON formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toJSON(AstronomicalCalendar) toJSON} method.\r\n * @see ZmanimFormatter#toJSON(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated This depends on a circular dependency. Use
ZmanimFormatter.toJSON(astronomicalCalendar)
instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toJSON(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency. '\r\n + 'Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) {\r\n return true;\r\n }\r\n if (!(object instanceof AstronomicalCalendar)) {\r\n return false;\r\n }\r\n const aCal: AstronomicalCalendar = object as AstronomicalCalendar;\r\n return this.getDate().equals(aCal.getDate()) && this.getGeoLocation().equals(aCal.getGeoLocation())\r\n && this.getAstronomicalCalculator() === aCal.getAstronomicalCalculator();\r\n }\r\n\r\n /**\r\n * A method that returns the currently set {@link GeoLocation} which contains location information used for the\r\n * astronomical calculations.\r\n *\r\n * @return Returns the geoLocation.\r\n */\r\n public getGeoLocation(): GeoLocation {\r\n return this.geoLocation;\r\n }\r\n\r\n /**\r\n * Sets the {@link GeoLocation} Object to be used for astronomical calculations.\r\n *\r\n * @param geoLocation\r\n * The geoLocation to set.\r\n */\r\n public setGeoLocation(geoLocation: GeoLocation): void {\r\n this.geoLocation = geoLocation;\r\n }\r\n\r\n /**\r\n * A method that returns the currently set AstronomicalCalculator.\r\n *\r\n * @return Returns the astronomicalCalculator.\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator)\r\n */\r\n public getAstronomicalCalculator(): AstronomicalCalculator {\r\n return this.astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * A method to set the {@link AstronomicalCalculator} used for astronomical calculations. The Zmanim package ships\r\n * with a number of different implementations of the abstract {@link AstronomicalCalculator} based on\r\n * different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link\r\n * com.kosherjava.zmanim.util.SunTimesCalculator} based on the US\r\n * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms.\r\n *\r\n * @param astronomicalCalculator\r\n * The astronomicalCalculator to set.\r\n */\r\n public setAstronomicalCalculator(astronomicalCalculator: AstronomicalCalculator): void {\r\n this.astronomicalCalculator = astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * returns the Calendar object encapsulated in this class.\r\n *\r\n * @return Returns the calendar.\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * @param calendar\r\n * The calendar to set.\r\n */\r\n public setDate(date: Temporal.PlainDate | Date | string | number): void {\r\n if (date instanceof Temporal.PlainDate) {\r\n this.date = date;\r\n } else if (date instanceof Date) {\r\n this.date = Temporal.Instant.fromEpochMilliseconds(date.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate();\r\n } else if (typeof date === 'string') {\r\n this.date = Temporal.PlainDate.from(date);\r\n }\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the cloned {@link GeoLocation} will\r\n * be changed from the original, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset after being cloned.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalendar {\r\n const clonedCalendar: AstronomicalCalendar = new AstronomicalCalendar(this.geoLocation);\r\n clonedCalendar.setDate(this.date);\r\n clonedCalendar.setAstronomicalCalculator(this.astronomicalCalculator);\r\n\r\n return clonedCalendar;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.AstronomicalCalendar';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}\r\n * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar\r\n * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally\r\n * in any calculations. This class also does not have a concept of a time (which the Date class does). Please\r\n * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the\r\n * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from\r\n * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359\r\n * CE Julian as recorded by Rav Hai Gaon) would be just an\r\n * approximation.\r\n *\r\n * This open source Java code was written by Avrom Finkelstien from his C++\r\n * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug\r\n * fixing.\r\n *\r\n * Some of Avrom's original C++ code was translated from C/C++\r\n * code in Calendrical Calculations by Nachum Dershowitz and Edward M.\r\n * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark\r\n * \"ND+ER\" indicates that the method was taken from this source with minor modifications.\r\n *\r\n * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from\r\n * the ICU (International Components for Unicode) project, formerly part of\r\n * IBM's DeveloperWorks.\r\n *\r\n * @see JewishCalendar\r\n * @see HebrewDateFormatter\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class JewishDate {\r\n /**\r\n * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly NISSAN: number = 1;\r\n\r\n /**\r\n * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly IYAR: number = 2;\r\n\r\n /**\r\n * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly SIVAN: number = 3;\r\n\r\n /**\r\n * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly TAMMUZ: number = 4;\r\n\r\n /**\r\n * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year\r\n * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year})\r\n * month of the year.\r\n */\r\n public static readonly AV: number = 5;\r\n\r\n /**\r\n * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly ELUL: number = 6;\r\n\r\n /**\r\n * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at this month, it would actually be the 1st month of the year.\r\n */\r\n public static readonly TISHREI: number = 7;\r\n\r\n /**\r\n * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish\r\n * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.\r\n */\r\n public static readonly CHESHVAN: number = 8;\r\n\r\n /**\r\n * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.\r\n */\r\n public static readonly KISLEV: number = 9;\r\n\r\n /**\r\n * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 4th month of the year.\r\n */\r\n public static readonly TEVES: number = 10;\r\n\r\n /**\r\n * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.\r\n */\r\n public static readonly SHEVAT: number = 11;\r\n\r\n /**\r\n * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth\r\n * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually\r\n * be the 6th month of the year.\r\n */\r\n public static readonly ADAR: number = 12;\r\n\r\n /**\r\n * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric\r\n * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11,\r\n * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month\r\n * of the year.\r\n */\r\n public static readonly ADAR_II: number = 13;\r\n\r\n /**\r\n * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations.\r\n * Day 1 is January 1, 0001 Gregorian\r\n */\r\n private static readonly JEWISH_EPOCH: number = -1373429;\r\n\r\n /** The number of chalakim (18) in a minute. */\r\n private static readonly CHALAKIM_PER_MINUTE: number = 18;\r\n\r\n /** The number of chalakim (1080) in an hour. */\r\n private static readonly CHALAKIM_PER_HOUR: number = 1080;\r\n\r\n /** The number of chalakim (25,920) in a 24 hour day. */\r\n private static readonly CHALAKIM_PER_DAY: number = 25920; // 24 * 1080\r\n\r\n /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793\r\n * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */\r\n private static readonly CHALAKIM_PER_MONTH: number = 765433; // (29 * 24 + 12) * 1080 + 793\r\n\r\n /**\r\n * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) *\r\n * 1080 + 204 = 31524\r\n */\r\n private static readonly CHALAKIM_MOLAD_TOHU: number = 31524;\r\n\r\n /**\r\n * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly CHASERIM: number = 0;\r\n\r\n /**\r\n * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly KESIDRAN: number = 1;\r\n\r\n /**\r\n * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly SHELAIMIM: number = 2;\r\n\r\n private date: Temporal.PlainDate;\r\n\r\n /** the internal count of molad hours. */\r\n private moladHours!: number;\r\n\r\n /** the internal count of molad minutes. */\r\n private moladMinutes!: number;\r\n\r\n /** the internal count of molad chalakim. */\r\n private moladChalakim!: number;\r\n\r\n /**\r\n * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad hours\r\n * @see #setMoladHours(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladHours(): number {\r\n return this.moladHours;\r\n }\r\n\r\n /**\r\n * Sets the molad hours.\r\n *\r\n * @param moladHours\r\n * the molad hours to set\r\n * @see #getMoladHours()\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladHours(moladHours: number): void {\r\n this.moladHours = moladHours;\r\n }\r\n\r\n /**\r\n * Returns the molad minutes. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad minutes\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladMinutes(): number {\r\n return this.moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to\r\n * 44 and chalakim to 1.\r\n *\r\n * @param moladMinutes\r\n * the molad minutes to set\r\n * @see #getMoladMinutes()\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladMinutes(moladMinutes: number): void {\r\n this.moladMinutes = moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and\r\n * chalakim to 1.\r\n *\r\n * @param moladChalakim\r\n * the molad chalakim/parts to set\r\n * @see #getMoladChalakim()\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladChalakim(moladChalakim: number): void {\r\n this.moladChalakim = moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad chalakim/parts\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladChalakim(): number {\r\n return this.moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the last day in a gregorian month\r\n *\r\n * @param month\r\n * the Gregorian month\r\n * @return the last day of the Gregorian month\r\n */\r\n public getLastDayOfGregorianMonth(month: number): number {\r\n return this.date.with({ month }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days in a given month in a given month and year.\r\n *\r\n * @param month\r\n * the month. As with other cases in this class, this is 1-based, not zero-based.\r\n * @param year\r\n * the year (only impacts February)\r\n * @return the number of days in the month in the given year\r\n */\r\n private static getLastDayOfGregorianMonth(month: number, year: number): number {\r\n switch (month) {\r\n case 2:\r\n if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {\r\n return 29;\r\n }\r\n return 28;\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n return 30;\r\n default:\r\n return 31;\r\n }\r\n }\r\n\r\n /**\r\n * Computes the Gregorian date from the absolute date. ND+ER\r\n * @param absDate - the absolute date\r\n */\r\n private absDateToDate(absDate: number): void {\r\n let year: number = Math.trunc(absDate / 366); // Search forward year by year from approximate year\r\n while (absDate >= JewishDate.gregorianDateToAbsDate(year + 1, 1, 1)) {\r\n year++;\r\n }\r\n\r\n let month: number = 1; // Search forward month by month from January\r\n while (absDate > JewishDate.gregorianDateToAbsDate(year, month, JewishDate.getLastDayOfGregorianMonth(month, year))) {\r\n month++;\r\n }\r\n\r\n const dayOfMonth: number = absDate - JewishDate.gregorianDateToAbsDate(year, month, 1) + 1;\r\n this.setInternalGregorianDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Computes the absolute date from a Gregorian date. ND+ER\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for\r\n * January\r\n * @param dayOfMonth\r\n * the day of the month (1st, 2nd, etc...)\r\n * @return the absolute Gregorian day\r\n */\r\n private static gregorianDateToAbsDate(year: number, month: number, dayOfMonth: number): number {\r\n let absDate: number = dayOfMonth;\r\n for (let m: number = month - 1; m > 0; m--) {\r\n absDate += JewishDate.getLastDayOfGregorianMonth(m, year); // days in prior months of the year\r\n }\r\n return (absDate // days this year\r\n + 365 * (year - 1) // days in previous years ignoring leap days\r\n + Math.trunc((year - 1) / 4) // Julian leap days before this year\r\n - Math.trunc((year - 1) / 100) // minus prior century years\r\n + Math.trunc((year - 1) / 400)); // plus prior years divisible by 400\r\n }\r\n\r\n /**\r\n * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear()\r\n */\r\n private static isJewishLeapYear(year: number): boolean {\r\n return ((7 * year) + 1) % 19 < 7;\r\n }\r\n\r\n /**\r\n * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year\r\n * cycle are leap years.\r\n *\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n public isJewishLeapYear(): boolean {\r\n return JewishDate.isJewishLeapYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year}\r\n * or 13 on a leap year.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return 12 on a non leap year or 13 on a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n private static getLastMonthOfJewishYear(year: number): number {\r\n return JewishDate.isJewishLeapYear(year) ? JewishDate.ADAR_II : JewishDate.ADAR;\r\n }\r\n\r\n /**\r\n * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean\r\n * conjunction of Tishri of the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the\r\n * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday\r\n * evening).\r\n */\r\n public static getJewishCalendarElapsedDays(year: number): number {\r\n const chalakimSince: number = JewishDate.getChalakimSinceMoladTohu(year, JewishDate.TISHREI);\r\n const moladDay: number = Math.trunc(chalakimSince / JewishDate.CHALAKIM_PER_DAY);\r\n const moladParts: number = Math.trunc(chalakimSince - moladDay * JewishDate.CHALAKIM_PER_DAY);\r\n // delay Rosh Hashana for the 4 dechiyos\r\n return JewishDate.addDechiyos(year, moladDay, moladParts);\r\n }\r\n\r\n // private static int getJewishCalendarElapsedDaysOLD(int year) {\r\n // // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // // Molad Tohu = BeHaRaD - Monday, 5 hours (11 PM) and 204 chalakim\r\n // final int chalakimTashTZag = 793; // chalakim in a lunar month\r\n // final int chalakimTohuRaD = 204; // chalakim from original molad Tohu BeHaRaD\r\n // final int hoursTohuHa = 5; // hours from original molad Tohu BeHaRaD\r\n // final int dayTohu = 1; // Monday (0 based)\r\n //\r\n // int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n // + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n // + ((7 * ((year - 1) % 19) + 1) / 19); // Leap months this cycle\r\n // // start with Molad Tohu BeHaRaD\r\n // // start with RaD of BeHaRaD and add TaShTzaG (793) chalakim plus elapsed chalakim\r\n // int partsElapsed = chalakimTohuRaD + chalakimTashTZag * (monthsElapsed % 1080);\r\n // // start with Ha hours of BeHaRaD, add 12 hour remainder of lunar month add hours elapsed\r\n // int hoursElapsed = hoursTohuHa + 12 * monthsElapsed + 793 * (monthsElapsed / 1080) + partsElapsed / 1080;\r\n // // start with Monday of BeHaRaD = 1 (0 based), add 29 days of the lunar months elapsed\r\n // int conjunctionDay = dayTohu + 29 * monthsElapsed + hoursElapsed / 24;\r\n // int conjunctionParts = 1080 * (hoursElapsed % 24) + partsElapsed % 1080;\r\n // return addDechiyos(year, conjunctionDay, conjunctionParts);\r\n // }\r\n\r\n /**\r\n * Adds the 4 dechiyos for molad Tishrei. These are:\r\n *
    \r\n *
  1. Lo ADU Rosh - Rosh Hashana can't fall on a Sunday, Wednesday or Friday. If the molad fell on one of these\r\n * days, Rosh Hashana is delayed to the following day.
  2. \r\n *
  3. Molad Zaken - If the molad of Tishrei falls after 12 noon, Rosh Hashana is delayed to the following day. If\r\n * the following day is ADU, it will be delayed an additional day.
  4. \r\n *
  5. GaTRaD - If on a non leap year the molad of Tishrei falls on a Tuesday (Ga) on or after 9 hours (T) and 204\r\n * chalakim (TRaD) it is delayed till Thursday (one day delay, plus one day for Lo ADU Rosh)
  6. \r\n *
  7. BeTuTaKFoT - if the year following a leap year falls on a Monday (Be) on or after 15 hours (Tu) and 589\r\n * chalakim (TaKFoT) it is delayed till Tuesday
  8. \r\n *
\r\n *\r\n * @param year - the year\r\n * @param moladDay - the molad day\r\n * @param moladParts - the molad parts\r\n * @return the number of elapsed days in the JewishCalendar adjusted for the 4 dechiyos.\r\n */\r\n private static addDechiyos(year: number, moladDay: number, moladParts: number): number {\r\n let roshHashanaDay: number = moladDay; // if no dechiyos\r\n // delay Rosh Hashana for the dechiyos of the Molad - new moon 1 - Molad Zaken, 2- GaTRaD 3- BeTuTaKFoT\r\n if ((moladParts >= 19440) // Dechiya of Molad Zaken - molad is >= midday (18 hours * 1080 chalakim)\r\n || (((moladDay % 7) === 2) // start Dechiya of GaTRaD - Ga = is a Tuesday\r\n && (moladParts >= 9924) // TRaD = 9 hours, 204 parts or later (9 * 1080 + 204)\r\n && !JewishDate.isJewishLeapYear(year)) // of a non-leap year - end Dechiya of GaTRaD\r\n || (((moladDay % 7) === 1) // start Dechiya of BeTuTaKFoT - Be = is on a Monday\r\n && (moladParts >= 16789) // TRaD = 15 hours, 589 parts or later (15 * 1080 + 589)\r\n && (JewishDate.isJewishLeapYear(year - 1)))) { // in a year following a leap year - end Dechiya of BeTuTaKFoT\r\n roshHashanaDay += 1; // Then postpone Rosh HaShanah one day\r\n }\r\n // start 4th Dechiya - Lo ADU Rosh - Rosh Hashana can't occur on A- sunday, D- Wednesday, U - Friday\r\n if (((roshHashanaDay % 7) === 0) // If Rosh HaShanah would occur on Sunday,\r\n || ((roshHashanaDay % 7) === 3) // or Wednesday,\r\n || ((roshHashanaDay % 7) === 5)) { // or Friday - end 4th Dechiya - Lo ADU Rosh\r\n roshHashanaDay++; // Then postpone it one (more) day\r\n }\r\n return roshHashanaDay;\r\n }\r\n\r\n /**\r\n * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the year\r\n * and month passed in.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @param month\r\n * the Jewish month the Jewish month, with the month numbers starting from Nisan. Use the JewishDate\r\n * constants such as {@link JewishDate#TISHREI}.\r\n * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu\r\n */\r\n private static getChalakimSinceMoladTohu(year: number, month: number): number {\r\n // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // chalakim since Molad Tohu BeHaRaD - 1 day, 5 hours and 204 chalakim\r\n const monthOfYear: number = JewishDate.getJewishMonthOfYear(year, month);\r\n const monthsElapsed: number = (235 * Math.trunc((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n + Math.trunc((7 * ((year - 1) % 19) + 1) / 19) // Leap months this cycle\r\n + (monthOfYear - 1); // add elapsed months till the start of the molad of the month\r\n // return chalakim prior to BeHaRaD + number of chalakim since\r\n return JewishDate.CHALAKIM_MOLAD_TOHU + (JewishDate.CHALAKIM_PER_MONTH * monthsElapsed);\r\n }\r\n\r\n /**\r\n * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the Jewish\r\n * year and month that this Object is set to.\r\n *\r\n * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu\r\n */\r\n public getChalakimSinceMoladTohu(): number {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n return JewishDate.getChalakimSinceMoladTohu(hebrewCalendar.year, this.getJewishMonth());\r\n }\r\n\r\n /**\r\n * Converts the {@link JewishDate#NISSAN} based constants used by this class to numeric month starting from\r\n * {@link JewishDate#TISHREI}. This is required for Molad claculations.\r\n *\r\n * @param year\r\n * The Jewish year\r\n * @param month\r\n * The Jewish Month\r\n * @return the Jewish month of the year starting with Tishrei\r\n */\r\n private static getJewishMonthOfYear(year: number, month: number): number {\r\n const jDate = new JewishDate(year, month, 1)\r\n return jDate.date.withCalendar(\"hebrew\").month;\r\n }\r\n\r\n /**\r\n * Validates the components of a Jewish date for validity. It will throw an {@link IllegalArgumentException} if the\r\n * Jewish date is earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * {@link #isJewishLeapYear(int) leap year}), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 >\r\n * 59 or chalakim < 0 > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into\r\n * minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793/TaShTzaG).\r\n *\r\n * @param year\r\n * the Jewish year to validate. It will reject any year <= 3761 (lower than the year 1 Gregorian).\r\n * @param month\r\n * the Jewish month to validate. It will reject a month < 1 or > 12 (or 13 on a leap year) .\r\n * @param dayOfMonth\r\n * the day of the Jewish month to validate. It will reject any value < 1 or > 30 TODO: check calling\r\n * methods to see if there is any reason that the class can validate that 30 is invalid for some months.\r\n * @param hours\r\n * the hours (for molad calculations). It will reject an hour < 0 or > 23\r\n * @param minutes\r\n * the minutes (for molad calculations). It will reject a minute < 0 or > 59\r\n * @param chalakim\r\n * the chalakim/parts (for molad calculations). It will reject a chalakim < 0 or > 17. For larger numbers\r\n * such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44\r\n * minutes and 1 chelek in the case of 793/TaShTzaG)\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n private static validateJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void {\r\n if (month < JewishDate.NISSAN || month > JewishDate.getLastMonthOfJewishYear(year)) {\r\n throw new IllegalArgumentException(`The Jewish month has to be between 1 and 12 (or 13 on a leap year). ${month} is invalid for the year ${year}.`);\r\n }\r\n if (dayOfMonth < 1 || dayOfMonth > 30) {\r\n throw new IllegalArgumentException(`The Jewish day of month can't be < 1 or > 30. ${dayOfMonth} is invalid.`);\r\n }\r\n // reject dates prior to 18 Teves, 3761 (1/1/1 AD). This restriction can be relaxed if the date coding is\r\n // changed/corrected\r\n if ((year < 3761) || (year === 3761 && (month >= JewishDate.TISHREI && month < JewishDate.TEVES))\r\n || (year === 3761 && month === JewishDate.TEVES && dayOfMonth < 18)) {\r\n throw new IllegalArgumentException(`A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian) can't be set. ${year}, ${month}, ${dayOfMonth} is invalid.`);\r\n }\r\n if (hours < 0 || hours > 23) {\r\n throw new IllegalArgumentException(`Hours < 0 or > 23 can't be set. ${hours} is invalid.`);\r\n }\r\n\r\n if (minutes < 0 || minutes > 59) {\r\n throw new IllegalArgumentException(`Minutes < 0 or > 59 can't be set. ${minutes} is invalid.`);\r\n }\r\n\r\n if (chalakim < 0 || chalakim > 17) {\r\n throw new IllegalArgumentException(`Chalakim/parts < 0 or > 17 can't be set. ${chalakim} is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates the components of a Gregorian date for validity. It will throw an {@link IllegalArgumentException} if a\r\n * year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in.\r\n *\r\n * @param year\r\n * the Gregorian year to validate. It will reject any year < 1.\r\n * @param month\r\n * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a\r\n * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.\r\n * @param dayOfMonth\r\n * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31\r\n * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to\r\n * see if there is any reason that the class needs days > the maximum.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n * @see #validateGregorianYear(int)\r\n * @see #validateGregorianMonth(int)\r\n * @see #validateGregorianDayOfMonth(int)\r\n */\r\n private static validateGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n JewishDate.validateGregorianYear(year);\r\n }\r\n\r\n /**\r\n * Validates a Gregorian month for validity.\r\n *\r\n * @param month\r\n * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a\r\n * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.\r\n */\r\n private static validateGregorianMonth(month: number): void {\r\n if (month > 11 || month < 0) {\r\n throw new IllegalArgumentException(`The Gregorian month has to be between 0 - 11. ${month} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates a Gregorian day of month for validity.\r\n *\r\n * @param dayOfMonth\r\n * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31\r\n * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to\r\n * see if there is any reason that the class needs days > the maximum.\r\n */\r\n private static validateGregorianDayOfMonth(dayOfMonth: number): void {\r\n if (dayOfMonth <= 0) {\r\n throw new IllegalArgumentException(`The day of month can't be less than 1. ${dayOfMonth} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Validates a Gregorian year for validity.\r\n *\r\n * @param year\r\n * the Gregorian year to validate. It will reject any year < 1.\r\n */\r\n private static validateGregorianYear(year: number): void {\r\n if (year < 1) {\r\n throw new IllegalArgumentException(`Years < 1 can't be calculated. ${year} is invalid.`);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the number of days for a given Jewish year. ND+ER\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days for a given Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n */\r\n public static getDaysInJewishYear(year: number): number {\r\n return Temporal.PlainYearMonth.from({ year, month: 1, calendar: \"hebrew\" }).daysInYear;\r\n }\r\n\r\n /**\r\n * Returns the number of days for the current year that the calendar is set to.\r\n *\r\n * @return the number of days for the Object's current Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n * @see #isJewishLeapYear()\r\n */\r\n public getDaysInJewishYear(): number {\r\n return JewishDate.getDaysInJewishYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns if Cheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered)\r\n * year Cheshvan is short. ND+ER\r\n *\r\n * @param year\r\n * the year\r\n * @return true if Cheshvan is long in Jewish year.\r\n * @see #isCheshvanLong()\r\n * @see #getCheshvanKislevKviah()\r\n */\r\n private static isCheshvanLong(year: number): boolean {\r\n return JewishDate.getDaysInJewishYear(year) % 10 === 5;\r\n }\r\n\r\n /**\r\n * Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method\r\n * name isLong is done since in a Kesidran (ordered) year Cheshvan is short.\r\n *\r\n * @return true if Cheshvan is long for the current year that the calendar is set to\r\n * @see #isCheshvanLong()\r\n */\r\n public isCheshvanLong(): boolean {\r\n return JewishDate.isCheshvanLong(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns if Kislev is short (29 days VS 30 days) in a given Jewish year. The method name isShort is done since in\r\n * a Kesidran (ordered) year Kislev is long. ND+ER\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return true if Kislev is short for the given Jewish year.\r\n * @see #isKislevShort()\r\n * @see #getCheshvanKislevKviah()\r\n */\r\n private static isKislevShort(year: number): boolean {\r\n return JewishDate.getDaysInJewishYear(year) % 10 === 3;\r\n }\r\n\r\n /**\r\n * Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a\r\n * Kesidran (ordered) year Kislev is long.\r\n *\r\n * @return true if Kislev is short for the year that this class is set to\r\n */\r\n public isKislevShort(): boolean {\r\n return JewishDate.isKislevShort(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return\r\n * {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev\r\n * is 30 days and {@link #CHASERIM} if both are 29 days.\r\n *\r\n * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and\r\n * Kislev is 30 days and {@link #CHASERIM} if both are 29 days.\r\n * @see #isCheshvanLong()\r\n * @see #isKislevShort()\r\n */\r\n public getCheshvanKislevKviah(): number {\r\n if (this.isCheshvanLong() && !this.isKislevShort()) {\r\n return JewishDate.SHELAIMIM;\r\n } else if (!this.isCheshvanLong() && this.isKislevShort()) {\r\n return JewishDate.CHASERIM;\r\n }\r\n return JewishDate.KESIDRAN;\r\n }\r\n\r\n /**\r\n * Returns the number of days of a Jewish month for a given month and year.\r\n *\r\n * @param month\r\n * the Jewish month\r\n * @param year\r\n * the Jewish Year\r\n * @return the number of days for a given Jewish month\r\n */\r\n private static getDaysInJewishMonth(month: number, year: number): number {\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: 1, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n return Temporal.PlainDate.from({ year, month: fixedMonth, day: 15, calendar: \"hebrew\" }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days of the Jewish month that the calendar is currently set to.\r\n *\r\n * @return the number of days for the Jewish month that the calendar is currently set to.\r\n */\r\n public getDaysInJewishMonth(): number {\r\n return this.getDate().withCalendar(\"hebrew\").daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad\r\n * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim()\r\n * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This\r\n * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5,\r\n * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7.\r\n *\r\n * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours},\r\n * {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set.\r\n */\r\n public getMolad(): JewishDate {\r\n const moladDate: JewishDate = new JewishDate(this.getChalakimSinceMoladTohu());\r\n if (moladDate.getMoladHours() >= 6) {\r\n moladDate.setDate(moladDate.getDate().add({ days: 1 }));\r\n }\r\n moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24);\r\n return moladDate;\r\n }\r\n\r\n /**\r\n * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in.\r\n *\r\n * @param chalakim\r\n * the number of chalakim since the beginning of Sunday prior to BaHaRaD\r\n * @return the number of days from the Jewish epoch\r\n */\r\n private static moladToAbsDate(chalakim: number): number {\r\n return Math.trunc(chalakim / JewishDate.CHALAKIM_PER_DAY) + JewishDate.JEWISH_EPOCH;\r\n }\r\n\r\n /**\r\n * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of chalakim/parts\r\n * starting at the beginning of Sunday prior to the molad Tohu BeHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) - prior to the start of the Jewish calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080\r\n * chalakim after sunset on Sunday evening).\r\n *\r\n * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD\r\n */\r\n\r\n /*\r\n public JewishDate(molad: number) {\r\n this.absDateToDate(JewishDate.moladToAbsDate(molad));\r\n // long chalakimSince = getChalakimSinceMoladTohu(year, JewishDate.TISHREI);// tishrei\r\n const conjunctionDay: number = Math.trunc(molad / JewishDate.CHALAKIM_PER_DAY);\r\n const conjunctionParts: number = Math.trunc(molad - conjunctionDay * JewishDate.CHALAKIM_PER_DAY);\r\n this.setMoladTime(conjunctionParts);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the molad time (hours minutes and chalakim) based on the number of chalakim since the start of the day.\r\n *\r\n * @param chalakim\r\n * the number of chalakim since the start of the day.\r\n */\r\n private setMoladTime(chalakim: number): void {\r\n let adjustedChalakim: number = chalakim;\r\n this.setMoladHours(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_HOUR));\r\n adjustedChalakim = adjustedChalakim - (this.getMoladHours() * JewishDate.CHALAKIM_PER_HOUR);\r\n this.setMoladMinutes(Math.trunc(adjustedChalakim / JewishDate.CHALAKIM_PER_MINUTE));\r\n this.setMoladChalakim(adjustedChalakim - this.moladMinutes * JewishDate.CHALAKIM_PER_MINUTE);\r\n }\r\n\r\n /**\r\n * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in.\r\n *\r\n * @return the number of days\r\n */\r\n public getDaysSinceStartOfJewishYear(): number {\r\n const roshHashanah = this.date.withCalendar(\"hebrew\").with({ month: 1, day: 1 }).subtract({ days: 1 })\r\n return roshHashanah.until(this.date.withCalendar(\"hebrew\")).total(\"days\")\r\n }\r\n\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number);\r\n constructor(molad: number);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrPlainDateOrDateOrMolad?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number) {\r\n this.date = Temporal.Now.plainDateISO();\r\n if (jewishMonth) {\r\n this.setJewishDate(jewishYearOrPlainDateOrDateOrMolad as number, jewishMonth, jewishDayOfMonth!);\r\n } else if (jewishYearOrPlainDateOrDateOrMolad instanceof Date) {\r\n this.setDate(Temporal.Instant.fromEpochMilliseconds(jewishYearOrPlainDateOrDateOrMolad.valueOf()).toZonedDateTimeISO('UTC').toPlainDate());\r\n } else if (jewishYearOrPlainDateOrDateOrMolad instanceof Temporal.PlainDate) {\r\n this.setDate(jewishYearOrPlainDateOrDateOrMolad);\r\n } else if (typeof jewishYearOrPlainDateOrDateOrMolad === 'number') {\r\n const molad = jewishYearOrPlainDateOrDateOrMolad;\r\n this.absDateToDate(JewishDate.moladToAbsDate(molad));\r\n // long chalakimSince = getChalakimSinceMoladTohu(year, JewishDate.TISHREI);// tishrei\r\n const conjunctionDay: number = Math.trunc(molad / JewishDate.CHALAKIM_PER_DAY);\r\n const conjunctionParts: number = Math.trunc(molad - conjunctionDay * JewishDate.CHALAKIM_PER_DAY);\r\n this.setMoladTime(conjunctionParts);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n /*\r\n public JewishDate(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n this.setJewishDate(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Default constructor will set a default date to the current system date.\r\n */\r\n /*\r\n public JewishDate() {\r\n this.resetDate();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Date Date} paremeter.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the January 1, 1 AD\r\n */\r\n /*\r\n public JewishDate(date: Date) {\r\n this.setDate(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.\r\n *\r\n * @param calendar\r\n * the Calendar to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n\r\n /*\r\n public JewishDate(calendar: GregorianCalendar) {\r\n this.setDate(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Calendar to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n public setDate(date: Temporal.PlainDate): void {\r\n if (date.year < 1) {\r\n throw new IllegalArgumentException(`Dates with a BC era are not supported. The year ${date.year} is invalid.`);\r\n }\r\n\r\n this.date = date;\r\n }\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the year 1 AD\r\n */\r\n\r\n /*\r\n public setDate(date: Date): void {\r\n const cal: GregorianCalendar = new GregorianCalendar();\r\n cal.setTime(date);\r\n this.setDate(cal);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected\r\n * for January.\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Like the Java Calendar, this class expects 0 for January\r\n * @param dayOfMonth\r\n * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of\r\n * the month will be set\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n */\r\n public setGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianDate(year, month, dayOfMonth);\r\n this.setInternalGregorianDate(year, month + 1, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While\r\n * public getters and setters have 0 based months matching the Java Calendar classes, This class internally\r\n * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java\r\n * Calendar classes.\r\n *\r\n * @param year - the year\r\n * @param month - the month\r\n * @param dayOfMonth - the day of month\r\n */\r\n private setInternalGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n // make sure date is a valid date for the given month, if not, set to last day of month\r\n if (dayOfMonth > JewishDate.getLastDayOfGregorianMonth(month, year)) {\r\n dayOfMonth = JewishDate.getLastDayOfGregorianMonth(month, year);\r\n }\r\n\r\n this.date = new Temporal.PlainDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year) or the day of month is < 1 or > 30 is passed in\r\n */\r\n\r\n /*\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void {\r\n this.setJewishDate(year, month, dayOfMonth, 0, 0, 0);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n *\r\n * @param hours\r\n * the hour of the day. Used for Molad calculations\r\n * @param minutes\r\n * the minutes. Used for Molad calculations\r\n * @param chalakim\r\n * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be\r\n * used for larger numbers.\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number = 0, minutes: number = 0, chalakim: number = 0): void {\r\n JewishDate.validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim);\r\n\r\n // if 30 is passed for a month that only has 29 days (for example by rolling the month from a month that had 30\r\n // days to a month that only has 29) set the date to 29th\r\n if (dayOfMonth > JewishDate.getDaysInJewishMonth(month, year)) {\r\n dayOfMonth = JewishDate.getDaysInJewishMonth(month, year);\r\n }\r\n\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: dayOfMonth, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n this.date = Temporal.PlainDate.from({ year, month: fixedMonth, day: dayOfMonth, calendar: \"hebrew\" }).withCalendar(\"iso8601\")\r\n }\r\n\r\n /**\r\n * Returns this object's date as a {@link java.util.Calendar} object.\r\n *\r\n * @return The {@link java.util.Calendar}\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * Resets this date to the current system date.\r\n */\r\n public resetDate(): void {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n }\r\n\r\n /**\r\n * Returns a string containing the Jewish date in the form, \"day Month, year\" e.g. \"21 Shevat, 5729\". For more\r\n * complex formatting, use the formatter classes.\r\n *\r\n * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.\r\n *\r\n * @return the Jewish date in the form \"day Month, year\" e.g. \"21 Shevat, 5729\"\r\n * @see HebrewDateFormatter#format(JewishDate)\r\n */\r\n public toString(): string {\r\n const transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n let formattedMonth: string;\r\n if (this.isJewishLeapYear() && this.getJewishMonth() === JewishDate.ADAR) {\r\n formattedMonth = transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n } else {\r\n formattedMonth = transliteratedMonths[this.getJewishMonth() - 1];\r\n }\r\n\r\n return `${this.getJewishDayOfMonth()} ${formattedMonth}, ${this.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates\r\n * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class\r\n * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n *
\r\n   * \r\n   *     Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n   *     cal.add(Calendar.MONTH, 3); // add 3 Gregorian months\r\n   *     jewishDate.setDate(cal); // set the updated calendar back to this class\r\n   * \r\n   * 
\r\n *\r\n * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}\r\n * @param amount the positive amount to move forward\r\n * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}\r\n * or {@link Calendar#YEAR} or if the amount is less than 1\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public forward(field: number, amount: number): void {\r\n if (![Calendar.DATE, Calendar.MONTH, Calendar.YEAR].includes(field)) {\r\n throw new IllegalArgumentException('Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.');\r\n }\r\n if (amount < 1) {\r\n throw new IllegalArgumentException('JewishDate.forward() does not support amounts less than 1. See JewishDate.back()');\r\n }\r\n if (field === Calendar.DATE) {\r\n this.date = this.date.add({ days: amount })\r\n } else if (field === Calendar.MONTH) {\r\n this.date = this.date.add({ months: amount })\r\n } else if (field === Calendar.YEAR) {\r\n this.date = this.date.add({ years: amount })\r\n }\r\n }\r\n\r\n /**\r\n * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not\r\n * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such\r\n * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or\r\n * {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n *
\r\n   * \r\n   *     Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n   *     cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months\r\n   *     jewishDate.setDate(cal); // set the updated calendar back to this class\r\n   * \r\n   * 
\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public back(): void {\r\n this.date = this.date.subtract({ days: 1 })\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(object: JewishDate): boolean {\r\n return (object instanceof JewishDate && Temporal.PlainDate.compare(this.date, object.getDate()) == 0);\r\n }\r\n\r\n /**\r\n * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this\r\n * date is \"less than\" (before) the date, greater than 0 if this date is \"greater than\" (after) the date, or 0 if\r\n * they are equal.\r\n */\r\n public compareTo(jewishDate: JewishDate): number {\r\n return Temporal.PlainDate.compare(this.date, jewishDate.getDate());\r\n }\r\n\r\n /**\r\n * Returns the Gregorian month (between 0-11).\r\n *\r\n * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.\r\n */\r\n public getGregorianMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").month - 1;\r\n }\r\n\r\n /**\r\n * Returns the Gregorian day of the month.\r\n *\r\n * @return the Gregorian day of the mont\r\n */\r\n public getGregorianDayOfMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").day;\r\n }\r\n\r\n /**\r\n * Returns the Gregotian year.\r\n *\r\n * @return the Gregorian year\r\n */\r\n public getGregorianYear(): number {\r\n return this.date.withCalendar(\"iso8601\").year;\r\n }\r\n\r\n /**\r\n * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to\r\n * 13 for Adar II\r\n *\r\n * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and\r\n * goes to 13 for Adar II\r\n */\r\n public getJewishMonth(): number {\r\n let hebCal = this.date.withCalendar(\"hebrew\");\r\n\r\n let cutOffNum = 6;\r\n if (hebCal.monthsInYear == 13)\r\n ++cutOffNum;\r\n\r\n if (hebCal.month <= cutOffNum)\r\n return hebCal.month + 6;\r\n else\r\n return hebCal.month - cutOffNum;\r\n }\r\n\r\n /**\r\n * Returns the Jewish day of month.\r\n *\r\n * @return the Jewish day of the month\r\n */\r\n public getJewishDayOfMonth(): number {\r\n return this.date.withCalendar(\"hebrew\").day;\r\n }\r\n\r\n /**\r\n * Returns the Jewish year.\r\n *\r\n * @return the Jewish year\r\n */\r\n public getJewishYear(): number {\r\n return this.date.withCalendar(\"hebrew\").year;\r\n }\r\n\r\n /**\r\n * Returns the day of the week as a number between 1-7.\r\n *\r\n * @return the day of the week as a number between 1-7.\r\n */\r\n public getDayOfWeek(): 1|2|3|4|5|6|7 {\r\n let dayOfWeek = this.date.dayOfWeek + 1;\r\n if (dayOfWeek == 8)\r\n dayOfWeek = 1;\r\n // @ts-ignore\r\n return dayOfWeek;\r\n }\r\n\r\n /**\r\n * Sets the Gregorian month.\r\n *\r\n * @param month\r\n * the Gregorian month\r\n *\r\n * @throws IllegalArgumentException\r\n * if a month < 0 or > 11 is passed in\r\n */\r\n public setGregorianMonth(month: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ month: month + 1 })\r\n }\r\n\r\n /**\r\n * sets the Gregorian year.\r\n *\r\n * @param year\r\n * the Gregorian year.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1 is passed in\r\n */\r\n public setGregorianYear(year: number): void {\r\n JewishDate.validateGregorianYear(year);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ year })\r\n }\r\n\r\n /**\r\n * sets the Gregorian Day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Gregorian Day of month.\r\n * @throws IllegalArgumentException\r\n * if the day of month of < 1 is passed in\r\n */\r\n public setGregorianDayOfMonth(dayOfMonth: number): void {\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ day: dayOfMonth })\r\n }\r\n\r\n /**\r\n * sets the Jewish month.\r\n *\r\n * @param month\r\n * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan\r\n * and goes to 13 for Adar II\r\n * @throws IllegalArgumentException\r\n * if a month < 1 or > 12 (or 13 on a leap year) is passed in\r\n */\r\n public setJewishMonth(month: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(hebrewCalendar.year, month, hebrewCalendar.day);\r\n }\r\n\r\n /**\r\n * sets the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @throws IllegalArgumentException\r\n * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day\r\n * previously set are < 18 Teves (preior to Jan 1, 1 AD)\r\n */\r\n public setJewishYear(year: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(year, this.getJewishMonth(), hebrewCalendar.day);\r\n\r\n this.date = this.date.withCalendar(\"hebrew\").with({ year }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * sets the Jewish day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Jewish day of month\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30 is passed in\r\n */\r\n public setJewishDayOfMonth(dayOfMonth: number): void {\r\n this.date = this.date.withCalendar(\"hebrew\").with({ day: dayOfMonth }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n *\r\n * @see Object#clone()\r\n */\r\n public clone(): JewishDate {\r\n const clone: JewishDate = new JewishDate(this.date);\r\n clone.setMoladHours(this.moladHours);\r\n clone.setMoladMinutes(this.moladMinutes);\r\n clone.setMoladChalakim(this.moladChalakim);\r\n\r\n return clone;\r\n }\r\n}\r\n\r\nexport function rangeDates(start: Temporal.PlainDate, middle:Temporal.PlainDate, end: Temporal.PlainDate, inclusive=true) {\r\n const acceptedValues = [1];\r\n if (inclusive)\r\n acceptedValues.push(0);\r\n\r\n return acceptedValues.includes(Temporal.PlainDate.compare(middle, start)) && acceptedValues.includes(Temporal.PlainDate.compare(end, middle))\r\n};", "/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport abstract class Daf {\r\n /**\r\n * {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.\r\n */\r\n private masechtaNumber: number;\r\n\r\n /**\r\n * See {@link #getDaf()} and {@link #setDaf(int)}.\r\n */\r\n private daf: number;\r\n\r\n /**\r\n * Gets the masechta number of the currently set Daf.\r\n * @return the masechtaNumber\r\n * @see #setMasechtaNumber(int)\r\n */\r\n public getMasechtaNumber(): number {\r\n return this.masechtaNumber;\r\n }\r\n\r\n /**\r\n * Set the masechta number in the order of the Daf Yomi.\r\n *\r\n * @param masechtaNumber\r\n * the masechta number in the order of the Daf Yomi to set.\r\n */\r\n public setMasechtaNumber(masechtaNumber: number): void {\r\n this.masechtaNumber = masechtaNumber;\r\n }\r\n\r\n /**\r\n * Constructor that creates a Daf setting the {@link #setMasechtaNumber(int) masechta number} and\r\n\t * {@link #setDaf(int) daf number}.\r\n\t * \r\n\t * @param masechtaNumber the masechta number in the order of the Daf Yomi to set as the current masechta.\r\n\t * @param daf the daf (page) number to set.\r\n */\r\n constructor(masechtaNumber: number, daf: number) {\r\n this.masechtaNumber = masechtaNumber;\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the daf (page) number of the Daf Yomi.\r\n\t * @return the daf (page) number of the Daf Yomi.\r\n */\r\n public getDaf(): number {\r\n return this.daf;\r\n }\r\n\r\n /**\r\n * Sets the daf (page) number of the Daf Yomi.\r\n\t * @param daf the daf (page) number.\r\n */\r\n public setDaf(daf: number): void {\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public abstract getMasechtaTransliterated(): string;\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public abstract getMasechta(): string;\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Daf Yomi Bavli page (daf) for a given date. To calculate Daf Yomi Yerushalmi\r\n * use the {@link YerushalmiYomiCalculator}. The library may cover Mishna Yomi etc. at some point in the future.\r\n *\r\n * @author © Bob Newell (original C code)\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n * @version 0.0.1\r\n */\r\nexport class YomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Bavli cycle of September 11, 1923 / Rosh Hashana 5684.\r\n */\r\n private static readonly dafYomiStartDate: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1923,\r\n month: Calendar.SEPTEMBER + 1,\r\n day: 11,\r\n });\r\n\r\n /** The start date of the first Daf Yomi Bavli cycle in the Julian calendar. Used internally for claculations. */\r\n private static readonly dafYomiJulianStartDay: number = YomiCalculator.getJulianDay(YomiCalculator.dafYomiStartDate);\r\n\r\n /**\r\n * The date that the pagination for the Daf Yomi Maseches Shekalim changed to use the commonly used Vilna\r\n * Shas pagination from the no longer commonly available Zhitomir / Slavuta Shas used by Rabbi Meir Shapiro.\r\n */\r\n private static readonly shekalimChangeDate: Temporal.PlainDate = Temporal.PlainDate.from({ year: 1975, month: Calendar.JUNE + 1, day: 24 });\r\n\r\n /** The Julian date that the cycle for Shekalim changed.\r\n * @see #getDafYomiBavli(JewishCalendar) for details.\r\n */\r\n private static readonly shekalimJulianChangeDay: number = YomiCalculator.getJulianDay(YomiCalculator.shekalimChangeDate);\r\n\r\n /**\r\n * Returns the Daf Yomi Bavli {@link DafBavliYomi} for a given date. The first Daf Yomi cycle\r\n * started on Rosh Hashana 5684 (September 11, 1923) and calculations prior to this date will result in an\r\n * IllegalArgumentException thrown. For historical calculations (supported by this method), it is important to note\r\n * that a change in length of the cycle was instituted starting in the eighth Daf Yomi cycle beginning on June 24,\r\n * 1975. The Daf Yomi Bavli cycle has a single masechta of the Talmud Yerushalmi - Shekalim as part of the cycle.\r\n * Unlike the Bavli where the number of daf per masechta was standardized since the original Bomberg Edition published from 1520 - 1523, there is no\r\n * uniform page length in the Yerushalmi. The early cycles had the Yerushalmi Shekalim length of 13 days following the\r\n * Slavuta/Zhytomyr\r\n * Shas used by Rabbi Meir Shapiro. With the start of the eighth Daf Yomi\r\n * cycle beginning on June 24, 1975 the length of the Yerushalmi Shekalim was changed from 13 to 22 daf to follow\r\n * the Vilna Shas that is in common use today.\r\n *\r\n * @param calendar\r\n * the calendar date for calculation\r\n * @return the {@link DafBavliYomi}.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the September 11, 1923 start date of the first Daf Yomi cycle\r\n */\r\n public static getDafYomiBavli(calendar: JewishDate): DafBavliYomi {\r\n /*\r\n * The number of daf per masechta. Since the number of blatt in Shekalim changed on the 8th Daf Yomi cycle\r\n * beginning on June 24, 1975 from 13 to 22, the actual calculation for blattPerMasechta[4] will later be\r\n * adjusted based on the cycle.\r\n */\r\n const blattPerMasechta: number[] = [64, 157, 105, 121, 22, 88, 56, 40, 35, 31, 32, 29, 27, 122, 112, 91, 66, 49, 90, 82,\r\n 119, 119, 176, 113, 24, 49, 76, 14, 120, 110, 142, 61, 34, 34, 28, 22, 4, 9, 5, 73];\r\n\r\n const date: Temporal.PlainDate = calendar.getDate();\r\n\r\n let dafYomi: DafBavliYomi;\r\n const julianDay: number = this.getJulianDay(date);\r\n let cycleNo: number = 0;\r\n let dafNo: number = 0;\r\n if (Temporal.PlainDate.compare(date,YomiCalculator.dafYomiStartDate) == -1) {\r\n // TODO: should we return a null or throw an IllegalArgumentException?\r\n throw new IllegalArgumentException(`${calendar} is prior to organized Daf Yomi Bavli cycles that started on ${YomiCalculator.dafYomiStartDate}`);\r\n }\r\n if (Temporal.PlainDate.compare(date, YomiCalculator.shekalimChangeDate) == 1) {\r\n cycleNo = 8 + ((julianDay - YomiCalculator.shekalimJulianChangeDay) / 2711);\r\n dafNo = ((julianDay - YomiCalculator.shekalimJulianChangeDay) % 2711);\r\n } else {\r\n cycleNo = 1 + ((julianDay - YomiCalculator.dafYomiJulianStartDay) / 2702);\r\n dafNo = ((julianDay - YomiCalculator.dafYomiJulianStartDay) % 2702);\r\n }\r\n\r\n let total: number = 0;\r\n let masechta: number = -1;\r\n let blatt: number = 0;\r\n\r\n /* Fix Shekalim for old cycles. */\r\n if (cycleNo <= 7) {\r\n blattPerMasechta[4] = 13;\r\n } else {\r\n blattPerMasechta[4] = 22; // correct any change that may have been changed from a prior calculation\r\n }\r\n /* Finally find the daf. */\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const blattInMasechta of blattPerMasechta) {\r\n masechta++;\r\n total = total + blattInMasechta - 1;\r\n if (dafNo < total) {\r\n blatt = 1 + blattInMasechta - (total - dafNo);\r\n /* Fiddle with the weird ones near the end. */\r\n if (masechta === 36) {\r\n blatt += 21;\r\n } else if (masechta === 37) {\r\n blatt += 24;\r\n } else if (masechta === 38) {\r\n blatt += 32;\r\n }\r\n dafYomi = new DafBavliYomi(masechta, blatt);\r\n break;\r\n }\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Date.\r\n *\r\n * @param date\r\n * The Java Date\r\n * @return the Julian day number corresponding to the date\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = 2 - a + Math.trunc(a / 4);\r\n return Math.trunc(Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5);\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafBavliYomi extends Daf {\r\n /**\r\n * See {@link #getMasechtaTransliterated()} and {@link #setMasechtaTransliterated(String[])}.\r\n */\r\n private static masechtosBavliTransliterated: string[] = ['Berachos', 'Shabbos', 'Eruvin', 'Pesachim', 'Shekalim',\r\n 'Yoma', 'Sukkah', 'Beitzah', 'Rosh Hashana', 'Taanis', 'Megillah', 'Moed Katan', 'Chagigah', 'Yevamos',\r\n 'Kesubos', 'Nedarim', 'Nazir', 'Sotah', 'Gitin', 'Kiddushin', 'Bava Kamma', 'Bava Metzia', 'Bava Basra',\r\n 'Sanhedrin', 'Makkos', 'Shevuos', 'Avodah Zarah', 'Horiyos', 'Zevachim', 'Menachos', 'Chullin', 'Bechoros',\r\n 'Arachin', 'Temurah', 'Kerisos', 'Meilah', 'Kinnim', 'Tamid', 'Midos', 'Niddah'];\r\n\r\n /**\r\n * See {@link #getMasechta()}.\r\n */\r\n private static readonly masechtosBavli: string[] = ['\\u05D1\\u05E8\\u05DB\\u05D5\\u05EA', '\\u05E9\\u05D1\\u05EA',\r\n '\\u05E2\\u05D9\\u05E8\\u05D5\\u05D1\\u05D9\\u05DF', '\\u05E4\\u05E1\\u05D7\\u05D9\\u05DD',\r\n '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD', '\\u05D9\\u05D5\\u05DE\\u05D0', '\\u05E1\\u05D5\\u05DB\\u05D4',\r\n '\\u05D1\\u05D9\\u05E6\\u05D4', '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA', '\\u05DE\\u05D2\\u05D9\\u05DC\\u05D4',\r\n '\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E7\\u05D8\\u05DF', '\\u05D7\\u05D2\\u05D9\\u05D2\\u05D4',\r\n '\\u05D9\\u05D1\\u05DE\\u05D5\\u05EA', '\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA', '\\u05E0\\u05D3\\u05E8\\u05D9\\u05DD',\r\n '\\u05E0\\u05D6\\u05D9\\u05E8', '\\u05E1\\u05D5\\u05D8\\u05D4', '\\u05D2\\u05D9\\u05D8\\u05D9\\u05DF',\r\n '\\u05E7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\\u05DF', '\\u05D1\\u05D1\\u05D0 \\u05E7\\u05DE\\u05D0',\r\n '\\u05D1\\u05D1\\u05D0 \\u05DE\\u05E6\\u05D9\\u05E2\\u05D0', '\\u05D1\\u05D1\\u05D0 \\u05D1\\u05EA\\u05E8\\u05D0',\r\n '\\u05E1\\u05E0\\u05D4\\u05D3\\u05E8\\u05D9\\u05DF', '\\u05DE\\u05DB\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA', '\\u05E2\\u05D1\\u05D5\\u05D3\\u05D4 \\u05D6\\u05E8\\u05D4',\r\n '\\u05D4\\u05D5\\u05E8\\u05D9\\u05D5\\u05EA', '\\u05D6\\u05D1\\u05D7\\u05D9\\u05DD', '\\u05DE\\u05E0\\u05D7\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC\\u05D9\\u05DF', '\\u05D1\\u05DB\\u05D5\\u05E8\\u05D5\\u05EA', '\\u05E2\\u05E8\\u05DB\\u05D9\\u05DF',\r\n '\\u05EA\\u05DE\\u05D5\\u05E8\\u05D4', '\\u05DB\\u05E8\\u05D9\\u05EA\\u05D5\\u05EA', '\\u05DE\\u05E2\\u05D9\\u05DC\\u05D4',\r\n '\\u05E7\\u05D9\\u05E0\\u05D9\\u05DD', '\\u05EA\\u05DE\\u05D9\\u05D3', '\\u05DE\\u05D9\\u05D3\\u05D5\\u05EA',\r\n '\\u05E0\\u05D3\\u05D4'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi. The list of mashechtos\r\n\t * is: Berachos, Shabbos, Eruvin, Pesachim, Shekalim, Yoma, Sukkah, Beitzah, Rosh Hashana, Taanis, Megillah, Moed Katan,\r\n\t * Chagigah, Yevamos, Kesubos, Nedarim, Nazir, Sotah, Gitin, Kiddushin, Bava Kamma, Bava Metzia, Bava Basra, Sanhedrin,\r\n\t * Makkos, Shevuos, Avodah Zarah, Horiyos, Zevachim, Menachos, Chullin, Bechoros, Arachin, Temurah, Kerisos, Meilah,\r\n\t * Kinnim, Tamid, Midos and Niddah.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafBavliYomi.masechtosBavliTransliterated[this.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars.\r\n\t * The default values use Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set.\r\n * @see #getMasechtaTransliterated()\r\n */\r\n public static setMasechtaTransliterated(masechtosBavliTransliterated: string[]): void {\r\n DafBavliYomi.masechtosBavliTransliterated = masechtosBavliTransliterated;\r\n }\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew. The list is in the following format
\r\n * [\"ברכות\",\r\n * \"שבת\", \"עירובין\",\r\n * \"פסחים\", \"שקלים\", \"יומא\",\r\n * \"סוכה\", \"ביצה\", \"ראש השנה\",\r\n * \"תענית\", \"מגילה\", \"מועד\r\n * קטן\", \"חגיגה\", \"יבמות\",\r\n * \"כתובות\", \"נדרים\",\"נזיר\",\r\n * \"סוטה\", \"גיטין\", \"קידושין\",\r\n * \"בבא קמא\", \"בבא מציעא\",\r\n * \"בבא בתרא\", \"סנהדרין\",\r\n * \"מכות\", \"שבועות\", \"עבודה\r\n * זרה\", \"הוריות\", \"זבחים\",\r\n * \"מנחות\", \"חולין\", \"בכורות\",\r\n * \"ערכין\", \"תמורה\", \"כריתות\",\r\n * \"מעילה\", \"קינים\", \"תמיד\",\r\n * \"מידות\", \"נדה\"].\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafBavliYomi.masechtosBavli[this.getMasechtaNumber()];\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate, rangeDates } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Talmud Yerusalmi Daf Yomi page ({@link DafYomiYerushalmi}) for the a given date.\r\n *\r\n * @author © elihaidv\r\n * @author © Eliyahu Hershfeld 2017 - 2019\r\n */\r\nexport class YerushalmiYomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Yerushalmi cycle of February 2, 1980 / 15 Shevat, 5740.\r\n */\r\n private static readonly DAF_YOMI_START_DAY: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1980,\r\n month: Calendar.FEBRUARY + 1,\r\n day: 2,\r\n });\r\n\r\n /** The number of pages in the Talmud Yerushalmi. */\r\n private static readonly WHOLE_SHAS_DAFS: number = 1554;\r\n\r\n /** The number of pages per masechta (tractate). */\r\n private static readonly BLATT_PER_MASECHTA: number[] = [68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22,\r\n 22, 42, 26, 26, 33, 34, 22, 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13];\r\n\r\n /**\r\n * Returns the Daf Yomi\r\n * Yerusalmi page ({@link DafYomiYerushalmi}) for a given date.\r\n * The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat) 5740 (February, 2, 1980) and calculations\r\n * prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or\r\n * Yom Kippur.\r\n *\r\n * @param jewishCalendar\r\n * the calendar date for calculation\r\n * @return the {@link DafYomiYerushalmi} or null if the date is on Tisha B'Av or Yom Kippur.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the February 2, 1980, the start date of the first Daf Yomi Yerushalmi cycle\r\n */\r\n public static getDafYomiYerushalmi(jewishCalendar: JewishDate) {\r\n let nextCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n let prevCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n const requested: Temporal.PlainDate = jewishCalendar.getDate();\r\n let masechta: number = 0;\r\n let dafYomi: DafYomiYerushalmi;\r\n\r\n const hebrewDate = jewishCalendar.getDate().withCalendar(\"hebrew\");\r\n if (hebrewDate.month == 1 && hebrewDate.day == 10) {\r\n return null;\r\n }\r\n\r\n if (jewishCalendar.getJewishMonth() == JewishDate.AV) {\r\n if ((hebrewDate.day == 9 && hebrewDate.dayOfWeek !== 6) || (hebrewDate.day == 10 && hebrewDate.dayOfWeek == 7))\r\n return null;\r\n }\r\n\r\n if (Temporal.PlainDate.compare(requested, YerushalmiYomiCalculator.DAF_YOMI_START_DAY) == -1) {\r\n throw new IllegalArgumentException(`${requested} is prior to organized Daf Yomi Yerushalmi cycles that started on ${YerushalmiYomiCalculator.DAF_YOMI_START_DAY}`);\r\n }\r\n\r\n // Start to calculate current cycle. Initialize the start day\r\n // nextCycle = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n\r\n // Go cycle by cycle, until we get the next cycle\r\n while (Temporal.PlainDate.compare(nextCycle, requested) == -1) {\r\n prevCycle = nextCycle;\r\n\r\n // Adds the number of whole shas dafs, and then the number of days that not have daf.\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.WHOLE_SHAS_DAFS });\r\n // This needs to be a separate step\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, nextCycle) });\r\n }\r\n\r\n // Get the number of days from cycle start until request.\r\n const dafNo: number = requested.since(prevCycle).total({ unit: 'days' });\r\n\r\n // Get the number of special days to subtract\r\n const specialDays: number = YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, requested);\r\n let total: number = dafNo - specialDays;\r\n\r\n // Finally find the daf.\r\n for (let i: number = 0; i < YerushalmiYomiCalculator.BLATT_PER_MASECHTA.length; i++) {\r\n if (total <= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i]) {\r\n dafYomi = new DafYomiYerushalmi(masechta, total + 1);\r\n break;\r\n }\r\n total -= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i];\r\n masechta++;\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the number of special days (Yom Kippur and Tisha B'Av) on which there is no daf, between the two given dates\r\n *\r\n * @param start - start date to calculate\r\n * @param end - end date to calculate\r\n * @return the number of special days\r\n */\r\n private static getNumOfSpecialDays(start: Temporal.PlainDate, end: Temporal.PlainDate): number {\r\n // Find the start and end Jewish years\r\n const jewishStartYear: number = new JewishDate(start).getJewishYear();\r\n const jewishEndYear: number = new JewishDate(end).getJewishYear();\r\n\r\n // Value to return\r\n let specialDays: number = 0;\r\n\r\n // Instant of special dates\r\n const yomKippur: JewishDate = new JewishDate(jewishStartYear, 7, 10);\r\n const tishaBeav: JewishDate = new JewishDate(jewishStartYear, 5, 9);\r\n\r\n // Go over the years and find special dates\r\n for (let i: number = jewishStartYear; i <= jewishEndYear; i++) {\r\n yomKippur.setJewishYear(i);\r\n tishaBeav.setJewishYear(i);\r\n\r\n if (rangeDates(start, yomKippur.getDate(), end)) specialDays++;\r\n if (rangeDates(start, tishaBeav.getDate(), end)) specialDays++;\r\n }\r\n\r\n return specialDays;\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafYomiYerushalmi extends Daf {\r\n /**\r\n * See {@link #getYerushalmiMasechtaTransliterated()}.\r\n */\r\n private static masechtosYerushalmiTransliterated: string[] = ['Berachos', \"Pe'ah\", 'Demai', 'Kilayim', \"Shevi'is\",\r\n 'Terumos', \"Ma'asros\", \"Ma'aser Sheni\", 'Chalah', 'Orlah', 'Bikurim', 'Shabbos', 'Eruvin', 'Pesachim',\r\n 'Beitzah', 'Rosh Hashanah', 'Yoma', 'Sukah', \"Ta'anis\", 'Shekalim', 'Megilah', 'Chagigah', 'Moed Katan',\r\n 'Yevamos', 'Kesuvos', 'Sotah', 'Nedarim', 'Nazir', 'Gitin', 'Kidushin', 'Bava Kama', 'Bava Metzia',\r\n 'Bava Basra', 'Sanhedrin', 'Makos', 'Shevuos', 'Avodah Zarah', 'Horayos', 'Nidah', 'No Daf Today' ];\r\n\r\n /**\r\n * See {@link #getYerushalmiMasechta()}.\r\n */\r\n private static readonly masechtosYerushalmi: string[] = ['\\u05d1\\u05e8\\u05db\\u05d5\\u05ea', '\\u05e4\\u05d9\\u05d0\\u05d4',\r\n '\\u05d3\\u05de\\u05d0\\u05d9', '\\u05db\\u05dc\\u05d0\\u05d9\\u05d9\\u05dd', '\\u05e9\\u05d1\\u05d9\\u05e2\\u05d9\\u05ea',\r\n '\\u05ea\\u05e8\\u05d5\\u05de\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8 \\u05e9\\u05e0\\u05d9',\r\n '\\u05d7\\u05dc\\u05d4', '\\u05e2\\u05d5\\u05e8\\u05dc\\u05d4', '\\u05d1\\u05d9\\u05db\\u05d5\\u05e8\\u05d9\\u05dd',\r\n '\\u05e9\\u05d1\\u05ea', '\\u05e2\\u05d9\\u05e8\\u05d5\\u05d1\\u05d9\\u05df', '\\u05e4\\u05e1\\u05d7\\u05d9\\u05dd',\r\n '\\u05d1\\u05d9\\u05e6\\u05d4', '\\u05e8\\u05d0\\u05e9 \\u05d4\\u05e9\\u05e0\\u05d4', '\\u05d9\\u05d5\\u05de\\u05d0',\r\n '\\u05e1\\u05d5\\u05db\\u05d4', '\\u05ea\\u05e2\\u05e0\\u05d9\\u05ea', '\\u05e9\\u05e7\\u05dc\\u05d9\\u05dd', '\\u05de\\u05d2\\u05d9\\u05dc\\u05d4',\r\n '\\u05d7\\u05d2\\u05d9\\u05d2\\u05d4', '\\u05de\\u05d5\\u05e2\\u05d3 \\u05e7\\u05d8\\u05df', '\\u05d9\\u05d1\\u05de\\u05d5\\u05ea',\r\n '\\u05db\\u05ea\\u05d5\\u05d1\\u05d5\\u05ea', '\\u05e1\\u05d5\\u05d8\\u05d4', '\\u05e0\\u05d3\\u05e8\\u05d9\\u05dd', '\\u05e0\\u05d6\\u05d9\\u05e8',\r\n '\\u05d2\\u05d9\\u05d8\\u05d9\\u05df', '\\u05e7\\u05d9\\u05d3\\u05d5\\u05e9\\u05d9\\u05df', '\\u05d1\\u05d1\\u05d0 \\u05e7\\u05de\\u05d0',\r\n '\\u05d1\\u05d1\\u05d0 \\u05de\\u05e6\\u05d9\\u05e2\\u05d0', '\\u05d1\\u05d1\\u05d0 \\u05d1\\u05ea\\u05e8\\u05d0',\r\n '\\u05e9\\u05d1\\u05d5\\u05e2\\u05d5\\u05ea', '\\u05de\\u05db\\u05d5\\u05ea', '\\u05e1\\u05e0\\u05d4\\u05d3\\u05e8\\u05d9\\u05df',\r\n '\\u05e2\\u05d1\\u05d5\\u05d3\\u05d4 \\u05d6\\u05e8\\u05d4', '\\u05d4\\u05d5\\u05e8\\u05d9\\u05d5\\u05ea', '\\u05e0\\u05d9\\u05d3\\u05d4',\r\n '\\u05d0\\u05d9\\u05df \\u05d3\\u05e3 \\u05d4\\u05d9\\u05d5\\u05dd'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi in Yerushalmi. The list of\r\n\t * mashechtos is:\r\n\t * Berachos, Pe'ah, Demai, Kilayim, Shevi'is, Terumos, Ma'asros, Ma'aser Sheni, Chalah, Orlah, Bikurim, \r\n\t * Shabbos, Eruvin, Pesachim, Beitzah, Rosh Hashanah, Yoma, Sukah, Ta'anis, Shekalim, Megilah, Chagigah, \r\n\t * Moed Katan, Yevamos, Kesuvos, Sotah, Nedarim, Nazir, Gitin, Kidushin, Bava Kama, Bava Metzia,\r\n\t * Bava Basra, Shevuos, Makos, Sanhedrin, Avodah Zarah, Horayos, Nidah and No Daf Today.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmiTransliterated[super.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set.\r\n */\r\n public static setMasechtaTransliterated(masechtosYerushalmiTransliterated: string[]): void {\r\n DafYomiYerushalmi.masechtosYerushalmiTransliterated = masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtosTransliterated(): string[] {\r\n return this.masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos.\r\n\t * \r\n\t * @return the array of Hebrew masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtos():string[] {\r\n return this.masechtosYerushalmi;\r\n }\r\n\r\n /**\r\n * Returns the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n\t * \r\n\t * @return the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmi[this.getMasechtaNumber()];\r\n }\r\n}", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.11-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.6-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.4-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.14-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.3-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.7-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"3-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "import { JewishDate } from \"../JewishDate.ts\";\r\nimport ccyNl from \"./dataSets/ccy-nonleap.json\" assert { type: \"json\" }\r\nimport ccyL from \"./dataSets/ccy-leap.json\" assert { type: \"json\" }\r\n\r\nexport class ChafetzChayimYomiCalculator {\r\n\tpublic static getChafetzChayimYomi(jewishCalendar: JewishDate) {\r\n\t\tconst hebrewDateToday = jewishCalendar.getDate().withCalendar(\"hebrew\")\r\n\r\n\t\tconst ccCal = (jewishCalendar.isJewishLeapYear() ? ccyL : ccyNl);\r\n\t\tconst limudToday = ccCal\r\n\t\t\t.find(limud => limud.days\r\n\t\t\t\t.find(dateObj => hebrewDateToday.equals(hebrewDateToday.withCalendar(\"hebrew\").with(dateObj)))\r\n\t\t\t)\r\n\r\n\t\treturn limudToday;\r\n\t}\r\n}", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from '../util/GeoLocation.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { DafBavliYomi, YomiCalculator } from './limud/YomiCalculator.ts';\r\nimport { DafYomiYerushalmi, YerushalmiYomiCalculator } from './limud/YerushalmiYomiCalculator.ts';\r\nimport { ChafetzChayimYomiCalculator } from './limud/ChafetzChayimYomiCalculator.ts';\r\n\r\nconst { FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * List of parshiyos or special Shabasos. {@link #NONE} indicates a week without a parsha, while the enum for\r\n * the parsha of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special Shabasos of\r\n * Shekalim, Zachor, Para, Hachodesh, as well as Shabbos Shuva, Shira, Hagadol, Chazon and Nachamu are also represented in this collection\r\n * of parshiyos.\r\n * @see #getSpecialShabbos()\r\n * @see #getParshah()\r\n */\r\nexport enum Parsha {\r\n /** NONE - A week without any parsha such as Shabbos Chol Hamoed */\r\n NONE,\r\n BERESHIS, NOACH, LECH_LECHA, VAYERA, CHAYEI_SARA, TOLDOS, VAYETZEI,\r\n VAYISHLACH, VAYESHEV, MIKETZ, VAYIGASH, VAYECHI, SHEMOS, VAERA, BO,\r\n BESHALACH, YISRO, MISHPATIM, TERUMAH, TETZAVEH, KI_SISA, VAYAKHEL,\r\n PEKUDEI, VAYIKRA, TZAV, SHMINI, TAZRIA, METZORA, ACHREI_MOS, KEDOSHIM,\r\n EMOR, BEHAR, BECHUKOSAI, BAMIDBAR, NASSO, BEHAALOSCHA, SHLACH, KORACH,\r\n CHUKAS, BALAK, PINCHAS, MATOS, MASEI, DEVARIM, VAESCHANAN, EIKEV,\r\n REEH, SHOFTIM, KI_SEITZEI, KI_SAVO, NITZAVIM, VAYEILECH, HAAZINU,\r\n VZOS_HABERACHA,\r\n /** The double parsha of Vayakhel & Peudei */\r\n VAYAKHEL_PEKUDEI,\r\n /** The double parsha of Tazria & Metzora */\r\n TAZRIA_METZORA,\r\n /** The double parsha of Achrei Mos & Kedoshim */\r\n ACHREI_MOS_KEDOSHIM,\r\n /** The double parsha of Behar & Bechukosai */\r\n BEHAR_BECHUKOSAI,\r\n /** The double parsha of Chukas & Balak */\r\n CHUKAS_BALAK,\r\n /** The double parsha of Matos & Masei */\r\n MATOS_MASEI,\r\n /** The double parsha of Nitzavim & Vayelech */\r\n NITZAVIM_VAYEILECH,\r\n /** The special parsha of Shekalim */\r\n SHKALIM,\r\n /** The special parsha of Zachor */\r\n ZACHOR,\r\n /** The special parsha of Para */\r\n PARA,\r\n /** The special parsha of Hachodesh */\r\n HACHODESH,\r\n SHUVA,\r\n SHIRA,\r\n HAGADOL,\r\n CHAZON,\r\n NACHAMU,\r\n}\r\n\r\n/**\r\n * The JewishCalendar extends the JewishDate class and adds calendar methods.\r\n *\r\n * This open source Java code was originally ported by Avrom Finkelstien\r\n * from his C++ code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements\r\n * and some bug fixing. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel\r\n * scheme. The default is the outside Israel scheme.\r\n * The parsha code was ported by Y. Paritcher from his libzmanim code.\r\n *\r\n * TODO: Some do not belong in this class, but here is a partial list of what should still be implemented in some form:\r\n *
    \r\n *
  1. Add Isru Chag
  2. \r\n *
  3. Mishna yomis etc
  4. \r\n *
\r\n *\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Y. Paritcher 2019\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class JewishCalendar extends JewishDate {\r\n /** The 14th day of Nisan, the day before of Pesach (Passover). */\r\n public static readonly EREV_PESACH: number = 0;\r\n\r\n /** The holiday of Pesach (Passover) on the 15th (and 16th out of Israel) day of Nisan. */\r\n public static readonly PESACH: number = 1;\r\n\r\n /** Chol Hamoed (interim days) of Pesach (Passover) */\r\n public static readonly CHOL_HAMOED_PESACH: number = 2;\r\n\r\n /** Pesach Sheni, the 14th day of Iyar, a minor holiday. */\r\n public static readonly PESACH_SHENI: number = 3;\r\n\r\n /** Erev Shavuos (the day before Shavuos), the 5th of Sivan */\r\n public static readonly EREV_SHAVUOS: number = 4;\r\n\r\n /** Shavuos (Pentecost), the 6th of Sivan */\r\n public static readonly SHAVUOS: number = 5;\r\n\r\n /** The fast of the 17th day of Tamuz */\r\n public static readonly SEVENTEEN_OF_TAMMUZ: number = 6;\r\n\r\n /** The fast of the 9th of Av */\r\n public static readonly TISHA_BEAV: number = 7;\r\n\r\n /** The 15th day of Av, a minor holiday */\r\n public static readonly TU_BEAV: number = 8;\r\n\r\n /** Erev Rosh Hashana (the day before Rosh Hashana), the 29th of Elul */\r\n public static readonly EREV_ROSH_HASHANA: number = 9;\r\n\r\n /** Rosh Hashana, the first of Tishrei. */\r\n public static readonly ROSH_HASHANA: number = 10;\r\n\r\n /** The fast of Gedalyah, the 3rd of Tishrei. */\r\n public static readonly FAST_OF_GEDALYAH: number = 11;\r\n\r\n /** The 9th day of Tishrei, the day before of Yom Kippur. */\r\n public static readonly EREV_YOM_KIPPUR: number = 12;\r\n\r\n /** The holiday of Yom Kippur, the 10th day of Tishrei */\r\n public static readonly YOM_KIPPUR: number = 13;\r\n\r\n /** The 14th day of Tishrei, the day before of Succos/Sukkos (Tabernacles). */\r\n public static readonly EREV_SUCCOS: number = 14;\r\n\r\n /** The holiday of Succos/Sukkos (Tabernacles), the 15th (and 16th out of Israel) day of Tishrei */\r\n public static readonly SUCCOS: number = 15;\r\n\r\n /** Chol Hamoed (interim days) of Succos/Sukkos (Tabernacles) */\r\n public static readonly CHOL_HAMOED_SUCCOS: number = 16;\r\n\r\n /** Hoshana Rabba, the 7th day of Succos/Sukkos that occurs on the 21st of Tishrei. */\r\n public static readonly HOSHANA_RABBA: number = 17;\r\n\r\n /** Shmini Atzeres, the 8th day of Succos/Sukkos is an independent holiday that occurs on the 22nd of Tishrei. */\r\n public static readonly SHEMINI_ATZERES: number = 18;\r\n\r\n /** Simchas Torah, the 9th day of Succos/Sukkos, or the second day of Shmini Atzeres that is celebrated\r\n * {@link #getInIsrael() out of Israel} on the 23rd of Tishrei.\r\n */\r\n public static readonly SIMCHAS_TORAH: number = 19;\r\n\r\n // public static final int EREV_CHANUKAH = 20;// probably remove this\r\n\r\n /** The holiday of Chanukah. 8 days starting on the 25th day Kislev. */\r\n public static readonly CHANUKAH: number = 21;\r\n\r\n /** The fast of the 10th day of Teves. */\r\n public static readonly TENTH_OF_TEVES: number = 22;\r\n\r\n /** Tu Bishvat on the 15th day of Shevat, a minor holiday. */\r\n public static readonly TU_BESHVAT: number = 23;\r\n\r\n /** The fast of Esther, usually on the 13th day of Adar (or Adar II on leap years). It is earlier on some years. */\r\n public static readonly FAST_OF_ESTHER: number = 24;\r\n\r\n /** The holiday of Purim on the 14th day of Adar (or Adar II on leap years). */\r\n public static readonly PURIM: number = 25;\r\n\r\n /** The holiday of Shushan Purim on the 15th day of Adar (or Adar II on leap years). */\r\n public static readonly SHUSHAN_PURIM: number = 26;\r\n\r\n /** The holiday of Purim Katan on the 14th day of Adar I on a leap year when Purim is on Adar II, a minor holiday. */\r\n public static readonly PURIM_KATAN: number = 27;\r\n\r\n /**\r\n * Rosh Chodesh, the new moon on the first day of the Jewish month, and the 30th day of the previous month in the\r\n * case of a month with 30 days.\r\n */\r\n public static readonly ROSH_CHODESH: number = 28;\r\n\r\n /** Yom HaShoah, Holocaust Remembrance Day, usually held on the 27th of Nisan. If it falls on a Friday, it is moved\r\n * to the 26th, and if it falls on a Sunday it is moved to the 28th. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_HASHOAH: number = 29;\r\n\r\n /**\r\n * Yom HaZikaron, Israeli Memorial Day, held a day before Yom Ha'atzmaut. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_HAZIKARON: number = 30;\r\n\r\n /** Yom Ha'atzmaut, Israel Independence Day, the 5th of Iyar, but if it occurs on a Friday or Saturday, the holiday is\r\n * moved back to Thursday, the 3rd of 4th of Iyar, and if it falls on a Monday, it is moved forward to Tuesday the\r\n * 6th of Iyar. A {@link #isUseModernHolidays() modern holiday}. */\r\n public static readonly YOM_HAATZMAUT: number = 31;\r\n\r\n /**\r\n * Yom Yerushalayim or Jerusalem Day, on 28 Iyar. A {@link #isUseModernHolidays() modern holiday}.\r\n */\r\n public static readonly YOM_YERUSHALAYIM: number = 32;\r\n\r\n /** The 33rd day of the Omer, the 18th of Iyar, a minor holiday. */\r\n public static readonly LAG_BAOMER: number = 33;\r\n\r\n /** The holiday of Purim Katan on the 15th day of Adar I on a leap year when Purim is on Adar II, a minor holiday. */\r\n public static readonly SHUSHAN_PURIM_KATAN: number = 34;\r\n\r\n /** The day following the last day of Pesach, Shavuos and Sukkos.*/\r\n public static readonly ISRU_CHAG = 35;\r\n\r\n /**\r\n\t * The day before Rosh Chodesh (moved to Thursday if Rosh Chodesh is on a Friday or Shabbos) in most months.\r\n\t * This constant is not actively in use.\r\n\t * @see #isYomKippurKatan()\r\n\t */\r\n public static readonly YOM_KIPPUR_KATAN = 36;\r\n\r\n /**\r\n\t * The Monday, Thursday and Monday after the first Shabbos after Rosh Chodesh Cheshvan and Iyar) are BeHab\r\n\t * days. This constant is not actively in use.\r\n\t * @see #isBeHaB()\r\n\t */\r\n public static readonly BEHAB = 37;\r\n\r\n /**\r\n * Is the calendar set to Israel, where some holidays have different rules.\r\n * @see #getInIsrael()\r\n * @see #setInIsrael(boolean)\r\n */\r\n private inIsrael: boolean = false;\r\n\r\n /**\r\n\t * Is the calendar set to have Purim demukafim, where Purim is celebrated on Shushan Purim.\r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n private isMukafChoma: boolean = false;\r\n\r\n /**\r\n * Is the calendar set to use modern Israeli holidays such as Yom Haatzmaut.\r\n * @see #isUseModernHolidays()\r\n * @see #setUseModernHolidays(boolean)\r\n */\r\n private useModernHolidays: boolean = false;\r\n\r\n /**\r\n * An array of parshiyos in the 17 possible combinations.\r\n */\r\n public static readonly parshalist: Parsha[][] = [\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.ACHREI_MOS, Parsha.NONE, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.ACHREI_MOS, Parsha.NONE, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NONE, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS_BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR_BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL_PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.NONE, Parsha.SHMINI, Parsha.TAZRIA_METZORA, Parsha.ACHREI_MOS_KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n [Parsha.NONE, Parsha.VAYEILECH, Parsha.HAAZINU, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS, Parsha.MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM],\r\n [Parsha.NONE, Parsha.NONE, Parsha.HAAZINU, Parsha.NONE, Parsha.NONE, Parsha.BERESHIS, Parsha.NOACH, Parsha.LECH_LECHA, Parsha.VAYERA, Parsha.CHAYEI_SARA, Parsha.TOLDOS, Parsha.VAYETZEI, Parsha.VAYISHLACH, Parsha.VAYESHEV, Parsha.MIKETZ, Parsha.VAYIGASH, Parsha.VAYECHI, Parsha.SHEMOS, Parsha.VAERA, Parsha.BO, Parsha.BESHALACH, Parsha.YISRO, Parsha.MISHPATIM, Parsha.TERUMAH, Parsha.TETZAVEH, Parsha.KI_SISA, Parsha.VAYAKHEL, Parsha.PEKUDEI, Parsha.VAYIKRA, Parsha.TZAV, Parsha.SHMINI, Parsha.TAZRIA, Parsha.METZORA, Parsha.NONE, Parsha.ACHREI_MOS, Parsha.KEDOSHIM, Parsha.EMOR, Parsha.BEHAR, Parsha.BECHUKOSAI, Parsha.BAMIDBAR, Parsha.NASSO, Parsha.BEHAALOSCHA, Parsha.SHLACH, Parsha.KORACH, Parsha.CHUKAS, Parsha.BALAK, Parsha.PINCHAS, Parsha.MATOS_MASEI, Parsha.DEVARIM, Parsha.VAESCHANAN, Parsha.EIKEV, Parsha.REEH, Parsha.SHOFTIM, Parsha.KI_SEITZEI, Parsha.KI_SAVO, Parsha.NITZAVIM_VAYEILECH],\r\n ];\r\n\r\n /**\r\n * Is this calendar set to return modern Israeli national holidays. By default this value is false. The holidays\r\n\t * are {@link #YOM_HASHOAH Yom HaShoah}, {@link #YOM_HAZIKARON Yom Hazikaron}, {@link\r\n * #YOM_HAATZMAUT Yom Ha'atzmaut} and {@link #YOM_YERUSHALAYIM Yom Yerushalayim}.\r\n * \r\n * @return the useModernHolidays true if set to return modern Israeli national holidays\r\n * \r\n * @see #setUseModernHolidays(boolean)\r\n */\r\n public isUseModernHolidays(): boolean {\r\n return this.useModernHolidays;\r\n }\r\n\r\n /**\r\n * Sets the calendar to return modern Israeli national holidays. By default this value is false. The holidays are:\r\n\t * {@link #YOM_HASHOAH Yom HaShoah}, {@link #YOM_HAZIKARON Yom Hazikaron}, {@link\r\n * #YOM_HAATZMAUT Yom Ha'atzmaut} and {@link #YOM_YERUSHALAYIM Yom Yerushalayim}.\r\n * \r\n * @param useModernHolidays\r\n * the useModernHolidays to set\r\n * \r\n * @see #isUseModernHolidays()\r\n */\r\n public setUseModernHolidays(useModernHolidays: boolean): void {\r\n this.useModernHolidays = useModernHolidays;\r\n }\r\n\r\n /**\r\n * Default constructor will set a default date to the current system date.\r\n */\r\n /*\r\n public JewishCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Date Date} parameter.\r\n *\r\n * @param date\r\n * the Date to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(date: Date) {\r\n super(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter.\r\n *\r\n * @param calendar\r\n * the Calendar to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(calendar: GregorianCalendar) {\r\n super(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n\r\n /*\r\n public JewishCalendar(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n super(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish date and whether in Israel\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @param inIsrael\r\n * whether in Israel. This affects Yom Tov calculations\r\n */\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number, inIsrael?: boolean);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrDateTimeOrDate?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number, inIsrael?: boolean) {\r\n // @ts-ignore\r\n super(jewishYearOrDateTimeOrDate, jewishMonth, jewishDayOfMonth);\r\n if (inIsrael) this.setInIsrael(inIsrael);\r\n }\r\n\r\n /**\r\n * Sets whether to use Israel holiday scheme or not. Default is false.\r\n *\r\n * @param inIsrael\r\n * set to true for calculations for Israel\r\n * \r\n\t * @see #getInIsrael()\r\n */\r\n public setInIsrael(inIsrael: boolean): void {\r\n this.inIsrael = inIsrael;\r\n }\r\n\r\n /**\r\n * Gets whether Israel holiday scheme is used or not. The default (if not set) is false.\r\n *\r\n * @return if the calendar is set to Israel\r\n\t * \r\n\t * @see #setInIsrael(boolean)\r\n */\r\n public getInIsrael(): boolean {\r\n return this.inIsrael;\r\n }\r\n\r\n /**\r\n\t * Returns if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @return if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public getIsMukafChoma():boolean {\r\n return this.isMukafChoma;\r\n }\r\n\r\n /**\r\n\t * Sets if the location is surrounded by a wall from the time of Yehoshua, and Shushan Purim should be\r\n\t * celebrated as opposed to regular Purim. This should be set for Yerushalayim, Shushan and other cities.\r\n\t * @param isMukafChoma is the city surrounded by a wall from the time of Yehoshua.\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t */\r\n public setIsMukafChoma(isMukafChoma:boolean):void {\r\n this.isMukafChoma = isMukafChoma;\r\n }\r\n\r\n /**\r\n * Birkas Hachamah is recited every 28 years based on\r\n * Tekufas Shmuel (Julian years) that a year is 365.25 days. The Rambam in Hilchos Kiddush Hachodesh 9:3\r\n\t * states that tekufas Nissan of year 1 was 7 days + 9 hours before molad Nissan. This is calculated as every\r\n\t * 10,227 days (28 * 365.25). \r\n\t * @return true for a day that Birkas Hachamah is recited.\r\n */\r\n public isBirkasHachamah(): boolean {\r\n // elapsed days since molad ToHu\r\n let elapsedDays: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear());\r\n // elapsed days to the current calendar date\r\n elapsedDays += Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n /* Molad Nissan year 1 was 177 days after molad tohu of Tishrei. We multiply 29.5 days * 6 months from Tishrei\r\n\t\t * to Nissan = 177. Subtract 7 days since tekufas Nissan was 7 days and 9 hours before the molad as stated in the Rambam\r\n\t\t * and we are now at 170 days. Because getJewishCalendarElapsedDays and getDaysSinceStartOfJewishYear use the value for\r\n\t\t * Rosh Hashana as 1, we have to add 1 day for a total of 171. To this add a day since the tekufah is on a Tuesday\r\n\t\t * night and we push off the bracha to Wednesday AM resulting in the 172 used in the calculation.\r\n\t\t */\r\n // 28 years of 365.25 days + the offset from molad tohu mentioned above\r\n return elapsedDays % (28 * 365.25) === 172;\r\n }\r\n\r\n /**\r\n * Return the type of year for parsha calculations. The algorithm follows the\r\n\t * Luach Arba'ah Shearim in the Tur Ohr Hachaim.\r\n\t * @return the type of year for parsha calculations.\r\n * @todo Use constants in this class.\r\n */\r\n private getParshaYearType(): number {\r\n const roshHashanah = this.getDate().withCalendar(\"hebrew\").with({ day: 1, month: 1 });\r\n if (roshHashanah.monthsInYear == 13) {\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 14;\r\n }\r\n return 6;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n }\r\n break;\r\n // GaK\r\n case 2: // Tuesday\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n case 4: // Thursday\r\n // HaCh\r\n if (this.isKislevShort()) {\r\n return 8;\r\n }\r\n\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 9;\r\n }\r\n\r\n break;\r\n case 6: // Saturday\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 10;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 16;\r\n }\r\n return 11;\r\n }\r\n\r\n break;\r\n }\r\n } else {\r\n // not a leap year\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n return 0;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n }\r\n\r\n break;\r\n case 2: // TUESDAY\r\n // GaK\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n case 4: // THURSDAY\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 3;\r\n }\r\n\r\n // HaK\r\n if (!this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 13;\r\n }\r\n return 2;\r\n }\r\n\r\n break;\r\n case 6: // SATURDAY\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 4;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n return 5;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns this week's {@link Parsha} if it is Shabbos.\r\n * returns Parsha.NONE if a weekday or if there is no parsha that week (for example Yomtov is on Shabbos)\r\n * @return the current parsha\r\n */\r\n public getParshah(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY) {\r\n return Parsha.NONE;\r\n }\r\n\r\n const yearType: number = this.getParshaYearType();\r\n const roshHashanaDayOfWeek: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) % 7;\r\n const day: number = roshHashanaDayOfWeek + Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n // negative year should be impossible, but lets cover all bases\r\n if (yearType >= 0) {\r\n return JewishCalendar.parshalist[yearType][day / 7];\r\n }\r\n\r\n // keep the compiler happy\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA,\r\n * Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).\r\n * @return one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.\r\n */\r\n public getSpecialShabbos(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY)\r\n return Parsha.NONE;\r\n\r\n if (((this.getJewishMonth() === JewishCalendar.SHEVAT && !this.isJewishLeapYear())\r\n || (this.getJewishMonth() === JewishCalendar.ADAR && this.isJewishLeapYear()))\r\n && [25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ((this.getJewishMonth() === JewishCalendar.ADAR && !this.isJewishLeapYear())\r\n || this.getJewishMonth() === JewishCalendar.ADAR_II) {\r\n if (this.getJewishDayOfMonth() === 1) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ([8, 9, 11, 13].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.ZACHOR;\r\n }\r\n\r\n if ([18, 20, 22, 23].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.PARA;\r\n }\r\n\r\n if ([25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.HACHODESH;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() === JewishCalendar.NISSAN) {\r\n if (this.getJewishDayOfMonth() == 1)\r\n return Parsha.HACHODESH;\r\n\r\n if (this.getJewishDayOfMonth() >= 8 && this.getJewishDayOfMonth() <= 14)\r\n return Parsha.HAGADOL;\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.AV) {\r\n if (this.getJewishDayOfMonth() >= 4 && this.getJewishDayOfMonth() <= 9) {\r\n return Parsha.CHAZON;\r\n }\r\n if (this.getJewishDayOfMonth() >= 10 && this.getJewishDayOfMonth() <= 16) {\r\n return Parsha.NACHAMU;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.TISHREI && this.getJewishDayOfMonth() >= 3 && this.getJewishDayOfMonth() <= 8)\r\n return Parsha.SHUVA;\r\n\r\n if (this.getParshah() == Parsha.BESHALACH)\r\n return Parsha.SHIRA;\r\n\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n\t * Returns the upcoming {@link Parsha Parsha} regardless of if it is the weekday or Shabbos (where next\r\n\t * Shabbos's Parsha will be returned. This is unlike {@link #getParshah()} that returns {@link Parsha#NONE} if\r\n\t * the date is not Shabbos. If the upcoming Shabbos is a Yom Tov and has no Parsha, the\r\n\t * following week's Parsha will be returned.\r\n\t * \r\n\t * @return the upcoming parsha.\r\n\t */\r\n\tpublic getUpcomingParshah(): Parsha {\r\n\t\tconst clone = this.clone() as JewishCalendar;\r\n\t\tconst daysToShabbos = (Calendar.SATURDAY - this.getDayOfWeek() + 7) % 7;\r\n\t\tif (this.getDayOfWeek() != Calendar.SATURDAY) {\r\n\t\t\tclone.forward(Calendar.DATE, daysToShabbos);\r\n\t\t} else {\r\n\t\t\tclone.forward(Calendar.DATE, 7);\r\n\t\t}\r\n\t\twhile(clone.getParshah() == Parsha.NONE) { //Yom Kippur / Sukkos or Pesach with 2 potential non-parsha Shabbosim in a row\r\n\t\t\tclone.forward(Calendar.DATE, 7);\r\n\t\t}\r\n\t\treturn clone.getParshah();\r\n\t}\r\n\r\n /**\r\n * Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this\r\n * day. There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done in the\r\n * ZmanimFormatter#\r\n *\r\n * @todo consider using enums instead of the constant ints.\r\n *\r\n * @return the index of the holiday such as the constant {@link #LAG_BAOMER} or {@link #YOM_KIPPUR} or a -1 if it is not a holiday.\r\n * @see HebrewDateFormatter\r\n */\r\n public getYomTovIndex(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n\r\n // check by month (starting from Nissan)\r\n switch (this.getJewishMonth()) {\r\n case JewishCalendar.NISSAN:\r\n if (day === 14) {\r\n return JewishCalendar.EREV_PESACH;\r\n } else if (day === 15 || day === 21 || (!this.inIsrael && (day === 16 || day === 22))) {\r\n return JewishCalendar.PESACH;\r\n } else if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\r\n if (this.isUseModernHolidays()\r\n && ((day === 26 && dayOfWeek === 5) || (day === 28 && dayOfWeek === 2)\r\n || (day === 27 && dayOfWeek !== 1 && dayOfWeek !== 6))) {\r\n return JewishCalendar.YOM_HASHOAH;\r\n }\r\n break;\r\n case JewishCalendar.IYAR:\r\n if (this.isUseModernHolidays()\r\n && ((day === 4 && dayOfWeek === 3) || ((day === 3 || day === 2) && dayOfWeek === 4)\r\n || (day === 5 && dayOfWeek === 2))) {\r\n return JewishCalendar.YOM_HAZIKARON;\r\n }\r\n\r\n // if 5 Iyar falls on Wed Yom Haatzmaut is that day. If it fal1s on Friday or Shabbos it is moved back to\r\n // Thursday. If it falls on Monday it is moved to Tuesday\r\n if (this.isUseModernHolidays() && ((day === 5 && dayOfWeek === 4)\r\n || ((day === 4 || day === 3) && dayOfWeek === 5) || (day === 6 && dayOfWeek === 3))) {\r\n return JewishCalendar.YOM_HAATZMAUT;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PESACH_SHENI;\r\n }\r\n\r\n if (day === 18) {\r\n return JewishCalendar.LAG_BAOMER;\r\n }\r\n\r\n if (this.isUseModernHolidays() && day === 28) {\r\n return JewishCalendar.YOM_YERUSHALAYIM;\r\n }\r\n break;\r\n case JewishCalendar.SIVAN:\r\n if (day === 5) {\r\n return JewishCalendar.EREV_SHAVUOS;\r\n } else if (day === 6 || (day === 7 && !this.inIsrael)) {\r\n return JewishCalendar.SHAVUOS;\r\n }\r\n break;\r\n case JewishCalendar.TAMMUZ:\r\n // push off the fast day if it falls on Shabbos\r\n if ((day === 17 && dayOfWeek !== 7) || (day === 18 && dayOfWeek === 1)) {\r\n return JewishCalendar.SEVENTEEN_OF_TAMMUZ;\r\n }\r\n break;\r\n case JewishCalendar.AV:\r\n // if Tisha B'av falls on Shabbos, push off until Sunday\r\n if ((dayOfWeek === 1 && day === 10) || (dayOfWeek !== 7 && day === 9)) {\r\n return JewishCalendar.TISHA_BEAV;\r\n } else if (day === 15) {\r\n return JewishCalendar.TU_BEAV;\r\n }\r\n break;\r\n case JewishCalendar.ELUL:\r\n if (day === 29) {\r\n return JewishCalendar.EREV_ROSH_HASHANA;\r\n }\r\n break;\r\n case JewishCalendar.TISHREI:\r\n if (day === 1 || day === 2) {\r\n return JewishCalendar.ROSH_HASHANA;\r\n } else if ((day === 3 && dayOfWeek !== 7) || (day === 4 && dayOfWeek === 1)) {\r\n // push off Tzom Gedalia if it falls on Shabbos\r\n return JewishCalendar.FAST_OF_GEDALYAH;\r\n } else if (day === 9) {\r\n return JewishCalendar.EREV_YOM_KIPPUR;\r\n } else if (day === 10) {\r\n return JewishCalendar.YOM_KIPPUR;\r\n } else if (day === 14) {\r\n return JewishCalendar.EREV_SUCCOS;\r\n }\r\n\r\n if (day === 15 || (day === 16 && !this.inIsrael)) {\r\n return JewishCalendar.SUCCOS;\r\n }\r\n\r\n if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n if (day === 21) {\r\n return JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\r\n if (day === 22) {\r\n return JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\r\n if (day === 23 && !this.inIsrael) {\r\n return JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n break;\r\n case JewishCalendar.KISLEV: // no yomtov in CHESHVAN\r\n // if (day == 24) {\r\n // return EREV_CHANUKAH;\r\n // } else\r\n if (day >= 25) {\r\n return JewishCalendar.CHANUKAH;\r\n }\r\n break;\r\n case JewishCalendar.TEVES:\r\n if (day === 1 || day === 2 || (day === 3 && this.isKislevShort())) {\r\n return JewishCalendar.CHANUKAH;\r\n } else if (day === 10) {\r\n return JewishCalendar.TENTH_OF_TEVES;\r\n }\r\n break;\r\n case JewishCalendar.SHEVAT:\r\n if (day === 15) {\r\n return JewishCalendar.TU_BESHVAT;\r\n }\r\n break;\r\n case JewishCalendar.ADAR:\r\n if (!this.isJewishLeapYear()) {\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n } else {\r\n // else if a leap year\r\n if (day === 14) {\r\n return JewishCalendar.PURIM_KATAN;\r\n }\r\n\r\n if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM_KATAN;\r\n }\r\n }\r\n break;\r\n case JewishCalendar.ADAR_II:\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n break;\r\n }\r\n // if we get to this stage, then there are no holidays for the given date return -1\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Yom Tov. The method returns true even for holidays such as {@link #CHANUKAH} and minor\r\n * ones such as {@link #TU_BEAV} and {@link #PESACH_SHENI}. Erev Yom Tov (with the exception of {@link #HOSHANA_RABBA},\r\n * Erev the second days of Pesach) returns false, as do {@link #isTaanis() fast days} besides {@link #YOM_KIPPUR}. Use\r\n * {@link #isAssurBemelacha()} to find the days that have a prohibition of work.\r\n *\r\n * @return true if the current day is a Yom Tov\r\n *\r\n * @see #getYomTovIndex()\r\n * @see #isErevYomTov()\r\n * @see #isErevYomTovSheni()\r\n * @see #isTaanis()\r\n * @see #isAssurBemelacha()\r\n * @see #isCholHamoed()\r\n */\r\n public isYomTov(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n\r\n if ((this.isErevYomTov() && (holidayIndex !== JewishCalendar.HOSHANA_RABBA\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() !== 20)))\r\n || (this.isTaanis() && holidayIndex !== JewishCalendar.YOM_KIPPUR)) {\r\n return false;\r\n }\r\n\r\n return this.getYomTovIndex() !== -1;\r\n }\r\n\r\n /**\r\n * Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a\r\n * non-Yom Tov day, even if it is Shabbos.\r\n *\r\n * @return if the Yom Tov day has a melacha (work) prohibition.\r\n */\r\n public isYomTovAssurBemelacha(): boolean {\r\n const yamimTovimAssurBemelacha = [\r\n JewishCalendar.PESACH,\r\n JewishCalendar.SHAVUOS,\r\n JewishCalendar.SUCCOS,\r\n JewishCalendar.SHEMINI_ATZERES,\r\n JewishCalendar.SIMCHAS_TORAH,\r\n JewishCalendar.ROSH_HASHANA,\r\n JewishCalendar.YOM_KIPPUR,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return yamimTovimAssurBemelacha.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.\r\n * This method will return false for a.\r\n * @return if the day is a Yom Tov that is assur bemlacha or Shabbos\r\n */\r\n public isAssurBemelacha(): boolean {\r\n return this.getDayOfWeek() === SATURDAY || this.isYomTovAssurBemelacha();\r\n }\r\n\r\n /**\r\n * Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the\r\n * first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical\r\n * to calling {@link #isTomorrowShabbosOrYomTov()}.\r\n *\r\n * @return if the day has candle lighting\r\n */\r\n public hasCandleLighting(): boolean {\r\n return this.isTomorrowShabbosOrYomTov();\r\n }\r\n\r\n /**\r\n * Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos, erev\r\n * Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov out of\r\n * Israel. It is identical to calling {@link #hasCandleLighting()}.\r\n * @return will return if the next day is Shabbos or Yom Tov\r\n */\r\n public isTomorrowShabbosOrYomTov(): boolean {\r\n return this.getDayOfWeek() === FRIDAY || this.isErevYomTov() || this.isErevYomTovSheni();\r\n }\r\n\r\n /**\r\n * Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana\r\n * everywhere, and the second days of Yom Tov in chutz laaretz (out of Israel).\r\n *\r\n * @return if the day is the second day of Yom Tov.\r\n */\r\n public isErevYomTovSheni(): boolean {\r\n return (this.getJewishMonth() === JewishCalendar.TISHREI && (this.getJewishDayOfMonth() === 1))\r\n || (!this.getInIsrael()\r\n && ((this.getJewishMonth() === JewishCalendar.NISSAN && [15, 21].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.TISHREI && [15, 22].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.SIVAN && this.getJewishDayOfMonth() === 6)));\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Aseret Yemei Teshuva.\r\n *\r\n * @return if the current day is Aseret Yemei Teshuvah\r\n */\r\n public isAseresYemeiTeshuva(): boolean {\r\n return this.getJewishMonth() === JewishCalendar.TISHREI && this.getJewishDayOfMonth() <= 10;\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * \r\n\t * @return true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedPesach()\r\n\t * @see #PESACH\r\n\t * @see #CHOL_HAMOED_PESACH\r\n\t */\r\n public isPesach():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.PESACH || holidayIndex == JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach\r\n * @see #isYomTov()\r\n * @see #isPessach()\r\n * @see #CHOL_HAMOED_PESACH\r\n */\r\n public isCholHamoedPesach(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shavuos.\r\n\t *\r\n\t * @return true if the current day is Shavuos.\r\n\t * @see #isYomTov()\r\n\t * @see #SHAVUOS\r\n\t */\r\n public isShavuos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHAVUOS;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Rosh Hashana.\r\n\t *\r\n\t * @return true if the current day is Rosh Hashana.\r\n\t * @see #isYomTov()\r\n\t * @see #ROSH_HASHANA\r\n\t */\r\n public isRoshHashana():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ROSH_HASHANA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Yom Kippur.\r\n\t *\r\n\t * @return true if the current day is Yom Kippur.\r\n\t * @see #isYomTov()\r\n\t * @see #YOM_KIPPUR\r\n\t */\r\n public isYomKippur():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.YOM_KIPPUR;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos).\r\n\t * It will return false for {@link #isShminiAtzeres() Shmini Atzeres} and {@link #isSimchasTorah() Simchas Torah}.\r\n\t * \r\n\t * @return true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos.\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedSuccos()\r\n\t * @see #isHoshanaRabba()\r\n\t * @see #SUCCOS\r\n\t * @see #CHOL_HAMOED_SUCCOS\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isSuccos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SUCCOS || holidayIndex == JewishCalendar.CHOL_HAMOED_SUCCOS || holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Hoshana Rabba.\r\n\t *\r\n\t * @return true true if the current day is Hoshana Rabba.\r\n\t * @see #isYomTov()\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isHoshanaRabba():boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shmini Atzeres.\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SHEMINI_ATZERES\r\n\t */\r\n public isShminiAtzeres():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Simchas Torah. This will always return false if {@link #getInIsrael() in Israel}\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SIMCHAS_TORAH\r\n\t */\r\n public isSimchasTorah():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n //if in Israel, Holiday index of SIMCHAS_TORAH will not be returned by getYomTovIndex()\r\n return holidayIndex == JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoedSuccos(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach or Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach or Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_PESACH\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoed(): boolean {\r\n return this.isCholHamoedPesach() || this.isCholHamoedSuccos();\r\n }\r\n\r\n /**\r\n * Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and last days),\r\n * Shavuos, Rosh Hashana, Yom Kippur and Succos and Hoshana Rabba.\r\n *\r\n * @return true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom Kippur and Succos\r\n * @see #isYomTov()\r\n * @see #isErevYomTovSheni()\r\n */\r\n public isErevYomTov(): boolean {\r\n const erevYomTov = [\r\n JewishCalendar.EREV_PESACH,\r\n JewishCalendar.EREV_SHAVUOS,\r\n JewishCalendar.EREV_ROSH_HASHANA,\r\n JewishCalendar.EREV_YOM_KIPPUR,\r\n JewishCalendar.EREV_SUCCOS,\r\n JewishCalendar.HOSHANA_RABBA,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return erevYomTov.includes(holidayIndex)\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() === 20);\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n *\r\n * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n * @see #isRoshChodesh()\r\n */\r\n public isErevRoshChodesh(): boolean {\r\n // Erev Rosh Hashana is not Erev Rosh Chodesh.\r\n return (this.getJewishDayOfMonth() === 29 && this.getJewishMonth() !== JewishCalendar.ELUL);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Yom Kippur Katan. Returns false for Erev Rosh Hashana,\r\n\t * Erev Rosh Chodesh Cheshvan, Teves and Iyyar. If Erev Rosh Chodesh occurs\r\n\t * on a Friday or Shabbos, Yom Kippur Katan is moved back to Thursday.\r\n\t * \r\n\t * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana.\r\n\t * @see #isRoshChodesh()\r\n\t */\r\n\tpublic isYomKippurKatan(): boolean {\r\n\t\tconst dayOfWeek = this.getDayOfWeek();\r\n\t\tconst month = this.getJewishMonth();\r\n\t\tconst day = this.getJewishDayOfMonth();\r\n\t\tif(month == JewishDate.ELUL || month == JewishDate.TISHREI || month == JewishDate.KISLEV || month == JewishDate.NISSAN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(day == 29 && dayOfWeek != Calendar.FRIDAY && dayOfWeek != Calendar.SATURDAY) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif((day == 27 || day == 28) && dayOfWeek == Calendar.THURSDAY ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n /**\r\n\t * The Monday, Thursday and Monday after the first Shabbos after {@link #isRoshChodesh() Rosh Chodesh}\r\n\t * {@link JewishDate#CHESHVAN Cheshvan} and {@link JewishDate#IYAR Iyar} are BeHaB days. If the last Monday of Iyar's BeHaB coincides with {@link\r\n * #PESACH_SHENI Pesach Sheni}, the method currently considers it both Pesach Sheni and BeHaB.\r\n * As seen in an Ohr Sameach article on the subject The\r\n * unknown Days: BeHaB Vs. Pesach Sheini? there are some customs that delay the day to various points in the future.\r\n * @return true if the day is BeHaB.\r\n */\r\n public isBeHaB(): boolean {\r\n const dayOfWeek = this.getDayOfWeek();\r\n const month = this.getJewishMonth();\r\n const day = this.getJewishDayOfMonth();\r\n\r\n if (month == JewishDate.CHESHVAN || month == JewishDate.IYAR) {\r\n if((dayOfWeek == Calendar.MONDAY && day > 4 && day < 18)\r\n || (dayOfWeek == Calendar.THURSDAY && day > 7 && day < 14)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av, Yom Kippur, Fast of\r\n * Gedalyah, 10 of Teves and the Fast of Esther\r\n *\r\n * @return true if today is a fast day\r\n */\r\n public isTaanis(): boolean {\r\n const taaniyos = [\r\n JewishCalendar.SEVENTEEN_OF_TAMMUZ,\r\n JewishCalendar.TISHA_BEAV,\r\n JewishCalendar.YOM_KIPPUR,\r\n JewishCalendar.FAST_OF_GEDALYAH,\r\n JewishCalendar.TENTH_OF_TEVES,\r\n JewishCalendar.FAST_OF_ESTHER,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return taaniyos.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Return true if the day is Taanis Bechoros (on erev Pesach). It will return true for the 14th of Nissan if it is not\r\n * on Shabbos, or if the 12th of Nissan occurs on a Thursday\r\n *\r\n * @return true if today is the fast of Bechoros\r\n */\r\n public isTaanisBechoros(): boolean {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n // on 14 Nisan unless that is Shabbos where the fast is moved back to Thursday\r\n return this.getJewishMonth() === JewishCalendar.NISSAN && ((day === 14 && dayOfWeek !== Calendar.SATURDAY)\r\n || (day === 12 && dayOfWeek === Calendar.THURSDAY));\r\n }\r\n\r\n /**\r\n * Returns the day of Chanukah or -1 if it is not Chanukah.\r\n *\r\n * @return the day of Chanukah or -1 if it is not Chanukah.\r\n * @see #isChanukah()\r\n */\r\n public getDayOfChanukah(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n if (this.isChanukah()) {\r\n if (this.getJewishMonth() === JewishCalendar.KISLEV) {\r\n return day - 24;\r\n }\r\n // teves\r\n return this.isKislevShort() ? day + 5 : day + 6;\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is one of the 8 days of Chanukah.\r\n * @return if the current day is one of the 8 days of Chanukah.\r\n * @see #getDayOfChanukah()\r\n */\r\n public isChanukah(): boolean {\r\n return this.getYomTovIndex() === JewishCalendar.CHANUKAH;\r\n }\r\n\r\n \t/**\r\n\t * Returns if the day is Purim (Shushan Purim\r\n\t * in a mukaf choma and regular Purim in a non-mukaf choma). \r\n\t * @return if the day is Purim (Shushan Purim in a mukaf choma and regular Purin in a non-mukaf choma)\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public isPurim():boolean {\r\n if (this.isMukafChoma) {\r\n return this.getYomTovIndex() == JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n\r\n return this.getYomTovIndex() == JewishCalendar.PURIM;\r\n }\r\n\r\n /**\r\n * Returns if the day is Rosh Chodesh. Rosh Hashana will return false\r\n *\r\n * @return true if it is Rosh Chodesh. Rosh Hashana will return false\r\n */\r\n public isRoshChodesh(): boolean {\r\n // Rosh Hashana is not rosh chodesh. Elul never has 30 days\r\n return (this.getJewishDayOfMonth() === 1 && this.getJewishMonth() !== JewishCalendar.TISHREI) || this.getJewishDayOfMonth() === 30;\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos and sunday is Rosh Chodesh.\r\n *\r\n * @return true if it is Shabbos and sunday is Rosh Chodesh.\r\n */\r\n public isMacharChodesh(): boolean {\r\n return (this.getDayOfWeek() === SATURDAY && (this.getJewishDayOfMonth() === 30 || this.getJewishDayOfMonth() === 29));\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos Mevorchim.\r\n *\r\n * @return true if it is Shabbos Mevorchim.\r\n */\r\n public isShabbosMevorchim(): boolean {\r\n return this.getDayOfWeek() === SATURDAY\r\n && this.getJewishDayOfMonth() >= 23\r\n && this.getJewishDayOfMonth() <= 29\r\n && this.getJewishMonth() !== JewishCalendar.ELUL;\r\n }\r\n\r\n /**\r\n * Returns the int value of the Omer day or -1 if the day is not in the omer\r\n *\r\n * @return The Omer count as an int or -1 if it is not a day of the Omer.\r\n */\r\n public getDayOfOmer(): number {\r\n let omer: number = -1; // not a day of the Omer\r\n const month: number = this.getJewishMonth();\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n // if Nissan and second day of Pesach and on\r\n if (month === JewishCalendar.NISSAN && day >= 16) {\r\n omer = day - 15;\r\n // if Iyar\r\n } else if (month === JewishCalendar.IYAR) {\r\n omer = day + 15;\r\n // if Sivan and before Shavuos\r\n } else if (month === JewishCalendar.SIVAN && day < 6) {\r\n omer = day + 44;\r\n }\r\n return omer;\r\n }\r\n\r\n /**\r\n * Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This\r\n * method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude\r\n * of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method\r\n * intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the\r\n * default (or set) Timezone.\r\n *\r\n * @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)\r\n */\r\n public getMoladAsDate(): Temporal.ZonedDateTime {\r\n const molad: JewishDate = this.getMolad();\r\n const locationName: string = 'Jerusalem, Israel';\r\n\r\n const latitude: number = 31.778; // Har Habayis latitude\r\n const longitude: number = 35.2354; // Har Habayis longitude\r\n\r\n // The raw molad Date (point in time) must be generated using standard time. Using \"Asia/Jerusalem\" timezone will result in the time\r\n // being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual time in DST will be done by the date\r\n // formatter class used to display the Date.\r\n const yerushalayimStandardTZ: string = '+02:00';\r\n const geo: GeoLocation = new GeoLocation(locationName, latitude, longitude, yerushalayimStandardTZ);\r\n\r\n const moladSeconds: number = (molad.getMoladChalakim() * 10) / 3;\r\n // subtract local time difference of 20.94 minutes (20 minutes and 56.496 seconds) to get to Standard time\r\n const milliseconds: number = Math.trunc(1000 * (moladSeconds - Math.trunc(moladSeconds)));\r\n\r\n return Temporal.ZonedDateTime.from({\r\n timeZone: geo.getTimeZone(),\r\n year: molad.getGregorianYear(),\r\n month: molad.getGregorianMonth() + 1,\r\n day: molad.getGregorianDayOfMonth(),\r\n hour: molad.getMoladHours(),\r\n minute: molad.getMoladMinutes(),\r\n second: Math.trunc(moladSeconds),\r\n millisecond: milliseconds,\r\n })\r\n .subtract({ nanoseconds: Math.trunc(geo.getLocalMeanTimeOffset()) });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 3 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana3Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 72 });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber. See the Bach's opinion on this time. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 7 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana7Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 168 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and\r\n * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying alos before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment halfway between molad and molad.\r\n * @see #getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({\r\n days: 14,\r\n hours: 18,\r\n minutes: 22,\r\n seconds: 1,\r\n milliseconds: 666,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down\r\n * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber\r\n * agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid\r\n * Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during\r\n * the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos\r\n * before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 15 days after the molad.\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date)\r\n */\r\n public getSofZmanKidushLevana15Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ days: 15 });\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafBavliYomi}\r\n */\r\n public getDafYomiBavli(): DafBavliYomi {\r\n return YomiCalculator.getDafYomiBavli(this);\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafYomiYerushalmi}\r\n */\r\n public getDafYomiYerushalmi(): DafYomiYerushalmi | null {\r\n return YerushalmiYomiCalculator.getDafYomiYerushalmi(this);\r\n }\r\n\r\n /**\r\n * Returns the equivalent Chafetz Chayim Yomi page for the date that this is set to\r\n */\r\n public getChafetzChayimYomi() {\r\n return ChafetzChayimYomiCalculator.getChafetzChayimYomi(this);\r\n }\r\n\r\n /**\r\n\t * Returns the elapsed days since Tekufas Tishrei. This uses Tekufas Shmuel (identical to the Julian Year with a solar year length of 365.25 days).\r\n\t * The notation used below is D = days, H = hours and C = chalakim. Molad BaHaRad was 2D,5H,204C or 5H,204C from the start of Rosh Hashana year 1. For molad\r\n\t * Nissan add 177D, 4H and 438C (6 * 29D, 12H and 793C), or 177D,9H,642C after Rosh Hashana year 1.\r\n\t * Tekufas Nissan was 7D, 9H and 642C before molad Nissan according to the Rambam, or 170D, 0H and\r\n\t * 0C after Rosh Hashana year 1. Tekufas Tishrei was 182D and 3H (365.25 / 2) before tekufas\r\n\t * Nissan, or 12D and 15H before Rosh Hashana of year 1. Outside of Israel we start reciting Tal\r\n\t * Umatar in Birkas Hashanim from 60 days after tekufas Tishrei. The 60 days include the day of\r\n\t * the tekufah and the day we start reciting Tal Umatar. 60 days from the tekufah == 47D and 9H\r\n\t * from Rosh Hashana year 1.\r\n\t * \r\n\t * @return the number of elapsed days since tekufas Tishrei.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate()\r\n\t * @see #isVeseinTalUmatarStartingTonight()\r\n\t * @see #isVeseinTalUmatarRecited()\r\n\t */\r\n public getTekufasTishreiElapsedDays():number {\r\n // Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all\r\n // 4 years of the secular leap year cycle to share 47 days. Truncate 47D and 9H to 47D for simplicity.\r\n const days:number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) + (this.getDaysSinceStartOfJewishYear() - 1) + 0.5;\r\n // days of completed solar years\r\n const solar:number = (this.getJewishYear() - 1) * 365.25;\r\n return Math.floor(days - solar);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t * \r\n\t * @return true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t */\r\n public isIsruChag():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ISRU_CHAG;\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(jewishCalendar: JewishCalendar): boolean {\r\n return Temporal.PlainDate.compare(this.getDate(), jewishCalendar.getDate()) === 0 && this.getInIsrael() === jewishCalendar.getInIsrael();\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill';\r\n\r\nimport { AstronomicalCalendar } from './AstronomicalCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\nimport { IllegalArgumentException, NullPointerException } from './polyfills/errors.ts';\r\nimport { Long_MIN_VALUE } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim\r\n * (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the\r\n * Zmanim library. For a much more extensive list of zmanim, use the {@link ComplexZmanimCalendar} that\r\n * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for\r\n * simple examples on using the API. \r\n * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance\r\n * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his\r\n * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)\r\n * and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel\r\n * Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n * 34 and\r\n * 42 is of the opinion that elevation should be\r\n * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should\r\n * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for\r\n * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link\r\n * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},\r\n * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}\r\n * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to\r\n * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since\r\n * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of\r\n * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use\r\n * of elevation.\r\n * For additional information on the halachic impact of elevation on zmanim see:\r\n * \r\n * \r\n *

Note: It is important to read the technical notes on top of the {@link AstronomicalCalculator} documentation\r\n * before using this code.\r\n *

I would like to thank Rabbi Yaakov Shakow, the\r\n * author of Luach Ikvei Hayom who spent a considerable amount of time reviewing, correcting and making suggestions on the\r\n * documentation in this library.\r\n *

Disclaimer:

I did my best to get accurate results, but please double-check before relying on these\r\n * zmanim for halacha lema'aseh.\r\n * \r\n * \r\n * @author © Eliyahu Hershfeld 2004 - 2022\r\n */\r\nexport class ZmanimCalendar extends AstronomicalCalendar {\r\n /**\r\n\t * Is elevation factored in for some zmanim (see {@link #isUseElevation()} for additional information).\r\n\t * @see #isUseElevation()\r\n\t * @see #setUseElevation(boolean)\r\n\t */\r\n private useElevation: boolean = false;\r\n\r\n /**\r\n\t * Is elevation above sea level calculated for times besides sunrise and sunset. According to Rabbi Dovid Yehuda\r\n\t * Bursztyn in his Zmanim Kehilchasam (second edition published\r\n\t * in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and sunset should use elevation. However\r\n\t * Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n\t * 34 and 42 is of the opinion that elevation should be\r\n\t * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons\r\n\t * should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for\r\n\t * zmanim calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will\r\n\t * impact sunrise and sunset based zmanim such as {@link #getSunrise()}, {@link #getSunset()},\r\n\t * {@link #getSofZmanShmaGRA()}, alos based zmanim such as {@link #getSofZmanShmaMGA()} that are based on a\r\n\t * fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact\r\n * zmanim that are a degree based offset of sunrise and sunset, such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()}.\r\n * \r\n * @return if the use of elevation is active\r\n * \r\n * @see #setUseElevation(boolean)\r\n */\r\n public isUseElevation(): boolean {\r\n return this.useElevation;\r\n }\r\n\r\n /**\r\n\t * Sets whether elevation above sea level is factored into zmanim calculations for times besides sunrise and sunset.\r\n\t * See {@link #isUseElevation()} for more details. \r\n\t * @see #isUseElevation()\r\n\t * \r\n\t * @param useElevation set to true to use elevation in zmanim calculations\r\n\t */\r\n public setUseElevation(useElevation: boolean): void {\r\n this.useElevation = useElevation;\r\n }\r\n\r\n /**\r\n\t * Is astronomical chatzos used for zmanim calculations. The default value of true will\r\n\t * keep the standard astronomical chatzos calculation, while setting it to false will use half of\r\n\t * a solar day calculation for chatzos.\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t */\r\n\tprivate useAstronomicalChatzos:boolean = true;\r\n\r\n\t/**\r\n\t * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For\r\n\t * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos\r\n\t * would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t */\r\n\tpublic isUseAstronomicalChatzos(): boolean {\r\n\t\treturn this.useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t */\r\n\tpublic setUseAstronomicalChatzos(useAstronomicalChatzos: boolean) {\r\n\t\tthis.useAstronomicalChatzos = useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. The default value of false will keep the standard start to end of day calculations, while setting\r\n\t * it to true will use half of a solar day calculation for zmanim.\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t */\r\n\tprivate useAstronomicalChatzosForOtherZmanim:boolean = false;\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than\r\n\t * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t */\r\n\tpublic isUseAstronomicalChatzosForOtherZmanim():boolean {\r\n\t\treturn this.useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t */\r\n\tpublic setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean) {\r\n\t\tthis.useAstronomicalChatzosForOtherZmanim = useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n /**\r\n\t * The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn\r\n\t * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n\t * a mil (Rambam and others). The sun's position at\r\n\t * 72 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is\r\n\t * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n\t * \r\n\t * @see #getAlosHashachar()\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()\r\n\t */\r\n protected static readonly ZENITH_16_POINT_1: number = ZmanimCalendar.GEOMETRIC_ZENITH + 16.1;\r\n\r\n /**\r\n\t * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the position of the sun 36\r\n\t * minutes after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which\r\n\t * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,\r\n\t * which is later than the required 3 medium stars.\r\n\t * \r\n\t * @see #getTzais()\r\n\t * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()\r\n\t */\r\n protected static readonly ZENITH_8_POINT_5: number = ZmanimCalendar.GEOMETRIC_ZENITH + 8.5;\r\n\r\n /**\r\n\t * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the\r\n\t * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.\r\n\t */\r\n private candleLightingOffset: number = 18;\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the\r\n\t * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunrise()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunrise()\r\n\t */\r\n protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunrise();\r\n }\r\n return this.getSeaLevelSunrise();\r\n }\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),\r\n\t * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunset()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunset()\r\n\t */\r\n protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunset();\r\n }\r\n return this.getSeaLevelSunset();\r\n }\r\n\r\n /**\r\n\t * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the\r\n\t * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, a time that Rabbi Meir\r\n\t * Posen in his the Ohr Meir calculated that 3 small\r\n\t * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant.\r\n\t * \r\n\t * @see #ZENITH_8_POINT_5\r\n\t * \r\n\t * @return The Date of nightfall. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t * @see #ZENITH_8_POINT_5\r\n\t * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais\r\n\t */\r\n public getTzais(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n\t * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n\t * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. This is based on the\r\n\t * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is\r\n\t * takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes before {@link #getSunrise sunrise} in Jerusalem\r\n\t * on the around the equinox /\r\n\t * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.\r\n\t * \r\n\t * @see #ZENITH_16_POINT_1\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * \r\n\t * @return The Date of dawn. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getAlosHashachar(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n\t * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time\r\n\t * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but\r\n\t * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between\r\n\t * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the\r\n\t * distance of 4 Mil.\r\n\t * \r\n\t * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n\t * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n\t * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getAlos72() {\r\n return this.getElevationAdjustedSunrise()\r\n\t\t?.subtract({ minutes: 72 });\r\n }\r\n\r\n /**\r\n\t * This method returns chatzos (midday) following most opinions that chatzos is the midpoint\r\n\t * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea level sunset}. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. The returned value is identical to {@link #getSunTransit()}. In reality due to lengthening or\r\n\t * shortening of day, this is not necessarily the exact midpoint of the day, but it is very close.\r\n\t * \r\n\t * @see AstronomicalCalendar#getSunTransit()\r\n\t * @return the Date of chatzos. If the calculation can't be computed such as in the Arctic Circle\r\n\t * where there is at least one day where the sun does not rise, and one where it does not set, a null will\r\n\t * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getChatzos(): Temporal.ZonedDateTime | null {\r\n if (this.useAstronomicalChatzos) {\r\n\t\treturn this.getSunTransit(); // can be null of the calculator does not support astronomical chatzos\r\n\t} else {\r\n\t\tconst halfDayChatzos = this.getChatzosAsHalfDay();\r\n\t\tif(halfDayChatzos == null) {\r\n\t\t\treturn this.getSunTransit(); // can be null if the calculator does not support astronomical chatzos\r\n\t\t} else {\r\n\t\t\treturn halfDayChatzos;\r\n\t\t}\r\n\t}\r\n }\r\n\r\n \t/**\r\n\t * Returns chatzos calculated as halfway between sunrise and sunset. Many are of the opinion opinion that\r\n\t * chatzos is calculated as the the midpoint between {@link #getSeaLevelSunrise sea level sunrise} and\r\n\t * {@link #getSeaLevelSunset sea level sunset}, despite it not being the most accurate way to calculate it. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. In reality due to lengthening or shortening of day, this is not necessarily the exact midpoint of\r\n\t * the day, but it is very close. This method allows you to use the NOAACalculator and still calculate chatzos\r\n\t * as six shaaos zmaniyos after sunrise. There are currently two {@link\r\n\t * com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the {@link\r\n\t * com.kosherjava.zmanim.util.NOAACalculator} and the {@link com.kosherjava.zmanim.util.SunTimesCalculator}.\r\n\t * The SunTimesCalculator calculates chatzos as halfway between sunrise and sunset (and of six shaaos\r\n\t * zmaniyos), while the NOAACalculator calculates it as astronomical chatzos that is slightly more\r\n\t * accurate. This method allows you to use the NOAACalculator and still calculate chatzos as six shaaos\r\n\t * zmaniyos after sunrise. See The Definition\r\n\t * of Chatzos for a detailed explanation of the ways to calculate Chatzos.\r\n\t *\r\n\t * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see AstronomicalCalendar#getSunTransit(Date, Date)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * \r\n\t * @return the Date of the latest chatzos. If the calculation can't be computed such\r\n\t * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n\t * it does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n\tpublic getChatzosAsHalfDay(): Temporal.ZonedDateTime {\r\n\t\treturn this.getSunTransit(this.getSeaLevelSunrise()!, this.getSeaLevelSunset()!)!;\r\n\t}\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman krias shema (time to recite shema in the morning)\r\n\t * that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of\r\n\t * the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return sof zman krias shema according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman krias shema. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to\r\n\t * this method.\r\n\t * @return the Date of the latest zman shema based on the start and end of day times passed to this\r\n\t * method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day\r\n\t * a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n\t * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 3);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see #isUseElevation()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()\r\n\t * @return the Date of the latest zman shema according to the GRA. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned. See the detailed explanation on top of the {@link\r\n\t * AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShmaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date of the latest zman shema. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()\r\n\t * @see ComplexZmanimCalendar#getAlos72()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that \r\n\t */\r\n public getSofZmanShmaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that\r\n\t * tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes\r\n\t * a Mil. According to the Machtzis Hashekel in\r\n\t * Orach Chaim 235:3, the Pri Megadim in Orach\r\n\t * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard\r\n\t * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting) a 72\r\n\t * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.\r\n\t * \r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @return the Date representing 72 minutes after sunset. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getTzais72() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 72 })\r\n }\r\n\r\n /**\r\n\t * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before\r\n\t * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be\r\n\t * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments\r\n\t * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset\r\n\t * to {@link #getTimeOffset(Date, long)}.\r\n\t * \r\n\t * @return candle lighting time. If the calculation can't be computed such as in the Arctic Circle where there is at\r\n\t * least one day a year where the sun does not rise, and one where it does not set, a null will be returned.\r\n\t * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t * \r\n\t * @see #getSeaLevelSunset()\r\n\t * @see #getCandleLightingOffset()\r\n\t * @see #setCandleLightingOffset(double)\r\n\t */\r\n public getCandleLighting() {\r\n return this.getSeaLevelSunset()?.subtract({ minutes: this.getCandleLightingOffset() });\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman tfilah (time to recite the morning prayers)\r\n\t * that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day.\r\n\t * As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman tfilah. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman tfilah. This can be sunset or any tzais passed\r\n\t * to this method.\r\n\t * @return the Date of the latest zman tfilah based on the start and end of day times passed\r\n\t * to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least\r\n\t * one day a year where the sun does not rise, and one where it does not set, a null will be returned. See\r\n\t * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 4);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()\r\n\t * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set), a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisMGA()\r\n\t * @see #getAlos72()\r\n\t */\r\n public getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n * A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers)\r\n * that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha gedola according to the opinion of the\r\n * GRA.\r\n * \r\n * @param startOfDay\r\n * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed\r\n * to this method.\r\n * @return the Date of the time of Mincha gedola based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime | undefined): Temporal.ZonedDateTime {\r\n\tif (!startOfDay && !endOfDay) {\r\n\t\tif(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, this.getSunset()!, 0.5)!;\r\n\t\t} else {\r\n\t\t\treturn this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 6.5)!;\r\n\t\t}\r\n\t} else if (startOfDay && endOfDay) {\r\n\t\tif(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, endOfDay, 0.5)!;\r\n\t\t} else {\r\n\t\t\treturn this.getShaahZmanisBasedZman(startOfDay, endOfDay, 6.5)!;\r\n\t\t}\r\n\t}\r\n\r\n\tthrow new IllegalArgumentException(\"Need valid parameters\");\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half\r\n\t * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * shaos zmaniyos (temporal hours) after the\r\n\t * start of the day, calculated using the start and end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.\r\n\t * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea\r\n\t * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n\t * setting) to this method will return samuch lemincha ketana according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos\r\n\t * passed to to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais\r\n\t * passed to this method.\r\n\t * @return the Date of the time of Mincha ketana based on the start and end of day times\r\n\t * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n\t * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n\t * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()\r\n\t */\r\n public getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9);\r\n }\r\n\r\n /**\r\n * A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in\r\n * the opinion of the Rambam and others) that is\r\n * 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha ketana according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @return the Date of the time of Mincha ketana based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9.5);\r\n }\r\n\r\n /**\r\n * A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is\r\n * 10.75 hours after the start of the day, (or 1.25 hours before the end of the day) based on the start and end of\r\n * the day passed to the method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return plag mincha according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @return the Date of the time of plag hamincha based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 10.75);\r\n }\r\n\r\n /**\r\n * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}\r\n * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on\r\n * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n *\r\n * @see #getPlagHamincha(Date, Date)\r\n * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()\r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n\r\n /*\r\n public getPlagHamincha(): Date {\r\n return this.getPlagHamincha(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to\r\n * the opinion of the GRA. This calculation divides\r\n * the day based on the opinion of the GRA that the day runs from from {@link #getSeaLevelSunrise() sea\r\n * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal\r\n * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can\r\n * account for elevation.\r\n *\r\n * @return the long millisecond length of a shaah zmanis calculated from sunrise to sunset.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSeaLevelSunset()\r\n * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()\r\n */\r\n public getShaahZmanisGra() {\r\n return this.getTemporalHour(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos\r\n * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and tfila).\r\n * Dawn for this calculation is 72 minutes before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset\r\n * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation setting).\r\n * This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating a\r\n * shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComplexZmanimCalendar}.\r\n *\r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisMGA() {\r\n return this.getTemporalHour(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ZmanimCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes a {@link GeoLocation} as a parameter.\r\n *\r\n * @param location\r\n * the location\r\n */\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which\r\n * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some\r\n * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom\r\n * for candle lighting time.\r\n *\r\n * @return Returns the currently set candle lighting offset in minutes.\r\n * @see #getCandleLighting()\r\n * @see #setCandleLightingOffset(double)\r\n */\r\n public getCandleLightingOffset(): number {\r\n return this.candleLightingOffset;\r\n }\r\n\r\n /**\r\n * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is\r\n * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15\r\n * minutes, while the custom in Jerusalem is to use a 40 minute offset.\r\n *\r\n * @param candleLightingOffset\r\n * The candle lighting offset to set in minutes.\r\n * @see #getCandleLighting()\r\n * @see #getCandleLightingOffset()\r\n */\r\n public setCandleLightingOffset(candleLightingOffset: number): void {\r\n this.candleLightingOffset = candleLightingOffset;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ZmanimCalendar';\r\n }\r\n\r\n /**\r\n * This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition.\r\n * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this\r\n * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the\r\n * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.\r\n *\r\n * @param currentTime the current time\r\n * @param tzais the time of tzais\r\n * @param inIsrael whether to use Israel holiday scheme or not\r\n *\r\n * @return true if melacha is prohibited or false if it is not.\r\n *\r\n * @see JewishCalendar#isAssurBemelacha()\r\n * @see JewishCalendar#hasCandleLighting()\r\n * @see JewishCalendar#setInIsrael(boolean)\r\n */\r\n public isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n const date = this.getDate();\r\n jewishCalendar.setGregorianDate(date.year, date.month - 1, date.day);\r\n jewishCalendar.setInIsrael(inIsrael);\r\n\r\n // erev shabbos, YT or YT sheni and after shkiah\r\n const sunset = this.getElevationAdjustedSunset();\r\n if (!sunset) throw new NullPointerException();\r\n if (jewishCalendar.hasCandleLighting() && currentTime >= sunset) {\r\n return true;\r\n }\r\n\r\n // is shabbos or YT and it is before tzais\r\n return jewishCalendar.isAssurBemelacha() && currentTime <= tzais;\r\n }\r\n\r\n /**\r\n * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the\r\n * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the\r\n * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on\r\n * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the\r\n * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha\r\n * according to the opinion of the GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the zman. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the zman. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param hours\r\n * the number of shaahos zmaniyos (temporal hours) to offset from the start of day\r\n * @return the Date of the time of zman with the shaahos zmaniyos (temporal hours)\r\n * in the day offset from the start of day passed to this method. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the {@link\r\n * AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null {\r\n const shaahZmanis = this.getTemporalHour(startOfDay, endOfDay)!;\r\n\tconst tweakDuration = Temporal.Duration.from({ nanoseconds: Math.trunc(shaahZmanis.total('nanoseconds') * hours) })\r\n\r\n return startOfDay!.add(tweakDuration)\r\n }\r\n\r\n /**\r\n\t * A utility method to calculate zmanim based on Rav Moshe\r\n\t * Feinstein and others as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n\t * of Staten Island and other calendars. The day is split in two, from alos / sunrise to chatzos, and the\r\n\t * second half of the day, from chatzos to sunset / tzais. Morning based times are calculated. based on the first\r\n\t * 6 hours of the day, and afternoon times based on the second half of the day. As an example, passing 0.5, a start of\r\n\t * chatzos and an end of day as sunset will return the time of mincha gedola GRA as half an hour zmanis\r\n\t * based on the second half of the day.\r\n\t * \r\n\t * @param startOfHalfDay\r\n\t * The start of the half day. This would be alos or sunrise for morning based times such as sof zman krias\r\n\t * shema and chatzos for afternoon based times such as mincha gedola.\r\n\t * @param endOfHalfDay\r\n\t * The end of the half day. This would be chatzos for morning based times such as sof zman krias shema\r\n\t * and sunset or tzais for afternoon based times such as mincha gedola.\r\n\t * @param hours\r\n\t * The number of sha'os zmaniyos (hours) to offset the beginning of the first or second half of the day. For example,\r\n\t * 3 for sof zman Shma, 0.5 for mincha gedola (half an hour after chatzos) and 4.75 for plag\r\n\t * hamincha.\r\n\t * \r\n\t * @return the Date of zman based on calculation of the first or second half of the day. If the\r\n\t * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the\r\n\t * sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n\t * on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n\t */\r\n\tpublic getHalfDayBasedZman(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n\t\tif (startOfHalfDay == null || endOfHalfDay == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst intValue = startOfHalfDay.until(endOfHalfDay).total({ unit: 'nanoseconds' }) / 6;\r\n\t\tconst duration = Temporal.Duration.from({ nanoseconds: Math.trunc(intValue * hours) });\r\n\r\n\t\treturn startOfHalfDay.add(duration);\r\n\t}\r\n\r\n /**\r\n\t * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree\r\n\t * offset. For the equilux where there\r\n\t * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location\r\n\t * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis\r\n\t * for those who want to use the Minchas Cohen in Ma'amar 2:4\r\n\t * and the Pri Chadash who calculate tzais as a percentage\r\n\t * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based\r\n\t * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.\r\n\t * \r\n\t * @param degrees\r\n\t * the number of degrees below the horizon after sunset.\r\n\t * @param sunset\r\n\t * if true the calculation should be degrees after sunset, or if false, degrees before sunrise.\r\n\t * @return the double percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon\r\n\t * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed\r\n\t * explanation on top of the page.\r\n\t */\r\n\tpublic getPercentOfShaahZmanisFromDegrees(degrees:number, sunset: boolean):number|null {\r\n\t\tconst seaLevelSunrise: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n\t\tconst seaLevelSunset: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n\t\tlet twilight: Temporal.ZonedDateTime | null = null;\r\n\t\tif (sunset) {\r\n\t\t\ttwilight = this.getSunsetOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t} else {\r\n\t\t\ttwilight = this.getSunriseOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t}\r\n\t\tif (seaLevelSunrise == null || seaLevelSunset == null || twilight == null) {\r\n\t\t\treturn Long_MIN_VALUE;\r\n\t\t}\r\n\t\tconst shaahZmanis = seaLevelSunrise.until(seaLevelSunset).total('nanoseconds') / 12;\r\n\t\tlet riseSetToTwilight;\r\n\t\tif (sunset) {\r\n\t\t\triseSetToTwilight = seaLevelSunset.until(twilight).total('nanoseconds');\r\n\t\t} else {\r\n\t\t\triseSetToTwilight = twilight.until(seaLevelSunrise).total('nanoseconds');\r\n\t\t}\r\n\t\treturn riseSetToTwilight / shaahZmanis;\r\n\t}\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar, TimeZone } from './polyfills/Utils.ts';\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\n\r\nconst rZTDsort: typeof Temporal.ZonedDateTime.compare = (a,b) => {\r\n\tconst pSort = Temporal.ZonedDateTime.compare(a, b);\r\n\treturn pSort * -1 as Temporal.ComparisonResult;\r\n}\r\n\r\n/**\r\n *

This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis\r\n * for most zmanim in this class are from the sefer Yisroel\r\n * Vehazmanim by Rabbi Yisrael Dovid Harfenes.\r\n * As an example of the number of different zmanim made available by this class, there are methods to return 18\r\n * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this\r\n * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for\r\n * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the\r\n * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating\r\n * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest\r\n * for calculation beyond zmanim calculations. Here are some examples.\r\n *

First create the Calendar for the location you would like to calculate:\r\n * \r\n *

\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * // Optionally set the date or it will default to today's date\r\n * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);
\r\n *

\r\n * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from\r\n * year to year, if your version of Java does not have an up to date timezone database, create a\r\n * {@link java.util.SimpleTimeZone} with the known start and end of DST.\r\n * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),\r\n * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:\r\n *

\r\n *

\r\n *  Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);
\r\n *

\r\n * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting\r\n * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used:\r\n * \r\n *

\r\n * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);
\r\n *

\r\n * or even simpler using the included convenience methods\r\n *

\r\n * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());
\r\n *

\r\n * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is\r\n * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate\r\n * the Trumas Hadeshen's alos to\r\n * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.\r\n * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before\r\n * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais\r\n * do not use identical degree-based offsets, this leads to chatzos being at a time other than the\r\n * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note\r\n * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.\r\n *
\r\n *

\r\n * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
\r\n *

\r\n * Something a drop more challenging, but still simple, would be calculating a zman using the same \"complex\"\r\n * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not\r\n * supported by this library, such as calculating the point that one should be makpid\r\n * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day.\r\n *

    \r\n * \t
  1. Calculate the shaah zmanis in milliseconds for this day
  2. \r\n * \t
  3. Add 9 of these shaos zmaniyos to alos starting at 12°
  4. \r\n *
\r\n *
\r\n *
\r\n * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\tshaahZmanis * 9);
\r\n *

\r\n * Calculating this sof zman achila according to the GRA\r\n * is simplicity itself.\r\n *

\r\n * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);
\r\n * \r\n *

Documentation from the {@link ZmanimCalendar} parent class

\r\n * {@inheritDoc}\r\n * \r\n * @author © Eliyahu Hershfeld 2004 - 2023\r\n */\r\nexport class ComplexZmanimCalendar extends ZmanimCalendar {\r\n /**\r\n * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the\r\n * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun\r\n * is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.\r\n * \r\n * @see #getTzaisGeonim3Point7Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_7: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.7;\r\n\r\n /**\r\n * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the\r\n * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun\r\n * is 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.\r\n * \r\n * @see #getTzaisGeonim3Point8Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.8;\r\n\r\n /**\r\n * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun 24 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim5Point95Degrees()\r\n */\r\n protected static readonly ZENITH_5_POINT_95: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 5.95;\r\n\r\n /**\r\n * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as\r\n * 7°5' or 7° and 5 minutes. This calculation is used for calculating alos (dawn) and\r\n * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium sized\r\n * stars by Dr. Baruch Cohen in his calendar published in in 1899 in Strasbourg, France. This calculates to\r\n * 7.0833333° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Sh\"Ut\r\n * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh\"Ut Bnei Tziyon, Tenuvas Sadeh and\r\n * it is very close to the time of the Mekor Chesed of the Sefer chasidim.\r\n * It is close to the position of the sun 30 minutes after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and\r\n * 7.199° at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for details.\r\n * @todo Hyperlink the proper sources.\r\n * \r\n * @see #getTzaisGeonim7Point083Degrees()\r\n * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_083: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7 + (5 / 60);\r\n\r\n /**\r\n * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 45 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux which\r\n * calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir10Point2Degrees()\r\n */\r\n protected static readonly ZENITH_10_POINT_2: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 10.2;\r\n\r\n /**\r\n * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 48 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which\r\n * calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir11Degrees()\r\n */\r\n protected static readonly ZENITH_11_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 11;\r\n\r\n /**\r\n * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions. This calculation is based on the position of the sun\r\n * 52 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which\r\n * calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getMisheyakir11Point5Degrees()\r\n */\r\n protected static readonly ZENITH_11_POINT_5: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 11.5;\r\n\r\n /**\r\n * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating Rabbeinu Tam's bain hashmashos according to some opinions.\r\n * NOTE: See comments on {@link #getBainHashmashosRT13Point24Degrees} for additional details about the degrees.\r\n * \r\n * @see #getBainHashmashosRT13Point24Degrees\r\n * \r\n */\r\n protected static readonly ZENITH_13_POINT_24: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 13.24;\r\n\r\n /**\r\n * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos according to some opinions.\r\n * \r\n * @see #getAlos19Degrees()\r\n * @see #ZENITH_19_POINT_8\r\n */\r\n protected static readonly ZENITH_19_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 19;\r\n\r\n /**\r\n * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is\r\n * based on the position of the sun 90 minutes after sunset in Jerusalem around the equinox / equilux which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n * @see #getAlos90()\r\n * @see #getTzais90()\r\n * @see #ZENITH_19_DEGREES\r\n */\r\n protected static readonly ZENITH_19_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 19.8;\r\n\r\n /**\r\n * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is\r\n * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem oaround the equinox / equilux which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since the level of darkness when the sun is\r\n * 26° and at a point when the level of darkness is long past the 18° point where the darkest point is reached,\r\n * it should only be used lechumra such as delaying the start of nighttime mitzvos or avoiding eating\r\n * this early on a fast day.\r\n * \r\n * @see #getAlos26Degrees()\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n */\r\n protected static readonly ZENITH_26_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 26;\r\n\r\n /**\r\n * The zenith of 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5-minute Mil)\r\n * in Jerusalem around the equinox / equilux,\r\n * which calculates to 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim4Point37Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_37: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.37;\r\n\r\n /**\r\n * The zenith of 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24-minute Mil) in\r\n * Jerusalem around the equinox\r\n * / equilux, which calculates to 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo add documentation links\r\n * \r\n * @see #getTzaisGeonim4Point61Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_61: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.61;\r\n\r\n /**\r\n * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n * @see #getTzaisGeonim4Point8Degrees()\r\n */\r\n protected static readonly ZENITH_4_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 4.8;\r\n\r\n /**\r\n * The zenith of 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of\r\n * the sun {@link #getTzaisGeonim3Point65Degrees() 13.5 minutes} after sunset (3/4 of an 18-minute Mil)\r\n * in Jerusalem around the equinox / equilux which\r\n * calculates to 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @see #getTzaisGeonim3Point65Degrees()\r\n */\r\n protected static readonly ZENITH_3_POINT_65: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.65;\r\n\r\n /**\r\n * The zenith of 3.676° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n */\r\n protected static readonly ZENITH_3_POINT_676: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 3.676;\r\n\r\n /**\r\n * The zenith of 5.88° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).\r\n * @todo Add more documentation.\r\n */\r\n protected static readonly ZENITH_5_POINT_88: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 5.88;\r\n\r\n /**\r\n * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the\r\n * Baal Hatanya.\r\n *\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n */\r\n protected static readonly ZENITH_1_POINT_583: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 1.583;\r\n\r\n /**\r\n * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos\r\n * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn\r\n * and netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n * a mil (Rambam and others). The sun's position at 72\r\n * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is\r\n * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n *\r\n * @see #getAlosBaalHatanya()\r\n */\r\n protected static readonly ZENITH_16_POINT_9: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 16.9;\r\n\r\n /**\r\n * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos\r\n * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn\r\n * and netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n * a mil (Rambam and others). The sun's position at 72\r\n * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is\r\n * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n *\r\n * @see #getAlosBaalHatanya()\r\n */\r\n protected static readonly ZENITH_6_DEGREES: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 6;\r\n\r\n /**\r\n * The zenith of 6.45° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions. This is based on the calculations of Rabbi Yechiel Michel Tucazinsky of the position of\r\n * the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset in Jerusalem, and at the\r\n * height of the summer solstice, this zman is 28 minutes after shkiah. This computes to 6.45°\r\n * below {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 it the commonly\r\n * used zman in Israel. It should be noted that this differs from the 6.1°/6.2° calculation for\r\n * Rabbi Tucazinsky's time as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515).\r\n * \r\n * @see #getTzaisGeonim6Point45Degrees()\r\n */\r\n protected static readonly ZENITH_6_POINT_45: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 6.45;\r\n\r\n /**\r\n * The zenith of 7.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions.\r\n * \r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_65: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7.65;\r\n\r\n /**\r\n * The zenith of 7.67° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais according to some opinions.\r\n * \r\n * @see #getTzaisGeonim7Point67Degrees()\r\n */\r\n protected static readonly ZENITH_7_POINT_67: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 7.67;\r\n\r\n /**\r\n * The zenith of 9.3° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating tzais (nightfall) according to some opinions.\r\n * \r\n * @see #getTzaisGeonim9Point3Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_3: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.3;\r\n\r\n /**\r\n * The zenith of 9.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating misheyakir according to some opinions.\r\n * \r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_5: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.5;\r\n\r\n /**\r\n * The zenith of 9.75° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating alos (dawn) and tzais (nightfall) according to some opinions.\r\n * \r\n * @see #getTzaisGeonim9Point75Degrees()\r\n */\r\n protected static readonly ZENITH_9_POINT_75: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH + 9.75;\r\n\r\n /**\r\n * The zenith of 2.1° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 13.5 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this. \r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_2_POINT_1: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 2.1;\r\n\r\n /**\r\n * The zenith of 2.8° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 16.875 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_2_POINT_8: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 2.8;\r\n\r\n /**\r\n * The zenith of 3.05° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for\r\n * calculating the start of bain hashmashos (twilight) of 18 minutes before sunset converted to degrees\r\n * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction\r\n * and from the center of the sun. It would be 0.833° less without this.\r\n * \r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n protected static readonly ZENITH_MINUS_3_POINT_05: number = ComplexZmanimCalendar.GEOMETRIC_ZENITH - 3.05;\r\n\r\n /**\r\n * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah. \r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n\r\n private ateretTorahSunsetOffset: number = 40;\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ComplexZmanimCalendar() {\r\n super();\r\n }\r\n*/\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 19.8° dip. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 19.8°\r\n * below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 19.8° below the western\r\n * geometric horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis19Point8Degrees() {\r\n return this.getTemporalHour(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides\r\n * the day based on the opinion of the Magen Avraham\r\n * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the\r\n * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric\r\n * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis18Degrees() {\r\n return this.getTemporalHour(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is\r\n * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when\r\n * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this\r\n * method are extremely late or early and at a point when the sky is a long time past the 18° point where the\r\n * darkest point is reached, zmanim that use this should only be used lechumra, such as\r\n * delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n */\r\n public getShaahZmanis26Degrees() {\r\n return this.getTemporalHour(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation\r\n * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the\r\n * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below\r\n * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a\r\n * shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzais16Point1Degrees()\r\n * @see #getSofZmanShmaMGA16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n * @see #getMinchaGedola16Point1Degrees()\r\n * @see #getMinchaKetana16Point1Degrees()\r\n * @see #getPlagHamincha16Point1Degrees()\r\n */\r\n\r\n public getShaahZmanis16Point1Degrees() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each\r\n * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n */\r\n public getShaahZmanis60Minutes() {\r\n return this.getTemporalHour(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day\r\n * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes\r\n * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part\r\n * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis72Minutes() {\r\n return this.getShaahZmanisMGA();\r\n }\r\n\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation\r\n * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day\r\n * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day\r\n * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzais72Zmanis()\r\n */\r\n public getShaahZmanis72MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise\r\n * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis90Minutes() {\r\n return this.getTemporalHour(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes\r\n * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal\r\n * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90Zmanis()\r\n * @see #getTzais90Zmanis()\r\n */\r\n public getShaahZmanis90MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the\r\n * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes\r\n * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12\r\n * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos96Zmanis()\r\n * @see #getTzais96Zmanis()\r\n */\r\n public getShaahZmanis96MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th\r\n * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before\r\n * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40\r\n * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()\r\n * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this\r\n * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across\r\n * the sky}.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getShaahZmanisAteretTorah() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute\r\n * added for Rav Yosi.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaKetanaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point8() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point8Degrees());\r\n }\r\n \r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Gedola calculation.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaGedolaAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point7() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise\r\n * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah\r\n * zmanis.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis96Minutes() {\r\n return this.getTemporalHour(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and\r\n * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time\r\n * past the 18° point where the darkest point is reached, zmanim that use this should only be used\r\n * lechumra only, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis26Degrees()\r\n */\r\n public getShaahZmanis120Minutes() {\r\n return this.getTemporalHour(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are\r\n * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point\r\n * is reached, zmanim that use this should only be used lechumra such as delaying the start of\r\n * nighttime mitzvos.\r\n * \r\n * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120Zmanis()\r\n */\r\n public getShaahZmanis120MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on sunrise\r\n * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after\r\n * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after\r\n * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very\r\n * late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120MinutesZmanis()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getPlagHamincha26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is\r\n * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link\r\n * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early\r\n * alos and a very late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getPlagHamincha26Degrees()\r\n */\r\n public getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the \r\n * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.\r\n * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that\r\n * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who\r\n * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the\r\n * Ra'avan is of the opinion that the time to walk a\r\n * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a\r\n * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an\r\n * 18-minute mil. Time based offset calculations are based on the opinion of the\r\n * Rishonim who stated that the time of the neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to\r\n * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a\r\n * degree-based calculation based on 60 minutes.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n *\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getAlos60() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before\r\n * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th\r\n * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to\r\n * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}\r\n * (depending on the {@link #isUseElevation()} setting).\r\n * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation\r\n * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.2);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or\r\n * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based\r\n * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset\r\n * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary\r\n * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos96() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90\r\n * minutes which is 1/8th of a day (12 * 60) / 8 = 90\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.5);\r\n }\r\n\r\n /**\r\n * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96\r\n * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.6);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level\r\n * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based\r\n * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it\r\n * takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos90() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 90 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes\r\n * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time\r\n * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations\r\n * for alos are based on the* opinion of the Rishonim\r\n * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of\r\n * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since\r\n * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast\r\n * day, and not as the start time for mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and method returns alos (dawn) calculated using\r\n * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based\r\n * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /\r\n * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link\r\n * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending\r\n * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link\r\n * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such\r\n * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be\r\n * performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-2);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link\r\n * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same\r\n * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This\r\n * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should\r\n * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for\r\n * mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_26_DEGREES\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getAlos26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the\r\n * eastern geometric horizon before sunrise.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the\r\n * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and \r\n * Rabbi Yaakov Shakow's Luach Ikvei Hayom.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos19Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_DEGREES);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation\r\n * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_19_POINT_8\r\n * @see #getAlos90()\r\n */\r\n public getAlos19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation\r\n * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_16_POINT_1\r\n * @see #getAlos72()\r\n */\r\n public getAlos16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,\r\n * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo recalculate.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_POINT_5\r\n */\r\n public getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,\r\n * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic\r\n * Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for\r\n * this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_DEGREES\r\n */\r\n public getMisheyakir11Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_DEGREES);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2\r\n * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates\r\n * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_10_POINT_2\r\n */\r\n public getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_10_POINT_2);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65\r\n * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute\r\n * zman around the\r\n * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)\r\n * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.\r\n * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36\r\n * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach\r\n * in the name of the Satmar Rov that one should be stringent\r\n * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,\r\n * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow\r\n * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_7_POINT_65\r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n public getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5\r\n * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's\r\n * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to\r\n * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz\r\n * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This\r\n * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,\r\n * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also\r\n * follows the opinion of Rabbi Shmuel Kamenetsky who provided\r\n * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of\r\n * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @return the Date of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_9_POINT_5\r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n public getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This\r\n * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall\r\n * with both being 19.8° below sunrise or sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from\r\n * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of\r\n * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link\r\n * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion\r\n * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to\r\n * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link\r\n * #getSofZmanShmaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShmaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}\r\n * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated\r\n * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *\r\n * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}\r\n * after {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}\r\n * after {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96MinutesZmanis()\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated\r\n * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.\r\n * Generally known as part of the \"Komarno\" zmanim after Rav Yitzchak Eizik of\r\n * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the \r\n * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary\r\n * Lechem Mishneh on Brachos 1:2. It is\r\n * next brought down about 100 years later by the Yaavetz\r\n * (in his siddur, Mor Uktziah Orach\r\n * Chaim 1, Lechem Shamayim, Brachos 1:2\r\n * and She'elos Yaavetz vol. 1 no. 40),\r\n * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.\r\n * See Yisrael Vehazmanim vol. 1 7:3, page 55 -\r\n * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed\r\n * local chatzos} for calculating this type of zman.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n */\r\n public getSofZmanShma3HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 180 })\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.\r\n * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes\r\n * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3\r\n * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that\r\n * is very much a chumra.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based\r\n * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \\u05D7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\r\n * \\u05D5\\u05DB\\u05DC\\u05DC\\u05D5\\u05EA \\u05D4\\u05E8\\u05D6\\u05F4\\u05D4 and the \\u05DE\\u05E0\\u05D5\\u05E8\\u05D4 \\u05D4\\u05D8\\u05D4\\u05D5\\u05E8\\u05D4 as\r\n * mentioned by Yisrael Vehazmanim vol 1, sec. 7,\r\n * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)\r\n * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link\r\n * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this day. If the calculation can't\r\n * be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated\r\n * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3\r\n * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on\r\n * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the\r\n * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from\r\n * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getFixedLocalChatzos()\r\n * \r\n * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in\r\n * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method\r\n * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.\r\n */\r\n public getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null {\r\n const chatzos = this.getFixedLocalChatzos()!;\r\n if (chatzos === null || this.getSunrise() === null) {\r\n return null;\r\n }\r\n let diff = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getElevationAdjustedSunrise()?.until(chatzos).total(\"nanoseconds\")! / 2) });\r\n return chatzos.subtract(diff)\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before\r\n * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to\r\n * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72\r\n * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}\r\n * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after\r\n * {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}\r\n * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after\r\n * {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4\r\n * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120\r\n * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of\r\n * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman\r\n * that is very much a chumra.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate\r\n * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n */\r\n public getSofZmanTfila2HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}\r\n * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as\r\n * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when\r\n * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See\r\n * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One\r\n * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.\r\n * See Shulchan Aruch Orach Chayim 234:1 and\r\n * the Shaar Hatziyon seif katan ches.\r\n * \r\n * @return the Date of 30 minutes after chatzos. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedola30Minutes() {\r\n return this.getChatzos()?.add({ minutes: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72\r\n * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For\r\n * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getAlos72()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n if(this.isUseAstronomicalChatzosForOtherZmanim()) {\r\n\t\t\treturn this.getHalfDayBasedZman(this.getChatzos()!, this.getTzais16Point1Degrees()!, 0.5);\r\n\t\t} else {\r\n\t\t\treturn this.getMinchaGedola(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n\t\t}\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah\r\n * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link\r\n * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.\r\n * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}\r\n * (though that calculation is based on mincha gedola GRA).\r\n * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * \r\n * @return the Date of the mincha gedola. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim3Point7Degrees()\r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point7()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null {\r\n if (!this.getMinchaGedola30Minutes() || !this.getMinchaGedola() || !this.getShaahZmanisAlos16Point1ToTzais3Point7()) {\r\n console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(), this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees())\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getChatzos()?.add({nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7()!.total(\"nanoseconds\") / 2)})!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedola()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is\r\n * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}\r\n * will be returned.\r\n *\r\n * @return the Date of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedola() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedola()!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the\r\n * opinion of the Rambam and others. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos\r\n * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos\r\n * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at\r\n * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to\r\n * the opinion of the Rambam and others. For more information\r\n * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. \r\n * \r\n * @return the the Date of the time of mincha ketana. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getMinchaKetanaAhavatShalom() {\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract({\r\n nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 2.5)\r\n })\r\n }\r\n\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day\r\n * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray\r\n * mincha according to the opinion of the Rambam\r\n * and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60\r\n * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after\r\n * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis60Minutes()\r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n */\r\n public getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after\r\n * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis72Minutes()\r\n */\r\n public getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after\r\n * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis90Minutes()\r\n */\r\n public getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the Magen\r\n * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75\r\n * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after\r\n * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n */\r\n public getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as\r\n * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after\r\n * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link\r\n * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}\r\n * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it\r\n * should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n */\r\n public getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link\r\n * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n */\r\n public getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link\r\n * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link\r\n * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late\r\n * tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link\r\n * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link\r\n * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n */\r\n public getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the opinion\r\n * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.\r\n * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()\r\n * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()\r\n * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *\r\n * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getPlagAlosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the opinion that the day starts at\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()\r\n * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal\r\n * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a\r\n * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated\r\n * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the\r\n * opinion of Rabbi Yaakov Moshe Hillel as published in\r\n * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated\r\n * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos\r\n * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and\r\n * ending at tzais 3.8°.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getMinchaKetanaAhavatShalom()\r\n */\r\n public getPlagAhavatShalom() {\r\n const distance = Temporal.Duration.from({ nanoseconds: this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 1.25 });\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract(distance)\r\n }\r\n\r\n /**\r\n * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is\r\n * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)\r\n * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()\r\n * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact\r\n * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.\r\n * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second\r\n * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10\r\n * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper\r\n * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.\r\n * @todo recalculate the above based on equilux/equinox calculations.\r\n * \r\n * @return the Date of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}\r\n * (90°). If the calculation can't be computed such as northern and southern locations even south of the\r\n * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon\r\n * for this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_13_POINT_24\r\n * @see #getBainHashmashosRT58Point5Minutes()\r\n */\r\n public getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_13_POINT_24);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5\r\n * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4\r\n * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.\r\n * \r\n * @return the Date of 58.5 minutes after sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n */\r\n public getBainHashmashosRT58Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 58, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an\r\n * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.\r\n * \r\n * @return the Date of the bain hashmashos of Rabbeinu Tam in this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083)?.subtract({ minutes: 13, seconds: 30 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the\r\n * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between\r\n * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time\r\n * for bain hashmashos of Rabbeinu Tam.\r\n * \r\n * @return the Date of bain hashmashos of Rabbeinu Tam for this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getBainHashmashosRT2Stars() {\r\n const alos19Point8: Temporal.ZonedDateTime | null = this.getAlos19Point8Degrees();\r\n const sunrise: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise();\r\n if (alos19Point8 === null || sunrise === null) {\r\n return null;\r\n }\r\n\r\n const inverseOfSunriseToAlot = -alos19Point8.until(sunrise).total(\"nanoseconds\")\r\n\r\n return this.getElevationAdjustedSunset()?.add({ nanoseconds: inverseOfSunriseToAlot * (5 / 18) });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes\r\n * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4\r\n * of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date of 18 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim18Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 18 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 3.05° above the horizon around the equinox / equilux,\r\n * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional\r\n * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down\r\n * by Rabbi\r\n * Yedidya Manet in his Zmanei Halacha\r\n * Lema\u2019aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim\r\n * zmanim. The 0.5166° refraction is also used by the Luach Itim\r\n * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested\r\n * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim\u2019s Bein Hashmashos.\r\n * \r\n * @todo recalculate based on equinox/equilux\r\n * @return the Date of the sun's position 3.05° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_3_POINT_05\r\n * @see #getBainHashmashosYereim18Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_3_POINT_05);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875\r\n * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos\r\n * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date of 16.875 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n public getBainHashmashosYereim16Point875Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 16, seconds: 52, milliseconds: 500 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.8° above the horizon around the equinox / equilux,\r\n * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date of the sun's position 2.8° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_8\r\n * @see #getBainHashmashosYereim16Point875Minutes()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes\r\n * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of\r\n * a Mil before sunset and tzais or nightfall starts at sunset.\r\n * \r\n * @return the Date of 13.5 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim13Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 13, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.1° above the horizon around the equinox / equilux in\r\n * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,\r\n * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date of the sun's position 2.1° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_1\r\n * @see #getBainHashmashosYereim13Point5Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 3.7° below sea level.\r\n * @see #ZENITH_3_POINT_7\r\n */\r\n public getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_7);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 3.8° below sea level.\r\n * @see #ZENITH_3_POINT_8\r\n */\r\n public getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 5.95° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_95\r\n */\r\n public getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_95);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 3.65° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_3_POINT_65\r\n */\r\n public getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western\r\n * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be\r\n * relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 3.676° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_3_POINT_676\r\n */\r\n public getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_676);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a mil based\r\n * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the\r\n * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 4.61° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_61\r\n */\r\n public getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_61);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil, based on a 22.5\r\n * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date representing the time when the sun is 4.37° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_37\r\n */\r\n public getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_37);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a 24-minute Mil,\r\n * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the\r\n * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early\r\n * zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @todo Additional detailed documentation needed.\r\n * @return the Date representing the time when the sun is 5.88° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_88\r\n */\r\n public getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_88);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on the\r\n * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's\r\n * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * @todo Additional documentation needed.\r\n * \r\n * @return the Date representing the time when the sun is 4.8° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_8\r\n */\r\n public getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by\r\n * Rabbi Yechiel Michel Tucazinsky. It is\r\n * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset\r\n * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This\r\n * computes to 6.45° below the western horizon.\r\n * @todo Additional documentation details needed.\r\n * \r\n * @return the Date representing the time when the sun is 6.45° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_6_POINT_45\r\n */\r\n public getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_POINT_45);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the\r\n * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\\u2032}) below the western horizon. This is often\r\n * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized\r\n * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben f\u00FCr\r\n * den Beginn der Nacht und des Tages f\u00FCr die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.\r\n * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his\r\n * Sh\"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),\r\n * as did the Sh\"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes\r\n * after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°\r\n * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.\r\n * \r\n * @return the Date representing the time when the sun is 7.083° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_083\r\n */\r\n public getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083);\r\n }\r\n\r\n /**\r\n * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes\r\n * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's\r\n * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding\r\n * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in\r\n * chapter 10 (page 87) and\r\n * chapter 12 (page 108). Also see the\r\n * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.\r\n * This zman is also listed in the Divrei\r\n * Shalom Vol. III, chapter 75, and Bais Av\"i\r\n * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not\r\n * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based\r\n * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed\r\n * to it.\r\n * @todo add hyperlinks to source of Divrei Shalom.\r\n * @return the Date representing the time when the sun is 7.67° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_67\r\n */\r\n public getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_67);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 8.5° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_8_POINT_5\r\n */\r\n public getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is\r\n * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.\r\n * \r\n * @return the Date representing the time when the sun is 9.3° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_3);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60\r\n * minutes after sunset around the equinox / equilux, the\r\n * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to\r\n * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of\r\n * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented\r\n * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @todo recalculate based on equinox / equilux.\r\n * @return the Date representing the time when the sun is 9.75° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see #getTzais60()\r\n */\r\n public getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_75);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes\r\n * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the\r\n * 60 minute concept at {@link #getAlos60()}.\r\n * \r\n * @return the Date representing 60 minutes after sea level sunset. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getTzais60() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * This method returns tzais usually calculated as 40 minutes (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom\r\n * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman\r\n * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman\r\n * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change\r\n * by calling {@link #setAteretTorahSunsetOffset(double)}.\r\n * \r\n * @return the Date representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})\r\n * after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getTzaisAteretTorah() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: this.getAteretTorahSunsetOffset() });\r\n }\r\n\r\n /**\r\n * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.\r\n * This affects most zmanim, since almost all zmanim use subset as part of their calculation.\r\n * \r\n * @return the number of minutes after sunset for Tzait.\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getAteretTorahSunsetOffset(): number {\r\n return this.ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is\r\n * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception\r\n * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.\r\n * This offset impacts all Ateret Torah zmanim.\r\n * \r\n * @param ateretTorahSunsetOffset\r\n * the number of minutes after sunset to use as an offset for the Ateret Torah tzais\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void {\r\n this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added\r\n * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos\r\n * will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getShaahZmanisAteretTorah()\r\n */\r\n public getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation\r\n * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()\r\n * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes\r\n * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos\r\n * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time\r\n * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the calculation of Chacham Yosef\r\n * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}\r\n * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest\r\n * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha\r\n * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The\r\n * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetanaAteretTorah()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72Zmanis()!, this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the calculation of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha\r\n * according to the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.\r\n * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is\r\n * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset\r\n * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and\r\n * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()\r\n * dawn}.\r\n * \r\n * @return the Date of the plag. If the calculation can't be computed such as in the Arctic Circle\r\n * where there is at least one day a year where the sun does not rise, and one where it does not set, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY\r\n * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the\r\n * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to\r\n * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to\r\n * Chacham Baruch Ben Haim). Since there is no\r\n * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of\r\n * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any\r\n * specific calculation for misheyakir. For that reason, this method is not a public method.\r\n *\r\n * @param minutes\r\n * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}\r\n * @return the Date of misheyakir. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n private getMesheyakirAteretTorah(minutes: number) {\r\n return this.getAlos72Zmanis()?.add({ minutes })\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's\r\n * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to\r\n * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the\r\n * equinox. This does not match reality, since there is no direct relationship between the length of the day and\r\n * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the\r\n * winter with the shortest daylight, the twilight period is longer than during the equinoxes.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getTzais72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.2);\r\n }\r\n\r\n /**\r\n * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. \r\n * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn\r\n * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the\r\n * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk)\r\n * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it is sunrise\r\n * or sunset based).\r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise\r\n * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n private getZmanisBasedOffset(hours: 0): undefined;\r\n private getZmanisBasedOffset(hours: Exclude): Temporal.ZonedDateTime;\r\n private getZmanisBasedOffset(hours: number): Temporal.ZonedDateTime | undefined {\r\n if (hours == 0)\r\n return;\r\n\r\n const shaahZmanis = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getShaahZmanisGra()!.total('nanoseconds') * Math.abs(hours)) });\r\n\r\n if (hours > 0) {\r\n return this.getElevationAdjustedSunset()?.add(shaahZmanis);\r\n } else {\r\n return this.getElevationAdjustedSunrise()?.subtract(shaahZmanis);\r\n }\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link\r\n * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)\r\n * zman.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getTzais90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.5);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getTzais96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.6);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a\r\n * Mil according to the Rambam's opinion\r\n * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5\r\n * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}\r\n * uses solar position calculations based on this time.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos90()\r\n */\r\n public getTzais90() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 90 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (nightfall) based on the calculations\r\n * of Rav Chaim Naeh that the time to walk the\r\n * distance of a Mil according to the Rambam's opinion\r\n * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated\r\n * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link\r\n * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman\r\n * is extremely late and at a point that is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n */\r\n public getTzais120() {\r\n return this.getElevationAdjustedSunset()!.add({ minutes: 120 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman\r\n * is extremely late and at a point when the it is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getTzais120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(2);\r\n }\r\n\r\n /**\r\n * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is\r\n * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais\r\n * around the equinox / equilux in\r\n * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See\r\n * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages\r\n * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the\r\n * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a\r\n * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais72()\r\n * @see #getAlos16Point1Degrees() for more information on this calculation.\r\n */\r\n public getTzais16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais based on when the sun is 26°\r\n * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.\r\n * Since the zman is extremely late and at a point when it is long past the 18° point where the\r\n * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime\r\n * mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getTzais26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n */\r\n public getTzais18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais90()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getTzais19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how\r\n * this is calculated see the comments on {@link #getAlos96()}.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96()\r\n */\r\n public getTzais96() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from\r\n * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°\r\n * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00\r\n * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.\r\n * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This\r\n * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied\r\n * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.\r\n * \r\n * @return the Date representing the local chatzos\r\n * @see GeoLocation#getLocalMeanTimeOffset()\r\n */\r\n public getFixedLocalChatzos() {\r\n return this.getLocalMeanTime(12.0);\r\n }\r\n\r\n /**\r\n * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3\r\n * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim\r\n * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular\r\n * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to\r\n * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()}.\r\n * \r\n * @return the Date of the latest zman krias shema calculated as 3 clock hours before\r\n * {@link #getFixedLocalChatzos()}.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n * @see #getSofZmanTfilaFixedLocal()\r\n * \r\n * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.\r\n * This will likely be removed in v3.0.\r\n */\r\n public getSofZmanShmaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 180 });\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing\r\n * differing opinions on how the zman is calculated. According to many opinions {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.\r\n * \r\n * @return the Date of the latest zman tfila.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n * \r\n * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed\r\n * clock hours. This will likely be removed in v3.0.\r\n */\r\n public getSofZmanTfilaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kidush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time\r\n * between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad.\r\n * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in\r\n * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,\r\n * the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameter\r\n * are null, no daytime adjustment will be made.\r\n * @return the Date representing the moment halfway between molad and molad. If the time occurs between\r\n * alos and tzais, alos will be returned\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see #getSofZmanKidushLevana15Days(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime) : Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French\r\n // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana\r\n // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the\r\n // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { \r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana\r\n * can only be said during the day, there are parameters to limit it to between alos and tzais. If\r\n * the time occurs between alos and tzais, tzais will be returned.\r\n * \r\n * @param moladBasedTime\r\n * the molad based time such as molad, tchilas and sof zman Kiddush Levana\r\n * @param alos\r\n * optional start of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either alos or tzais are null.\r\n * @param tzais\r\n * optional end of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either tzais or alos are null\r\n * @param techila\r\n * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and\r\n * and if it is the end, return the end of the previous night (alos passed in). Ignored if either\r\n * alos or tzais are null.\r\n * @return the molad based time. If the zman does not occur during the current date, null will be returned. \r\n */\r\n private getMoladBasedTime(moladBasedTime: Temporal.ZonedDateTime, alos: Temporal.ZonedDateTime | null, tzais: Temporal.ZonedDateTime | null, techila: boolean): Temporal.ZonedDateTime | null {\r\n const lastMidnight: Temporal.ZonedDateTime = this.getMidnightLastNight();\r\n const midnightTonight: Temporal.ZonedDateTime = this.getMidnightTonight();\r\n\r\n if (!((moladBasedTime < lastMidnight) || (moladBasedTime > midnightTonight))) {\r\n if (alos !== null || tzais !== null) {\r\n return techila && !(moladBasedTime < tzais! || moladBasedTime > alos!)\r\n ? tzais\r\n : alos;\r\n }\r\n return moladBasedTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the\r\n * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of\r\n * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,\r\n * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during\r\n * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a\r\n * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and\r\n * tzais, alos will be returned\r\n * \r\n * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevana15Days()\r\n */\r\n public getSofZmanKidushLevana15Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in\r\n // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush\r\n // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will\r\n // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) {\r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the molad.\r\n * If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to\r\n * this method) it will return the following tzais. If null is passed for either alos or tzais, the actual\r\n * tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending\r\n * at tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getTchilasZmanKidushLevana3Days()\r\n */\r\n public getTchilasZmanKidushLevana3Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n jewishCalendar.setGregorianDate(this.getDate().year, this.getDate().month - 1, this.getDate().day);\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh. The 3rd day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day\r\n // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) {\r\n return null;\r\n }\r\n\r\n let zman: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true);\r\n\r\n // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when\r\n // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32)\r\n if (zman === null && jewishCalendar.getJewishDayOfMonth() === 30) {\r\n jewishCalendar.forward(Calendar.MONTH, 1);\r\n zman = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true);\r\n }\r\n\r\n return zman;\r\n }\r\n\r\n /**\r\n * Returns the point in time of Molad as a Date Object. For the traditional day of week, hour,\r\n * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed\r\n * {@link HebrewDateFormatter} that will have formatting for this.\r\n * \r\n * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.\r\n * \r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getMoladAsDate()\r\n */\r\n public getZmanMolad(): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa\r\n // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on\r\n // Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) {\r\n return null;\r\n }\r\n\r\n let molad: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n\r\n // deal with molad that happens on the end of the previous month\r\n if (molad === null && jewishCalendar.getJewishDayOfMonth() > 26) {\r\n jewishCalendar.setDate(jewishCalendar.getDate().add({ months: 1 }))\r\n molad = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n }\r\n return molad;\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return previous midnight\r\n */\r\n private getMidnightLastNight(): Temporal.ZonedDateTime {\r\n // reset hour, minutes, seconds and millis\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return following midnight\r\n */\r\n private getMidnightTonight(): Temporal.ZonedDateTime {\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone())\r\n .add({ days: 1 })\r\n .with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7\r\n * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between\r\n * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it\r\n * return the next tzais.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos\r\n * and ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days(Date, Date)\r\n * @see #getTchilasZmanKidushLevana7Days()\r\n * @see JewishCalendar#getTchilasZmanKidushLevana7Days()\r\n */\r\n public getTchilasZmanKidushLevana7Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day\r\n // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) {\r\n return null;\r\n }\r\n\r\n return this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true);\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to\r\n * the opinion of theGRA. This time is identical to the {@link\r\n * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are\r\n * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the\r\n * GRA that the day is calculated from sunrise to sunset.\r\n * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @see ZmanimCalendar#getSofZmanTfilaGRA()\r\n * @return the Date one is allowed eating chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaGRA();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the\r\n * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()\r\n * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is\r\n * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date of the latest time of eating chametz. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n * @see #getSofZmanTfilaMGA72Minutes()\r\n */\r\n public getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA72Minutes();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of theMagen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link\r\n * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest time of eating chametz. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n */\r\n public getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA16Point1Degrees();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the GRA. This time is 5 hours into the day based on the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea\r\n * level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link\r\n * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of\r\n * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link\r\n * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after\r\n * {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n */\r\n public getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos72()!, this.getTzais72()!, 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5\r\n * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()\r\n * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees(), 5);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are\r\n * calculated as a dip below the horizon before sunrise.\r\n *\r\n * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's\r\n * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which\r\n * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom\r\n * DovBer Levine's commentary on The Baal\r\n * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°\r\n * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by\r\n * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after\r\n * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman\r\n * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n *\r\n * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the\r\n * published time for netz / sunrise.\r\n * \r\n * @return the Date representing the exact sea-level netz amiti (sunrise) time. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * \r\n * @see #getSunrise()\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunriseBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated\r\n * as a dip below the horizon after sunset.\r\n * \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n *\r\n * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.\r\n *\r\n * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n * \r\n * @return the Date representing the exact sea-level shkiah amiti (sunset) time. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getSunset()\r\n * @see #getSeaLevelSunset()\r\n * @see #getSunriseBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunsetBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the\r\n * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset. \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated \r\n * based on the Baal Hatanya's netz\r\n * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides\r\n * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}\r\n * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link\r\n * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.\r\n * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link\r\n * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.\r\n * @return the long millisecond length of a shaah zmanis calculated from\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti\r\n * (\"real\" sunset)}. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a\r\n * year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n public getShaahZmanisBaalHatanya() {\r\n return this.getTemporalHour(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * Returns the Baal Hatanya's alos\r\n * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}\r\n * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.\r\n * \r\n * @see #ZENITH_16_POINT_9\r\n * @return The Date of dawn. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getAlosBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_9);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3\r\n * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from\r\n * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanShma(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest zman shema according to the Baal Hatanya. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4\r\n * hours into the day based on the opinion of the Baal Hatanya that the day is\r\n * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanTfila(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah\r\n * Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getSofZmanTfilaBaalHatanya()\r\n * @return the Date one is allowed eating chametz on Erev Pesach. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaBaalHatanya();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya(), 5)\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray\r\n * mincha. The Rambam is of the opinion that it is\r\n * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the\r\n * Ra\"sh,\r\n * Tur, GRA and others are of the opinion that mincha can be prayed\r\n * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()\r\n * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based\r\n * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5\r\n * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (\"real\" sunrise)}.\r\n * \r\n * @see #getMinchaGedola(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaKetanaBaalHatanya()\r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getSunriseBaalHatanya()!, this.getSunsetBaalHatanya()!);\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()\r\n * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise\r\n * {@link #getMinchaGedolaBaalHatanya()} will be returned.\r\n * \r\n * @return the Date of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedolaBaalHatanya() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedolaBaalHatanya()!\r\n ].sort(rZTDsort)[0];\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana. This is the preferred earliest time to pray\r\n * mincha in the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya()\r\n * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the\r\n * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link\r\n * #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getMinchaKetana(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaGedolaBaalHatanya()\r\n * @return the Date of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This\r\n * calculation is based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getPlagHamincha(Date, Date)\r\n * @return the Date of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon\r\n * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see\r\n * {@link #ZENITH_6_DEGREES}.\r\n *\r\n * @return The Date of nightfall. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_6_DEGREES\r\n */\r\n public getTzaisBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_DEGREES);\r\n }\r\n\r\n /**\r\n * A utility methos to calculate zmanim based on Rav Moshe\r\n * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the\r\n * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated\r\n * based on the first 6 hours, and afternoon times based on the second half of the day.\r\n * \r\n * @param startOfHalfDay\r\n * The start of the half day. This would be alos or sunrise for morning based times and fixed\r\n * local chatzos for the second half of the day.\r\n * @param endOfHalfDay\r\n * The end of the half day. This would be fixed local chatzos for morning based times and sunset\r\n * or tzais for afternoon based times.\r\n * @param hours\r\n * the number of hours to offset the beginning of the first or second half of the day\r\n * \r\n * @return the Date of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n */\r\n public getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n if (startOfHalfDay == null || endOfHalfDay == null) {\r\n return null;\r\n }\r\n const shaahZmanis = startOfHalfDay.until(endOfHalfDay).total('nanoseconds') / 6;\r\n return startOfHalfDay.add({ nanoseconds: Math.trunc(shaahZmanis * hours) });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos90()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos72()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()\r\n * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos\r\n * zmaniyos (solar hours) after sunrise or half of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))\r\n * according to the opinion of the GRA that the day is\r\n * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at\r\n * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila\r\n * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.\r\n * \r\n * @return the Date of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 4);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of\r\n * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed\r\n * local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n */\r\n public getMinchaGedolaGRAFixedLocalChatzos30Minutes() {\r\n return this.getFixedLocalChatzos()?.add({ minutes: 30 });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to\r\n * the opinion of the Rambam and others) calculated according\r\n * to the GRA that is 3.5 shaos zmaniyos (solar\r\n * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 3.5);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the\r\n * GRA that the day ends at sunset and is 4.75 shaos\r\n * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getPlagHamincha()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 4.75);\r\n }\r\n \r\n /**\r\n * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should\r\n * not be used for latitudes different than the NY area.\r\n * \r\n * @return the Date representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getTzais50() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 50 });\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link\r\n * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}\r\n * setting), calculated according to the GRA using a day starting at\r\n * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.\r\n * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos\r\n * 16.1°}. See the Mechaber and Mishna Berurah\r\n * 232 for details.\r\n * \r\n * @see #getShaahZmanisGra()\r\n * @see #getSamuchLeMinchaKetana16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise()!, this.getElevationAdjustedSunset()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity\r\n * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating\r\n * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ComplexZmanimCalendar';\r\n }\r\n}\r\n", "import { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in\r\n * this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and\r\n * milliseconds of a {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2011\r\n * @version 0.9.0\r\n */\r\n\r\nexport class Time {\r\n /** milliseconds in a second. */\r\n private static readonly SECOND_MILLIS: number = 1000;\r\n\r\n /** milliseconds in a minute. */\r\n private static readonly MINUTE_MILLIS: number = Time.SECOND_MILLIS * 60;\r\n\r\n /** milliseconds in an hour. */\r\n private static readonly HOUR_MILLIS: number = Time.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * @see #getHours()\r\n */\r\n private hours: number = 0;\r\n\r\n /**\r\n * @see #getMinutes()\r\n */\r\n private minutes: number = 0;\r\n\r\n /**\r\n * @see #getSeconds()\r\n */\r\n private seconds: number = 0;\r\n\r\n /**\r\n * @see #getMilliseconds()\r\n */\r\n private milliseconds: number = 0;\r\n\r\n /**\r\n * @see #isNegative()\r\n * @see #setIsNegative(boolean)\r\n */\r\n private negative: boolean = false;\r\n\r\n /**\r\n * Constructor with parameters for the hours, minutes, seconds and millisecods.\r\n *\r\n * @param hours the hours to set\r\n * @param minutes the minutes to set\r\n * @param seconds the seconds to set\r\n * @param milliseconds the milliseconds to set\r\n */\r\n constructor(hours: number, minutes: number, seconds: number, milliseconds: number);\r\n /**\r\n * A constructor that sets the time by milliseconds. The milliseconds are converted to hours, minutes, seconds\r\n * and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * @param millis the milliseconds to set.\r\n */\r\n constructor(millis: number);\r\n /**\r\n * A constructor with 2 overloads:\r\n * - A constructor that sets the time by milliseconds.\r\n * The milliseconds are converted to hours, minutes, seconds and milliseconds. If the\r\n * milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * - A constructor with parameters for the hours, minutes, seconds and millisecods.\r\n * @param hoursOrMillis\r\n * @param minutes\r\n * @param seconds\r\n * @param milliseconds\r\n */\r\n constructor(hoursOrMillis: number, minutes?: number, seconds: number = 0, milliseconds: number = 0) {\r\n if (minutes) {\r\n this.hours = hoursOrMillis;\r\n this.minutes = minutes;\r\n this.seconds = seconds;\r\n this.milliseconds = milliseconds;\r\n } else {\r\n let adjustedMillis: number = hoursOrMillis;\r\n if (adjustedMillis < 0) {\r\n this.negative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = Math.trunc(adjustedMillis / Time.HOUR_MILLIS);\r\n adjustedMillis = adjustedMillis - this.hours * Time.HOUR_MILLIS;\r\n\r\n this.minutes = Math.trunc(adjustedMillis / Time.MINUTE_MILLIS);\r\n adjustedMillis = adjustedMillis - this.minutes * Time.MINUTE_MILLIS;\r\n\r\n this.seconds = Math.trunc(adjustedMillis / Time.SECOND_MILLIS);\r\n adjustedMillis = adjustedMillis - this.seconds * Time.SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n }\r\n\r\n /*\r\n public Time(millis: number) {\r\n this((int) millis);\r\n }\r\n\r\n public Time(millis: number) {\r\n adjustedMillis: number = millis;\r\n if (adjustedMillis < 0) {\r\n this.isNegative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = adjustedMillis / HOUR_MILLIS;\r\n adjustedMillis = adjustedMillis - this.hours * HOUR_MILLIS;\r\n\r\n this.minutes = adjustedMillis / MINUTE_MILLIS;\r\n adjustedMillis = adjustedMillis - this.minutes * MINUTE_MILLIS;\r\n\r\n this.seconds = adjustedMillis / SECOND_MILLIS;\r\n adjustedMillis = adjustedMillis - this.seconds * SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n */\r\n\r\n /**\r\n * Does the time represent a negative time 9such as using this to subtract time from another Time.\r\n * @return if the time is negative.\r\n */\r\n public isNegative(): boolean {\r\n return this.negative;\r\n }\r\n\r\n /**\r\n * Set this to represent a negative time.\r\n * @param isNegative that the Time represents negative time\r\n */\r\n public setIsNegative(isNegative: boolean): void {\r\n this.negative = isNegative;\r\n }\r\n\r\n /**\r\n * @return Returns the hour.\r\n */\r\n public getHours(): number {\r\n return this.hours;\r\n }\r\n\r\n /**\r\n * @param hours\r\n * The hours to set.\r\n */\r\n public setHours(hours: number): void {\r\n this.hours = hours;\r\n }\r\n\r\n /**\r\n * @return Returns the minutes.\r\n */\r\n public getMinutes(): number {\r\n return this.minutes;\r\n }\r\n\r\n /**\r\n * @param minutes\r\n * The minutes to set.\r\n */\r\n public setMinutes(minutes: number): void {\r\n this.minutes = minutes;\r\n }\r\n\r\n /**\r\n * @return Returns the seconds.\r\n */\r\n public getSeconds(): number {\r\n return this.seconds;\r\n }\r\n\r\n /**\r\n * @param seconds\r\n * The seconds to set.\r\n */\r\n public setSeconds(seconds: number): void {\r\n this.seconds = seconds;\r\n }\r\n\r\n /**\r\n * @return Returns the milliseconds.\r\n */\r\n public getMilliseconds(): number {\r\n return this.milliseconds;\r\n }\r\n\r\n /**\r\n * @param milliseconds\r\n * The milliseconds to set.\r\n */\r\n public setMilliseconds(milliseconds: number): void {\r\n this.milliseconds = milliseconds;\r\n }\r\n\r\n /**\r\n * Returns the time in milliseconds by converting hours, minutes and seconds into milliseconds.\r\n * @return the time in milliseconds\r\n */\r\n public getTime(): number {\r\n return this.hours * Time.HOUR_MILLIS + this.minutes * Time.MINUTE_MILLIS + this.seconds * Time.SECOND_MILLIS\r\n + this.milliseconds;\r\n }\r\n\r\n /**\r\n * @deprecated This depends on a circular dependency. Use
new ZmanimFormatter(TimeZone.getTimeZone(\"UTC\")).format(time)
instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): string {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new ZmanimFormatter(TimeZone.getTimeZone(\\'UTC\\')).format(time)` instead');\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { IntegerUtils, StringUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times.\r\n * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a\r\n * zman.\r\n *\r\n * Here is an example of various ways of sorting zmanim.\r\n *

First create the Calendar for the location you would like to calculate:\r\n *\r\n *

\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * Zman sunset = new Zman(czc.getSunset(), \"Sunset\");\r\n * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), \"Shaah zmanis 16.1\");\r\n * Zman sunrise = new Zman(czc.getSunrise(), \"Sunrise\");\r\n * Zman shaah = new Zman(czc.getShaahZmanisGra(), \"Shaah zmanis GRA\");\r\n * ArrayList<Zman> zl = new ArrayList<Zman>();\r\n * zl.add(sunset);\r\n * zl.add(shaah16);\r\n * zl.add(sunrise);\r\n * zl.add(shaah);\r\n * //will sort sunset, shaah 1.6, sunrise, shaah GRA\r\n * System.out.println(zl);\r\n * Collections.sort(zl, Zman.DATE_ORDER);\r\n * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order)\r\n * Collections.sort(zl, Zman.DURATION_ORDER);\r\n * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6\r\n * Collections.sort(zl, Zman.NAME_ORDER);\r\n * // will sort shaah 1.6, shaah GRA, sunrise, sunset\r\n * 
\r\n *\r\n * @author © Eliyahu Hershfeld 2007-2020\r\n * @todo Add secondary sorting. As of now the {@code Comparator}s in this class do not sort by secondary order. This means that when sorting a\r\n * {@link java.util.Collection} of zmanim and using the {@link #DATE_ORDER} {@code Comparator} will have the duration based zmanim\r\n * at the end, but they will not be sorted by duration. This should be N/A for label based sorting.\r\n */\r\nexport class Zman {\r\n /**\r\n * The name / label of the zman.\r\n */\r\n label: string | null;\r\n\r\n /**\r\n * The {@link Date} of the zman\r\n */\r\n zman?: Temporal.ZonedDateTime;\r\n\r\n /**\r\n * The duration if the zman is a {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various\r\n * shaah zmanis base times such as {@link ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}).\r\n */\r\n duration?: number;\r\n\r\n /**\r\n * A longer description or explanation of a zman.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The constructor setting a {@link Date} based zman and a label.\r\n * @param date the Date of the zman.\r\n * @param label the label of the zman such as \"Sof Zman Krias Shema GRA\".\r\n * @see #Zman(long, String)\r\n */\r\n constructor(date: Temporal.ZonedDateTime, label: string | null);\r\n /**\r\n * The constructor setting a duration based zman such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as\r\n * {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label.\r\n * @param duration a duration based zman such as ({@link AstronomicalCalendar#getTemporalHour()}\r\n * @param label the label of the zman such as \"Shaah Zmanis GRA\".\r\n * @see #Zman(Date, String)\r\n */\r\n constructor(duration: number, label: string | null);\r\n constructor(dateOrDuration: number | Temporal.ZonedDateTime, label: string | null) {\r\n this.label = label;\r\n if (dateOrDuration instanceof Temporal.ZonedDateTime) {\r\n this.zman = dateOrDuration;\r\n } else if (typeof dateOrDuration === 'number') {\r\n this.duration = dateOrDuration;\r\n }\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by date/time order. Compares its two arguments by the zman's date/time\r\n * order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will handle cases where either the {@code Zman} is a null or {@link #getZman()} returns a null.\r\n */\r\n static compareDateOrder(zman1: Zman, zman2: Zman): number {\r\n const times = [zman1, zman2].map(zman => zman.zman) as [Temporal.ZonedDateTime, Temporal.ZonedDateTime];\r\n return Temporal.ZonedDateTime.compare(...times)\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label\r\n * name order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will will sort cases where either the {@code Zman} is a null or {@link #label} returns a null\r\n * as empty {@code String}s.\r\n */\r\n static compareNameOrder(zman1: Zman, zman2: Zman): number {\r\n return StringUtils.compareTo(zman1.label || '', zman2.label || '');\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort duration based zmanim such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times\r\n * such as {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative\r\n * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.\r\n * Please note that this class will will sort cases where {@code Zman} is a null.\r\n */\r\n static compareDurationOrder(zman1: Zman, zman2: Zman): number {\r\n return IntegerUtils.compare(zman1.duration || 0, zman2.duration || 0);\r\n }\r\n\r\n toString(): string {\r\n return (`\\nLabel:\\t\\t\\t${this.label}`)\r\n .concat(`\\nZman:\\t\\t\\t${this.zman}`)\r\n .concat(`\\nDuration:\\t\\t\\t${this.duration}`)\r\n .concat(`\\nDescription:\\t\\t\\t${this.description}`);\r\n }\r\n}\r\n\r\nexport type ZmanWithZmanDate = Zman & { zman: Temporal.ZonedDateTime };\r\nexport type ZmanWithDuration = Zman & { duration: number };\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { TimeZone, Utils, padZeros } from '../polyfills/Utils.ts';\r\nimport { Time } from './Time.ts';\r\nimport { AstronomicalCalendar } from '../AstronomicalCalendar.ts';\r\nimport { ZmanimCalendar } from '../ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from '../ComplexZmanimCalendar.ts';\r\nimport { Zman, ZmanWithDuration, ZmanWithZmanDate } from './Zman.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\nconst methodBlacklist = [\r\n 'getAdjustedDate',\r\n 'getDate',\r\n 'getElevationAdjustedSunrise',\r\n 'getElevationAdjustedSunset',\r\n 'getMidnightLastNight',\r\n 'getMidnightTonight',\r\n 'getSunriseBaalHatanya',\r\n 'getSunsetBaalHatanya',\r\n];\r\n\r\nconst methodWhitelist = [\r\n // These methods have parameters, but have default values.\r\n 'getMinchaGedola',\r\n 'getMinchaKetana',\r\n 'getPlagHamincha',\r\n 'getSofZmanKidushLevana15Days',\r\n 'getSofZmanKidushLevanaBetweenMoldos',\r\n 'getSunTransit',\r\n 'getTchilasZmanKidushLevana3Days',\r\n 'getTchilasZmanKidushLevana7Days',\r\n 'getTemporalHour',\r\n];\r\n\r\nenum timeFormats {\r\n SEXAGESIMAL_XSD_FORMAT,\r\n DECIMAL_FORMAT,\r\n SEXAGESIMAL_FORMAT,\r\n SEXAGESIMAL_SECONDS_FORMAT,\r\n SEXAGESIMAL_MILLIS_FORMAT,\r\n}\r\n\r\n/**\r\n * A class used to format both non {@link java.util.Date} times generated by the Zmanim package as well as Dates. For\r\n * example the {@link AstronomicalCalendar#getTemporalHour()} returns the length of the hour in\r\n * milliseconds. This class can format this time.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2019\r\n * @version 1.2\r\n */\r\nexport class ZmanimFormatter {\r\n /**\r\n * Setting to prepent a zero to single digit hours.\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private prependZeroHours: boolean = false;\r\n\r\n /**\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private useSeconds: boolean = false;\r\n\r\n /**\r\n * @see #setSettings(boolean, boolean, boolean)\r\n */\r\n private useMillis: boolean = false;\r\n\r\n /**\r\n * the formatter for minutes as seconds.\r\n */\r\n private static readonly minuteSecondNF: number = 2;\r\n\r\n /**\r\n * the formatter for hours.\r\n */\r\n private hourNF!: number;\r\n\r\n /**\r\n * the formatter for minutes as milliseconds.\r\n */\r\n private static readonly milliNF: number = 3;\r\n\r\n /**\r\n * @see #setDateFormat(SimpleDateFormat)\r\n */\r\n private dateFormat!: Parameters;\r\n\r\n /**\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string; // TimeZone.getTimeZone(\"UTC\");\r\n\r\n /**\r\n * @return the timeZone\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * @param timeZoneId\r\n * the timeZone to set\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * Format using hours, minutes, seconds and milliseconds using the xsd:time format. This format will return\r\n * 00.00.00.0 when formatting 0.\r\n */\r\n public static readonly SEXAGESIMAL_XSD_FORMAT: number = timeFormats.SEXAGESIMAL_XSD_FORMAT;\r\n\r\n /**\r\n * Defaults to {@link #SEXAGESIMAL_XSD_FORMAT}.\r\n * @see #setTimeFormat(int)\r\n */\r\n private timeFormat: number = ZmanimFormatter.SEXAGESIMAL_XSD_FORMAT;\r\n\r\n /**\r\n * Format using standard decimal format with 5 positions after the decimal.\r\n */\r\n public static readonly DECIMAL_FORMAT: number = timeFormats.DECIMAL_FORMAT;\r\n\r\n /** Format using hours and minutes. */\r\n public static readonly SEXAGESIMAL_FORMAT: number = timeFormats.SEXAGESIMAL_FORMAT;\r\n\r\n /** Format using hours, minutes and seconds. */\r\n public static readonly SEXAGESIMAL_SECONDS_FORMAT: number = timeFormats.SEXAGESIMAL_SECONDS_FORMAT;\r\n\r\n /** Format using hours, minutes, seconds and milliseconds. */\r\n public static readonly SEXAGESIMAL_MILLIS_FORMAT: number = timeFormats.SEXAGESIMAL_MILLIS_FORMAT;\r\n\r\n /** constant for milliseconds in a minute (60,000) */\r\n public static readonly MINUTE_MILLIS: number = 60 * 1000;\r\n\r\n /** constant for milliseconds in an hour (3,600,000) */\r\n public static readonly HOUR_MILLIS: number = ZmanimFormatter.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * Format using the XSD Duration format. This is in the format of PT1H6M7.869S (P for period (duration), T for time,\r\n * H, M and S indicate hours, minutes and seconds.\r\n */\r\n public static readonly XSD_DURATION_FORMAT: number = 5;\r\n\r\n public static readonly XSD_DATE_FORMAT: Parameters = ['toISODate']//'yyyy-LL-dd\\'T\\'HH:mm:ss';\r\n\r\n /**\r\n * constructor that defaults to this will use the format \"h:mm:ss\" for dates and 00.00.00.0 for {@link Time}.\r\n * @param timeZone the TimeZone Object\r\n */\r\n /*\r\n public ZmanimFormatter(timeZone: TimeZone) {\r\n this(0, new SimpleDateFormat(\"h:mm:ss\"), timeZone);\r\n }\r\n */\r\n\r\n // public ZmanimFormatter() {\r\n // this(0, new SimpleDateFormat(\"h:mm:ss\"), TimeZone.getTimeZone(\"UTC\"));\r\n // }\r\n\r\n /**\r\n * ZmanimFormatter constructor using a formatter\r\n *\r\n * @param format\r\n * int The formatting style to use. Using ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT will format the time\r\n * time of 90*60*1000 + 1 as 1:30:00\r\n * @param dateFormat the SimpleDateFormat Object\r\n * @param timeZone the TimeZone Object\r\n */\r\n constructor(timeZoneId: string);\r\n constructor(format: number, dateFormat: Parameters, timeZoneId: string);\r\n constructor(formatOrTimeZone: number | string, dateFormat?: Parameters, timeZoneId?: string) {\r\n let format: number;\r\n if (dateFormat) {\r\n format = formatOrTimeZone as number;\r\n } else {\r\n format = 0;\r\n dateFormat = ['', { hour: this.prependZeroHours ? '2-digit' : 'numeric', minute: '2-digit', second: '2-digit'}];\r\n timeZoneId = formatOrTimeZone as string;\r\n }\r\n\r\n this.setTimeZone(timeZoneId!);\r\n\r\n this.setTimeFormat(format);\r\n this.setDateFormat(dateFormat);\r\n }\r\n\r\n /**\r\n * Sets the format to use for formatting.\r\n *\r\n * @param format\r\n * int the format constant to use.\r\n */\r\n public setTimeFormat(format: timeFormats): void {\r\n this.timeFormat = format;\r\n switch (format) {\r\n case ZmanimFormatter.SEXAGESIMAL_XSD_FORMAT:\r\n this.setSettings(true, true, true);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_FORMAT:\r\n this.setSettings(false, false, false);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT:\r\n this.setSettings(false, true, false);\r\n break;\r\n case ZmanimFormatter.SEXAGESIMAL_MILLIS_FORMAT:\r\n this.setSettings(false, true, true);\r\n break;\r\n // case DECIMAL_FORMAT:\r\n // default:\r\n }\r\n }\r\n\r\n /**\r\n * Sets the SimpleDateFormat Object\r\n * @param dateFormat the SimpleDateFormat Object to set\r\n */\r\n public setDateFormat(dateFormat: Parameters): void {\r\n this.dateFormat = dateFormat;\r\n }\r\n\r\n /**\r\n * returns the SimpleDateFormat Object\r\n * @return the SimpleDateFormat Object\r\n */\r\n public getDateFormat(): Parameters {\r\n return this.dateFormat;\r\n }\r\n\r\n /**\r\n * Sets various format settings.\r\n * @param prependZeroHours if to prepend a zero for single digit hours (so that 1 'oclock is displayed as 01)\r\n * @param useSeconds should seconds be used in the time format\r\n * @param useMillis should milliseconds be used informatting time.\r\n */\r\n private setSettings(prependZeroHours: boolean, useSeconds: boolean, useMillis: boolean): void {\r\n this.prependZeroHours = prependZeroHours;\r\n this.useSeconds = useSeconds;\r\n this.useMillis = useMillis;\r\n }\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param milliseconds\r\n * The time in milliseconds.\r\n * @return String The formatted String\r\n */\r\n /*\r\n public format(milliseconds: number): string {\r\n return this.format(milliseconds);\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param millis\r\n * The time in milliseconds.\r\n * @return String The formatted String\r\n */\r\n\r\n /*\r\n public format(millis: number): string {\r\n return format(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats {@link Time}objects.\r\n *\r\n * @param time\r\n * The time Object to be formatted.\r\n * @return String The formatted String\r\n */\r\n public format(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n if (this.timeFormat === ZmanimFormatter.XSD_DURATION_FORMAT) {\r\n return ZmanimFormatter.formatXSDDurationTime(time);\r\n }\r\n let sb: string = padZeros(time.getHours(), this.hourNF)\r\n .concat(':')\r\n .concat(padZeros(time.getMinutes(), ZmanimFormatter.minuteSecondNF));\r\n if (this.useSeconds) {\r\n sb = sb.concat(':')\r\n .concat(padZeros(time.getSeconds(), ZmanimFormatter.minuteSecondNF));\r\n }\r\n if (this.useMillis) {\r\n sb = sb.concat('.')\r\n .concat(padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF));\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Formats a date using this class's {@link #getDateFormat() date format}.\r\n *\r\n * @param dateTime - the date to format\r\n * @return the formatted String\r\n */\r\n public formatDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _dateTime = dateTime.with({ timeZone: this.getTimeZone() });\r\n\r\n // @ts-ignore\r\n return _dateTime.toLocaleString(...this.dateFormat);\r\n }\r\n\r\n /**\r\n * The date:date-time function returns the current date and time as a date/time string. The date/time string that's\r\n * returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.3.8 dateTime] of [XML Schema 1.1 Part 2: Datatypes]. The date/time format is\r\n * basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema 1.1 Part 2: Datatypes] and [ISO 8601] for details. The date/time string format must include a\r\n * time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the\r\n * difference from UTC represented as hh:mm.\r\n * @param dateTime - the UTC Date Object\r\n * @return the XSD dateTime\r\n */\r\n public getXSDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n return dateTime.with({ timeZone: this.getTimeZone() }).toString();\r\n }\r\n\r\n /**\r\n * Represent the hours and minutes with two-digit strings.\r\n *\r\n * @param digits\r\n * hours or minutes.\r\n * @return two-digit String representation of hrs or minutes.\r\n */\r\n private static formatDigits(digits: number): string {\r\n const dd: string = Math.abs(digits).toString();\r\n return dd.length === 1 ? `0${dd}` : dd;\r\n }\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param millis\r\n * the duration in milliseconds\r\n * @return the xsd:duration formatted String\r\n */\r\n\r\n /*\r\n public formatXSDDurationTime(millis: number): string {\r\n return formatXSDDurationTime(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param time\r\n * the duration as a Time object\r\n * @return the xsd:duration formatted String\r\n */\r\n public static formatXSDDurationTime(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n let duration: string;\r\n if (time.getHours() !== 0 || time.getMinutes() !== 0 || time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = 'P'.concat('T');\r\n\r\n if (time.getHours() !== 0) duration = duration.concat(`${time.getHours()}H`);\r\n\r\n if (time.getMinutes() !== 0) duration = duration.concat(`${time.getMinutes()}M`);\r\n\r\n if (time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = duration.concat(`${time.getSeconds()}.${padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF)}`);\r\n duration = duration.concat('S');\r\n }\r\n\r\n if (duration.length === 1) duration.concat('T0S'); // zero seconds\r\n\r\n if (time.isNegative()) {\r\n duration = '-' + duration;\r\n }\r\n }\r\n return duration!.toString();\r\n }\r\n\r\n public static formatDecimal(num: number): string {\r\n const hasDecimal = num - Math.trunc(num) > 0;\r\n return hasDecimal ? num.toString() : num.toFixed(1);\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String representing the serialized Object. The\r\n * format used is:\r\n *\r\n *
\r\n   *  <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n   *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n   *     <TemporalHour>PT54M17.529S</TemporalHour>\r\n   *     ...\r\n   *   </AstronomicalTimes>\r\n   * 
\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}. The output of this method is\r\n * returned by the {@link #toString() toString}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The XML formatted String. The format will be:\r\n *\r\n *
\r\n   *  <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n   *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n   *     <TemporalHour>PT54M17.529S</TemporalHour>\r\n   *     ...\r\n   *  </AstronomicalTimes>\r\n   * 
\r\n *\r\n * TODO: add proper schema, and support for nulls. XSD duration (for solar hours), should probably return\r\n * nil and not P\r\n * @deprecated\r\n */\r\n public static toXML(): void {\r\n throw new UnsupportedError('This method is not supported.');\r\n }\r\n\r\n /**\r\n * A method that returns a JSON formatted String representing the serialized Object. The\r\n * format used is:\r\n *
\r\n   * {\r\n   *    "metadata":{\r\n   *      "date":"1969-02-08",\r\n   *      "type":"AstronomicalCalendar",\r\n   *      "algorithm":"US Naval Almanac Algorithm",\r\n   *      "location":"Lakewood, NJ",\r\n   *      "latitude":"40.095965",\r\n   *      "longitude":"-74.22213",\r\n   *      "elevation:"31.0",\r\n   *      "timeZoneName":"Eastern Standard Time",\r\n   *      "timeZoneID":"America/New_York",\r\n   *      "timeZoneOffset":"-5"},\r\n   *    "AstronomicalTimes":{\r\n   *     "Sunrise":"2007-02-18T06:45:27-05:00",\r\n   *     "TemporalHour":"PT54M17.529S"\r\n   *     ...\r\n   *     }\r\n   * }\r\n   * 
\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The JSON formatted String. The format will be:\r\n *
\r\n   * {\r\n   *    "metadata":{\r\n   *      "date":"1969-02-08",\r\n   *      "type":"AstronomicalCalendar",\r\n   *      "algorithm":"US Naval Almanac Algorithm",\r\n   *      "location":"Lakewood, NJ",\r\n   *      "latitude":"40.095965",\r\n   *      "longitude":"-74.22213",\r\n   *      "elevation:"31.0",\r\n   *      "timeZoneName":"Eastern Standard Time",\r\n   *      "timeZoneID":"America/New_York",\r\n   *      "timeZoneOffset":"-5"},\r\n   *    "AstronomicalTimes":{\r\n   *     "Sunrise":"2007-02-18T06:45:27-05:00",\r\n   *     "TemporalHour":"PT54M17.529S"\r\n   *     ...\r\n   *     }\r\n   * }\r\n   * 
\r\n */\r\n public static toJSON(astronomicalCalendar: AstronomicalCalendar): JsonOutput {\r\n const json: JsonOutput = {\r\n metadata: ZmanimFormatter.getOutputMetadata(astronomicalCalendar),\r\n };\r\n const key: string = ZmanimFormatter.getOutputKey(astronomicalCalendar);\r\n json[key] = ZmanimFormatter.getZmanimOutput(astronomicalCalendar);\r\n\r\n return json;\r\n }\r\n\r\n private static getOutputKey(astronomicalCalendar: AstronomicalCalendar) {\r\n switch (true) {\r\n case astronomicalCalendar instanceof ComplexZmanimCalendar:\r\n return 'Zmanim';\r\n case astronomicalCalendar instanceof ZmanimCalendar:\r\n return 'BasicZmanim';\r\n case astronomicalCalendar instanceof AstronomicalCalendar:\r\n default:\r\n return 'AstronomicalTimes';\r\n }\r\n }\r\n\r\n private static getOutputMetadata(astronomicalCalendar: AstronomicalCalendar): OutputMetadata {\r\n return {\r\n date: astronomicalCalendar.getDate().toString(),\r\n type: astronomicalCalendar.getClassName(),\r\n algorithm: astronomicalCalendar.getAstronomicalCalculator().getCalculatorName(),\r\n location: astronomicalCalendar.getGeoLocation().getLocationName(),\r\n latitude: astronomicalCalendar.getGeoLocation().getLatitude().toString(),\r\n longitude: astronomicalCalendar.getGeoLocation().getLongitude().toString(),\r\n elevation: ZmanimFormatter.formatDecimal(astronomicalCalendar.getGeoLocation().getElevation()),\r\n timeZoneName: TimeZone.getDisplayName(astronomicalCalendar.getGeoLocation().getTimeZone())!,\r\n timeZoneID: astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n timeZoneOffset: ZmanimFormatter.formatDecimal(TimeZone.getOffset(astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n astronomicalCalendar.getDate().toZonedDateTime(astronomicalCalendar.getGeoLocation().getTimeZone()).epochMilliseconds) / ZmanimFormatter.HOUR_MILLIS),\r\n };\r\n }\r\n\r\n private static getZmanimOutput(astronomicalCalendar: AstronomicalCalendar) {\r\n const formatter: ZmanimFormatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, ZmanimFormatter.XSD_DATE_FORMAT,\r\n astronomicalCalendar.getGeoLocation().getTimeZone());\r\n\r\n /*\r\n let dateList: Set = new Set();\r\n let durationList: Set = new Set();\r\n */\r\n const dateList: ZmanWithZmanDate[] = [];\r\n let durationList: ZmanWithDuration[] = [];\r\n const otherList: string[] = [];\r\n\r\n // Get all the methods in the calendar\r\n Utils.getAllMethodNames(astronomicalCalendar, true)\r\n // Filter out methods that we don't want\r\n .filter(method => includeMethod(method, astronomicalCalendar))\r\n // Call each method and get the return values\r\n .map(method => ({\r\n methodName: method,\r\n value: astronomicalCalendar[method as keyof AstronomicalCalendar],\r\n }))\r\n // Filter for return values of type Date or number\r\n .filter(methodObj => methodObj.value instanceof Temporal.ZonedDateTime || typeof methodObj.value === 'number' || methodObj.value === null)\r\n // Separate the Dates and numbers\r\n .forEach(methodObj => {\r\n const tagName: string = methodObj.methodName.substring(3);\r\n if (methodObj.value instanceof Temporal.ZonedDateTime) {\r\n // dateList.add(new KosherZmanim.Zman(methodObj.value, tagName));\r\n const zman: ZmanWithZmanDate = {\r\n zman: methodObj.value,\r\n label: tagName,\r\n };\r\n dateList.push(zman);\r\n } else if (typeof methodObj.value === 'number') {\r\n // durationList.add(new KosherZmanim.Zman(methodObj.value, tagName));\r\n const zman: ZmanWithDuration = {\r\n duration: methodObj.value,\r\n label: tagName,\r\n };\r\n durationList.push(zman);\r\n } else {\r\n otherList.push(tagName);\r\n }\r\n });\r\n\r\n dateList.sort(Zman.compareDateOrder);\r\n // Filter for values in milliseconds, and not values in minutes\r\n durationList = durationList.filter((zman: ZmanWithDuration) => zman.duration > 1000)\r\n .sort(Zman.compareDurationOrder);\r\n\r\n const timesData = {\r\n ...Object.fromEntries(dateList.map(zman => [zman.label, formatter.formatDateTime(zman.zman)])),\r\n ...Object.fromEntries(durationList.map(zman => [zman.label, formatter.format(Math.trunc(zman.duration))])),\r\n ...Object.fromEntries(otherList.map(tagName => [tagName, 'N/A'])),\r\n };\r\n\r\n return timesData;\r\n }\r\n}\r\n\r\n/**\r\n * Determines if a method should be output by the {@link #toJSON(AstronomicalCalendar)}\r\n *\r\n * @param {string} method - the method in question\r\n * @param {AstronomicalCalendar} astronomicalCalendar - The astronomical calendar, to be able to\r\n * check the parameterlist\r\n * @return if the method should be included in serialization\r\n */\r\nfunction includeMethod(method: string, astronomicalCalendar: AstronomicalCalendar): boolean {\r\n if (method in methodWhitelist) return true;\r\n\r\n // Filter out excluded methods\r\n return !(method in methodBlacklist)\r\n // Filter out methods with parameters since we don't know what value(s) to pass\r\n && (astronomicalCalendar as any as Record)[method].length === 0\r\n // Filter out methods that don't start with 'get'\r\n && method.startsWith('get');\r\n}\r\n\r\nexport interface JsonOutput {\r\n metadata: OutputMetadata\r\n\r\n [key: string]: object;\r\n}\r\n\r\nexport interface OutputMetadata {\r\n date: string;\r\n type: string;\r\n algorithm: string;\r\n location: string | null;\r\n latitude: string;\r\n longitude: string;\r\n elevation: string;\r\n timeZoneName: string;\r\n timeZoneID: string;\r\n timeZoneOffset: string;\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A class for various location calculations\r\n * Most of the code in this class is ported from Chris Veness'\r\n * LGPL Javascript Implementation\r\n *\r\n * @author © Eliyahu Hershfeld 2009 - 2020\r\n * @deprecated All methods in this class are available in the {@link GeoLocation} class, and this class that duplicates that\r\n * code will be removed in a future release.\r\n */\r\nexport class GeoLocationUtils {\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation, GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /**\r\n * Calculate the geodesic initial bearing between this Object and\r\n * a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol XXII\r\n * no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic bearing\r\n */\r\n public static getGeodesicInitialBearing(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the geodesic final bearing between this Object\r\n * and a second Object passed to this method using Thaddeus Vincenty's\r\n * inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics\r\n * on the Ellipsoid with application of nested equations\", Survey Review, vol XXII no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic bearing\r\n */\r\n public static getGeodesicFinalBearing(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters\r\n * between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty,\r\n * \"Direct and Inverse Solutions of Geodesics on the\r\n * Ellipsoid with application of nested equations\", Survey Review, vol XXII no 176, 1975. This uses the\r\n * WGS-84 geodetic model.\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public static getGeodesicDistance(location: GeoLocation, destination: GeoLocation): number {\r\n return GeoLocationUtils.vincentyFormula(location, destination, GeoLocationUtils.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculates the initial geodesic bearing, final bearing or\r\n * geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}),\r\n * final bearing ({@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return\r\n * the geodesic distance, initial or final bearing (based on the formula passed in) between the location\r\n * and destination in Meters\r\n * @see #getGeodesicDistance(GeoLocation, GeoLocation)\r\n * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)\r\n * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)\r\n */\r\n private static vincentyFormula(location: GeoLocation, destination: GeoLocation, formula: number): number {\r\n const a: number = 6378137; // length of semi-major axis of the ellipsoid (radius at equator) in metres based on WGS-84\r\n const b: number = 6356752.3142; // length of semi-minor axis of the ellipsoid (radius at the poles) in meters based on WGS-84\r\n const f: number = 1 / 298.257223563; // flattening of the ellipsoid based on WGS-84\r\n const L: number = MathUtils.degreesToRadians(destination.getLongitude() - location.getLongitude()); // difference in longitude of two points;\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude()))); // reduced latitude (latitude on the auxiliary sphere)\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(destination.getLatitude()))); // reduced latitude (latitude on the auxiliary sphere)\r\n\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda)\r\n * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = cosU1 * cosU2 * sinLambda / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1\r\n * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1\r\n * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocationUtils.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocationUtils.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocationUtils.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line\r\n * bearing from the current location to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the bearing in degrees\r\n */\r\n public static getRhumbLineBearing(location: GeoLocation, destination: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(destination.getLongitude() - location.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(destination.getLatitude())\r\n / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current\r\n * location to the GeoLocation passed in. Ported from Chris Veness'\r\n * Javascript Implementation.\r\n *\r\n * @param location\r\n * the initial location\r\n * @param destination\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public static getRhumbLineDistance(location: GeoLocation, destination: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude())\r\n - MathUtils.degreesToRadians(destination.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude())\r\n - MathUtils.degreesToRadians(destination.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(destination.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(destination.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm\r\n * written by Kevin\r\n * Boone that is based on the US Naval Observatory'sAlmanac for Computer algorithm ( Amazon, Barnes & Noble) and is\r\n * used with his permission. Added to Kevin's code is adjustment of the zenith to account for elevation.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2019\r\n * @author © Kevin Boone 2000\r\n * @version 1.1\r\n */\r\nexport class SunTimesCalculator extends AstronomicalCalculator {\r\n /**\r\n * @see AstronomicalCalculator#getCalculatorName()\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public getCalculatorName(): string {\r\n return 'US Naval Almanac Algorithm';\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n const doubleTime: number = SunTimesCalculator.getTimeUTC(date, geoLocation.getLongitude(), geoLocation.getLatitude(),\r\n adjustedZenith, true);\r\n return doubleTime;\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n const doubleTime: number = SunTimesCalculator.getTimeUTC(date, geoLocation.getLongitude(), geoLocation.getLatitude(),\r\n adjustedZenith, false);\r\n return doubleTime;\r\n }\r\n\r\n /**\r\n * The number of degrees of longitude that corresponds to one hour time difference.\r\n */\r\n private static readonly DEG_PER_HOUR: number = 360 / 24;\r\n\r\n /**\r\n * sin of an angle in degrees\r\n */\r\n private static sinDeg(deg: number): number {\r\n // return Math.sin(deg * 2 * Math.PI / 360);\r\n return Math.sin(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * acos of an angle, result in degrees\r\n */\r\n private static acosDeg(x: number): number {\r\n // return Math.acos(x) * 360 / (2 * Math.PI);\r\n return MathUtils.radiansToDegrees(Math.acos(x));\r\n }\r\n\r\n /**\r\n * asin of an angle, result in degrees\r\n */\r\n private static asinDeg(x: number): number {\r\n // return Math.asin(x) * 360 / (2 * Math.PI);\r\n return MathUtils.radiansToDegrees(Math.asin(x));\r\n }\r\n\r\n /**\r\n * tan of an angle in degrees\r\n */\r\n private static tanDeg(deg: number): number {\r\n // return Math.tan(deg * 2 * Math.PI / 360);\r\n return Math.tan(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * Calculate cosine of the angle in degrees\r\n *\r\n * @param deg degrees\r\n * @return cosine of the angle in degrees\r\n */\r\n private static cosDeg(deg: number): number {\r\n // return Math.cos(deg * 2 * Math.PI / 360);\r\n return Math.cos(MathUtils.degreesToRadians(deg));\r\n }\r\n\r\n /**\r\n * Get time difference between location's longitude and the Meridian, in hours. West of Meridian has a negative time\r\n * difference\r\n */\r\n private static getHoursFromMeridian(longitude: number): number {\r\n return longitude / SunTimesCalculator.DEG_PER_HOUR;\r\n }\r\n\r\n /**\r\n * Calculate the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We\r\n * need this figure to derive the Sun's mean anomaly.\r\n *\r\n * @param dayOfYear the day of year\r\n * @param hoursFromMeridian hours from the meridian\r\n * @param isSunrise true for sunrise and false for sunset\r\n *\r\n * @return the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We\r\n * need this figure to derive the Sun's mean anomaly.\r\n */\r\n private static getApproxTimeDays(dayOfYear: number, hoursFromMeridian: number, isSunrise: boolean): number {\r\n if (isSunrise) {\r\n return dayOfYear + ((6 - hoursFromMeridian) / 24);\r\n }\r\n // sunset\r\n return dayOfYear + ((18 - hoursFromMeridian) / 24);\r\n }\r\n\r\n /**\r\n * Calculate the Sun's mean anomaly in degrees, at sunrise or sunset, given the longitude in degrees\r\n *\r\n * @param dayOfYear the day of the year\r\n * @param longitude longitude\r\n * @param isSunrise true for sunrise and false for sunset\r\n * @return the Sun's mean anomaly in degrees\r\n */\r\n private static getMeanAnomaly(dayOfYear: number, longitude: number, isSunrise: boolean): number {\r\n return (0.9856 * SunTimesCalculator.getApproxTimeDays(dayOfYear, SunTimesCalculator.getHoursFromMeridian(longitude), isSunrise)) - 3.289;\r\n }\r\n\r\n /**\r\n * Calculates the Sun's true longitude in degrees. The result is an angle gte 0 and lt 360. Requires the Sun's mean\r\n * anomaly, also in degrees\r\n */\r\n private static getSunTrueLongitude(sunMeanAnomaly: number): number {\r\n let l: number = sunMeanAnomaly + (1.916 * SunTimesCalculator.sinDeg(sunMeanAnomaly)) + (0.020 * SunTimesCalculator.sinDeg(2 * sunMeanAnomaly)) + 282.634;\r\n\r\n // get longitude into 0-360 degree range\r\n if (l >= 360) {\r\n l = l - 360;\r\n }\r\n if (l < 0) {\r\n l = l + 360;\r\n }\r\n return l;\r\n }\r\n\r\n /**\r\n * Calculates the Sun's right ascension in hours, given the Sun's true longitude in degrees. Input and output are\r\n * angles gte 0 and lt 360.\r\n */\r\n private static getSunRightAscensionHours(sunTrueLongitude: number): number {\r\n const a: number = 0.91764 * SunTimesCalculator.tanDeg(sunTrueLongitude);\r\n let ra: number = 360 / (2 * Math.PI) * Math.atan(a);\r\n\r\n const lQuadrant: number = Math.floor(sunTrueLongitude / 90) * 90;\r\n const raQuadrant: number = Math.floor(ra / 90) * 90;\r\n ra += (lQuadrant - raQuadrant);\r\n\r\n return ra / SunTimesCalculator.DEG_PER_HOUR; // convert to hours\r\n }\r\n\r\n /**\r\n * Calculate the cosine of the Sun's local hour angle\r\n *\r\n * @param sunTrueLongitude the sun's true longitude\r\n * @param latitude the latitude\r\n * @param zenith the zenith\r\n * @return the cosine of the Sun's local hour angle\r\n */\r\n private static getCosLocalHourAngle(sunTrueLongitude: number, latitude: number, zenith: number): number {\r\n const sinDec: number = 0.39782 * SunTimesCalculator.sinDeg(sunTrueLongitude);\r\n const cosDec: number = SunTimesCalculator.cosDeg(SunTimesCalculator.asinDeg(sinDec));\r\n return (SunTimesCalculator.cosDeg(zenith) - (sinDec * SunTimesCalculator.sinDeg(latitude))) / (cosDec * SunTimesCalculator.cosDeg(latitude));\r\n }\r\n\r\n /**\r\n * Calculate local mean time of rising or setting. By `local' is meant the exact time at the location, assuming that\r\n * there were no time zone. That is, the time difference between the location and the Meridian depended entirely on\r\n * the longitude. We can't do anything with this time directly; we must convert it to UTC and then to a local time.\r\n * The result is expressed as a fractional number of hours since midnight\r\n *\r\n * @param localHour the local hour\r\n * @param sunRightAscensionHours the sun's right ascention in hours\r\n * @param approxTimeDays approximate time days\r\n *\r\n * @return the fractional number of hours since midnight as a double\r\n */\r\n private static getLocalMeanTime(localHour: number, sunRightAscensionHours: number, approxTimeDays: number): number {\r\n return localHour + sunRightAscensionHours - (0.06571 * approxTimeDays) - 6.622;\r\n }\r\n\r\n /**\r\n * Get sunrise or sunset time in UTC, according to flag.\r\n *\r\n * @param year\r\n * 4-digit year\r\n * @param month\r\n * month, 1-12 (not the zero based Java month\r\n * @param day\r\n * day of month, 1-31\r\n * @param longitude\r\n * in degrees, longitudes west of Meridian are negative\r\n * @param latitude\r\n * in degrees, latitudes south of equator are negative\r\n * @param zenith\r\n * Sun's zenith, in degrees\r\n * @param type\r\n * type of calculation to carry out {@link #TYPE_SUNRISE} or {@link #TYPE_SUNRISE}.\r\n *\r\n * @return the time as a double. If an error was encountered in the calculation (expected behavior for some\r\n * locations such as near the poles, {@link Double.NaN} will be returned.\r\n */\r\n private static getTimeUTC(date: Temporal.PlainDate, longitude: number, latitude: number, zenith: number,\r\n isSunrise: boolean): number {\r\n const dayOfYear: number = date.dayOfYear;\r\n const sunMeanAnomaly: number = SunTimesCalculator.getMeanAnomaly(dayOfYear, longitude, isSunrise);\r\n const sunTrueLong: number = SunTimesCalculator.getSunTrueLongitude(sunMeanAnomaly);\r\n const sunRightAscensionHours: number = SunTimesCalculator.getSunRightAscensionHours(sunTrueLong);\r\n const cosLocalHourAngle: number = SunTimesCalculator.getCosLocalHourAngle(sunTrueLong, latitude, zenith);\r\n\r\n let localHourAngle: number;\r\n if (isSunrise) {\r\n localHourAngle = 360 - SunTimesCalculator.acosDeg(cosLocalHourAngle);\r\n } else { // sunset\r\n localHourAngle = SunTimesCalculator.acosDeg(cosLocalHourAngle);\r\n }\r\n const localHour: number = localHourAngle / SunTimesCalculator.DEG_PER_HOUR;\r\n\r\n const localMeanTime: number = SunTimesCalculator.getLocalMeanTime(localHour, sunRightAscensionHours,\r\n SunTimesCalculator.getApproxTimeDays(dayOfYear, SunTimesCalculator.getHoursFromMeridian(longitude), isSunrise));\r\n let processedTime: number = localMeanTime - SunTimesCalculator.getHoursFromMeridian(longitude);\r\n while (processedTime < 0) {\r\n processedTime += 24;\r\n }\r\n while (processedTime >= 24) {\r\n processedTime -= 24;\r\n }\r\n return processedTime;\r\n }\r\n\r\n /**\r\n\t * Return the Universal Coordinated Time (UTC)\r\n\t * of solar noon for the given day at the given location\r\n\t * on earth. This implementation returns solar noon as the time halfway between sunrise and sunset.\r\n\t * Other calculators may return true solar noon. See The Definition of Chatzos for details on solar\r\n\t * noon calculations.\r\n\t * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)\r\n\t * @see NOAACalculator\r\n\t * \r\n\t * @param calendar\r\n\t * The Calendar representing the date to calculate solar noon for\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times.\r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const sunrise = this.getUTCSunrise(calendar, geoLocation, 90, false);\r\n const sunset = this.getUTCSunset(calendar, geoLocation, 90, false);\r\n let noon = (sunrise + ((sunset - sunrise) / 2));\r\n if(noon < 0) {\r\n\t\t\tnoon += 12;\r\n\t\t}\r\n\t\tif(noon < sunrise) {\r\n\t\t\tnoon -= 12;\r\n\t\t} \r\n\t\treturn noon;\r\n }\r\n}\r\n", "/*\r\n * Zmanim Java API\r\n * Copyright (C) 2019 - 2022 Eliyahu Hershfeld\r\n * Copyright (C) 2019 - 2021 Y Paritcher\r\n *\r\n * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General\r\n * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)\r\n * any later version.\r\n *\r\n * This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied\r\n * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r\n * details.\r\n * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to\r\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA,\r\n * or connect to: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html\r\n */\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { JewishCalendar } from './JewishCalendar.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nconst { SUNDAY, FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * Tefila Rules is a utility class that covers the various halachos and minhagim regarding\r\n * changes to daily tefila / prayers, based on the Jewish calendar. This is mostly useful for use in\r\n * developing siddur type applications, but it is also valuable for shul calendars that set\r\n * tefila times based on if tachanun is\r\n * recited that day. There are many settings in this class to cover the vast majority of minhagim, but\r\n * there are likely some not covered here. The source for many of the chasidishe minhagim can be found\r\n * in the Minhag Yisrael Torah on Orach\r\n * Chaim 131.\r\n * Dates used in specific communities such as specific yahrzeits or a holidays like Purim Mezhbizh\r\n * (Medzhybizh) celebrated on 11 {@link JewishDate#TEVES Teves} or Purim Saragossa celebrated on\r\n * the (17th or) 18th of {@link JewishDate#SHEVAT Shevat} are not (and likely will not be) supported by\r\n * this class.\r\n *

Sample code:\r\n *

\r\n * TefilaRules tr = new TefilaRules();\r\n * JewishCalendar jewishCalendar = new JewishCalendar();\r\n * HebrewDateFormatter hdf = new HebrewDateFormatter();\r\n * jewishCalendar.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jd));\r\n * jewishCalendar.setJewishDate(5783, JewishDate.ADAR, 17);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * tr.setTachanunRecitedWeekOfPurim(false);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));
\r\n * \r\n * @author © Y. Paritcher 2019 - 2021\r\n * @author © Eliyahu Hershfeld 2019 - 2022\r\n * \r\n * @todo The following items may be added at a future date.\r\n *
    \r\n *
  1. Lamnatzaiach
  2. \r\n *
  3. Mizmor Lesoda
  4. \r\n *
  5. Behab
  6. \r\n *
  7. Selichos
  8. \r\n *
  9. ...
  10. \r\n *
\r\n */\r\nexport class TefilaRules {\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t * @see #setTachanunRecitedEndOfTishrei(boolean)\r\n\t */\r\n private tachanunRecitedEndOfTishrei:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n private tachanunRecitedWeekAfterShavuos:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited13SivanOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n private tachanunRecitedPesachSheni:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited15IyarOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n private tachanunRecitedMinchaErevLagBaomer:boolean = false;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n private tachanunRecitedShivasYemeiHamiluim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfHod:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfPurim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n private tachanunRecitedFridays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n private tachanunRecitedSundays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n private tachanunRecitedMinchaAllYear:boolean = true;\r\n\r\n /**\r\n\t * The default value is false.\r\n\t * @see #isMizmorLesodaRecited(JewishCalendar)\r\n\t * @see #setMizmorLesodaRecitedErevYomKippurAndPesach(boolean)\r\n\t */\r\n private mizmorLesodaRecitedErevYomKippurAndPesach: boolean = false;\r\n\r\n /**\r\n * Returns if tachanun is recited during shacharis on the day in question. There are the many\r\n\t * minhag based settings that are available in this class.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during shacharis.\r\n\t * @see #isTachanunRecitedMincha(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedShacharis(jewishCalendar: JewishCalendar):boolean {\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY\r\n\t\t|| (!this.tachanunRecitedSundays && jewishCalendar.getDayOfWeek() == SUNDAY)\r\n\t\t|| (!this.tachanunRecitedFridays && jewishCalendar.getDayOfWeek() == FRIDAY)\r\n\t\t\t\t|| month == JewishDate.NISSAN\r\n\t\t\t\t|| (month == JewishDate.TISHREI && ((!this.tachanunRecitedEndOfTishrei && day > 8)\r\n\t\t\t\t|| (this.tachanunRecitedEndOfTishrei && (day > 8 && day < 22))))\r\n\t\t\t\t|| (month == JewishDate.SIVAN && (this.tachanunRecitedWeekAfterShavuos && day < 7\r\n\t\t\t\t\t\t|| !this.tachanunRecitedWeekAfterShavuos && day < (!jewishCalendar.getInIsrael()\r\n\t\t\t\t\t\t\t\t&& !this.tachanunRecited13SivanOutOfIsrael ? 14 : 13)))\r\n\t\t\t\t|| (jewishCalendar.isYomTov() && (!jewishCalendar.isTaanis()\r\n\t\t\t\t\t\t|| (!this.tachanunRecitedPesachSheni && holidayIndex == JewishCalendar.PESACH_SHENI))) // Erev YT is included in isYomTov()\r\n\t\t\t\t|| (!jewishCalendar.getInIsrael() && !this.tachanunRecitedPesachSheni && !this.tachanunRecited15IyarOutOfIsrael\r\n\t\t\t\t\t\t&& jewishCalendar.getJewishMonth() == JewishDate.IYAR && day == 15)\r\n\t\t\t\t|| holidayIndex == JewishCalendar.TISHA_BEAV || jewishCalendar.isIsruChag()\r\n\t\t\t\t|| jewishCalendar.isRoshChodesh()\r\n\t\t\t\t|| (!this.tachanunRecitedShivasYemeiHamiluim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 22)\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfPurim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 10 && day < 18)\r\n\t\t\t\t|| (jewishCalendar.isUseModernHolidays()\r\n\t\t\t\t\t\t&& (holidayIndex == JewishCalendar.YOM_HAATZMAUT || holidayIndex == JewishCalendar.YOM_YERUSHALAYIM))\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfHod && month == JewishDate.IYAR && day > 13 && day < 21)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n\t * Returns if tachanun is recited during mincha on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during mincha.\r\n\t * @see #isTachanunRecitedShacharis(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedMincha(jewishCalendar: JewishCalendar):boolean {\r\n let tomorrow:JewishCalendar = new JewishCalendar();\r\n tomorrow = jewishCalendar.clone() as JewishCalendar;\r\n tomorrow.forward(Calendar.DATE, 1);\r\n\t\t\r\n if (!this.tachanunRecitedMinchaAllYear\r\n\t\t\t\t\t|| jewishCalendar.getDayOfWeek() == Calendar.FRIDAY\r\n\t\t\t\t\t|| !this.isTachanunRecitedShacharis(jewishCalendar) \r\n\t\t\t\t\t|| (!this.isTachanunRecitedShacharis(tomorrow) && \r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI))\r\n\t\t\t\t\t|| !this.tachanunRecitedMinchaErevLagBaomer && tomorrow.getYomTovIndex() == JewishCalendar.LAG_BAOMER) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\t\r\n /**\r\n\t * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN Marcheshvan}.\r\n\t * Outside Israel recitation starts on the evening of December 4th (or 5th if it is the year before a civil leap year)\r\n\t * in the 21st century and shifts a day forward every century not evenly divisible by 400. This method will return true\r\n\t * if vesein tal umatar on the current Jewish date that starts on the previous night, so Dec 5/6 will be\r\n\t * returned by this method in the 21st century. vesein tal umatar is not recited on Shabbos and the\r\n\t * start date will be delayed a day when the start day is on a Shabbos (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartDate(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n\t\t\t // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 7) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SUNDAY) { // When starting on Sunday, it can be the start date or delayed from Shabbos\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 48 || jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n\t\t\t\r\n }\r\n return false; // keep the compiler happy\r\n }\r\n\t\r\n /**\r\n\t * Returns if true if tonight is the first night to start reciting Vesein Tal Umatar Livracha (\r\n\t * Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN\r\n\t * Marcheshvan} (so the 6th will return true). Outside Israel recitation starts on the evening\r\n\t * of December 4th (or 5th if it is the year before a civil leap year) in the 21st century and shifts a\r\n\t * day forward every century not evenly divisible by 400. Vesein tal umatar is not recited on\r\n\t * Shabbos and the start date will be delayed a day when the start day is on a Shabbos\r\n\t * (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar\r\n\t * Livracha (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartingTonight(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 6) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY) { // When starting on motzai Shabbos, it can be the start date or delayed from Friday night\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47 || jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n\t\t\t\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. This will return\r\n\t * true for the entire season, even on Shabbos when it is not recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarRecited(jewishCalendar:JewishCalendar):boolean {\r\n if (jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() < 15) {\r\n return true;\r\n }\r\n if (jewishCalendar.getJewishMonth() < JewishDate.CHESHVAN) {\r\n return false;\r\n }\r\n if (jewishCalendar.getInIsrael()) {\r\n return jewishCalendar.getJewishMonth() != JewishDate.CHESHVAN || jewishCalendar.getJewishDayOfMonth() >= 7;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() >= 47;\r\n\t\t\r\n }\r\n\t\r\n /**\r\n\t * Returns if Vesein Beracha is recited. It is recited from 15 {@link JewishDate#NISSAN Nissan} to the\r\n\t * point that {@link #isVeseinTalUmatarRecited(JewishCalendar) vesein tal umatar is recited}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Vesein Beracha is recited.\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinBerachaRecited(jewishCalendar: JewishCalendar):boolean {\r\n return !this.isVeseinTalUmatarRecited(jewishCalendar);\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. The date is 22\r\n\t * {@link JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the start date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachStartDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.TISHREI && jewishCalendar.getJewishDayOfMonth() == 22;\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. The date is 15\r\n\t * {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the end date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachEndDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() == 15;\r\n }\r\n\r\n /**\r\n\t * Returns if Mashiv Haruach Umorid Hageshem is recited. This period starts on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei} and ends on the 15th day of {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Mashiv Haruach Umorid Hageshem is recited.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t */\r\n public isMashivHaruachRecited(jewishCalendar:JewishCalendar):boolean {\r\n const startDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.TISHREI, 22);\r\n const endDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.NISSAN, 15);\r\n return jewishCalendar.compareTo(startDate) > 0 && jewishCalendar.compareTo(endDate) < 0;\r\n }\r\n\r\n /**\r\n\t * Returns if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is\r\n\t * recited. This period starts on the 15th day of {@link JewishDate#NISSAN Nissan} and ends on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited.\r\n\t */\r\n public isMoridHatalRecited(jewishCalendar:JewishCalendar):boolean {\r\n return !this.isMashivHaruachRecited(jewishCalendar) || this.isMashivHaruachStartDate(jewishCalendar) || this.isMashivHaruachEndDate(jewishCalendar);\r\n }\r\n\t\r\n /**\r\n\t * Returns if Hallel is recited on the day in question. This will return true for both Hallel shalem\r\n\t * and Chatzi Hallel. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete Hallel\r\n\t * is recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Hallel is recited.\r\n\t * @see #isHallelShalemRecited(JewishCalendar)\r\n\t */\r\n public isHallelRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n\t\t\r\n if (jewishCalendar.isRoshChodesh()) { //RH returns false for RC\r\n return true;\r\n }\r\n if (jewishCalendar.isChanukah()) {\r\n return true;\r\n }\r\n switch (month) {\r\n case JewishDate.NISSAN:\r\n if (day >= 15 && ((inIsrael && day <= 21) || (!inIsrael && day <= 22))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.IYAR: // modern holidays\r\n if (jewishCalendar.isUseModernHolidays() && (holidayIndex == JewishCalendar.YOM_HAATZMAUT\r\n\t\t\t\t\t\t|| holidayIndex == JewishCalendar.YOM_YERUSHALAYIM)) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.SIVAN:\r\n if (day == 6 || (!inIsrael && (day == 7))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.TISHREI:\r\n if (day >= 15 && (day <= 22 || (!inIsrael && (day <= 23)))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if hallel shalem is recited on the day in question. This will always return false if {@link\r\n\t * #isHallelRecited(JewishCalendar)} returns false.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if hallel shalem is recited.\r\n\t * @see #isHallelRecited(JewishCalendar)\r\n\t */\r\n public isHallelShalemRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n if (this.isHallelRecited(jewishCalendar)) {\r\n if ((jewishCalendar.isRoshChodesh() && ! jewishCalendar.isChanukah())\r\n\t\t\t\t\t|| (month == JewishDate.NISSAN && ((inIsrael && day > 15) || (!inIsrael && day > 16)))) {\r\n return false;\r\n } \r\n return true;\r\n\t\t\t\r\n } \r\n return false;\r\n }\r\n\t\r\n /**\r\n\t * Returns if Al HaNissim is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if al hanissim is recited.\r\n\t * @see JewishCalendar#isChanukah()\r\n\t * @see JewishCalendar#isPurim()\r\n\t * @see JewishCalendar#getIsMukafChoma()\r\n\t */\r\n public isAlHanissimRecited(jewishCalendar:JewishCalendar): boolean {\r\n\t return jewishCalendar.isPurim() || jewishCalendar.isChanukah();\r\n }\r\n\t\r\n /**\r\n\t * Returns if Yaaleh Veyavo is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Yaaleh Veyavo is recited.\r\n\t * @see JewishCalendar#isPesach()\r\n\t * @see JewishCalendar#isShavuos()\r\n\t * @see JewishCalendar#isRoshHashana()\r\n\t * @see JewishCalendar#isYomKippur()\r\n\t * @see JewishCalendar#isSuccos()\r\n\t * @see JewishCalendar#isShminiAtzeres()\r\n\t * @see JewishCalendar#isSimchasTorah()\r\n\t * @see JewishCalendar#isRoshChodesh()\r\n\t */\r\n public isYaalehVeyavoRecited(jewishCalendar:JewishCalendar):boolean {\r\n\t return jewishCalendar.isPesach() || jewishCalendar.isShavuos() || jewishCalendar.isRoshHashana() || jewishCalendar.isYomKippur()\r\n\t \t\t|| jewishCalendar.isSuccos() || jewishCalendar.isShminiAtzeres() || jewishCalendar.isSimchasTorah()\r\n\t \t\t|| jewishCalendar.isRoshChodesh();\r\n }\r\n\r\n /**\r\n * Returns if Is Mizmor Lesoda is recited on the day in question. \r\n * @param jewishCalendar the Jewish calendar day.\r\n * @return if Mizmor Lesoda is recited.\r\n * \r\n * @see #isMizmorLesodaRecitedErevYomKippurAndPesach()\r\n * \r\n */\r\n public isMizmorLesodaRecited(jewishCalendar: JewishCalendar): boolean {\r\n\t if(jewishCalendar.isAssurBemelacha()) {\r\n\t\t return false;\r\n\t }\r\n\r\n\t const holidayIndex: number = jewishCalendar.getYomTovIndex();\r\n\t if (!this.isMizmorLesodaRecitedErevYomKippurAndPesach()\r\n\t\t\t && (holidayIndex == JewishCalendar.EREV_YOM_KIPPUR\r\n\t\t\t\t\t || holidayIndex == JewishCalendar.EREV_PESACH\r\n\t\t\t\t\t || jewishCalendar.isCholHamoedPesach())) {\r\n\t\t return false;\r\n\t }\r\n\t return true;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the week of Purim, from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year). Some\r\n\t * chasidishe communities do not recite tachanun during this period. See the Minhag Yisrael Torah 131 and Darkei Chaim Veshalom 191who discuss the\r\n\t * minhag not to recite tachanun. Also see the Mishmeres Shalom (Hadras Shalom) who discusses the\r\n\t * minhag of not reciting it on the 16th and 17th.\r\n\t * @return If tachanun is set to be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year).\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfPurim():boolean {\r\n return this.tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II Adar II} (on a leap year).\r\n\t * @param tachanunRecitedWeekOfPurim Sets if tachanun is to recited during the week of Purim from the 11th\r\n\t * through the 17th of {@link JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II\r\n\t * Adar II} (on a leap year). Some chasidishe communities do not recite tachanun\r\n\t * during this period.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t */\r\n public setTachanunRecitedWeekOfPurim(tachanunRecitedWeekOfPurim:boolean):void {\r\n this.tachanunRecitedWeekOfPurim = tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR Iyar},\r\n\t * or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some chasidishe communities\r\n\t * do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar.\r\n\t * @return If tachanun is set to be recited during the sefira week of Hod (14 - 20 {@link\r\n\t * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfHod():boolean {\r\n return this.tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR\r\n\t * Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @param tachanunRecitedWeekOfHod Sets if tachanun should be recited during the sefira week of\r\n\t * Hod.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t */\r\n public setTachanunRecitedWeekOfHod(tachanunRecitedWeekOfHod:boolean):void {\r\n this.tachanunRecitedWeekOfHod = tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and the Pri\r\n\t * Chadash 131:7 state that some places to not recite tachanun during this period. The Sh\"UT Chasam Sofer on Choshen\r\n\t * Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses\r\n\t * Hagdola who also states that it should not be recited. The Aderes wanted to institute saying tachanun during this\r\n\t * period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the minhag in Yerushalayim.\r\n\t * The Aruch Hashulchan is of the opinion that that this minhag is incorrect, and it should be recited, and The Chazon\r\n\t * Ish also recited tachanun during this period. See the Dirshu edition of the Mishna Berurah for details.\r\n\t * @return If tachanun is set to be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei)\r\n\t */\r\n public isTachanunRecitedEndOfTishrei():boolean {\r\n return this.tachanunRecitedEndOfTishrei;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @param tachanunRecitedEndOfTishrei is tachanun recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t */\r\n public setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei:boolean):void {\r\n this.tachanunRecitedEndOfTishrei = tachanunRecitedEndOfTishrei;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week after Shavuos. This is the opinion of the Pri Megadim\r\n\t * quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim for\r\n\t * 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68\r\n\t * recited tachanun during this week.\r\n\t * \r\n\t * @return If tachanun is set to be recited during the week after Shavuos.\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n public isTachanunRecitedWeekAfterShavuos():boolean {\r\n return this.tachanunRecitedWeekAfterShavuos;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week after Shavuos.\r\n\t * @param tachanunRecitedWeekAfterShavuos is tachanun recited during the week after Shavuos.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public setTachanunRecitedWeekAfterShavuos(tachanunRecitedWeekAfterShavuos:boolean):void {\r\n this.tachanunRecitedWeekAfterShavuos = tachanunRecitedWeekAfterShavuos;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun is recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the Sheyarei Kneses Hagedola 131:12that\r\n\t * tachanun should not be recited on this day. Rav Shlomo Zalman Orbach in Halichos Shlomo on\r\n\t * Shavuos 12:16:25 is of the opinion that even in chutz laaretz it should be recited since the yemei\r\n\t * Tashlumin are counted based on Israel since that is where the karbanos are brought. Both\r\n\t * {@link #isTachanunRecitedShacharis(JewishCalendar)} and {@link #isTachanunRecitedMincha(JewishCalendar)}\r\n\t * only return false if the location is not set to {@link JewishCalendar#getInIsrael() Israel} and both\r\n\t * {@link #tachanunRecitedWeekAfterShavuos} and {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * \r\n\t * @return If tachanun is set to be recited on the 13th of {@link JewishDate#SIVAN Sivan} out of Israel.\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(isTachanunRecitedThirteenSivanOutOfIsrael)\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public isTachanunRecited13SivanOutOfIsrael():boolean {\r\n return this.tachanunRecited13SivanOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. \r\n\t * @param tachanunRecitedThirteenSivanOutOfIsrael sets if tachanun should be recited on the 13th of {@link\r\n\t * JewishDate#SIVAN Sivan} out of Israel. Both {@link #isTachanunRecitedShacharis(JewishCalendar)} and\r\n\t * {@link #isTachanunRecitedMincha(JewishCalendar)} only return false if the location is not set to {@link\r\n\t * JewishCalendar#getInIsrael() Israel} and both {@link #tachanunRecitedWeekAfterShavuos} and\r\n\t * {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t */\r\n public setTachanunRecited13SivanOutOfIsrael(tachanunRecitedThirteenSivanOutOfIsrael:boolean):void {\r\n this.tachanunRecited13SivanOutOfIsrael = tachanunRecitedThirteenSivanOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 states\r\n\t * that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the sephardim.\r\n\t * the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar).\r\n\t * The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in Rav Sheraya\r\n\t * Devlitzky's comments).\r\n\t * \r\n\t * @return If tachanun is recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n public isTachanunRecitedPesachSheni():boolean {\r\n return this.tachanunRecitedPesachSheni;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @param tachanunRecitedPesachSheni sets if tachanun should be recited on Pesach Sheni.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public setTachanunRecitedPesachSheni(tachanunRecitedPesachSheni:boolean):void {\r\n this.tachanunRecitedPesachSheni = tachanunRecitedPesachSheni;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI\r\n\t * Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is true this will be\r\n\t * ignored even if false.\r\n\t * \r\n\t * @return if tachanun is recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link\r\n\t * JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If {@link #isTachanunRecitedPesachSheni()}\r\n\t * is true this will be ignored even if false.\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public isTachanunRecited15IyarOutOfIsrael():boolean {\r\n return this.tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 15th of {@link JewishDate#IYAR Iyar} (Yom Tov Sheni shel Galuyos of\r\n\t * {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel. Ignored if {@link\r\n\t * #isTachanunRecitedPesachSheni()} is true.\r\n\t * \r\n\t * @param tachanunRecited15IyarOutOfIsrael if tachanun should be recited on the 15th of {@link JewishDate#IYAR\r\n\t * Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t */\r\n public setTachanunRecited15IyarOutOfIsrael(tachanunRecited15IyarOutOfIsrael: boolean): void {\r\n this.tachanunRecited15IyarOutOfIsrael = tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @return if tachanun is recited in mincha on erev\r\n\t * {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaErevLagBaomer():boolean {\r\n return this.tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @param tachanunRecitedMinchaErevLagBaomer sets if tachanun should be recited on mincha\r\n\t * of erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t */\r\n public setTachanunRecitedMinchaErevLagBaomer(tachanunRecitedMinchaErevLagBaomer:boolean): void {\r\n this.tachanunRecitedMinchaErevLagBaomer = tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} on a\r\n\t * leap year to the end of the month. Some chasidishe communities do not say tachanun\r\n\t * during this week. See Darkei\r\n\t * Chaim Veshalom 191.\r\n\t * @return if tachanun is recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n public isTachanunRecitedShivasYemeiHamiluim():boolean {\r\n return this.tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the Shivas Yemei Hamiluim, from the 23 of\r\n\t * {@link JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @param tachanunRecitedShivasYemeiHamiluim sets if tachanun should be recited during the\r\n\t * Shivas Yemei Hamiluim.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t */\r\n public setTachanunRecitedShivasYemeiHamiluim(tachanunRecitedShivasYemeiHamiluim:boolean):void {\r\n this.tachanunRecitedShivasYemeiHamiluim = tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Fridays. Some chasidishe communities do not recite\r\n\t * tachanun on Fridays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. This is also the minhag in Satmar.\r\n\t * @return if tachanun is recited on Fridays.\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n public isTachanunRecitedFridays():boolean {\r\n return this.tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Fridays. \r\n\t * @param tachanunRecitedFridays sets if tachanun should be recited on Fridays. Some chasidishe\r\n\t * communities do not recite tachanun on Fridays.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t */\r\n public setTachanunRecitedFridays(tachanunRecitedFridays:boolean):void {\r\n this.tachanunRecitedFridays = tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Sundays. Some chasidishe communities do not recite\r\n\t * tachanun on Sundays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. \r\n\t * @return if tachanun is recited on Sundays.\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n public isTachanunRecitedSundays():boolean {\r\n return this.tachanunRecitedSundays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Sundays. \r\n\t * @param tachanunRecitedSundays sets if tachanun should be recited on Sundays. Some chasidishe\r\n\t * communities do not recite tachanun on Sundays.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t */\r\n public setTachanunRecitedSundays(tachanunRecitedSundays:boolean):void {\r\n this.tachanunRecitedSundays = tachanunRecitedSundays;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited in Mincha the entire year. Some chasidishe communities do not recite\r\n\t * tachanun by Mincha all year round. SeeNemukei Orach Chaim 131:3.\r\n\t * @return if tachanun is recited in Mincha the entire year.\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaAllYear():boolean {\r\n return this.tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited in Mincha the entire year.\r\n\t * @param tachanunRecitedMinchaAllYear sets if tachanun should be recited by mincha all year. If set\r\n\t * to false, {@link #isTachanunRecitedMincha(JewishCalendar)} will always return false. If set to true (the\r\n\t * default), it will use the regular rules.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n public setTachanunRecitedMinchaAllYear(tachanunRecitedMinchaAllYear:boolean):void {\r\n this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if Mizmor Lesoda should be recited on Erev Yom Kippur, Erev Pesach and Chol\r\n\t * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do. The\r\n\t * default value is false.\r\n\t * @param mizmorLesodaRecitedErevYomKippurAndPesach Sets if Mizmor Lesoda should be recited on Erev Yom\r\n\t * Kippur, Erev Pesach and Chol Hamoed Pesach. If set to true (the default value is\r\n\t * false).\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n\tpublic setMizmorLesodaRecitedErevYomKippurAndPesach(mizmorLesodaRecitedErevYomKippurAndPesach: boolean): void {\r\n\t\tthis.mizmorLesodaRecitedErevYomKippurAndPesach = mizmorLesodaRecitedErevYomKippurAndPesach;\r\n\t}\r\n\r\n\t/**\r\n\t * Is Mizmor Lesoda set to be recited on Erev Yom Kippur, Erev Pesach and Chol\r\n\t * Hamoed Pesach. Ashkenazi congregations do not recite it on these days, while Sephardi congregations do.\r\n\t * The default value is false.\r\n\t * @return if Mizmor Lesoda is set to be recited on Erev Yom Kippur, Erev Pesach and\r\n\t * Chol Hamoed Pesach. If set to true (the default value is false).\r\n\t * @see #isMizmorLesodaRecited(JewishCalendar)\r\n\t */\r\n\tpublic isMizmorLesodaRecitedErevYomKippurAndPesach(): boolean {\r\n\t\treturn this.mizmorLesodaRecitedErevYomKippurAndPesach;\r\n\t}\r\n}", "import { JewishDate } from \"../JewishDate.ts\";\r\ntype hiloulahObj = { name: string; src: string; }[]\r\n\r\nexport class HiloulahYomiCalculator {\r\n\tfolderWithHiloulotJSON = (new URL(import.meta.url)).pathname.substring(0, (new URL(import.meta.url)).pathname.lastIndexOf('/'));\r\n\tinitFlag = false;\r\n\thiloulot_en: Record = {};\r\n\thiloulot_he: Record = {};\r\n\tconstructor (dir = (new URL(import.meta.url)).pathname.substring(0, (new URL(import.meta.url)).pathname.lastIndexOf('/'))) {\r\n\t\tthis.folderWithHiloulotJSON = dir;\r\n\t\tthis.init()\r\n\t\t\t.then(() => this.initFlag = true)\r\n\t}\r\n\r\n\tpublic async init() {\r\n\t\tthis.hiloulot_en = (await (await fetch(this.folderWithHiloulotJSON + '/hiloulah-en.json')).json()) as Record;\r\n\t\tthis.hiloulot_he = (await (await fetch(this.folderWithHiloulotJSON + '/hiloulah-he.json')).json()) as Record;\r\n\t}\r\n\r\n\tpublic async getHiloulah(jewishCalendar: JewishDate) {\r\n\t\tif (!this.initFlag) {\r\n\t\t\tawait this.init();\r\n\t\t\tthis.initFlag = true;\r\n\t\t}\r\n\t\tconst key = jewishCalendar.getJewishMonth().toString().padStart(2, '0') + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0')\r\n\r\n\t\tlet en = (key in this.hiloulot_en ? this.hiloulot_en[key] : []);\r\n\t\tlet he = (key in this.hiloulot_he ? this.hiloulot_he[key] : []);\r\n\r\n\t\tif (!jewishCalendar.isJewishLeapYear() && jewishCalendar.getJewishMonth() == JewishDate.ADAR) {\r\n\t\t\ten = Array.from(new Set(...([\"12\", \"13\"]\r\n\t\t\t\t.map(numString => numString + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0'))\r\n\t\t\t\t.map(key => (key in this.hiloulot_en ? this.hiloulot_en[key] : [])))))\r\n\t\t\the = Array.from(new Set(...([\"12\", \"13\"]\r\n\t\t\t\t.map(numString => numString + jewishCalendar.getJewishDayOfMonth().toString().padStart(2, '0'))\r\n\t\t\t\t.map(key => (key in this.hiloulot_he ? this.hiloulot_he[key] : [])))))\r\n\t\t}\r\n\r\n\t\treturn { en, he }\r\n\t}\r\n}", "import { Calendar } from '../../polyfills/Utils.ts';\r\nconst { SUNDAY, FRIDAY, SATURDAY } = Calendar;\r\n\r\nimport { JewishDate } from \"../JewishDate\";\r\nexport default class TehilimYomi {\r\n static byDayOfMonth(jDate: JewishDate) {\r\n return ({\r\n 1: [1, 9],\r\n 2: [10, 17],\r\n 3: [18, 22],\r\n 4: [23, 28],\r\n 5: [29, 34],\r\n 6: [35, 38],\r\n 7: [39, 43],\r\n 8: [44, 48],\r\n 9: [49, 54],\r\n 10: [55, 59],\r\n 11: [60, 65],\r\n 12: [66, 68],\r\n 13: [69, 71],\r\n 14: [72, 76],\r\n 15: [77, 78],\r\n 16: [79, 82],\r\n 17: [83, 87],\r\n 18: [88, 89],\r\n 19: [90, 96],\r\n 20: [97, 103],\r\n 21: [104, 105],\r\n 22: [106, 107],\r\n 23: [108, 112],\r\n 24: [113, 118],\r\n 25: ['119:1', '119:96'],\r\n 26: ['119:97', '119:176'],\r\n 27: [120, 134],\r\n 28: [135, 139],\r\n 29: [140, (jDate.getDaysInJewishMonth() == 29 ? 150 : 144)],\r\n 30: [145, 150]\r\n }[jDate.getJewishDayOfMonth()]) as [number, number] | [string, string]\r\n }\r\n\r\n static byWeek(jDate: JewishDate) {\r\n return ({\r\n [Calendar.SUNDAY]: [1, 29],\r\n [Calendar.MONDAY]: [30, 50],\r\n [Calendar.TUESDAY]: [51, 72],\r\n [Calendar.WEDNESDAY]: [73, 89],\r\n [Calendar.THURSDAY]: [90, 106],\r\n [Calendar.FRIDAY]: [107, 119],\r\n [Calendar.SATURDAY]: [120, 150]\r\n }[jDate.getDayOfWeek()]) as [number, number]\r\n }\r\n}", "import { Parsha, JewishCalendar } from \"../JewishCalendar\";\r\nimport { Temporal } from \"temporal-polyfill\";\r\n\r\n/**\r\n * This class's main goal is to return the Weekly Haftorah reading said after the Weekly Parasha\r\n * reading. Which readings to say were taken from the Chumash \"L'maan Shemo B'Ahavah\" according to\r\n * the Sepharadic Minhag.\r\n * @see WeeklyParashaReadings\r\n */\r\nexport default class WeeklyHaftarahReading {\r\n\r\n\t/**\r\n\t * This method returns a string that contains the weekly Haftorah. The {@link JewishCalendar}\r\n\t * object passed into this method should be set to Saturday because the {@link JewishCalendar#getParshah()}\r\n\t * method returns {@link com.kosherjava.zmanim.hebrewcalendar.JewishCalendar.Parsha#NONE} during\r\n\t * the week.\r\n\t * @param jCal the JewishCalendar object set to Saturday\r\n\t * @return The haftorah for this week as a string\r\n\t */\r\n\tpublic static getThisWeeksHaftarah(jCal: JewishCalendar): { text: string; source: string; } {\r\n\t\tconst specialShabbatot = {\r\n\t\t\t[Parsha.SHKALIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05DB\u05E8\u05EA \u05D9\u05D4\u05D5\u05D9\u05D3\u05E2\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.ZACHOR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8 \u05E9\u05DE\u05D5\u05D0\u05DC\",\r\n\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05D8\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.PARA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DC\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.HACHODESH]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D4'\r\n\t\t\t},\r\n\t\t\t[Parsha.HAGADOL]: {\r\n\t\t\t\ttext: \"\u05D5\u05E2\u05E8\u05D1\u05D4\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05D0\u05DB\u05D9 \u05D2'\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (jCal.getSpecialShabbos() in specialShabbatot)\r\n\t\t\t// @ts-ignore\r\n\t\t\treturn specialShabbatot[jCal.getSpecialShabbos()]\r\n\r\n\t\t// Rosh Hodesh & Erev Rosh Hodesh has its own Haftarot. Use that except if it's Matot Maseh, Re'eh or just Hanukah\r\n\t\t// Then default to weekly parasha.\r\n\r\n\t\t// The initial code wanted to make it more flexible and have each Parasha in its own ability to override ERH & RH,\r\n\t\t// but we refactored away from that since we know that only 2 Parashiot & 1 Event have the exception\r\n\t\t// Also, it combined Noah & Ki These, but we don't have that luxury because we're saving space on everything else.\r\n\t\t// (ironic it didn't combine Pekudeh & Wayaqhel-Pekudeh, among others)\r\n\r\n\t\tif (jCal.isChanukah())\r\n\t\t\treturn ([7, 8].includes(jCal.getDayOfChanukah())\r\n\t\t\t\t? {\r\n\t\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t\t} : {\r\n\t\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05D5\u05E9\u05DE\u05D7\u05D9\",\r\n\t\t\t\t\tsource: '\u05D6\u05DB\u05E8\u05D9\u05D4 \u05D1'\r\n\t\t\t\t})\r\n\r\n\t\tif (![Parsha.MATOS_MASEI, Parsha.REEH].includes(jCal.getParshah())) {\r\n\t\t\tif (jCal.isErevRoshChodesh()) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttext: \"\u05DE\u05D7\u05E8 \u05D7\u05D5\u05D3\u05E9\",\r\n\t\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05DB'\r\n\t\t\t\t};\r\n\t\t\t} else if (jCal.isRoshChodesh()) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D5'\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst tammuz17 = jCal.clone()\r\n\t\ttammuz17.setJewishDate(tammuz17.getJewishYear(), JewishCalendar.TAMMUZ, 17)\r\n\r\n\t\t// @ts-ignore\r\n\t\treturn {\r\n\t\t\t[Parsha.BERESHIS]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NOACH]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05E2\u05E7\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.LECH_LECHA]: {\r\n\t\t\t\ttext: \"\u05DC\u05DE\u05D4 \u05EA\u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYERA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E9\u05D4 \u05D0\u05D7\u05EA\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.CHAYEI_SARA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05DE\u05DC\u05DA \u05D3\u05D5\u05D3\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.TOLDOS]: {\r\n\t\t\t\ttext: \"\u05DE\u05E9\u05D0 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05D0\u05DB\u05D9 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYETZEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05E2\u05DE\u05D9 \u05EA\u05DC\u05D5\u05D0\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYISHLACH]: {\r\n\t\t\t\ttext: \"\u05D7\u05D6\u05D5\u05DF \u05E2\u05D5\u05D1\u05D3\u05D9\u05D4\",\r\n\t\t\t\tsource: '\u05E2\u05D5\u05D1\u05D3\u05D9\u05D4'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYESHEV]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05E2\u05DE\u05D5\u05E1 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.MIKETZ]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E7\u05E5 \u05E9\u05DC\u05DE\u05D4\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYIGASH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DC\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYECHI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E7\u05E8\u05D1\u05D5\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHEMOS]: {\r\n\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAERA]: {\r\n\t\t\t\ttext: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB\"\u05D7'\r\n\t\t\t},\r\n\t\t\t[Parsha.BO]: {\r\n\t\t\t\ttext: \"\u05D4\u05D3\u05D1\u05E8 \u05D0\u05E9\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DE\"\u05D5'\r\n\t\t\t},\r\n\t\t\t[Parsha.BESHALACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05EA\u05E9\u05E8 \u05D3\u05D1\u05D5\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.YISRO]: {\r\n\t\t\t\ttext: \"\u05D1\u05E9\u05E0\u05EA \u05DE\u05D5\u05EA\",\r\n\t\t\t\tsource: \"\u05D9\u05E9\u05E2\u05D9\u05D4 \u05D5\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MISHPATIM]: {\r\n\t\t\t\ttext: \"\u05D4\u05D3\u05D1\u05E8 \u05D0\u05E9\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DC\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.TERUMAH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D5\u05D4 \u05E0\u05EA\u05DF\",\r\n\t\t\t\tsource: \"\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.TETZAVEH]: {\r\n\t\t\t\ttext: \"\u05D0\u05EA\u05D4 \u05D1\u05DF \u05D0\u05D3\u05DD\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SISA]: {\r\n\t\t\t\ttext: '\u05D5\u05D9\u05E9\u05DC\u05D7 \u05D0\u05D7\u05D0\u05D1',\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D9\"\u05D7'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYAKHEL]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E9\u05DC\u05D7 \u05D4\u05DE\u05DC\u05DA\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.PEKUDEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYAKHEL_PEKUDEI]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E2\u05E9 \u05D7\u05D9\u05E8\u05D5\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D0 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYIKRA]: {\r\n\t\t\t\ttext: \"\u05E2\u05DD \u05D6\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.TZAV]: {text: \"\u05DB\u05D4 \u05D0\u05DE\u05E8\u05E1\", source: \"\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D6\"},\r\n\t\t\t[Parsha.SHMINI]: {text: \"\u05D5\u05D9\u05E1\u05E3 \u05E2\u05D5\u05D3\", source: \"\u05E9\u05DE\u05D5\u05D0\u05DC \u05D1 \u05D5\"},\r\n\t\t\t[Parsha.TAZRIA]: {text: \"\u05D5\u05D0\u05D9\u05E9 \u05D1\u05D0\", source: \"\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D3\"},\r\n\t\t\t[Parsha.METZORA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E8\u05D1\u05E2\u05D4 \u05D0\u05E0\u05E9\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.TAZRIA_METZORA]: {\r\n\t\t\t\ttext: \"\u05D5\u05D0\u05E8\u05D1\u05E2\u05D4 \u05D0\u05E0\u05E9\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D1 \u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.ACHREI_MOS]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.KEDOSHIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB'\r\n\t\t\t},\r\n\t\t\t[Parsha.ACHREI_MOS_KEDOSHIM]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DB'\r\n\t\t\t},\r\n\t\t\t[Parsha.EMOR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05DB\u05D4\u05E0\u05D9\u05DD\",\r\n\t\t\t\tsource: '\u05D9\u05D7\u05D6\u05E7\u05D0\u05DC \u05DE\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05DC\"\u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.BECHUKOSAI]: {\r\n\t\t\t\ttext: \"\u05D9\u05D4\u05D9\u05D4 \u05E2\u05D6\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D8\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAR_BECHUKOSAI]: {\r\n\t\t\t\ttext: \"\u05D9\u05D4\u05D9\u05D4 \u05E2\u05D6\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E8\u05DE\u05D9\u05D4 \u05D8\"\u05D6'\r\n\t\t\t},\r\n\t\t\t[Parsha.BAMIDBAR]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4 \u05DE\u05E1\u05E4\u05E8\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NASSO]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D4\u05D9 \u05D0\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D9\"\u05D2'\r\n\t\t\t},\r\n\t\t\t[Parsha.BEHAALOSCHA]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05D5\u05E9\u05DE\u05D7\u05D9\",\r\n\t\t\t\tsource: '\u05D6\u05DB\u05E8\u05D9\u05D4 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHLACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E9\u05DC\u05D7\",\r\n\t\t\t\tsource: '\u05D9\u05D4\u05D5\u05E9\u05E2 \u05D1'\r\n\t\t\t},\r\n\t\t\t[Parsha.KORACH]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05D0\u05DE\u05E8\",\r\n\t\t\t\tsource: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D0 \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.CHUKAS]: {\r\n\t\t\t\ttext: \"\u05D5\u05D9\u05E4\u05EA\u05D7\",\r\n\t\t\t\tsource: '\u05E9\u05D5\u05E4\u05D8\u05D9\u05DD \u05D9\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.BALAK]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4\",\r\n\t\t\t\tsource: \"\u05DE\u05D9\u05DB\u05D4 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.CHUKAS_BALAK]: {\r\n\t\t\t\ttext: \"\u05D5\u05D4\u05D9\u05D4\",\r\n\t\t\t\tsource: \"\u05DE\u05D9\u05DB\u05D4 \u05D4\"\r\n\t\t\t},\r\n\t\t\t[Parsha.PINCHAS]:\r\n\t\t\t\t(Temporal.PlainDate.compare(jCal.getDate(), tammuz17.getDate()) == -1\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\ttext: \"\u05D5\u05D9\u05D3 \u05D9\u05D4\u05D5\u05D4\",\r\n\t\t\t\t\t\tsource: '\u05DE\u05DC\u05DB\u05D9\u05DD \u05D9\"\u05D7'\r\n\t\t\t\t\t} : {\r\n\t\t\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D0\"\r\n\t\t\t\t\t}),\r\n\t\t\t[Parsha.MATOS]: {\r\n\t\t\t\ttext: \"\u05D3\u05D1\u05E8\u05D9 \u05D9\u05E8\u05DE\u05D9\u05D4\u05D5\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D0\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MASEI]: {\r\n\t\t\t\ttext: \"\u05E9\u05DE\u05E2\u05D5 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D1\"\r\n\t\t\t},\r\n\t\t\t[Parsha.MATOS_MASEI]: {\r\n\t\t\t\ttext: \"\u05E9\u05DE\u05E2\u05D5 \u05D3\u05D1\u05E8\",\r\n\t\t\t\tsource: \"\u05D9\u05E8\u05DE\u05D9\u05D4\u05D5 \u05D1\"\r\n\t\t\t},\r\n\t\t\t[Parsha.DEVARIM]: {\r\n\t\t\t\ttext: \"\u05D7\u05D6\u05D5\u05DF\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAESCHANAN]: {\r\n\t\t\t\ttext: \"\u05E0\u05D7\u05DE\u05D5\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE'\r\n\t\t\t},\r\n\t\t\t[Parsha.EIKEV]: {\r\n\t\t\t\ttext: \"\u05D5\u05EA\u05D0\u05DE\u05E8 \u05E6\u05D9\u05D5\u05DF\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05DE\"\u05D8'\r\n\t\t\t},\r\n\t\t\t[Parsha.REEH]: {\r\n\t\t\t\ttext: \"\u05E2\u05E0\u05D9\u05D4 \u05E1\u05E2\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.SHOFTIM]: {\r\n\t\t\t\ttext: \"\u05D0\u05E0\u05DB\u05D9 \u05D0\u05E0\u05DB\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SEITZEI]: {\r\n\t\t\t\ttext: \"\u05E8\u05E0\u05D9 \u05E2\u05E7\u05E8\u05D4\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.KI_SAVO]: {\r\n\t\t\t\ttext: \"\u05E7\u05D5\u05DE\u05D9 \u05D0\u05D5\u05E8\u05D9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1'\r\n\t\t\t},\r\n\t\t\t[Parsha.NITZAVIM]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05E9 \u05D0\u05E9\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.VAYEILECH]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05D1\u05D4\",\r\n\t\t\t\tsource: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D3'\r\n\t\t\t},\r\n\t\t\t[Parsha.NITZAVIM_VAYEILECH]: {\r\n\t\t\t\ttext: \"\u05E9\u05D5\u05E9 \u05D0\u05E9\u05D9\u05E9\",\r\n\t\t\t\tsource: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E1\"\u05D0'\r\n\t\t\t},\r\n\t\t\t[Parsha.HAAZINU]:\r\n\t\t\t\t(jCal.getJewishMonth() == JewishCalendar.TISHREI && jCal.getJewishDayOfMonth() >= 10\r\n\t\t\t\t\t? (jCal.getJewishDayOfMonth() == 10\r\n\t\t\t\t\t\t? { text: \"\u05E1\u05DC\u05D5 \u05E1\u05DC\u05D5\", source: '\u05D9\u05E9\u05E2\u05D9\u05D4 \u05E0\"\u05D6' }\r\n\t\t\t\t\t\t: { text: \"\u05D5\u05D9\u05D3\u05D1\u05E8 \u05D3\u05D5\u05D3\", source: '\u05E9\u05DE\u05D5\u05D0\u05DC \u05D1 \u05DB\"\u05D1' })\r\n\t\t\t\t\t: { text: \"\u05E9\u05D5\u05D1\u05D4\", source: '\u05D4\u05D5\u05E9\u05E2 \u05D9\"\u05D3' }),\r\n\t\t\t[Parsha.VZOS_HABERACHA]: { text: \"\u05D5\u05D9\u05D4\u05D9 \u05D0\u05D7\u05E8\u05D9\", source: '\u05D9\u05D4\u05D5\u05E9\u05E2 \u05D0' },\r\n\t\t}[jCal.getParshah()]\r\n\t}\r\n}\r\n", "import { Daf } from './limud/Daf.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { JewishCalendar, Parsha } from './JewishCalendar.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\nimport { DafYomiYerushalmi } from './limud/YerushalmiYomiCalculator.ts';\r\n\r\n/**\r\n * The HebrewDateFormatter class formats a {@link JewishDate}.\r\n *\r\n * The class formats Jewish dates, numbers, Daf Yomi (Bavli and Yerushalmi), the Omer,\r\n * Parshas Hashavua (including the special parshiyos of Shekalim, Zachor, Parah\r\n * and Hachodesh), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings.\r\n * Sample full date output includes (using various options):\r\n *
    \r\n *
  • 21 Shevat, 5729
  • \r\n *
  • כא שבט תשכט
  • \r\n *
  • כ״א שבט ה׳תשכ״ט
  • \r\n *
  • כ״א שבט תש״פ or\r\n * כ״א שבט תש״ף
  • \r\n *
  • כ׳ שבט ו׳ אלפים
  • \r\n *
\r\n *\r\n * @see JewishDate\r\n * @see JewishCalendar\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class HebrewDateFormatter {\r\n /**\r\n * See {@link #isHebrewFormat()} and {@link #setHebrewFormat(boolean)}.\r\n */\r\n private hebrewFormat: boolean = false;\r\n\r\n /**\r\n * See {@link #isUseLongHebrewYears()} and {@link #setUseLongHebrewYears(boolean)}.\r\n */\r\n private useLonghebrewYears: boolean = false;\r\n\r\n /**\r\n * See {@link #isUseGershGershayim()} and {@link #setUseGershGershayim(boolean)}.\r\n */\r\n\r\n private useGershGershayim: boolean = true;\r\n /**\r\n * See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}.\r\n */\r\n\r\n private longWeekFormat: boolean = true;\r\n /**\r\n * See {@link #isUseFinalFormLetters()} and {@link #setUseFinalFormLetters(boolean)}.\r\n */\r\n\r\n private useFinalFormLetters: boolean = false;\r\n\r\n /**\r\n * The internal DateFormat.  See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}.\r\n */\r\n private weekFormat: Intl.DateTimeFormatOptions | null = null;\r\n\r\n /**\r\n * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method\r\n\t * uses this for transliterated parsha formatting.  This list can be overridden (for Sephardi\r\n\t * English transliteration for example) by setting the {@link #setTransliteratedParshiosList(EnumMap)}.  The list\r\n\t * includes double and special parshiyos is set as \"Bereshis, Noach, Lech Lecha, Vayera, Chayei Sara,\r\n\t * Toldos, Vayetzei, Vayishlach, Vayeshev, Miketz, Vayigash, Vayechi, Shemos, Vaera, Bo, Beshalach, Yisro, Mishpatim,\r\n\t * Terumah, Tetzaveh, Ki Sisa, Vayakhel, Pekudei, Vayikra, Tzav, Shmini, Tazria, Metzora, Achrei Mos, Kedoshim, Emor,\r\n\t * Behar, Bechukosai, Bamidbar, Nasso, Beha'aloscha, Sh'lach, Korach, Chukas, Balak, Pinchas, Matos, Masei, Devarim,\r\n\t * Vaeschanan, Eikev, Re'eh, Shoftim, Ki Seitzei, Ki Savo, Nitzavim, Vayeilech, Ha'Azinu, Vezos Habracha,\r\n\t * Vayakhel Pekudei, Tazria Metzora, Achrei Mos Kedoshim, Behar Bechukosai, Chukas Balak, Matos Masei, Nitzavim Vayeilech,\r\n\t * Shekalim, Zachor, Parah, Hachodesh,Shuva, Shira, Hagadol, Chazon, Nachamu\".\r\n *\r\n * @see #formatParsha(JewishCalendar)\r\n */\r\n private transliteratedParshaMap: Record = {\r\n [Parsha.NONE]: '',\r\n [Parsha.BERESHIS]: 'Bereshis',\r\n [Parsha.NOACH]: 'Noach',\r\n [Parsha.LECH_LECHA]: 'Lech Lecha',\r\n [Parsha.VAYERA]: 'Vayera',\r\n [Parsha.CHAYEI_SARA]: 'Chayei Sara',\r\n [Parsha.TOLDOS]: 'Toldos',\r\n [Parsha.VAYETZEI]: 'Vayetzei',\r\n [Parsha.VAYISHLACH]: 'Vayishlach',\r\n [Parsha.VAYESHEV]: 'Vayeshev',\r\n [Parsha.MIKETZ]: 'Miketz',\r\n [Parsha.VAYIGASH]: 'Vayigash',\r\n [Parsha.VAYECHI]: 'Vayechi',\r\n [Parsha.SHEMOS]: 'Shemos',\r\n [Parsha.VAERA]: 'Vaera',\r\n [Parsha.BO]: 'Bo',\r\n [Parsha.BESHALACH]: 'Beshalach',\r\n [Parsha.YISRO]: 'Yisro',\r\n [Parsha.MISHPATIM]: 'Mishpatim',\r\n [Parsha.TERUMAH]: 'Terumah',\r\n [Parsha.TETZAVEH]: 'Tetzaveh',\r\n [Parsha.KI_SISA]: 'Ki Sisa',\r\n [Parsha.VAYAKHEL]: 'Vayakhel',\r\n [Parsha.PEKUDEI]: 'Pekudei',\r\n [Parsha.VAYIKRA]: 'Vayikra',\r\n [Parsha.TZAV]: 'Tzav',\r\n [Parsha.SHMINI]: 'Shmini',\r\n [Parsha.TAZRIA]: 'Tazria',\r\n [Parsha.METZORA]: 'Metzora',\r\n [Parsha.ACHREI_MOS]: 'Achrei Mos',\r\n [Parsha.KEDOSHIM]: 'Kedoshim',\r\n [Parsha.EMOR]: 'Emor',\r\n [Parsha.BEHAR]: 'Behar',\r\n [Parsha.BECHUKOSAI]: 'Bechukosai',\r\n [Parsha.BAMIDBAR]: 'Bamidbar',\r\n [Parsha.NASSO]: 'Nasso',\r\n [Parsha.BEHAALOSCHA]: 'Beha\\'aloscha',\r\n [Parsha.SHLACH]: 'Sh\\'lach',\r\n [Parsha.KORACH]: 'Korach',\r\n [Parsha.CHUKAS]: 'Chukas',\r\n [Parsha.BALAK]: 'Balak',\r\n [Parsha.PINCHAS]: 'Pinchas',\r\n [Parsha.MATOS]: 'Matos',\r\n [Parsha.MASEI]: 'Masei',\r\n [Parsha.DEVARIM]: 'Devarim',\r\n [Parsha.VAESCHANAN]: 'Vaeschanan',\r\n [Parsha.EIKEV]: 'Eikev',\r\n [Parsha.REEH]: 'Re\\'eh',\r\n [Parsha.SHOFTIM]: 'Shoftim',\r\n [Parsha.KI_SEITZEI]: 'Ki Seitzei',\r\n [Parsha.KI_SAVO]: 'Ki Savo',\r\n [Parsha.NITZAVIM]: 'Nitzavim',\r\n [Parsha.VAYEILECH]: 'Vayeilech',\r\n [Parsha.HAAZINU]: 'Ha\\'Azinu',\r\n [Parsha.VZOS_HABERACHA]: 'Vezos Habracha',\r\n [Parsha.VAYAKHEL_PEKUDEI]: 'Vayakhel Pekudei',\r\n [Parsha.TAZRIA_METZORA]: 'Tazria Metzora',\r\n [Parsha.ACHREI_MOS_KEDOSHIM]: 'Achrei Mos Kedoshim',\r\n [Parsha.BEHAR_BECHUKOSAI]: 'Behar Bechukosai',\r\n [Parsha.CHUKAS_BALAK]: 'Chukas Balak',\r\n [Parsha.MATOS_MASEI]: 'Matos Masei',\r\n [Parsha.NITZAVIM_VAYEILECH]: 'Nitzavim Vayeilech',\r\n [Parsha.SHKALIM]: 'Shekalim',\r\n [Parsha.ZACHOR]: 'Zachor',\r\n [Parsha.PARA]: 'Parah',\r\n [Parsha.HACHODESH]: 'Hachodesh',\r\n [Parsha.SHUVA]: 'Shuva',\r\n [Parsha.SHIRA]: 'Shira',\r\n [Parsha.HAGADOL]: 'Hagadol',\r\n [Parsha.CHAZON]: 'Chazon',\r\n [Parsha.NACHAMU]: 'Nachamu',\r\n };\r\n\r\n /**\r\n * Unicode {@link EnumMap} of Hebrew parshiyos.  The list includes double and special parshiyos and\r\n\t * contains \"בראשית, נח, לך לך,\r\n * וירא, חיי שרה,\r\n * תולדות, ויצא, וישלח,\r\n * וישב, מקץ, ויגש, ויחי,\r\n * שמות, וארא, בא, בשלח,\r\n * יתרו, משפטים, תרומה,\r\n * תצוה, כי תשא, ויקהל,\r\n * פקודי, ויקרא, צו,\r\n * שמיני, תזריע, מצרע,\r\n * אחרי מות, קדושים,\r\n * אמור, בהר, בחקתי,\r\n * במדבר, נשא, בהעלתך,\r\n * שלח לך, קרח, חוקת, בלק,\r\n * פינחס, מטות, מסעי,\r\n * דברים, ואתחנן, עקב,\r\n * ראה, שופטים, כי תצא,\r\n * כי תבוא, D9;צבים, וילך,\r\n * האזינו, וזאת הברכה,\r\n * ויקהל פקודי, תזריע\r\n * מצרע, אחרי מות\r\n * קדושים, בהר בחקתי,\r\n * חוקת בלק, מטות מסעי,\r\n * נצבים וילך, שקלים,\r\n\t * זכור, פרה, החדש,\r\n\t * שובה,שירה,הגדול,\r\n\t * חזון,נחמו\"\r\n */\r\n private readonly hebrewParshaMap: Record = {\r\n [Parsha.NONE]: '',\r\n [Parsha.BERESHIS]: '\\u05D1\\u05E8\\u05D0\\u05E9\\u05D9\\u05EA',\r\n [Parsha.NOACH]: '\\u05E0\\u05D7',\r\n [Parsha.LECH_LECHA]: '\\u05DC\\u05DA \\u05DC\\u05DA',\r\n [Parsha.VAYERA]: '\\u05D5\\u05D9\\u05E8\\u05D0',\r\n [Parsha.CHAYEI_SARA]: '\\u05D7\\u05D9\\u05D9 \\u05E9\\u05E8\\u05D4',\r\n [Parsha.TOLDOS]: '\\u05EA\\u05D5\\u05DC\\u05D3\\u05D5\\u05EA',\r\n [Parsha.VAYETZEI]: '\\u05D5\\u05D9\\u05E6\\u05D0',\r\n [Parsha.VAYISHLACH]: '\\u05D5\\u05D9\\u05E9\\u05DC\\u05D7',\r\n [Parsha.VAYESHEV]: '\\u05D5\\u05D9\\u05E9\\u05D1',\r\n [Parsha.MIKETZ]: '\\u05DE\\u05E7\\u05E5',\r\n [Parsha.VAYIGASH]: '\\u05D5\\u05D9\\u05D2\\u05E9',\r\n [Parsha.VAYECHI]: '\\u05D5\\u05D9\\u05D7\\u05D9',\r\n [Parsha.SHEMOS]: '\\u05E9\\u05DE\\u05D5\\u05EA',\r\n [Parsha.VAERA]: '\\u05D5\\u05D0\\u05E8\\u05D0',\r\n [Parsha.BO]: '\\u05D1\\u05D0',\r\n [Parsha.BESHALACH]: '\\u05D1\\u05E9\\u05DC\\u05D7',\r\n [Parsha.YISRO]: '\\u05D9\\u05EA\\u05E8\\u05D5',\r\n [Parsha.MISHPATIM]: '\\u05DE\\u05E9\\u05E4\\u05D8\\u05D9\\u05DD',\r\n [Parsha.TERUMAH]: '\\u05EA\\u05E8\\u05D5\\u05DE\\u05D4',\r\n [Parsha.TETZAVEH]: '\\u05EA\\u05E6\\u05D5\\u05D4',\r\n [Parsha.KI_SISA]: '\\u05DB\\u05D9 \\u05EA\\u05E9\\u05D0',\r\n [Parsha.VAYAKHEL]: '\\u05D5\\u05D9\\u05E7\\u05D4\\u05DC',\r\n [Parsha.PEKUDEI]: '\\u05E4\\u05E7\\u05D5\\u05D3\\u05D9',\r\n [Parsha.VAYIKRA]: '\\u05D5\\u05D9\\u05E7\\u05E8\\u05D0',\r\n [Parsha.TZAV]: '\\u05E6\\u05D5',\r\n [Parsha.SHMINI]: '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9',\r\n [Parsha.TAZRIA]: '\\u05EA\\u05D6\\u05E8\\u05D9\\u05E2',\r\n [Parsha.METZORA]: '\\u05DE\\u05E6\\u05E8\\u05E2',\r\n [Parsha.ACHREI_MOS]: '\\u05D0\\u05D7\\u05E8\\u05D9 \\u05DE\\u05D5\\u05EA',\r\n [Parsha.KEDOSHIM]: '\\u05E7\\u05D3\\u05D5\\u05E9\\u05D9\\u05DD',\r\n [Parsha.EMOR]: '\\u05D0\\u05DE\\u05D5\\u05E8',\r\n [Parsha.BEHAR]: '\\u05D1\\u05D4\\u05E8',\r\n [Parsha.BECHUKOSAI]: '\\u05D1\\u05D7\\u05E7\\u05EA\\u05D9',\r\n [Parsha.BAMIDBAR]: '\\u05D1\\u05DE\\u05D3\\u05D1\\u05E8',\r\n [Parsha.NASSO]: '\\u05E0\\u05E9\\u05D0',\r\n [Parsha.BEHAALOSCHA]: '\\u05D1\\u05D4\\u05E2\\u05DC\\u05EA\\u05DA',\r\n [Parsha.SHLACH]: '\\u05E9\\u05DC\\u05D7 \\u05DC\\u05DA',\r\n [Parsha.KORACH]: '\\u05E7\\u05E8\\u05D7',\r\n [Parsha.CHUKAS]: '\\u05D7\\u05D5\\u05E7\\u05EA',\r\n [Parsha.BALAK]: '\\u05D1\\u05DC\\u05E7',\r\n [Parsha.PINCHAS]: '\\u05E4\\u05D9\\u05E0\\u05D7\\u05E1',\r\n [Parsha.MATOS]: '\\u05DE\\u05D8\\u05D5\\u05EA',\r\n [Parsha.MASEI]: '\\u05DE\\u05E1\\u05E2\\u05D9',\r\n [Parsha.DEVARIM]: '\\u05D3\\u05D1\\u05E8\\u05D9\\u05DD',\r\n [Parsha.VAESCHANAN]: '\\u05D5\\u05D0\\u05EA\\u05D7\\u05E0\\u05DF',\r\n [Parsha.EIKEV]: '\\u05E2\\u05E7\\u05D1',\r\n [Parsha.REEH]: '\\u05E8\\u05D0\\u05D4',\r\n [Parsha.SHOFTIM]: '\\u05E9\\u05D5\\u05E4\\u05D8\\u05D9\\u05DD',\r\n [Parsha.KI_SEITZEI]: '\\u05DB\\u05D9 \\u05EA\\u05E6\\u05D0',\r\n [Parsha.KI_SAVO]: '\\u05DB\\u05D9 \\u05EA\\u05D1\\u05D5\\u05D0',\r\n [Parsha.NITZAVIM]: '\\u05E0\\u05E6\\u05D1\\u05D9\\u05DD',\r\n [Parsha.VAYEILECH]: '\\u05D5\\u05D9\\u05DC\\u05DA',\r\n [Parsha.HAAZINU]: '\\u05D4\\u05D0\\u05D6\\u05D9\\u05E0\\u05D5',\r\n [Parsha.VZOS_HABERACHA]: '\\u05D5\\u05D6\\u05D0\\u05EA \\u05D4\\u05D1\\u05E8\\u05DB\\u05D4 ',\r\n [Parsha.VAYAKHEL_PEKUDEI]: '\\u05D5\\u05D9\\u05E7\\u05D4\\u05DC \\u05E4\\u05E7\\u05D5\\u05D3\\u05D9',\r\n [Parsha.TAZRIA_METZORA]: '\\u05EA\\u05D6\\u05E8\\u05D9\\u05E2 \\u05DE\\u05E6\\u05E8\\u05E2',\r\n [Parsha.ACHREI_MOS_KEDOSHIM]: '\\u05D0\\u05D7\\u05E8\\u05D9 \\u05DE\\u05D5\\u05EA \\u05E7\\u05D3\\u05D5\\u05E9\\u05D9\\u05DD',\r\n [Parsha.BEHAR_BECHUKOSAI]: '\\u05D1\\u05D4\\u05E8 \\u05D1\\u05D7\\u05E7\\u05EA\\u05D9',\r\n [Parsha.CHUKAS_BALAK]: '\\u05D7\\u05D5\\u05E7\\u05EA \\u05D1\\u05DC\\u05E7',\r\n [Parsha.MATOS_MASEI]: '\\u05DE\\u05D8\\u05D5\\u05EA \\u05DE\\u05E1\\u05E2\\u05D9',\r\n [Parsha.NITZAVIM_VAYEILECH]: '\\u05E0\\u05E6\\u05D1\\u05D9\\u05DD \\u05D5\\u05D9\\u05DC\\u05DA',\r\n [Parsha.SHKALIM]: '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD',\r\n [Parsha.ZACHOR]: '\\u05D6\\u05DB\\u05D5\\u05E8',\r\n [Parsha.PARA]: '\\u05E4\\u05E8\\u05D4',\r\n [Parsha.HACHODESH]: '\\u05D4\\u05D7\\u05D3\\u05E9',\r\n [Parsha.SHUVA]: '\\u05E9\\u05D5\\u05D1\\u05D4',\r\n [Parsha.SHIRA]: '\\u05E9\\u05D9\\u05E8\\u05D4',\r\n [Parsha.HAGADOL]: '\\u05D4\\u05D2\\u05D3\\u05D5\\u05DC',\r\n [Parsha.CHAZON]: '\\u05D7\\u05D6\\u05D5\\u05DF',\r\n [Parsha.NACHAMU]: '\\u05E0\\u05D7\\u05DE\\u05D5',\r\n };\r\n\r\n /**\r\n * returns if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as\r\n * ראשון or short such as א when formatting the day of week in\r\n * {@link #isHebrewFormat() Hebrew}.\r\n *\r\n * @return the longWeekFormat\r\n * @see #setLongWeekFormat(boolean)\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public isLongWeekFormat(): boolean {\r\n return this.longWeekFormat;\r\n }\r\n\r\n /**\r\n * Setting to control if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as\r\n * ראשון or short such as א when formatting the day of week in\r\n * {@link #isHebrewFormat() Hebrew}.\r\n *\r\n * @param longWeekFormat\r\n * the longWeekFormat to set\r\n */\r\n public setLongWeekFormat(longWeekFormat: boolean): void {\r\n this.longWeekFormat = longWeekFormat;\r\n\r\n this.weekFormat = {\r\n weekday: longWeekFormat ? 'long' : 'short',\r\n };\r\n }\r\n\r\n /**\r\n * The gersh character is the ׳ char\r\n * that is similar to a single quote and is used in formatting Hebrew numbers.\r\n */\r\n private static readonly GERESH: string = '\\u05F3';\r\n\r\n /**\r\n * The gershyim character is the ״ char\r\n * that is similar to a double quote and is used in formatting Hebrew numbers.\r\n */\r\n private static readonly GERSHAYIM: string = '\\u05F4';\r\n\r\n /**\r\n * Transliterated month names.  Defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\",\r\n * \"Kislev\", \"Teves\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\" ].\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n private transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n /**\r\n * The Hebrew omer prefix charachter. It defaults to ב producing בעומר,\r\n * but can be set to ל to produce לעומר (or any other prefix).\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n private hebrewOmerPrefix: string = '\\u05D1';\r\n\r\n /**\r\n * The default value for formatting Shabbos (Saturday).  Defaults to Shabbos.\r\n * @see #getTransliteratedShabbosDayOfWeek()\r\n * @see #setTransliteratedShabbosDayOfWeek(String)\r\n */\r\n private transliteratedShabbosDayOfweek: string = 'Shabbos';\r\n\r\n /**\r\n * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation \"Shabbos\".\r\n * This can be overwritten using the {@link #setTransliteratedShabbosDayOfWeek(String)}\r\n *\r\n * @return the transliteratedShabbos. The default list of months uses Ashkenazi pronunciation \"Shabbos\".\r\n * @see #setTransliteratedShabbosDayOfWeek(String)\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public getTransliteratedShabbosDayOfWeek(): string {\r\n return this.transliteratedShabbosDayOfweek;\r\n }\r\n\r\n /**\r\n * Setter to override the default transliterated name of \"Shabbos\" to alternate spelling such as \"Shabbat\" used by\r\n * the {@link #formatDayOfWeek(JewishDate)}\r\n *\r\n * @param transliteratedShabbos\r\n * the transliteratedShabbos to set\r\n *\r\n * @see #getTransliteratedShabbosDayOfWeek()\r\n * @see #formatDayOfWeek(JewishDate)\r\n */\r\n public setTransliteratedShabbosDayOfWeek(transliteratedShabbos: string): void {\r\n this.transliteratedShabbosDayOfweek = transliteratedShabbos;\r\n }\r\n\r\n /**\r\n * See {@link #getTransliteratedHolidayList()} and {@link #setTransliteratedHolidayList(String[])}.\r\n */\r\n private transliteratedHolidays: string[] = ['Erev Pesach', 'Pesach', 'Chol Hamoed Pesach', 'Pesach Sheni',\r\n 'Erev Shavuos', 'Shavuos', 'Seventeenth of Tammuz', 'Tishah B\\'Av', 'Tu B\\'Av', 'Erev Rosh Hashana',\r\n 'Rosh Hashana', 'Fast of Gedalyah', 'Erev Yom Kippur', 'Yom Kippur', 'Erev Succos', 'Succos',\r\n 'Chol Hamoed Succos', 'Hoshana Rabbah', 'Shemini Atzeres', 'Simchas Torah', 'Erev Chanukah', 'Chanukah',\r\n 'Tenth of Teves', 'Tu B\\'Shvat', 'Fast of Esther', 'Purim', 'Shushan Purim', 'Purim Katan', 'Rosh Chodesh',\r\n 'Yom HaShoah', 'Yom Hazikaron', 'Yom Ha\\'atzmaut', 'Yom Yerushalayim', 'Lag B\\'Omer', 'Shushan Purim Katan',\r\n 'Isru Chag'];\r\n\r\n /**\r\n * Returns the list of holidays transliterated into Latin chars. This is used by the\r\n * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses\r\n * Ashkenazi pronunciation in typical American English spelling.\r\n *\r\n * @return the list of transliterated holidays. The default list is currently [\"Erev Pesach\", \"Pesach\",\r\n * \"Chol Hamoed Pesach\", \"Pesach Sheni\", \"Erev Shavuos\", \"Shavuos\", \"Seventeenth of Tammuz\", \"Tishah B'Av\",\r\n * \"Tu B'Av\", \"Erev Rosh Hashana\", \"Rosh Hashana\", \"Fast of Gedalyah\", \"Erev Yom Kippur\", \"Yom Kippur\",\r\n * \"Erev Succos\", \"Succos\", \"Chol Hamoed Succos\", \"Hoshana Rabbah\", \"Shemini Atzeres\", \"Simchas Torah\",\r\n * \"Erev Chanukah\", \"Chanukah\", \"Tenth of Teves\", \"Tu B'Shvat\", \"Fast of Esther\", \"Purim\", \"Shushan Purim\",\r\n * \"Purim Katan\", \"Rosh Chodesh\", \"Yom HaShoah\", \"Yom Hazikaron\", \"Yom Ha'atzmaut\", \"Yom Yerushalayim\",\r\n * \"Lag B'Omer\",\"Shushan Purim Katan\",\"Isru Chag\"].\r\n *\r\n * @see #setTransliteratedMonthList(String[])\r\n * @see #formatYomTov(JewishCalendar)\r\n * @see #isHebrewFormat()\r\n */\r\n public getTransliteratedHolidayList(): string[] {\r\n return this.transliteratedHolidays;\r\n }\r\n\r\n /**\r\n * Sets the list of holidays transliterated into Latin chars. This is used by the\r\n * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String.\r\n *\r\n * @param transliteratedHolidays\r\n * the transliteratedHolidays to set. Ensure that the sequence exactly matches the list returned by the\r\n * default\r\n */\r\n public setTransliteratedHolidayList(transliteratedHolidays: string[]): void {\r\n this.transliteratedHolidays = transliteratedHolidays;\r\n }\r\n\r\n /**\r\n * Hebrew holiday array in the following format.
[\"ערב פסח\",\r\n * \"פסח\", \"חול המועד\r\n * פסח\", \"פסח שני\", \"ערב\r\n * שבועות\", \"שבועות\",\r\n * \"שבעה עשר בתמוז\",\r\n * \"תשעה באב\",\r\n * \"ט״ו באב\",\r\n * \"ערב ראש השנה\",\r\n * \"ראש השנה\",\r\n * \"צום גדליה\",\r\n * \"ערב יום כיפור\",\r\n * \"יום כיפור\",\r\n * \"ערב סוכות\",\r\n * \"סוכות\",\r\n * \"חול המועד סוכות\",\r\n * \"הושענא רבה\",\r\n * \"שמיני עצרת\",\r\n * \"שמחת תורה\",\r\n * \"ערב חנוכה\",\r\n * \"חנוכה\", \"עשרה בטבת\",\r\n * \"ט״ו בשבט\",\r\n * \"תענית אסתר\",\r\n * \"פורים\",\r\n * \"פורים שושן\",\r\n * \"פורים קטן\",\r\n * \"ראש חודש\",\r\n * \"יום השואה\",\r\n * \"יום הזיכרון\",\r\n * \"יום העצמאות\",\r\n * \"יום ירושלים\",\r\n * \"ל״ג בעומר\",\r\n * \"פורים שושן קטן\"]\r\n */\r\n private static readonly hebrewHolidays: string[] = ['\\u05E2\\u05E8\\u05D1 \\u05E4\\u05E1\\u05D7', '\\u05E4\\u05E1\\u05D7',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E4\\u05E1\\u05D7',\r\n '\\u05E4\\u05E1\\u05D7 \\u05E9\\u05E0\\u05D9', '\\u05E2\\u05E8\\u05D1 \\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05E2\\u05D4 \\u05E2\\u05E9\\u05E8 \\u05D1\\u05EA\\u05DE\\u05D5\\u05D6',\r\n '\\u05EA\\u05E9\\u05E2\\u05D4 \\u05D1\\u05D0\\u05D1', '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05D0\\u05D1',\r\n '\\u05E2\\u05E8\\u05D1 \\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4', '\\u05E6\\u05D5\\u05DD \\u05D2\\u05D3\\u05DC\\u05D9\\u05D4',\r\n '\\u05E2\\u05E8\\u05D1 \\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8',\r\n '\\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8', '\\u05E2\\u05E8\\u05D1 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D4\\u05D5\\u05E9\\u05E2\\u05E0\\u05D0 \\u05E8\\u05D1\\u05D4',\r\n '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9 \\u05E2\\u05E6\\u05E8\\u05EA',\r\n '\\u05E9\\u05DE\\u05D7\\u05EA \\u05EA\\u05D5\\u05E8\\u05D4', '\\u05E2\\u05E8\\u05D1 \\u05D7\\u05E0\\u05D5\\u05DB\\u05D4',\r\n '\\u05D7\\u05E0\\u05D5\\u05DB\\u05D4', '\\u05E2\\u05E9\\u05E8\\u05D4 \\u05D1\\u05D8\\u05D1\\u05EA',\r\n '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05E9\\u05D1\\u05D8', '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA \\u05D0\\u05E1\\u05EA\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD', '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E7\\u05D8\\u05DF', '\\u05E8\\u05D0\\u05E9 \\u05D7\\u05D5\\u05D3\\u05E9',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E9\\u05D5\\u05D0\\u05D4',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05D6\\u05D9\\u05DB\\u05E8\\u05D5\\u05DF',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E2\\u05E6\\u05DE\\u05D0\\u05D5\\u05EA',\r\n '\\u05D9\\u05D5\\u05DD \\u05D9\\u05E8\\u05D5\\u05E9\\u05DC\\u05D9\\u05DD',\r\n '\\u05DC\\u05F4\\u05D2 \\u05D1\\u05E2\\u05D5\\u05DE\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF \\u05E7\\u05D8\\u05DF',\r\n '\\u05D0\\u05E1\\u05E8\\u05D5 \\u05D7\\u05D2'];\r\n\r\n /**\r\n * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters.\r\n *\r\n * @param jewishCalendar the JewishCalendar\r\n * @return the formatted holiday or an empty String if the day is not a holiday.\r\n * @see #isHebrewFormat()\r\n */\r\n public formatYomTov(jewishCalendar: JewishCalendar): string {\r\n const index: number = jewishCalendar.getYomTovIndex();\r\n if (index === JewishCalendar.CHANUKAH) {\r\n const dayOfChanukah: number = jewishCalendar.getDayOfChanukah();\r\n return this.hebrewFormat\r\n ? (`${this.formatHebrewNumber(dayOfChanukah)} ${HebrewDateFormatter.hebrewHolidays[index]}`)\r\n : (`${this.transliteratedHolidays[index]} ${dayOfChanukah}`);\r\n }\r\n if (index === -1) return '';\r\n return this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[index] : this.transliteratedHolidays[index];\r\n }\r\n\r\n /**\r\n * Formats a day as Rosh Chodesh in the format of in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String will be returned.\r\n * @param jewishCalendar the JewishCalendar\r\n * @return The formatted String in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String will be returned.\r\n */\r\n public formatRoshChodesh(jewishCalendar: JewishCalendar): string {\r\n if (!jewishCalendar.isRoshChodesh()) return '';\r\n\r\n let formattedRoshChodesh: string;\r\n let month: number = jewishCalendar.getJewishMonth();\r\n if (jewishCalendar.getJewishDayOfMonth() === 30) {\r\n if (month < JewishCalendar.ADAR || (month === JewishCalendar.ADAR && jewishCalendar.isJewishLeapYear())) {\r\n month++;\r\n } else { // roll to Nissan\r\n month = JewishCalendar.NISSAN;\r\n }\r\n }\r\n\r\n // This method is only about formatting, so we shouldn't make any changes to the params passed in...\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _jewishCalendar = jewishCalendar.clone() as JewishCalendar;\r\n _jewishCalendar.setJewishMonth(month);\r\n formattedRoshChodesh = this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[JewishCalendar.ROSH_CHODESH]\r\n : this.transliteratedHolidays[JewishCalendar.ROSH_CHODESH];\r\n formattedRoshChodesh += ` ${this.formatMonth(_jewishCalendar)}`;\r\n return formattedRoshChodesh;\r\n }\r\n\r\n /**\r\n * Returns if the formatter is set to use Hebrew formatting in the various formatting methods.\r\n *\r\n * @return the hebrewFormat\r\n * @see #setHebrewFormat(boolean)\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public isHebrewFormat(): boolean {\r\n return this.hebrewFormat;\r\n }\r\n\r\n /**\r\n * Sets the formatter to format in Hebrew in the various formatting methods.\r\n *\r\n * @param hebrewFormat\r\n * the hebrewFormat to set\r\n * @see #isHebrewFormat()\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public setHebrewFormat(hebrewFormat: boolean): void {\r\n this.hebrewFormat = hebrewFormat;\r\n }\r\n\r\n /**\r\n * Returns the Hebrew Omer prefix.  By default it is the letter ב producing\r\n * בעומר, but it can be set to ל to produce\r\n * לעומר (or any other prefix) using the {@link #setHebrewOmerPrefix(String)}.\r\n *\r\n * @return the hebrewOmerPrefix\r\n *\r\n * @see #hebrewOmerPrefix\r\n * @see #setHebrewOmerPrefix(String)\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public getHebrewOmerPrefix(): string {\r\n return this.hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Method to set the Hebrew Omer prefix. By default it is the letter ב, but this allows setting it to a\r\n * ל (or any other prefix).\r\n *\r\n * @param hebrewOmerPrefix\r\n * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל.\r\n * @see #getHebrewOmerPrefix()\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public setHebrewOmerPrefix(hebrewOmerPrefix: string): void {\r\n this.hebrewOmerPrefix = hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Returns the list of months transliterated into Latin chars. The default list of months uses Ashkenazi\r\n * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar -\r\n * \"Adar\", \"Adar II\", \"Adar I\"\r\n *\r\n * @return the list of months beginning in Nissan and ending in in \"Adar\", \"Adar II\", \"Adar I\". The default list is\r\n * currently [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\", \"Kislev\", \"Teves\",\r\n * \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public getTransliteratedMonthList(): string[] {\r\n return this.transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default\r\n * uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedMonths\r\n * an array of 14 month names that defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tamuz\", \"Av\", \"Elul\", \"Tishrei\",\r\n * \"Heshvan\", \"Kislev\", \"Tevet\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #getTransliteratedMonthList()\r\n */\r\n public setTransliteratedMonthList(transliteratedMonths: string[]): void {\r\n this.transliteratedMonths = transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Unicode list of Hebrew months in the following format [\"\\u05E0\\u05D9\\u05E1\\u05DF\",\"\\u05D0\\u05D9\\u05D9\\u05E8\",\r\n * \"\\u05E1\\u05D9\\u05D5\\u05DF\",\"\\u05EA\\u05DE\\u05D5\\u05D6\",\"\\u05D0\\u05D1\",\"\\u05D0\\u05DC\\u05D5\\u05DC\",\r\n * \"\\u05EA\\u05E9\\u05E8\\u05D9\",\"\\u05D7\\u05E9\\u05D5\\u05DF\",\"\\u05DB\\u05E1\\u05DC\\u05D5\",\"\\u05D8\\u05D1\\u05EA\",\r\n * \"\\u05E9\\u05D1\\u05D8\",\"\\u05D0\\u05D3\\u05E8\",\"\\u05D0\\u05D3\\u05E8 \\u05D1\",\"\\u05D0\\u05D3\\u05E8 \\u05D0\"]\r\n *\r\n * @see #formatMonth(JewishDate)\r\n */\r\n private hebrewMonths: string[] = ['\\u05E0\\u05D9\\u05E1\\u05DF', '\\u05D0\\u05D9\\u05D9\\u05E8',\r\n '\\u05E1\\u05D9\\u05D5\\u05DF', '\\u05EA\\u05DE\\u05D5\\u05D6', '\\u05D0\\u05D1', '\\u05D0\\u05DC\\u05D5\\u05DC',\r\n '\\u05EA\\u05E9\\u05E8\\u05D9', '\\u05D7\\u05E9\\u05D5\\u05DF', '\\u05DB\\u05E1\\u05DC\\u05D5',\r\n '\\u05D8\\u05D1\\u05EA', '\\u05E9\\u05D1\\u05D8', '\\u05D0\\u05D3\\u05E8', '\\u05D0\\u05D3\\u05E8 \\u05D1',\r\n '\\u05D0\\u05D3\\u05E8 \\u05D0'];\r\n\r\n /**\r\n * Unicode list of Hebrew days of week in the format of [\"ראשון\",\r\n * \"שני\",\"שלישי\",\"רביעי\",\r\n * \"חמישי\",\"ששי\",\"שבת\"]\r\n */\r\n private static readonly hebrewDaysOfWeek: string[] = ['\\u05E8\\u05D0\\u05E9\\u05D5\\u05DF', '\\u05E9\\u05E0\\u05D9',\r\n '\\u05E9\\u05DC\\u05D9\\u05E9\\u05D9', '\\u05E8\\u05D1\\u05D9\\u05E2\\u05D9', '\\u05D7\\u05DE\\u05D9\\u05E9\\u05D9',\r\n '\\u05E9\\u05E9\\u05D9', '\\u05E9\\u05D1\\u05EA'];\r\n\r\n /**\r\n * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format\r\n * ראשון etc. If Hebrew formatting is not in use it will return it in the format\r\n * of Sunday etc. There are various formatting options that will affect the output.\r\n *\r\n * @param jewishDate the JewishDate Object\r\n * @return the formatted day of week\r\n * @see #isHebrewFormat()\r\n * @see #isLongWeekFormat()\r\n */\r\n public formatDayOfWeek(jewishDate: JewishDate): string {\r\n if (this.hebrewFormat) {\r\n if (this.isLongWeekFormat()) {\r\n return HebrewDateFormatter.hebrewDaysOfWeek[jewishDate.getDayOfWeek() - 1];\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n return this.formatHebrewNumber(300);\r\n }\r\n\r\n return this.formatHebrewNumber(jewishDate.getDayOfWeek());\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n if (this.isLongWeekFormat()) {\r\n return this.getTransliteratedShabbosDayOfWeek();\r\n }\r\n\r\n return this.getTransliteratedShabbosDayOfWeek().substring(0, 3);\r\n }\r\n\r\n const dateTime = jewishDate.getDate();\r\n return this.weekFormat\r\n ? dateTime.toLocaleString(undefined, this.weekFormat)\r\n : dateTime.toString();\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and\r\n * numbers. When true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output\r\n * would display as כא שבט תשכ.\r\n *\r\n * @return true if set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers.\r\n */\r\n public isUseGershGershayim(): boolean {\r\n return this.useGershGershayim;\r\n }\r\n\r\n /**\r\n * Sets whether to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers. The default\r\n * value is true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output would\r\n * display as כא שבט תשכ (or\r\n * כא שבט תשך). Single digit days or month or years such as כ׳\r\n * שבט ו׳ אלפים show the use of the Geresh.\r\n *\r\n * @param useGershGershayim\r\n * set to false to omit the Geresh ׳ and Gershayim ״ in formatting\r\n */\r\n public setUseGershGershayim(useGershGershayim: boolean): void {\r\n this.useGershGershayim = useGershGershayim;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the מנצפ״ך letters when\r\n * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or\r\n * or תש״ף if true. Traditionally non-final form letters are used, so the year\r\n * 5780 would be formatted as תש״פ if the default false is used here. If this returns\r\n * true, the format תש״ף would be used.\r\n *\r\n * @return true if set to use final form letters when formatting Hebrew years. The default value is false.\r\n */\r\n public isUseFinalFormLetters(): boolean {\r\n return this.useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally years ending in 20, 40, 50, 80 and 90 are formatted using non-final\r\n * form letters for example תש״פ for the year 5780. Setting this to true (the default\r\n * is false) will use the final form letters for מנצפ״ך and will format\r\n * the year 5780 as תש״ף.\r\n *\r\n * @param useFinalFormLetters\r\n * Set this to true to use final form letters when formatting Hebrew years.\r\n */\r\n public setUseFinalFormLetters(useFinalFormLetters: boolean): void {\r\n this.useFinalFormLetters = useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the thousands digit when formatting. When formatting a Hebrew Year,\r\n * traditionally the thousands digit is omitted and output for a year such as 5729 (1969 Gregorian) would be\r\n * calculated for 729 and format as תשכ״ט. When set to true the long format year such\r\n * as ה׳ תשכ״ט for 5729/1969 is returned.\r\n *\r\n * @return true if set to use the thousands digit when formatting Hebrew dates and numbers.\r\n */\r\n public isUseLongHebrewYears(): boolean {\r\n return this.useLonghebrewYears;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally the thousands digit is omitted and output for a year such as 5729\r\n * (1969 Gregorian) would be calculated for 729 and format as תשכ״ט. This method\r\n * allows setting this to true to return the long format year such as ה׳\r\n * תשכ״ט for 5729/1969.\r\n *\r\n * @param useLongHebrewYears\r\n * Set this to true to use the long formatting\r\n */\r\n public setUseLongHebrewYears(useLongHebrewYears: boolean): void {\r\n this.useLonghebrewYears = useLongHebrewYears;\r\n }\r\n\r\n /**\r\n * Formats the Jewish date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n *\r\n * @param jewishDate\r\n * the JewishDate to be formatted\r\n * @return the formatted date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n */\r\n public format(jewishDate: JewishDate): string {\r\n if (this.isHebrewFormat()) {\r\n return `${this.formatHebrewNumber(jewishDate.getJewishDayOfMonth())} ${this.formatMonth(jewishDate)} ${this.formatHebrewNumber(jewishDate.getJewishYear())}`;\r\n }\r\n return `${jewishDate.getJewishDayOfMonth()} ${this.formatMonth(jewishDate)}, ${jewishDate.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Returns a string of the current Hebrew month such as \"Tishrei\". Returns a string of the current Hebrew month such\r\n * as \"אדר ב׳\".\r\n *\r\n * @param jewishDate\r\n * the JewishDate to format\r\n * @return the formatted month name\r\n * @see #isHebrewFormat()\r\n * @see #setHebrewFormat(boolean)\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public formatMonth(jewishDate: JewishDate): string {\r\n const month: number = jewishDate.getJewishMonth();\r\n if (this.isHebrewFormat()) {\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.hebrewMonths[13] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : ''); // return Adar I, not Adar in a leap year\r\n } else if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR_II) {\r\n return this.hebrewMonths[12] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : '');\r\n }\r\n return this.hebrewMonths[month - 1];\r\n }\r\n\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n }\r\n\r\n return this.transliteratedMonths[month - 1];\r\n }\r\n\r\n /**\r\n * Returns a String of the Omer day in the form ל״ג בעומר if\r\n * Hebrew Format is set, or \"Omer X\" or \"Lag B'Omer\" if not. An empty string if there is no Omer this day.\r\n *\r\n * @param jewishCalendar\r\n * the JewishCalendar to be formatted\r\n *\r\n * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default\r\n * formatting has a ב׳ prefix that would output בעומר, but this\r\n * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output\r\n * ל״ג לעומר.\r\n * @see #isHebrewFormat()\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n public formatOmer(jewishCalendar: JewishCalendar): string {\r\n const omer: number = jewishCalendar.getDayOfOmer();\r\n if (omer === -1) {\r\n return '';\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return `${this.formatHebrewNumber(omer)} ${this.hebrewOmerPrefix}\u05E2\u05D5\u05DE\u05E8`;\r\n }\r\n\r\n if (omer === 33) { // if Lag B'Omer\r\n return this.transliteratedHolidays[33];\r\n }\r\n\r\n return `Omer ${omer}`;\r\n }\r\n\r\n /**\r\n * Formats a molad.\r\n * TODO: Experimental and incomplete\r\n *\r\n * @param moladChalakim - the chalakim of the molad\r\n * @return the formatted molad. FIXME: define proper format in English and Hebrew.\r\n */\r\n private static formatMolad(moladChalakim: number): string {\r\n let adjustedChalakim: number = moladChalakim;\r\n const MINUTE_CHALAKIM: number = 18;\r\n const HOUR_CHALAKIM: number = 1080;\r\n const DAY_CHALAKIM: number = 24 * HOUR_CHALAKIM;\r\n\r\n let days: number = adjustedChalakim / DAY_CHALAKIM;\r\n adjustedChalakim -= (days * DAY_CHALAKIM);\r\n const hours: number = Math.trunc(adjustedChalakim / HOUR_CHALAKIM);\r\n if (hours >= 6) {\r\n days += 1;\r\n }\r\n adjustedChalakim -= (hours * HOUR_CHALAKIM);\r\n const minutes: number = Math.trunc(adjustedChalakim / MINUTE_CHALAKIM);\r\n adjustedChalakim -= minutes * MINUTE_CHALAKIM;\r\n return `Day: ${days % 7} hours: ${hours}, minutes: ${minutes}, chalakim: ${adjustedChalakim}`;\r\n }\r\n\r\n /**\r\n * Returns the kviah in the traditional 3 letter Hebrew format where the first letter represents the day of week of\r\n * Rosh Hashana, the second letter represents the lengths of Cheshvan and Kislev ({@link JewishDate#SHELAIMIM\r\n * Shelaimim} , {@link JewishDate#KESIDRAN Kesidran} or {@link JewishDate#CHASERIM Chaserim}) and the 3rd letter\r\n * represents the day of week of Pesach. For example 5729 (1969) would return בשה (Rosh Hashana on\r\n * Monday, Shelaimim, and Pesach on Thursday), while 5771 (2011) would return השג (Rosh Hashana on\r\n * Thursday, Shelaimim, and Pesach on Tuesday).\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @return the Hebrew String such as בשה for 5729 (1969) and השג for 5771\r\n * (2011).\r\n */\r\n public getFormattedKviah(jewishYear: number): string {\r\n const jewishDate: JewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana\r\n const kviah: number = jewishDate.getCheshvanKislevKviah();\r\n const roshHashanaDayOfweek: number = jewishDate.getDayOfWeek();\r\n let returnValue: string = this.formatHebrewNumber(roshHashanaDayOfweek);\r\n returnValue += (kviah === JewishDate.CHASERIM ? '\\u05D7' : kviah === JewishDate.SHELAIMIM ? '\\u05E9' : '\\u05DB');\r\n jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year\r\n const pesachDayOfweek: number = jewishDate.getDayOfWeek();\r\n returnValue += this.formatHebrewNumber(pesachDayOfweek);\r\n returnValue = returnValue.replace(new RegExp(HebrewDateFormatter.GERESH, 'g'), ''); // geresh is never used in the kviah format\r\n // boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear);\r\n // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh\r\n // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for\r\n // a 385 day year\r\n return returnValue;\r\n }\r\n\r\n /**\r\n * Formats the Daf Yomi Yerushalmi in the format\r\n * of \"עירובין נ״ב\" in {@link #isHebrewFormat() Hebrew}, or\r\n * the transliterated format of \"Eruvin 52\".\r\n *\r\n * @param daf the Daf to be formatted.\r\n * @return the formatted daf.\r\n */\r\n public formatDafYomi(daf: Daf): string {\r\n if (daf == null) {\r\n if (this.hebrewFormat) {\r\n return DafYomiYerushalmi.getMasechtos()[39];\r\n }\r\n\r\n return DafYomiYerushalmi.getMasechtosTransliterated()[39];\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return daf.getMasechta() + ' ' + this.formatHebrewNumber(daf.getDaf());\r\n }\r\n\r\n return daf.getMasechtaTransliterated() + ' ' + daf.getDaf();\r\n }\r\n\r\n /**\r\n * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.\r\n *
    \r\n *
  • Single digit numbers such as 3, 30 and 100 will be returned with a ׳ (Geresh) appended as at the end. For example ג׳,\r\n * ל׳ and ק׳
  • \r\n *
  • multi digit numbers such as 21 and 769 will be returned with a ״ (Gershayim) between the second to last and last letters. For\r\n * example כ״א, תשכ״ט
  • \r\n *
  • 15 and 16 will be returned as ט״ו and ט״ז
  • \r\n *
  • Single digit numbers (years assumed) such as 6000 (%1000=0) will be returned as ו׳\r\n * אלפים
  • \r\n *
  • 0 will return אפס
  • \r\n *
\r\n *\r\n * @param num\r\n * the number to be formatted. It will trow an IllegalArgumentException if the number is < 0 or > 9999.\r\n * @return the Hebrew formatted number such as תשכ״ט\r\n * @see #isUseFinalFormLetters()\r\n * @see #isUseGershGershayim()\r\n * @see #isHebrewFormat()\r\n *\r\n */\r\n public formatHebrewNumber(num: number): string {\r\n if (num !== Math.trunc(num)) throw new IllegalArgumentException('number must be an integer.');\r\n\r\n if (num < 0) {\r\n throw new IllegalArgumentException('negative numbers can\\'t be formatted');\r\n } else if (num > 9999) {\r\n throw new IllegalArgumentException('numbers > 9999 can\\'t be formatted');\r\n }\r\n\r\n const ALAFIM: string = '\\u05D0\\u05DC\\u05E4\\u05D9\\u05DD';\r\n const EFES: string = '\\u05D0\\u05E4\\u05E1';\r\n\r\n const jHundreds: string[] = ['', '\\u05E7', '\\u05E8', '\\u05E9', '\\u05EA', '\\u05EA\\u05E7', '\\u05EA\\u05E8',\r\n '\\u05EA\\u05E9', '\\u05EA\\u05EA', '\\u05EA\\u05EA\\u05E7'];\r\n const jTens: string[] = ['', '\\u05D9', '\\u05DB', '\\u05DC', '\\u05DE', '\\u05E0', '\\u05E1', '\\u05E2',\r\n '\\u05E4', '\\u05E6'];\r\n const jTenEnds: string[] = ['', '\\u05D9', '\\u05DA', '\\u05DC', '\\u05DD', '\\u05DF', '\\u05E1', '\\u05E2',\r\n '\\u05E3', '\\u05E5'];\r\n const tavTaz: string[] = ['\\u05D8\\u05D5', '\\u05D8\\u05D6'];\r\n const jOnes: string[] = ['', '\\u05D0', '\\u05D1', '\\u05D2', '\\u05D3', '\\u05D4', '\\u05D5', '\\u05D6',\r\n '\\u05D7', '\\u05D8'];\r\n\r\n if (num === 0) { // do we really need this? Should it be applicable to a date?\r\n return EFES;\r\n }\r\n const shortNumber: number = num % 1000; // discard thousands\r\n // next check for all possible single Hebrew digit years\r\n const singleDigitNumber: boolean = (shortNumber < 11 || (shortNumber < 100 && shortNumber % 10 === 0) || (shortNumber <= 400 && shortNumber % 100 === 0));\r\n const thousands: number = Math.trunc(num / 1000); // get # thousands\r\n let sb: string = '';\r\n // append thousands to String\r\n if (num % 1000 === 0) { // in year is 5000, 4000 etc\r\n sb = sb.concat(jOnes[thousands]);\r\n if (this.isUseGershGershayim()) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH);\r\n }\r\n sb = sb.concat(' ');\r\n sb = sb.concat(ALAFIM); // add # of thousands plus word thousand (overide alafim boolean)\r\n return sb;\r\n } else if (this.useLonghebrewYears && num >= 1000) { // if alafim boolean display thousands\r\n sb = sb.concat(jOnes[thousands]);\r\n if (this.isUseGershGershayim()) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH); // append thousands quote\r\n }\r\n sb = sb.concat(' ');\r\n }\r\n num = num % 1000; // remove 1000s\r\n const hundreds: number = Math.trunc(num / 100); // # of hundreds\r\n sb = sb.concat(jHundreds[hundreds]); // add hundreds to String\r\n num = num % 100; // remove 100s\r\n if (num === 15) { // special case 15\r\n sb = sb.concat(tavTaz[0]);\r\n } else if (num === 16) { // special case 16\r\n sb = sb.concat(tavTaz[1]);\r\n } else {\r\n const tens: number = Math.trunc(num / 10);\r\n if (num % 10 === 0) { // if evenly divisable by 10\r\n if (!singleDigitNumber) {\r\n if (this.isUseFinalFormLetters()) {\r\n sb = sb.concat(jTenEnds[tens]); // years like 5780 will end with a final form ף\r\n } else {\r\n sb = sb.concat(jTens[tens]); // years like 5780 will end with a regular פ\r\n }\r\n } else {\r\n sb = sb.concat(jTens[tens]); // standard letters so years like 5050 will end with a regular nun\r\n }\r\n } else {\r\n sb = sb.concat(jTens[tens]);\r\n num = num % 10;\r\n sb = sb.concat(jOnes[num]);\r\n }\r\n }\r\n if (this.isUseGershGershayim()) {\r\n if (singleDigitNumber) {\r\n sb = sb.concat(HebrewDateFormatter.GERESH); // append single quote\r\n } else { // append double quote before last digit\r\n sb = sb.substr(0, sb.length - 1)\r\n .concat(HebrewDateFormatter.GERSHAYIM)\r\n .concat(sb.substr(sb.length - 1, 1));\r\n }\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Returns the list of transliterated parshiyos used by this formatter.\r\n *\r\n * @return the list of transliterated Parshios\r\n */\r\n public getTransliteratedParshiosList(): Record {\r\n return this.transliteratedParshaMap;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of parshiyos transliterated into into Latin chars. The\r\n * default uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedParshaMap\r\n * the transliterated Parshios as an EnumMap to set\r\n * @see #getTransliteratedParshiosList()\r\n */\r\n public setTransliteratedParshiosList(transliteratedParshaMap: Record): void {\r\n this.transliteratedParshaMap = transliteratedParshaMap;\r\n }\r\n\r\n /**\r\n * Returns a String with the name of the current parsha(ios). If the formatter is set to format in Hebrew, returns\r\n * a string of the current parsha(ios) in Hebrew for example בראשית or\r\n * נצבים וילך or an empty string if\r\n * are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin chars. The\r\n * default uses Ashkenazi pronunciation in typical American English spelling, for example Bereshis or\r\n * Nitzavim Vayeilech or an empty string if there are none.\r\n *\r\n * @param jewishCalendar the JewishCalendar Object\r\n * @return today's parsha(ios) in Hebrew for example, if the formatter is set to format in Hebrew, returns a string\r\n * of the current parsha(ios) in Hebrew for example בראשית or\r\n * נצבים וילך or an empty string if\r\n * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin\r\n * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example\r\n * Bereshis or Nitzavim Vayeilech or an empty string if there are none.\r\n */\r\n public formatParsha(jewishCalendarOrParsha: JewishCalendar|Parsha): string {\r\n if (jewishCalendarOrParsha instanceof JewishCalendar) {\r\n const parsha: Parsha = jewishCalendarOrParsha.getParshah();\r\n return this.formatParsha(parsha)\r\n } else {\r\n return this.hebrewFormat\r\n ? this.hebrewParshaMap[jewishCalendarOrParsha] || ''\r\n : this.transliteratedParshaMap[jewishCalendarOrParsha] || '';\r\n }\r\n }\r\n\r\n /**\r\n * Returns a String with the name of the current special parsha of Shekalim, Zachor, Parah or Hachodesh or an\r\n * empty String for a non-special parsha. If the formatter is set to format in Hebrew, it returns a string of\r\n * the current special parsha in Hebrew, for example שקלים,\r\n * זכור, פרה or החדש. An empty\r\n * string if the date is not a special parsha. If not set to Hebrew, it returns a string of the special parsha\r\n * transliterated into Latin chars. The default uses Ashkenazi pronunciation in typical American English spelling\r\n * Shekalim, Zachor, Parah or Hachodesh.\r\n *\r\n * @param jewishCalendar the JewishCalendar Object\r\n * @return today's special parsha. If the formatter is set to format in Hebrew, returns a string\r\n * of the current special parsha in Hebrew for in the format of שקלים,\r\n * זכור, פרה or החדש or an empty\r\n * string if there are none. If not set to Hebrew, it returns a string of the special parsha transliterated\r\n * into Latin chars. The default uses Ashkenazi pronunciation in typical American English spelling of Shekalim,\r\n * Zachor, Parah or Hachodesh. An empty string if there are none.\r\n */\r\n public formatSpecialParsha(jewishCalendar: JewishCalendar): string {\r\n const specialParsha: Parsha = jewishCalendar.getSpecialShabbos();\r\n return this.hebrewFormat\r\n ? this.hebrewParshaMap[specialParsha] || ''\r\n : this.transliteratedParshaMap[specialParsha] || '';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\nimport _Big from 'big.js';\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from './ComplexZmanimCalendar.ts';\r\nimport { JsonOutput, ZmanimFormatter } from './util/ZmanimFormatter.ts';\r\nimport { rangeDates } from './hebrewcalendar/JewishDate.ts';\r\n\r\nexport function getZmanimJson(options: Options): JsonOutput {\r\n const geoLocation: GeoLocation = new GeoLocation(options.locationName || null, options.latitude, options.longitude,\r\n options.elevation || 0, options.timeZoneId);\r\n\r\n const zmanimCalendar: ZmanimCalendar = options.complexZmanim\r\n ? new ComplexZmanimCalendar(geoLocation)\r\n : new ZmanimCalendar(geoLocation);\r\n\r\n zmanimCalendar.setDate(options.date || Temporal.Now.plainDateISO());\r\n return ZmanimFormatter.toJSON(zmanimCalendar);\r\n}\r\n\r\nexport interface Options {\r\n /**\r\n * @default Current date and time\r\n */\r\n date?: Date | string | number | Temporal.PlainDate;\r\n /**\r\n * IANA timezone ID\r\n */\r\n timeZoneId: string;\r\n locationName?: string;\r\n latitude: number;\r\n longitude: number;\r\n /**\r\n * @default 0\r\n */\r\n elevation?: number;\r\n /**\r\n * Whether to use `ComplexZmanimCalendar` instead of `ZmanimCalendar`\r\n * @default false\r\n */\r\n complexZmanim?: boolean;\r\n}\r\n\r\nconst temporalExtended = { rangeDates };\r\n\r\nexport * from './util/Time.ts';\r\nexport * from './util/GeoLocation.ts';\r\nexport * from './util/GeoLocationUtils.ts';\r\nexport * from './util/Zman.ts';\r\nexport * from './polyfills/Utils.ts';\r\n\r\nexport * from './util/NOAACalculator.ts';\r\nexport * from './util/SunTimesCalculator.ts';\r\n\r\nexport * from './AstronomicalCalendar.ts';\r\nexport * from './ZmanimCalendar.ts';\r\nexport * from './ComplexZmanimCalendar.ts';\r\n\r\nexport { JewishDate } from './hebrewcalendar/JewishDate.ts';\r\nexport * from './hebrewcalendar/JewishCalendar.ts';\r\nexport * from './hebrewcalendar/TefilaRules.ts';\r\n\r\n//export * from './hebrewcalendar/Daf';\r\nexport * from './hebrewcalendar/limud/YomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/YerushalmiYomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/ChafetzChayimYomiCalculator.ts';\r\nexport * from './hebrewcalendar/limud/Hiloulah.ts'\r\nexport { default as TehilimYomi } from './hebrewcalendar/limud/TehilimYomi.ts';\r\nexport { default as Haftara } from './hebrewcalendar/limud/HaftarahShvui.ts'\r\n\r\nexport * from './hebrewcalendar/HebrewDateFormatter.ts';\r\nexport * from './util/ZmanimFormatter.ts';\r\n\r\nexport { _Big, Temporal, temporalExtended };"], + "mappings": "AAAA,SAASA,GAAUC,EAAGC,EAAGC,EAAGC,EAAGC,EAAG,CAChC,OAAOC,GAAYJ,EAAGK,GAAeN,EAAGC,CAAC,EAAGC,EAAGC,EAAGC,CAAC,CACrD,CAEA,SAASC,GAAYL,EAAGC,EAAGC,EAAGC,EAAGC,EAAGG,EAAG,CACrC,IAAMC,EAAIC,GAAYR,EAAGC,EAAGC,CAAC,EAC7B,GAAIC,GAAKH,IAAMO,EACb,MAAM,IAAI,WAAWE,GAAiBV,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8CACrD,uCAAwC,2BAA4B,6CACpE,oDAAqD,uCAAwC,2BAC7F,0DAA0D,EA1BvD,IAAMV,GAANU,GCxIP,IAAAG,GAAA,CACI,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2GACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,8FACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2DACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,4JACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,yFACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sCACb,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,YACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,OACf,CACJ,EC9lEA,IAAAC,GAAA,CACI,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,iHACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2GACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,8FACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,2DACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,4JACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,yFACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,iCACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,2BACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sCACb,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,MACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,UACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,YACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,aACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,+CACT,QAAW,OACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,SACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,MACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,sEACT,QAAW,WACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAAS,6CACT,QAAW,KACf,EACA,CACI,KAAQ,CACJ,CACI,IAAO,EACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,EACA,CACI,IAAO,GACP,UAAa,KACjB,CACJ,EACA,MAA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jCA,GAwYa,eAA2B,CAAC,wCAAyC,qBAC3F,uEACA,wCAAyC,0DACzC,uCACA,6EACA,8CAA+C,wCAC/C,iEACA,8CAA+C,oDAC/C,uEACA,oDAAqD,oDACrD,iCACA,mFACA,0DACA,0DACA,oDAAqD,oDACrD,iCAAkC,oDAClC,8CAA+C,0DAC/C,iCAAkC,0DAClC,oDAAqD,8CACrD,oDACA,gEACA,gEACA,gEACA,oDACA,6EACA,uCAAuC,EAja9BA,GAikBa,iBAA6B,CAAC,iCAAkC,qBACtF,iCAAkC,iCAAkC,iCACpE,qBAAsB,oBAAoB,EAnkBvC,IAAMuD,GAANvD,GClBA,SAASwD,GAAcC,EAA8B,CAC1D,IAAMC,EAA2B,IAAIC,GAAYF,EAAQ,cAAgB,KAAMA,EAAQ,SAAUA,EAAQ,UACvGA,EAAQ,WAAa,EAAGA,EAAQ,UAAU,EAEtCG,EAAiCH,EAAQ,cAC3C,IAAII,GAAsBH,CAAW,EACrC,IAAII,GAAeJ,CAAW,EAElC,OAAAE,EAAe,QAAQH,EAAQ,MAAQM,EAAS,IAAI,aAAa,CAAC,EAC3DC,GAAgB,OAAOJ,CAAc,CAC9C,CAyBA,IAAMK,GAAmB,CAAE,WAAAC,EAAW", "names": ["clampProp", "e", "n", "t", "o", "r", "clampEntity", "getDefinedProp", "i", "a", "clampNumber", "numberOutOfRange", "missingField", "z", "Jn", "D", "p", "T", "O", "h", "zipProps", "b", "remapProps", "Vn", "V", "nn", "C", "allPropsEqual", "zeroOutProps", "E", "capitalize", "sortStrings", "padNumber", "compareNumbers", "divModFloor", "modFloor", "divModTrunc", "divTrunc", "modTrunc", "hasHalf", "givenFieldsToBigNano", "Xr", "s", "Qr", "c", "u", "nanoToGivenFields", "un", "X", "si", "cn", "li", "ln", "l", "m", "S", "d", "requireNumberIsPositive", "requireNumberIsInteger", "Mi", "on", "requirePropDefined", "de", "hr", "requireType", "invalidEntity", "expectedInteger", "expectedPositive", "toString", "pr", "toStringViaPrimitive", "toBigInt", "invalidBigInt", "toNumber", "forbiddenBigIntToNumber", "expectedFinite", "toInteger", "toStrictInteger", "toPositiveInteger", "createBigNano", "addBigNanos", "moveBigNano", "re", "te", "bigNanoOutside", "bigIntToBigNano", "he", "bigNanoToBigInt", "oe", "divModBigNano", "hashIntlFormatParts", "checkIsoYearMonthInBounds", "Li", "Ai", "checkIsoDateInBounds", "checkIsoDateTimeInBounds", "Dt", "checkEpochNanoInBounds", "isoToEpochNano", "Ui", "qi", "Cr", "isoTimeFieldsToNano", "j", "nanoToIsoTimeAndDay", "epochNanoToSec", "epochNanoToSecMod", "_r", "isoToEpochMilli", "isoArgsToEpochMilli", "Gr", "be", "Vr", "isoToEpochNanoWithOffset", "isoArgsToEpochSec", "Hr", "isoToLegacyDate", "Ie", "epochMilliToIso", "zi", "wi", "computeIsoDateParts", "computeIsoMonthsInYear", "xi", "computeIsoDaysInMonth", "computeIsoInLeapYear", "computeIsoDaysInYear", "computeIsoDayOfWeek", "computeGregoryEraParts", "computeJapaneseEraParts", "$i", "La", "Ti", "parseIntlYear", "checkIsoDateTimeFields", "checkIsoDateFields", "constrainIsoTimeFields", "constrainIsoDateFields", "isIsoDateFieldsValid", "Oi", "H", "ua", "wn", "normalizeOptions", "la", "fa", "ve", "_t", "sa", "refineDiffOptions", "parseRoundingIncInteger", "ha", "aa", "checkLargestSmallestUnit", "refineRoundingInc", "refineRoundingOptions", "normalizeOptionsOrString", "Hi", "refineDateDisplayOptions", "da", "refineTimeDisplayOptions", "refineTimeDisplayTuple", "refineSubsecDigits", "refineSmallestUnitAndSubsecDigits", "_i", "Ji", "U", "overrideOverflowOptions", "Xi", "refineUnitOption", "$r", "Ei", "invalidChoice", "Et", "refineChoiceOption", "Ar", "_", "Oe", "Yn", "Te", "ee", "We", "Yi", "v", "J", "createPlainYearMonthSlots", "L", "createPlainMonthDaySlots", "q", "Ge", "xe", "ki", "Vt", "qt", "computeDurationSign", "Ni", "M", "y", "N", "B", "extractEpochNano", "I", "isIdLikeEqual", "Ut", "getMaxDurationUnit", "Vi", "Ki", "ca", "isUniformUnit", "totalDayTimeDuration", "zr", "createMarkerSystem", "f", "createMarkerToEpochNano", "createMoveMarker", "createDiffMarkers", "clampRelativeDuration", "bi", "computeEpochNanoFrac", "F", "durationFieldsToBigNano", "vr", "ce", "roundBigNano", "Pn", "fn", "we", "roundWithMode", "computeDayInterval", "getMatchingInstantFor", "roundDateTime", "dt", "Ee", "roundTimeToNano", "computeNanoInc", "dn", "Kr", "Cn", "computeDayFloor", "roundDateTimeToNano", "moveByDays", "roundByInc", "roundToMinute", "Jr", "Ci", "roundDayTimeDurationByInc", "nanoToDurationDayTimeFields", "roundBigNanoByInc", "roundRelativeDuration", "isZonedEpochSlots", "nudgeZonedTimeDuration", "nudgeDayTimeDuration", "nudgeRelativeDuration", "ga", "Fi", "g", "nanoToDurationTimeFields", "me", "formatIsoDateTimeFields", "Fe", "Ta", "In", "pa", "ma", "formatCalendar", "Tt", "yt", "formatIsoDateFields", "et", "formatDateLikeIso", "formatIsoYearMonthFields", "W", "formatIsoMonthDayFields", "qe", "formatIsoTimeFields", "zt", "negateDurationFields", "checkDurationTimeUnit", "formatSubsecNano", "formatDurationFragments", "formatDurationNumber", "formatCalendarId", "xr", "getSignStr", "Na", "_zonedEpochSlotsToIso", "mn", "kr", "Yr", "ne", "ae", "wr", "Br", "se", "durationHasDateParts", "qr", "hn", "moveZonedEpochs", "ct", "moveDateTime", "bt", "moveDate", "Qe", "moveToDayOfMonthUnsafe", "xt", "Si", "Ye", "moveTime", "diffZonedEpochsExact", "diffDateTimesExact", "Wt", "checkDurationUnits", "Gt", "Ur", "Rt", "Jt", "Rr", "vi", "ya", "Zr", "Pi", "createSplitTuple", "computePeriod", "Da", "pe", "parseDateTimeLike", "failedParse", "parseOffsetNano", "parseOffsetNanoMaybe", "Xt", "finalizeZonedDateTime", "finalizeDate", "Mn", "Ct", "finalizeDateTime", "At", "ot", "parseYearMonthOnly", "requireIsoCalendar", "invalidSubstring", "Q", "parseMonthDayOnly", "ze", "Ca", "organizeAnnotationParts", "organizeTimeParts", "Kt", "za", "parseUnit", "parseSubsecNano", "noValidFields", "parseSign", "sn", "Ne", "ye", "ie", "an", "resolveSlotsCalendar", "Ya", "organizeIsoYearParts", "Ba", "ka", "ji", "Za", "parseInt0", "Ra", "createRegExp", "Me", "getTimeZoneEssence", "Ua", "br", "getTimeZoneAtomic", "qa", "Ze", "yn", "$t", "gt", "rt", "He", "ue", "gn", "je", "ft", "It", "$e", "x", "Ve", "le", "diffEpochNanos", "Dn", "getCommonCalendarSlot", "Fr", "diffZonedEpochsBig", "ut", "diffDateTimesBig", "Ft", "diffDateLike", "Xe", "Ae", "diffTimes", "diffEpochNanosExact", "updateMid", "diffDays", "diffEpochMilliByDay", "Er", "createIntlCalendar", "epochMilliToIntlFields", "computeCalendarIdBase", "createIntlFieldCache", "createIntlYearDataCache", "Wi", "Wr", "parseIntlPartsYear", "Di", "eraYearToYear", "computeIntlDateParts", "computeIntlEpochMilli", "computeIntlLeapMonth", "queryMonthStrings", "getCalendarLeapMonthMeta", "computeIntlDaysInYear", "computeIntlDaysInMonth", "computeIntlMonthsInYear", "rn", "gi", "invalidCalendar", "computeNativeWeekOfYear", "computeNativeYearOfWeek", "computeNativeDayOfYear", "parseMonthCode", "Wa", "invalidMonthCode", "monthCodeNumberToMonth", "monthToMonthCodeNumber", "getCalendarEraOrigins", "getCalendarIdBase", "Ii", "Qt", "refineCalendarFields", "en", "ri", "refineTimeBag", "jn", "ti", "Pt", "w", "Yt", "nt", "fi", "K", "Ue", "refineFields", "ei", "Ht", "duplicateFields", "tn", "Ga", "hi", "Ha", "Sn", "mergeCalendarFields", "oi", "ni", "at", "Zt", "Ke", "k", "Be", "kt", "convertToPlainMonthDay", "pi", "convertToPlainYearMonth", "di", "convertToIso", "refineYear", "Dr", "gr", "invalidEra", "Ir", "missingYear", "refineMonth", "Pr", "Mr", "Nr", "refineDay", "spliceFields", "Se", "vn", "pt", "Nt", "tt", "G", "ke", "Lt", "fe", "Zn", "ht", "Bt", "bn", "Fn", "Re", "mt", "St", "Ot", "vt", "wt", "jt", "Mt", "_e", "R", "Je", "Le", "De", "Pe", "Ce", "ge", "pn", "Tn", "getPreferredCalendarSlot", "lt", "st", "it", "On", "createNativeOpsCreator", "Aa", "createOptionsTransformer", "qn", "Ns", "toEpochMillis", "Lr", "En", "An", "Bn", "Nn", "ys", "Z", "A", "P", "yr", "Ln", "kn", "jr", "ii", "ai", "ci", "ui", "mi", "$", "yi", "Zi", "Ri", "Gi", "Qi", "ea", "na", "ta", "oa", "ra", "ia", "Ia", "Ma", "IntlTimeZone", "FixedTimeZone", "getOffsetSec", "pinch", "Pa", "va", "Ea", "Sa", "Fa", "ba", "Oa", "wa", "ja", "xa", "$a", "Va", "_a", "Ja", "computeWeekShift", "computeWeeksInYear", "Ka", "Y", "Qa", "Xa", "es", "ns", "ts", "os", "rs", "is", "as", "ss", "cs", "us", "ls", "fs", "ds", "ms", "ps", "hs", "gs", "Ts", "Ds", "Is", "Ms", "createSlotClass", "e", "t", "n", "o", "r", "Class", "P", "oo", "bindMethod", "getSpecificSlots", "D", "no", "O", "T", "p", "h", "createProtocolValidator", "C", "g", "rejectInvalidBag", "Z", "createCalendarFieldMethods", "a", "i", "J", "toPlainDateSlots", "createCalendarGetters", "Y", "co", "neverValueOf", "A", "createCalendarFromSlots", "lr", "toPlainMonthDaySlots", "U", "z", "q", "H", "extractCalendarSlotFromBag", "K", "Qo", "X", "Q", "getOffsetNanosecondsForAdapter", "Co", "_", "ae", "u", "createAdapterOps", "ho", "E", "$", "createTimeZoneOps", "ie", "createTimeZoneOffsetOps", "Do", "toInstantSlots", "Oe", "Te", "pe", "getImplTransition", "e", "t", "n", "o", "toInstantSlots", "Co", "_", "refineTimeZoneSlot", "z", "no", "Fo", "ye", "Ne", "m", "toPlainTimeSlots", "xe", "H", "We", "Ge", "Te", "Re", "createTimeZoneOffsetOps", "Ue", "ze", "optionalToPlainTimeFields", "toPlainYearMonthSlots", "U", "L", "nt", "Ho", "getCalendarSlotFromBag", "ot", "Y", "toPlainDateTimeSlots", "J", "ee", "Dt", "ht", "Pt", "Ko", "Ct", "toPlainDateSlots", "v", "Bt", "Yt", "At", "dayAdapter", "d", "Yo", "createCompoundOpsCreator", "r", "E", "toDurationSlots", "qt", "Ht", "Kt", "refinePublicRelativeTo", "Qt", "createTimeZoneOps", "Xt", "extractCalendarSlotFromBag", "X", "refineCalendarSlot", "cr", "an", "sn", "toZonedDateTimeSlots", "wn", "jn", "Mn", "adaptDateMethods", "T", "slotsToIso", "fn", "createDateTimeFormatClass", "En", "DateTimeFormat", "Or", "a", "Vn", "i", "Jn", "createFormatPrepperForBranding", "prepFormat", "kn", "createFormatMethod", "createProxiedMethod", "xn", "Ln", "qn", "Rn", "Wn", "s", "Gn", "Un", "zn", "Hn", "Kn", "Qn", "l", "c", "u", "f", "Xn", "$n", "_n", "S", "eo", "to", "oo", "ro", "createCalendarFieldMethods", "q", "ao", "createCalendarGetters", "io", "so", "lo", "I", "co", "uo", "b", "F", "fo", "j", "w", "mo", "M", "y", "N", "B", "So", "V", "Oo", "To", "po", "createSlotClass", "G", "createCalendarFromSlots", "k", "_o", "rejectInvalidBag", "x", "toPlainMonthDaySlots", "R", "$o", "W", "neverValueOf", "ho", "getOffsetNanosecondsForAdapter", "No", "go", "te", "ne", "oe", "re", "Do", "Po", "Oe", "Se", "se", "ar", "le", "ce", "ue", "de", "dr", "fe", "me", "De", "Pe", "Ce", "ge", "Ze", "Zo", "bo", "Me", "ie", "createAdapterOps", "Fe", "Ie", "ve", "we", "je", "createProtocolValidator", "Io", "vo", "ke", "Be", "Ye", "Ae", "Ee", "Ve", "Je", "Le", "qe", "He", "wo", "jo", "Mo", "tt", "Ke", "Xo", "Qe", "nr", "Xe", "or", "$e", "_e", "et", "rt", "yo", "pt", "at", "it", "st", "lt", "ct", "er", "ut", "tr", "dt", "ft", "mt", "St", "Ot", "Qo", "Tt", "gt", "Bo", "Ao", "Nt", "Zt", "bt", "Ft", "It", "vt", "wt", "jt", "Mt", "yt", "Eo", "Vo", "Jo", "Lo", "qo", "ko", "xo", "Ro", "Wo", "Vt", "Go", "ir", "Et", "Uo", "zo", "rr", "Lt", "Jt", "kt", "xt", "Rt", "Wt", "Gt", "Ut", "zt", "$t", "sr", "_t", "ln", "un", "K", "cn", "en", "tn", "nn", "on", "lr", "rn", "ur", "vn", "dn", "mn", "Sn", "On", "Tn", "pn", "hn", "Dn", "Pn", "Cn", "gn", "Zn", "bn", "Fn", "In", "yn", "fr", "h", "p", "Nn", "Bn", "Yn", "An", "mr", "Sr", "Tr", "DP", "RM", "MAX_DP", "MAX_POWER", "NE", "PE", "STRICT", "NAME", "INVALID", "INVALID_DP", "INVALID_RM", "DIV_BY_ZERO", "P", "UNDEFINED", "NUMERIC", "_Big_", "Big", "n", "x", "parse", "e", "i", "nl", "round", "sd", "rm", "more", "xc", "stringify", "doExponential", "isNonzero", "s", "y", "isneg", "yc", "j", "k", "l", "a", "b", "dp", "bl", "bt", "cmp", "ri", "bz", "ai", "al", "r", "rl", "q", "qc", "qi", "p", "t", "xlty", "xe", "ye", "ygtx", "one", "c", "half", "big_default", "Utils", "getAllMethodNames", "obj", "excludeContructors", "_obj", "methods", "key", "value", "TimeZone", "getRawOffset", "timeZoneId", "timeZone", "mr", "msCount", "monthDay", "instant", "getDisplayName", "part", "getDSTSavings", "plainMonthDay", "getOffset", "millisSinceEpoch", "Calendar", "MathUtils", "degreesToRadians", "degrees", "radiansToDegrees", "radians", "StringUtils", "compareTo", "string1", "string2", "k", "IntegerUtils", "compare", "x", "y", "Long_MIN_VALUE", "padZeros", "num", "places", "int", "BaseCustomError", "message", "NullPointerException", "IllegalArgumentException", "UnsupportedError", "_GeoLocation", "name", "latitude", "longitude", "elevationOrTimeZoneId", "timeZoneId", "elevation", "IllegalArgumentException", "degreesOrLatitude", "minutes", "seconds", "direction", "tempLat", "degreesOrLongitude", "longTemp", "TimeZone", "localHoursOffset", "location", "formula", "b", "f", "L", "MathUtils", "U1", "U2", "sinU1", "cosU1", "sinU2", "cosU2", "lambda", "lambdaP", "iterLimit", "sinLambda", "cosLambda", "sinSigma", "cosSigma", "sigma", "sinAlpha", "cosSqAlpha", "cos2SigmaM", "C", "uSq", "A", "B", "deltaSigma", "distance", "fwdAz", "revAz", "dLon", "dPhi", "dLat", "q", "UnsupportedError", "object", "geo", "mr", "GeoLocation", "_AstronomicalCalculator", "earthRadius", "UnsupportedError", "elevation", "MathUtils", "zenith", "adjustedZenith", "refraction", "solarRadius", "object", "AstronomicalCalculator", "_NOAACalculator", "AstronomicalCalculator", "date", "geoLocation", "zenith", "adjustForElevation", "elevation", "adjustedZenith", "sunrise", "sunset", "year", "month", "day", "a", "b", "julianDay", "julianCenturies", "longitude", "m", "mrad", "MathUtils", "sinm", "sin2m", "sin3m", "sunLongitude", "center", "sunTrueLongitude", "omega", "obliquityOfEcliptic", "obliquityCorrection", "lambda", "sint", "epsilon", "geomMeanLongSun", "eccentricityEarthOrbit", "geomMeanAnomalySun", "y", "sin2l0", "cos2l0", "sin4l0", "equationOfTime", "lat", "solarDec", "solarEvent", "latRad", "sdRad", "hourAngle", "calendar", "noon", "tnoon", "eqTime", "solNoonUTC", "newt", "latitude", "noonmin", "delta", "timeDiff", "timeUTC", "NOAACalculator", "_AstronomicalCalendar", "sunrise", "sunset", "offsetZenith", "dawn", "geoLocation", "mr", "NOAACalculator", "zenith", "startOfday", "endOfDay", "intValue", "_a", "clonedCal", "startOfDay", "IllegalArgumentException", "temporalHour", "offsetTime", "index", "noon", "cal", "lowerGeoLocation", "lowerMeridian", "time", "solarEvent", "calculatedTime", "hours", "minutes", "seconds", "milliseconds", "microseconds", "localTimeHours", "offsetByDegrees", "offsetByTime", "degrees", "Big", "incrementor", "rawOffsetHours", "TimeZone", "offset", "UnsupportedError", "object", "aCal", "astronomicalCalculator", "date", "clonedCalendar", "AstronomicalCalendar", "_JewishDate", "moladHours", "moladMinutes", "moladChalakim", "month", "year", "absDate", "dayOfMonth", "m", "chalakimSince", "moladDay", "moladParts", "roshHashanaDay", "monthOfYear", "monthsElapsed", "hebrewCalendar", "hours", "minutes", "chalakim", "IllegalArgumentException", "mr", "fixedMonth", "moladDate", "adjustedChalakim", "jewishYearOrPlainDateOrDateOrMolad", "jewishMonth", "jewishDayOfMonth", "molad", "conjunctionDay", "conjunctionParts", "date", "transliteratedMonths", "formattedMonth", "field", "amount", "Calendar", "object", "jewishDate", "hebCal", "cutOffNum", "dayOfWeek", "clone", "JewishDate", "rangeDates", "start", "middle", "end", "inclusive", "acceptedValues", "Daf", "masechtaNumber", "daf", "_YomiCalculator", "calendar", "blattPerMasechta", "date", "dafYomi", "julianDay", "cycleNo", "dafNo", "mr", "IllegalArgumentException", "total", "masechta", "blatt", "blattInMasechta", "DafBavliYomi", "year", "month", "day", "a", "b", "Calendar", "YomiCalculator", "_DafBavliYomi", "Daf", "masechtosBavliTransliterated", "_YerushalmiYomiCalculator", "jewishCalendar", "nextCycle", "prevCycle", "requested", "masechta", "dafYomi", "hebrewDate", "JewishDate", "mr", "IllegalArgumentException", "dafNo", "specialDays", "total", "i", "DafYomiYerushalmi", "start", "end", "jewishStartYear", "jewishEndYear", "yomKippur", "tishaBeav", "rangeDates", "Calendar", "YerushalmiYomiCalculator", "_DafYomiYerushalmi", "Daf", "masechtosYerushalmiTransliterated", "ccy_nonleap_default", "ccy_leap_default", "ChafetzChayimYomiCalculator", "jewishCalendar", "hebrewDateToday", "ccy_leap_default", "ccy_nonleap_default", "limud", "dateObj", "FRIDAY", "SATURDAY", "Calendar", "Parsha", "_JewishCalendar", "JewishDate", "jewishYearOrDateTimeOrDate", "jewishMonth", "jewishDayOfMonth", "inIsrael", "useModernHolidays", "isMukafChoma", "elapsedDays", "roshHashanah", "yearType", "day", "clone", "daysToShabbos", "dayOfWeek", "holidayIndex", "yamimTovimAssurBemelacha", "erevYomTov", "month", "taaniyos", "omer", "molad", "locationName", "latitude", "longitude", "yerushalayimStandardTZ", "geo", "GeoLocation", "moladSeconds", "milliseconds", "mr", "YomiCalculator", "YerushalmiYomiCalculator", "ChafetzChayimYomiCalculator", "days", "solar", "jewishCalendar", "JewishCalendar", "_ZmanimCalendar", "AstronomicalCalendar", "useElevation", "useAstronomicalChatzos", "useAstronomicalChatzosForOtherZmanim", "_a", "halfDayChatzos", "startOfDay", "endOfDay", "IllegalArgumentException", "candleLightingOffset", "currentTime", "tzais", "inIsrael", "jewishCalendar", "JewishCalendar", "date", "sunset", "NullPointerException", "hours", "shaahZmanis", "tweakDuration", "mr", "startOfHalfDay", "endOfHalfDay", "intValue", "duration", "degrees", "seaLevelSunrise", "seaLevelSunset", "twilight", "Long_MIN_VALUE", "riseSetToTwilight", "ZmanimCalendar", "rZTDsort", "a", "b", "mr", "_ComplexZmanimCalendar", "ZmanimCalendar", "_a", "chatzos", "diff", "_b", "distance", "alos19Point8", "sunrise", "inverseOfSunriseToAlot", "ateretTorahSunsetOffset", "minutes", "hours", "shaahZmanis", "alos", "tzais", "jewishCalendar", "JewishCalendar", "moladBasedTime", "techila", "lastMidnight", "midnightTonight", "zman", "Calendar", "molad", "startOfHalfDay", "endOfHalfDay", "ComplexZmanimCalendar", "_Time", "hoursOrMillis", "minutes", "seconds", "milliseconds", "adjustedMillis", "isNegative", "hours", "UnsupportedError", "Time", "Zman", "dateOrDuration", "label", "mr", "zman1", "zman2", "times", "zman", "StringUtils", "IntegerUtils", "methodBlacklist", "methodWhitelist", "_ZmanimFormatter", "formatOrTimeZone", "dateFormat", "timeZoneId", "format", "prependZeroHours", "useSeconds", "useMillis", "timeOrMillis", "time", "Time", "sb", "padZeros", "dateTime", "digits", "dd", "duration", "num", "UnsupportedError", "astronomicalCalendar", "json", "key", "ComplexZmanimCalendar", "ZmanimCalendar", "AstronomicalCalendar", "TimeZone", "formatter", "dateList", "durationList", "otherList", "Utils", "method", "includeMethod", "methodObj", "mr", "tagName", "zman", "Zman", "ZmanimFormatter", "methodWhitelist", "methodBlacklist", "_GeoLocationUtils", "location", "destination", "formula", "b", "f", "L", "MathUtils", "U1", "U2", "sinU1", "cosU1", "sinU2", "cosU2", "lambda", "lambdaP", "iterLimit", "sinLambda", "cosLambda", "sinSigma", "cosSigma", "sigma", "sinAlpha", "cosSqAlpha", "cos2SigmaM", "C", "uSq", "A", "B", "deltaSigma", "distance", "fwdAz", "revAz", "dLon", "dPhi", "dLat", "q", "GeoLocationUtils", "_SunTimesCalculator", "AstronomicalCalculator", "date", "geoLocation", "zenith", "adjustForElevation", "elevation", "adjustedZenith", "deg", "MathUtils", "x", "longitude", "dayOfYear", "hoursFromMeridian", "isSunrise", "sunMeanAnomaly", "l", "sunTrueLongitude", "ra", "lQuadrant", "raQuadrant", "latitude", "sinDec", "cosDec", "localHour", "sunRightAscensionHours", "approxTimeDays", "sunTrueLong", "cosLocalHourAngle", "localHourAngle", "processedTime", "calendar", "sunrise", "sunset", "noon", "SunTimesCalculator", "SUNDAY", "FRIDAY", "SATURDAY", "Calendar", "TefilaRules", "jewishCalendar", "holidayIndex", "day", "month", "JewishDate", "JewishCalendar", "tomorrow", "startDate", "endDate", "inIsrael", "tachanunRecitedWeekOfPurim", "tachanunRecitedWeekOfHod", "tachanunRecitedEndOfTishrei", "tachanunRecitedWeekAfterShavuos", "tachanunRecitedThirteenSivanOutOfIsrael", "tachanunRecitedPesachSheni", "tachanunRecited15IyarOutOfIsrael", "tachanunRecitedMinchaErevLagBaomer", "tachanunRecitedShivasYemeiHamiluim", "tachanunRecitedFridays", "tachanunRecitedSundays", "tachanunRecitedMinchaAllYear", "mizmorLesodaRecitedErevYomKippurAndPesach", "HiloulahYomiCalculator", "dir", "jewishCalendar", "key", "en", "he", "JewishDate", "numString", "SUNDAY", "FRIDAY", "SATURDAY", "Calendar", "TehilimYomi", "jDate", "WeeklyHaftarahReading", "jCal", "specialShabbatot", "tammuz17", "JewishCalendar", "mr", "_HebrewDateFormatter", "longWeekFormat", "transliteratedShabbos", "transliteratedHolidays", "jewishCalendar", "index", "JewishCalendar", "dayOfChanukah", "formattedRoshChodesh", "month", "_jewishCalendar", "hebrewFormat", "hebrewOmerPrefix", "transliteratedMonths", "jewishDate", "dateTime", "useGershGershayim", "useFinalFormLetters", "useLongHebrewYears", "JewishDate", "omer", "moladChalakim", "adjustedChalakim", "MINUTE_CHALAKIM", "HOUR_CHALAKIM", "DAY_CHALAKIM", "days", "hours", "minutes", "jewishYear", "kviah", "roshHashanaDayOfweek", "returnValue", "pesachDayOfweek", "daf", "DafYomiYerushalmi", "num", "IllegalArgumentException", "ALAFIM", "EFES", "jHundreds", "jTens", "jTenEnds", "tavTaz", "jOnes", "shortNumber", "singleDigitNumber", "thousands", "sb", "hundreds", "tens", "transliteratedParshaMap", "jewishCalendarOrParsha", "parsha", "specialParsha", "HebrewDateFormatter", "getZmanimJson", "options", "geoLocation", "GeoLocation", "zmanimCalendar", "ComplexZmanimCalendar", "ZmanimCalendar", "mr", "ZmanimFormatter", "temporalExtended", "rangeDates"] }