@dotcms/react 0.0.1-alpha.2 → 0.0.1-alpha.21

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/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useRef, useEffect, createContext, useContext, forwardRef } from 'react';
3
- import { postMessageToEditor, CUSTOMER_ACTIONS } from '@dotcms/client';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { useState, useEffect, createContext, useContext, createElement as createElement$1, forwardRef } from 'react';
3
+ import { isInsideEditor, initEditor, updateNavigation, destroyEditor } from '@dotcms/client';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
 
@@ -9,7 +9,7 @@ var check = function (it) {
9
9
  };
10
10
 
11
11
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
- var global$f =
12
+ var global$b =
13
13
  // eslint-disable-next-line es/no-global-this -- safe
14
14
  check(typeof globalThis == 'object' && globalThis) ||
15
15
  check(typeof window == 'object' && window) ||
@@ -22,7 +22,7 @@ var global$f =
22
22
 
23
23
  var objectGetOwnPropertyDescriptor = {};
24
24
 
25
- var fails$g = function (exec) {
25
+ var fails$b = function (exec) {
26
26
  try {
27
27
  return !!exec();
28
28
  } catch (error) {
@@ -30,29 +30,29 @@ var fails$g = function (exec) {
30
30
  }
31
31
  };
32
32
 
33
- var fails$f = fails$g;
33
+ var fails$a = fails$b;
34
34
 
35
35
  // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$f(function () {
36
+ var descriptors = !fails$a(function () {
37
37
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
38
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
39
39
  });
40
40
 
41
- var fails$e = fails$g;
41
+ var fails$9 = fails$b;
42
42
 
43
- var functionBindNative = !fails$e(function () {
43
+ var functionBindNative = !fails$9(function () {
44
44
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
45
  var test = (function () { /* empty */ }).bind();
46
46
  // eslint-disable-next-line no-prototype-builtins -- safe
47
47
  return typeof test != 'function' || test.hasOwnProperty('prototype');
48
48
  });
49
49
 
50
- var NATIVE_BIND$2 = functionBindNative;
50
+ var NATIVE_BIND$1 = functionBindNative;
51
51
 
52
- var call$9 = Function.prototype.call;
52
+ var call$6 = Function.prototype.call;
53
53
 
54
- var functionCall = NATIVE_BIND$2 ? call$9.bind(call$9) : function () {
55
- return call$9.apply(call$9, arguments);
54
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
55
+ return call$6.apply(call$6, arguments);
56
56
  };
57
57
 
58
58
  var objectPropertyIsEnumerable = {};
@@ -71,7 +71,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
71
71
  return !!descriptor && descriptor.enumerable;
72
72
  } : $propertyIsEnumerable;
73
73
 
74
- var createPropertyDescriptor$2 = function (bitmap, value) {
74
+ var createPropertyDescriptor$3 = function (bitmap, value) {
75
75
  return {
76
76
  enumerable: !(bitmap & 1),
77
77
  configurable: !(bitmap & 2),
@@ -80,66 +80,66 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
80
80
  };
81
81
  };
82
82
 
83
- var NATIVE_BIND$1 = functionBindNative;
83
+ var NATIVE_BIND = functionBindNative;
84
84
 
85
- var FunctionPrototype$2 = Function.prototype;
86
- var call$8 = FunctionPrototype$2.call;
87
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$8, call$8);
85
+ var FunctionPrototype$1 = Function.prototype;
86
+ var call$5 = FunctionPrototype$1.call;
87
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
88
88
 
89
- var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
89
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
90
90
  return function () {
91
- return call$8.apply(fn, arguments);
91
+ return call$5.apply(fn, arguments);
92
92
  };
93
93
  };
94
94
 
95
- var uncurryThis$g = functionUncurryThis;
95
+ var uncurryThis$a = functionUncurryThis;
96
96
 
97
- var toString$6 = uncurryThis$g({}.toString);
98
- var stringSlice$5 = uncurryThis$g(''.slice);
97
+ var toString$1 = uncurryThis$a({}.toString);
98
+ var stringSlice$1 = uncurryThis$a(''.slice);
99
99
 
100
- var classofRaw$2 = function (it) {
101
- return stringSlice$5(toString$6(it), 8, -1);
100
+ var classofRaw = function (it) {
101
+ return stringSlice$1(toString$1(it), 8, -1);
102
102
  };
103
103
 
104
- var uncurryThis$f = functionUncurryThis;
105
- var fails$d = fails$g;
106
- var classof$5 = classofRaw$2;
104
+ var uncurryThis$9 = functionUncurryThis;
105
+ var fails$8 = fails$b;
106
+ var classof = classofRaw;
107
107
 
108
108
  var $Object$3 = Object;
109
- var split = uncurryThis$f(''.split);
109
+ var split = uncurryThis$9(''.split);
110
110
 
111
111
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
- var indexedObject = fails$d(function () {
112
+ var indexedObject = fails$8(function () {
113
113
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
114
  // eslint-disable-next-line no-prototype-builtins -- safe
115
115
  return !$Object$3('z').propertyIsEnumerable(0);
116
116
  }) ? function (it) {
117
- return classof$5(it) === 'String' ? split(it, '') : $Object$3(it);
117
+ return classof(it) === 'String' ? split(it, '') : $Object$3(it);
118
118
  } : $Object$3;
119
119
 
120
120
  // we can't use just `it == null` since of `document.all` special case
121
121
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
122
- var isNullOrUndefined$3 = function (it) {
122
+ var isNullOrUndefined$2 = function (it) {
123
123
  return it === null || it === undefined;
124
124
  };
125
125
 
126
- var isNullOrUndefined$2 = isNullOrUndefined$3;
126
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
127
127
 
128
- var $TypeError$8 = TypeError;
128
+ var $TypeError$6 = TypeError;
129
129
 
130
130
  // `RequireObjectCoercible` abstract operation
131
131
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
- var requireObjectCoercible$5 = function (it) {
133
- if (isNullOrUndefined$2(it)) throw new $TypeError$8("Can't call method on " + it);
132
+ var requireObjectCoercible$3 = function (it) {
133
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
134
134
  return it;
135
135
  };
136
136
 
137
137
  // toObject with fallback for non-array-like ES3 strings
138
- var IndexedObject$2 = indexedObject;
139
- var requireObjectCoercible$4 = requireObjectCoercible$5;
138
+ var IndexedObject$1 = indexedObject;
139
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
140
140
 
141
- var toIndexedObject$4 = function (it) {
142
- return IndexedObject$2(requireObjectCoercible$4(it));
141
+ var toIndexedObject$5 = function (it) {
142
+ return IndexedObject$1(requireObjectCoercible$2(it));
143
143
  };
144
144
 
145
145
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
@@ -156,11 +156,11 @@ var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefine
156
156
 
157
157
  var isCallable$c = isCallable$d;
158
158
 
159
- var isObject$6 = function (it) {
159
+ var isObject$8 = function (it) {
160
160
  return typeof it == 'object' ? it !== null : isCallable$c(it);
161
161
  };
162
162
 
163
- var global$e = global$f;
163
+ var global$a = global$b;
164
164
  var isCallable$b = isCallable$d;
165
165
 
166
166
  var aFunction = function (argument) {
@@ -168,20 +168,20 @@ var aFunction = function (argument) {
168
168
  };
169
169
 
170
170
  var getBuiltIn$3 = function (namespace, method) {
171
- return arguments.length < 2 ? aFunction(global$e[namespace]) : global$e[namespace] && global$e[namespace][method];
171
+ return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
172
172
  };
173
173
 
174
- var uncurryThis$e = functionUncurryThis;
174
+ var uncurryThis$8 = functionUncurryThis;
175
175
 
176
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
176
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
177
177
 
178
178
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
179
179
 
180
- var global$d = global$f;
180
+ var global$9 = global$b;
181
181
  var userAgent = engineUserAgent;
182
182
 
183
- var process = global$d.process;
184
- var Deno = global$d.Deno;
183
+ var process = global$9.process;
184
+ var Deno = global$9.Deno;
185
185
  var versions = process && process.versions || Deno && Deno.version;
186
186
  var v8 = versions && versions.v8;
187
187
  var match, version;
@@ -207,13 +207,13 @@ var engineV8Version = version;
207
207
 
208
208
  /* eslint-disable es/no-symbol -- required for testing */
209
209
  var V8_VERSION = engineV8Version;
210
- var fails$c = fails$g;
211
- var global$c = global$f;
210
+ var fails$7 = fails$b;
211
+ var global$8 = global$b;
212
212
 
213
- var $String$4 = global$c.String;
213
+ var $String$4 = global$8.String;
214
214
 
215
215
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
216
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$c(function () {
216
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
217
217
  var symbol = Symbol('symbol detection');
218
218
  // Chrome 38 Symbol has incorrect toString conversion
219
219
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -258,147 +258,147 @@ var tryToString$1 = function (argument) {
258
258
  var isCallable$9 = isCallable$d;
259
259
  var tryToString = tryToString$1;
260
260
 
261
- var $TypeError$7 = TypeError;
261
+ var $TypeError$5 = TypeError;
262
262
 
263
263
  // `Assert: IsCallable(argument) is true`
264
264
  var aCallable$2 = function (argument) {
265
265
  if (isCallable$9(argument)) return argument;
266
- throw new $TypeError$7(tryToString(argument) + ' is not a function');
266
+ throw new $TypeError$5(tryToString(argument) + ' is not a function');
267
267
  };
268
268
 
269
269
  var aCallable$1 = aCallable$2;
270
- var isNullOrUndefined$1 = isNullOrUndefined$3;
270
+ var isNullOrUndefined = isNullOrUndefined$2;
271
271
 
272
272
  // `GetMethod` abstract operation
273
273
  // https://tc39.es/ecma262/#sec-getmethod
274
- var getMethod$2 = function (V, P) {
274
+ var getMethod$1 = function (V, P) {
275
275
  var func = V[P];
276
- return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
276
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
277
277
  };
278
278
 
279
- var call$7 = functionCall;
279
+ var call$4 = functionCall;
280
280
  var isCallable$8 = isCallable$d;
281
- var isObject$5 = isObject$6;
281
+ var isObject$7 = isObject$8;
282
282
 
283
- var $TypeError$6 = TypeError;
283
+ var $TypeError$4 = TypeError;
284
284
 
285
285
  // `OrdinaryToPrimitive` abstract operation
286
286
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
287
  var ordinaryToPrimitive$1 = function (input, pref) {
288
288
  var fn, val;
289
- if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$7(fn, input))) return val;
290
- if (isCallable$8(fn = input.valueOf) && !isObject$5(val = call$7(fn, input))) return val;
291
- if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$5(val = call$7(fn, input))) return val;
292
- throw new $TypeError$6("Can't convert object to primitive value");
289
+ if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
290
+ if (isCallable$8(fn = input.valueOf) && !isObject$7(val = call$4(fn, input))) return val;
291
+ if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
292
+ throw new $TypeError$4("Can't convert object to primitive value");
293
293
  };
294
294
 
295
- var shared$4 = {exports: {}};
295
+ var sharedStore = {exports: {}};
296
296
 
297
- var global$b = global$f;
297
+ var global$7 = global$b;
298
298
 
299
299
  // eslint-disable-next-line es/no-object-defineproperty -- safe
300
- var defineProperty$3 = Object.defineProperty;
300
+ var defineProperty$5 = Object.defineProperty;
301
301
 
302
302
  var defineGlobalProperty$3 = function (key, value) {
303
303
  try {
304
- defineProperty$3(global$b, key, { value: value, configurable: true, writable: true });
304
+ defineProperty$5(global$7, key, { value: value, configurable: true, writable: true });
305
305
  } catch (error) {
306
- global$b[key] = value;
306
+ global$7[key] = value;
307
307
  } return value;
308
308
  };
309
309
 
310
- var global$a = global$f;
310
+ var globalThis$1 = global$b;
311
311
  var defineGlobalProperty$2 = defineGlobalProperty$3;
312
312
 
313
313
  var SHARED = '__core-js_shared__';
314
- var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
315
-
316
- var sharedStore = store$3;
314
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
317
315
 
318
- var store$2 = sharedStore;
319
-
320
- (shared$4.exports = function (key, value) {
321
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
322
- })('versions', []).push({
323
- version: '3.35.0',
316
+ (store$3.versions || (store$3.versions = [])).push({
317
+ version: '3.37.1',
324
318
  mode: 'global',
325
- copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
326
- license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
319
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
320
+ license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
327
321
  source: 'https://github.com/zloirock/core-js'
328
322
  });
329
323
 
330
- var requireObjectCoercible$3 = requireObjectCoercible$5;
324
+ var store$2 = sharedStore.exports;
325
+
326
+ var shared$3 = function (key, value) {
327
+ return store$2[key] || (store$2[key] = value || {});
328
+ };
329
+
330
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
331
331
 
332
332
  var $Object$1 = Object;
333
333
 
334
334
  // `ToObject` abstract operation
335
335
  // https://tc39.es/ecma262/#sec-toobject
336
- var toObject$4 = function (argument) {
337
- return $Object$1(requireObjectCoercible$3(argument));
336
+ var toObject$3 = function (argument) {
337
+ return $Object$1(requireObjectCoercible$1(argument));
338
338
  };
339
339
 
340
- var uncurryThis$d = functionUncurryThis;
341
- var toObject$3 = toObject$4;
340
+ var uncurryThis$7 = functionUncurryThis;
341
+ var toObject$2 = toObject$3;
342
342
 
343
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
343
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
344
344
 
345
345
  // `HasOwnProperty` abstract operation
346
346
  // https://tc39.es/ecma262/#sec-hasownproperty
347
347
  // eslint-disable-next-line es/no-object-hasown -- safe
348
348
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
349
- return hasOwnProperty(toObject$3(it), key);
349
+ return hasOwnProperty(toObject$2(it), key);
350
350
  };
351
351
 
352
- var uncurryThis$c = functionUncurryThis;
352
+ var uncurryThis$6 = functionUncurryThis;
353
353
 
354
354
  var id = 0;
355
355
  var postfix = Math.random();
356
- var toString$5 = uncurryThis$c(1.0.toString);
356
+ var toString = uncurryThis$6(1.0.toString);
357
357
 
358
358
  var uid$2 = function (key) {
359
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
359
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
360
360
  };
361
361
 
362
- var global$9 = global$f;
363
- var shared$3 = shared$4.exports;
364
- var hasOwn$6 = hasOwnProperty_1;
362
+ var global$6 = global$b;
363
+ var shared$2 = shared$3;
364
+ var hasOwn$8 = hasOwnProperty_1;
365
365
  var uid$1 = uid$2;
366
366
  var NATIVE_SYMBOL = symbolConstructorDetection;
367
367
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
368
 
369
- var Symbol$1 = global$9.Symbol;
370
- var WellKnownSymbolsStore = shared$3('wks');
369
+ var Symbol$1 = global$6.Symbol;
370
+ var WellKnownSymbolsStore = shared$2('wks');
371
371
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
372
372
 
373
- var wellKnownSymbol$8 = function (name) {
374
- if (!hasOwn$6(WellKnownSymbolsStore, name)) {
375
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
373
+ var wellKnownSymbol$6 = function (name) {
374
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
375
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
376
376
  ? Symbol$1[name]
377
377
  : createWellKnownSymbol('Symbol.' + name);
378
378
  } return WellKnownSymbolsStore[name];
379
379
  };
380
380
 
381
- var call$6 = functionCall;
382
- var isObject$4 = isObject$6;
381
+ var call$3 = functionCall;
382
+ var isObject$6 = isObject$8;
383
383
  var isSymbol$1 = isSymbol$2;
384
- var getMethod$1 = getMethod$2;
384
+ var getMethod = getMethod$1;
385
385
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
- var wellKnownSymbol$7 = wellKnownSymbol$8;
386
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
387
387
 
388
- var $TypeError$5 = TypeError;
389
- var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
388
+ var $TypeError$3 = TypeError;
389
+ var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
390
390
 
391
391
  // `ToPrimitive` abstract operation
392
392
  // https://tc39.es/ecma262/#sec-toprimitive
393
393
  var toPrimitive$1 = function (input, pref) {
394
- if (!isObject$4(input) || isSymbol$1(input)) return input;
395
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
394
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
395
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
396
396
  var result;
397
397
  if (exoticToPrim) {
398
398
  if (pref === undefined) pref = 'default';
399
- result = call$6(exoticToPrim, input, pref);
400
- if (!isObject$4(result) || isSymbol$1(result)) return result;
401
- throw new $TypeError$5("Can't convert object to primitive value");
399
+ result = call$3(exoticToPrim, input, pref);
400
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
401
+ throw new $TypeError$3("Can't convert object to primitive value");
402
402
  }
403
403
  if (pref === undefined) pref = 'number';
404
404
  return ordinaryToPrimitive(input, pref);
@@ -414,36 +414,36 @@ var toPropertyKey$2 = function (argument) {
414
414
  return isSymbol(key) ? key : key + '';
415
415
  };
416
416
 
417
- var global$8 = global$f;
418
- var isObject$3 = isObject$6;
417
+ var global$5 = global$b;
418
+ var isObject$5 = isObject$8;
419
419
 
420
- var document$1 = global$8.document;
420
+ var document$1 = global$5.document;
421
421
  // typeof document.createElement is 'object' in old IE
422
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
422
+ var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
423
423
 
424
- var documentCreateElement$1 = function (it) {
424
+ var documentCreateElement$2 = function (it) {
425
425
  return EXISTS$1 ? document$1.createElement(it) : {};
426
426
  };
427
427
 
428
- var DESCRIPTORS$8 = descriptors;
429
- var fails$b = fails$g;
430
- var createElement = documentCreateElement$1;
428
+ var DESCRIPTORS$9 = descriptors;
429
+ var fails$6 = fails$b;
430
+ var createElement = documentCreateElement$2;
431
431
 
432
432
  // Thanks to IE8 for its funny defineProperty
433
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$b(function () {
433
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$6(function () {
434
434
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
435
435
  return Object.defineProperty(createElement('div'), 'a', {
436
436
  get: function () { return 7; }
437
437
  }).a !== 7;
438
438
  });
439
439
 
440
- var DESCRIPTORS$7 = descriptors;
441
- var call$5 = functionCall;
440
+ var DESCRIPTORS$8 = descriptors;
441
+ var call$2 = functionCall;
442
442
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
443
- var createPropertyDescriptor$1 = createPropertyDescriptor$2;
444
- var toIndexedObject$3 = toIndexedObject$4;
443
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
444
+ var toIndexedObject$4 = toIndexedObject$5;
445
445
  var toPropertyKey$1 = toPropertyKey$2;
446
- var hasOwn$5 = hasOwnProperty_1;
446
+ var hasOwn$7 = hasOwnProperty_1;
447
447
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
448
 
449
449
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -451,23 +451,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
451
 
452
452
  // `Object.getOwnPropertyDescriptor` method
453
453
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
454
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
- O = toIndexedObject$3(O);
454
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
+ O = toIndexedObject$4(O);
456
456
  P = toPropertyKey$1(P);
457
457
  if (IE8_DOM_DEFINE$1) try {
458
458
  return $getOwnPropertyDescriptor$1(O, P);
459
459
  } catch (error) { /* empty */ }
460
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$5(propertyIsEnumerableModule$1.f, O, P), O[P]);
460
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
461
  };
462
462
 
463
463
  var objectDefineProperty = {};
464
464
 
465
- var DESCRIPTORS$6 = descriptors;
466
- var fails$a = fails$g;
465
+ var DESCRIPTORS$7 = descriptors;
466
+ var fails$5 = fails$b;
467
467
 
468
468
  // V8 ~ Chrome 36-
469
469
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
- var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$a(function () {
470
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$5(function () {
471
471
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
472
472
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
473
  value: 42,
@@ -475,24 +475,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$a(function () {
475
475
  }).prototype !== 42;
476
476
  });
477
477
 
478
- var isObject$2 = isObject$6;
478
+ var isObject$4 = isObject$8;
479
479
 
480
480
  var $String$2 = String;
481
- var $TypeError$4 = TypeError;
481
+ var $TypeError$2 = TypeError;
482
482
 
483
483
  // `Assert: Type(argument) is Object`
484
- var anObject$7 = function (argument) {
485
- if (isObject$2(argument)) return argument;
486
- throw new $TypeError$4($String$2(argument) + ' is not an object');
484
+ var anObject$4 = function (argument) {
485
+ if (isObject$4(argument)) return argument;
486
+ throw new $TypeError$2($String$2(argument) + ' is not an object');
487
487
  };
488
488
 
489
- var DESCRIPTORS$5 = descriptors;
489
+ var DESCRIPTORS$6 = descriptors;
490
490
  var IE8_DOM_DEFINE = ie8DomDefine;
491
491
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
492
- var anObject$6 = anObject$7;
492
+ var anObject$3 = anObject$4;
493
493
  var toPropertyKey = toPropertyKey$2;
494
494
 
495
- var $TypeError$3 = TypeError;
495
+ var $TypeError$1 = TypeError;
496
496
  // eslint-disable-next-line es/no-object-defineproperty -- safe
497
497
  var $defineProperty = Object.defineProperty;
498
498
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -503,10 +503,10 @@ var WRITABLE = 'writable';
503
503
 
504
504
  // `Object.defineProperty` method
505
505
  // https://tc39.es/ecma262/#sec-object.defineproperty
506
- objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
507
- anObject$6(O);
506
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
507
+ anObject$3(O);
508
508
  P = toPropertyKey(P);
509
- anObject$6(Attributes);
509
+ anObject$3(Attributes);
510
510
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
511
511
  var current = $getOwnPropertyDescriptor(O, P);
512
512
  if (current && current[WRITABLE]) {
@@ -519,23 +519,23 @@ objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
519
519
  }
520
520
  } return $defineProperty(O, P, Attributes);
521
521
  } : $defineProperty : function defineProperty(O, P, Attributes) {
522
- anObject$6(O);
522
+ anObject$3(O);
523
523
  P = toPropertyKey(P);
524
- anObject$6(Attributes);
524
+ anObject$3(Attributes);
525
525
  if (IE8_DOM_DEFINE) try {
526
526
  return $defineProperty(O, P, Attributes);
527
527
  } catch (error) { /* empty */ }
528
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
528
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
529
529
  if ('value' in Attributes) O[P] = Attributes.value;
530
530
  return O;
531
531
  };
532
532
 
533
- var DESCRIPTORS$4 = descriptors;
533
+ var DESCRIPTORS$5 = descriptors;
534
534
  var definePropertyModule$3 = objectDefineProperty;
535
- var createPropertyDescriptor = createPropertyDescriptor$2;
535
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
536
536
 
537
- var createNonEnumerableProperty$3 = DESCRIPTORS$4 ? function (object, key, value) {
538
- return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
537
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
538
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
539
539
  } : function (object, key, value) {
540
540
  object[key] = value;
541
541
  return object;
@@ -543,17 +543,17 @@ var createNonEnumerableProperty$3 = DESCRIPTORS$4 ? function (object, key, value
543
543
 
544
544
  var makeBuiltIn$2 = {exports: {}};
545
545
 
546
- var DESCRIPTORS$3 = descriptors;
547
- var hasOwn$4 = hasOwnProperty_1;
546
+ var DESCRIPTORS$4 = descriptors;
547
+ var hasOwn$6 = hasOwnProperty_1;
548
548
 
549
- var FunctionPrototype$1 = Function.prototype;
549
+ var FunctionPrototype = Function.prototype;
550
550
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
551
- var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
551
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
552
552
 
553
- var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
553
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
554
554
  // additional protection from minified / mangled / dropped function names
555
555
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
556
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
556
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
557
557
 
558
558
  var functionName = {
559
559
  EXISTS: EXISTS,
@@ -561,11 +561,11 @@ var functionName = {
561
561
  CONFIGURABLE: CONFIGURABLE
562
562
  };
563
563
 
564
- var uncurryThis$b = functionUncurryThis;
564
+ var uncurryThis$5 = functionUncurryThis;
565
565
  var isCallable$7 = isCallable$d;
566
- var store$1 = sharedStore;
566
+ var store$1 = sharedStore.exports;
567
567
 
568
- var functionToString = uncurryThis$b(Function.toString);
568
+ var functionToString = uncurryThis$5(Function.toString);
569
569
 
570
570
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
571
571
  if (!isCallable$7(store$1.inspectSource)) {
@@ -576,36 +576,36 @@ if (!isCallable$7(store$1.inspectSource)) {
576
576
 
577
577
  var inspectSource$1 = store$1.inspectSource;
578
578
 
579
- var global$7 = global$f;
579
+ var global$4 = global$b;
580
580
  var isCallable$6 = isCallable$d;
581
581
 
582
- var WeakMap$1 = global$7.WeakMap;
582
+ var WeakMap$1 = global$4.WeakMap;
583
583
 
584
584
  var weakMapBasicDetection = isCallable$6(WeakMap$1) && /native code/.test(String(WeakMap$1));
585
585
 
586
- var shared$2 = shared$4.exports;
586
+ var shared$1 = shared$3;
587
587
  var uid = uid$2;
588
588
 
589
- var keys = shared$2('keys');
589
+ var keys = shared$1('keys');
590
590
 
591
- var sharedKey$2 = function (key) {
591
+ var sharedKey$3 = function (key) {
592
592
  return keys[key] || (keys[key] = uid(key));
593
593
  };
594
594
 
595
595
  var hiddenKeys$4 = {};
596
596
 
597
597
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
598
- var global$6 = global$f;
599
- var isObject$1 = isObject$6;
600
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
601
- var hasOwn$3 = hasOwnProperty_1;
602
- var shared$1 = sharedStore;
603
- var sharedKey$1 = sharedKey$2;
598
+ var global$3 = global$b;
599
+ var isObject$3 = isObject$8;
600
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
601
+ var hasOwn$5 = hasOwnProperty_1;
602
+ var shared = sharedStore.exports;
603
+ var sharedKey$2 = sharedKey$3;
604
604
  var hiddenKeys$3 = hiddenKeys$4;
605
605
 
606
606
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607
- var TypeError$1 = global$6.TypeError;
608
- var WeakMap = global$6.WeakMap;
607
+ var TypeError$1 = global$3.TypeError;
608
+ var WeakMap = global$3.WeakMap;
609
609
  var set, get, has;
610
610
 
611
611
  var enforce = function (it) {
@@ -615,14 +615,14 @@ var enforce = function (it) {
615
615
  var getterFor = function (TYPE) {
616
616
  return function (it) {
617
617
  var state;
618
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
618
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
619
619
  throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
620
620
  } return state;
621
621
  };
622
622
  };
623
623
 
624
- if (NATIVE_WEAK_MAP || shared$1.state) {
625
- var store = shared$1.state || (shared$1.state = new WeakMap());
624
+ if (NATIVE_WEAK_MAP || shared.state) {
625
+ var store = shared.state || (shared.state = new WeakMap());
626
626
  /* eslint-disable no-self-assign -- prototype methods protection */
627
627
  store.get = store.get;
628
628
  store.has = store.has;
@@ -641,19 +641,19 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
641
641
  return store.has(it);
642
642
  };
643
643
  } else {
644
- var STATE = sharedKey$1('state');
644
+ var STATE = sharedKey$2('state');
645
645
  hiddenKeys$3[STATE] = true;
646
646
  set = function (it, metadata) {
647
- if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
647
+ if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
648
648
  metadata.facade = it;
649
- createNonEnumerableProperty$2(it, STATE, metadata);
649
+ createNonEnumerableProperty$3(it, STATE, metadata);
650
650
  return metadata;
651
651
  };
652
652
  get = function (it) {
653
- return hasOwn$3(it, STATE) ? it[STATE] : {};
653
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
654
654
  };
655
655
  has = function (it) {
656
- return hasOwn$3(it, STATE);
656
+ return hasOwn$5(it, STATE);
657
657
  };
658
658
  }
659
659
 
@@ -665,51 +665,51 @@ var internalState = {
665
665
  getterFor: getterFor
666
666
  };
667
667
 
668
- var uncurryThis$a = functionUncurryThis;
669
- var fails$9 = fails$g;
668
+ var uncurryThis$4 = functionUncurryThis;
669
+ var fails$4 = fails$b;
670
670
  var isCallable$5 = isCallable$d;
671
- var hasOwn$2 = hasOwnProperty_1;
672
- var DESCRIPTORS$2 = descriptors;
673
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
671
+ var hasOwn$4 = hasOwnProperty_1;
672
+ var DESCRIPTORS$3 = descriptors;
673
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
674
674
  var inspectSource = inspectSource$1;
675
- var InternalStateModule = internalState;
675
+ var InternalStateModule$1 = internalState;
676
676
 
677
- var enforceInternalState = InternalStateModule.enforce;
678
- var getInternalState$1 = InternalStateModule.get;
677
+ var enforceInternalState = InternalStateModule$1.enforce;
678
+ var getInternalState$1 = InternalStateModule$1.get;
679
679
  var $String$1 = String;
680
680
  // eslint-disable-next-line es/no-object-defineproperty -- safe
681
- var defineProperty$2 = Object.defineProperty;
682
- var stringSlice$4 = uncurryThis$a(''.slice);
683
- var replace$2 = uncurryThis$a(''.replace);
684
- var join = uncurryThis$a([].join);
681
+ var defineProperty$4 = Object.defineProperty;
682
+ var stringSlice = uncurryThis$4(''.slice);
683
+ var replace = uncurryThis$4(''.replace);
684
+ var join = uncurryThis$4([].join);
685
685
 
686
- var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$9(function () {
687
- return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
686
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$4(function () {
687
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
688
688
  });
689
689
 
690
690
  var TEMPLATE = String(String).split('String');
691
691
 
692
692
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
693
- if (stringSlice$4($String$1(name), 0, 7) === 'Symbol(') {
694
- name = '[' + replace$2($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
693
+ if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
694
+ name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
695
695
  }
696
696
  if (options && options.getter) name = 'get ' + name;
697
697
  if (options && options.setter) name = 'set ' + name;
698
- if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
699
- if (DESCRIPTORS$2) defineProperty$2(value, 'name', { value: name, configurable: true });
698
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
699
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
700
700
  else value.name = name;
701
701
  }
702
- if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
703
- defineProperty$2(value, 'length', { value: options.arity });
702
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
703
+ defineProperty$4(value, 'length', { value: options.arity });
704
704
  }
705
705
  try {
706
- if (options && hasOwn$2(options, 'constructor') && options.constructor) {
707
- if (DESCRIPTORS$2) defineProperty$2(value, 'prototype', { writable: false });
706
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
707
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
708
708
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
709
709
  } else if (value.prototype) value.prototype = undefined;
710
710
  } catch (error) { /* empty */ }
711
711
  var state = enforceInternalState(value);
712
- if (!hasOwn$2(state, 'source')) {
712
+ if (!hasOwn$4(state, 'source')) {
713
713
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
714
714
  } return value;
715
715
  };
@@ -725,7 +725,7 @@ var definePropertyModule$2 = objectDefineProperty;
725
725
  var makeBuiltIn = makeBuiltIn$2.exports;
726
726
  var defineGlobalProperty$1 = defineGlobalProperty$3;
727
727
 
728
- var defineBuiltIn$2 = function (O, key, value, options) {
728
+ var defineBuiltIn$3 = function (O, key, value, options) {
729
729
  if (!options) options = {};
730
730
  var simple = options.enumerable;
731
731
  var name = options.name !== undefined ? options.name : key;
@@ -751,66 +751,68 @@ var defineBuiltIn$2 = function (O, key, value, options) {
751
751
  var objectGetOwnPropertyNames = {};
752
752
 
753
753
  var ceil = Math.ceil;
754
- var floor$1 = Math.floor;
754
+ var floor = Math.floor;
755
755
 
756
756
  // `Math.trunc` method
757
757
  // https://tc39.es/ecma262/#sec-math.trunc
758
758
  // eslint-disable-next-line es/no-math-trunc -- safe
759
759
  var mathTrunc = Math.trunc || function trunc(x) {
760
760
  var n = +x;
761
- return (n > 0 ? floor$1 : ceil)(n);
761
+ return (n > 0 ? floor : ceil)(n);
762
762
  };
763
763
 
764
764
  var trunc = mathTrunc;
765
765
 
766
766
  // `ToIntegerOrInfinity` abstract operation
767
767
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
768
- var toIntegerOrInfinity$4 = function (argument) {
768
+ var toIntegerOrInfinity$2 = function (argument) {
769
769
  var number = +argument;
770
770
  // eslint-disable-next-line no-self-compare -- NaN check
771
771
  return number !== number || number === 0 ? 0 : trunc(number);
772
772
  };
773
773
 
774
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
774
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
775
775
 
776
- var max$1 = Math.max;
777
- var min$2 = Math.min;
776
+ var max = Math.max;
777
+ var min$1 = Math.min;
778
778
 
779
779
  // Helper for a popular repeating case of the spec:
780
780
  // Let integer be ? ToInteger(index).
781
781
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
782
782
  var toAbsoluteIndex$1 = function (index, length) {
783
- var integer = toIntegerOrInfinity$3(index);
784
- return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
783
+ var integer = toIntegerOrInfinity$1(index);
784
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
785
785
  };
786
786
 
787
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
787
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
788
788
 
789
- var min$1 = Math.min;
789
+ var min = Math.min;
790
790
 
791
791
  // `ToLength` abstract operation
792
792
  // https://tc39.es/ecma262/#sec-tolength
793
- var toLength$2 = function (argument) {
794
- return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
793
+ var toLength$1 = function (argument) {
794
+ var len = toIntegerOrInfinity(argument);
795
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
795
796
  };
796
797
 
797
- var toLength$1 = toLength$2;
798
+ var toLength = toLength$1;
798
799
 
799
800
  // `LengthOfArrayLike` abstract operation
800
801
  // https://tc39.es/ecma262/#sec-lengthofarraylike
801
- var lengthOfArrayLike$2 = function (obj) {
802
- return toLength$1(obj.length);
802
+ var lengthOfArrayLike$1 = function (obj) {
803
+ return toLength(obj.length);
803
804
  };
804
805
 
805
- var toIndexedObject$2 = toIndexedObject$4;
806
+ var toIndexedObject$3 = toIndexedObject$5;
806
807
  var toAbsoluteIndex = toAbsoluteIndex$1;
807
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
808
+ var lengthOfArrayLike = lengthOfArrayLike$1;
808
809
 
809
810
  // `Array.prototype.{ indexOf, includes }` methods implementation
810
- var createMethod$2 = function (IS_INCLUDES) {
811
+ var createMethod = function (IS_INCLUDES) {
811
812
  return function ($this, el, fromIndex) {
812
- var O = toIndexedObject$2($this);
813
- var length = lengthOfArrayLike$1(O);
813
+ var O = toIndexedObject$3($this);
814
+ var length = lengthOfArrayLike(O);
815
+ if (length === 0) return !IS_INCLUDES && -1;
814
816
  var index = toAbsoluteIndex(fromIndex, length);
815
817
  var value;
816
818
  // Array#includes uses SameValueZero equality algorithm
@@ -829,29 +831,29 @@ var createMethod$2 = function (IS_INCLUDES) {
829
831
  var arrayIncludes = {
830
832
  // `Array.prototype.includes` method
831
833
  // https://tc39.es/ecma262/#sec-array.prototype.includes
832
- includes: createMethod$2(true),
834
+ includes: createMethod(true),
833
835
  // `Array.prototype.indexOf` method
834
836
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
835
- indexOf: createMethod$2(false)
837
+ indexOf: createMethod(false)
836
838
  };
837
839
 
838
- var uncurryThis$9 = functionUncurryThis;
839
- var hasOwn$1 = hasOwnProperty_1;
840
- var toIndexedObject$1 = toIndexedObject$4;
841
- var indexOf$1 = arrayIncludes.indexOf;
840
+ var uncurryThis$3 = functionUncurryThis;
841
+ var hasOwn$3 = hasOwnProperty_1;
842
+ var toIndexedObject$2 = toIndexedObject$5;
843
+ var indexOf = arrayIncludes.indexOf;
842
844
  var hiddenKeys$2 = hiddenKeys$4;
843
845
 
844
- var push$1 = uncurryThis$9([].push);
846
+ var push = uncurryThis$3([].push);
845
847
 
846
848
  var objectKeysInternal = function (object, names) {
847
- var O = toIndexedObject$1(object);
849
+ var O = toIndexedObject$2(object);
848
850
  var i = 0;
849
851
  var result = [];
850
852
  var key;
851
- for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$1(result, key);
853
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
852
854
  // Don't enum bug & hidden keys
853
- while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
854
- ~indexOf$1(result, key) || push$1(result, key);
855
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
856
+ ~indexOf(result, key) || push(result, key);
855
857
  }
856
858
  return result;
857
859
  };
@@ -885,21 +887,21 @@ var objectGetOwnPropertySymbols = {};
885
887
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
886
888
 
887
889
  var getBuiltIn$1 = getBuiltIn$3;
888
- var uncurryThis$8 = functionUncurryThis;
890
+ var uncurryThis$2 = functionUncurryThis;
889
891
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
890
892
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
891
- var anObject$5 = anObject$7;
893
+ var anObject$2 = anObject$4;
892
894
 
893
- var concat$2 = uncurryThis$8([].concat);
895
+ var concat$1 = uncurryThis$2([].concat);
894
896
 
895
897
  // all object keys, includes non-enumerable and symbols
896
898
  var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
897
- var keys = getOwnPropertyNamesModule.f(anObject$5(it));
899
+ var keys = getOwnPropertyNamesModule.f(anObject$2(it));
898
900
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
899
- return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
901
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
900
902
  };
901
903
 
902
- var hasOwn = hasOwnProperty_1;
904
+ var hasOwn$2 = hasOwnProperty_1;
903
905
  var ownKeys = ownKeys$1;
904
906
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
905
907
  var definePropertyModule$1 = objectDefineProperty;
@@ -910,13 +912,13 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
910
912
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
911
913
  for (var i = 0; i < keys.length; i++) {
912
914
  var key = keys[i];
913
- if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
915
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
914
916
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
915
917
  }
916
918
  }
917
919
  };
918
920
 
919
- var fails$8 = fails$g;
921
+ var fails$3 = fails$b;
920
922
  var isCallable$3 = isCallable$d;
921
923
 
922
924
  var replacement = /#|\.prototype\./;
@@ -925,7 +927,7 @@ var isForced$1 = function (feature, detection) {
925
927
  var value = data[normalize(feature)];
926
928
  return value === POLYFILL ? true
927
929
  : value === NATIVE ? false
928
- : isCallable$3(detection) ? fails$8(detection)
930
+ : isCallable$3(detection) ? fails$3(detection)
929
931
  : !!detection;
930
932
  };
931
933
 
@@ -939,10 +941,10 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
939
941
 
940
942
  var isForced_1 = isForced$1;
941
943
 
942
- var global$5 = global$f;
944
+ var global$2 = global$b;
943
945
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
944
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
945
- var defineBuiltIn$1 = defineBuiltIn$2;
946
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
947
+ var defineBuiltIn$2 = defineBuiltIn$3;
946
948
  var defineGlobalProperty = defineGlobalProperty$3;
947
949
  var copyConstructorProperties = copyConstructorProperties$1;
948
950
  var isForced = isForced_1;
@@ -968,11 +970,11 @@ var _export = function (options, source) {
968
970
  var STATIC = options.stat;
969
971
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
970
972
  if (GLOBAL) {
971
- target = global$5;
973
+ target = global$2;
972
974
  } else if (STATIC) {
973
- target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
975
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
974
976
  } else {
975
- target = (global$5[TARGET] || {}).prototype;
977
+ target = global$2[TARGET] && global$2[TARGET].prototype;
976
978
  }
977
979
  if (target) for (key in source) {
978
980
  sourceProperty = source[key];
@@ -988,14 +990,12 @@ var _export = function (options, source) {
988
990
  }
989
991
  // add a flag to not completely full polyfills
990
992
  if (options.sham || (targetProperty && targetProperty.sham)) {
991
- createNonEnumerableProperty$1(sourceProperty, 'sham', true);
993
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
992
994
  }
993
- defineBuiltIn$1(target, key, sourceProperty, options);
995
+ defineBuiltIn$2(target, key, sourceProperty, options);
994
996
  }
995
997
  };
996
998
 
997
- var objectDefineProperties = {};
998
-
999
999
  var internalObjectKeys = objectKeysInternal;
1000
1000
  var enumBugKeys$1 = enumBugKeys$3;
1001
1001
 
@@ -1006,20 +1006,89 @@ var objectKeys$2 = Object.keys || function keys(O) {
1006
1006
  return internalObjectKeys(O, enumBugKeys$1);
1007
1007
  };
1008
1008
 
1009
+ var DESCRIPTORS$2 = descriptors;
1010
+ var uncurryThis$1 = functionUncurryThis;
1011
+ var call$1 = functionCall;
1012
+ var fails$2 = fails$b;
1013
+ var objectKeys$1 = objectKeys$2;
1014
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1015
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1016
+ var toObject$1 = toObject$3;
1017
+ var IndexedObject = indexedObject;
1018
+
1019
+ // eslint-disable-next-line es/no-object-assign -- safe
1020
+ var $assign = Object.assign;
1021
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1022
+ var defineProperty$3 = Object.defineProperty;
1023
+ var concat = uncurryThis$1([].concat);
1024
+
1025
+ // `Object.assign` method
1026
+ // https://tc39.es/ecma262/#sec-object.assign
1027
+ var objectAssign = !$assign || fails$2(function () {
1028
+ // should have correct order of operations (Edge bug)
1029
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1030
+ enumerable: true,
1031
+ get: function () {
1032
+ defineProperty$3(this, 'b', {
1033
+ value: 3,
1034
+ enumerable: false
1035
+ });
1036
+ }
1037
+ }), { b: 2 })).b !== 1) return true;
1038
+ // should work with symbols and should have deterministic property order (V8 bug)
1039
+ var A = {};
1040
+ var B = {};
1041
+ // eslint-disable-next-line es/no-symbol -- safe
1042
+ var symbol = Symbol('assign detection');
1043
+ var alphabet = 'abcdefghijklmnopqrst';
1044
+ A[symbol] = 7;
1045
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1046
+ return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1047
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1048
+ var T = toObject$1(target);
1049
+ var argumentsLength = arguments.length;
1050
+ var index = 1;
1051
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1052
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1053
+ while (argumentsLength > index) {
1054
+ var S = IndexedObject(arguments[index++]);
1055
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1056
+ var length = keys.length;
1057
+ var j = 0;
1058
+ var key;
1059
+ while (length > j) {
1060
+ key = keys[j++];
1061
+ if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1062
+ }
1063
+ } return T;
1064
+ } : $assign;
1065
+
1066
+ var $$1 = _export;
1067
+ var assign = objectAssign;
1068
+
1069
+ // `Object.assign` method
1070
+ // https://tc39.es/ecma262/#sec-object.assign
1071
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1072
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1073
+ assign: assign
1074
+ });
1075
+
1076
+ var objectDefineProperties = {};
1077
+
1009
1078
  var DESCRIPTORS$1 = descriptors;
1010
1079
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1011
1080
  var definePropertyModule = objectDefineProperty;
1012
- var anObject$4 = anObject$7;
1013
- var toIndexedObject = toIndexedObject$4;
1014
- var objectKeys$1 = objectKeys$2;
1081
+ var anObject$1 = anObject$4;
1082
+ var toIndexedObject$1 = toIndexedObject$5;
1083
+ var objectKeys = objectKeys$2;
1015
1084
 
1016
1085
  // `Object.defineProperties` method
1017
1086
  // https://tc39.es/ecma262/#sec-object.defineproperties
1018
1087
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1019
1088
  objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1020
- anObject$4(O);
1021
- var props = toIndexedObject(Properties);
1022
- var keys = objectKeys$1(Properties);
1089
+ anObject$1(O);
1090
+ var props = toIndexedObject$1(Properties);
1091
+ var keys = objectKeys(Properties);
1023
1092
  var length = keys.length;
1024
1093
  var index = 0;
1025
1094
  var key;
@@ -1032,19 +1101,19 @@ var getBuiltIn = getBuiltIn$3;
1032
1101
  var html$1 = getBuiltIn('document', 'documentElement');
1033
1102
 
1034
1103
  /* global ActiveXObject -- old IE, WSH */
1035
- var anObject$3 = anObject$7;
1104
+ var anObject = anObject$4;
1036
1105
  var definePropertiesModule = objectDefineProperties;
1037
1106
  var enumBugKeys = enumBugKeys$3;
1038
1107
  var hiddenKeys = hiddenKeys$4;
1039
1108
  var html = html$1;
1040
- var documentCreateElement = documentCreateElement$1;
1041
- var sharedKey = sharedKey$2;
1109
+ var documentCreateElement$1 = documentCreateElement$2;
1110
+ var sharedKey$1 = sharedKey$3;
1042
1111
 
1043
1112
  var GT = '>';
1044
1113
  var LT = '<';
1045
1114
  var PROTOTYPE = 'prototype';
1046
1115
  var SCRIPT = 'script';
1047
- var IE_PROTO = sharedKey('IE_PROTO');
1116
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1048
1117
 
1049
1118
  var EmptyConstructor = function () { /* empty */ };
1050
1119
 
@@ -1064,7 +1133,7 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
1064
1133
  // Create object with fake `null` prototype: use iframe Object with cleared prototype
1065
1134
  var NullProtoObjectViaIFrame = function () {
1066
1135
  // Thrash, waste and sodomy: IE GC bug
1067
- var iframe = documentCreateElement('iframe');
1136
+ var iframe = documentCreateElement$1('iframe');
1068
1137
  var JS = 'java' + SCRIPT + ':';
1069
1138
  var iframeDocument;
1070
1139
  iframe.style.display = 'none';
@@ -1098,7 +1167,7 @@ var NullProtoObject = function () {
1098
1167
  return NullProtoObject();
1099
1168
  };
1100
1169
 
1101
- hiddenKeys[IE_PROTO] = true;
1170
+ hiddenKeys[IE_PROTO$1] = true;
1102
1171
 
1103
1172
  // `Object.create` method
1104
1173
  // https://tc39.es/ecma262/#sec-object.create
@@ -1106,26 +1175,26 @@ hiddenKeys[IE_PROTO] = true;
1106
1175
  var objectCreate = Object.create || function create(O, Properties) {
1107
1176
  var result;
1108
1177
  if (O !== null) {
1109
- EmptyConstructor[PROTOTYPE] = anObject$3(O);
1178
+ EmptyConstructor[PROTOTYPE] = anObject(O);
1110
1179
  result = new EmptyConstructor();
1111
1180
  EmptyConstructor[PROTOTYPE] = null;
1112
1181
  // add "__proto__" for Object.getPrototypeOf polyfill
1113
- result[IE_PROTO] = O;
1182
+ result[IE_PROTO$1] = O;
1114
1183
  } else result = NullProtoObject();
1115
1184
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1116
1185
  };
1117
1186
 
1118
- var wellKnownSymbol$6 = wellKnownSymbol$8;
1187
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
1119
1188
  var create$1 = objectCreate;
1120
- var defineProperty$1 = objectDefineProperty.f;
1189
+ var defineProperty$2 = objectDefineProperty.f;
1121
1190
 
1122
- var UNSCOPABLES = wellKnownSymbol$6('unscopables');
1191
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1123
1192
  var ArrayPrototype = Array.prototype;
1124
1193
 
1125
1194
  // Array.prototype[@@unscopables]
1126
1195
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1127
1196
  if (ArrayPrototype[UNSCOPABLES] === undefined) {
1128
- defineProperty$1(ArrayPrototype, UNSCOPABLES, {
1197
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1129
1198
  configurable: true,
1130
1199
  value: create$1(null)
1131
1200
  });
@@ -1136,995 +1205,434 @@ var addToUnscopables$1 = function (key) {
1136
1205
  ArrayPrototype[UNSCOPABLES][key] = true;
1137
1206
  };
1138
1207
 
1139
- var $$4 = _export;
1140
- var $includes = arrayIncludes.includes;
1141
- var fails$7 = fails$g;
1142
- var addToUnscopables = addToUnscopables$1;
1208
+ var iterators = {};
1143
1209
 
1144
- // FF99+ bug
1145
- var BROKEN_ON_SPARSE = fails$7(function () {
1146
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
1147
- return !Array(1).includes();
1148
- });
1210
+ var fails$1 = fails$b;
1149
1211
 
1150
- // `Array.prototype.includes` method
1151
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1152
- $$4({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1153
- includes: function includes(el /* , fromIndex = 0 */) {
1154
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1155
- }
1212
+ var correctPrototypeGetter = !fails$1(function () {
1213
+ function F() { /* empty */ }
1214
+ F.prototype.constructor = null;
1215
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1216
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1156
1217
  });
1157
1218
 
1158
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1159
- addToUnscopables('includes');
1160
-
1161
- var isObject = isObject$6;
1162
- var classof$4 = classofRaw$2;
1163
- var wellKnownSymbol$5 = wellKnownSymbol$8;
1164
-
1165
- var MATCH$1 = wellKnownSymbol$5('match');
1166
-
1167
- // `IsRegExp` abstract operation
1168
- // https://tc39.es/ecma262/#sec-isregexp
1169
- var isRegexp = function (it) {
1170
- var isRegExp;
1171
- return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) === 'RegExp');
1172
- };
1173
-
1174
- var isRegExp = isRegexp;
1175
-
1176
- var $TypeError$2 = TypeError;
1177
-
1178
- var notARegexp = function (it) {
1179
- if (isRegExp(it)) {
1180
- throw new $TypeError$2("The method doesn't accept regular expressions");
1181
- } return it;
1182
- };
1183
-
1184
- var wellKnownSymbol$4 = wellKnownSymbol$8;
1185
-
1186
- var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
1187
- var test = {};
1188
-
1189
- test[TO_STRING_TAG$1] = 'z';
1190
-
1191
- var toStringTagSupport = String(test) === '[object z]';
1192
-
1193
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1219
+ var hasOwn$1 = hasOwnProperty_1;
1194
1220
  var isCallable$2 = isCallable$d;
1195
- var classofRaw$1 = classofRaw$2;
1196
- var wellKnownSymbol$3 = wellKnownSymbol$8;
1221
+ var toObject = toObject$3;
1222
+ var sharedKey = sharedKey$3;
1223
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1197
1224
 
1198
- var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
1225
+ var IE_PROTO = sharedKey('IE_PROTO');
1199
1226
  var $Object = Object;
1227
+ var ObjectPrototype = $Object.prototype;
1200
1228
 
1201
- // ES3 wrong here
1202
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1203
-
1204
- // fallback for IE11 Script Access Denied error
1205
- var tryGet = function (it, key) {
1206
- try {
1207
- return it[key];
1208
- } catch (error) { /* empty */ }
1209
- };
1210
-
1211
- // getting tag from ES6+ `Object.prototype.toString`
1212
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1213
- var O, tag, result;
1214
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1215
- // @@toStringTag case
1216
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1217
- // builtinTag case
1218
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1219
- // ES3 arguments fallback
1220
- : (result = classofRaw$1(O)) === 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1229
+ // `Object.getPrototypeOf` method
1230
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1231
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1232
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1233
+ var object = toObject(O);
1234
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1235
+ var constructor = object.constructor;
1236
+ if (isCallable$2(constructor) && object instanceof constructor) {
1237
+ return constructor.prototype;
1238
+ } return object instanceof $Object ? ObjectPrototype : null;
1221
1239
  };
1222
1240
 
1223
- var classof$2 = classof$3;
1224
-
1225
- var $String = String;
1226
-
1227
- var toString$4 = function (argument) {
1228
- if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1229
- return $String(argument);
1230
- };
1231
-
1232
- var wellKnownSymbol$2 = wellKnownSymbol$8;
1233
-
1234
- var MATCH = wellKnownSymbol$2('match');
1235
-
1236
- var correctIsRegexpLogic = function (METHOD_NAME) {
1237
- var regexp = /./;
1238
- try {
1239
- '/./'[METHOD_NAME](regexp);
1240
- } catch (error1) {
1241
- try {
1242
- regexp[MATCH] = false;
1243
- return '/./'[METHOD_NAME](regexp);
1244
- } catch (error2) { /* empty */ }
1245
- } return false;
1246
- };
1247
-
1248
- var $$3 = _export;
1249
- var uncurryThis$7 = functionUncurryThis;
1250
- var notARegExp = notARegexp;
1251
- var requireObjectCoercible$2 = requireObjectCoercible$5;
1252
- var toString$3 = toString$4;
1253
- var correctIsRegExpLogic = correctIsRegexpLogic;
1254
-
1255
- var stringIndexOf$1 = uncurryThis$7(''.indexOf);
1256
-
1257
- // `String.prototype.includes` method
1258
- // https://tc39.es/ecma262/#sec-string.prototype.includes
1259
- $$3({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1260
- includes: function includes(searchString /* , position = 0 */) {
1261
- return !!~stringIndexOf$1(
1262
- toString$3(requireObjectCoercible$2(this)),
1263
- toString$3(notARegExp(searchString)),
1264
- arguments.length > 1 ? arguments[1] : undefined
1265
- );
1241
+ var fails = fails$b;
1242
+ var isCallable$1 = isCallable$d;
1243
+ var isObject$2 = isObject$8;
1244
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1245
+ var defineBuiltIn$1 = defineBuiltIn$3;
1246
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
1247
+
1248
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1249
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1250
+
1251
+ // `%IteratorPrototype%` object
1252
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1253
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1254
+
1255
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1256
+ if ([].keys) {
1257
+ arrayIterator = [].keys();
1258
+ // Safari 8 has buggy iterators w/o `next`
1259
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1260
+ else {
1261
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1262
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1266
1263
  }
1267
- });
1268
-
1269
- var anObject$2 = anObject$7;
1270
-
1271
- // `RegExp.prototype.flags` getter implementation
1272
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1273
- var regexpFlags$1 = function () {
1274
- var that = anObject$2(this);
1275
- var result = '';
1276
- if (that.hasIndices) result += 'd';
1277
- if (that.global) result += 'g';
1278
- if (that.ignoreCase) result += 'i';
1279
- if (that.multiline) result += 'm';
1280
- if (that.dotAll) result += 's';
1281
- if (that.unicode) result += 'u';
1282
- if (that.unicodeSets) result += 'v';
1283
- if (that.sticky) result += 'y';
1284
- return result;
1285
- };
1286
-
1287
- var fails$6 = fails$g;
1288
- var global$4 = global$f;
1289
-
1290
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1291
- var $RegExp$2 = global$4.RegExp;
1292
-
1293
- var UNSUPPORTED_Y$1 = fails$6(function () {
1294
- var re = $RegExp$2('a', 'y');
1295
- re.lastIndex = 2;
1296
- return re.exec('abcd') !== null;
1297
- });
1298
-
1299
- // UC Browser bug
1300
- // https://github.com/zloirock/core-js/issues/1008
1301
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
1302
- return !$RegExp$2('a', 'y').sticky;
1303
- });
1304
-
1305
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
1306
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1307
- var re = $RegExp$2('^r', 'gy');
1308
- re.lastIndex = 2;
1309
- return re.exec('str') !== null;
1310
- });
1311
-
1312
- var regexpStickyHelpers = {
1313
- BROKEN_CARET: BROKEN_CARET,
1314
- MISSED_STICKY: MISSED_STICKY,
1315
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
1316
- };
1317
-
1318
- var fails$5 = fails$g;
1319
- var global$3 = global$f;
1320
-
1321
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1322
- var $RegExp$1 = global$3.RegExp;
1323
-
1324
- var regexpUnsupportedDotAll = fails$5(function () {
1325
- var re = $RegExp$1('.', 's');
1326
- return !(re.dotAll && re.test('\n') && re.flags === 's');
1327
- });
1328
-
1329
- var fails$4 = fails$g;
1330
- var global$2 = global$f;
1331
-
1332
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1333
- var $RegExp = global$2.RegExp;
1334
-
1335
- var regexpUnsupportedNcg = fails$4(function () {
1336
- var re = $RegExp('(?<a>b)', 'g');
1337
- return re.exec('b').groups.a !== 'b' ||
1338
- 'b'.replace(re, '$<a>c') !== 'bc';
1339
- });
1340
-
1341
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1342
- /* eslint-disable regexp/no-useless-quantifier -- testing */
1343
- var call$4 = functionCall;
1344
- var uncurryThis$6 = functionUncurryThis;
1345
- var toString$2 = toString$4;
1346
- var regexpFlags = regexpFlags$1;
1347
- var stickyHelpers = regexpStickyHelpers;
1348
- var shared = shared$4.exports;
1349
- var create = objectCreate;
1350
- var getInternalState = internalState.get;
1351
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1352
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1353
-
1354
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
1355
- var nativeExec = RegExp.prototype.exec;
1356
- var patchedExec = nativeExec;
1357
- var charAt$3 = uncurryThis$6(''.charAt);
1358
- var indexOf = uncurryThis$6(''.indexOf);
1359
- var replace$1 = uncurryThis$6(''.replace);
1360
- var stringSlice$3 = uncurryThis$6(''.slice);
1361
-
1362
- var UPDATES_LAST_INDEX_WRONG = (function () {
1363
- var re1 = /a/;
1364
- var re2 = /b*/g;
1365
- call$4(nativeExec, re1, 'a');
1366
- call$4(nativeExec, re2, 'a');
1367
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1368
- })();
1369
-
1370
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1371
-
1372
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
1373
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1374
-
1375
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1376
-
1377
- if (PATCH) {
1378
- patchedExec = function exec(string) {
1379
- var re = this;
1380
- var state = getInternalState(re);
1381
- var str = toString$2(string);
1382
- var raw = state.raw;
1383
- var result, reCopy, lastIndex, match, i, object, group;
1384
-
1385
- if (raw) {
1386
- raw.lastIndex = re.lastIndex;
1387
- result = call$4(patchedExec, raw, str);
1388
- re.lastIndex = raw.lastIndex;
1389
- return result;
1390
- }
1391
-
1392
- var groups = state.groups;
1393
- var sticky = UNSUPPORTED_Y && re.sticky;
1394
- var flags = call$4(regexpFlags, re);
1395
- var source = re.source;
1396
- var charsAdded = 0;
1397
- var strCopy = str;
1398
-
1399
- if (sticky) {
1400
- flags = replace$1(flags, 'y', '');
1401
- if (indexOf(flags, 'g') === -1) {
1402
- flags += 'g';
1403
- }
1404
-
1405
- strCopy = stringSlice$3(str, re.lastIndex);
1406
- // Support anchored sticky behavior.
1407
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1408
- source = '(?: ' + source + ')';
1409
- strCopy = ' ' + strCopy;
1410
- charsAdded++;
1411
- }
1412
- // ^(? + rx + ) is needed, in combination with some str slicing, to
1413
- // simulate the 'y' flag.
1414
- reCopy = new RegExp('^(?:' + source + ')', flags);
1415
- }
1416
-
1417
- if (NPCG_INCLUDED) {
1418
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1419
- }
1420
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1421
-
1422
- match = call$4(nativeExec, sticky ? reCopy : re, strCopy);
1423
-
1424
- if (sticky) {
1425
- if (match) {
1426
- match.input = stringSlice$3(match.input, charsAdded);
1427
- match[0] = stringSlice$3(match[0], charsAdded);
1428
- match.index = re.lastIndex;
1429
- re.lastIndex += match[0].length;
1430
- } else re.lastIndex = 0;
1431
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
1432
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1433
- }
1434
- if (NPCG_INCLUDED && match && match.length > 1) {
1435
- // Fix browsers whose `exec` methods don't consistently return `undefined`
1436
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1437
- call$4(nativeReplace, match[0], reCopy, function () {
1438
- for (i = 1; i < arguments.length - 2; i++) {
1439
- if (arguments[i] === undefined) match[i] = undefined;
1440
- }
1441
- });
1442
- }
1443
-
1444
- if (match && groups) {
1445
- match.groups = object = create(null);
1446
- for (i = 0; i < groups.length; i++) {
1447
- group = groups[i];
1448
- object[group[0]] = match[group[1]];
1449
- }
1450
- }
1451
-
1452
- return match;
1453
- };
1454
1264
  }
1455
1265
 
1456
- var regexpExec$2 = patchedExec;
1457
-
1458
- var $$2 = _export;
1459
- var exec = regexpExec$2;
1460
-
1461
- // `RegExp.prototype.exec` method
1462
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1463
- $$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1464
- exec: exec
1465
- });
1466
-
1467
- var NATIVE_BIND = functionBindNative;
1468
-
1469
- var FunctionPrototype = Function.prototype;
1470
- var apply$1 = FunctionPrototype.apply;
1471
- var call$3 = FunctionPrototype.call;
1472
-
1473
- // eslint-disable-next-line es/no-reflect -- safe
1474
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$3.bind(apply$1) : function () {
1475
- return call$3.apply(apply$1, arguments);
1266
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails(function () {
1267
+ var test = {};
1268
+ // FF44- legacy iterators case
1269
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1476
1270
  });
1477
1271
 
1478
- var classofRaw = classofRaw$2;
1479
- var uncurryThis$5 = functionUncurryThis;
1480
-
1481
- var functionUncurryThisClause = function (fn) {
1482
- // Nashorn bug:
1483
- // https://github.com/zloirock/core-js/issues/1128
1484
- // https://github.com/zloirock/core-js/issues/1130
1485
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
1486
- };
1487
-
1488
- // TODO: Remove from `core-js@4` since it's moved to entry points
1489
-
1490
- var uncurryThis$4 = functionUncurryThisClause;
1491
- var defineBuiltIn = defineBuiltIn$2;
1492
- var regexpExec$1 = regexpExec$2;
1493
- var fails$3 = fails$g;
1494
- var wellKnownSymbol$1 = wellKnownSymbol$8;
1495
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
1496
-
1497
- var SPECIES = wellKnownSymbol$1('species');
1498
- var RegExpPrototype = RegExp.prototype;
1499
-
1500
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1501
- var SYMBOL = wellKnownSymbol$1(KEY);
1272
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1502
1273
 
1503
- var DELEGATES_TO_SYMBOL = !fails$3(function () {
1504
- // String methods call symbol-named RegEp methods
1505
- var O = {};
1506
- O[SYMBOL] = function () { return 7; };
1507
- return ''[KEY](O) !== 7;
1274
+ // `%IteratorPrototype%[@@iterator]()` method
1275
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1276
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
1277
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1278
+ return this;
1508
1279
  });
1280
+ }
1509
1281
 
1510
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
1511
- // Symbol-named RegExp methods call .exec
1512
- var execCalled = false;
1513
- var re = /a/;
1514
-
1515
- if (KEY === 'split') {
1516
- // We can't use real regex here since it causes deoptimization
1517
- // and serious performance degradation in V8
1518
- // https://github.com/zloirock/core-js/issues/306
1519
- re = {};
1520
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
1521
- // a new one. We need to return the patched regex when creating the new one.
1522
- re.constructor = {};
1523
- re.constructor[SPECIES] = function () { return re; };
1524
- re.flags = '';
1525
- re[SYMBOL] = /./[SYMBOL];
1526
- }
1527
-
1528
- re.exec = function () {
1529
- execCalled = true;
1530
- return null;
1531
- };
1282
+ var iteratorsCore = {
1283
+ IteratorPrototype: IteratorPrototype$2,
1284
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1285
+ };
1532
1286
 
1533
- re[SYMBOL]('');
1534
- return !execCalled;
1535
- });
1287
+ var defineProperty$1 = objectDefineProperty.f;
1288
+ var hasOwn = hasOwnProperty_1;
1289
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
1536
1290
 
1537
- if (
1538
- !DELEGATES_TO_SYMBOL ||
1539
- !DELEGATES_TO_EXEC ||
1540
- FORCED
1541
- ) {
1542
- var uncurriedNativeRegExpMethod = uncurryThis$4(/./[SYMBOL]);
1543
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1544
- var uncurriedNativeMethod = uncurryThis$4(nativeMethod);
1545
- var $exec = regexp.exec;
1546
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1547
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1548
- // The native String method already delegates to @@method (this
1549
- // polyfilled function), leasing to infinite recursion.
1550
- // We avoid it by directly calling the native @@method method.
1551
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1552
- }
1553
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1554
- }
1555
- return { done: false };
1556
- });
1291
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1557
1292
 
1558
- defineBuiltIn(String.prototype, KEY, methods[0]);
1559
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
1293
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1294
+ if (target && !STATIC) target = target.prototype;
1295
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
1296
+ defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
1560
1297
  }
1561
-
1562
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
1563
1298
  };
1564
1299
 
1565
- var uncurryThis$3 = functionUncurryThis;
1566
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1567
- var toString$1 = toString$4;
1568
- var requireObjectCoercible$1 = requireObjectCoercible$5;
1569
-
1570
- var charAt$2 = uncurryThis$3(''.charAt);
1571
- var charCodeAt = uncurryThis$3(''.charCodeAt);
1572
- var stringSlice$2 = uncurryThis$3(''.slice);
1573
-
1574
- var createMethod$1 = function (CONVERT_TO_STRING) {
1575
- return function ($this, pos) {
1576
- var S = toString$1(requireObjectCoercible$1($this));
1577
- var position = toIntegerOrInfinity$1(pos);
1578
- var size = S.length;
1579
- var first, second;
1580
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1581
- first = charCodeAt(S, position);
1582
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
1583
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1584
- ? CONVERT_TO_STRING
1585
- ? charAt$2(S, position)
1586
- : first
1587
- : CONVERT_TO_STRING
1588
- ? stringSlice$2(S, position, position + 2)
1589
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1590
- };
1591
- };
1592
-
1593
- var stringMultibyte = {
1594
- // `String.prototype.codePointAt` method
1595
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1596
- codeAt: createMethod$1(false),
1597
- // `String.prototype.at` method
1598
- // https://github.com/mathiasbynens/String.prototype.at
1599
- charAt: createMethod$1(true)
1600
- };
1300
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1301
+ var create = objectCreate;
1302
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1303
+ var setToStringTag$2 = setToStringTag$3;
1304
+ var Iterators$2 = iterators;
1601
1305
 
1602
- var charAt$1 = stringMultibyte.charAt;
1306
+ var returnThis$1 = function () { return this; };
1603
1307
 
1604
- // `AdvanceStringIndex` abstract operation
1605
- // https://tc39.es/ecma262/#sec-advancestringindex
1606
- var advanceStringIndex$1 = function (S, index, unicode) {
1607
- return index + (unicode ? charAt$1(S, index).length : 1);
1308
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1309
+ var TO_STRING_TAG = NAME + ' Iterator';
1310
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1311
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1312
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1313
+ return IteratorConstructor;
1608
1314
  };
1609
1315
 
1610
- var uncurryThis$2 = functionUncurryThis;
1611
- var toObject$2 = toObject$4;
1316
+ var uncurryThis = functionUncurryThis;
1317
+ var aCallable = aCallable$2;
1612
1318
 
1613
- var floor = Math.floor;
1614
- var charAt = uncurryThis$2(''.charAt);
1615
- var replace = uncurryThis$2(''.replace);
1616
- var stringSlice$1 = uncurryThis$2(''.slice);
1617
- // eslint-disable-next-line redos/no-vulnerable -- safe
1618
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
1619
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
1620
-
1621
- // `GetSubstitution` abstract operation
1622
- // https://tc39.es/ecma262/#sec-getsubstitution
1623
- var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
1624
- var tailPos = position + matched.length;
1625
- var m = captures.length;
1626
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1627
- if (namedCaptures !== undefined) {
1628
- namedCaptures = toObject$2(namedCaptures);
1629
- symbols = SUBSTITUTION_SYMBOLS;
1630
- }
1631
- return replace(replacement, symbols, function (match, ch) {
1632
- var capture;
1633
- switch (charAt(ch, 0)) {
1634
- case '$': return '$';
1635
- case '&': return matched;
1636
- case '`': return stringSlice$1(str, 0, position);
1637
- case "'": return stringSlice$1(str, tailPos);
1638
- case '<':
1639
- capture = namedCaptures[stringSlice$1(ch, 1, -1)];
1640
- break;
1641
- default: // \d\d?
1642
- var n = +ch;
1643
- if (n === 0) return match;
1644
- if (n > m) {
1645
- var f = floor(n / 10);
1646
- if (f === 0) return match;
1647
- if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
1648
- return match;
1649
- }
1650
- capture = captures[n - 1];
1651
- }
1652
- return capture === undefined ? '' : capture;
1653
- });
1319
+ var functionUncurryThisAccessor = function (object, key, method) {
1320
+ try {
1321
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1322
+ return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1323
+ } catch (error) { /* empty */ }
1654
1324
  };
1655
1325
 
1656
- var call$2 = functionCall;
1657
- var anObject$1 = anObject$7;
1658
- var isCallable$1 = isCallable$d;
1659
- var classof$1 = classofRaw$2;
1660
- var regexpExec = regexpExec$2;
1661
-
1662
- var $TypeError$1 = TypeError;
1326
+ var isObject$1 = isObject$8;
1663
1327
 
1664
- // `RegExpExec` abstract operation
1665
- // https://tc39.es/ecma262/#sec-regexpexec
1666
- var regexpExecAbstract = function (R, S) {
1667
- var exec = R.exec;
1668
- if (isCallable$1(exec)) {
1669
- var result = call$2(exec, R, S);
1670
- if (result !== null) anObject$1(result);
1671
- return result;
1672
- }
1673
- if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
1674
- throw new $TypeError$1('RegExp#exec called on incompatible receiver');
1328
+ var isPossiblePrototype$1 = function (argument) {
1329
+ return isObject$1(argument) || argument === null;
1675
1330
  };
1676
1331
 
1677
- var apply = functionApply;
1678
- var call$1 = functionCall;
1679
- var uncurryThis$1 = functionUncurryThis;
1680
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
1681
- var fails$2 = fails$g;
1682
- var anObject = anObject$7;
1683
- var isCallable = isCallable$d;
1684
- var isNullOrUndefined = isNullOrUndefined$3;
1685
- var toIntegerOrInfinity = toIntegerOrInfinity$4;
1686
- var toLength = toLength$2;
1687
- var toString = toString$4;
1688
- var requireObjectCoercible = requireObjectCoercible$5;
1689
- var advanceStringIndex = advanceStringIndex$1;
1690
- var getMethod = getMethod$2;
1691
- var getSubstitution = getSubstitution$1;
1692
- var regExpExec = regexpExecAbstract;
1693
- var wellKnownSymbol = wellKnownSymbol$8;
1694
-
1695
- var REPLACE = wellKnownSymbol('replace');
1696
- var max = Math.max;
1697
- var min = Math.min;
1698
- var concat$1 = uncurryThis$1([].concat);
1699
- var push = uncurryThis$1([].push);
1700
- var stringIndexOf = uncurryThis$1(''.indexOf);
1701
- var stringSlice = uncurryThis$1(''.slice);
1702
-
1703
- var maybeToString = function (it) {
1704
- return it === undefined ? it : String(it);
1705
- };
1706
-
1707
- // IE <= 11 replaces $0 with the whole match, as if it was $&
1708
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1709
- var REPLACE_KEEPS_$0 = (function () {
1710
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
1711
- return 'a'.replace(/./, '$0') === '$0';
1712
- })();
1713
-
1714
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
1715
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
1716
- if (/./[REPLACE]) {
1717
- return /./[REPLACE]('a', '$0') === '';
1718
- }
1719
- return false;
1720
- })();
1721
-
1722
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
1723
- var re = /./;
1724
- re.exec = function () {
1725
- var result = [];
1726
- result.groups = { a: '7' };
1727
- return result;
1728
- };
1729
- // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
1730
- return ''.replace(re, '$<a>') !== '7';
1731
- });
1732
-
1733
- // @@replace logic
1734
- fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
1735
- var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
1736
-
1737
- return [
1738
- // `String.prototype.replace` method
1739
- // https://tc39.es/ecma262/#sec-string.prototype.replace
1740
- function replace(searchValue, replaceValue) {
1741
- var O = requireObjectCoercible(this);
1742
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
1743
- return replacer
1744
- ? call$1(replacer, searchValue, O, replaceValue)
1745
- : call$1(nativeReplace, toString(O), searchValue, replaceValue);
1746
- },
1747
- // `RegExp.prototype[@@replace]` method
1748
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
1749
- function (string, replaceValue) {
1750
- var rx = anObject(this);
1751
- var S = toString(string);
1752
-
1753
- if (
1754
- typeof replaceValue == 'string' &&
1755
- stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
1756
- stringIndexOf(replaceValue, '$<') === -1
1757
- ) {
1758
- var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
1759
- if (res.done) return res.value;
1760
- }
1332
+ var isPossiblePrototype = isPossiblePrototype$1;
1761
1333
 
1762
- var functionalReplace = isCallable(replaceValue);
1763
- if (!functionalReplace) replaceValue = toString(replaceValue);
1764
-
1765
- var global = rx.global;
1766
- var fullUnicode;
1767
- if (global) {
1768
- fullUnicode = rx.unicode;
1769
- rx.lastIndex = 0;
1770
- }
1334
+ var $String = String;
1335
+ var $TypeError = TypeError;
1771
1336
 
1772
- var results = [];
1773
- var result;
1774
- while (true) {
1775
- result = regExpExec(rx, S);
1776
- if (result === null) break;
1337
+ var aPossiblePrototype$1 = function (argument) {
1338
+ if (isPossiblePrototype(argument)) return argument;
1339
+ throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1340
+ };
1341
+
1342
+ /* eslint-disable no-proto -- safe */
1343
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1344
+ var isObject = isObject$8;
1345
+ var requireObjectCoercible = requireObjectCoercible$3;
1346
+ var aPossiblePrototype = aPossiblePrototype$1;
1347
+
1348
+ // `Object.setPrototypeOf` method
1349
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1350
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1351
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1352
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1353
+ var CORRECT_SETTER = false;
1354
+ var test = {};
1355
+ var setter;
1356
+ try {
1357
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1358
+ setter(test, []);
1359
+ CORRECT_SETTER = test instanceof Array;
1360
+ } catch (error) { /* empty */ }
1361
+ return function setPrototypeOf(O, proto) {
1362
+ requireObjectCoercible(O);
1363
+ aPossiblePrototype(proto);
1364
+ if (!isObject(O)) return O;
1365
+ if (CORRECT_SETTER) setter(O, proto);
1366
+ else O.__proto__ = proto;
1367
+ return O;
1368
+ };
1369
+ }() : undefined);
1777
1370
 
1778
- push(results, result);
1779
- if (!global) break;
1371
+ var $ = _export;
1372
+ var call = functionCall;
1373
+ var FunctionName = functionName;
1374
+ var isCallable = isCallable$d;
1375
+ var createIteratorConstructor = iteratorCreateConstructor;
1376
+ var getPrototypeOf = objectGetPrototypeOf;
1377
+ var setPrototypeOf = objectSetPrototypeOf;
1378
+ var setToStringTag$1 = setToStringTag$3;
1379
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1380
+ var defineBuiltIn = defineBuiltIn$3;
1381
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
1382
+ var Iterators$1 = iterators;
1383
+ var IteratorsCore = iteratorsCore;
1384
+
1385
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1386
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1387
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1388
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1389
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1390
+ var KEYS = 'keys';
1391
+ var VALUES = 'values';
1392
+ var ENTRIES = 'entries';
1393
+
1394
+ var returnThis = function () { return this; };
1395
+
1396
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1397
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1398
+
1399
+ var getIterationMethod = function (KIND) {
1400
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1401
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
1402
+
1403
+ switch (KIND) {
1404
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1405
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1406
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1407
+ }
1780
1408
 
1781
- var matchStr = toString(result[0]);
1782
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1783
- }
1409
+ return function () { return new IteratorConstructor(this); };
1410
+ };
1784
1411
 
1785
- var accumulatedResult = '';
1786
- var nextSourcePosition = 0;
1787
- for (var i = 0; i < results.length; i++) {
1788
- result = results[i];
1789
-
1790
- var matched = toString(result[0]);
1791
- var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
1792
- var captures = [];
1793
- var replacement;
1794
- // NOTE: This is equivalent to
1795
- // captures = result.slice(1).map(maybeToString)
1796
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1797
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1798
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1799
- for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
1800
- var namedCaptures = result.groups;
1801
- if (functionalReplace) {
1802
- var replacerArgs = concat$1([matched], captures, position, S);
1803
- if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
1804
- replacement = toString(apply(replaceValue, undefined, replacerArgs));
1805
- } else {
1806
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1807
- }
1808
- if (position >= nextSourcePosition) {
1809
- accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
1810
- nextSourcePosition = position + matched.length;
1412
+ var TO_STRING_TAG = NAME + ' Iterator';
1413
+ var INCORRECT_VALUES_NAME = false;
1414
+ var IterablePrototype = Iterable.prototype;
1415
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1416
+ || IterablePrototype['@@iterator']
1417
+ || DEFAULT && IterablePrototype[DEFAULT];
1418
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1419
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1420
+ var CurrentIteratorPrototype, methods, KEY;
1421
+
1422
+ // fix native
1423
+ if (anyNativeIterator) {
1424
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1425
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1426
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1427
+ if (setPrototypeOf) {
1428
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1429
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1430
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1811
1431
  }
1812
1432
  }
1433
+ // Set @@toStringTag to native iterators
1434
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1435
+ }
1436
+ }
1813
1437
 
1814
- return accumulatedResult + stringSlice(S, nextSourcePosition);
1438
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1439
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1440
+ if (CONFIGURABLE_FUNCTION_NAME) {
1441
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1442
+ } else {
1443
+ INCORRECT_VALUES_NAME = true;
1444
+ defaultIterator = function values() { return call(nativeIterator, this); };
1815
1445
  }
1816
- ];
1817
- }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
1446
+ }
1818
1447
 
1819
- var aCallable = aCallable$2;
1820
- var toObject$1 = toObject$4;
1821
- var IndexedObject$1 = indexedObject;
1822
- var lengthOfArrayLike = lengthOfArrayLike$2;
1448
+ // export additional methods
1449
+ if (DEFAULT) {
1450
+ methods = {
1451
+ values: getIterationMethod(VALUES),
1452
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1453
+ entries: getIterationMethod(ENTRIES)
1454
+ };
1455
+ if (FORCED) for (KEY in methods) {
1456
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1457
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1458
+ }
1459
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1460
+ }
1823
1461
 
1824
- var $TypeError = TypeError;
1462
+ // define iterator
1463
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1464
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1465
+ }
1466
+ Iterators$1[NAME] = defaultIterator;
1825
1467
 
1826
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
1827
- var createMethod = function (IS_RIGHT) {
1828
- return function (that, callbackfn, argumentsLength, memo) {
1829
- var O = toObject$1(that);
1830
- var self = IndexedObject$1(O);
1831
- var length = lengthOfArrayLike(O);
1832
- aCallable(callbackfn);
1833
- var index = IS_RIGHT ? length - 1 : 0;
1834
- var i = IS_RIGHT ? -1 : 1;
1835
- if (argumentsLength < 2) while (true) {
1836
- if (index in self) {
1837
- memo = self[index];
1838
- index += i;
1839
- break;
1840
- }
1841
- index += i;
1842
- if (IS_RIGHT ? index < 0 : length <= index) {
1843
- throw new $TypeError('Reduce of empty array with no initial value');
1844
- }
1845
- }
1846
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
1847
- memo = callbackfn(memo, self[index], index, O);
1848
- }
1849
- return memo;
1850
- };
1468
+ return methods;
1851
1469
  };
1852
1470
 
1853
- var arrayReduce = {
1854
- // `Array.prototype.reduce` method
1855
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
1856
- left: createMethod(false),
1857
- // `Array.prototype.reduceRight` method
1858
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1859
- right: createMethod(true)
1471
+ // `CreateIterResultObject` abstract operation
1472
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1473
+ var createIterResultObject$1 = function (value, done) {
1474
+ return { value: value, done: done };
1860
1475
  };
1861
1476
 
1862
- var fails$1 = fails$g;
1477
+ var toIndexedObject = toIndexedObject$5;
1478
+ var addToUnscopables = addToUnscopables$1;
1479
+ var Iterators = iterators;
1480
+ var InternalStateModule = internalState;
1481
+ var defineProperty = objectDefineProperty.f;
1482
+ var defineIterator = iteratorDefine;
1483
+ var createIterResultObject = createIterResultObject$1;
1484
+ var DESCRIPTORS = descriptors;
1863
1485
 
1864
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1865
- var method = [][METHOD_NAME];
1866
- return !!method && fails$1(function () {
1867
- // eslint-disable-next-line no-useless-call -- required for testing
1868
- method.call(null, argument || function () { return 1; }, 1);
1486
+ var ARRAY_ITERATOR = 'Array Iterator';
1487
+ var setInternalState = InternalStateModule.set;
1488
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1489
+
1490
+ // `Array.prototype.entries` method
1491
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1492
+ // `Array.prototype.keys` method
1493
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1494
+ // `Array.prototype.values` method
1495
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1496
+ // `Array.prototype[@@iterator]` method
1497
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1498
+ // `CreateArrayIterator` internal method
1499
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1500
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1501
+ setInternalState(this, {
1502
+ type: ARRAY_ITERATOR,
1503
+ target: toIndexedObject(iterated), // target
1504
+ index: 0, // next index
1505
+ kind: kind // kind
1869
1506
  });
1870
- };
1871
-
1872
- var global$1 = global$f;
1873
- var classof = classofRaw$2;
1874
-
1875
- var engineIsNode = classof(global$1.process) === 'process';
1876
-
1877
- var $$1 = _export;
1878
- var $reduce = arrayReduce.left;
1879
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
1880
- var CHROME_VERSION = engineV8Version;
1881
- var IS_NODE = engineIsNode;
1882
-
1883
- // Chrome 80-82 has a critical bug
1884
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
1885
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1886
- var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
1887
-
1888
- // `Array.prototype.reduce` method
1889
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
1890
- $$1({ target: 'Array', proto: true, forced: FORCED }, {
1891
- reduce: function reduce(callbackfn /* , initialValue */) {
1892
- var length = arguments.length;
1893
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
1507
+ // `%ArrayIteratorPrototype%.next` method
1508
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1509
+ }, function () {
1510
+ var state = getInternalState(this);
1511
+ var target = state.target;
1512
+ var index = state.index++;
1513
+ if (!target || index >= target.length) {
1514
+ state.target = undefined;
1515
+ return createIterResultObject(undefined, true);
1894
1516
  }
1895
- });
1896
-
1897
- var DESCRIPTORS = descriptors;
1898
- var uncurryThis = functionUncurryThis;
1899
- var call = functionCall;
1900
- var fails = fails$g;
1901
- var objectKeys = objectKeys$2;
1902
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1903
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1904
- var toObject = toObject$4;
1905
- var IndexedObject = indexedObject;
1517
+ switch (state.kind) {
1518
+ case 'keys': return createIterResultObject(index, false);
1519
+ case 'values': return createIterResultObject(target[index], false);
1520
+ } return createIterResultObject([index, target[index]], false);
1521
+ }, 'values');
1906
1522
 
1907
- // eslint-disable-next-line es/no-object-assign -- safe
1908
- var $assign = Object.assign;
1909
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1910
- var defineProperty = Object.defineProperty;
1911
- var concat = uncurryThis([].concat);
1523
+ // argumentsList[@@iterator] is %ArrayProto_values%
1524
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1525
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1526
+ var values = Iterators.Arguments = Iterators.Array;
1912
1527
 
1913
- // `Object.assign` method
1914
- // https://tc39.es/ecma262/#sec-object.assign
1915
- var objectAssign = !$assign || fails(function () {
1916
- // should have correct order of operations (Edge bug)
1917
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1918
- enumerable: true,
1919
- get: function () {
1920
- defineProperty(this, 'b', {
1921
- value: 3,
1922
- enumerable: false
1923
- });
1528
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1529
+ addToUnscopables('keys');
1530
+ addToUnscopables('values');
1531
+ addToUnscopables('entries');
1532
+
1533
+ // V8 ~ Chrome 45- bug
1534
+ if (DESCRIPTORS && values.name !== 'values') try {
1535
+ defineProperty(values, 'name', { value: 'values' });
1536
+ } catch (error) { /* empty */ }
1537
+
1538
+ // iterable DOM collections
1539
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1540
+ var domIterables = {
1541
+ CSSRuleList: 0,
1542
+ CSSStyleDeclaration: 0,
1543
+ CSSValueList: 0,
1544
+ ClientRectList: 0,
1545
+ DOMRectList: 0,
1546
+ DOMStringList: 0,
1547
+ DOMTokenList: 1,
1548
+ DataTransferItemList: 0,
1549
+ FileList: 0,
1550
+ HTMLAllCollection: 0,
1551
+ HTMLCollection: 0,
1552
+ HTMLFormElement: 0,
1553
+ HTMLSelectElement: 0,
1554
+ MediaList: 0,
1555
+ MimeTypeArray: 0,
1556
+ NamedNodeMap: 0,
1557
+ NodeList: 1,
1558
+ PaintRequestList: 0,
1559
+ Plugin: 0,
1560
+ PluginArray: 0,
1561
+ SVGLengthList: 0,
1562
+ SVGNumberList: 0,
1563
+ SVGPathSegList: 0,
1564
+ SVGPointList: 0,
1565
+ SVGStringList: 0,
1566
+ SVGTransformList: 0,
1567
+ SourceBufferList: 0,
1568
+ StyleSheetList: 0,
1569
+ TextTrackCueList: 0,
1570
+ TextTrackList: 0,
1571
+ TouchList: 0
1572
+ };
1573
+
1574
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1575
+ var documentCreateElement = documentCreateElement$2;
1576
+
1577
+ var classList = documentCreateElement('span').classList;
1578
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1579
+
1580
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1581
+
1582
+ var global$1 = global$b;
1583
+ var DOMIterables = domIterables;
1584
+ var DOMTokenListPrototype = domTokenListPrototype;
1585
+ var ArrayIteratorMethods = es_array_iterator;
1586
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1587
+ var setToStringTag = setToStringTag$3;
1588
+ var wellKnownSymbol = wellKnownSymbol$6;
1589
+
1590
+ var ITERATOR = wellKnownSymbol('iterator');
1591
+ var ArrayValues = ArrayIteratorMethods.values;
1592
+
1593
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1594
+ if (CollectionPrototype) {
1595
+ // some Chrome versions have non-configurable methods on DOMTokenList
1596
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1597
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1598
+ } catch (error) {
1599
+ CollectionPrototype[ITERATOR] = ArrayValues;
1924
1600
  }
1925
- }), { b: 2 })).b !== 1) return true;
1926
- // should work with symbols and should have deterministic property order (V8 bug)
1927
- var A = {};
1928
- var B = {};
1929
- // eslint-disable-next-line es/no-symbol -- safe
1930
- var symbol = Symbol('assign detection');
1931
- var alphabet = 'abcdefghijklmnopqrst';
1932
- A[symbol] = 7;
1933
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1934
- return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1935
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1936
- var T = toObject(target);
1937
- var argumentsLength = arguments.length;
1938
- var index = 1;
1939
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1940
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1941
- while (argumentsLength > index) {
1942
- var S = IndexedObject(arguments[index++]);
1943
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1944
- var length = keys.length;
1945
- var j = 0;
1946
- var key;
1947
- while (length > j) {
1948
- key = keys[j++];
1949
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1601
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1602
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1603
+ // some Chrome versions have non-configurable methods on DOMTokenList
1604
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1605
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1606
+ } catch (error) {
1607
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1608
+ }
1950
1609
  }
1951
- } return T;
1952
- } : $assign;
1953
-
1954
- var $ = _export;
1955
- var assign = objectAssign;
1956
-
1957
- // `Object.assign` method
1958
- // https://tc39.es/ecma262/#sec-object.assign
1959
- // eslint-disable-next-line es/no-object-assign -- required for testing
1960
- $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1961
- assign: assign
1962
- });
1963
-
1964
- function getPageElementBound(rowsNodes) {
1965
- if (!rowsNodes) {
1966
- return [];
1967
1610
  }
1968
- return rowsNodes.map(row => {
1969
- const rowRect = row.getBoundingClientRect();
1970
- const columns = row.children;
1971
- return {
1972
- x: rowRect.x,
1973
- y: rowRect.y,
1974
- width: rowRect.width,
1975
- height: rowRect.height,
1976
- columns: Array.from(columns).map(column => {
1977
- const columnRect = column.getBoundingClientRect();
1978
- const containers = Array.from(column.querySelectorAll('[data-dot="container"]'));
1979
- const columnX = columnRect.left - rowRect.left;
1980
- const columnY = columnRect.top - rowRect.top;
1981
- return {
1982
- x: columnX,
1983
- y: columnY,
1984
- width: columnRect.width,
1985
- height: columnRect.height,
1986
- containers: containers.map(container => {
1987
- const containerRect = container.getBoundingClientRect();
1988
- const contentlets = Array.from(container.querySelectorAll('[data-dot="contentlet"]'));
1989
- return {
1990
- x: 0,
1991
- y: containerRect.y - rowRect.top,
1992
- width: containerRect.width,
1993
- height: containerRect.height,
1994
- payload: container.dataset.content,
1995
- contentlets: contentlets.map(contentlet => {
1996
- const contentletRect = contentlet.getBoundingClientRect();
1997
- return {
1998
- x: 0,
1999
- y: contentletRect.y - containerRect.y,
2000
- width: contentletRect.width,
2001
- height: contentletRect.height,
2002
- payload: contentlet.dataset.content
2003
- };
2004
- })
2005
- };
2006
- })
2007
- };
2008
- })
2009
- };
2010
- });
2011
- }
2012
- const getPageContainers = containers => {
2013
- return Object.keys(containers).reduce((acc, container) => {
2014
- const contentlets = containers[container].contentlets;
2015
- const contentletsKeys = Object.keys(contentlets);
2016
- contentletsKeys.forEach(key => {
2017
- var _containers$container;
2018
- acc.push({
2019
- identifier: (_containers$container = containers[container].container.path) != null ? _containers$container : containers[container].container.identifier,
2020
- uuid: key.replace('uuid-', ''),
2021
- contentletsId: contentlets[key].map(contentlet => contentlet.identifier)
2022
- });
2023
- });
2024
- return acc;
2025
- }, []);
2026
- };
2027
- const getContainersData = (containers, containerRef) => {
2028
- const {
2029
- identifier,
2030
- uuid
2031
- } = containerRef;
2032
- const {
2033
- containerStructures
2034
- } = containers[identifier];
2035
- // Get accepts types of content types for this container
2036
- const acceptTypes = containerStructures.map(structure => structure.contentTypeVar).join(',');
2037
- // Get the contentlets for "this" container
2038
- const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
2039
- const pageContainers = getPageContainers(containers);
2040
- return Object.assign({}, containers[identifier].container, {
2041
- acceptTypes,
2042
- contentlets,
2043
- pageContainers
2044
- });
2045
1611
  };
2046
1612
 
2047
- /**
2048
- * `usePageEditor` is a custom React hook that sets up the page editor for a DotCMS page.
2049
- * It takes a `PageEditorOptions` object as a parameter and returns a reference to the rows of the page.
2050
- *
2051
- * This hook is the main brigde between your webapp and the dotcms page editor.
2052
- *
2053
- *
2054
- * @category Hooks
2055
- * @param {PageEditorOptions} props - The options for the page editor. Includes a `reloadFunction` and a `pathname`.
2056
- * @returns {React.RefObject<HTMLDivElement>[]} - A reference to the rows of the page.
2057
- * @throws {Error} - Throws an error if the `pathname` is not provided.
2058
- */
2059
- const usePageEditor = props => {
2060
- const {
2061
- reloadFunction = window.location.reload,
2062
- pathname = null
2063
- } = props;
2064
- if (!pathname) {
2065
- throw new Error('Dotcms page editor required the pathname of your webapp');
2066
- }
2067
- usePostUrlToEditor(pathname);
2068
- useScrollEvent();
2069
- useReloadPage(reloadFunction);
2070
- const rowsRef = useRequestBounds();
2071
- return rowsRef;
2072
- };
2073
- function useRequestBounds() {
2074
- const rows = useRef([]);
2075
- useEffect(() => {
2076
- function eventMessageHandler(event) {
2077
- if (event.data === 'ema-request-bounds') {
2078
- const positionData = getPageElementBound(rows.current);
2079
- postMessageToEditor({
2080
- action: CUSTOMER_ACTIONS.SET_BOUNDS,
2081
- payload: positionData
2082
- });
2083
- }
2084
- }
2085
- window.addEventListener('message', eventMessageHandler);
2086
- return () => {
2087
- window.removeEventListener('message', eventMessageHandler);
2088
- };
2089
- }, [rows]);
2090
- return rows;
1613
+ for (var COLLECTION_NAME in DOMIterables) {
1614
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
2091
1615
  }
2092
- function useScrollEvent() {
1616
+
1617
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1618
+
1619
+ const useDotcmsEditor = config => {
1620
+ const [isInsideEditorPage, setIsInsideEditorPage] = useState(false);
2093
1621
  useEffect(() => {
2094
- function eventScrollHandler() {
2095
- postMessageToEditor({
2096
- action: CUSTOMER_ACTIONS.IFRAME_SCROLL
2097
- });
1622
+ const insideEditor = isInsideEditor();
1623
+ if (insideEditor) {
1624
+ initEditor(config);
1625
+ updateNavigation((config == null ? void 0 : config.pathname) || '/');
2098
1626
  }
2099
- window.addEventListener('scroll', eventScrollHandler);
1627
+ setIsInsideEditorPage(insideEditor);
2100
1628
  return () => {
2101
- window.removeEventListener('scroll', eventScrollHandler);
2102
- };
2103
- }, []);
2104
- }
2105
- function useReloadPage(reload = window.location.reload) {
2106
- useEffect(() => {
2107
- function eventMessageHandler(event) {
2108
- if (event.data === 'ema-reload-page') {
2109
- reload();
1629
+ if (insideEditor) {
1630
+ destroyEditor();
2110
1631
  }
2111
- }
2112
- window.addEventListener('message', eventMessageHandler);
2113
- return () => {
2114
- window.removeEventListener('message', eventMessageHandler);
2115
1632
  };
2116
- }, [reload]);
2117
- }
2118
- function usePostUrlToEditor(pathname) {
2119
- useEffect(() => {
2120
- postMessageToEditor({
2121
- action: CUSTOMER_ACTIONS.SET_URL,
2122
- payload: {
2123
- url: pathname === '/' ? 'index' : pathname == null ? void 0 : pathname.replace('/', '')
2124
- }
2125
- });
2126
- }, [pathname]);
2127
- }
1633
+ }, [config]);
1634
+ return isInsideEditorPage;
1635
+ };
2128
1636
 
2129
1637
  const PageContext = /*#__PURE__*/createContext(null);
2130
1638
 
@@ -2138,11 +1646,11 @@ const PageContext = /*#__PURE__*/createContext(null);
2138
1646
  */
2139
1647
  function PageProvider(props) {
2140
1648
  const {
2141
- entity,
1649
+ pageContext,
2142
1650
  children
2143
1651
  } = props;
2144
1652
  return jsx(PageContext.Provider, {
2145
- value: entity,
1653
+ value: pageContext,
2146
1654
  children: children
2147
1655
  });
2148
1656
  }
@@ -2178,11 +1686,73 @@ var css_248z$1 = ".row-module_row__8V7Eh {\n display: grid;\n grid-templat
2178
1686
  var styles$1 = {"row":"row-module_row__8V7Eh"};
2179
1687
  styleInject(css_248z$1);
2180
1688
 
2181
- var css_248z = ".column-module_col-start-1__GK-q- {\n grid-column-start: 1;\n}\n\n.column-module_col-start-2__1DmkY {\n grid-column-start: 2;\n}\n\n.column-module_col-start-3__HNEPh {\n grid-column-start: 3;\n}\n\n.column-module_col-start-4__oCAwh {\n grid-column-start: 4;\n}\n\n.column-module_col-start-5__re1rB {\n grid-column-start: 5;\n}\n\n.column-module_col-start-6__dkB4w {\n grid-column-start: 6;\n}\n\n.column-module_col-start-7__kEfJb {\n grid-column-start: 7;\n}\n\n.column-module_col-start-8__Yx31z {\n grid-column-start: 8;\n}\n\n.column-module_col-start-9__9YiVY {\n grid-column-start: 9;\n}\n\n.column-module_col-start-10__6AFbk {\n grid-column-start: 10;\n}\n\n.column-module_col-start-11__LP24D {\n grid-column-start: 11;\n}\n\n.column-module_col-start-12__8p0QS {\n grid-column-start: 12;\n}\n\n.column-module_col-span-1__vOPKg {\n grid-column: span 1 / span 1;\n}\n\n.column-module_col-span-2__qVdyn {\n grid-column: span 2 / span 2;\n}\n\n.column-module_col-span-3__brcdA {\n grid-column: span 3 / span 3;\n}\n\n.column-module_col-span-4__1-c-f {\n grid-column: span 4 / span 4;\n}\n\n.column-module_col-span-5__nAGLD {\n grid-column: span 5 / span 5;\n}\n\n.column-module_col-span-6__emtw7 {\n grid-column: span 6 / span 6;\n}\n\n.column-module_col-span-7__Ad5-V {\n grid-column: span 7 / span 7;\n}\n\n.column-module_col-span-8__gEnsA {\n grid-column: span 8 / span 8;\n}\n\n.column-module_col-span-9__jWemC {\n grid-column: span 9 / span 9;\n}\n\n.column-module_col-span-10__Dzuph {\n grid-column: span 10 / span 10;\n}\n\n.column-module_col-span-11__Xgct2 {\n grid-column: span 11 / span 11;\n}\n\n.column-module_col-span-12__LvJrY {\n grid-column: span 12 / span 12;\n}\n";
2182
- var styles = {"col-start-1":"column-module_col-start-1__GK-q-","col-start-2":"column-module_col-start-2__1DmkY","col-start-3":"column-module_col-start-3__HNEPh","col-start-4":"column-module_col-start-4__oCAwh","col-start-5":"column-module_col-start-5__re1rB","col-start-6":"column-module_col-start-6__dkB4w","col-start-7":"column-module_col-start-7__kEfJb","col-start-8":"column-module_col-start-8__Yx31z","col-start-9":"column-module_col-start-9__9YiVY","col-start-10":"column-module_col-start-10__6AFbk","col-start-11":"column-module_col-start-11__LP24D","col-start-12":"column-module_col-start-12__8p0QS","col-span-1":"column-module_col-span-1__vOPKg","col-span-2":"column-module_col-span-2__qVdyn","col-span-3":"column-module_col-span-3__brcdA","col-span-4":"column-module_col-span-4__1-c-f","col-span-5":"column-module_col-span-5__nAGLD","col-span-6":"column-module_col-span-6__emtw7","col-span-7":"column-module_col-span-7__Ad5-V","col-span-8":"column-module_col-span-8__gEnsA","col-span-9":"column-module_col-span-9__jWemC","col-span-10":"column-module_col-span-10__Dzuph","col-span-11":"column-module_col-span-11__Xgct2","col-span-12":"column-module_col-span-12__LvJrY"};
1689
+ const endClassMap = {
1690
+ 1: 'col-end-1',
1691
+ 2: 'col-end-2',
1692
+ 3: 'col-end-3',
1693
+ 4: 'col-end-4',
1694
+ 5: 'col-end-5',
1695
+ 6: 'col-end-6',
1696
+ 7: 'col-end-7',
1697
+ 8: 'col-end-8',
1698
+ 9: 'col-end-9',
1699
+ 10: 'col-end-10',
1700
+ 11: 'col-end-11',
1701
+ 12: 'col-end-12',
1702
+ 13: 'col-end-13'
1703
+ };
1704
+ const startClassMap = {
1705
+ 1: 'col-start-1',
1706
+ 2: 'col-start-2',
1707
+ 3: 'col-start-3',
1708
+ 4: 'col-start-4',
1709
+ 5: 'col-start-5',
1710
+ 6: 'col-start-6',
1711
+ 7: 'col-start-7',
1712
+ 8: 'col-start-8',
1713
+ 9: 'col-start-9',
1714
+ 10: 'col-start-10',
1715
+ 11: 'col-start-11',
1716
+ 12: 'col-start-12'
1717
+ };
1718
+ const getContainersData = (containers, containerRef) => {
1719
+ const {
1720
+ identifier,
1721
+ uuid
1722
+ } = containerRef;
1723
+ const {
1724
+ containerStructures,
1725
+ container
1726
+ } = containers[identifier];
1727
+ // Get the variant id
1728
+ const {
1729
+ variantId
1730
+ } = (container == null ? void 0 : container.parentPermissionable) || {};
1731
+ // Get accepts types of content types for this container
1732
+ const acceptTypes = containerStructures.map(structure => structure.contentTypeVar).join(',');
1733
+ // Get the contentlets for "this" container
1734
+ const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
1735
+ return Object.assign({}, containers[identifier].container, {
1736
+ acceptTypes,
1737
+ contentlets,
1738
+ variantId
1739
+ });
1740
+ };
1741
+ const combineClasses = classes => classes.filter(Boolean).join(' ');
1742
+ const getPositionStyleClasses = (start, end) => {
1743
+ const startClass = startClassMap[start];
1744
+ const endClass = endClassMap[end];
1745
+ return {
1746
+ startClass,
1747
+ endClass
1748
+ };
1749
+ };
1750
+
1751
+ var css_248z = ".column-module_col-start-1__GK-q- {\n grid-column-start: 1;\n}\n\n.column-module_col-start-2__1DmkY {\n grid-column-start: 2;\n}\n\n.column-module_col-start-3__HNEPh {\n grid-column-start: 3;\n}\n\n.column-module_col-start-4__oCAwh {\n grid-column-start: 4;\n}\n\n.column-module_col-start-5__re1rB {\n grid-column-start: 5;\n}\n\n.column-module_col-start-6__dkB4w {\n grid-column-start: 6;\n}\n\n.column-module_col-start-7__kEfJb {\n grid-column-start: 7;\n}\n\n.column-module_col-start-8__Yx31z {\n grid-column-start: 8;\n}\n\n.column-module_col-start-9__9YiVY {\n grid-column-start: 9;\n}\n\n.column-module_col-start-10__6AFbk {\n grid-column-start: 10;\n}\n\n.column-module_col-start-11__LP24D {\n grid-column-start: 11;\n}\n\n.column-module_col-start-12__8p0QS {\n grid-column-start: 12;\n}\n\n.column-module_col-end-1__G9axv {\n grid-column-end: 1;\n}\n\n.column-module_col-end-2__pYjHG {\n grid-column-end: 2;\n}\n\n.column-module_col-end-3__4woe6 {\n grid-column-end: 3;\n}\n\n.column-module_col-end-4__zlBaT {\n grid-column-end: 4;\n}\n\n.column-module_col-end-5__aC-y8 {\n grid-column-end: 5;\n}\n\n.column-module_col-end-6__YljAP {\n grid-column-end: 6;\n}\n\n.column-module_col-end-7__lpQrW {\n grid-column-end: 7;\n}\n\n.column-module_col-end-8__F6UVd {\n grid-column-end: 8;\n}\n\n.column-module_col-end-9__kvQ3T {\n grid-column-end: 9;\n}\n\n.column-module_col-end-10__XJhrd {\n grid-column-end: 10;\n}\n\n.column-module_col-end-11__nx-lF {\n grid-column-end: 11;\n}\n\n.column-module_col-end-12__LIRnk {\n grid-column-end: 12;\n}\n\n.column-module_col-end-13__0p7YI {\n grid-column-end: 13;\n}\n";
1752
+ var styles = {"col-start-1":"column-module_col-start-1__GK-q-","col-start-2":"column-module_col-start-2__1DmkY","col-start-3":"column-module_col-start-3__HNEPh","col-start-4":"column-module_col-start-4__oCAwh","col-start-5":"column-module_col-start-5__re1rB","col-start-6":"column-module_col-start-6__dkB4w","col-start-7":"column-module_col-start-7__kEfJb","col-start-8":"column-module_col-start-8__Yx31z","col-start-9":"column-module_col-start-9__9YiVY","col-start-10":"column-module_col-start-10__6AFbk","col-start-11":"column-module_col-start-11__LP24D","col-start-12":"column-module_col-start-12__8p0QS","col-end-1":"column-module_col-end-1__G9axv","col-end-2":"column-module_col-end-2__pYjHG","col-end-3":"column-module_col-end-3__4woe6","col-end-4":"column-module_col-end-4__zlBaT","col-end-5":"column-module_col-end-5__aC-y8","col-end-6":"column-module_col-end-6__YljAP","col-end-7":"column-module_col-end-7__lpQrW","col-end-8":"column-module_col-end-8__F6UVd","col-end-9":"column-module_col-end-9__kvQ3T","col-end-10":"column-module_col-end-10__XJhrd","col-end-11":"column-module_col-end-11__nx-lF","col-end-12":"column-module_col-end-12__LIRnk","col-end-13":"column-module_col-end-13__0p7YI"};
2183
1753
  styleInject(css_248z);
2184
1754
 
2185
- function NoContent({
1755
+ function NoComponent({
2186
1756
  contentType
2187
1757
  }) {
2188
1758
  return jsxs("div", {
@@ -2190,140 +1760,105 @@ function NoContent({
2190
1760
  children: ["No Component for ", contentType]
2191
1761
  });
2192
1762
  }
1763
+ function EmptyContent() {
1764
+ return null;
1765
+ }
2193
1766
  function Container({
2194
1767
  containerRef
2195
1768
  }) {
2196
- var _viewAs$persona;
1769
+ const {
1770
+ isInsideEditor
1771
+ } = useContext(PageContext);
2197
1772
  const {
2198
1773
  identifier,
2199
1774
  uuid
2200
1775
  } = containerRef;
2201
1776
  // Get the containers from the global context
2202
1777
  const {
2203
- containers,
2204
- page,
2205
- viewAs,
1778
+ pageAsset: {
1779
+ containers
1780
+ },
2206
1781
  components
2207
1782
  } = useContext(PageContext);
2208
1783
  const {
2209
1784
  acceptTypes,
2210
1785
  contentlets,
2211
1786
  maxContentlets,
2212
- pageContainers,
1787
+ variantId,
2213
1788
  path
2214
1789
  } = getContainersData(containers, containerRef);
2215
- const contentletsId = contentlets.map(contentlet => contentlet.identifier);
2216
1790
  const container = {
2217
1791
  acceptTypes,
2218
- contentletsId,
2219
1792
  identifier: path != null ? path : identifier,
2220
1793
  maxContentlets,
1794
+ variantId,
2221
1795
  uuid
2222
1796
  };
2223
- const containerPayload = {
2224
- container,
2225
- language_id: viewAs.language.id,
2226
- pageContainers,
2227
- pageId: page.identifier,
2228
- personaTag: (_viewAs$persona = viewAs.persona) == null ? void 0 : _viewAs$persona.keyTag
1797
+ const containerStyles = contentlets.length ? undefined : {
1798
+ width: '100%',
1799
+ backgroundColor: '#ECF0FD',
1800
+ display: 'flex',
1801
+ justifyContent: 'center',
1802
+ alignItems: 'center',
1803
+ color: '#030E32',
1804
+ height: '10rem'
2229
1805
  };
2230
- function onPointerEnterHandler(e) {
2231
- var _target$dataset$conte;
2232
- let target = e.target;
2233
- if (target.dataset.dot !== 'contentlet') {
2234
- target = target.closest('[data-dot="contentlet"]');
2235
- }
2236
- if (!target) {
2237
- return;
2238
- }
2239
- const {
2240
- x,
2241
- y,
2242
- width,
2243
- height
2244
- } = target.getBoundingClientRect();
2245
- const contentletPayload = JSON.parse((_target$dataset$conte = target.dataset.content) != null ? _target$dataset$conte : '{}');
2246
- postMessageToEditor({
2247
- action: CUSTOMER_ACTIONS.SET_CONTENTLET,
2248
- payload: {
2249
- x,
2250
- y,
2251
- width,
2252
- height,
2253
- payload: contentletPayload
2254
- }
2255
- });
2256
- }
2257
- return jsx("div", {
2258
- "data-dot": "container",
2259
- "data-content": JSON.stringify(containerPayload),
2260
- children: contentlets.map(contentlet => {
2261
- var _viewAs$persona2;
2262
- const Component = components[contentlet.contentType] || NoContent;
2263
- const contentletPayload = {
2264
- container,
2265
- contentlet: {
2266
- identifier: contentlet.identifier,
2267
- title: contentlet.widgetTitle || contentlet.title,
2268
- inode: contentlet.inode
2269
- },
2270
- language_id: viewAs.language.id,
2271
- pageContainers,
2272
- pageId: page.identifier,
2273
- personaTag: (_viewAs$persona2 = viewAs.persona) == null ? void 0 : _viewAs$persona2.keyTag
2274
- };
2275
- return jsx("div", {
2276
- onPointerEnter: onPointerEnterHandler,
2277
- "data-dot": "contentlet",
2278
- "data-content": JSON.stringify(contentletPayload),
2279
- children: jsx(Component, Object.assign({}, contentlet))
2280
- }, contentlet.identifier);
2281
- })
1806
+ const ContainerChildren = contentlets.map(contentlet => {
1807
+ const ContentTypeComponent = components[contentlet.contentType];
1808
+ const DefaultComponent = components['CustomNoComponent'] || NoComponent;
1809
+ const Component = isInsideEditor ? ContentTypeComponent || DefaultComponent : ContentTypeComponent || EmptyContent;
1810
+ return isInsideEditor ? jsx("div", {
1811
+ "data-testid": "dot-contentlet",
1812
+ "data-dot-object": "contentlet",
1813
+ "data-dot-identifier": contentlet.identifier,
1814
+ "data-dot-basetype": contentlet.baseType,
1815
+ "data-dot-title": contentlet.widgetTitle || contentlet.title,
1816
+ "data-dot-inode": contentlet.inode,
1817
+ "data-dot-type": contentlet.contentType,
1818
+ "data-dot-container": JSON.stringify(container),
1819
+ "data-dot-on-number-of-pages": contentlet.onNumberOfPages,
1820
+ children: jsx(Component, Object.assign({}, contentlet))
1821
+ }, contentlet.identifier) : ( /*#__PURE__*/createElement$1(Component, Object.assign({}, contentlet, {
1822
+ key: contentlet.identifier
1823
+ })));
1824
+ });
1825
+ return isInsideEditor ? jsx("div", {
1826
+ "data-testid": "dot-container",
1827
+ "data-dot-object": "container",
1828
+ "data-dot-accept-types": acceptTypes,
1829
+ "data-dot-identifier": path != null ? path : identifier,
1830
+ "data-max-contentlets": maxContentlets,
1831
+ "data-dot-uuid": uuid,
1832
+ style: containerStyles,
1833
+ children: ContainerChildren.length ? ContainerChildren : 'This container is empty.'
1834
+ }) :
1835
+ // eslint-disable-next-line react/jsx-no-useless-fragment
1836
+ jsx(Fragment, {
1837
+ children: ContainerChildren
2282
1838
  });
2283
1839
  }
2284
1840
 
2285
1841
  function Column({
2286
1842
  column
2287
1843
  }) {
2288
- const widthClassMap = {
2289
- 1: 'col-span-1',
2290
- 2: 'col-span-2',
2291
- 3: 'col-span-3',
2292
- 4: 'col-span-4',
2293
- 5: 'col-span-5',
2294
- 6: 'col-span-6',
2295
- 7: 'col-span-7',
2296
- 8: 'col-span-8',
2297
- 9: 'col-span-9',
2298
- 10: 'col-span-10',
2299
- 11: 'col-span-11',
2300
- 12: 'col-span-12'
2301
- };
2302
- const statrClassMap = {
2303
- 1: 'col-start-1',
2304
- 2: 'col-start-2',
2305
- 3: 'col-start-3',
2306
- 4: 'col-start-4',
2307
- 5: 'col-start-5',
2308
- 6: 'col-start-6',
2309
- 7: 'col-start-7',
2310
- 8: 'col-start-8',
2311
- 9: 'col-start-9',
2312
- 10: 'col-start-10',
2313
- 11: 'col-start-11',
2314
- 12: 'col-start-12'
2315
- };
2316
- const widthClass = widthClassMap[column.width];
2317
- const startClass = statrClassMap[column.leftOffset];
2318
- const combinedClasses = [styles[widthClass], styles[startClass], column.styleClass].filter(Boolean).join(' ');
2319
- return jsx("div", {
2320
- "data-dot": "column",
2321
- "data-testid": "column",
1844
+ const {
1845
+ isInsideEditor
1846
+ } = useContext(PageContext);
1847
+ const {
1848
+ startClass,
1849
+ endClass
1850
+ } = getPositionStyleClasses(column.leftOffset, column.width + column.leftOffset);
1851
+ const combinedClasses = combineClasses([styles[endClass], styles[startClass], column.styleClass]);
1852
+ const columnProps = isInsideEditor ? {
1853
+ 'data-dot': 'column',
1854
+ 'data-testid': 'column'
1855
+ } : {};
1856
+ return jsx("div", Object.assign({}, columnProps, {
2322
1857
  className: combinedClasses,
2323
1858
  children: column.containers.map(container => jsx(Container, {
2324
1859
  containerRef: container
2325
1860
  }, `${container.identifier}-${container.uuid}`))
2326
- });
1861
+ }));
2327
1862
  }
2328
1863
 
2329
1864
  /**
@@ -2334,19 +1869,24 @@ function Column({
2334
1869
  * @return {*}
2335
1870
  */
2336
1871
  const Row = /*#__PURE__*/forwardRef((props, ref) => {
1872
+ const {
1873
+ isInsideEditor
1874
+ } = useContext(PageContext);
2337
1875
  const {
2338
1876
  row
2339
1877
  } = props;
2340
- const combinedClasses = [styles$1.row, row.styleClass].filter(Boolean).join(' ');
2341
- return jsx("div", {
2342
- "data-testid": "row",
2343
- "data-dot": "row",
2344
- ref: ref,
1878
+ const combinedClasses = combineClasses([styles$1.row, row.styleClass]);
1879
+ const rowProps = isInsideEditor ? {
1880
+ 'data-dot': 'row',
1881
+ 'data-testid': 'row',
1882
+ ref
1883
+ } : {};
1884
+ return jsx("div", Object.assign({}, rowProps, {
2345
1885
  className: combinedClasses,
2346
1886
  children: row.columns.map((column, index) => jsx(Column, {
2347
1887
  column: column
2348
1888
  }, index))
2349
- });
1889
+ }));
2350
1890
  });
2351
1891
 
2352
1892
  /**
@@ -2357,20 +1897,16 @@ const Row = /*#__PURE__*/forwardRef((props, ref) => {
2357
1897
  * @param {DotcmsPageProps} props - The properties for the DotCMS page.
2358
1898
  * @returns {JSX.Element} - A JSX element that represents the layout for a DotCMS page.
2359
1899
  */
2360
- function DotcmsLayout(props) {
2361
- const {
2362
- entity
2363
- } = props;
2364
- const rowsRef = usePageEditor({});
2365
- const addRowRef = el => {
2366
- if (el && !rowsRef.current.includes(el)) {
2367
- rowsRef.current.push(el);
2368
- }
2369
- };
1900
+ function DotcmsLayout({
1901
+ pageContext,
1902
+ config
1903
+ }) {
1904
+ const isInsideEditor = useDotcmsEditor(config);
2370
1905
  return jsx(PageProvider, {
2371
- entity: entity,
2372
- children: entity.layout.body.rows.map((row, index) => jsx(Row, {
2373
- ref: addRowRef,
1906
+ pageContext: Object.assign({}, pageContext, {
1907
+ isInsideEditor
1908
+ }),
1909
+ children: pageContext.pageAsset.layout.body.rows.map((row, index) => jsx(Row, {
2374
1910
  row: row
2375
1911
  }, index))
2376
1912
  });
@@ -2381,10 +1917,10 @@ function DotcmsLayout(props) {
2381
1917
  * It takes no parameters and returns the context value or `null` if it's not available.
2382
1918
  *
2383
1919
  * @category Hooks
2384
- * @returns {PageProviderContext | null} - The context value or `null` if it's not available.
1920
+ * @returns {DotCMSPageContext | null} - The context value or `null` if it's not available.
2385
1921
  */
2386
1922
  function useDotcmsPageContext() {
2387
1923
  return useContext(PageContext);
2388
1924
  }
2389
1925
 
2390
- export { DotcmsLayout, PageProvider, Row, useDotcmsPageContext, usePageEditor };
1926
+ export { DotcmsLayout, PageProvider, Row, useDotcmsPageContext };