@hebcal/core 5.0.6 → 5.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +171 -113
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +164 -90
- package/dist/index.mjs +164 -90
- package/hebcal.d.ts +24 -6
- package/package.json +6 -6
package/dist/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.0.
|
|
1
|
+
/*! @hebcal/core v5.0.7 */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -6866,27 +6866,68 @@ class Zmanim {
|
|
|
6866
6866
|
return this.getShaahZmanisBasedZman(4);
|
|
6867
6867
|
}
|
|
6868
6868
|
/**
|
|
6869
|
-
*
|
|
6869
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
6870
|
+
* @private
|
|
6871
|
+
* @return {any[]}
|
|
6872
|
+
*/
|
|
6873
|
+
getTemporalHour72() {
|
|
6874
|
+
const alot72 = this.sunriseOffset(-72, false, true);
|
|
6875
|
+
const tzeit72 = this.sunsetOffset(72, false, true);
|
|
6876
|
+
const temporalHour = (tzeit72 - alot72) / 12;
|
|
6877
|
+
return [alot72, temporalHour];
|
|
6878
|
+
}
|
|
6879
|
+
/**
|
|
6880
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
6881
|
+
* @private
|
|
6882
|
+
* @return {any[]}
|
|
6883
|
+
*/
|
|
6884
|
+
getTemporalHour16Point1() {
|
|
6885
|
+
const alot16one = this.alotHaShachar();
|
|
6886
|
+
const tzeit16one = this.tzeit(16.1);
|
|
6887
|
+
const temporalHour = (tzeit16one - alot16one) / 12;
|
|
6888
|
+
return [alot16one, temporalHour];
|
|
6889
|
+
}
|
|
6890
|
+
/**
|
|
6891
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
6892
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
6893
|
+
* dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
|
|
6894
|
+
* 72 minutes after sea-level sunset.
|
|
6870
6895
|
* @return {Date}
|
|
6871
6896
|
*/
|
|
6872
6897
|
sofZmanShmaMGA() {
|
|
6873
6898
|
// Magen Avraham
|
|
6874
|
-
const alot72 = this.
|
|
6875
|
-
const tzeit72 = this.sunsetOffset(72, false, true);
|
|
6876
|
-
const temporalHour = (tzeit72 - alot72) / 12; // ms in hour
|
|
6899
|
+
const [alot72, temporalHour] = this.getTemporalHour72();
|
|
6877
6900
|
return new Date(alot72.getTime() + 3 * temporalHour);
|
|
6878
6901
|
}
|
|
6902
|
+
/**
|
|
6903
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
6904
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
6905
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
6906
|
+
* @return {Date}
|
|
6907
|
+
*/
|
|
6908
|
+
sofZmanShmaMGA16Point1() {
|
|
6909
|
+
const [alot, temporalHour] = this.getTemporalHour16Point1();
|
|
6910
|
+
return new Date(alot.getTime() + 3 * temporalHour);
|
|
6911
|
+
}
|
|
6879
6912
|
/**
|
|
6880
6913
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
|
|
6881
6914
|
* @return {Date}
|
|
6882
6915
|
*/
|
|
6883
6916
|
sofZmanTfillaMGA() {
|
|
6884
6917
|
// Magen Avraham
|
|
6885
|
-
const alot72 = this.
|
|
6886
|
-
const tzeit72 = this.sunsetOffset(72, false, true);
|
|
6887
|
-
const temporalHour = (tzeit72 - alot72) / 12; // ms in hour
|
|
6918
|
+
const [alot72, temporalHour] = this.getTemporalHour72();
|
|
6888
6919
|
return new Date(alot72.getTime() + 4 * temporalHour);
|
|
6889
6920
|
}
|
|
6921
|
+
/**
|
|
6922
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
6923
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
6924
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
6925
|
+
* @return {Date}
|
|
6926
|
+
*/
|
|
6927
|
+
sofZmanTfillaMGA16Point1() {
|
|
6928
|
+
const [alot, temporalHour] = this.getTemporalHour16Point1();
|
|
6929
|
+
return new Date(alot.getTime() + 4 * temporalHour);
|
|
6930
|
+
}
|
|
6890
6931
|
/**
|
|
6891
6932
|
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours
|
|
6892
6933
|
* @return {Date}
|
|
@@ -7044,6 +7085,54 @@ class Zmanim {
|
|
|
7044
7085
|
}
|
|
7045
7086
|
}
|
|
7046
7087
|
|
|
7088
|
+
const hour12cc = {
|
|
7089
|
+
US: 1,
|
|
7090
|
+
CA: 1,
|
|
7091
|
+
BR: 1,
|
|
7092
|
+
AU: 1,
|
|
7093
|
+
NZ: 1,
|
|
7094
|
+
DO: 1,
|
|
7095
|
+
PR: 1,
|
|
7096
|
+
GR: 1,
|
|
7097
|
+
IN: 1,
|
|
7098
|
+
KR: 1,
|
|
7099
|
+
NP: 1,
|
|
7100
|
+
ZA: 1
|
|
7101
|
+
};
|
|
7102
|
+
|
|
7103
|
+
/**
|
|
7104
|
+
* @private
|
|
7105
|
+
* @param {string} timeStr - original time like "20:30"
|
|
7106
|
+
* @param {string} suffix - "p" or "pm" or " P.M.". Add leading space if you want it
|
|
7107
|
+
* @param {CalOptions} options
|
|
7108
|
+
* @return {string}
|
|
7109
|
+
*/
|
|
7110
|
+
function reformatTimeStr(timeStr, suffix, options) {
|
|
7111
|
+
var _options$location;
|
|
7112
|
+
if (typeof timeStr !== 'string') throw new TypeError(`Bad timeStr: ${timeStr}`);
|
|
7113
|
+
const cc = (options === null || options === void 0 || (_options$location = options.location) === null || _options$location === void 0 ? void 0 : _options$location.cc) || (options !== null && options !== void 0 && options.il ? 'IL' : 'US');
|
|
7114
|
+
const hour12 = options === null || options === void 0 ? void 0 : options.hour12;
|
|
7115
|
+
if (typeof hour12 !== 'undefined' && !hour12) {
|
|
7116
|
+
return timeStr;
|
|
7117
|
+
}
|
|
7118
|
+
if (!hour12 && typeof hour12cc[cc] === 'undefined') {
|
|
7119
|
+
return timeStr;
|
|
7120
|
+
}
|
|
7121
|
+
const hm = timeStr.split(':');
|
|
7122
|
+
let hour = parseInt(hm[0], 10);
|
|
7123
|
+
if (hour < 12 && suffix) {
|
|
7124
|
+
suffix = suffix.replace('p', 'a').replace('P', 'A');
|
|
7125
|
+
if (hour === 0) {
|
|
7126
|
+
hour = 12;
|
|
7127
|
+
}
|
|
7128
|
+
} else if (hour > 12) {
|
|
7129
|
+
hour = hour % 12;
|
|
7130
|
+
} else if (hour === 0) {
|
|
7131
|
+
hour = '00';
|
|
7132
|
+
}
|
|
7133
|
+
return `${hour}:${hm[1]}${suffix}`;
|
|
7134
|
+
}
|
|
7135
|
+
|
|
7047
7136
|
/* eslint-disable max-len */
|
|
7048
7137
|
const FRI$3 = 5;
|
|
7049
7138
|
const SAT$3 = 6;
|
|
@@ -7053,11 +7142,10 @@ const SAT$3 = 6;
|
|
|
7053
7142
|
* @param {Event} e
|
|
7054
7143
|
* @param {HDate} hd
|
|
7055
7144
|
* @param {number} dow
|
|
7056
|
-
* @param {Location} location
|
|
7057
7145
|
* @param {CalOptions} options
|
|
7058
7146
|
* @return {Event}
|
|
7059
7147
|
*/
|
|
7060
|
-
function makeCandleEvent(e, hd, dow,
|
|
7148
|
+
function makeCandleEvent(e, hd, dow, options) {
|
|
7061
7149
|
let havdalahTitle = false;
|
|
7062
7150
|
let useHavdalahOffset = dow === SAT$3;
|
|
7063
7151
|
let mask = e ? e.getFlags() : flags.LIGHT_CANDLES;
|
|
@@ -7077,15 +7165,16 @@ function makeCandleEvent(e, hd, dow, location, options) {
|
|
|
7077
7165
|
}
|
|
7078
7166
|
// if offset is 0 or undefined, we'll use tzeit time
|
|
7079
7167
|
const offset = useHavdalahOffset ? options.havdalahMins : options.candleLightingMins;
|
|
7168
|
+
const location = options.location;
|
|
7080
7169
|
const zmanim = new Zmanim(location, hd, options.useElevation);
|
|
7081
7170
|
const time = offset ? zmanim.sunsetOffset(offset, true) : zmanim.tzeit(options.havdalahDeg);
|
|
7082
7171
|
if (isNaN(time.getTime())) {
|
|
7083
7172
|
return null; // no sunset
|
|
7084
7173
|
}
|
|
7085
7174
|
if (havdalahTitle) {
|
|
7086
|
-
return new HavdalahEvent(hd, mask, time, location, options.havdalahMins, e);
|
|
7175
|
+
return new HavdalahEvent(hd, mask, time, location, options.havdalahMins, e, options);
|
|
7087
7176
|
} else {
|
|
7088
|
-
return new CandleLightingEvent(hd, mask, time, location, e);
|
|
7177
|
+
return new CandleLightingEvent(hd, mask, time, location, e, options);
|
|
7089
7178
|
}
|
|
7090
7179
|
}
|
|
7091
7180
|
|
|
@@ -7098,13 +7187,18 @@ class TimedEvent extends Event {
|
|
|
7098
7187
|
* @param {Date} eventTime
|
|
7099
7188
|
* @param {Location} location
|
|
7100
7189
|
* @param {Event} linkedEvent
|
|
7190
|
+
* @param {CalOptions} options
|
|
7101
7191
|
*/
|
|
7102
|
-
constructor(date, desc, mask, eventTime, location, linkedEvent) {
|
|
7192
|
+
constructor(date, desc, mask, eventTime, location, linkedEvent, options) {
|
|
7103
7193
|
super(date, desc, mask);
|
|
7104
7194
|
this.eventTime = Zmanim.roundTime(eventTime);
|
|
7105
7195
|
this.location = location;
|
|
7106
7196
|
const timeFormat = location.getTimeFormatter();
|
|
7107
7197
|
this.eventTimeStr = Zmanim.formatTime(this.eventTime, timeFormat);
|
|
7198
|
+
const opts = Object.assign({
|
|
7199
|
+
location
|
|
7200
|
+
}, options);
|
|
7201
|
+
this.fmtTime = reformatTimeStr(this.eventTimeStr, 'pm', opts);
|
|
7108
7202
|
if (typeof linkedEvent !== 'undefined') {
|
|
7109
7203
|
this.linkedEvent = linkedEvent;
|
|
7110
7204
|
}
|
|
@@ -7114,7 +7208,7 @@ class TimedEvent extends Event {
|
|
|
7114
7208
|
* @return {string}
|
|
7115
7209
|
*/
|
|
7116
7210
|
render(locale) {
|
|
7117
|
-
return Locale.gettext(this.getDesc(), locale) + ': ' + this.
|
|
7211
|
+
return Locale.gettext(this.getDesc(), locale) + ': ' + this.fmtTime;
|
|
7118
7212
|
}
|
|
7119
7213
|
/**
|
|
7120
7214
|
* Returns translation of "Candle lighting" without the time.
|
|
@@ -7151,9 +7245,10 @@ class HavdalahEvent extends TimedEvent {
|
|
|
7151
7245
|
* @param {Location} location
|
|
7152
7246
|
* @param {number} havdalahMins
|
|
7153
7247
|
* @param {Event} linkedEvent
|
|
7248
|
+
* @param {CalOptions} options
|
|
7154
7249
|
*/
|
|
7155
|
-
constructor(date, mask, eventTime, location, havdalahMins, linkedEvent) {
|
|
7156
|
-
super(date, 'Havdalah', mask, eventTime, location, linkedEvent);
|
|
7250
|
+
constructor(date, mask, eventTime, location, havdalahMins, linkedEvent, options) {
|
|
7251
|
+
super(date, 'Havdalah', mask, eventTime, location, linkedEvent, options);
|
|
7157
7252
|
if (havdalahMins) {
|
|
7158
7253
|
this.havdalahMins = havdalahMins;
|
|
7159
7254
|
}
|
|
@@ -7163,7 +7258,7 @@ class HavdalahEvent extends TimedEvent {
|
|
|
7163
7258
|
* @return {string}
|
|
7164
7259
|
*/
|
|
7165
7260
|
render(locale) {
|
|
7166
|
-
return this.renderBrief(locale) + ': ' + this.
|
|
7261
|
+
return this.renderBrief(locale) + ': ' + this.fmtTime;
|
|
7167
7262
|
}
|
|
7168
7263
|
/**
|
|
7169
7264
|
* Returns translation of "Havdalah" without the time.
|
|
@@ -7192,9 +7287,10 @@ class CandleLightingEvent extends TimedEvent {
|
|
|
7192
7287
|
* @param {Date} eventTime
|
|
7193
7288
|
* @param {Location} location
|
|
7194
7289
|
* @param {Event} linkedEvent
|
|
7290
|
+
* @param {CalOptions} options
|
|
7195
7291
|
*/
|
|
7196
|
-
constructor(date, mask, eventTime, location, linkedEvent) {
|
|
7197
|
-
super(date, 'Candle lighting', mask, eventTime, location, linkedEvent);
|
|
7292
|
+
constructor(date, mask, eventTime, location, linkedEvent, options) {
|
|
7293
|
+
super(date, 'Candle lighting', mask, eventTime, location, linkedEvent, options);
|
|
7198
7294
|
}
|
|
7199
7295
|
/** @return {string} */
|
|
7200
7296
|
getEmoji() {
|
|
@@ -7222,14 +7318,14 @@ function makeFastStartEnd(ev, options) {
|
|
|
7222
7318
|
const zmanim = new Zmanim(location, dt, options.useElevation);
|
|
7223
7319
|
if (desc === 'Erev Tish\'a B\'Av') {
|
|
7224
7320
|
const sunset = zmanim.sunset();
|
|
7225
|
-
ev.startEvent = makeTimedEvent(hd, sunset, 'Fast begins', ev,
|
|
7321
|
+
ev.startEvent = makeTimedEvent(hd, sunset, 'Fast begins', ev, options);
|
|
7226
7322
|
} else if (desc.startsWith('Tish\'a B\'Av')) {
|
|
7227
|
-
ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev,
|
|
7323
|
+
ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, options);
|
|
7228
7324
|
} else {
|
|
7229
7325
|
const dawn = zmanim.alotHaShachar();
|
|
7230
|
-
ev.startEvent = makeTimedEvent(hd, dawn, 'Fast begins', ev,
|
|
7326
|
+
ev.startEvent = makeTimedEvent(hd, dawn, 'Fast begins', ev, options);
|
|
7231
7327
|
if (dt.getDay() !== 5 && !(hd.getDate() === 14 && hd.getMonth() === months.NISAN)) {
|
|
7232
|
-
ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev,
|
|
7328
|
+
ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, options);
|
|
7233
7329
|
}
|
|
7234
7330
|
}
|
|
7235
7331
|
return ev;
|
|
@@ -7241,14 +7337,15 @@ function makeFastStartEnd(ev, options) {
|
|
|
7241
7337
|
* @param {Date} time
|
|
7242
7338
|
* @param {string} desc
|
|
7243
7339
|
* @param {Event} ev
|
|
7244
|
-
* @param {
|
|
7340
|
+
* @param {CalOptions} options
|
|
7245
7341
|
* @return {TimedEvent}
|
|
7246
7342
|
*/
|
|
7247
|
-
function makeTimedEvent(hd, time, desc, ev,
|
|
7343
|
+
function makeTimedEvent(hd, time, desc, ev, options) {
|
|
7248
7344
|
if (isNaN(time.getTime())) {
|
|
7249
7345
|
return null;
|
|
7250
7346
|
}
|
|
7251
|
-
|
|
7347
|
+
const location = options.location;
|
|
7348
|
+
return new TimedEvent(hd, desc, ev.getFlags(), time, location, ev, options);
|
|
7252
7349
|
}
|
|
7253
7350
|
|
|
7254
7351
|
/**
|
|
@@ -7264,7 +7361,7 @@ function makeWeekdayChanukahCandleLighting(ev, hd, options) {
|
|
|
7264
7361
|
const zmanim = new Zmanim(location, hd.greg(), options.useElevation);
|
|
7265
7362
|
const candleLightingTime = zmanim.dusk();
|
|
7266
7363
|
// const candleLightingTime = zmanim.tzeit(4.6667);
|
|
7267
|
-
return makeTimedEvent(hd, candleLightingTime, ev.getDesc(), ev,
|
|
7364
|
+
return makeTimedEvent(hd, candleLightingTime, ev.getDesc(), ev, options);
|
|
7268
7365
|
}
|
|
7269
7366
|
|
|
7270
7367
|
/* eslint-disable camelcase */
|
|
@@ -7352,6 +7449,33 @@ class Molad {
|
|
|
7352
7449
|
getChalakim() {
|
|
7353
7450
|
return this.chalakim;
|
|
7354
7451
|
}
|
|
7452
|
+
/**
|
|
7453
|
+
* @param {string} [locale] Optional locale name (defaults to active locale)
|
|
7454
|
+
* @param {CalOptions} options
|
|
7455
|
+
* @return {string}
|
|
7456
|
+
*/
|
|
7457
|
+
render(locale, options) {
|
|
7458
|
+
locale = locale || Locale.getLocaleName();
|
|
7459
|
+
if (typeof locale === 'string') {
|
|
7460
|
+
locale = locale.toLowerCase();
|
|
7461
|
+
}
|
|
7462
|
+
const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
|
|
7463
|
+
const monthName = Locale.gettext(this.getMonthName(), locale);
|
|
7464
|
+
const dayNames = isHebrewLocale ? heDayNames : shortDayNames;
|
|
7465
|
+
const dow = dayNames[this.getDow()];
|
|
7466
|
+
const minutes = this.getMinutes();
|
|
7467
|
+
const hour = this.getHour();
|
|
7468
|
+
const chalakim = this.getChalakim();
|
|
7469
|
+
const moladStr = Locale.gettext('Molad', locale);
|
|
7470
|
+
const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
|
|
7471
|
+
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
7472
|
+
if (isHebrewLocale) {
|
|
7473
|
+
const ampm = hour < 5 ? night : hour < 12 ? morning : hour < 17 ? afternoon : hour < 21 ? evening : night;
|
|
7474
|
+
return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
|
|
7475
|
+
}
|
|
7476
|
+
const fmtTime = reformatTimeStr(`${hour}:00`, 'pm', options);
|
|
7477
|
+
return `${moladStr} ${monthName}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
|
|
7478
|
+
}
|
|
7355
7479
|
}
|
|
7356
7480
|
|
|
7357
7481
|
/** Represents a Molad announcement on Shabbat Mevarchim */
|
|
@@ -7360,38 +7484,21 @@ class MoladEvent extends Event {
|
|
|
7360
7484
|
* @param {HDate} date Hebrew date event occurs
|
|
7361
7485
|
* @param {number} hyear molad year
|
|
7362
7486
|
* @param {number} hmonth molad month
|
|
7487
|
+
* @param {CalOptions} options
|
|
7363
7488
|
*/
|
|
7364
|
-
constructor(date, hyear, hmonth) {
|
|
7489
|
+
constructor(date, hyear, hmonth, options) {
|
|
7365
7490
|
const m = new Molad(hyear, hmonth);
|
|
7366
7491
|
const monthName = m.getMonthName();
|
|
7367
7492
|
super(date, `Molad ${monthName} ${hyear}`, flags.MOLAD);
|
|
7368
7493
|
this.molad = m;
|
|
7494
|
+
this.options = options;
|
|
7369
7495
|
}
|
|
7370
7496
|
/**
|
|
7371
7497
|
* @param {string} [locale] Optional locale name (defaults to active locale).
|
|
7372
7498
|
* @return {string}
|
|
7373
7499
|
*/
|
|
7374
7500
|
render(locale) {
|
|
7375
|
-
|
|
7376
|
-
locale = locale || Locale.getLocaleName();
|
|
7377
|
-
if (typeof locale === 'string') {
|
|
7378
|
-
locale = locale.toLowerCase();
|
|
7379
|
-
}
|
|
7380
|
-
const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
|
|
7381
|
-
const monthName = Locale.gettext(m.getMonthName(), locale);
|
|
7382
|
-
const dayNames = isHebrewLocale ? heDayNames : shortDayNames;
|
|
7383
|
-
const dow = dayNames[m.getDow()];
|
|
7384
|
-
const minutes = m.getMinutes();
|
|
7385
|
-
const hour = m.getHour();
|
|
7386
|
-
const chalakim = m.getChalakim();
|
|
7387
|
-
const moladStr = Locale.gettext('Molad', locale);
|
|
7388
|
-
const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
|
|
7389
|
-
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
7390
|
-
if (isHebrewLocale) {
|
|
7391
|
-
const ampm = hour < 5 ? night : hour < 12 ? morning : hour < 17 ? afternoon : hour < 21 ? evening : night;
|
|
7392
|
-
return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
|
|
7393
|
-
}
|
|
7394
|
-
return `${moladStr} ${monthName}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${hour}:00`;
|
|
7501
|
+
return this.molad.render(locale, this.options);
|
|
7395
7502
|
}
|
|
7396
7503
|
}
|
|
7397
7504
|
|
|
@@ -8375,25 +8482,14 @@ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
|
|
|
8375
8482
|
};
|
|
8376
8483
|
};
|
|
8377
8484
|
|
|
8378
|
-
var documentAll$2 = typeof document == 'object' && document.all;
|
|
8379
|
-
|
|
8380
8485
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
8381
|
-
|
|
8382
|
-
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
8383
|
-
|
|
8384
|
-
var documentAll_1 = {
|
|
8385
|
-
all: documentAll$2,
|
|
8386
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
8387
|
-
};
|
|
8388
|
-
|
|
8389
|
-
var $documentAll$1 = documentAll_1;
|
|
8390
|
-
|
|
8391
|
-
var documentAll$1 = $documentAll$1.all;
|
|
8486
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
8392
8487
|
|
|
8393
8488
|
// `IsCallable` abstract operation
|
|
8394
8489
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
8395
|
-
|
|
8396
|
-
|
|
8490
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
8491
|
+
var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
8492
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
8397
8493
|
} : function (argument) {
|
|
8398
8494
|
return typeof argument == 'function';
|
|
8399
8495
|
};
|
|
@@ -8499,13 +8595,8 @@ var WeakMap$2 = global$9.WeakMap;
|
|
|
8499
8595
|
var weakMapBasicDetection = isCallable$8(WeakMap$2) && /native code/.test(String(WeakMap$2));
|
|
8500
8596
|
|
|
8501
8597
|
var isCallable$7 = isCallable$a;
|
|
8502
|
-
var $documentAll = documentAll_1;
|
|
8503
8598
|
|
|
8504
|
-
var
|
|
8505
|
-
|
|
8506
|
-
var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
8507
|
-
return typeof it == 'object' ? it !== null : isCallable$7(it) || it === documentAll;
|
|
8508
|
-
} : function (it) {
|
|
8599
|
+
var isObject$5 = function (it) {
|
|
8509
8600
|
return typeof it == 'object' ? it !== null : isCallable$7(it);
|
|
8510
8601
|
};
|
|
8511
8602
|
|
|
@@ -8705,10 +8796,10 @@ var store$1 = sharedStore;
|
|
|
8705
8796
|
(shared$3.exports = function (key, value) {
|
|
8706
8797
|
return store$1[key] || (store$1[key] = value !== undefined ? value : {});
|
|
8707
8798
|
})('versions', []).push({
|
|
8708
|
-
version: '3.
|
|
8799
|
+
version: '3.35.0',
|
|
8709
8800
|
mode: 'global',
|
|
8710
8801
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
8711
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
8802
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
|
|
8712
8803
|
source: 'https://github.com/zloirock/core-js'
|
|
8713
8804
|
});
|
|
8714
8805
|
|
|
@@ -9659,8 +9750,10 @@ class MevarchimChodeshEvent extends Event {
|
|
|
9659
9750
|
const hyear = date.getFullYear();
|
|
9660
9751
|
const hmonth = date.getMonth();
|
|
9661
9752
|
const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN$1 : hmonth + 1;
|
|
9662
|
-
const molad = new
|
|
9663
|
-
this.memo = molad.render('en'
|
|
9753
|
+
const molad = new Molad(hyear, monNext);
|
|
9754
|
+
this.memo = molad.render('en', {
|
|
9755
|
+
hour12: false
|
|
9756
|
+
});
|
|
9664
9757
|
}
|
|
9665
9758
|
/** @return {string} */
|
|
9666
9759
|
basename() {
|
|
@@ -10017,7 +10110,7 @@ class DailyLearning {
|
|
|
10017
10110
|
}
|
|
10018
10111
|
|
|
10019
10112
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10020
|
-
const version = '5.0.
|
|
10113
|
+
const version = '5.0.7';
|
|
10021
10114
|
|
|
10022
10115
|
var objectGetOwnPropertyDescriptor = {};
|
|
10023
10116
|
|
|
@@ -11483,20 +11576,6 @@ function getMaskFromOptions(options) {
|
|
|
11483
11576
|
}
|
|
11484
11577
|
const MASK_LIGHT_CANDLES = LIGHT_CANDLES | LIGHT_CANDLES_TZEIS | CHANUKAH_CANDLES | YOM_TOV_ENDS;
|
|
11485
11578
|
const defaultLocation = new Location(0, 0, false, 'UTC');
|
|
11486
|
-
const hour12cc = {
|
|
11487
|
-
US: 1,
|
|
11488
|
-
CA: 1,
|
|
11489
|
-
BR: 1,
|
|
11490
|
-
AU: 1,
|
|
11491
|
-
NZ: 1,
|
|
11492
|
-
DO: 1,
|
|
11493
|
-
PR: 1,
|
|
11494
|
-
GR: 1,
|
|
11495
|
-
IN: 1,
|
|
11496
|
-
KR: 1,
|
|
11497
|
-
NP: 1,
|
|
11498
|
-
ZA: 1
|
|
11499
|
-
};
|
|
11500
11579
|
|
|
11501
11580
|
/**
|
|
11502
11581
|
* @private
|
|
@@ -11752,10 +11831,10 @@ class HebrewCalendar {
|
|
|
11752
11831
|
const hmonth = hd.getMonth();
|
|
11753
11832
|
if (options.molad && dow == SAT && hmonth != ELUL && hd.getDate() >= 23 && hd.getDate() <= 29) {
|
|
11754
11833
|
const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN : hmonth + 1;
|
|
11755
|
-
evts.push(new MoladEvent(hd, hyear, monNext));
|
|
11834
|
+
evts.push(new MoladEvent(hd, hyear, monNext, options));
|
|
11756
11835
|
}
|
|
11757
11836
|
if (!candlesEv && options.candlelighting && (dow == FRI || dow == SAT)) {
|
|
11758
|
-
candlesEv = makeCandleEvent(undefined, hd, dow,
|
|
11837
|
+
candlesEv = makeCandleEvent(undefined, hd, dow, options);
|
|
11759
11838
|
if (dow === FRI && candlesEv && sedra) {
|
|
11760
11839
|
candlesEv.memo = sedra.getString(abs);
|
|
11761
11840
|
}
|
|
@@ -11922,28 +12001,7 @@ class HebrewCalendar {
|
|
|
11922
12001
|
* @return {string}
|
|
11923
12002
|
*/
|
|
11924
12003
|
static reformatTimeStr(timeStr, suffix, options) {
|
|
11925
|
-
|
|
11926
|
-
if (typeof timeStr !== 'string') throw new TypeError(`Bad timeStr: ${timeStr}`);
|
|
11927
|
-
const cc = ((_options$location2 = options.location) === null || _options$location2 === void 0 ? void 0 : _options$location2.cc) || (options.il ? 'IL' : 'US');
|
|
11928
|
-
if (typeof options.hour12 !== 'undefined' && !options.hour12) {
|
|
11929
|
-
return timeStr;
|
|
11930
|
-
}
|
|
11931
|
-
if (!options.hour12 && typeof hour12cc[cc] === 'undefined') {
|
|
11932
|
-
return timeStr;
|
|
11933
|
-
}
|
|
11934
|
-
const hm = timeStr.split(':');
|
|
11935
|
-
let hour = parseInt(hm[0], 10);
|
|
11936
|
-
if (hour < 12 && suffix) {
|
|
11937
|
-
suffix = suffix.replace('p', 'a').replace('P', 'A');
|
|
11938
|
-
if (hour === 0) {
|
|
11939
|
-
hour = 12;
|
|
11940
|
-
}
|
|
11941
|
-
} else if (hour > 12) {
|
|
11942
|
-
hour = hour % 12;
|
|
11943
|
-
} else if (hour === 0) {
|
|
11944
|
-
hour = '00';
|
|
11945
|
-
}
|
|
11946
|
-
return `${hour}:${hm[1]}${suffix}`;
|
|
12004
|
+
return reformatTimeStr(timeStr, suffix, options);
|
|
11947
12005
|
}
|
|
11948
12006
|
|
|
11949
12007
|
/** @return {string} */
|
|
@@ -12042,7 +12100,7 @@ function appendHolidayAndRelated(events, ev, options, candlesEv, dow) {
|
|
|
12042
12100
|
if (eFlags & options.mask || !eFlags && !options.userMask) {
|
|
12043
12101
|
if (options.candlelighting && eFlags & MASK_LIGHT_CANDLES) {
|
|
12044
12102
|
const hd = ev.getDate();
|
|
12045
|
-
candlesEv = makeCandleEvent(ev, hd, dow,
|
|
12103
|
+
candlesEv = makeCandleEvent(ev, hd, dow, options);
|
|
12046
12104
|
if (eFlags & CHANUKAH_CANDLES && candlesEv && !options.noHolidays) {
|
|
12047
12105
|
const chanukahEv = dow === FRI || dow === SAT ? candlesEv : makeWeekdayChanukahCandleLighting(ev, hd, options);
|
|
12048
12106
|
const attrs = {
|