@hebcal/core 3.26.2 → 3.26.6
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/README.md +122 -65
- package/dist/bundle.js +993 -77
- package/dist/bundle.min.js +2 -2
- package/dist/hdate-bundle.js +959 -52
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +35 -31
- package/dist/hdate.mjs +35 -31
- package/dist/index.js +69 -36
- package/dist/index.mjs +69 -36
- package/hebcal.d.ts +66 -35
- package/package.json +9 -9
package/dist/hdate-bundle.js
CHANGED
|
@@ -1,7 +1,928 @@
|
|
|
1
|
-
/*! @hebcal/core v3.26.
|
|
1
|
+
/*! @hebcal/core v3.26.6 */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
|
+
|
|
7
|
+
var check = function (it) {
|
|
8
|
+
return it && it.Math == Math && it;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
12
|
+
var global$c =
|
|
13
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
14
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
15
|
+
check(typeof window == 'object' && window) ||
|
|
16
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
17
|
+
check(typeof self == 'object' && self) ||
|
|
18
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
20
|
+
(function () { return this; })() || Function('return this')();
|
|
21
|
+
|
|
22
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
23
|
+
|
|
24
|
+
var fails$6 = function (exec) {
|
|
25
|
+
try {
|
|
26
|
+
return !!exec();
|
|
27
|
+
} catch (error) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var fails$5 = fails$6;
|
|
33
|
+
|
|
34
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
35
|
+
var descriptors = !fails$5(function () {
|
|
36
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
37
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
var objectPropertyIsEnumerable = {};
|
|
41
|
+
|
|
42
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
43
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
44
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
45
|
+
|
|
46
|
+
// Nashorn ~ JDK8 bug
|
|
47
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
48
|
+
|
|
49
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
50
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
51
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
52
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
53
|
+
return !!descriptor && descriptor.enumerable;
|
|
54
|
+
} : $propertyIsEnumerable;
|
|
55
|
+
|
|
56
|
+
var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
57
|
+
return {
|
|
58
|
+
enumerable: !(bitmap & 1),
|
|
59
|
+
configurable: !(bitmap & 2),
|
|
60
|
+
writable: !(bitmap & 4),
|
|
61
|
+
value: value
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var toString$3 = {}.toString;
|
|
66
|
+
|
|
67
|
+
var classofRaw$1 = function (it) {
|
|
68
|
+
return toString$3.call(it).slice(8, -1);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var fails$4 = fails$6;
|
|
72
|
+
var classof$2 = classofRaw$1;
|
|
73
|
+
|
|
74
|
+
var split = ''.split;
|
|
75
|
+
|
|
76
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
77
|
+
var indexedObject = fails$4(function () {
|
|
78
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
79
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
80
|
+
return !Object('z').propertyIsEnumerable(0);
|
|
81
|
+
}) ? function (it) {
|
|
82
|
+
return classof$2(it) == 'String' ? split.call(it, '') : Object(it);
|
|
83
|
+
} : Object;
|
|
84
|
+
|
|
85
|
+
// `RequireObjectCoercible` abstract operation
|
|
86
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
87
|
+
var requireObjectCoercible$3 = function (it) {
|
|
88
|
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
89
|
+
return it;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
93
|
+
var IndexedObject = indexedObject;
|
|
94
|
+
var requireObjectCoercible$2 = requireObjectCoercible$3;
|
|
95
|
+
|
|
96
|
+
var toIndexedObject$3 = function (it) {
|
|
97
|
+
return IndexedObject(requireObjectCoercible$2(it));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// `IsCallable` abstract operation
|
|
101
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
102
|
+
var isCallable$a = function (argument) {
|
|
103
|
+
return typeof argument === 'function';
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var isCallable$9 = isCallable$a;
|
|
107
|
+
|
|
108
|
+
var isObject$5 = function (it) {
|
|
109
|
+
return typeof it === 'object' ? it !== null : isCallable$9(it);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var global$b = global$c;
|
|
113
|
+
var isCallable$8 = isCallable$a;
|
|
114
|
+
|
|
115
|
+
var aFunction = function (argument) {
|
|
116
|
+
return isCallable$8(argument) ? argument : undefined;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
var getBuiltIn$3 = function (namespace, method) {
|
|
120
|
+
return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var getBuiltIn$2 = getBuiltIn$3;
|
|
124
|
+
|
|
125
|
+
var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
|
|
126
|
+
|
|
127
|
+
var global$a = global$c;
|
|
128
|
+
var userAgent = engineUserAgent;
|
|
129
|
+
|
|
130
|
+
var process = global$a.process;
|
|
131
|
+
var Deno = global$a.Deno;
|
|
132
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
133
|
+
var v8 = versions && versions.v8;
|
|
134
|
+
var match, version$1;
|
|
135
|
+
|
|
136
|
+
if (v8) {
|
|
137
|
+
match = v8.split('.');
|
|
138
|
+
version$1 = match[0] < 4 ? 1 : match[0] + match[1];
|
|
139
|
+
} else if (userAgent) {
|
|
140
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
141
|
+
if (!match || match[1] >= 74) {
|
|
142
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
143
|
+
if (match) version$1 = match[1];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
var engineV8Version = version$1 && +version$1;
|
|
148
|
+
|
|
149
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
150
|
+
|
|
151
|
+
var V8_VERSION = engineV8Version;
|
|
152
|
+
var fails$3 = fails$6;
|
|
153
|
+
|
|
154
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
155
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$3(function () {
|
|
156
|
+
var symbol = Symbol();
|
|
157
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
158
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
159
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
160
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
161
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
165
|
+
|
|
166
|
+
var NATIVE_SYMBOL$1 = nativeSymbol;
|
|
167
|
+
|
|
168
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
169
|
+
&& !Symbol.sham
|
|
170
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
171
|
+
|
|
172
|
+
var isCallable$7 = isCallable$a;
|
|
173
|
+
var getBuiltIn$1 = getBuiltIn$3;
|
|
174
|
+
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
175
|
+
|
|
176
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
177
|
+
return typeof it == 'symbol';
|
|
178
|
+
} : function (it) {
|
|
179
|
+
var $Symbol = getBuiltIn$1('Symbol');
|
|
180
|
+
return isCallable$7($Symbol) && Object(it) instanceof $Symbol;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
var tryToString$1 = function (argument) {
|
|
184
|
+
try {
|
|
185
|
+
return String(argument);
|
|
186
|
+
} catch (error) {
|
|
187
|
+
return 'Object';
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
var isCallable$6 = isCallable$a;
|
|
192
|
+
var tryToString = tryToString$1;
|
|
193
|
+
|
|
194
|
+
// `Assert: IsCallable(argument) is true`
|
|
195
|
+
var aCallable$1 = function (argument) {
|
|
196
|
+
if (isCallable$6(argument)) return argument;
|
|
197
|
+
throw TypeError(tryToString(argument) + ' is not a function');
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
var aCallable = aCallable$1;
|
|
201
|
+
|
|
202
|
+
// `GetMethod` abstract operation
|
|
203
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
204
|
+
var getMethod$1 = function (V, P) {
|
|
205
|
+
var func = V[P];
|
|
206
|
+
return func == null ? undefined : aCallable(func);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var isCallable$5 = isCallable$a;
|
|
210
|
+
var isObject$4 = isObject$5;
|
|
211
|
+
|
|
212
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
213
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
214
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
215
|
+
var fn, val;
|
|
216
|
+
if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = fn.call(input))) return val;
|
|
217
|
+
if (isCallable$5(fn = input.valueOf) && !isObject$4(val = fn.call(input))) return val;
|
|
218
|
+
if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = fn.call(input))) return val;
|
|
219
|
+
throw TypeError("Can't convert object to primitive value");
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var shared$3 = {exports: {}};
|
|
223
|
+
|
|
224
|
+
var global$9 = global$c;
|
|
225
|
+
|
|
226
|
+
var setGlobal$3 = function (key, value) {
|
|
227
|
+
try {
|
|
228
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
229
|
+
Object.defineProperty(global$9, key, { value: value, configurable: true, writable: true });
|
|
230
|
+
} catch (error) {
|
|
231
|
+
global$9[key] = value;
|
|
232
|
+
} return value;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
var global$8 = global$c;
|
|
236
|
+
var setGlobal$2 = setGlobal$3;
|
|
237
|
+
|
|
238
|
+
var SHARED = '__core-js_shared__';
|
|
239
|
+
var store$3 = global$8[SHARED] || setGlobal$2(SHARED, {});
|
|
240
|
+
|
|
241
|
+
var sharedStore = store$3;
|
|
242
|
+
|
|
243
|
+
var store$2 = sharedStore;
|
|
244
|
+
|
|
245
|
+
(shared$3.exports = function (key, value) {
|
|
246
|
+
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
247
|
+
})('versions', []).push({
|
|
248
|
+
version: '3.18.3',
|
|
249
|
+
mode: 'global',
|
|
250
|
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
var requireObjectCoercible$1 = requireObjectCoercible$3;
|
|
254
|
+
|
|
255
|
+
// `ToObject` abstract operation
|
|
256
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
257
|
+
var toObject$1 = function (argument) {
|
|
258
|
+
return Object(requireObjectCoercible$1(argument));
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
var toObject = toObject$1;
|
|
262
|
+
|
|
263
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
264
|
+
|
|
265
|
+
// `HasOwnProperty` abstract operation
|
|
266
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
267
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
268
|
+
return hasOwnProperty.call(toObject(it), key);
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
var id = 0;
|
|
272
|
+
var postfix = Math.random();
|
|
273
|
+
|
|
274
|
+
var uid$2 = function (key) {
|
|
275
|
+
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
var global$7 = global$c;
|
|
279
|
+
var shared$2 = shared$3.exports;
|
|
280
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
281
|
+
var uid$1 = uid$2;
|
|
282
|
+
var NATIVE_SYMBOL = nativeSymbol;
|
|
283
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
284
|
+
|
|
285
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
286
|
+
var Symbol$2 = global$7.Symbol;
|
|
287
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
|
|
288
|
+
|
|
289
|
+
var wellKnownSymbol$3 = function (name) {
|
|
290
|
+
if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
291
|
+
if (NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)) {
|
|
292
|
+
WellKnownSymbolsStore[name] = Symbol$2[name];
|
|
293
|
+
} else {
|
|
294
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
295
|
+
}
|
|
296
|
+
} return WellKnownSymbolsStore[name];
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
var isObject$3 = isObject$5;
|
|
300
|
+
var isSymbol$1 = isSymbol$2;
|
|
301
|
+
var getMethod = getMethod$1;
|
|
302
|
+
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
303
|
+
var wellKnownSymbol$2 = wellKnownSymbol$3;
|
|
304
|
+
|
|
305
|
+
var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
|
|
306
|
+
|
|
307
|
+
// `ToPrimitive` abstract operation
|
|
308
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
309
|
+
var toPrimitive$1 = function (input, pref) {
|
|
310
|
+
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
311
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
312
|
+
var result;
|
|
313
|
+
if (exoticToPrim) {
|
|
314
|
+
if (pref === undefined) pref = 'default';
|
|
315
|
+
result = exoticToPrim.call(input, pref);
|
|
316
|
+
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
317
|
+
throw TypeError("Can't convert object to primitive value");
|
|
318
|
+
}
|
|
319
|
+
if (pref === undefined) pref = 'number';
|
|
320
|
+
return ordinaryToPrimitive(input, pref);
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
var toPrimitive = toPrimitive$1;
|
|
324
|
+
var isSymbol = isSymbol$2;
|
|
325
|
+
|
|
326
|
+
// `ToPropertyKey` abstract operation
|
|
327
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
328
|
+
var toPropertyKey$2 = function (argument) {
|
|
329
|
+
var key = toPrimitive(argument, 'string');
|
|
330
|
+
return isSymbol(key) ? key : String(key);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
var global$6 = global$c;
|
|
334
|
+
var isObject$2 = isObject$5;
|
|
335
|
+
|
|
336
|
+
var document = global$6.document;
|
|
337
|
+
// typeof document.createElement is 'object' in old IE
|
|
338
|
+
var EXISTS$1 = isObject$2(document) && isObject$2(document.createElement);
|
|
339
|
+
|
|
340
|
+
var documentCreateElement = function (it) {
|
|
341
|
+
return EXISTS$1 ? document.createElement(it) : {};
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
var DESCRIPTORS$4 = descriptors;
|
|
345
|
+
var fails$2 = fails$6;
|
|
346
|
+
var createElement = documentCreateElement;
|
|
347
|
+
|
|
348
|
+
// Thank's IE8 for his funny defineProperty
|
|
349
|
+
var ie8DomDefine = !DESCRIPTORS$4 && !fails$2(function () {
|
|
350
|
+
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing
|
|
351
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
352
|
+
get: function () { return 7; }
|
|
353
|
+
}).a != 7;
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
var DESCRIPTORS$3 = descriptors;
|
|
357
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
358
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
359
|
+
var toIndexedObject$2 = toIndexedObject$3;
|
|
360
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
361
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
362
|
+
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
363
|
+
|
|
364
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
365
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
366
|
+
|
|
367
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
368
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
369
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
370
|
+
O = toIndexedObject$2(O);
|
|
371
|
+
P = toPropertyKey$1(P);
|
|
372
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
373
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
374
|
+
} catch (error) { /* empty */ }
|
|
375
|
+
if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!propertyIsEnumerableModule.f.call(O, P), O[P]);
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
var objectDefineProperty = {};
|
|
379
|
+
|
|
380
|
+
var isObject$1 = isObject$5;
|
|
381
|
+
|
|
382
|
+
// `Assert: Type(argument) is Object`
|
|
383
|
+
var anObject$2 = function (argument) {
|
|
384
|
+
if (isObject$1(argument)) return argument;
|
|
385
|
+
throw TypeError(String(argument) + ' is not an object');
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
var DESCRIPTORS$2 = descriptors;
|
|
389
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
390
|
+
var anObject$1 = anObject$2;
|
|
391
|
+
var toPropertyKey = toPropertyKey$2;
|
|
392
|
+
|
|
393
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
394
|
+
var $defineProperty = Object.defineProperty;
|
|
395
|
+
|
|
396
|
+
// `Object.defineProperty` method
|
|
397
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
398
|
+
objectDefineProperty.f = DESCRIPTORS$2 ? $defineProperty : function defineProperty(O, P, Attributes) {
|
|
399
|
+
anObject$1(O);
|
|
400
|
+
P = toPropertyKey(P);
|
|
401
|
+
anObject$1(Attributes);
|
|
402
|
+
if (IE8_DOM_DEFINE) try {
|
|
403
|
+
return $defineProperty(O, P, Attributes);
|
|
404
|
+
} catch (error) { /* empty */ }
|
|
405
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
406
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
407
|
+
return O;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
var DESCRIPTORS$1 = descriptors;
|
|
411
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
412
|
+
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
413
|
+
|
|
414
|
+
var createNonEnumerableProperty$3 = DESCRIPTORS$1 ? function (object, key, value) {
|
|
415
|
+
return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
|
|
416
|
+
} : function (object, key, value) {
|
|
417
|
+
object[key] = value;
|
|
418
|
+
return object;
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
var redefine$1 = {exports: {}};
|
|
422
|
+
|
|
423
|
+
var isCallable$4 = isCallable$a;
|
|
424
|
+
var store$1 = sharedStore;
|
|
425
|
+
|
|
426
|
+
var functionToString = Function.toString;
|
|
427
|
+
|
|
428
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
429
|
+
if (!isCallable$4(store$1.inspectSource)) {
|
|
430
|
+
store$1.inspectSource = function (it) {
|
|
431
|
+
return functionToString.call(it);
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
var inspectSource$2 = store$1.inspectSource;
|
|
436
|
+
|
|
437
|
+
var global$5 = global$c;
|
|
438
|
+
var isCallable$3 = isCallable$a;
|
|
439
|
+
var inspectSource$1 = inspectSource$2;
|
|
440
|
+
|
|
441
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
442
|
+
|
|
443
|
+
var nativeWeakMap = isCallable$3(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
444
|
+
|
|
445
|
+
var shared$1 = shared$3.exports;
|
|
446
|
+
var uid = uid$2;
|
|
447
|
+
|
|
448
|
+
var keys = shared$1('keys');
|
|
449
|
+
|
|
450
|
+
var sharedKey$1 = function (key) {
|
|
451
|
+
return keys[key] || (keys[key] = uid(key));
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
var hiddenKeys$3 = {};
|
|
455
|
+
|
|
456
|
+
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
457
|
+
var global$4 = global$c;
|
|
458
|
+
var isObject = isObject$5;
|
|
459
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
|
|
460
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
461
|
+
var shared = sharedStore;
|
|
462
|
+
var sharedKey = sharedKey$1;
|
|
463
|
+
var hiddenKeys$2 = hiddenKeys$3;
|
|
464
|
+
|
|
465
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
466
|
+
var WeakMap = global$4.WeakMap;
|
|
467
|
+
var set, get, has;
|
|
468
|
+
|
|
469
|
+
var enforce = function (it) {
|
|
470
|
+
return has(it) ? get(it) : set(it, {});
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
var getterFor = function (TYPE) {
|
|
474
|
+
return function (it) {
|
|
475
|
+
var state;
|
|
476
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
477
|
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
478
|
+
} return state;
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
483
|
+
var store = shared.state || (shared.state = new WeakMap());
|
|
484
|
+
var wmget = store.get;
|
|
485
|
+
var wmhas = store.has;
|
|
486
|
+
var wmset = store.set;
|
|
487
|
+
set = function (it, metadata) {
|
|
488
|
+
if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
489
|
+
metadata.facade = it;
|
|
490
|
+
wmset.call(store, it, metadata);
|
|
491
|
+
return metadata;
|
|
492
|
+
};
|
|
493
|
+
get = function (it) {
|
|
494
|
+
return wmget.call(store, it) || {};
|
|
495
|
+
};
|
|
496
|
+
has = function (it) {
|
|
497
|
+
return wmhas.call(store, it);
|
|
498
|
+
};
|
|
499
|
+
} else {
|
|
500
|
+
var STATE = sharedKey('state');
|
|
501
|
+
hiddenKeys$2[STATE] = true;
|
|
502
|
+
set = function (it, metadata) {
|
|
503
|
+
if (hasOwn$4(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
504
|
+
metadata.facade = it;
|
|
505
|
+
createNonEnumerableProperty$2(it, STATE, metadata);
|
|
506
|
+
return metadata;
|
|
507
|
+
};
|
|
508
|
+
get = function (it) {
|
|
509
|
+
return hasOwn$4(it, STATE) ? it[STATE] : {};
|
|
510
|
+
};
|
|
511
|
+
has = function (it) {
|
|
512
|
+
return hasOwn$4(it, STATE);
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
var internalState = {
|
|
517
|
+
set: set,
|
|
518
|
+
get: get,
|
|
519
|
+
has: has,
|
|
520
|
+
enforce: enforce,
|
|
521
|
+
getterFor: getterFor
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
var DESCRIPTORS = descriptors;
|
|
525
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
526
|
+
|
|
527
|
+
var FunctionPrototype = Function.prototype;
|
|
528
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
529
|
+
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
|
530
|
+
|
|
531
|
+
var EXISTS = hasOwn$3(FunctionPrototype, 'name');
|
|
532
|
+
// additional protection from minified / mangled / dropped function names
|
|
533
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
534
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
535
|
+
|
|
536
|
+
var functionName = {
|
|
537
|
+
EXISTS: EXISTS,
|
|
538
|
+
PROPER: PROPER,
|
|
539
|
+
CONFIGURABLE: CONFIGURABLE
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
var global$3 = global$c;
|
|
543
|
+
var isCallable$2 = isCallable$a;
|
|
544
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
545
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
|
|
546
|
+
var setGlobal$1 = setGlobal$3;
|
|
547
|
+
var inspectSource = inspectSource$2;
|
|
548
|
+
var InternalStateModule = internalState;
|
|
549
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
550
|
+
|
|
551
|
+
var getInternalState = InternalStateModule.get;
|
|
552
|
+
var enforceInternalState = InternalStateModule.enforce;
|
|
553
|
+
var TEMPLATE = String(String).split('String');
|
|
554
|
+
|
|
555
|
+
(redefine$1.exports = function (O, key, value, options) {
|
|
556
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
557
|
+
var simple = options ? !!options.enumerable : false;
|
|
558
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
559
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
560
|
+
var state;
|
|
561
|
+
if (isCallable$2(value)) {
|
|
562
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
563
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
564
|
+
}
|
|
565
|
+
if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
566
|
+
createNonEnumerableProperty$1(value, 'name', name);
|
|
567
|
+
}
|
|
568
|
+
state = enforceInternalState(value);
|
|
569
|
+
if (!state.source) {
|
|
570
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
if (O === global$3) {
|
|
574
|
+
if (simple) O[key] = value;
|
|
575
|
+
else setGlobal$1(key, value);
|
|
576
|
+
return;
|
|
577
|
+
} else if (!unsafe) {
|
|
578
|
+
delete O[key];
|
|
579
|
+
} else if (!noTargetGet && O[key]) {
|
|
580
|
+
simple = true;
|
|
581
|
+
}
|
|
582
|
+
if (simple) O[key] = value;
|
|
583
|
+
else createNonEnumerableProperty$1(O, key, value);
|
|
584
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
585
|
+
})(Function.prototype, 'toString', function toString() {
|
|
586
|
+
return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
var objectGetOwnPropertyNames = {};
|
|
590
|
+
|
|
591
|
+
var ceil = Math.ceil;
|
|
592
|
+
var floor = Math.floor;
|
|
593
|
+
|
|
594
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
595
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
596
|
+
var toIntegerOrInfinity$2 = function (argument) {
|
|
597
|
+
var number = +argument;
|
|
598
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
599
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
603
|
+
|
|
604
|
+
var max = Math.max;
|
|
605
|
+
var min$1 = Math.min;
|
|
606
|
+
|
|
607
|
+
// Helper for a popular repeating case of the spec:
|
|
608
|
+
// Let integer be ? ToInteger(index).
|
|
609
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
610
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
611
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
612
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
616
|
+
|
|
617
|
+
var min = Math.min;
|
|
618
|
+
|
|
619
|
+
// `ToLength` abstract operation
|
|
620
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
621
|
+
var toLength$1 = function (argument) {
|
|
622
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
var toLength = toLength$1;
|
|
626
|
+
|
|
627
|
+
// `LengthOfArrayLike` abstract operation
|
|
628
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
629
|
+
var lengthOfArrayLike$1 = function (obj) {
|
|
630
|
+
return toLength(obj.length);
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
var toIndexedObject$1 = toIndexedObject$3;
|
|
634
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
635
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
636
|
+
|
|
637
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
638
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
|
639
|
+
return function ($this, el, fromIndex) {
|
|
640
|
+
var O = toIndexedObject$1($this);
|
|
641
|
+
var length = lengthOfArrayLike(O);
|
|
642
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
643
|
+
var value;
|
|
644
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
645
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
646
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
647
|
+
value = O[index++];
|
|
648
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
649
|
+
if (value != value) return true;
|
|
650
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
651
|
+
} else for (;length > index; index++) {
|
|
652
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
653
|
+
} return !IS_INCLUDES && -1;
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
var arrayIncludes = {
|
|
658
|
+
// `Array.prototype.includes` method
|
|
659
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
660
|
+
includes: createMethod$1(true),
|
|
661
|
+
// `Array.prototype.indexOf` method
|
|
662
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
663
|
+
indexOf: createMethod$1(false)
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
667
|
+
var toIndexedObject = toIndexedObject$3;
|
|
668
|
+
var indexOf = arrayIncludes.indexOf;
|
|
669
|
+
var hiddenKeys$1 = hiddenKeys$3;
|
|
670
|
+
|
|
671
|
+
var objectKeysInternal = function (object, names) {
|
|
672
|
+
var O = toIndexedObject(object);
|
|
673
|
+
var i = 0;
|
|
674
|
+
var result = [];
|
|
675
|
+
var key;
|
|
676
|
+
for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && result.push(key);
|
|
677
|
+
// Don't enum bug & hidden keys
|
|
678
|
+
while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
|
|
679
|
+
~indexOf(result, key) || result.push(key);
|
|
680
|
+
}
|
|
681
|
+
return result;
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
// IE8- don't enum bug keys
|
|
685
|
+
var enumBugKeys$1 = [
|
|
686
|
+
'constructor',
|
|
687
|
+
'hasOwnProperty',
|
|
688
|
+
'isPrototypeOf',
|
|
689
|
+
'propertyIsEnumerable',
|
|
690
|
+
'toLocaleString',
|
|
691
|
+
'toString',
|
|
692
|
+
'valueOf'
|
|
693
|
+
];
|
|
694
|
+
|
|
695
|
+
var internalObjectKeys = objectKeysInternal;
|
|
696
|
+
var enumBugKeys = enumBugKeys$1;
|
|
697
|
+
|
|
698
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
699
|
+
|
|
700
|
+
// `Object.getOwnPropertyNames` method
|
|
701
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
702
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
703
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
704
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
var objectGetOwnPropertySymbols = {};
|
|
708
|
+
|
|
709
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
710
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
711
|
+
|
|
712
|
+
var getBuiltIn = getBuiltIn$3;
|
|
713
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
714
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
715
|
+
var anObject = anObject$2;
|
|
716
|
+
|
|
717
|
+
// all object keys, includes non-enumerable and symbols
|
|
718
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
719
|
+
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
720
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
721
|
+
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
var hasOwn = hasOwnProperty_1;
|
|
725
|
+
var ownKeys = ownKeys$1;
|
|
726
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
727
|
+
var definePropertyModule = objectDefineProperty;
|
|
728
|
+
|
|
729
|
+
var copyConstructorProperties$1 = function (target, source) {
|
|
730
|
+
var keys = ownKeys(source);
|
|
731
|
+
var defineProperty = definePropertyModule.f;
|
|
732
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
733
|
+
for (var i = 0; i < keys.length; i++) {
|
|
734
|
+
var key = keys[i];
|
|
735
|
+
if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
var fails$1 = fails$6;
|
|
740
|
+
var isCallable$1 = isCallable$a;
|
|
741
|
+
|
|
742
|
+
var replacement = /#|\.prototype\./;
|
|
743
|
+
|
|
744
|
+
var isForced$1 = function (feature, detection) {
|
|
745
|
+
var value = data[normalize(feature)];
|
|
746
|
+
return value == POLYFILL ? true
|
|
747
|
+
: value == NATIVE ? false
|
|
748
|
+
: isCallable$1(detection) ? fails$1(detection)
|
|
749
|
+
: !!detection;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
753
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
var data = isForced$1.data = {};
|
|
757
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
758
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
759
|
+
|
|
760
|
+
var isForced_1 = isForced$1;
|
|
761
|
+
|
|
762
|
+
var global$2 = global$c;
|
|
763
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
764
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$3;
|
|
765
|
+
var redefine = redefine$1.exports;
|
|
766
|
+
var setGlobal = setGlobal$3;
|
|
767
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
768
|
+
var isForced = isForced_1;
|
|
769
|
+
|
|
770
|
+
/*
|
|
771
|
+
options.target - name of the target object
|
|
772
|
+
options.global - target is the global object
|
|
773
|
+
options.stat - export as static methods of target
|
|
774
|
+
options.proto - export as prototype methods of target
|
|
775
|
+
options.real - real prototype method for the `pure` version
|
|
776
|
+
options.forced - export even if the native feature is available
|
|
777
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
778
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
779
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
780
|
+
options.sham - add a flag to not completely full polyfills
|
|
781
|
+
options.enumerable - export as enumerable property
|
|
782
|
+
options.noTargetGet - prevent calling a getter on target
|
|
783
|
+
options.name - the .name of the function if it does not match the key
|
|
784
|
+
*/
|
|
785
|
+
var _export = function (options, source) {
|
|
786
|
+
var TARGET = options.target;
|
|
787
|
+
var GLOBAL = options.global;
|
|
788
|
+
var STATIC = options.stat;
|
|
789
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
790
|
+
if (GLOBAL) {
|
|
791
|
+
target = global$2;
|
|
792
|
+
} else if (STATIC) {
|
|
793
|
+
target = global$2[TARGET] || setGlobal(TARGET, {});
|
|
794
|
+
} else {
|
|
795
|
+
target = (global$2[TARGET] || {}).prototype;
|
|
796
|
+
}
|
|
797
|
+
if (target) for (key in source) {
|
|
798
|
+
sourceProperty = source[key];
|
|
799
|
+
if (options.noTargetGet) {
|
|
800
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
801
|
+
targetProperty = descriptor && descriptor.value;
|
|
802
|
+
} else targetProperty = target[key];
|
|
803
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
804
|
+
// contained in target
|
|
805
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
806
|
+
if (typeof sourceProperty === typeof targetProperty) continue;
|
|
807
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
808
|
+
}
|
|
809
|
+
// add a flag to not completely full polyfills
|
|
810
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
811
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
812
|
+
}
|
|
813
|
+
// extend global
|
|
814
|
+
redefine(target, key, sourceProperty, options);
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
var wellKnownSymbol$1 = wellKnownSymbol$3;
|
|
819
|
+
|
|
820
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
821
|
+
var test = {};
|
|
822
|
+
|
|
823
|
+
test[TO_STRING_TAG$1] = 'z';
|
|
824
|
+
|
|
825
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
826
|
+
|
|
827
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
828
|
+
var isCallable = isCallable$a;
|
|
829
|
+
var classofRaw = classofRaw$1;
|
|
830
|
+
var wellKnownSymbol = wellKnownSymbol$3;
|
|
831
|
+
|
|
832
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
833
|
+
// ES3 wrong here
|
|
834
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
835
|
+
|
|
836
|
+
// fallback for IE11 Script Access Denied error
|
|
837
|
+
var tryGet = function (it, key) {
|
|
838
|
+
try {
|
|
839
|
+
return it[key];
|
|
840
|
+
} catch (error) { /* empty */ }
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
844
|
+
var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
845
|
+
var O, tag, result;
|
|
846
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
847
|
+
// @@toStringTag case
|
|
848
|
+
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
849
|
+
// builtinTag case
|
|
850
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
851
|
+
// ES3 arguments fallback
|
|
852
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
var classof = classof$1;
|
|
856
|
+
|
|
857
|
+
var toString$2 = function (argument) {
|
|
858
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
859
|
+
return String(argument);
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
// a string of all valid unicode whitespaces
|
|
863
|
+
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
864
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
865
|
+
|
|
866
|
+
var requireObjectCoercible = requireObjectCoercible$3;
|
|
867
|
+
var toString$1 = toString$2;
|
|
868
|
+
var whitespaces$1 = whitespaces$2;
|
|
869
|
+
|
|
870
|
+
var whitespace = '[' + whitespaces$1 + ']';
|
|
871
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
872
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
873
|
+
|
|
874
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
875
|
+
var createMethod = function (TYPE) {
|
|
876
|
+
return function ($this) {
|
|
877
|
+
var string = toString$1(requireObjectCoercible($this));
|
|
878
|
+
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
879
|
+
if (TYPE & 2) string = string.replace(rtrim, '');
|
|
880
|
+
return string;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
var stringTrim = {
|
|
885
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
886
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
887
|
+
start: createMethod(1),
|
|
888
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
889
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
890
|
+
end: createMethod(2),
|
|
891
|
+
// `String.prototype.trim` method
|
|
892
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
893
|
+
trim: createMethod(3)
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
var global$1 = global$c;
|
|
897
|
+
var fails = fails$6;
|
|
898
|
+
var toString = toString$2;
|
|
899
|
+
var trim = stringTrim.trim;
|
|
900
|
+
var whitespaces = whitespaces$2;
|
|
901
|
+
|
|
902
|
+
var $parseInt$1 = global$1.parseInt;
|
|
903
|
+
var Symbol$1 = global$1.Symbol;
|
|
904
|
+
var ITERATOR = Symbol$1 && Symbol$1.iterator;
|
|
905
|
+
var hex = /^[+-]?0x/i;
|
|
906
|
+
var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
|
|
907
|
+
// MS Edge 18- broken with boxed symbols
|
|
908
|
+
|| (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
|
|
909
|
+
|
|
910
|
+
// `parseInt` method
|
|
911
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
912
|
+
var numberParseInt = FORCED ? function parseInt(string, radix) {
|
|
913
|
+
var S = trim(toString(string));
|
|
914
|
+
return $parseInt$1(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
|
915
|
+
} : $parseInt$1;
|
|
916
|
+
|
|
917
|
+
var $ = _export;
|
|
918
|
+
var $parseInt = numberParseInt;
|
|
919
|
+
|
|
920
|
+
// `parseInt` method
|
|
921
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
922
|
+
$({ global: true, forced: parseInt != $parseInt }, {
|
|
923
|
+
parseInt: $parseInt
|
|
924
|
+
});
|
|
925
|
+
|
|
5
926
|
const GERESH = '׳';
|
|
6
927
|
const GERSHAYIM = '״';
|
|
7
928
|
/**
|
|
@@ -83,7 +1004,9 @@ function num2heb(num) {
|
|
|
83
1004
|
}
|
|
84
1005
|
}
|
|
85
1006
|
/**
|
|
86
|
-
*
|
|
1007
|
+
* Converts a numerical value to a string of Hebrew letters
|
|
1008
|
+
* @example
|
|
1009
|
+
* gematriya(5774) // תשע״ד - cropped to 774
|
|
87
1010
|
* @param {number} number
|
|
88
1011
|
* @return {string}
|
|
89
1012
|
*/
|
|
@@ -164,7 +1087,7 @@ const monthLengths = [[0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], [0, 3
|
|
|
164
1087
|
* @return {number}
|
|
165
1088
|
*/
|
|
166
1089
|
|
|
167
|
-
function mod
|
|
1090
|
+
function mod(x, y) {
|
|
168
1091
|
return x - y * Math.floor(x / y);
|
|
169
1092
|
}
|
|
170
1093
|
/**
|
|
@@ -174,7 +1097,6 @@ function mod$1(x, y) {
|
|
|
174
1097
|
* @return {number}
|
|
175
1098
|
*/
|
|
176
1099
|
|
|
177
|
-
|
|
178
1100
|
function quotient(x, y) {
|
|
179
1101
|
return Math.floor(x / y);
|
|
180
1102
|
}
|
|
@@ -257,7 +1179,8 @@ const greg = {
|
|
|
257
1179
|
|
|
258
1180
|
const year = date.getFullYear() - 1;
|
|
259
1181
|
return this.dayOfYear(date) + // days this year
|
|
260
|
-
365 * year + (
|
|
1182
|
+
365 * year + ( // + days in prior years
|
|
1183
|
+
Math.floor(year / 4) - // + Julian Leap years
|
|
261
1184
|
Math.floor(year / 100) + // - century years
|
|
262
1185
|
Math.floor(year / 400)); // + Gregorian leap years
|
|
263
1186
|
},
|
|
@@ -270,11 +1193,11 @@ const greg = {
|
|
|
270
1193
|
yearFromFixed: function yearFromFixed(theDate) {
|
|
271
1194
|
const l0 = theDate - 1;
|
|
272
1195
|
const n400 = quotient(l0, 146097);
|
|
273
|
-
const d1 = mod
|
|
1196
|
+
const d1 = mod(l0, 146097);
|
|
274
1197
|
const n100 = quotient(d1, 36524);
|
|
275
|
-
const d2 = mod
|
|
1198
|
+
const d2 = mod(d1, 36524);
|
|
276
1199
|
const n4 = quotient(d2, 1461);
|
|
277
|
-
const d3 = mod
|
|
1200
|
+
const d3 = mod(d2, 1461);
|
|
278
1201
|
const n1 = quotient(d3, 365);
|
|
279
1202
|
const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
|
|
280
1203
|
return n100 != 4 && n1 != 4 ? year + 1 : year;
|
|
@@ -306,6 +1229,7 @@ const greg = {
|
|
|
306
1229
|
throw new TypeError('Argument to greg.abs2greg not a Number');
|
|
307
1230
|
}
|
|
308
1231
|
|
|
1232
|
+
theDate = Math.trunc(theDate);
|
|
309
1233
|
const year = this.yearFromFixed(theDate);
|
|
310
1234
|
const priorDays = theDate - this.toFixed(year, 1, 1);
|
|
311
1235
|
const correction = theDate < this.toFixed(year, 3, 1) ? 0 : this.isLeapYear(year) ? 1 : 2;
|
|
@@ -437,10 +1361,12 @@ const Locale = {
|
|
|
437
1361
|
ordinal: function ordinal(n, locale) {
|
|
438
1362
|
const locale0 = locale || this.activeName;
|
|
439
1363
|
|
|
440
|
-
if (!locale0 || locale0 === 'en' || 'ashkenazi' === locale0.substring(0, 9)) {
|
|
1364
|
+
if (!locale0 || locale0 === 'en' || locale0 === 's' || 'ashkenazi' === locale0.substring(0, 9)) {
|
|
441
1365
|
return this.getEnOrdinal(n);
|
|
442
1366
|
} else if (locale0 == 'es') {
|
|
443
1367
|
return n + 'º';
|
|
1368
|
+
} else if (locale0 == 'he') {
|
|
1369
|
+
return String(n);
|
|
444
1370
|
} else {
|
|
445
1371
|
return n + '.';
|
|
446
1372
|
}
|
|
@@ -471,26 +1397,6 @@ Locale.addLocale('s', noopLocale);
|
|
|
471
1397
|
Locale.addLocale('', noopLocale);
|
|
472
1398
|
Locale.useLocale('en');
|
|
473
1399
|
|
|
474
|
-
/*
|
|
475
|
-
Hebcal - A Jewish Calendar Generator
|
|
476
|
-
Copyright (c) 1994-2020 Danny Sadinoff
|
|
477
|
-
Portions copyright Eyal Schachter and Michael J. Radwin
|
|
478
|
-
|
|
479
|
-
https://github.com/hebcal/hebcal-es6
|
|
480
|
-
|
|
481
|
-
This program is free software; you can redistribute it and/or
|
|
482
|
-
modify it under the terms of the GNU General Public License
|
|
483
|
-
as published by the Free Software Foundation; either version 2
|
|
484
|
-
of the License, or (at your option) any later version.
|
|
485
|
-
|
|
486
|
-
This program is distributed in the hope that it will be useful,
|
|
487
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
488
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
489
|
-
GNU General Public License for more details.
|
|
490
|
-
|
|
491
|
-
You should have received a copy of the GNU General Public License
|
|
492
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
493
|
-
*/
|
|
494
1400
|
const NISAN = 1;
|
|
495
1401
|
const IYYAR = 2;
|
|
496
1402
|
const SIVAN = 3;
|
|
@@ -564,7 +1470,9 @@ function throwTypeError(msg) {
|
|
|
564
1470
|
}
|
|
565
1471
|
|
|
566
1472
|
const edCache = Object.create(null);
|
|
567
|
-
const EPOCH = -1373428;
|
|
1473
|
+
const EPOCH = -1373428; // Avg year length in the cycle (19 solar years with 235 lunar months)
|
|
1474
|
+
|
|
1475
|
+
const AVG_HEBYEAR_DAYS = 365.24682220597794;
|
|
568
1476
|
const UNITS_DAY = 'day';
|
|
569
1477
|
const UNITS_WEEK = 'week';
|
|
570
1478
|
const UNITS_MONTH = 'month';
|
|
@@ -895,8 +1803,9 @@ class HDate {
|
|
|
895
1803
|
throw new TypeError("invalid parameter to abs2hebrew ".concat(abs));
|
|
896
1804
|
}
|
|
897
1805
|
|
|
898
|
-
|
|
899
|
-
|
|
1806
|
+
abs = Math.trunc(abs); // first, quickly approximate year
|
|
1807
|
+
|
|
1808
|
+
let year = Math.floor((abs - EPOCH) / AVG_HEBYEAR_DAYS);
|
|
900
1809
|
|
|
901
1810
|
while (HDate.newYear(year) <= abs) {
|
|
902
1811
|
++year;
|
|
@@ -909,7 +1818,7 @@ class HDate {
|
|
|
909
1818
|
++month;
|
|
910
1819
|
}
|
|
911
1820
|
|
|
912
|
-
const day =
|
|
1821
|
+
const day = 1 + abs - HDate.hebrew2abs(year, month, 1);
|
|
913
1822
|
return {
|
|
914
1823
|
yy: year,
|
|
915
1824
|
mm: month,
|
|
@@ -933,21 +1842,23 @@ class HDate {
|
|
|
933
1842
|
*
|
|
934
1843
|
* const hd = new HDate(15, months.CHESHVAN, 5769);
|
|
935
1844
|
* console.log(hd.render()); // '15th of Cheshvan, 5769'
|
|
936
|
-
* console.log(hd.render('he')); // '15
|
|
1845
|
+
* console.log(hd.render('he')); // '15 חֶשְׁוָן, 5769'
|
|
937
1846
|
* @param {string} [locale] Optional locale name (defaults to active locale).
|
|
1847
|
+
* @param {boolean} [showYear=true] Display year (defaults to true).
|
|
938
1848
|
* @return {string}
|
|
939
1849
|
*/
|
|
940
1850
|
|
|
941
1851
|
|
|
942
|
-
render(
|
|
1852
|
+
render() {
|
|
1853
|
+
let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1854
|
+
let showYear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
943
1855
|
const locale0 = locale || Locale.getLocaleName();
|
|
944
1856
|
const day = this.getDate();
|
|
945
|
-
const fullYear = this.getFullYear();
|
|
946
1857
|
const monthName = Locale.gettext(this.getMonthName(), locale);
|
|
947
1858
|
const nth = Locale.ordinal(day, locale0);
|
|
948
1859
|
let dayOf = '';
|
|
949
1860
|
|
|
950
|
-
if (locale0
|
|
1861
|
+
if (locale0 === 'en' || locale0 === 's' || 'ashkenazi' == locale0.substring(0, 9)) {
|
|
951
1862
|
dayOf = ' of';
|
|
952
1863
|
} else {
|
|
953
1864
|
const ofStr = Locale.lookupTranslation('of', locale0);
|
|
@@ -957,7 +1868,14 @@ class HDate {
|
|
|
957
1868
|
}
|
|
958
1869
|
}
|
|
959
1870
|
|
|
960
|
-
|
|
1871
|
+
const dateStr = "".concat(nth).concat(dayOf, " ").concat(monthName);
|
|
1872
|
+
|
|
1873
|
+
if (showYear) {
|
|
1874
|
+
const fullYear = this.getFullYear();
|
|
1875
|
+
return "".concat(dateStr, ", ").concat(fullYear);
|
|
1876
|
+
} else {
|
|
1877
|
+
return dateStr;
|
|
1878
|
+
}
|
|
961
1879
|
}
|
|
962
1880
|
/**
|
|
963
1881
|
* Renders this Hebrew date in Hebrew gematriya, regardless of locale.
|
|
@@ -1492,22 +2410,11 @@ class HDate {
|
|
|
1492
2410
|
}
|
|
1493
2411
|
|
|
1494
2412
|
}
|
|
1495
|
-
/**
|
|
1496
|
-
* @private
|
|
1497
|
-
* @param {number} x
|
|
1498
|
-
* @param {number} y
|
|
1499
|
-
* @return {number}
|
|
1500
|
-
*/
|
|
1501
|
-
|
|
1502
|
-
function mod(x, y) {
|
|
1503
|
-
return x - y * Math.floor(x / y);
|
|
1504
|
-
}
|
|
1505
2413
|
/**
|
|
1506
2414
|
* @private
|
|
1507
2415
|
* @param {HDate} date
|
|
1508
2416
|
*/
|
|
1509
2417
|
|
|
1510
|
-
|
|
1511
2418
|
function fix(date) {
|
|
1512
2419
|
fixMonth(date);
|
|
1513
2420
|
fixDate(date);
|
|
@@ -1577,9 +2484,9 @@ function onOrBefore(day, t, offset) {
|
|
|
1577
2484
|
return new HDate(HDate.dayOnOrBefore(day, t.abs() + offset));
|
|
1578
2485
|
}
|
|
1579
2486
|
|
|
1580
|
-
var version="3.26.
|
|
2487
|
+
var version="3.26.6";
|
|
1581
2488
|
|
|
1582
|
-
var headers={"plural-forms":"nplurals=2; plural=(n > 1);",language:"he"};var contexts={"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["
|
|
2489
|
+
var headers={"plural-forms":"nplurals=2; plural=(n > 1);",language:"he"};var contexts={"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}};var poHeMin = {headers:headers,contexts:contexts};
|
|
1583
2490
|
|
|
1584
2491
|
Locale.addLocale('he', poHeMin);
|
|
1585
2492
|
Locale.addLocale('h', poHeMin);
|
|
@@ -1595,4 +2502,4 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
1595
2502
|
|
|
1596
2503
|
return exports;
|
|
1597
2504
|
|
|
1598
|
-
}({})
|
|
2505
|
+
})({});
|