@alma/widgets 2.3.2 → 2.4.0
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/raw/widgets.js +835 -443
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +835 -443
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +836 -440
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +1255 -811
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +18 -0
- package/dist/types/Widgets/PaymentPlans/classNames.const.d.ts +13 -0
- package/dist/types/test/fixtures.d.ts +40 -0
- package/dist/types/types.d.ts +7 -1
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +7 -13
- package/CHANGELOG.md +0 -247
- package/dist/types/Widgets/EligibilityModal/ModalContainer.test.d.ts +0 -1
- package/dist/types/Widgets/EligibilityModal/modal.test.d.ts +0 -1
- package/dist/types/Widgets/PaymentPlans/PaymentPlans.test.d.ts +0 -1
- package/dist/types/Widgets/PaymentPlans/tests/SuggestedPaymentPlan.d.ts +0 -1
package/dist/raw/widgets.m.js
CHANGED
|
@@ -7,40 +7,44 @@ import noScroll from 'no-scroll';
|
|
|
7
7
|
import { useMediaQuery } from 'react-responsive';
|
|
8
8
|
import { secondsToMilliseconds, isToday } from 'date-fns';
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
var fails = function (exec) {
|
|
11
|
+
try {
|
|
12
|
+
return !!exec();
|
|
13
|
+
} catch (error) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
18
|
+
var functionBindNative = !fails(function () {
|
|
19
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
20
|
+
var test = function () {
|
|
21
|
+
/* empty */
|
|
22
|
+
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
return function (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
|
|
25
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
var FunctionPrototype = Function.prototype;
|
|
29
|
+
var bind = FunctionPrototype.bind;
|
|
30
|
+
var call = FunctionPrototype.call;
|
|
31
|
+
var uncurryThis = functionBindNative && bind.bind(call, call);
|
|
32
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
33
|
+
return fn && uncurryThis(fn);
|
|
34
|
+
} : function (fn) {
|
|
35
|
+
return fn && function () {
|
|
36
|
+
return call.apply(fn, arguments);
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
40
|
+
var ceil = Math.ceil;
|
|
41
|
+
var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation
|
|
42
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
43
|
+
|
|
44
|
+
var toIntegerOrInfinity = function (argument) {
|
|
45
|
+
var number = +argument; // eslint-disable-next-line no-self-compare -- safe
|
|
46
|
+
|
|
47
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
44
48
|
};
|
|
45
49
|
|
|
46
50
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -64,21 +68,241 @@ var check = function (it) {
|
|
|
64
68
|
}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
65
69
|
|
|
66
70
|
|
|
67
|
-
var global_1 = // eslint-disable-next-line no-
|
|
68
|
-
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||
|
|
71
|
+
var global_1 = // eslint-disable-next-line es-x/no-global-this -- safe
|
|
72
|
+
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
73
|
+
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
|
|
69
74
|
function () {
|
|
70
75
|
return this;
|
|
71
76
|
}() || Function('return this')();
|
|
72
77
|
|
|
73
|
-
var
|
|
78
|
+
var defineProperty = Object.defineProperty;
|
|
79
|
+
|
|
80
|
+
var setGlobal = function (key, value) {
|
|
74
81
|
try {
|
|
75
|
-
|
|
82
|
+
defineProperty(global_1, key, {
|
|
83
|
+
value: value,
|
|
84
|
+
configurable: true,
|
|
85
|
+
writable: true
|
|
86
|
+
});
|
|
76
87
|
} catch (error) {
|
|
77
|
-
|
|
88
|
+
global_1[key] = value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return value;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var SHARED = '__core-js_shared__';
|
|
95
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
96
|
+
var sharedStore = store;
|
|
97
|
+
|
|
98
|
+
var shared = createCommonjsModule(function (module) {
|
|
99
|
+
(module.exports = function (key, value) {
|
|
100
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
101
|
+
})('versions', []).push({
|
|
102
|
+
version: '3.22.1',
|
|
103
|
+
mode: 'global',
|
|
104
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
105
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE',
|
|
106
|
+
source: 'https://github.com/zloirock/core-js'
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
var TypeError$1 = global_1.TypeError; // `RequireObjectCoercible` abstract operation
|
|
111
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
112
|
+
|
|
113
|
+
var requireObjectCoercible = function (it) {
|
|
114
|
+
if (it == undefined) throw TypeError$1("Can't call method on " + it);
|
|
115
|
+
return it;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var Object$1 = global_1.Object; // `ToObject` abstract operation
|
|
119
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
120
|
+
|
|
121
|
+
var toObject = function (argument) {
|
|
122
|
+
return Object$1(requireObjectCoercible(argument));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
126
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
127
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
128
|
+
|
|
129
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
130
|
+
return hasOwnProperty(toObject(it), key);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
var id = 0;
|
|
134
|
+
var postfix = Math.random();
|
|
135
|
+
var toString = functionUncurryThis(1.0.toString);
|
|
136
|
+
|
|
137
|
+
var uid = function (key) {
|
|
138
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// `IsCallable` abstract operation
|
|
142
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
143
|
+
var isCallable = function (argument) {
|
|
144
|
+
return typeof argument == 'function';
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
var aFunction = function (argument) {
|
|
148
|
+
return isCallable(argument) ? argument : undefined;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
var getBuiltIn = function (namespace, method) {
|
|
152
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
156
|
+
|
|
157
|
+
var process = global_1.process;
|
|
158
|
+
var Deno = global_1.Deno;
|
|
159
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
160
|
+
var v8 = versions && versions.v8;
|
|
161
|
+
var match, version;
|
|
162
|
+
|
|
163
|
+
if (v8) {
|
|
164
|
+
match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
165
|
+
// but their correct versions are not interesting for us
|
|
166
|
+
|
|
167
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
168
|
+
} // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
169
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
if (!version && engineUserAgent) {
|
|
173
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
174
|
+
|
|
175
|
+
if (!match || match[1] >= 74) {
|
|
176
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
177
|
+
if (match) version = +match[1];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
var engineV8Version = version;
|
|
182
|
+
|
|
183
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
184
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
185
|
+
|
|
186
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
187
|
+
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
|
|
188
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
189
|
+
|
|
190
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
191
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
195
|
+
|
|
196
|
+
var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
197
|
+
|
|
198
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
199
|
+
var Symbol$1 = global_1.Symbol;
|
|
200
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
201
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
202
|
+
|
|
203
|
+
var wellKnownSymbol = function (name) {
|
|
204
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
205
|
+
var description = 'Symbol.' + name;
|
|
206
|
+
|
|
207
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
208
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
209
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
210
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
211
|
+
} else {
|
|
212
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return WellKnownSymbolsStore[name];
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
220
|
+
var test = {};
|
|
221
|
+
test[TO_STRING_TAG] = 'z';
|
|
222
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
223
|
+
|
|
224
|
+
var toString$1 = functionUncurryThis({}.toString);
|
|
225
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
226
|
+
|
|
227
|
+
var classofRaw = function (it) {
|
|
228
|
+
return stringSlice(toString$1(it), 8, -1);
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
232
|
+
var Object$2 = global_1.Object; // ES3 wrong here
|
|
233
|
+
|
|
234
|
+
var CORRECT_ARGUMENTS = classofRaw(function () {
|
|
235
|
+
return arguments;
|
|
236
|
+
}()) == 'Arguments'; // fallback for IE11 Script Access Denied error
|
|
237
|
+
|
|
238
|
+
var tryGet = function (it, key) {
|
|
239
|
+
try {
|
|
240
|
+
return it[key];
|
|
241
|
+
} catch (error) {
|
|
242
|
+
/* empty */
|
|
78
243
|
}
|
|
244
|
+
}; // getting tag from ES6+ `Object.prototype.toString`
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
248
|
+
var O, tag, result;
|
|
249
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
|
|
250
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
|
|
251
|
+
: CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
|
|
252
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
var String$1 = global_1.String;
|
|
256
|
+
|
|
257
|
+
var toString_1 = function (argument) {
|
|
258
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
259
|
+
return String$1(argument);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
263
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
|
264
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
|
265
|
+
|
|
266
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
267
|
+
return function ($this, pos) {
|
|
268
|
+
var S = toString_1(requireObjectCoercible($this));
|
|
269
|
+
var position = toIntegerOrInfinity(pos);
|
|
270
|
+
var size = S.length;
|
|
271
|
+
var first, second;
|
|
272
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
273
|
+
first = charCodeAt(S, position);
|
|
274
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice$1(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
var stringMultibyte = {
|
|
279
|
+
// `String.prototype.codePointAt` method
|
|
280
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
281
|
+
codeAt: createMethod(false),
|
|
282
|
+
// `String.prototype.at` method
|
|
283
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
284
|
+
charAt: createMethod(true)
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
288
|
+
|
|
289
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
290
|
+
sharedStore.inspectSource = function (it) {
|
|
291
|
+
return functionToString(it);
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var inspectSource = sharedStore.inspectSource;
|
|
296
|
+
|
|
297
|
+
var WeakMap = global_1.WeakMap;
|
|
298
|
+
var nativeWeakMap = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
|
|
299
|
+
|
|
300
|
+
var isObject = function (it) {
|
|
301
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
79
302
|
};
|
|
80
303
|
|
|
81
304
|
var descriptors = !fails(function () {
|
|
305
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
82
306
|
return Object.defineProperty({}, 1, {
|
|
83
307
|
get: function () {
|
|
84
308
|
return 7;
|
|
@@ -86,10 +310,6 @@ var descriptors = !fails(function () {
|
|
|
86
310
|
})[1] != 7;
|
|
87
311
|
});
|
|
88
312
|
|
|
89
|
-
var isObject = function (it) {
|
|
90
|
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
91
|
-
};
|
|
92
|
-
|
|
93
313
|
var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE
|
|
94
314
|
|
|
95
315
|
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
@@ -99,6 +319,7 @@ var documentCreateElement = function (it) {
|
|
|
99
319
|
};
|
|
100
320
|
|
|
101
321
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
322
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
102
323
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
103
324
|
get: function () {
|
|
104
325
|
return 7;
|
|
@@ -106,40 +327,142 @@ var ie8DomDefine = !descriptors && !fails(function () {
|
|
|
106
327
|
}).a != 7;
|
|
107
328
|
});
|
|
108
329
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
330
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
331
|
+
|
|
332
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
333
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
334
|
+
return Object.defineProperty(function () {
|
|
335
|
+
/* empty */
|
|
336
|
+
}, 'prototype', {
|
|
337
|
+
value: 42,
|
|
338
|
+
writable: false
|
|
339
|
+
}).prototype != 42;
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
var String$2 = global_1.String;
|
|
343
|
+
var TypeError$2 = global_1.TypeError; // `Assert: Type(argument) is Object`
|
|
344
|
+
|
|
345
|
+
var anObject = function (argument) {
|
|
346
|
+
if (isObject(argument)) return argument;
|
|
347
|
+
throw TypeError$2(String$2(argument) + ' is not an object');
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
var call$1 = Function.prototype.call;
|
|
351
|
+
var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
|
|
352
|
+
return call$1.apply(call$1, arguments);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
356
|
+
|
|
357
|
+
var Object$3 = global_1.Object;
|
|
358
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
359
|
+
return typeof it == 'symbol';
|
|
360
|
+
} : function (it) {
|
|
361
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
362
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
var String$3 = global_1.String;
|
|
366
|
+
|
|
367
|
+
var tryToString = function (argument) {
|
|
368
|
+
try {
|
|
369
|
+
return String$3(argument);
|
|
370
|
+
} catch (error) {
|
|
371
|
+
return 'Object';
|
|
112
372
|
}
|
|
373
|
+
};
|
|
113
374
|
|
|
114
|
-
|
|
375
|
+
var TypeError$3 = global_1.TypeError; // `Assert: IsCallable(argument) is true`
|
|
376
|
+
|
|
377
|
+
var aCallable = function (argument) {
|
|
378
|
+
if (isCallable(argument)) return argument;
|
|
379
|
+
throw TypeError$3(tryToString(argument) + ' is not a function');
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
383
|
+
|
|
384
|
+
var getMethod = function (V, P) {
|
|
385
|
+
var func = V[P];
|
|
386
|
+
return func == null ? undefined : aCallable(func);
|
|
115
387
|
};
|
|
116
388
|
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
// and the second argument - flag - preferred type is a string
|
|
389
|
+
var TypeError$4 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation
|
|
390
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
120
391
|
|
|
121
|
-
var
|
|
122
|
-
if (!isObject(input)) return input;
|
|
392
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
123
393
|
var fn, val;
|
|
124
|
-
if (
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
127
|
-
throw TypeError("Can't convert object to primitive value");
|
|
394
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
395
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
396
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
397
|
+
throw TypeError$4("Can't convert object to primitive value");
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
var TypeError$5 = global_1.TypeError;
|
|
401
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
|
|
402
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
403
|
+
|
|
404
|
+
var toPrimitive = function (input, pref) {
|
|
405
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
406
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
407
|
+
var result;
|
|
408
|
+
|
|
409
|
+
if (exoticToPrim) {
|
|
410
|
+
if (pref === undefined) pref = 'default';
|
|
411
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
412
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
413
|
+
throw TypeError$5("Can't convert object to primitive value");
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (pref === undefined) pref = 'number';
|
|
417
|
+
return ordinaryToPrimitive(input, pref);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
421
|
+
|
|
422
|
+
var toPropertyKey = function (argument) {
|
|
423
|
+
var key = toPrimitive(argument, 'string');
|
|
424
|
+
return isSymbol(key) ? key : key + '';
|
|
128
425
|
};
|
|
129
426
|
|
|
130
|
-
var
|
|
131
|
-
|
|
427
|
+
var TypeError$6 = global_1.TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
428
|
+
|
|
429
|
+
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
430
|
+
|
|
431
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
432
|
+
var ENUMERABLE = 'enumerable';
|
|
433
|
+
var CONFIGURABLE = 'configurable';
|
|
434
|
+
var WRITABLE = 'writable'; // `Object.defineProperty` method
|
|
435
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
132
436
|
|
|
133
|
-
var f = descriptors ?
|
|
437
|
+
var f = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
134
438
|
anObject(O);
|
|
135
|
-
P =
|
|
439
|
+
P = toPropertyKey(P);
|
|
440
|
+
anObject(Attributes);
|
|
441
|
+
|
|
442
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
443
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
444
|
+
|
|
445
|
+
if (current && current[WRITABLE]) {
|
|
446
|
+
O[P] = Attributes.value;
|
|
447
|
+
Attributes = {
|
|
448
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
449
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
450
|
+
writable: false
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return $defineProperty(O, P, Attributes);
|
|
456
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
457
|
+
anObject(O);
|
|
458
|
+
P = toPropertyKey(P);
|
|
136
459
|
anObject(Attributes);
|
|
137
460
|
if (ie8DomDefine) try {
|
|
138
|
-
return
|
|
461
|
+
return $defineProperty(O, P, Attributes);
|
|
139
462
|
} catch (error) {
|
|
140
463
|
/* empty */
|
|
141
464
|
}
|
|
142
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
465
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
|
143
466
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
144
467
|
return O;
|
|
145
468
|
};
|
|
@@ -163,56 +486,6 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
163
486
|
return object;
|
|
164
487
|
};
|
|
165
488
|
|
|
166
|
-
var setGlobal = function (key, value) {
|
|
167
|
-
try {
|
|
168
|
-
createNonEnumerableProperty(global_1, key, value);
|
|
169
|
-
} catch (error) {
|
|
170
|
-
global_1[key] = value;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return value;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
var SHARED = '__core-js_shared__';
|
|
177
|
-
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
178
|
-
var sharedStore = store;
|
|
179
|
-
|
|
180
|
-
var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
181
|
-
|
|
182
|
-
if (typeof sharedStore.inspectSource != 'function') {
|
|
183
|
-
sharedStore.inspectSource = function (it) {
|
|
184
|
-
return functionToString.call(it);
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
var inspectSource = sharedStore.inspectSource;
|
|
189
|
-
|
|
190
|
-
var WeakMap = global_1.WeakMap;
|
|
191
|
-
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
|
192
|
-
|
|
193
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
194
|
-
|
|
195
|
-
var has = function (it, key) {
|
|
196
|
-
return hasOwnProperty.call(it, key);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
var shared = createCommonjsModule(function (module) {
|
|
200
|
-
(module.exports = function (key, value) {
|
|
201
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
202
|
-
})('versions', []).push({
|
|
203
|
-
version: '3.8.1',
|
|
204
|
-
mode: 'global',
|
|
205
|
-
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
var id = 0;
|
|
210
|
-
var postfix = Math.random();
|
|
211
|
-
|
|
212
|
-
var uid = function (key) {
|
|
213
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
489
|
var keys = shared('keys');
|
|
217
490
|
|
|
218
491
|
var sharedKey = function (key) {
|
|
@@ -221,11 +494,13 @@ var sharedKey = function (key) {
|
|
|
221
494
|
|
|
222
495
|
var hiddenKeys = {};
|
|
223
496
|
|
|
497
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
498
|
+
var TypeError$7 = global_1.TypeError;
|
|
224
499
|
var WeakMap$1 = global_1.WeakMap;
|
|
225
|
-
var set, get, has
|
|
500
|
+
var set, get, has;
|
|
226
501
|
|
|
227
502
|
var enforce = function (it) {
|
|
228
|
-
return has
|
|
503
|
+
return has(it) ? get(it) : set(it, {});
|
|
229
504
|
};
|
|
230
505
|
|
|
231
506
|
var getterFor = function (TYPE) {
|
|
@@ -233,113 +508,128 @@ var getterFor = function (TYPE) {
|
|
|
233
508
|
var state;
|
|
234
509
|
|
|
235
510
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
236
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
511
|
+
throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
|
|
237
512
|
}
|
|
238
513
|
|
|
239
514
|
return state;
|
|
240
515
|
};
|
|
241
516
|
};
|
|
242
517
|
|
|
243
|
-
if (nativeWeakMap) {
|
|
518
|
+
if (nativeWeakMap || sharedStore.state) {
|
|
244
519
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
245
|
-
var wmget = store$1.get;
|
|
246
|
-
var wmhas = store$1.has;
|
|
247
|
-
var wmset = store$1.set;
|
|
520
|
+
var wmget = functionUncurryThis(store$1.get);
|
|
521
|
+
var wmhas = functionUncurryThis(store$1.has);
|
|
522
|
+
var wmset = functionUncurryThis(store$1.set);
|
|
248
523
|
|
|
249
524
|
set = function (it, metadata) {
|
|
525
|
+
if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
250
526
|
metadata.facade = it;
|
|
251
|
-
wmset
|
|
527
|
+
wmset(store$1, it, metadata);
|
|
252
528
|
return metadata;
|
|
253
529
|
};
|
|
254
530
|
|
|
255
531
|
get = function (it) {
|
|
256
|
-
return wmget
|
|
532
|
+
return wmget(store$1, it) || {};
|
|
257
533
|
};
|
|
258
534
|
|
|
259
|
-
has
|
|
260
|
-
return wmhas
|
|
535
|
+
has = function (it) {
|
|
536
|
+
return wmhas(store$1, it);
|
|
261
537
|
};
|
|
262
538
|
} else {
|
|
263
539
|
var STATE = sharedKey('state');
|
|
264
540
|
hiddenKeys[STATE] = true;
|
|
265
541
|
|
|
266
542
|
set = function (it, metadata) {
|
|
543
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
267
544
|
metadata.facade = it;
|
|
268
545
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
269
546
|
return metadata;
|
|
270
547
|
};
|
|
271
548
|
|
|
272
549
|
get = function (it) {
|
|
273
|
-
return
|
|
550
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
274
551
|
};
|
|
275
552
|
|
|
276
|
-
has
|
|
277
|
-
return
|
|
553
|
+
has = function (it) {
|
|
554
|
+
return hasOwnProperty_1(it, STATE);
|
|
278
555
|
};
|
|
279
556
|
}
|
|
280
557
|
|
|
281
558
|
var internalState = {
|
|
282
559
|
set: set,
|
|
283
560
|
get: get,
|
|
284
|
-
has: has
|
|
561
|
+
has: has,
|
|
285
562
|
enforce: enforce,
|
|
286
563
|
getterFor: getterFor
|
|
287
564
|
};
|
|
288
565
|
|
|
289
|
-
var
|
|
566
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
567
|
+
|
|
290
568
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
|
|
291
569
|
|
|
292
|
-
var NASHORN_BUG = getOwnPropertyDescriptor &&
|
|
570
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
|
|
293
571
|
1: 2
|
|
294
572
|
}, 1); // `Object.prototype.propertyIsEnumerable` method implementation
|
|
295
|
-
// https://tc39.
|
|
573
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
296
574
|
|
|
297
575
|
var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
298
576
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
299
577
|
return !!descriptor && descriptor.enumerable;
|
|
300
|
-
} :
|
|
578
|
+
} : $propertyIsEnumerable;
|
|
301
579
|
var objectPropertyIsEnumerable = {
|
|
302
580
|
f: f$1
|
|
303
581
|
};
|
|
304
582
|
|
|
305
|
-
var
|
|
306
|
-
|
|
307
|
-
var classofRaw = function (it) {
|
|
308
|
-
return toString.call(it).slice(8, -1);
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
583
|
+
var Object$4 = global_1.Object;
|
|
584
|
+
var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
312
585
|
|
|
313
586
|
var indexedObject = fails(function () {
|
|
314
587
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
315
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
316
|
-
return !Object('z').propertyIsEnumerable(0);
|
|
588
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
589
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
|
317
590
|
}) ? function (it) {
|
|
318
|
-
return classofRaw(it) == 'String' ? split
|
|
319
|
-
} : Object;
|
|
591
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
|
592
|
+
} : Object$4;
|
|
320
593
|
|
|
321
594
|
var toIndexedObject = function (it) {
|
|
322
595
|
return indexedObject(requireObjectCoercible(it));
|
|
323
596
|
};
|
|
324
597
|
|
|
325
|
-
var
|
|
326
|
-
// https://tc39.
|
|
598
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
|
|
599
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
327
600
|
|
|
328
|
-
var f$2 = descriptors ?
|
|
601
|
+
var f$2 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
329
602
|
O = toIndexedObject(O);
|
|
330
|
-
P =
|
|
603
|
+
P = toPropertyKey(P);
|
|
331
604
|
if (ie8DomDefine) try {
|
|
332
|
-
return
|
|
605
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
333
606
|
} catch (error) {
|
|
334
607
|
/* empty */
|
|
335
608
|
}
|
|
336
|
-
if (
|
|
609
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
337
610
|
};
|
|
338
611
|
var objectGetOwnPropertyDescriptor = {
|
|
339
612
|
f: f$2
|
|
340
613
|
};
|
|
341
614
|
|
|
615
|
+
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
616
|
+
|
|
617
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
618
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
|
|
619
|
+
|
|
620
|
+
var PROPER = EXISTS$1 && function something() {
|
|
621
|
+
/* empty */
|
|
622
|
+
}.name === 'something';
|
|
623
|
+
|
|
624
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
|
|
625
|
+
var functionName = {
|
|
626
|
+
EXISTS: EXISTS$1,
|
|
627
|
+
PROPER: PROPER,
|
|
628
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
629
|
+
};
|
|
630
|
+
|
|
342
631
|
var redefine = createCommonjsModule(function (module) {
|
|
632
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
343
633
|
var getInternalState = internalState.get;
|
|
344
634
|
var enforceInternalState = internalState.enforce;
|
|
345
635
|
var TEMPLATE = String(String).split('String');
|
|
@@ -347,17 +637,22 @@ var redefine = createCommonjsModule(function (module) {
|
|
|
347
637
|
var unsafe = options ? !!options.unsafe : false;
|
|
348
638
|
var simple = options ? !!options.enumerable : false;
|
|
349
639
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
640
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
350
641
|
var state;
|
|
351
642
|
|
|
352
|
-
if (
|
|
353
|
-
if (
|
|
354
|
-
|
|
643
|
+
if (isCallable(value)) {
|
|
644
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
645
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
649
|
+
createNonEnumerableProperty(value, 'name', name);
|
|
355
650
|
}
|
|
356
651
|
|
|
357
652
|
state = enforceInternalState(value);
|
|
358
653
|
|
|
359
654
|
if (!state.source) {
|
|
360
|
-
state.source = TEMPLATE.join(typeof
|
|
655
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
361
656
|
}
|
|
362
657
|
}
|
|
363
658
|
|
|
@@ -372,47 +667,43 @@ var redefine = createCommonjsModule(function (module) {
|
|
|
372
667
|
|
|
373
668
|
if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
374
669
|
})(Function.prototype, 'toString', function toString() {
|
|
375
|
-
return
|
|
670
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
376
671
|
});
|
|
377
672
|
});
|
|
378
673
|
|
|
379
|
-
var
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
};
|
|
674
|
+
var max = Math.max;
|
|
675
|
+
var min = Math.min; // Helper for a popular repeating case of the spec:
|
|
676
|
+
// Let integer be ? ToInteger(index).
|
|
677
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
384
678
|
|
|
385
|
-
var
|
|
386
|
-
|
|
679
|
+
var toAbsoluteIndex = function (index, length) {
|
|
680
|
+
var integer = toIntegerOrInfinity(index);
|
|
681
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
387
682
|
};
|
|
388
683
|
|
|
389
|
-
var min = Math.min; // `ToLength` abstract operation
|
|
390
|
-
// https://tc39.
|
|
684
|
+
var min$1 = Math.min; // `ToLength` abstract operation
|
|
685
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
391
686
|
|
|
392
687
|
var toLength = function (argument) {
|
|
393
|
-
return argument > 0 ? min(
|
|
688
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
394
689
|
};
|
|
395
690
|
|
|
396
|
-
|
|
397
|
-
var min$1 = Math.min; // Helper for a popular repeating case of the spec:
|
|
398
|
-
// Let integer be ? ToInteger(index).
|
|
399
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
691
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
400
692
|
|
|
401
|
-
var
|
|
402
|
-
|
|
403
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
693
|
+
var lengthOfArrayLike = function (obj) {
|
|
694
|
+
return toLength(obj.length);
|
|
404
695
|
};
|
|
405
696
|
|
|
406
697
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
407
698
|
return function ($this, el, fromIndex) {
|
|
408
699
|
var O = toIndexedObject($this);
|
|
409
|
-
var length =
|
|
700
|
+
var length = lengthOfArrayLike(O);
|
|
410
701
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
411
702
|
var value; // Array#includes uses SameValueZero equality algorithm
|
|
412
|
-
// eslint-disable-next-line no-self-compare
|
|
703
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
413
704
|
|
|
414
705
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
415
|
-
value = O[index++]; // eslint-disable-next-line no-self-compare
|
|
706
|
+
value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
|
|
416
707
|
|
|
417
708
|
if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
|
|
418
709
|
} else for (; length > index; index++) {
|
|
@@ -424,14 +715,15 @@ var createMethod$1 = function (IS_INCLUDES) {
|
|
|
424
715
|
|
|
425
716
|
var arrayIncludes = {
|
|
426
717
|
// `Array.prototype.includes` method
|
|
427
|
-
// https://tc39.
|
|
718
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
428
719
|
includes: createMethod$1(true),
|
|
429
720
|
// `Array.prototype.indexOf` method
|
|
430
|
-
// https://tc39.
|
|
721
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
431
722
|
indexOf: createMethod$1(false)
|
|
432
723
|
};
|
|
433
724
|
|
|
434
725
|
var indexOf = arrayIncludes.indexOf;
|
|
726
|
+
var push = functionUncurryThis([].push);
|
|
435
727
|
|
|
436
728
|
var objectKeysInternal = function (object, names) {
|
|
437
729
|
var O = toIndexedObject(object);
|
|
@@ -439,11 +731,11 @@ var objectKeysInternal = function (object, names) {
|
|
|
439
731
|
var result = [];
|
|
440
732
|
var key;
|
|
441
733
|
|
|
442
|
-
for (key in O) !
|
|
734
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
|
|
443
735
|
|
|
444
736
|
|
|
445
|
-
while (names.length > i) if (
|
|
446
|
-
~indexOf(result, key) ||
|
|
737
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
738
|
+
~indexOf(result, key) || push(result, key);
|
|
447
739
|
}
|
|
448
740
|
|
|
449
741
|
return result;
|
|
@@ -453,7 +745,8 @@ var objectKeysInternal = function (object, names) {
|
|
|
453
745
|
var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
|
|
454
746
|
|
|
455
747
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
|
|
456
|
-
// https://tc39.
|
|
748
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
749
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
457
750
|
|
|
458
751
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
459
752
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
@@ -463,25 +756,31 @@ var objectGetOwnPropertyNames = {
|
|
|
463
756
|
f: f$3
|
|
464
757
|
};
|
|
465
758
|
|
|
759
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
466
760
|
var f$4 = Object.getOwnPropertySymbols;
|
|
467
761
|
var objectGetOwnPropertySymbols = {
|
|
468
762
|
f: f$4
|
|
469
763
|
};
|
|
470
764
|
|
|
765
|
+
var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
|
|
766
|
+
|
|
471
767
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
472
768
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
473
769
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
474
|
-
return getOwnPropertySymbols ?
|
|
770
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
475
771
|
};
|
|
476
772
|
|
|
477
|
-
var copyConstructorProperties = function (target, source) {
|
|
773
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
478
774
|
var keys = ownKeys(source);
|
|
479
775
|
var defineProperty = objectDefineProperty.f;
|
|
480
776
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
481
777
|
|
|
482
778
|
for (var i = 0; i < keys.length; i++) {
|
|
483
779
|
var key = keys[i];
|
|
484
|
-
|
|
780
|
+
|
|
781
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
782
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
783
|
+
}
|
|
485
784
|
}
|
|
486
785
|
};
|
|
487
786
|
|
|
@@ -489,7 +788,7 @@ var replacement = /#|\.prototype\./;
|
|
|
489
788
|
|
|
490
789
|
var isForced = function (feature, detection) {
|
|
491
790
|
var value = data[normalize(feature)];
|
|
492
|
-
return value == POLYFILL ? true : value == NATIVE ? false :
|
|
791
|
+
return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
493
792
|
};
|
|
494
793
|
|
|
495
794
|
var normalize = isForced.normalize = function (string) {
|
|
@@ -515,6 +814,7 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
|
515
814
|
options.sham - add a flag to not completely full polyfills
|
|
516
815
|
options.enumerable - export as enumerable property
|
|
517
816
|
options.noTargetGet - prevent calling a getter on target
|
|
817
|
+
options.name - the .name of the function if it does not match the key
|
|
518
818
|
*/
|
|
519
819
|
|
|
520
820
|
var _export = function (options, source) {
|
|
@@ -542,7 +842,7 @@ var _export = function (options, source) {
|
|
|
542
842
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
|
|
543
843
|
|
|
544
844
|
if (!FORCED && targetProperty !== undefined) {
|
|
545
|
-
if (typeof sourceProperty
|
|
845
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
546
846
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
547
847
|
} // add a flag to not completely full polyfills
|
|
548
848
|
|
|
@@ -556,116 +856,41 @@ var _export = function (options, source) {
|
|
|
556
856
|
}
|
|
557
857
|
};
|
|
558
858
|
|
|
559
|
-
// https://tc39.
|
|
560
|
-
|
|
561
|
-
var toObject = function (argument) {
|
|
562
|
-
return Object(requireObjectCoercible(argument));
|
|
563
|
-
};
|
|
564
|
-
|
|
565
|
-
var correctPrototypeGetter = !fails(function () {
|
|
566
|
-
function F() {
|
|
567
|
-
/* empty */
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
F.prototype.constructor = null;
|
|
571
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
575
|
-
var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method
|
|
576
|
-
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
577
|
-
|
|
578
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
579
|
-
O = toObject(O);
|
|
580
|
-
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
581
|
-
|
|
582
|
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
583
|
-
return O.constructor.prototype;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
return O instanceof Object ? ObjectPrototype : null;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
590
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
591
|
-
// eslint-disable-next-line no-undef
|
|
592
|
-
return !String(Symbol());
|
|
593
|
-
});
|
|
594
|
-
|
|
595
|
-
var useSymbolAsUid = nativeSymbol // eslint-disable-next-line no-undef
|
|
596
|
-
&& !Symbol.sham // eslint-disable-next-line no-undef
|
|
597
|
-
&& typeof Symbol.iterator == 'symbol';
|
|
598
|
-
|
|
599
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
600
|
-
var Symbol$1 = global_1.Symbol;
|
|
601
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
602
|
-
|
|
603
|
-
var wellKnownSymbol = function (name) {
|
|
604
|
-
if (!has(WellKnownSymbolsStore, name)) {
|
|
605
|
-
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
return WellKnownSymbolsStore[name];
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
612
|
-
var BUGGY_SAFARI_ITERATORS = false;
|
|
613
|
-
|
|
614
|
-
var returnThis = function () {
|
|
615
|
-
return this;
|
|
616
|
-
}; // `%IteratorPrototype%` object
|
|
617
|
-
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
621
|
-
|
|
622
|
-
if ([].keys) {
|
|
623
|
-
arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
|
|
624
|
-
|
|
625
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
|
|
626
|
-
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
|
627
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
if (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
632
|
-
|
|
633
|
-
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
634
|
-
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
var iteratorsCore = {
|
|
638
|
-
IteratorPrototype: IteratorPrototype,
|
|
639
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
859
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
860
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
643
861
|
|
|
644
862
|
var objectKeys = Object.keys || function keys(O) {
|
|
645
863
|
return objectKeysInternal(O, enumBugKeys);
|
|
646
864
|
};
|
|
647
865
|
|
|
648
|
-
// https://tc39.
|
|
866
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
867
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
649
868
|
|
|
650
|
-
var
|
|
869
|
+
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
651
870
|
anObject(O);
|
|
871
|
+
var props = toIndexedObject(Properties);
|
|
652
872
|
var keys = objectKeys(Properties);
|
|
653
873
|
var length = keys.length;
|
|
654
874
|
var index = 0;
|
|
655
875
|
var key;
|
|
656
876
|
|
|
657
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
|
877
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
658
878
|
|
|
659
879
|
return O;
|
|
660
880
|
};
|
|
881
|
+
var objectDefineProperties = {
|
|
882
|
+
f: f$5
|
|
883
|
+
};
|
|
661
884
|
|
|
662
885
|
var html = getBuiltIn('document', 'documentElement');
|
|
663
886
|
|
|
887
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
888
|
+
|
|
664
889
|
var GT = '>';
|
|
665
890
|
var LT = '<';
|
|
666
891
|
var PROTOTYPE = 'prototype';
|
|
667
892
|
var SCRIPT = 'script';
|
|
668
|
-
var IE_PROTO
|
|
893
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
669
894
|
|
|
670
895
|
var EmptyConstructor = function () {
|
|
671
896
|
/* empty */
|
|
@@ -711,13 +936,14 @@ var activeXDocument;
|
|
|
711
936
|
|
|
712
937
|
var NullProtoObject = function () {
|
|
713
938
|
try {
|
|
714
|
-
|
|
715
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
|
939
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
716
940
|
} catch (error) {
|
|
717
941
|
/* ignore */
|
|
718
942
|
}
|
|
719
943
|
|
|
720
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument)
|
|
944
|
+
NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
945
|
+
: NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
946
|
+
|
|
721
947
|
var length = enumBugKeys.length;
|
|
722
948
|
|
|
723
949
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
@@ -725,8 +951,9 @@ var NullProtoObject = function () {
|
|
|
725
951
|
return NullProtoObject();
|
|
726
952
|
};
|
|
727
953
|
|
|
728
|
-
hiddenKeys[IE_PROTO
|
|
729
|
-
// https://tc39.
|
|
954
|
+
hiddenKeys[IE_PROTO] = true; // `Object.create` method
|
|
955
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
956
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
730
957
|
|
|
731
958
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
732
959
|
var result;
|
|
@@ -736,18 +963,82 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
736
963
|
result = new EmptyConstructor();
|
|
737
964
|
EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill
|
|
738
965
|
|
|
739
|
-
result[IE_PROTO
|
|
966
|
+
result[IE_PROTO] = O;
|
|
740
967
|
} else result = NullProtoObject();
|
|
741
968
|
|
|
742
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
969
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
743
970
|
};
|
|
744
971
|
|
|
745
|
-
var
|
|
746
|
-
|
|
972
|
+
var correctPrototypeGetter = !fails(function () {
|
|
973
|
+
function F() {
|
|
974
|
+
/* empty */
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
F.prototype.constructor = null; // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
978
|
+
|
|
979
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
980
|
+
});
|
|
981
|
+
|
|
982
|
+
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
983
|
+
var Object$5 = global_1.Object;
|
|
984
|
+
var ObjectPrototype = Object$5.prototype; // `Object.getPrototypeOf` method
|
|
985
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
986
|
+
|
|
987
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
|
|
988
|
+
var object = toObject(O);
|
|
989
|
+
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
990
|
+
var constructor = object.constructor;
|
|
991
|
+
|
|
992
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
993
|
+
return constructor.prototype;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return object instanceof Object$5 ? ObjectPrototype : null;
|
|
997
|
+
};
|
|
747
998
|
|
|
748
|
-
var
|
|
749
|
-
|
|
750
|
-
|
|
999
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
1000
|
+
var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object
|
|
1001
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1002
|
+
|
|
1003
|
+
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1004
|
+
/* eslint-disable es-x/no-array-prototype-keys -- safe */
|
|
1005
|
+
|
|
1006
|
+
if ([].keys) {
|
|
1007
|
+
arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
|
|
1008
|
+
|
|
1009
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
|
|
1010
|
+
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
|
1011
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
|
1016
|
+
var test = {}; // FF44- legacy iterators case
|
|
1017
|
+
|
|
1018
|
+
return IteratorPrototype[ITERATOR].call(test) !== test;
|
|
1019
|
+
});
|
|
1020
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; // `%IteratorPrototype%[@@iterator]()` method
|
|
1021
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1022
|
+
|
|
1023
|
+
if (!isCallable(IteratorPrototype[ITERATOR])) {
|
|
1024
|
+
redefine(IteratorPrototype, ITERATOR, function () {
|
|
1025
|
+
return this;
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
var iteratorsCore = {
|
|
1030
|
+
IteratorPrototype: IteratorPrototype,
|
|
1031
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1035
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
1036
|
+
|
|
1037
|
+
var setToStringTag = function (target, TAG, STATIC) {
|
|
1038
|
+
if (target && !STATIC) target = target.prototype;
|
|
1039
|
+
|
|
1040
|
+
if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
|
|
1041
|
+
defineProperty$1(target, TO_STRING_TAG$2, {
|
|
751
1042
|
configurable: true,
|
|
752
1043
|
value: TAG
|
|
753
1044
|
});
|
|
@@ -758,32 +1049,33 @@ var iterators = {};
|
|
|
758
1049
|
|
|
759
1050
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
760
1051
|
|
|
761
|
-
var returnThis
|
|
1052
|
+
var returnThis = function () {
|
|
762
1053
|
return this;
|
|
763
1054
|
};
|
|
764
1055
|
|
|
765
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
|
1056
|
+
var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
766
1057
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
767
1058
|
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, {
|
|
768
|
-
next: createPropertyDescriptor(
|
|
1059
|
+
next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)
|
|
769
1060
|
});
|
|
770
1061
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
|
771
|
-
iterators[TO_STRING_TAG] = returnThis
|
|
1062
|
+
iterators[TO_STRING_TAG] = returnThis;
|
|
772
1063
|
return IteratorConstructor;
|
|
773
1064
|
};
|
|
774
1065
|
|
|
775
|
-
var
|
|
776
|
-
|
|
777
|
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
778
|
-
}
|
|
1066
|
+
var String$4 = global_1.String;
|
|
1067
|
+
var TypeError$8 = global_1.TypeError;
|
|
779
1068
|
|
|
780
|
-
|
|
1069
|
+
var aPossiblePrototype = function (argument) {
|
|
1070
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1071
|
+
throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
|
|
781
1072
|
};
|
|
782
1073
|
|
|
783
|
-
|
|
1074
|
+
/* eslint-disable no-proto -- safe */
|
|
1075
|
+
// `Object.setPrototypeOf` method
|
|
1076
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
784
1077
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
785
|
-
|
|
786
|
-
/* eslint-disable no-proto */
|
|
1078
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
787
1079
|
|
|
788
1080
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
789
1081
|
var CORRECT_SETTER = false;
|
|
@@ -791,8 +1083,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
791
1083
|
var setter;
|
|
792
1084
|
|
|
793
1085
|
try {
|
|
794
|
-
|
|
795
|
-
setter.
|
|
1086
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1087
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1088
|
+
setter(test, []);
|
|
796
1089
|
CORRECT_SETTER = test instanceof Array;
|
|
797
1090
|
} catch (error) {
|
|
798
1091
|
/* empty */
|
|
@@ -801,11 +1094,13 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
801
1094
|
return function setPrototypeOf(O, proto) {
|
|
802
1095
|
anObject(O);
|
|
803
1096
|
aPossiblePrototype(proto);
|
|
804
|
-
if (CORRECT_SETTER) setter
|
|
1097
|
+
if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
|
|
805
1098
|
return O;
|
|
806
1099
|
};
|
|
807
1100
|
}() : undefined);
|
|
808
1101
|
|
|
1102
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
1103
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
809
1104
|
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
|
810
1105
|
var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
811
1106
|
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
@@ -813,7 +1108,7 @@ var KEYS = 'keys';
|
|
|
813
1108
|
var VALUES = 'values';
|
|
814
1109
|
var ENTRIES = 'entries';
|
|
815
1110
|
|
|
816
|
-
var returnThis$
|
|
1111
|
+
var returnThis$1 = function () {
|
|
817
1112
|
return this;
|
|
818
1113
|
};
|
|
819
1114
|
|
|
@@ -857,35 +1152,33 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
857
1152
|
if (anyNativeIterator) {
|
|
858
1153
|
CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
859
1154
|
|
|
860
|
-
if (
|
|
1155
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
861
1156
|
if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
|
862
1157
|
if (objectSetPrototypeOf) {
|
|
863
1158
|
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
864
|
-
} else if (
|
|
865
|
-
|
|
1159
|
+
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1160
|
+
redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
|
866
1161
|
}
|
|
867
1162
|
} // Set @@toStringTag to native iterators
|
|
868
1163
|
|
|
869
1164
|
|
|
870
1165
|
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
871
1166
|
}
|
|
872
|
-
} // fix Array
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
876
|
-
INCORRECT_VALUES_NAME = true;
|
|
1167
|
+
} // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
877
1168
|
|
|
878
|
-
defaultIterator = function values() {
|
|
879
|
-
return nativeIterator.call(this);
|
|
880
|
-
};
|
|
881
|
-
} // define iterator
|
|
882
1169
|
|
|
1170
|
+
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1171
|
+
if ( CONFIGURABLE_FUNCTION_NAME) {
|
|
1172
|
+
createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
|
|
1173
|
+
} else {
|
|
1174
|
+
INCORRECT_VALUES_NAME = true;
|
|
883
1175
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1176
|
+
defaultIterator = function values() {
|
|
1177
|
+
return functionCall(nativeIterator, this);
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
} // export additional methods
|
|
887
1181
|
|
|
888
|
-
iterators[NAME] = defaultIterator; // export additional methods
|
|
889
1182
|
|
|
890
1183
|
if (DEFAULT) {
|
|
891
1184
|
methods = {
|
|
@@ -902,24 +1195,32 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
902
1195
|
proto: true,
|
|
903
1196
|
forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME
|
|
904
1197
|
}, methods);
|
|
1198
|
+
} // define iterator
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1202
|
+
redefine(IterablePrototype, ITERATOR$1, defaultIterator, {
|
|
1203
|
+
name: DEFAULT
|
|
1204
|
+
});
|
|
905
1205
|
}
|
|
906
1206
|
|
|
1207
|
+
iterators[NAME] = defaultIterator;
|
|
907
1208
|
return methods;
|
|
908
1209
|
};
|
|
909
1210
|
|
|
910
|
-
var charAt = stringMultibyte.charAt;
|
|
1211
|
+
var charAt$1 = stringMultibyte.charAt;
|
|
911
1212
|
var STRING_ITERATOR = 'String Iterator';
|
|
912
1213
|
var setInternalState = internalState.set;
|
|
913
1214
|
var getInternalState = internalState.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method
|
|
914
|
-
// https://tc39.
|
|
1215
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
915
1216
|
|
|
916
1217
|
defineIterator(String, 'String', function (iterated) {
|
|
917
1218
|
setInternalState(this, {
|
|
918
1219
|
type: STRING_ITERATOR,
|
|
919
|
-
string:
|
|
1220
|
+
string: toString_1(iterated),
|
|
920
1221
|
index: 0
|
|
921
1222
|
}); // `%StringIteratorPrototype%.next` method
|
|
922
|
-
// https://tc39.
|
|
1223
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
923
1224
|
}, function next() {
|
|
924
1225
|
var state = getInternalState(this);
|
|
925
1226
|
var string = state.string;
|
|
@@ -929,7 +1230,7 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
929
1230
|
value: undefined,
|
|
930
1231
|
done: true
|
|
931
1232
|
};
|
|
932
|
-
point = charAt(string, index);
|
|
1233
|
+
point = charAt$1(string, index);
|
|
933
1234
|
state.index += point.length;
|
|
934
1235
|
return {
|
|
935
1236
|
value: point,
|
|
@@ -937,61 +1238,46 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
937
1238
|
};
|
|
938
1239
|
});
|
|
939
1240
|
|
|
940
|
-
var
|
|
941
|
-
if (typeof it != 'function') {
|
|
942
|
-
throw TypeError(String(it) + ' is not a function');
|
|
943
|
-
}
|
|
1241
|
+
var bind$1 = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding
|
|
944
1242
|
|
|
945
|
-
|
|
1243
|
+
var functionBindContext = function (fn, that) {
|
|
1244
|
+
aCallable(fn);
|
|
1245
|
+
return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function
|
|
1246
|
+
/* ...args */
|
|
1247
|
+
() {
|
|
1248
|
+
return fn.apply(that, arguments);
|
|
1249
|
+
};
|
|
946
1250
|
};
|
|
947
1251
|
|
|
948
|
-
var
|
|
949
|
-
|
|
950
|
-
|
|
1252
|
+
var iteratorClose = function (iterator, kind, value) {
|
|
1253
|
+
var innerResult, innerError;
|
|
1254
|
+
anObject(iterator);
|
|
951
1255
|
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
return function () {
|
|
955
|
-
return fn.call(that);
|
|
956
|
-
};
|
|
957
|
-
|
|
958
|
-
case 1:
|
|
959
|
-
return function (a) {
|
|
960
|
-
return fn.call(that, a);
|
|
961
|
-
};
|
|
1256
|
+
try {
|
|
1257
|
+
innerResult = getMethod(iterator, 'return');
|
|
962
1258
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1259
|
+
if (!innerResult) {
|
|
1260
|
+
if (kind === 'throw') throw value;
|
|
1261
|
+
return value;
|
|
1262
|
+
}
|
|
967
1263
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1264
|
+
innerResult = functionCall(innerResult, iterator);
|
|
1265
|
+
} catch (error) {
|
|
1266
|
+
innerError = true;
|
|
1267
|
+
innerResult = error;
|
|
972
1268
|
}
|
|
973
1269
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
|
-
|
|
981
|
-
var iteratorClose = function (iterator) {
|
|
982
|
-
var returnMethod = iterator['return'];
|
|
983
|
-
|
|
984
|
-
if (returnMethod !== undefined) {
|
|
985
|
-
return anObject(returnMethod.call(iterator)).value;
|
|
986
|
-
}
|
|
1270
|
+
if (kind === 'throw') throw value;
|
|
1271
|
+
if (innerError) throw innerResult;
|
|
1272
|
+
anObject(innerResult);
|
|
1273
|
+
return value;
|
|
987
1274
|
};
|
|
988
1275
|
|
|
989
1276
|
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
|
990
1277
|
try {
|
|
991
|
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
1278
|
+
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
992
1279
|
} catch (error) {
|
|
993
|
-
iteratorClose(iterator);
|
|
994
|
-
throw error;
|
|
1280
|
+
iteratorClose(iterator, 'throw', error);
|
|
995
1281
|
}
|
|
996
1282
|
};
|
|
997
1283
|
|
|
@@ -1002,73 +1288,104 @@ var isArrayIteratorMethod = function (it) {
|
|
|
1002
1288
|
return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1003
1289
|
};
|
|
1004
1290
|
|
|
1005
|
-
var
|
|
1006
|
-
|
|
1007
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
|
|
1291
|
+
var noop = function () {
|
|
1292
|
+
/* empty */
|
|
1008
1293
|
};
|
|
1009
1294
|
|
|
1010
|
-
var
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
var
|
|
1295
|
+
var empty = [];
|
|
1296
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1297
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1298
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
1299
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1014
1300
|
|
|
1015
|
-
var
|
|
1301
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1302
|
+
if (!isCallable(argument)) return false;
|
|
1016
1303
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1304
|
+
try {
|
|
1305
|
+
construct(noop, empty, argument);
|
|
1306
|
+
return true;
|
|
1307
|
+
} catch (error) {
|
|
1308
|
+
return false;
|
|
1309
|
+
}
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1313
|
+
if (!isCallable(argument)) return false;
|
|
1314
|
+
|
|
1315
|
+
switch (classof(argument)) {
|
|
1316
|
+
case 'AsyncFunction':
|
|
1317
|
+
case 'GeneratorFunction':
|
|
1318
|
+
case 'AsyncGeneratorFunction':
|
|
1319
|
+
return false;
|
|
1320
|
+
}
|
|
1020
1321
|
|
|
1021
|
-
var tryGet = function (it, key) {
|
|
1022
1322
|
try {
|
|
1023
|
-
|
|
1323
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1324
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1325
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1326
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1024
1327
|
} catch (error) {
|
|
1025
|
-
|
|
1328
|
+
return true;
|
|
1026
1329
|
}
|
|
1027
|
-
};
|
|
1330
|
+
};
|
|
1028
1331
|
|
|
1332
|
+
isConstructorLegacy.sham = true; // `IsConstructor` abstract operation
|
|
1333
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1029
1334
|
|
|
1030
|
-
var
|
|
1031
|
-
var
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1335
|
+
var isConstructor = !construct || fails(function () {
|
|
1336
|
+
var called;
|
|
1337
|
+
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {
|
|
1338
|
+
called = true;
|
|
1339
|
+
}) || called;
|
|
1340
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1341
|
+
|
|
1342
|
+
var createProperty = function (object, key, value) {
|
|
1343
|
+
var propertyKey = toPropertyKey(key);
|
|
1344
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
|
|
1036
1345
|
};
|
|
1037
1346
|
|
|
1038
1347
|
var ITERATOR$3 = wellKnownSymbol('iterator');
|
|
1039
1348
|
|
|
1040
1349
|
var getIteratorMethod = function (it) {
|
|
1041
|
-
if (it != undefined) return it
|
|
1350
|
+
if (it != undefined) return getMethod(it, ITERATOR$3) || getMethod(it, '@@iterator') || iterators[classof(it)];
|
|
1042
1351
|
};
|
|
1043
1352
|
|
|
1044
|
-
|
|
1353
|
+
var TypeError$9 = global_1.TypeError;
|
|
1045
1354
|
|
|
1355
|
+
var getIterator = function (argument, usingIterator) {
|
|
1356
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
1357
|
+
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
1358
|
+
throw TypeError$9(tryToString(argument) + ' is not iterable');
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
var Array$1 = global_1.Array; // `Array.from` method implementation
|
|
1362
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
1046
1363
|
|
|
1047
1364
|
var arrayFrom = function from(arrayLike
|
|
1048
1365
|
/* , mapfn = undefined, thisArg = undefined */
|
|
1049
1366
|
) {
|
|
1050
1367
|
var O = toObject(arrayLike);
|
|
1051
|
-
var
|
|
1368
|
+
var IS_CONSTRUCTOR = isConstructor(this);
|
|
1052
1369
|
var argumentsLength = arguments.length;
|
|
1053
1370
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
1054
1371
|
var mapping = mapfn !== undefined;
|
|
1372
|
+
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
1055
1373
|
var iteratorMethod = getIteratorMethod(O);
|
|
1056
1374
|
var index = 0;
|
|
1057
|
-
var length, result, step, iterator, next, value;
|
|
1058
|
-
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); // if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
1375
|
+
var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
1059
1376
|
|
|
1060
|
-
if (iteratorMethod
|
|
1061
|
-
iterator =
|
|
1377
|
+
if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
|
|
1378
|
+
iterator = getIterator(O, iteratorMethod);
|
|
1062
1379
|
next = iterator.next;
|
|
1063
|
-
result = new
|
|
1380
|
+
result = IS_CONSTRUCTOR ? new this() : [];
|
|
1064
1381
|
|
|
1065
|
-
for (; !(step = next
|
|
1382
|
+
for (; !(step = functionCall(next, iterator)).done; index++) {
|
|
1066
1383
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
1067
1384
|
createProperty(result, index, value);
|
|
1068
1385
|
}
|
|
1069
1386
|
} else {
|
|
1070
|
-
length =
|
|
1071
|
-
result = new
|
|
1387
|
+
length = lengthOfArrayLike(O);
|
|
1388
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
|
|
1072
1389
|
|
|
1073
1390
|
for (; length > index; index++) {
|
|
1074
1391
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
@@ -1098,7 +1415,7 @@ try {
|
|
|
1098
1415
|
|
|
1099
1416
|
iteratorWithReturn[ITERATOR$4] = function () {
|
|
1100
1417
|
return this;
|
|
1101
|
-
}; // eslint-disable-next-line no-throw-literal
|
|
1418
|
+
}; // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
|
|
1102
1419
|
|
|
1103
1420
|
|
|
1104
1421
|
Array.from(iteratorWithReturn, function () {
|
|
@@ -1134,9 +1451,10 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
|
|
|
1134
1451
|
};
|
|
1135
1452
|
|
|
1136
1453
|
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
|
|
1454
|
+
// eslint-disable-next-line es-x/no-array-from -- required for testing
|
|
1137
1455
|
Array.from(iterable);
|
|
1138
1456
|
}); // `Array.from` method
|
|
1139
|
-
// https://tc39.
|
|
1457
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
1140
1458
|
|
|
1141
1459
|
_export({
|
|
1142
1460
|
target: 'Array',
|
|
@@ -1731,16 +2049,34 @@ var fetchFromApi = function fetchFromApi(url, data, headers) {
|
|
|
1731
2049
|
}
|
|
1732
2050
|
};
|
|
1733
2051
|
|
|
2052
|
+
var isPlanEligible = function isPlanEligible(plan, configPlan) {
|
|
2053
|
+
if (!plan.eligible) {
|
|
2054
|
+
return false;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
return configPlan ? plan.purchase_amount >= (configPlan == null ? void 0 : configPlan.minAmount) && plan.purchase_amount <= (configPlan == null ? void 0 : configPlan.maxAmount) : false;
|
|
2058
|
+
};
|
|
2059
|
+
|
|
2060
|
+
var getPaymentPlanBoundaries = function getPaymentPlanBoundaries(plan, configPlan) {
|
|
2061
|
+
var _plan$constraints;
|
|
2062
|
+
|
|
2063
|
+
// When the plan is not eligible, the purchase amount constraints is given from the merchant config
|
|
2064
|
+
var purchaseAmountConstraints = (_plan$constraints = plan.constraints) == null ? void 0 : _plan$constraints.purchase_amount;
|
|
2065
|
+
|
|
2066
|
+
if (purchaseAmountConstraints && configPlan) {
|
|
2067
|
+
return {
|
|
2068
|
+
minAmount: Math.max(configPlan.minAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.minimum),
|
|
2069
|
+
maxAmount: Math.min(configPlan.maxAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.maximum)
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
return configPlan != null ? configPlan : {};
|
|
2074
|
+
};
|
|
2075
|
+
|
|
1734
2076
|
var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
1735
2077
|
// Remove p1x
|
|
1736
2078
|
var filteredEligibilityPlans = eligibilities.filter(function (plan) {
|
|
1737
2079
|
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
1738
|
-
}) // Keeps the plans that have a payment_plan property
|
|
1739
|
-
.filter(function (plan) {
|
|
1740
|
-
return plan.payment_plan;
|
|
1741
|
-
}) // Remove plans that have a reasons property
|
|
1742
|
-
.filter(function (plan) {
|
|
1743
|
-
return !plan.reasons;
|
|
1744
2080
|
}); // If no configPlans was provided, return eligibility response
|
|
1745
2081
|
|
|
1746
2082
|
if (!configPlans) {
|
|
@@ -1756,10 +2092,8 @@ var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
|
1756
2092
|
return plan.installments_count === configPlan.installmentsCount && eligibilityDeferredDays === configPlanDeferredDays;
|
|
1757
2093
|
});
|
|
1758
2094
|
return _extends({}, plan, {
|
|
1759
|
-
eligible:
|
|
1760
|
-
|
|
1761
|
-
maxAmount: relatedConfigPlan == null ? void 0 : relatedConfigPlan.maxAmount
|
|
1762
|
-
});
|
|
2095
|
+
eligible: isPlanEligible(plan, relatedConfigPlan)
|
|
2096
|
+
}, getPaymentPlanBoundaries(plan, relatedConfigPlan));
|
|
1763
2097
|
});
|
|
1764
2098
|
};
|
|
1765
2099
|
|
|
@@ -1833,6 +2167,31 @@ function CrossIcon(_ref) {
|
|
|
1833
2167
|
}));
|
|
1834
2168
|
}
|
|
1835
2169
|
|
|
2170
|
+
/**
|
|
2171
|
+
* Prefix classes to avoid name collisions.
|
|
2172
|
+
*/
|
|
2173
|
+
var prefix = 'alma-eligibility-modal';
|
|
2174
|
+
/**
|
|
2175
|
+
* Class names for the **eligibility modale** widget.
|
|
2176
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
2177
|
+
*/
|
|
2178
|
+
|
|
2179
|
+
var STATIC_CUSTOMISATION_CLASSES = {
|
|
2180
|
+
leftSide: prefix + '-left-side',
|
|
2181
|
+
rightSide: prefix + '-right-side',
|
|
2182
|
+
title: prefix + '-title',
|
|
2183
|
+
info: prefix + '-info',
|
|
2184
|
+
infoMessage: prefix + '-info-message',
|
|
2185
|
+
eligibilityOptions: prefix + '-eligibility-options',
|
|
2186
|
+
activeOption: prefix + '-active-option',
|
|
2187
|
+
closeButton: prefix + '-close-button',
|
|
2188
|
+
scheduleDetails: prefix + '-schedule-details',
|
|
2189
|
+
scheduleTotal: prefix + '-schedule-total',
|
|
2190
|
+
scheduleCredit: prefix + '-schedule-credit'
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2193
|
+
var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
|
|
2194
|
+
|
|
1836
2195
|
var ControlledModal = function ControlledModal(_ref) {
|
|
1837
2196
|
var _cx;
|
|
1838
2197
|
|
|
@@ -1843,7 +2202,7 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
1843
2202
|
contentClassName = _ref.contentClassName,
|
|
1844
2203
|
_ref$scrollable = _ref.scrollable,
|
|
1845
2204
|
scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
|
|
1846
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2205
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1847
2206
|
|
|
1848
2207
|
Modal.setAppElement('body');
|
|
1849
2208
|
return /*#__PURE__*/React.createElement(Modal, Object.assign({
|
|
@@ -1863,7 +2222,7 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
1863
2222
|
className: s$1.header
|
|
1864
2223
|
}, /*#__PURE__*/React.createElement("button", {
|
|
1865
2224
|
onClick: onClose,
|
|
1866
|
-
className: s$1.closeButton,
|
|
2225
|
+
className: cx(s$1.closeButton, STATIC_CUSTOMISATION_CLASSES.closeButton),
|
|
1867
2226
|
"data-testid": "modal-close-button"
|
|
1868
2227
|
}, /*#__PURE__*/React.createElement(CrossIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
1869
2228
|
className: cx(s$1.content, contentClassName, (_cx = {}, _cx[s$1.contentScrollable] = scrollable, _cx))
|
|
@@ -1888,6 +2247,20 @@ var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
|
|
|
1888
2247
|
return installmentsCount + "x";
|
|
1889
2248
|
}
|
|
1890
2249
|
};
|
|
2250
|
+
|
|
2251
|
+
var withNoFee = function withNoFee(payment) {
|
|
2252
|
+
var _payment$payment_plan;
|
|
2253
|
+
|
|
2254
|
+
if ((_payment$payment_plan = payment.payment_plan) != null && _payment$payment_plan.every(function (plan) {
|
|
2255
|
+
return plan.customer_fee === 0 && plan.customer_interest === 0;
|
|
2256
|
+
})) {
|
|
2257
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2258
|
+
id: "payment-plan-strings.no-fee",
|
|
2259
|
+
defaultMessage: '(sans frais)'
|
|
2260
|
+
}));
|
|
2261
|
+
}
|
|
2262
|
+
};
|
|
2263
|
+
|
|
1891
2264
|
var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
1892
2265
|
var deferred_days = payment.deferred_days,
|
|
1893
2266
|
deferred_months = payment.deferred_months,
|
|
@@ -1897,20 +2270,10 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1897
2270
|
_payment$minAmount = payment.minAmount,
|
|
1898
2271
|
minAmount = _payment$minAmount === void 0 ? 0 : _payment$minAmount,
|
|
1899
2272
|
_payment$maxAmount = payment.maxAmount,
|
|
1900
|
-
maxAmount = _payment$maxAmount === void 0 ? 0 : _payment$maxAmount
|
|
2273
|
+
maxAmount = _payment$maxAmount === void 0 ? 0 : _payment$maxAmount,
|
|
2274
|
+
payment_plan = payment.payment_plan;
|
|
1901
2275
|
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
1902
2276
|
|
|
1903
|
-
var withNoFee = function withNoFee() {
|
|
1904
|
-
if (payment.payment_plan.every(function (plan) {
|
|
1905
|
-
return plan.customer_fee === 0 && plan.customer_interest === 0;
|
|
1906
|
-
})) {
|
|
1907
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
1908
|
-
id: "payment-plan-strings.no-fee",
|
|
1909
|
-
defaultMessage: '(sans frais)'
|
|
1910
|
-
}));
|
|
1911
|
-
}
|
|
1912
|
-
};
|
|
1913
|
-
|
|
1914
2277
|
if (!eligible) {
|
|
1915
2278
|
return purchaseAmount > maxAmount ? /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
1916
2279
|
id: "payment-plan-strings.ineligible-greater-than-max",
|
|
@@ -1933,27 +2296,32 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1933
2296
|
})
|
|
1934
2297
|
}
|
|
1935
2298
|
});
|
|
2299
|
+
} else if (!payment_plan) {
|
|
2300
|
+
/* This error should never happen. We added this condition to avoid a typescript warning on
|
|
2301
|
+
payment_plan possibly undefined. As far as we know, it only happens when the plan is not
|
|
2302
|
+
eligible, which is checked above. */
|
|
2303
|
+
throw Error("No payment plan provided for payment in " + installmentsCount + " installments. Please contact us if you see this error.");
|
|
1936
2304
|
} else if (deferredDaysCount !== 0 && installmentsCount === 1) {
|
|
1937
2305
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
1938
2306
|
id: "payment-plan-strings.deferred",
|
|
1939
2307
|
defaultMessage: "{totalAmount} \xE0 payer le {dueDate}",
|
|
1940
2308
|
values: {
|
|
1941
2309
|
totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
1942
|
-
value: priceFromCents(
|
|
2310
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1943
2311
|
style: "currency",
|
|
1944
2312
|
currency: "EUR"
|
|
1945
2313
|
}),
|
|
1946
2314
|
dueDate: /*#__PURE__*/React.createElement(FormattedDate, {
|
|
1947
|
-
value: secondsToMilliseconds(
|
|
2315
|
+
value: secondsToMilliseconds(payment_plan[0].due_date),
|
|
1948
2316
|
day: "numeric",
|
|
1949
2317
|
month: "long",
|
|
1950
2318
|
year: "numeric"
|
|
1951
2319
|
})
|
|
1952
2320
|
}
|
|
1953
|
-
}), withNoFee());
|
|
2321
|
+
}), withNoFee(payment));
|
|
1954
2322
|
} else if (installmentsCount > 0) {
|
|
1955
|
-
var areInstallmentsOfSameAmount =
|
|
1956
|
-
return index === 0 || installment.total_amount ===
|
|
2323
|
+
var areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every(function (installment, index) {
|
|
2324
|
+
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
1957
2325
|
});
|
|
1958
2326
|
|
|
1959
2327
|
if (areInstallmentsOfSameAmount) {
|
|
@@ -1962,13 +2330,13 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1962
2330
|
defaultMessage: "{installmentsCount} x {totalAmount}",
|
|
1963
2331
|
values: {
|
|
1964
2332
|
totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
1965
|
-
value: priceFromCents(
|
|
2333
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1966
2334
|
style: "currency",
|
|
1967
2335
|
currency: "EUR"
|
|
1968
2336
|
}),
|
|
1969
2337
|
installmentsCount: installmentsCount
|
|
1970
2338
|
}
|
|
1971
|
-
}), withNoFee());
|
|
2339
|
+
}), withNoFee(payment));
|
|
1972
2340
|
}
|
|
1973
2341
|
|
|
1974
2342
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -1976,18 +2344,18 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1976
2344
|
defaultMessage: "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1977
2345
|
values: {
|
|
1978
2346
|
firstInstallmentAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
1979
|
-
value: priceFromCents(
|
|
2347
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1980
2348
|
style: "currency",
|
|
1981
2349
|
currency: "EUR"
|
|
1982
2350
|
}),
|
|
1983
2351
|
numberOfRemainingInstallments: installmentsCount - 1,
|
|
1984
2352
|
othersInstallmentAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
1985
|
-
value: priceFromCents(
|
|
2353
|
+
value: priceFromCents(payment_plan[1].total_amount),
|
|
1986
2354
|
style: "currency",
|
|
1987
2355
|
currency: "EUR"
|
|
1988
2356
|
})
|
|
1989
2357
|
}
|
|
1990
|
-
}), withNoFee());
|
|
2358
|
+
}), withNoFee(payment));
|
|
1991
2359
|
}
|
|
1992
2360
|
|
|
1993
2361
|
return /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -2003,13 +2371,13 @@ var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
|
|
|
2003
2371
|
currentPlanIndex = _ref.currentPlanIndex,
|
|
2004
2372
|
setCurrentPlanIndex = _ref.setCurrentPlanIndex;
|
|
2005
2373
|
return /*#__PURE__*/React.createElement("div", {
|
|
2006
|
-
className: s$2.buttons
|
|
2374
|
+
className: cx(s$2.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
|
|
2007
2375
|
}, eligibilityPlans.map(function (eligibilityPlan, index) {
|
|
2008
2376
|
var _cx;
|
|
2009
2377
|
|
|
2010
2378
|
return /*#__PURE__*/React.createElement("button", {
|
|
2011
2379
|
key: index,
|
|
2012
|
-
className: cx((_cx = {}, _cx[s$2.active] = index === currentPlanIndex, _cx)),
|
|
2380
|
+
className: cx((_cx = {}, _cx[cx(s$2.active, STATIC_CUSTOMISATION_CLASSES.activeOption)] = index === currentPlanIndex, _cx)),
|
|
2013
2381
|
onClick: function onClick() {
|
|
2014
2382
|
return setCurrentPlanIndex(index);
|
|
2015
2383
|
}
|
|
@@ -2028,10 +2396,10 @@ var Schedule = function Schedule(_ref) {
|
|
|
2028
2396
|
var isCredit = currentPlan && currentPlan.installments_count > 4;
|
|
2029
2397
|
var intl = useIntl();
|
|
2030
2398
|
return /*#__PURE__*/React.createElement("div", {
|
|
2031
|
-
className: s$3.schedule,
|
|
2399
|
+
className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
2032
2400
|
"data-testid": "modal-installments-element"
|
|
2033
2401
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2034
|
-
className: cx(s$3.scheduleLine, s$3.total)
|
|
2402
|
+
className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
|
|
2035
2403
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2036
2404
|
id: "eligibility-modal.total",
|
|
2037
2405
|
defaultMessage: "Total"
|
|
@@ -2040,7 +2408,7 @@ var Schedule = function Schedule(_ref) {
|
|
|
2040
2408
|
style: "currency",
|
|
2041
2409
|
currency: "EUR"
|
|
2042
2410
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2043
|
-
className: cx(s$3.scheduleLine, s$3.creditCost)
|
|
2411
|
+
className: cx(s$3.scheduleLine, s$3.creditCost, STATIC_CUSTOMISATION_CLASSES.scheduleCredit)
|
|
2044
2412
|
}, isCredit ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2045
2413
|
id: "eligibility-modal.credit-cost",
|
|
2046
2414
|
defaultMessage: "Dont co\xFBt du cr\xE9dit"
|
|
@@ -2093,13 +2461,15 @@ var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
|
2093
2461
|
|
|
2094
2462
|
var Info = function Info() {
|
|
2095
2463
|
return /*#__PURE__*/React.createElement("div", {
|
|
2096
|
-
className: s$4.list,
|
|
2464
|
+
className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2097
2465
|
"data-testid": "modal-info-element"
|
|
2098
2466
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2099
2467
|
className: s$4.listItem
|
|
2100
2468
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2101
2469
|
className: s$4.bullet
|
|
2102
|
-
}, "1"), /*#__PURE__*/React.createElement("div",
|
|
2470
|
+
}, "1"), /*#__PURE__*/React.createElement("div", {
|
|
2471
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2472
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2103
2473
|
id: "eligibility-modal.bullet-1",
|
|
2104
2474
|
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
2105
2475
|
values: {
|
|
@@ -2111,7 +2481,9 @@ var Info = function Info() {
|
|
|
2111
2481
|
className: s$4.listItem
|
|
2112
2482
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2113
2483
|
className: s$4.bullet
|
|
2114
|
-
}, "2"), /*#__PURE__*/React.createElement("div",
|
|
2484
|
+
}, "2"), /*#__PURE__*/React.createElement("div", {
|
|
2485
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2486
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2115
2487
|
id: "eligibility-modal.bullet-2",
|
|
2116
2488
|
defaultMessage: "Renseignez les <strong>informations</strong> demand\xE9es.",
|
|
2117
2489
|
values: {
|
|
@@ -2123,7 +2495,9 @@ var Info = function Info() {
|
|
|
2123
2495
|
className: s$4.listItem
|
|
2124
2496
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2125
2497
|
className: s$4.bullet
|
|
2126
|
-
}, "3"), /*#__PURE__*/React.createElement("div",
|
|
2498
|
+
}, "3"), /*#__PURE__*/React.createElement("div", {
|
|
2499
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2500
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2127
2501
|
id: "eligibility-modal.bullet-3",
|
|
2128
2502
|
defaultMessage: "La validation de votre paiement <strong>instantan\xE9e</strong> !",
|
|
2129
2503
|
values: {
|
|
@@ -2181,7 +2555,7 @@ var s$6 = {"title":"_3ERx-"};
|
|
|
2181
2555
|
|
|
2182
2556
|
var Title = function Title() {
|
|
2183
2557
|
return /*#__PURE__*/React.createElement("div", {
|
|
2184
|
-
className: s$6.title,
|
|
2558
|
+
className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
2185
2559
|
"data-testid": "modal-title-element"
|
|
2186
2560
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
2187
2561
|
id: "eligibility-modal.title",
|
|
@@ -2202,9 +2576,9 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2202
2576
|
className: s$7.container,
|
|
2203
2577
|
"data-testid": "modal-container"
|
|
2204
2578
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2205
|
-
className: cx([s$7.block, s$7.left])
|
|
2579
|
+
className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2206
2580
|
}, /*#__PURE__*/React.createElement(Title, null), /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
|
|
2207
|
-
className: s$7.block
|
|
2581
|
+
className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
2208
2582
|
}, children));
|
|
2209
2583
|
};
|
|
2210
2584
|
|
|
@@ -2373,6 +2747,24 @@ var getIndexOfActivePlan = function getIndexOfActivePlan(_ref) {
|
|
|
2373
2747
|
return 0;
|
|
2374
2748
|
};
|
|
2375
2749
|
|
|
2750
|
+
/**
|
|
2751
|
+
* Prefix classes to avoid name collisions.
|
|
2752
|
+
*/
|
|
2753
|
+
var prefix$1 = 'alma-payment-plans';
|
|
2754
|
+
/**
|
|
2755
|
+
* Class names for the **payment plans** widget.
|
|
2756
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
2757
|
+
*/
|
|
2758
|
+
|
|
2759
|
+
var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
2760
|
+
container: prefix$1 + '-container',
|
|
2761
|
+
eligibilityLine: prefix$1 + '-eligibility-line',
|
|
2762
|
+
eligibilityOptions: prefix$1 + '-eligibility-options',
|
|
2763
|
+
notEligibleOption: prefix$1 + '-not-eligible-option',
|
|
2764
|
+
paymentInfo: prefix$1 + '-payment-info',
|
|
2765
|
+
activeOption: prefix$1 + '-active-option'
|
|
2766
|
+
};
|
|
2767
|
+
|
|
2376
2768
|
var s$b = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
2377
2769
|
|
|
2378
2770
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
@@ -2399,7 +2791,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2399
2791
|
eligibilityPlans: eligibilityPlans,
|
|
2400
2792
|
suggestedPaymentPlan: suggestedPaymentPlan != null ? suggestedPaymentPlan : 0
|
|
2401
2793
|
});
|
|
2402
|
-
var isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab
|
|
2794
|
+
var isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab
|
|
2403
2795
|
|
|
2404
2796
|
var isTransitionSpecified = transitionDelay !== undefined; // 👈 The merchant has specified a transition time
|
|
2405
2797
|
|
|
@@ -2484,14 +2876,14 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2484
2876
|
|
|
2485
2877
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2486
2878
|
onClick: handleOpenModal,
|
|
2487
|
-
className: cx(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx)),
|
|
2879
|
+
className: cx(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
|
|
2488
2880
|
"data-testid": "widget-button"
|
|
2489
2881
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2490
|
-
className: s$b.primaryContainer
|
|
2882
|
+
className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
2491
2883
|
}, /*#__PURE__*/React.createElement(LogoIcon, {
|
|
2492
2884
|
className: s$b.logo
|
|
2493
2885
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2494
|
-
className: s$b.paymentPlans
|
|
2886
|
+
className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
2495
2887
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
2496
2888
|
var _cx2;
|
|
2497
2889
|
|
|
@@ -2501,10 +2893,10 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2501
2893
|
return onHover(key);
|
|
2502
2894
|
},
|
|
2503
2895
|
onMouseOut: onLeave,
|
|
2504
|
-
className: cx(s$b.plan, (_cx2 = {}, _cx2[s$b.active] = current === key, _cx2[s$b.notEligible] = !eligibilityPlan.eligible, _cx2))
|
|
2896
|
+
className: cx(s$b.plan, (_cx2 = {}, _cx2[cx(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
2505
2897
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
2506
2898
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2507
|
-
className: cx(s$b.info, (_cx3 = {}, _cx3[s$b.notEligible] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3))
|
|
2899
|
+
className: cx(s$b.info, (_cx3 = {}, _cx3[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
|
|
2508
2900
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React.createElement(EligibilityModal, {
|
|
2509
2901
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|
|
2510
2902
|
onClose: closeModal,
|