@trackunit/css-component-tokens 0.0.3

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.cjs ADDED
@@ -0,0 +1,1869 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var cssTailwindCustomPropertiesPlugin = require('@trackunit/css-tailwind-custom-properties-plugin');
6
+ var plugin = require('tailwindcss/plugin');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var plugin__default = /*#__PURE__*/_interopDefaultLegacy(plugin);
11
+
12
+ /**
13
+ * Returns the designTokens passed, but ensures it satisfies DesignTokens type while keeping it literal
14
+ */
15
+ const AsComponentTokenDefinition = designTokens => designTokens;
16
+
17
+ /*
18
+ * This file holds the custom design tokens for this component.
19
+ * These will be added to the tailwind configuration.
20
+ */
21
+ const CardTokenDefinition = AsComponentTokenDefinition({
22
+ DEFAULT: {
23
+ border: {
24
+ borderColor: "rgb(var(--color-slate-200))",
25
+ borderRadius: "var(--border-radius-DEFAULT)"
26
+ },
27
+ shadow: {
28
+ boxShadow: "var(--box-shadow-DEFAULT)"
29
+ }
30
+ },
31
+ "theme-marketing": {
32
+ border: {
33
+ borderColor: "rgba(0, 0, 0, 0)",
34
+ borderRadius: "2rem"
35
+ },
36
+ shadow: {
37
+ boxShadow: "0px 20px 48px rgba(73, 55, 54, 0.1)"
38
+ }
39
+ }
40
+ });
41
+
42
+ const componentTokenDefinitions = {
43
+ card: CardTokenDefinition
44
+ };
45
+
46
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
47
+
48
+ var fails$a = function (exec) {
49
+ try {
50
+ return !!exec();
51
+ } catch (error) {
52
+ return true;
53
+ }
54
+ };
55
+
56
+ var fails$9 = fails$a;
57
+
58
+ var functionBindNative = !fails$9(function () {
59
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
60
+ var test = (function () { /* empty */ }).bind();
61
+ // eslint-disable-next-line no-prototype-builtins -- safe
62
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
63
+ });
64
+
65
+ var NATIVE_BIND$2 = functionBindNative;
66
+
67
+ var FunctionPrototype$1 = Function.prototype;
68
+ var call$8 = FunctionPrototype$1.call;
69
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$1.bind.bind(call$8, call$8);
70
+
71
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
72
+ return function () {
73
+ return call$8.apply(fn, arguments);
74
+ };
75
+ };
76
+
77
+ var uncurryThis$a = functionUncurryThis;
78
+
79
+ var toString$1 = uncurryThis$a({}.toString);
80
+ var stringSlice = uncurryThis$a(''.slice);
81
+
82
+ var classofRaw$2 = function (it) {
83
+ return stringSlice(toString$1(it), 8, -1);
84
+ };
85
+
86
+ var uncurryThis$9 = functionUncurryThis;
87
+ var fails$8 = fails$a;
88
+ var classof$2 = classofRaw$2;
89
+
90
+ var $Object$4 = Object;
91
+ var split = uncurryThis$9(''.split);
92
+
93
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
94
+ var indexedObject = fails$8(function () {
95
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
96
+ // eslint-disable-next-line no-prototype-builtins -- safe
97
+ return !$Object$4('z').propertyIsEnumerable(0);
98
+ }) ? function (it) {
99
+ return classof$2(it) == 'String' ? split(it, '') : $Object$4(it);
100
+ } : $Object$4;
101
+
102
+ // we can't use just `it == null` since of `document.all` special case
103
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
104
+ var isNullOrUndefined$3 = function (it) {
105
+ return it === null || it === undefined;
106
+ };
107
+
108
+ var isNullOrUndefined$2 = isNullOrUndefined$3;
109
+
110
+ var $TypeError$8 = TypeError;
111
+
112
+ // `RequireObjectCoercible` abstract operation
113
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
114
+ var requireObjectCoercible$2 = function (it) {
115
+ if (isNullOrUndefined$2(it)) throw $TypeError$8("Can't call method on " + it);
116
+ return it;
117
+ };
118
+
119
+ // toObject with fallback for non-array-like ES3 strings
120
+ var IndexedObject = indexedObject;
121
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
122
+
123
+ var toIndexedObject$5 = function (it) {
124
+ return IndexedObject(requireObjectCoercible$1(it));
125
+ };
126
+
127
+ var check = function (it) {
128
+ return it && it.Math == Math && it;
129
+ };
130
+
131
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
132
+ var global$b =
133
+ // eslint-disable-next-line es/no-global-this -- safe
134
+ check(typeof globalThis == 'object' && globalThis) ||
135
+ check(typeof window == 'object' && window) ||
136
+ // eslint-disable-next-line no-restricted-globals -- safe
137
+ check(typeof self == 'object' && self) ||
138
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
139
+ // eslint-disable-next-line no-new-func -- fallback
140
+ (function () { return this; })() || Function('return this')();
141
+
142
+ var shared$3 = {exports: {}};
143
+
144
+ var global$a = global$b;
145
+
146
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
147
+ var defineProperty$4 = Object.defineProperty;
148
+
149
+ var defineGlobalProperty$3 = function (key, value) {
150
+ try {
151
+ defineProperty$4(global$a, key, { value: value, configurable: true, writable: true });
152
+ } catch (error) {
153
+ global$a[key] = value;
154
+ } return value;
155
+ };
156
+
157
+ var global$9 = global$b;
158
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
159
+
160
+ var SHARED = '__core-js_shared__';
161
+ var store$3 = global$9[SHARED] || defineGlobalProperty$2(SHARED, {});
162
+
163
+ var sharedStore = store$3;
164
+
165
+ var store$2 = sharedStore;
166
+
167
+ (shared$3.exports = function (key, value) {
168
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
169
+ })('versions', []).push({
170
+ version: '3.26.1',
171
+ mode: 'global',
172
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
173
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
174
+ source: 'https://github.com/zloirock/core-js'
175
+ });
176
+
177
+ var requireObjectCoercible = requireObjectCoercible$2;
178
+
179
+ var $Object$3 = Object;
180
+
181
+ // `ToObject` abstract operation
182
+ // https://tc39.es/ecma262/#sec-toobject
183
+ var toObject$2 = function (argument) {
184
+ return $Object$3(requireObjectCoercible(argument));
185
+ };
186
+
187
+ var uncurryThis$8 = functionUncurryThis;
188
+ var toObject$1 = toObject$2;
189
+
190
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
191
+
192
+ // `HasOwnProperty` abstract operation
193
+ // https://tc39.es/ecma262/#sec-hasownproperty
194
+ // eslint-disable-next-line es/no-object-hasown -- safe
195
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
196
+ return hasOwnProperty(toObject$1(it), key);
197
+ };
198
+
199
+ var uncurryThis$7 = functionUncurryThis;
200
+
201
+ var id = 0;
202
+ var postfix = Math.random();
203
+ var toString = uncurryThis$7(1.0.toString);
204
+
205
+ var uid$2 = function (key) {
206
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
207
+ };
208
+
209
+ var documentAll$2 = typeof document == 'object' && document.all;
210
+
211
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
212
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
213
+
214
+ var documentAll_1 = {
215
+ all: documentAll$2,
216
+ IS_HTMLDDA: IS_HTMLDDA
217
+ };
218
+
219
+ var $documentAll$1 = documentAll_1;
220
+
221
+ var documentAll$1 = $documentAll$1.all;
222
+
223
+ // `IsCallable` abstract operation
224
+ // https://tc39.es/ecma262/#sec-iscallable
225
+ var isCallable$f = $documentAll$1.IS_HTMLDDA ? function (argument) {
226
+ return typeof argument == 'function' || argument === documentAll$1;
227
+ } : function (argument) {
228
+ return typeof argument == 'function';
229
+ };
230
+
231
+ var global$8 = global$b;
232
+ var isCallable$e = isCallable$f;
233
+
234
+ var aFunction = function (argument) {
235
+ return isCallable$e(argument) ? argument : undefined;
236
+ };
237
+
238
+ var getBuiltIn$4 = function (namespace, method) {
239
+ return arguments.length < 2 ? aFunction(global$8[namespace]) : global$8[namespace] && global$8[namespace][method];
240
+ };
241
+
242
+ var getBuiltIn$3 = getBuiltIn$4;
243
+
244
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
245
+
246
+ var global$7 = global$b;
247
+ var userAgent = engineUserAgent;
248
+
249
+ var process = global$7.process;
250
+ var Deno = global$7.Deno;
251
+ var versions = process && process.versions || Deno && Deno.version;
252
+ var v8 = versions && versions.v8;
253
+ var match, version;
254
+
255
+ if (v8) {
256
+ match = v8.split('.');
257
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
258
+ // but their correct versions are not interesting for us
259
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
260
+ }
261
+
262
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
263
+ // so check `userAgent` even if `.v8` exists, but 0
264
+ if (!version && userAgent) {
265
+ match = userAgent.match(/Edge\/(\d+)/);
266
+ if (!match || match[1] >= 74) {
267
+ match = userAgent.match(/Chrome\/(\d+)/);
268
+ if (match) version = +match[1];
269
+ }
270
+ }
271
+
272
+ var engineV8Version = version;
273
+
274
+ /* eslint-disable es/no-symbol -- required for testing */
275
+
276
+ var V8_VERSION = engineV8Version;
277
+ var fails$7 = fails$a;
278
+
279
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
280
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
281
+ var symbol = Symbol();
282
+ // Chrome 38 Symbol has incorrect toString conversion
283
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
284
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
285
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
286
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
287
+ });
288
+
289
+ /* eslint-disable es/no-symbol -- required for testing */
290
+
291
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
292
+
293
+ var useSymbolAsUid = NATIVE_SYMBOL$1
294
+ && !Symbol.sham
295
+ && typeof Symbol.iterator == 'symbol';
296
+
297
+ var global$6 = global$b;
298
+ var shared$2 = shared$3.exports;
299
+ var hasOwn$8 = hasOwnProperty_1;
300
+ var uid$1 = uid$2;
301
+ var NATIVE_SYMBOL = symbolConstructorDetection;
302
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
303
+
304
+ var WellKnownSymbolsStore = shared$2('wks');
305
+ var Symbol$1 = global$6.Symbol;
306
+ var symbolFor = Symbol$1 && Symbol$1['for'];
307
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
308
+
309
+ var wellKnownSymbol$a = function (name) {
310
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
311
+ var description = 'Symbol.' + name;
312
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
313
+ WellKnownSymbolsStore[name] = Symbol$1[name];
314
+ } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
315
+ WellKnownSymbolsStore[name] = symbolFor(description);
316
+ } else {
317
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
318
+ }
319
+ } return WellKnownSymbolsStore[name];
320
+ };
321
+
322
+ var isCallable$d = isCallable$f;
323
+ var $documentAll = documentAll_1;
324
+
325
+ var documentAll = $documentAll.all;
326
+
327
+ var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
328
+ return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
329
+ } : function (it) {
330
+ return typeof it == 'object' ? it !== null : isCallable$d(it);
331
+ };
332
+
333
+ var isObject$5 = isObject$6;
334
+
335
+ var $String$2 = String;
336
+ var $TypeError$7 = TypeError;
337
+
338
+ // `Assert: Type(argument) is Object`
339
+ var anObject$8 = function (argument) {
340
+ if (isObject$5(argument)) return argument;
341
+ throw $TypeError$7($String$2(argument) + ' is not an object');
342
+ };
343
+
344
+ var objectDefineProperties = {};
345
+
346
+ var fails$6 = fails$a;
347
+
348
+ // Detect IE8's incomplete defineProperty implementation
349
+ var descriptors = !fails$6(function () {
350
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
351
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
352
+ });
353
+
354
+ var DESCRIPTORS$8 = descriptors;
355
+ var fails$5 = fails$a;
356
+
357
+ // V8 ~ Chrome 36-
358
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
359
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$5(function () {
360
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
361
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
362
+ value: 42,
363
+ writable: false
364
+ }).prototype != 42;
365
+ });
366
+
367
+ var objectDefineProperty = {};
368
+
369
+ var global$5 = global$b;
370
+ var isObject$4 = isObject$6;
371
+
372
+ var document$1 = global$5.document;
373
+ // typeof document.createElement is 'object' in old IE
374
+ var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
375
+
376
+ var documentCreateElement$2 = function (it) {
377
+ return EXISTS$1 ? document$1.createElement(it) : {};
378
+ };
379
+
380
+ var DESCRIPTORS$7 = descriptors;
381
+ var fails$4 = fails$a;
382
+ var createElement = documentCreateElement$2;
383
+
384
+ // Thanks to IE8 for its funny defineProperty
385
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
386
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
387
+ return Object.defineProperty(createElement('div'), 'a', {
388
+ get: function () { return 7; }
389
+ }).a != 7;
390
+ });
391
+
392
+ var NATIVE_BIND$1 = functionBindNative;
393
+
394
+ var call$7 = Function.prototype.call;
395
+
396
+ var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
397
+ return call$7.apply(call$7, arguments);
398
+ };
399
+
400
+ var uncurryThis$6 = functionUncurryThis;
401
+
402
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
403
+
404
+ var getBuiltIn$2 = getBuiltIn$4;
405
+ var isCallable$c = isCallable$f;
406
+ var isPrototypeOf$1 = objectIsPrototypeOf;
407
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
408
+
409
+ var $Object$2 = Object;
410
+
411
+ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
412
+ return typeof it == 'symbol';
413
+ } : function (it) {
414
+ var $Symbol = getBuiltIn$2('Symbol');
415
+ return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
416
+ };
417
+
418
+ var $String$1 = String;
419
+
420
+ var tryToString$3 = function (argument) {
421
+ try {
422
+ return $String$1(argument);
423
+ } catch (error) {
424
+ return 'Object';
425
+ }
426
+ };
427
+
428
+ var isCallable$b = isCallable$f;
429
+ var tryToString$2 = tryToString$3;
430
+
431
+ var $TypeError$6 = TypeError;
432
+
433
+ // `Assert: IsCallable(argument) is true`
434
+ var aCallable$3 = function (argument) {
435
+ if (isCallable$b(argument)) return argument;
436
+ throw $TypeError$6(tryToString$2(argument) + ' is not a function');
437
+ };
438
+
439
+ var aCallable$2 = aCallable$3;
440
+ var isNullOrUndefined$1 = isNullOrUndefined$3;
441
+
442
+ // `GetMethod` abstract operation
443
+ // https://tc39.es/ecma262/#sec-getmethod
444
+ var getMethod$3 = function (V, P) {
445
+ var func = V[P];
446
+ return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
447
+ };
448
+
449
+ var call$6 = functionCall;
450
+ var isCallable$a = isCallable$f;
451
+ var isObject$3 = isObject$6;
452
+
453
+ var $TypeError$5 = TypeError;
454
+
455
+ // `OrdinaryToPrimitive` abstract operation
456
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
457
+ var ordinaryToPrimitive$1 = function (input, pref) {
458
+ var fn, val;
459
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$3(val = call$6(fn, input))) return val;
460
+ if (isCallable$a(fn = input.valueOf) && !isObject$3(val = call$6(fn, input))) return val;
461
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$3(val = call$6(fn, input))) return val;
462
+ throw $TypeError$5("Can't convert object to primitive value");
463
+ };
464
+
465
+ var call$5 = functionCall;
466
+ var isObject$2 = isObject$6;
467
+ var isSymbol$1 = isSymbol$2;
468
+ var getMethod$2 = getMethod$3;
469
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
470
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
471
+
472
+ var $TypeError$4 = TypeError;
473
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
474
+
475
+ // `ToPrimitive` abstract operation
476
+ // https://tc39.es/ecma262/#sec-toprimitive
477
+ var toPrimitive$1 = function (input, pref) {
478
+ if (!isObject$2(input) || isSymbol$1(input)) return input;
479
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
480
+ var result;
481
+ if (exoticToPrim) {
482
+ if (pref === undefined) pref = 'default';
483
+ result = call$5(exoticToPrim, input, pref);
484
+ if (!isObject$2(result) || isSymbol$1(result)) return result;
485
+ throw $TypeError$4("Can't convert object to primitive value");
486
+ }
487
+ if (pref === undefined) pref = 'number';
488
+ return ordinaryToPrimitive(input, pref);
489
+ };
490
+
491
+ var toPrimitive = toPrimitive$1;
492
+ var isSymbol = isSymbol$2;
493
+
494
+ // `ToPropertyKey` abstract operation
495
+ // https://tc39.es/ecma262/#sec-topropertykey
496
+ var toPropertyKey$3 = function (argument) {
497
+ var key = toPrimitive(argument, 'string');
498
+ return isSymbol(key) ? key : key + '';
499
+ };
500
+
501
+ var DESCRIPTORS$6 = descriptors;
502
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
503
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
504
+ var anObject$7 = anObject$8;
505
+ var toPropertyKey$2 = toPropertyKey$3;
506
+
507
+ var $TypeError$3 = TypeError;
508
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
509
+ var $defineProperty = Object.defineProperty;
510
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
511
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
512
+ var ENUMERABLE = 'enumerable';
513
+ var CONFIGURABLE$1 = 'configurable';
514
+ var WRITABLE = 'writable';
515
+
516
+ // `Object.defineProperty` method
517
+ // https://tc39.es/ecma262/#sec-object.defineproperty
518
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
519
+ anObject$7(O);
520
+ P = toPropertyKey$2(P);
521
+ anObject$7(Attributes);
522
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
523
+ var current = $getOwnPropertyDescriptor$1(O, P);
524
+ if (current && current[WRITABLE]) {
525
+ O[P] = Attributes.value;
526
+ Attributes = {
527
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
528
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
529
+ writable: false
530
+ };
531
+ }
532
+ } return $defineProperty(O, P, Attributes);
533
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
534
+ anObject$7(O);
535
+ P = toPropertyKey$2(P);
536
+ anObject$7(Attributes);
537
+ if (IE8_DOM_DEFINE$1) try {
538
+ return $defineProperty(O, P, Attributes);
539
+ } catch (error) { /* empty */ }
540
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$3('Accessors not supported');
541
+ if ('value' in Attributes) O[P] = Attributes.value;
542
+ return O;
543
+ };
544
+
545
+ var ceil = Math.ceil;
546
+ var floor = Math.floor;
547
+
548
+ // `Math.trunc` method
549
+ // https://tc39.es/ecma262/#sec-math.trunc
550
+ // eslint-disable-next-line es/no-math-trunc -- safe
551
+ var mathTrunc = Math.trunc || function trunc(x) {
552
+ var n = +x;
553
+ return (n > 0 ? floor : ceil)(n);
554
+ };
555
+
556
+ var trunc = mathTrunc;
557
+
558
+ // `ToIntegerOrInfinity` abstract operation
559
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
560
+ var toIntegerOrInfinity$2 = function (argument) {
561
+ var number = +argument;
562
+ // eslint-disable-next-line no-self-compare -- NaN check
563
+ return number !== number || number === 0 ? 0 : trunc(number);
564
+ };
565
+
566
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
567
+
568
+ var max = Math.max;
569
+ var min$1 = Math.min;
570
+
571
+ // Helper for a popular repeating case of the spec:
572
+ // Let integer be ? ToInteger(index).
573
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
574
+ var toAbsoluteIndex$1 = function (index, length) {
575
+ var integer = toIntegerOrInfinity$1(index);
576
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
577
+ };
578
+
579
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
580
+
581
+ var min = Math.min;
582
+
583
+ // `ToLength` abstract operation
584
+ // https://tc39.es/ecma262/#sec-tolength
585
+ var toLength$1 = function (argument) {
586
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
587
+ };
588
+
589
+ var toLength = toLength$1;
590
+
591
+ // `LengthOfArrayLike` abstract operation
592
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
593
+ var lengthOfArrayLike$2 = function (obj) {
594
+ return toLength(obj.length);
595
+ };
596
+
597
+ var toIndexedObject$4 = toIndexedObject$5;
598
+ var toAbsoluteIndex = toAbsoluteIndex$1;
599
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
600
+
601
+ // `Array.prototype.{ indexOf, includes }` methods implementation
602
+ var createMethod = function (IS_INCLUDES) {
603
+ return function ($this, el, fromIndex) {
604
+ var O = toIndexedObject$4($this);
605
+ var length = lengthOfArrayLike$1(O);
606
+ var index = toAbsoluteIndex(fromIndex, length);
607
+ var value;
608
+ // Array#includes uses SameValueZero equality algorithm
609
+ // eslint-disable-next-line no-self-compare -- NaN check
610
+ if (IS_INCLUDES && el != el) while (length > index) {
611
+ value = O[index++];
612
+ // eslint-disable-next-line no-self-compare -- NaN check
613
+ if (value != value) return true;
614
+ // Array#indexOf ignores holes, Array#includes - not
615
+ } else for (;length > index; index++) {
616
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
617
+ } return !IS_INCLUDES && -1;
618
+ };
619
+ };
620
+
621
+ var arrayIncludes = {
622
+ // `Array.prototype.includes` method
623
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
624
+ includes: createMethod(true),
625
+ // `Array.prototype.indexOf` method
626
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
627
+ indexOf: createMethod(false)
628
+ };
629
+
630
+ var hiddenKeys$4 = {};
631
+
632
+ var uncurryThis$5 = functionUncurryThis;
633
+ var hasOwn$7 = hasOwnProperty_1;
634
+ var toIndexedObject$3 = toIndexedObject$5;
635
+ var indexOf = arrayIncludes.indexOf;
636
+ var hiddenKeys$3 = hiddenKeys$4;
637
+
638
+ var push = uncurryThis$5([].push);
639
+
640
+ var objectKeysInternal = function (object, names) {
641
+ var O = toIndexedObject$3(object);
642
+ var i = 0;
643
+ var result = [];
644
+ var key;
645
+ for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
646
+ // Don't enum bug & hidden keys
647
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
648
+ ~indexOf(result, key) || push(result, key);
649
+ }
650
+ return result;
651
+ };
652
+
653
+ // IE8- don't enum bug keys
654
+ var enumBugKeys$3 = [
655
+ 'constructor',
656
+ 'hasOwnProperty',
657
+ 'isPrototypeOf',
658
+ 'propertyIsEnumerable',
659
+ 'toLocaleString',
660
+ 'toString',
661
+ 'valueOf'
662
+ ];
663
+
664
+ var internalObjectKeys$1 = objectKeysInternal;
665
+ var enumBugKeys$2 = enumBugKeys$3;
666
+
667
+ // `Object.keys` method
668
+ // https://tc39.es/ecma262/#sec-object.keys
669
+ // eslint-disable-next-line es/no-object-keys -- safe
670
+ var objectKeys$1 = Object.keys || function keys(O) {
671
+ return internalObjectKeys$1(O, enumBugKeys$2);
672
+ };
673
+
674
+ var DESCRIPTORS$5 = descriptors;
675
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
676
+ var definePropertyModule$4 = objectDefineProperty;
677
+ var anObject$6 = anObject$8;
678
+ var toIndexedObject$2 = toIndexedObject$5;
679
+ var objectKeys = objectKeys$1;
680
+
681
+ // `Object.defineProperties` method
682
+ // https://tc39.es/ecma262/#sec-object.defineproperties
683
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
684
+ objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
685
+ anObject$6(O);
686
+ var props = toIndexedObject$2(Properties);
687
+ var keys = objectKeys(Properties);
688
+ var length = keys.length;
689
+ var index = 0;
690
+ var key;
691
+ while (length > index) definePropertyModule$4.f(O, key = keys[index++], props[key]);
692
+ return O;
693
+ };
694
+
695
+ var getBuiltIn$1 = getBuiltIn$4;
696
+
697
+ var html$1 = getBuiltIn$1('document', 'documentElement');
698
+
699
+ var shared$1 = shared$3.exports;
700
+ var uid = uid$2;
701
+
702
+ var keys = shared$1('keys');
703
+
704
+ var sharedKey$3 = function (key) {
705
+ return keys[key] || (keys[key] = uid(key));
706
+ };
707
+
708
+ /* global ActiveXObject -- old IE, WSH */
709
+
710
+ var anObject$5 = anObject$8;
711
+ var definePropertiesModule = objectDefineProperties;
712
+ var enumBugKeys$1 = enumBugKeys$3;
713
+ var hiddenKeys$2 = hiddenKeys$4;
714
+ var html = html$1;
715
+ var documentCreateElement$1 = documentCreateElement$2;
716
+ var sharedKey$2 = sharedKey$3;
717
+
718
+ var GT = '>';
719
+ var LT = '<';
720
+ var PROTOTYPE = 'prototype';
721
+ var SCRIPT = 'script';
722
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
723
+
724
+ var EmptyConstructor = function () { /* empty */ };
725
+
726
+ var scriptTag = function (content) {
727
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
728
+ };
729
+
730
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
731
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
732
+ activeXDocument.write(scriptTag(''));
733
+ activeXDocument.close();
734
+ var temp = activeXDocument.parentWindow.Object;
735
+ activeXDocument = null; // avoid memory leak
736
+ return temp;
737
+ };
738
+
739
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
740
+ var NullProtoObjectViaIFrame = function () {
741
+ // Thrash, waste and sodomy: IE GC bug
742
+ var iframe = documentCreateElement$1('iframe');
743
+ var JS = 'java' + SCRIPT + ':';
744
+ var iframeDocument;
745
+ iframe.style.display = 'none';
746
+ html.appendChild(iframe);
747
+ // https://github.com/zloirock/core-js/issues/475
748
+ iframe.src = String(JS);
749
+ iframeDocument = iframe.contentWindow.document;
750
+ iframeDocument.open();
751
+ iframeDocument.write(scriptTag('document.F=Object'));
752
+ iframeDocument.close();
753
+ return iframeDocument.F;
754
+ };
755
+
756
+ // Check for document.domain and active x support
757
+ // No need to use active x approach when document.domain is not set
758
+ // see https://github.com/es-shims/es5-shim/issues/150
759
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
760
+ // avoid IE GC bug
761
+ var activeXDocument;
762
+ var NullProtoObject = function () {
763
+ try {
764
+ activeXDocument = new ActiveXObject('htmlfile');
765
+ } catch (error) { /* ignore */ }
766
+ NullProtoObject = typeof document != 'undefined'
767
+ ? document.domain && activeXDocument
768
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
769
+ : NullProtoObjectViaIFrame()
770
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
771
+ var length = enumBugKeys$1.length;
772
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
773
+ return NullProtoObject();
774
+ };
775
+
776
+ hiddenKeys$2[IE_PROTO$1] = true;
777
+
778
+ // `Object.create` method
779
+ // https://tc39.es/ecma262/#sec-object.create
780
+ // eslint-disable-next-line es/no-object-create -- safe
781
+ var objectCreate = Object.create || function create(O, Properties) {
782
+ var result;
783
+ if (O !== null) {
784
+ EmptyConstructor[PROTOTYPE] = anObject$5(O);
785
+ result = new EmptyConstructor();
786
+ EmptyConstructor[PROTOTYPE] = null;
787
+ // add "__proto__" for Object.getPrototypeOf polyfill
788
+ result[IE_PROTO$1] = O;
789
+ } else result = NullProtoObject();
790
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
791
+ };
792
+
793
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
794
+ var create$1 = objectCreate;
795
+ var defineProperty$3 = objectDefineProperty.f;
796
+
797
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
798
+ var ArrayPrototype$1 = Array.prototype;
799
+
800
+ // Array.prototype[@@unscopables]
801
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
802
+ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
803
+ defineProperty$3(ArrayPrototype$1, UNSCOPABLES, {
804
+ configurable: true,
805
+ value: create$1(null)
806
+ });
807
+ }
808
+
809
+ // add a key to Array.prototype[@@unscopables]
810
+ var addToUnscopables$1 = function (key) {
811
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
812
+ };
813
+
814
+ var iterators = {};
815
+
816
+ var global$4 = global$b;
817
+ var isCallable$9 = isCallable$f;
818
+
819
+ var WeakMap$1 = global$4.WeakMap;
820
+
821
+ var weakMapBasicDetection = isCallable$9(WeakMap$1) && /native code/.test(String(WeakMap$1));
822
+
823
+ var createPropertyDescriptor$4 = function (bitmap, value) {
824
+ return {
825
+ enumerable: !(bitmap & 1),
826
+ configurable: !(bitmap & 2),
827
+ writable: !(bitmap & 4),
828
+ value: value
829
+ };
830
+ };
831
+
832
+ var DESCRIPTORS$4 = descriptors;
833
+ var definePropertyModule$3 = objectDefineProperty;
834
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
835
+
836
+ var createNonEnumerableProperty$4 = DESCRIPTORS$4 ? function (object, key, value) {
837
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$3(1, value));
838
+ } : function (object, key, value) {
839
+ object[key] = value;
840
+ return object;
841
+ };
842
+
843
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
844
+ var global$3 = global$b;
845
+ var isObject$1 = isObject$6;
846
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
847
+ var hasOwn$6 = hasOwnProperty_1;
848
+ var shared = sharedStore;
849
+ var sharedKey$1 = sharedKey$3;
850
+ var hiddenKeys$1 = hiddenKeys$4;
851
+
852
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
853
+ var TypeError$1 = global$3.TypeError;
854
+ var WeakMap = global$3.WeakMap;
855
+ var set, get, has;
856
+
857
+ var enforce = function (it) {
858
+ return has(it) ? get(it) : set(it, {});
859
+ };
860
+
861
+ var getterFor = function (TYPE) {
862
+ return function (it) {
863
+ var state;
864
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
865
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
866
+ } return state;
867
+ };
868
+ };
869
+
870
+ if (NATIVE_WEAK_MAP || shared.state) {
871
+ var store$1 = shared.state || (shared.state = new WeakMap());
872
+ /* eslint-disable no-self-assign -- prototype methods protection */
873
+ store$1.get = store$1.get;
874
+ store$1.has = store$1.has;
875
+ store$1.set = store$1.set;
876
+ /* eslint-enable no-self-assign -- prototype methods protection */
877
+ set = function (it, metadata) {
878
+ if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
879
+ metadata.facade = it;
880
+ store$1.set(it, metadata);
881
+ return metadata;
882
+ };
883
+ get = function (it) {
884
+ return store$1.get(it) || {};
885
+ };
886
+ has = function (it) {
887
+ return store$1.has(it);
888
+ };
889
+ } else {
890
+ var STATE = sharedKey$1('state');
891
+ hiddenKeys$1[STATE] = true;
892
+ set = function (it, metadata) {
893
+ if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
894
+ metadata.facade = it;
895
+ createNonEnumerableProperty$3(it, STATE, metadata);
896
+ return metadata;
897
+ };
898
+ get = function (it) {
899
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
900
+ };
901
+ has = function (it) {
902
+ return hasOwn$6(it, STATE);
903
+ };
904
+ }
905
+
906
+ var internalState = {
907
+ set: set,
908
+ get: get,
909
+ has: has,
910
+ enforce: enforce,
911
+ getterFor: getterFor
912
+ };
913
+
914
+ var objectGetOwnPropertyDescriptor = {};
915
+
916
+ var objectPropertyIsEnumerable = {};
917
+
918
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
919
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
920
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
921
+
922
+ // Nashorn ~ JDK8 bug
923
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
924
+
925
+ // `Object.prototype.propertyIsEnumerable` method implementation
926
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
927
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
928
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
929
+ return !!descriptor && descriptor.enumerable;
930
+ } : $propertyIsEnumerable;
931
+
932
+ var DESCRIPTORS$3 = descriptors;
933
+ var call$4 = functionCall;
934
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
935
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
936
+ var toIndexedObject$1 = toIndexedObject$5;
937
+ var toPropertyKey$1 = toPropertyKey$3;
938
+ var hasOwn$5 = hasOwnProperty_1;
939
+ var IE8_DOM_DEFINE = ie8DomDefine;
940
+
941
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
942
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
943
+
944
+ // `Object.getOwnPropertyDescriptor` method
945
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
946
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
947
+ O = toIndexedObject$1(O);
948
+ P = toPropertyKey$1(P);
949
+ if (IE8_DOM_DEFINE) try {
950
+ return $getOwnPropertyDescriptor(O, P);
951
+ } catch (error) { /* empty */ }
952
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$4(propertyIsEnumerableModule.f, O, P), O[P]);
953
+ };
954
+
955
+ var makeBuiltIn$2 = {exports: {}};
956
+
957
+ var DESCRIPTORS$2 = descriptors;
958
+ var hasOwn$4 = hasOwnProperty_1;
959
+
960
+ var FunctionPrototype = Function.prototype;
961
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
962
+ var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
963
+
964
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
965
+ // additional protection from minified / mangled / dropped function names
966
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
967
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
968
+
969
+ var functionName = {
970
+ EXISTS: EXISTS,
971
+ PROPER: PROPER,
972
+ CONFIGURABLE: CONFIGURABLE
973
+ };
974
+
975
+ var uncurryThis$4 = functionUncurryThis;
976
+ var isCallable$8 = isCallable$f;
977
+ var store = sharedStore;
978
+
979
+ var functionToString = uncurryThis$4(Function.toString);
980
+
981
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
982
+ if (!isCallable$8(store.inspectSource)) {
983
+ store.inspectSource = function (it) {
984
+ return functionToString(it);
985
+ };
986
+ }
987
+
988
+ var inspectSource$1 = store.inspectSource;
989
+
990
+ var fails$3 = fails$a;
991
+ var isCallable$7 = isCallable$f;
992
+ var hasOwn$3 = hasOwnProperty_1;
993
+ var DESCRIPTORS$1 = descriptors;
994
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
995
+ var inspectSource = inspectSource$1;
996
+ var InternalStateModule$1 = internalState;
997
+
998
+ var enforceInternalState = InternalStateModule$1.enforce;
999
+ var getInternalState$1 = InternalStateModule$1.get;
1000
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
1001
+ var defineProperty$2 = Object.defineProperty;
1002
+
1003
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$3(function () {
1004
+ return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1005
+ });
1006
+
1007
+ var TEMPLATE = String(String).split('String');
1008
+
1009
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
1010
+ if (String(name).slice(0, 7) === 'Symbol(') {
1011
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
1012
+ }
1013
+ if (options && options.getter) name = 'get ' + name;
1014
+ if (options && options.setter) name = 'set ' + name;
1015
+ if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1016
+ if (DESCRIPTORS$1) defineProperty$2(value, 'name', { value: name, configurable: true });
1017
+ else value.name = name;
1018
+ }
1019
+ if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
1020
+ defineProperty$2(value, 'length', { value: options.arity });
1021
+ }
1022
+ try {
1023
+ if (options && hasOwn$3(options, 'constructor') && options.constructor) {
1024
+ if (DESCRIPTORS$1) defineProperty$2(value, 'prototype', { writable: false });
1025
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1026
+ } else if (value.prototype) value.prototype = undefined;
1027
+ } catch (error) { /* empty */ }
1028
+ var state = enforceInternalState(value);
1029
+ if (!hasOwn$3(state, 'source')) {
1030
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
1031
+ } return value;
1032
+ };
1033
+
1034
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1035
+ // eslint-disable-next-line no-extend-native -- required
1036
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
1037
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
1038
+ }, 'toString');
1039
+
1040
+ var isCallable$6 = isCallable$f;
1041
+ var definePropertyModule$2 = objectDefineProperty;
1042
+ var makeBuiltIn = makeBuiltIn$2.exports;
1043
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
1044
+
1045
+ var defineBuiltIn$3 = function (O, key, value, options) {
1046
+ if (!options) options = {};
1047
+ var simple = options.enumerable;
1048
+ var name = options.name !== undefined ? options.name : key;
1049
+ if (isCallable$6(value)) makeBuiltIn(value, name, options);
1050
+ if (options.global) {
1051
+ if (simple) O[key] = value;
1052
+ else defineGlobalProperty$1(key, value);
1053
+ } else {
1054
+ try {
1055
+ if (!options.unsafe) delete O[key];
1056
+ else if (O[key]) simple = true;
1057
+ } catch (error) { /* empty */ }
1058
+ if (simple) O[key] = value;
1059
+ else definePropertyModule$2.f(O, key, {
1060
+ value: value,
1061
+ enumerable: false,
1062
+ configurable: !options.nonConfigurable,
1063
+ writable: !options.nonWritable
1064
+ });
1065
+ } return O;
1066
+ };
1067
+
1068
+ var objectGetOwnPropertyNames = {};
1069
+
1070
+ var internalObjectKeys = objectKeysInternal;
1071
+ var enumBugKeys = enumBugKeys$3;
1072
+
1073
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1074
+
1075
+ // `Object.getOwnPropertyNames` method
1076
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1077
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1078
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1079
+ return internalObjectKeys(O, hiddenKeys);
1080
+ };
1081
+
1082
+ var objectGetOwnPropertySymbols = {};
1083
+
1084
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1085
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1086
+
1087
+ var getBuiltIn = getBuiltIn$4;
1088
+ var uncurryThis$3 = functionUncurryThis;
1089
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1090
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1091
+ var anObject$4 = anObject$8;
1092
+
1093
+ var concat = uncurryThis$3([].concat);
1094
+
1095
+ // all object keys, includes non-enumerable and symbols
1096
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1097
+ var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1098
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1099
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1100
+ };
1101
+
1102
+ var hasOwn$2 = hasOwnProperty_1;
1103
+ var ownKeys = ownKeys$1;
1104
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1105
+ var definePropertyModule$1 = objectDefineProperty;
1106
+
1107
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1108
+ var keys = ownKeys(source);
1109
+ var defineProperty = definePropertyModule$1.f;
1110
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1111
+ for (var i = 0; i < keys.length; i++) {
1112
+ var key = keys[i];
1113
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1114
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1115
+ }
1116
+ }
1117
+ };
1118
+
1119
+ var fails$2 = fails$a;
1120
+ var isCallable$5 = isCallable$f;
1121
+
1122
+ var replacement = /#|\.prototype\./;
1123
+
1124
+ var isForced$1 = function (feature, detection) {
1125
+ var value = data[normalize(feature)];
1126
+ return value == POLYFILL ? true
1127
+ : value == NATIVE ? false
1128
+ : isCallable$5(detection) ? fails$2(detection)
1129
+ : !!detection;
1130
+ };
1131
+
1132
+ var normalize = isForced$1.normalize = function (string) {
1133
+ return String(string).replace(replacement, '.').toLowerCase();
1134
+ };
1135
+
1136
+ var data = isForced$1.data = {};
1137
+ var NATIVE = isForced$1.NATIVE = 'N';
1138
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1139
+
1140
+ var isForced_1 = isForced$1;
1141
+
1142
+ var global$2 = global$b;
1143
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1144
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1145
+ var defineBuiltIn$2 = defineBuiltIn$3;
1146
+ var defineGlobalProperty = defineGlobalProperty$3;
1147
+ var copyConstructorProperties = copyConstructorProperties$1;
1148
+ var isForced = isForced_1;
1149
+
1150
+ /*
1151
+ options.target - name of the target object
1152
+ options.global - target is the global object
1153
+ options.stat - export as static methods of target
1154
+ options.proto - export as prototype methods of target
1155
+ options.real - real prototype method for the `pure` version
1156
+ options.forced - export even if the native feature is available
1157
+ options.bind - bind methods to the target, required for the `pure` version
1158
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1159
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1160
+ options.sham - add a flag to not completely full polyfills
1161
+ options.enumerable - export as enumerable property
1162
+ options.dontCallGetSet - prevent calling a getter on target
1163
+ options.name - the .name of the function if it does not match the key
1164
+ */
1165
+ var _export = function (options, source) {
1166
+ var TARGET = options.target;
1167
+ var GLOBAL = options.global;
1168
+ var STATIC = options.stat;
1169
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1170
+ if (GLOBAL) {
1171
+ target = global$2;
1172
+ } else if (STATIC) {
1173
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1174
+ } else {
1175
+ target = (global$2[TARGET] || {}).prototype;
1176
+ }
1177
+ if (target) for (key in source) {
1178
+ sourceProperty = source[key];
1179
+ if (options.dontCallGetSet) {
1180
+ descriptor = getOwnPropertyDescriptor(target, key);
1181
+ targetProperty = descriptor && descriptor.value;
1182
+ } else targetProperty = target[key];
1183
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1184
+ // contained in target
1185
+ if (!FORCED && targetProperty !== undefined) {
1186
+ if (typeof sourceProperty == typeof targetProperty) continue;
1187
+ copyConstructorProperties(sourceProperty, targetProperty);
1188
+ }
1189
+ // add a flag to not completely full polyfills
1190
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1191
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1192
+ }
1193
+ defineBuiltIn$2(target, key, sourceProperty, options);
1194
+ }
1195
+ };
1196
+
1197
+ var fails$1 = fails$a;
1198
+
1199
+ var correctPrototypeGetter = !fails$1(function () {
1200
+ function F() { /* empty */ }
1201
+ F.prototype.constructor = null;
1202
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1203
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1204
+ });
1205
+
1206
+ var hasOwn$1 = hasOwnProperty_1;
1207
+ var isCallable$4 = isCallable$f;
1208
+ var toObject = toObject$2;
1209
+ var sharedKey = sharedKey$3;
1210
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1211
+
1212
+ var IE_PROTO = sharedKey('IE_PROTO');
1213
+ var $Object$1 = Object;
1214
+ var ObjectPrototype = $Object$1.prototype;
1215
+
1216
+ // `Object.getPrototypeOf` method
1217
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1218
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1219
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1220
+ var object = toObject(O);
1221
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1222
+ var constructor = object.constructor;
1223
+ if (isCallable$4(constructor) && object instanceof constructor) {
1224
+ return constructor.prototype;
1225
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1226
+ };
1227
+
1228
+ var fails = fails$a;
1229
+ var isCallable$3 = isCallable$f;
1230
+ var isObject = isObject$6;
1231
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1232
+ var defineBuiltIn$1 = defineBuiltIn$3;
1233
+ var wellKnownSymbol$7 = wellKnownSymbol$a;
1234
+
1235
+ var ITERATOR$4 = wellKnownSymbol$7('iterator');
1236
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1237
+
1238
+ // `%IteratorPrototype%` object
1239
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1240
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1241
+
1242
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1243
+ if ([].keys) {
1244
+ arrayIterator = [].keys();
1245
+ // Safari 8 has buggy iterators w/o `next`
1246
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1247
+ else {
1248
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1249
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1250
+ }
1251
+ }
1252
+
1253
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails(function () {
1254
+ var test = {};
1255
+ // FF44- legacy iterators case
1256
+ return IteratorPrototype$2[ITERATOR$4].call(test) !== test;
1257
+ });
1258
+
1259
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1260
+
1261
+ // `%IteratorPrototype%[@@iterator]()` method
1262
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1263
+ if (!isCallable$3(IteratorPrototype$2[ITERATOR$4])) {
1264
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$4, function () {
1265
+ return this;
1266
+ });
1267
+ }
1268
+
1269
+ var iteratorsCore = {
1270
+ IteratorPrototype: IteratorPrototype$2,
1271
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1272
+ };
1273
+
1274
+ var defineProperty$1 = objectDefineProperty.f;
1275
+ var hasOwn = hasOwnProperty_1;
1276
+ var wellKnownSymbol$6 = wellKnownSymbol$a;
1277
+
1278
+ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
1279
+
1280
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1281
+ if (target && !STATIC) target = target.prototype;
1282
+ if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1283
+ defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1284
+ }
1285
+ };
1286
+
1287
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1288
+ var create = objectCreate;
1289
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1290
+ var setToStringTag$1 = setToStringTag$2;
1291
+ var Iterators$4 = iterators;
1292
+
1293
+ var returnThis$1 = function () { return this; };
1294
+
1295
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1296
+ var TO_STRING_TAG = NAME + ' Iterator';
1297
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1298
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1299
+ Iterators$4[TO_STRING_TAG] = returnThis$1;
1300
+ return IteratorConstructor;
1301
+ };
1302
+
1303
+ var isCallable$2 = isCallable$f;
1304
+
1305
+ var $String = String;
1306
+ var $TypeError$2 = TypeError;
1307
+
1308
+ var aPossiblePrototype$1 = function (argument) {
1309
+ if (typeof argument == 'object' || isCallable$2(argument)) return argument;
1310
+ throw $TypeError$2("Can't set " + $String(argument) + ' as a prototype');
1311
+ };
1312
+
1313
+ /* eslint-disable no-proto -- safe */
1314
+
1315
+ var uncurryThis$2 = functionUncurryThis;
1316
+ var anObject$3 = anObject$8;
1317
+ var aPossiblePrototype = aPossiblePrototype$1;
1318
+
1319
+ // `Object.setPrototypeOf` method
1320
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1321
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1322
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1323
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1324
+ var CORRECT_SETTER = false;
1325
+ var test = {};
1326
+ var setter;
1327
+ try {
1328
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1329
+ setter = uncurryThis$2(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1330
+ setter(test, []);
1331
+ CORRECT_SETTER = test instanceof Array;
1332
+ } catch (error) { /* empty */ }
1333
+ return function setPrototypeOf(O, proto) {
1334
+ anObject$3(O);
1335
+ aPossiblePrototype(proto);
1336
+ if (CORRECT_SETTER) setter(O, proto);
1337
+ else O.__proto__ = proto;
1338
+ return O;
1339
+ };
1340
+ }() : undefined);
1341
+
1342
+ var $$1 = _export;
1343
+ var call$3 = functionCall;
1344
+ var FunctionName = functionName;
1345
+ var isCallable$1 = isCallable$f;
1346
+ var createIteratorConstructor = iteratorCreateConstructor;
1347
+ var getPrototypeOf = objectGetPrototypeOf;
1348
+ var setPrototypeOf = objectSetPrototypeOf;
1349
+ var setToStringTag = setToStringTag$2;
1350
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1351
+ var defineBuiltIn = defineBuiltIn$3;
1352
+ var wellKnownSymbol$5 = wellKnownSymbol$a;
1353
+ var Iterators$3 = iterators;
1354
+ var IteratorsCore = iteratorsCore;
1355
+
1356
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1357
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1358
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1359
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1360
+ var ITERATOR$3 = wellKnownSymbol$5('iterator');
1361
+ var KEYS = 'keys';
1362
+ var VALUES = 'values';
1363
+ var ENTRIES = 'entries';
1364
+
1365
+ var returnThis = function () { return this; };
1366
+
1367
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1368
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1369
+
1370
+ var getIterationMethod = function (KIND) {
1371
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1372
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1373
+ switch (KIND) {
1374
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1375
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1376
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1377
+ } return function () { return new IteratorConstructor(this); };
1378
+ };
1379
+
1380
+ var TO_STRING_TAG = NAME + ' Iterator';
1381
+ var INCORRECT_VALUES_NAME = false;
1382
+ var IterablePrototype = Iterable.prototype;
1383
+ var nativeIterator = IterablePrototype[ITERATOR$3]
1384
+ || IterablePrototype['@@iterator']
1385
+ || DEFAULT && IterablePrototype[DEFAULT];
1386
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1387
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1388
+ var CurrentIteratorPrototype, methods, KEY;
1389
+
1390
+ // fix native
1391
+ if (anyNativeIterator) {
1392
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1393
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1394
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1395
+ if (setPrototypeOf) {
1396
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1397
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$3])) {
1398
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$3, returnThis);
1399
+ }
1400
+ }
1401
+ // Set @@toStringTag to native iterators
1402
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1403
+ }
1404
+ }
1405
+
1406
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1407
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1408
+ if (CONFIGURABLE_FUNCTION_NAME) {
1409
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1410
+ } else {
1411
+ INCORRECT_VALUES_NAME = true;
1412
+ defaultIterator = function values() { return call$3(nativeIterator, this); };
1413
+ }
1414
+ }
1415
+
1416
+ // export additional methods
1417
+ if (DEFAULT) {
1418
+ methods = {
1419
+ values: getIterationMethod(VALUES),
1420
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1421
+ entries: getIterationMethod(ENTRIES)
1422
+ };
1423
+ if (FORCED) for (KEY in methods) {
1424
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1425
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1426
+ }
1427
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1428
+ }
1429
+
1430
+ // define iterator
1431
+ if (IterablePrototype[ITERATOR$3] !== defaultIterator) {
1432
+ defineBuiltIn(IterablePrototype, ITERATOR$3, defaultIterator, { name: DEFAULT });
1433
+ }
1434
+ Iterators$3[NAME] = defaultIterator;
1435
+
1436
+ return methods;
1437
+ };
1438
+
1439
+ // `CreateIterResultObject` abstract operation
1440
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1441
+ var createIterResultObject$1 = function (value, done) {
1442
+ return { value: value, done: done };
1443
+ };
1444
+
1445
+ var toIndexedObject = toIndexedObject$5;
1446
+ var addToUnscopables = addToUnscopables$1;
1447
+ var Iterators$2 = iterators;
1448
+ var InternalStateModule = internalState;
1449
+ var defineProperty = objectDefineProperty.f;
1450
+ var defineIterator = iteratorDefine;
1451
+ var createIterResultObject = createIterResultObject$1;
1452
+ var DESCRIPTORS = descriptors;
1453
+
1454
+ var ARRAY_ITERATOR = 'Array Iterator';
1455
+ var setInternalState = InternalStateModule.set;
1456
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1457
+
1458
+ // `Array.prototype.entries` method
1459
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1460
+ // `Array.prototype.keys` method
1461
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1462
+ // `Array.prototype.values` method
1463
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1464
+ // `Array.prototype[@@iterator]` method
1465
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1466
+ // `CreateArrayIterator` internal method
1467
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1468
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1469
+ setInternalState(this, {
1470
+ type: ARRAY_ITERATOR,
1471
+ target: toIndexedObject(iterated), // target
1472
+ index: 0, // next index
1473
+ kind: kind // kind
1474
+ });
1475
+ // `%ArrayIteratorPrototype%.next` method
1476
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1477
+ }, function () {
1478
+ var state = getInternalState(this);
1479
+ var target = state.target;
1480
+ var kind = state.kind;
1481
+ var index = state.index++;
1482
+ if (!target || index >= target.length) {
1483
+ state.target = undefined;
1484
+ return createIterResultObject(undefined, true);
1485
+ }
1486
+ if (kind == 'keys') return createIterResultObject(index, false);
1487
+ if (kind == 'values') return createIterResultObject(target[index], false);
1488
+ return createIterResultObject([index, target[index]], false);
1489
+ }, 'values');
1490
+
1491
+ // argumentsList[@@iterator] is %ArrayProto_values%
1492
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1493
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1494
+ var values = Iterators$2.Arguments = Iterators$2.Array;
1495
+
1496
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1497
+ addToUnscopables('keys');
1498
+ addToUnscopables('values');
1499
+ addToUnscopables('entries');
1500
+
1501
+ // V8 ~ Chrome 45- bug
1502
+ if (DESCRIPTORS && values.name !== 'values') try {
1503
+ defineProperty(values, 'name', { value: 'values' });
1504
+ } catch (error) { /* empty */ }
1505
+
1506
+ var classofRaw$1 = classofRaw$2;
1507
+ var uncurryThis$1 = functionUncurryThis;
1508
+
1509
+ var functionUncurryThisClause = function (fn) {
1510
+ // Nashorn bug:
1511
+ // https://github.com/zloirock/core-js/issues/1128
1512
+ // https://github.com/zloirock/core-js/issues/1130
1513
+ if (classofRaw$1(fn) === 'Function') return uncurryThis$1(fn);
1514
+ };
1515
+
1516
+ var uncurryThis = functionUncurryThisClause;
1517
+ var aCallable$1 = aCallable$3;
1518
+ var NATIVE_BIND = functionBindNative;
1519
+
1520
+ var bind$1 = uncurryThis(uncurryThis.bind);
1521
+
1522
+ // optional / simple context binding
1523
+ var functionBindContext = function (fn, that) {
1524
+ aCallable$1(fn);
1525
+ return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1526
+ return fn.apply(that, arguments);
1527
+ };
1528
+ };
1529
+
1530
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1531
+ var Iterators$1 = iterators;
1532
+
1533
+ var ITERATOR$2 = wellKnownSymbol$4('iterator');
1534
+ var ArrayPrototype = Array.prototype;
1535
+
1536
+ // check on default Array iterator
1537
+ var isArrayIteratorMethod$1 = function (it) {
1538
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
1539
+ };
1540
+
1541
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1542
+
1543
+ var TO_STRING_TAG$2 = wellKnownSymbol$3('toStringTag');
1544
+ var test = {};
1545
+
1546
+ test[TO_STRING_TAG$2] = 'z';
1547
+
1548
+ var toStringTagSupport = String(test) === '[object z]';
1549
+
1550
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1551
+ var isCallable = isCallable$f;
1552
+ var classofRaw = classofRaw$2;
1553
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1554
+
1555
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1556
+ var $Object = Object;
1557
+
1558
+ // ES3 wrong here
1559
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1560
+
1561
+ // fallback for IE11 Script Access Denied error
1562
+ var tryGet = function (it, key) {
1563
+ try {
1564
+ return it[key];
1565
+ } catch (error) { /* empty */ }
1566
+ };
1567
+
1568
+ // getting tag from ES6+ `Object.prototype.toString`
1569
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1570
+ var O, tag, result;
1571
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1572
+ // @@toStringTag case
1573
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1574
+ // builtinTag case
1575
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1576
+ // ES3 arguments fallback
1577
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1578
+ };
1579
+
1580
+ var classof = classof$1;
1581
+ var getMethod$1 = getMethod$3;
1582
+ var isNullOrUndefined = isNullOrUndefined$3;
1583
+ var Iterators = iterators;
1584
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1585
+
1586
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1587
+
1588
+ var getIteratorMethod$2 = function (it) {
1589
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
1590
+ || getMethod$1(it, '@@iterator')
1591
+ || Iterators[classof(it)];
1592
+ };
1593
+
1594
+ var call$2 = functionCall;
1595
+ var aCallable = aCallable$3;
1596
+ var anObject$2 = anObject$8;
1597
+ var tryToString$1 = tryToString$3;
1598
+ var getIteratorMethod$1 = getIteratorMethod$2;
1599
+
1600
+ var $TypeError$1 = TypeError;
1601
+
1602
+ var getIterator$1 = function (argument, usingIterator) {
1603
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1604
+ if (aCallable(iteratorMethod)) return anObject$2(call$2(iteratorMethod, argument));
1605
+ throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
1606
+ };
1607
+
1608
+ var call$1 = functionCall;
1609
+ var anObject$1 = anObject$8;
1610
+ var getMethod = getMethod$3;
1611
+
1612
+ var iteratorClose$1 = function (iterator, kind, value) {
1613
+ var innerResult, innerError;
1614
+ anObject$1(iterator);
1615
+ try {
1616
+ innerResult = getMethod(iterator, 'return');
1617
+ if (!innerResult) {
1618
+ if (kind === 'throw') throw value;
1619
+ return value;
1620
+ }
1621
+ innerResult = call$1(innerResult, iterator);
1622
+ } catch (error) {
1623
+ innerError = true;
1624
+ innerResult = error;
1625
+ }
1626
+ if (kind === 'throw') throw value;
1627
+ if (innerError) throw innerResult;
1628
+ anObject$1(innerResult);
1629
+ return value;
1630
+ };
1631
+
1632
+ var bind = functionBindContext;
1633
+ var call = functionCall;
1634
+ var anObject = anObject$8;
1635
+ var tryToString = tryToString$3;
1636
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
1637
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1638
+ var isPrototypeOf = objectIsPrototypeOf;
1639
+ var getIterator = getIterator$1;
1640
+ var getIteratorMethod = getIteratorMethod$2;
1641
+ var iteratorClose = iteratorClose$1;
1642
+
1643
+ var $TypeError = TypeError;
1644
+
1645
+ var Result = function (stopped, result) {
1646
+ this.stopped = stopped;
1647
+ this.result = result;
1648
+ };
1649
+
1650
+ var ResultPrototype = Result.prototype;
1651
+
1652
+ var iterate$1 = function (iterable, unboundFunction, options) {
1653
+ var that = options && options.that;
1654
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1655
+ var IS_RECORD = !!(options && options.IS_RECORD);
1656
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1657
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
1658
+ var fn = bind(unboundFunction, that);
1659
+ var iterator, iterFn, index, length, result, next, step;
1660
+
1661
+ var stop = function (condition) {
1662
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1663
+ return new Result(true, condition);
1664
+ };
1665
+
1666
+ var callFn = function (value) {
1667
+ if (AS_ENTRIES) {
1668
+ anObject(value);
1669
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1670
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
1671
+ };
1672
+
1673
+ if (IS_RECORD) {
1674
+ iterator = iterable.iterator;
1675
+ } else if (IS_ITERATOR) {
1676
+ iterator = iterable;
1677
+ } else {
1678
+ iterFn = getIteratorMethod(iterable);
1679
+ if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
1680
+ // optimisation for array iterators
1681
+ if (isArrayIteratorMethod(iterFn)) {
1682
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1683
+ result = callFn(iterable[index]);
1684
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
1685
+ } return new Result(false);
1686
+ }
1687
+ iterator = getIterator(iterable, iterFn);
1688
+ }
1689
+
1690
+ next = IS_RECORD ? iterable.next : iterator.next;
1691
+ while (!(step = call(next, iterator)).done) {
1692
+ try {
1693
+ result = callFn(step.value);
1694
+ } catch (error) {
1695
+ iteratorClose(iterator, 'throw', error);
1696
+ }
1697
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
1698
+ } return new Result(false);
1699
+ };
1700
+
1701
+ var toPropertyKey = toPropertyKey$3;
1702
+ var definePropertyModule = objectDefineProperty;
1703
+ var createPropertyDescriptor = createPropertyDescriptor$4;
1704
+
1705
+ var createProperty$1 = function (object, key, value) {
1706
+ var propertyKey = toPropertyKey(key);
1707
+ if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1708
+ else object[propertyKey] = value;
1709
+ };
1710
+
1711
+ var $ = _export;
1712
+ var iterate = iterate$1;
1713
+ var createProperty = createProperty$1;
1714
+
1715
+ // `Object.fromEntries` method
1716
+ // https://github.com/tc39/proposal-object-from-entries
1717
+ $({ target: 'Object', stat: true }, {
1718
+ fromEntries: function fromEntries(iterable) {
1719
+ var obj = {};
1720
+ iterate(iterable, function (k, v) {
1721
+ createProperty(obj, k, v);
1722
+ }, { AS_ENTRIES: true });
1723
+ return obj;
1724
+ }
1725
+ });
1726
+
1727
+ // iterable DOM collections
1728
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1729
+ var domIterables = {
1730
+ CSSRuleList: 0,
1731
+ CSSStyleDeclaration: 0,
1732
+ CSSValueList: 0,
1733
+ ClientRectList: 0,
1734
+ DOMRectList: 0,
1735
+ DOMStringList: 0,
1736
+ DOMTokenList: 1,
1737
+ DataTransferItemList: 0,
1738
+ FileList: 0,
1739
+ HTMLAllCollection: 0,
1740
+ HTMLCollection: 0,
1741
+ HTMLFormElement: 0,
1742
+ HTMLSelectElement: 0,
1743
+ MediaList: 0,
1744
+ MimeTypeArray: 0,
1745
+ NamedNodeMap: 0,
1746
+ NodeList: 1,
1747
+ PaintRequestList: 0,
1748
+ Plugin: 0,
1749
+ PluginArray: 0,
1750
+ SVGLengthList: 0,
1751
+ SVGNumberList: 0,
1752
+ SVGPathSegList: 0,
1753
+ SVGPointList: 0,
1754
+ SVGStringList: 0,
1755
+ SVGTransformList: 0,
1756
+ SourceBufferList: 0,
1757
+ StyleSheetList: 0,
1758
+ TextTrackCueList: 0,
1759
+ TextTrackList: 0,
1760
+ TouchList: 0
1761
+ };
1762
+
1763
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1764
+ var documentCreateElement = documentCreateElement$2;
1765
+
1766
+ var classList = documentCreateElement('span').classList;
1767
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1768
+
1769
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1770
+
1771
+ var global$1 = global$b;
1772
+ var DOMIterables = domIterables;
1773
+ var DOMTokenListPrototype = domTokenListPrototype;
1774
+ var ArrayIteratorMethods = es_array_iterator;
1775
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1776
+ var wellKnownSymbol = wellKnownSymbol$a;
1777
+
1778
+ var ITERATOR = wellKnownSymbol('iterator');
1779
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1780
+ var ArrayValues = ArrayIteratorMethods.values;
1781
+
1782
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1783
+ if (CollectionPrototype) {
1784
+ // some Chrome versions have non-configurable methods on DOMTokenList
1785
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1786
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1787
+ } catch (error) {
1788
+ CollectionPrototype[ITERATOR] = ArrayValues;
1789
+ }
1790
+ if (!CollectionPrototype[TO_STRING_TAG]) {
1791
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
1792
+ }
1793
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1794
+ // some Chrome versions have non-configurable methods on DOMTokenList
1795
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1796
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1797
+ } catch (error) {
1798
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1799
+ }
1800
+ }
1801
+ }
1802
+ };
1803
+
1804
+ for (var COLLECTION_NAME in DOMIterables) {
1805
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1806
+ }
1807
+
1808
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1809
+
1810
+ /** Returns object structure for Tailwind variable config for specified theme for ALL ComponentTokenDefinitions. */
1811
+ const getComponentTokenVariablesByThemeName = (theme, componentTokenDefinitions) => {
1812
+ const themeTokenObject = Object.fromEntries(Object.entries(componentTokenDefinitions).map(([componentName, componentThemes]) => [componentName, componentThemes[theme]]));
1813
+ return themeTokenObject;
1814
+ };
1815
+
1816
+ /** The prefix for css variables and tailwind component classes */
1817
+ const PREFIX = "component";
1818
+ /**
1819
+ * Get the css variable value for the component tokens specific property.
1820
+ *
1821
+ * @param component The name of the component to get the variable for.
1822
+ * @param token The component-level token name
1823
+ * @param cssProperty The css property on the component-level Token
1824
+ * @returns {string} `var(--${PREFIX}-${component}-${token}-${cssProperty})`
1825
+ */
1826
+ const componentTokenAsCssVariableString = (component, token, cssProperty) => `var(--${PREFIX}-${component}-${token}-${cssProperty})`;
1827
+ /**
1828
+ * Get the full CSSProperties for a component token.
1829
+ * Replaces the css values from the ComponentTokenDefinition with the corresponding css variable.
1830
+ *
1831
+ * @param {ComponentNames} component The name of the component
1832
+ * @param {ComponentTokenNames} token The name of the token
1833
+ * @param {CSSProperties} tokenObject The CSSProperties for the component token
1834
+ * @returns {*} {CSSProperties} CSSProperties converted to use the css variable for the correstonding token
1835
+ */
1836
+ const componentTokenToCSSProperties = (component, token, tokenObject) => {
1837
+ return Object.fromEntries(Object.keys(tokenObject).map(key => [key, componentTokenAsCssVariableString(component, token, key)]));
1838
+ };
1839
+ /**
1840
+ * Generate the full object og componentToken rules for the Tailwind plugin.
1841
+ */
1842
+ const getAllComponentTokenRules = componentDefinitions => {
1843
+ const components = {};
1844
+ Object.entries(componentDefinitions).forEach(([componentName, themes]) => Object.entries(themes.DEFAULT).forEach(([tokenName, value]) => {
1845
+ const typedComponentName = componentName; // TS does not do literals from Object keys so we do it manually
1846
+ const typedTokenName = tokenName; // TS does not do literals from Object keys so we do it manually
1847
+ const selector = `.${PREFIX}-${typedComponentName}-${typedTokenName}`;
1848
+ components[selector] = componentTokenToCSSProperties(typedComponentName, typedTokenName, value);
1849
+ }));
1850
+ return components;
1851
+ };
1852
+
1853
+ const cssVariablesDefinition = cssTailwindCustomPropertiesPlugin.variablesToCSSRules({
1854
+ DEFAULT: {
1855
+ component: getComponentTokenVariablesByThemeName("DEFAULT", componentTokenDefinitions)
1856
+ },
1857
+ "theme-marketing": {
1858
+ component: getComponentTokenVariablesByThemeName("theme-marketing", componentTokenDefinitions)
1859
+ }
1860
+ });
1861
+ const ComponentTokensPlugin = plugin__default["default"](function ({
1862
+ addComponents
1863
+ }) {
1864
+ addComponents(cssVariablesDefinition);
1865
+ addComponents(getAllComponentTokenRules(componentTokenDefinitions));
1866
+ });
1867
+
1868
+ exports.ComponentTokensPlugin = ComponentTokensPlugin;
1869
+ exports["default"] = ComponentTokensPlugin;