@hebcal/core 5.7.5 → 5.7.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 +257 -85
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +22 -2
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.js +1 -1
- package/dist/esm/candles.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/omer.js +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/dist/index.cjs +236 -82
- package/dist/index.cjs.map +1 -1
- package/dist/pkgVersion.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.7.
|
|
1
|
+
/*! @hebcal/core v5.7.7 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var hdate = require('@hebcal/hdate');
|
|
@@ -6,7 +6,7 @@ var noaa = require('@hebcal/noaa');
|
|
|
6
6
|
require('temporal-polyfill/global');
|
|
7
7
|
|
|
8
8
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
9
|
-
const version = '5.7.
|
|
9
|
+
const version = '5.7.7';
|
|
10
10
|
|
|
11
11
|
var poAshkenazi = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);" }, "contexts": { "": { "Shabbat": ["Shabbos"], "Achrei Mot": ["Achrei Mos"], "Bechukotai": ["Bechukosai"], "Beha'alotcha": ["Beha’aloscha"], "Bereshit": ["Bereshis"], "Chukat": ["Chukas"], "Erev Shavuot": ["Erev Shavuos"], "Erev Sukkot": ["Erev Sukkos"], "Ki Tavo": ["Ki Savo"], "Ki Teitzei": ["Ki Seitzei"], "Ki Tisa": ["Ki Sisa"], "Matot": ["Matos"], "Purim Katan": ["Purim Koton"], "Shabbat Chazon": ["Shabbos Chazon"], "Shabbat HaChodesh": ["Shabbos HaChodesh"], "Shabbat HaGadol": ["Shabbos HaGadol"], "Shabbat Nachamu": ["Shabbos Nachamu"], "Shabbat Parah": ["Shabbos Parah"], "Shabbat Shekalim": ["Shabbos Shekalim"], "Shabbat Shuva": ["Shabbos Shuvah"], "Shabbat Zachor": ["Shabbos Zachor"], "Shavuot": ["Shavuos"], "Shavuot I": ["Shavuos I"], "Shavuot II": ["Shavuos II"], "Shemot": ["Shemos"], "Shmini Atzeret": ["Shmini Atzeres"], "Simchat Torah": ["Simchas Torah"], "Sukkot": ["Sukkos"], "Sukkot I": ["Sukkos I"], "Sukkot II": ["Sukkos II"], "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"], "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"], "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"], "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"], "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"], "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"], "Ta'anit Bechorot": ["Ta’anis Bechoros"], "Ta'anit Esther": ["Ta’anis Esther"], "Toldot": ["Toldos"], "Vaetchanan": ["Vaeschanan"], "Yitro": ["Yisro"], "Vezot Haberakhah": ["Vezos Haberakhah"], "Parashat": ["Parshas"], "Leil Selichot": ["Leil Selichos"], "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"], "Shabbat Shirah": ["Shabbos Shirah"], "Asara B'Tevet": ["Asara B’Teves"], "Alot HaShachar": ["Alos HaShachar"], "Kriat Shema, sof zeman": ["Krias Shema, sof zman"], "Tefilah, sof zeman": ["Tefilah, sof zman"], "Kriat Shema, sof zeman (MGA)": ["Krias Shema, sof zman (MGA)"], "Tefilah, sof zeman (MGA)": ["Tefilah, sof zman (MGA)"], "Chatzot HaLailah": ["Chatzos HaLailah"], "Chatzot hayom": ["Chatzos"], "Tzeit HaKochavim": ["Tzeis HaKochavim"], "Birkat Hachamah": ["Birkas Hachamah"], "Shushan Purim Katan": ["Shushan Purim Koton"] } } };
|
|
12
12
|
|
|
@@ -2496,136 +2496,290 @@ function renderParshaName(parsha, locale) {
|
|
|
2496
2496
|
return str.normalize();
|
|
2497
2497
|
}
|
|
2498
2498
|
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2499
|
+
class QuickLRU extends Map {
|
|
2500
|
+
constructor(options = {}) {
|
|
2501
|
+
super();
|
|
2502
|
+
|
|
2503
|
+
if (!(options.maxSize && options.maxSize > 0)) {
|
|
2504
|
+
throw new TypeError('`maxSize` must be a number greater than 0');
|
|
2505
|
+
}
|
|
2502
2506
|
|
|
2503
|
-
|
|
2504
|
-
|
|
2507
|
+
if (typeof options.maxAge === 'number' && options.maxAge === 0) {
|
|
2508
|
+
throw new TypeError('`maxAge` must be a number greater than 0');
|
|
2509
|
+
}
|
|
2505
2510
|
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2511
|
+
// TODO: Use private class fields when ESLint supports them.
|
|
2512
|
+
this.maxSize = options.maxSize;
|
|
2513
|
+
this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;
|
|
2514
|
+
this.onEviction = options.onEviction;
|
|
2515
|
+
this.cache = new Map();
|
|
2516
|
+
this.oldCache = new Map();
|
|
2517
|
+
this._size = 0;
|
|
2518
|
+
}
|
|
2509
2519
|
|
|
2510
|
-
class
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2520
|
+
// TODO: Use private class methods when targeting Node.js 16.
|
|
2521
|
+
_emitEvictions(cache) {
|
|
2522
|
+
if (typeof this.onEviction !== 'function') {
|
|
2523
|
+
return;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
for (const [key, item] of cache) {
|
|
2527
|
+
this.onEviction(key, item.value);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
_deleteIfExpired(key, item) {
|
|
2532
|
+
if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
|
|
2533
|
+
if (typeof this.onEviction === 'function') {
|
|
2534
|
+
this.onEviction(key, item.value);
|
|
2514
2535
|
}
|
|
2515
2536
|
|
|
2516
|
-
this.
|
|
2517
|
-
|
|
2518
|
-
|
|
2537
|
+
return this.delete(key);
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
return false;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
_getOrDeleteIfExpired(key, item) {
|
|
2544
|
+
const deleted = this._deleteIfExpired(key, item);
|
|
2545
|
+
if (deleted === false) {
|
|
2546
|
+
return item.value;
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
_getItemValue(key, item) {
|
|
2551
|
+
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
_peek(key, cache) {
|
|
2555
|
+
const item = cache.get(key);
|
|
2556
|
+
|
|
2557
|
+
return this._getItemValue(key, item);
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
_set(key, value) {
|
|
2561
|
+
this.cache.set(key, value);
|
|
2562
|
+
this._size++;
|
|
2563
|
+
|
|
2564
|
+
if (this._size >= this.maxSize) {
|
|
2519
2565
|
this._size = 0;
|
|
2566
|
+
this._emitEvictions(this.oldCache);
|
|
2567
|
+
this.oldCache = this.cache;
|
|
2568
|
+
this.cache = new Map();
|
|
2520
2569
|
}
|
|
2570
|
+
}
|
|
2521
2571
|
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2572
|
+
_moveToRecent(key, item) {
|
|
2573
|
+
this.oldCache.delete(key);
|
|
2574
|
+
this._set(key, item);
|
|
2575
|
+
}
|
|
2525
2576
|
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2577
|
+
* _entriesAscending() {
|
|
2578
|
+
for (const item of this.oldCache) {
|
|
2579
|
+
const [key, value] = item;
|
|
2580
|
+
if (!this.cache.has(key)) {
|
|
2581
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2582
|
+
if (deleted === false) {
|
|
2583
|
+
yield item;
|
|
2584
|
+
}
|
|
2530
2585
|
}
|
|
2531
2586
|
}
|
|
2532
2587
|
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2588
|
+
for (const item of this.cache) {
|
|
2589
|
+
const [key, value] = item;
|
|
2590
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2591
|
+
if (deleted === false) {
|
|
2592
|
+
yield item;
|
|
2536
2593
|
}
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2537
2596
|
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
}
|
|
2597
|
+
get(key) {
|
|
2598
|
+
if (this.cache.has(key)) {
|
|
2599
|
+
const item = this.cache.get(key);
|
|
2600
|
+
|
|
2601
|
+
return this._getItemValue(key, item);
|
|
2544
2602
|
}
|
|
2545
2603
|
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2604
|
+
if (this.oldCache.has(key)) {
|
|
2605
|
+
const item = this.oldCache.get(key);
|
|
2606
|
+
if (this._deleteIfExpired(key, item) === false) {
|
|
2607
|
+
this._moveToRecent(key, item);
|
|
2608
|
+
return item.value;
|
|
2551
2609
|
}
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2552
2612
|
|
|
2553
|
-
|
|
2613
|
+
set(key, value, {maxAge = this.maxAge} = {}) {
|
|
2614
|
+
const expiry =
|
|
2615
|
+
typeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY ?
|
|
2616
|
+
Date.now() + maxAge :
|
|
2617
|
+
undefined;
|
|
2618
|
+
if (this.cache.has(key)) {
|
|
2619
|
+
this.cache.set(key, {
|
|
2620
|
+
value,
|
|
2621
|
+
expiry
|
|
2622
|
+
});
|
|
2623
|
+
} else {
|
|
2624
|
+
this._set(key, {value, expiry});
|
|
2554
2625
|
}
|
|
2555
2626
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2627
|
+
return this;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
has(key) {
|
|
2631
|
+
if (this.cache.has(key)) {
|
|
2632
|
+
return !this._deleteIfExpired(key, this.cache.get(key));
|
|
2558
2633
|
}
|
|
2559
2634
|
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
}
|
|
2635
|
+
if (this.oldCache.has(key)) {
|
|
2636
|
+
return !this._deleteIfExpired(key, this.oldCache.get(key));
|
|
2637
|
+
}
|
|
2564
2638
|
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2639
|
+
return false;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
peek(key) {
|
|
2643
|
+
if (this.cache.has(key)) {
|
|
2644
|
+
return this._peek(key, this.cache);
|
|
2568
2645
|
}
|
|
2569
2646
|
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2647
|
+
if (this.oldCache.has(key)) {
|
|
2648
|
+
return this._peek(key, this.oldCache);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
delete(key) {
|
|
2653
|
+
const deleted = this.cache.delete(key);
|
|
2654
|
+
if (deleted) {
|
|
2655
|
+
this._size--;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
return this.oldCache.delete(key) || deleted;
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
clear() {
|
|
2662
|
+
this.cache.clear();
|
|
2663
|
+
this.oldCache.clear();
|
|
2664
|
+
this._size = 0;
|
|
2665
|
+
}
|
|
2575
2666
|
|
|
2576
|
-
|
|
2667
|
+
resize(newSize) {
|
|
2668
|
+
if (!(newSize && newSize > 0)) {
|
|
2669
|
+
throw new TypeError('`maxSize` must be a number greater than 0');
|
|
2577
2670
|
}
|
|
2578
2671
|
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2672
|
+
const items = [...this._entriesAscending()];
|
|
2673
|
+
const removeCount = items.length - newSize;
|
|
2674
|
+
if (removeCount < 0) {
|
|
2675
|
+
this.cache = new Map(items);
|
|
2676
|
+
this.oldCache = new Map();
|
|
2677
|
+
this._size = items.length;
|
|
2678
|
+
} else {
|
|
2679
|
+
if (removeCount > 0) {
|
|
2680
|
+
this._emitEvictions(items.slice(0, removeCount));
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
this.oldCache = new Map(items.slice(removeCount));
|
|
2684
|
+
this.cache = new Map();
|
|
2582
2685
|
this._size = 0;
|
|
2583
2686
|
}
|
|
2584
2687
|
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2688
|
+
this.maxSize = newSize;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
* keys() {
|
|
2692
|
+
for (const [key] of this) {
|
|
2693
|
+
yield key;
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
* values() {
|
|
2698
|
+
for (const [, value] of this) {
|
|
2699
|
+
yield value;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
* [Symbol.iterator]() {
|
|
2704
|
+
for (const item of this.cache) {
|
|
2705
|
+
const [key, value] = item;
|
|
2706
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2707
|
+
if (deleted === false) {
|
|
2708
|
+
yield [key, value.value];
|
|
2588
2709
|
}
|
|
2589
2710
|
}
|
|
2590
2711
|
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2712
|
+
for (const item of this.oldCache) {
|
|
2713
|
+
const [key, value] = item;
|
|
2714
|
+
if (!this.cache.has(key)) {
|
|
2715
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2716
|
+
if (deleted === false) {
|
|
2717
|
+
yield [key, value.value];
|
|
2718
|
+
}
|
|
2594
2719
|
}
|
|
2595
2720
|
}
|
|
2721
|
+
}
|
|
2596
2722
|
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2723
|
+
* entriesDescending() {
|
|
2724
|
+
let items = [...this.cache];
|
|
2725
|
+
for (let i = items.length - 1; i >= 0; --i) {
|
|
2726
|
+
const item = items[i];
|
|
2727
|
+
const [key, value] = item;
|
|
2728
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2729
|
+
if (deleted === false) {
|
|
2730
|
+
yield [key, value.value];
|
|
2600
2731
|
}
|
|
2732
|
+
}
|
|
2601
2733
|
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2734
|
+
items = [...this.oldCache];
|
|
2735
|
+
for (let i = items.length - 1; i >= 0; --i) {
|
|
2736
|
+
const item = items[i];
|
|
2737
|
+
const [key, value] = item;
|
|
2738
|
+
if (!this.cache.has(key)) {
|
|
2739
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
2740
|
+
if (deleted === false) {
|
|
2741
|
+
yield [key, value.value];
|
|
2606
2742
|
}
|
|
2607
2743
|
}
|
|
2608
2744
|
}
|
|
2745
|
+
}
|
|
2609
2746
|
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2747
|
+
* entriesAscending() {
|
|
2748
|
+
for (const [key, value] of this._entriesAscending()) {
|
|
2749
|
+
yield [key, value.value];
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
get size() {
|
|
2754
|
+
if (!this._size) {
|
|
2755
|
+
return this.oldCache.size;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
let oldCacheSize = 0;
|
|
2759
|
+
for (const key of this.oldCache.keys()) {
|
|
2760
|
+
if (!this.cache.has(key)) {
|
|
2761
|
+
oldCacheSize++;
|
|
2616
2762
|
}
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
return Math.min(this._size + oldCacheSize, this.maxSize);
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
entries() {
|
|
2769
|
+
return this.entriesAscending();
|
|
2770
|
+
}
|
|
2617
2771
|
|
|
2618
|
-
|
|
2772
|
+
forEach(callbackFunction, thisArgument = this) {
|
|
2773
|
+
for (const [key, value] of this.entriesAscending()) {
|
|
2774
|
+
callbackFunction.call(thisArgument, value, key, this);
|
|
2619
2775
|
}
|
|
2620
2776
|
}
|
|
2621
2777
|
|
|
2622
|
-
|
|
2623
|
-
|
|
2778
|
+
get [Symbol.toStringTag]() {
|
|
2779
|
+
return JSON.stringify([...this.entriesAscending()]);
|
|
2780
|
+
}
|
|
2624
2781
|
}
|
|
2625
2782
|
|
|
2626
|
-
var quickLruExports = requireQuickLru();
|
|
2627
|
-
var QuickLRU = /*@__PURE__*/getDefaultExportFromCjs(quickLruExports);
|
|
2628
|
-
|
|
2629
2783
|
/*
|
|
2630
2784
|
Hebcal - A Jewish Calendar Generator
|
|
2631
2785
|
Copyright (c) 1994-2020 Danny Sadinoff
|