@spothero/ui 14.3.0 → 14.3.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/CHANGELOG.tmp +3 -3
  3. package/backlog/Alert/Alert.js +4 -1
  4. package/backlog/AutoSuggestInput/AutoSuggestInput.js +17 -10
  5. package/backlog/AutoSuggestInput/AutoSuggestItem.js +10 -7
  6. package/backlog/AutoSuggestInput/AutoSuggestList.js +12 -9
  7. package/backlog/Badge/Badge.js +4 -1
  8. package/backlog/Chart/Chart.js +17 -10
  9. package/backlog/Checkbox/Checkbox.js +10 -7
  10. package/backlog/DateTime/DatePicker.js +10 -7
  11. package/backlog/DateTime/DatePickerCalendar.js +10 -7
  12. package/backlog/DateTime/DatePickerCalendarNavigation.js +10 -7
  13. package/backlog/DateTime/DatePickerCalendarWithRange.js +17 -10
  14. package/backlog/DateTime/DateTimePicker.js +10 -7
  15. package/backlog/DateTime/DateTimeRangePicker.js +20 -11
  16. package/backlog/DateTime/TimePicker.js +10 -7
  17. package/backlog/DateTime/date-time-assertions.js +4 -1
  18. package/backlog/DateTime/index.js +15 -7
  19. package/backlog/ErrorBoundary/ErrorBoundary.js +10 -7
  20. package/backlog/Flyout/Flyout.js +21 -11
  21. package/backlog/Form/Form.js +13 -8
  22. package/backlog/Form/FormElementError.js +4 -1
  23. package/backlog/Form/FormGroup.js +4 -1
  24. package/backlog/Form/FormGroupError.js +4 -1
  25. package/backlog/Form/index.js +11 -5
  26. package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +17 -10
  27. package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +4 -1
  28. package/backlog/GooglePlacesSearchInput/index.js +7 -3
  29. package/backlog/HorizontalRule/HorizontalRule.js +4 -1
  30. package/backlog/Label/Label.js +4 -1
  31. package/backlog/Modal/Modal.js +22 -12
  32. package/backlog/Modal/ModalContent.js +10 -7
  33. package/backlog/Modal/ModalFooter.js +10 -7
  34. package/backlog/Modal/index.js +9 -4
  35. package/backlog/Notification/Notification.js +10 -7
  36. package/backlog/Notification/NotificationContainer.js +10 -7
  37. package/backlog/Notification/NotificationPropTypes.js +4 -1
  38. package/backlog/Notification/index.js +7 -3
  39. package/backlog/PasswordControl/PasswordControl.js +13 -8
  40. package/backlog/Portal/Portal.js +10 -7
  41. package/backlog/PulseLoader/PulseLoader.js +4 -1
  42. package/backlog/Radio/Radio.js +10 -7
  43. package/backlog/Radio/RadioGroup.js +12 -9
  44. package/backlog/Radio/index.js +7 -3
  45. package/backlog/RenderInBody/RenderInBody.js +10 -7
  46. package/backlog/Select/Select.js +15 -10
  47. package/backlog/Select/SelectItemPropTypes.js +4 -1
  48. package/backlog/Select/index.js +7 -3
  49. package/backlog/SelectControlled/SelectControlled.js +15 -10
  50. package/backlog/SelectControlled/index.js +5 -2
  51. package/backlog/Sprite/Sprite.js +4 -1
  52. package/backlog/Tabs/Tab.js +10 -7
  53. package/backlog/Tabs/TabContent.js +9 -6
  54. package/backlog/Tabs/TabNavigation.js +13 -8
  55. package/backlog/Tabs/TabPanel.js +4 -1
  56. package/backlog/Tabs/Tabs.js +10 -7
  57. package/backlog/Tabs/index.js +13 -6
  58. package/backlog/TextArea/TextArea.js +10 -7
  59. package/backlog/TextInput/TextInput.js +12 -9
  60. package/backlog/TextInput/TextInputPropTypes.js +4 -1
  61. package/backlog/TextInput/index.js +7 -3
  62. package/backlog/Tooltip/Tooltip.js +16 -9
  63. package/backlog/index.js +111 -55
  64. package/backlog/v1/components/Button/Button.js +4 -1
  65. package/backlog/v1/components/Button/button-props.js +4 -1
  66. package/backlog/v1/components/Image/Image.js +12 -9
  67. package/backlog/v1/components/Loader/Loader.js +4 -1
  68. package/backlog/v1/components/Panel/Panel.js +10 -7
  69. package/backlog/v1/components/Table/Table.js +14 -9
  70. package/backlog/v1/components/Table/TableCell.js +4 -1
  71. package/backlog/v1/components/Table/TableCellPropTypes.js +4 -1
  72. package/backlog/v1/components/Table/TableControls.js +4 -1
  73. package/backlog/v1/components/Table/TableFooter.js +4 -1
  74. package/backlog/v1/components/Table/TableHeading.js +10 -7
  75. package/backlog/v1/components/Table/TableHeadingPropTypes.js +4 -1
  76. package/backlog/v1/components/Table/TableSortSelector.js +10 -7
  77. package/backlog/v1/components/Table/TableSortType.js +4 -1
  78. package/backlog/v1/components/Table/index.js +13 -6
  79. package/backlog/v1/components/TextButton/TextButton.js +14 -7
  80. package/backlog/v1/components/index.js +15 -7
  81. package/backlog/v1/utils/deprecate.js +8 -3
  82. package/package.json +3 -3
  83. package/styles/v2/components/index.js +1 -1
  84. package/v1/index-bundled.cjs.js +2 -0
  85. package/v1/index-bundled.cjs.js.map +1 -0
  86. package/v1/index-bundled.esm.js +2 -0
  87. package/v1/index-bundled.esm.js.map +1 -0
  88. package/v1/{index-unbundled-cjs/index.js → index-unbundled.cjs.js} +932 -369
  89. package/v1/index-unbundled.cjs.js.map +1 -0
  90. package/v1/{index-unbundled-esm/index.js → index-unbundled.esm.js} +929 -366
  91. package/v1/index-unbundled.esm.js.map +1 -0
  92. package/v1/index.js +2 -2
  93. package/v2/index-bundled.cjs.js +25 -0
  94. package/v2/index-bundled.cjs.js.map +1 -0
  95. package/v2/index-bundled.esm.js +24 -0
  96. package/v2/index-bundled.esm.js.map +1 -0
  97. package/v2/{index-unbundled-cjs/index-9768b43e.js → index-unbundled.cjs.js} +5421 -1083
  98. package/v2/index-unbundled.cjs.js.map +1 -0
  99. package/v2/{index-unbundled-esm/index-4a79ec74.js → index-unbundled.esm.js} +5405 -1016
  100. package/v2/index-unbundled.esm.js.map +1 -0
  101. package/v2/index.js +2 -2
  102. package/v1/index-bundled-cjs/index.js +0 -2
  103. package/v1/index-bundled-cjs/index.js.map +0 -1
  104. package/v1/index-bundled-esm/index.js +0 -2
  105. package/v1/index-bundled-esm/index.js.map +0 -1
  106. package/v1/index-unbundled-cjs/index.js.map +0 -1
  107. package/v1/index-unbundled-esm/index.js.map +0 -1
  108. package/v2/index-bundled-cjs/ImageCarousel-bfdd3dbe.js +0 -2
  109. package/v2/index-bundled-cjs/ImageCarousel-bfdd3dbe.js.map +0 -1
  110. package/v2/index-bundled-cjs/index-fa71d123.js +0 -25
  111. package/v2/index-bundled-cjs/index-fa71d123.js.map +0 -1
  112. package/v2/index-bundled-cjs/index.js +0 -2
  113. package/v2/index-bundled-cjs/index.js.map +0 -1
  114. package/v2/index-bundled-esm/ImageCarousel-367b46dd.js +0 -2
  115. package/v2/index-bundled-esm/ImageCarousel-367b46dd.js.map +0 -1
  116. package/v2/index-bundled-esm/index-b266be99.js +0 -24
  117. package/v2/index-bundled-esm/index-b266be99.js.map +0 -1
  118. package/v2/index-bundled-esm/index.js +0 -2
  119. package/v2/index-bundled-esm/index.js.map +0 -1
  120. package/v2/index-unbundled-cjs/ImageCarousel-f32232e9.js +0 -3005
  121. package/v2/index-unbundled-cjs/ImageCarousel-f32232e9.js.map +0 -1
  122. package/v2/index-unbundled-cjs/index-9768b43e.js.map +0 -1
  123. package/v2/index-unbundled-cjs/index.js +0 -72
  124. package/v2/index-unbundled-cjs/index.js.map +0 -1
  125. package/v2/index-unbundled-esm/ImageCarousel-df49312f.js +0 -2998
  126. package/v2/index-unbundled-esm/ImageCarousel-df49312f.js.map +0 -1
  127. package/v2/index-unbundled-esm/index-4a79ec74.js.map +0 -1
  128. package/v2/index-unbundled-esm/index.js +0 -7
  129. package/v2/index-unbundled-esm/index.js.map +0 -1
@@ -1,2998 +0,0 @@
1
- import { _ as _export, i as isArray$5, p as path, d as defineWellKnownSymbol, s as setToStringTag, g as global_1, h as hasOwnProperty_1, a as descriptors, f as fails, b as sharedKey, t as toObject, c as isCallable, w as wellKnownSymbol, o as objectCreate, r as redefine, e as createPropertyDescriptor, j as functionUncurryThis, k as anObject, l as functionCall, m as internalState, n as toIndexedObject, q as classof, u as createNonEnumerableProperty, v as toString_1, x as requireObjectCoercible, y as toIntegerOrInfinity, z as getMethod, A as arrayMethodHasSpeciesSupport, B as lengthOfArrayLike, C as isConstructor, D as isObject, E as arraySlice, F as createProperty, G as toAbsoluteIndex, H as entryVirtual, I as objectIsPrototypeOf, J as aCallable, K as tryToString, L as functionBindContext, M as wellKnownSymbolWrapped, N as internalMetadata, O as objectDefineProperty, P as arrayIteration, Q as nativeWeakMap, R as objectIsExtensible, S as createCommonjsModule, T as defineProperty$1, U as _extends$1, V as getOwnPropertyDescriptor, W as unwrapExports, X as _objectWithoutProperties, Y as Box, Z as map$1, $ as concat, a0 as Button } from './index-4a79ec74.js';
2
- import React, { useState, useRef, useMemo, useEffect, useCallback } from 'react';
3
- import PropTypes from 'prop-types';
4
- import 'lodash/merge';
5
- import 'lodash/template';
6
- import 'react-dom';
7
-
8
- // `Array.isArray` method
9
- // https://tc39.es/ecma262/#sec-array.isarray
10
- _export({ target: 'Array', stat: true }, {
11
- isArray: isArray$5
12
- });
13
-
14
- var isArray$4 = path.Array.isArray;
15
-
16
- var isArray$3 = isArray$4;
17
-
18
- var isArray$2 = isArray$3;
19
-
20
- var isArray$1 = isArray$2;
21
-
22
- var isArray = isArray$1;
23
-
24
- function _arrayWithHoles(arr) {
25
- if (isArray(arr)) return arr;
26
- }
27
-
28
- // `Symbol.asyncIterator` well-known symbol
29
- // https://tc39.es/ecma262/#sec-symbol.asynciterator
30
- defineWellKnownSymbol('asyncIterator');
31
-
32
- // `Symbol.hasInstance` well-known symbol
33
- // https://tc39.es/ecma262/#sec-symbol.hasinstance
34
- defineWellKnownSymbol('hasInstance');
35
-
36
- // `Symbol.isConcatSpreadable` well-known symbol
37
- // https://tc39.es/ecma262/#sec-symbol.isconcatspreadable
38
- defineWellKnownSymbol('isConcatSpreadable');
39
-
40
- // `Symbol.iterator` well-known symbol
41
- // https://tc39.es/ecma262/#sec-symbol.iterator
42
- defineWellKnownSymbol('iterator');
43
-
44
- // `Symbol.match` well-known symbol
45
- // https://tc39.es/ecma262/#sec-symbol.match
46
- defineWellKnownSymbol('match');
47
-
48
- // `Symbol.matchAll` well-known symbol
49
- // https://tc39.es/ecma262/#sec-symbol.matchall
50
- defineWellKnownSymbol('matchAll');
51
-
52
- // `Symbol.replace` well-known symbol
53
- // https://tc39.es/ecma262/#sec-symbol.replace
54
- defineWellKnownSymbol('replace');
55
-
56
- // `Symbol.search` well-known symbol
57
- // https://tc39.es/ecma262/#sec-symbol.search
58
- defineWellKnownSymbol('search');
59
-
60
- // `Symbol.species` well-known symbol
61
- // https://tc39.es/ecma262/#sec-symbol.species
62
- defineWellKnownSymbol('species');
63
-
64
- // `Symbol.split` well-known symbol
65
- // https://tc39.es/ecma262/#sec-symbol.split
66
- defineWellKnownSymbol('split');
67
-
68
- // `Symbol.toPrimitive` well-known symbol
69
- // https://tc39.es/ecma262/#sec-symbol.toprimitive
70
- defineWellKnownSymbol('toPrimitive');
71
-
72
- // `Symbol.toStringTag` well-known symbol
73
- // https://tc39.es/ecma262/#sec-symbol.tostringtag
74
- defineWellKnownSymbol('toStringTag');
75
-
76
- // `Symbol.unscopables` well-known symbol
77
- // https://tc39.es/ecma262/#sec-symbol.unscopables
78
- defineWellKnownSymbol('unscopables');
79
-
80
- // JSON[@@toStringTag] property
81
- // https://tc39.es/ecma262/#sec-json-@@tostringtag
82
- setToStringTag(global_1.JSON, 'JSON', true);
83
-
84
- var symbol$4 = path.Symbol;
85
-
86
- var iterators = {};
87
-
88
- var FunctionPrototype = Function.prototype;
89
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
90
- var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
91
-
92
- var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
93
- // additional protection from minified / mangled / dropped function names
94
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
95
- var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
96
-
97
- var functionName = {
98
- EXISTS: EXISTS,
99
- PROPER: PROPER,
100
- CONFIGURABLE: CONFIGURABLE
101
- };
102
-
103
- var correctPrototypeGetter = !fails(function () {
104
- function F() { /* empty */ }
105
- F.prototype.constructor = null;
106
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
107
- return Object.getPrototypeOf(new F()) !== F.prototype;
108
- });
109
-
110
- var IE_PROTO = sharedKey('IE_PROTO');
111
- var Object$1 = global_1.Object;
112
- var ObjectPrototype = Object$1.prototype;
113
-
114
- // `Object.getPrototypeOf` method
115
- // https://tc39.es/ecma262/#sec-object.getprototypeof
116
- var objectGetPrototypeOf = correctPrototypeGetter ? Object$1.getPrototypeOf : function (O) {
117
- var object = toObject(O);
118
- if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO];
119
- var constructor = object.constructor;
120
- if (isCallable(constructor) && object instanceof constructor) {
121
- return constructor.prototype;
122
- } return object instanceof Object$1 ? ObjectPrototype : null;
123
- };
124
-
125
- var ITERATOR$4 = wellKnownSymbol('iterator');
126
- var BUGGY_SAFARI_ITERATORS$1 = false;
127
-
128
- // `%IteratorPrototype%` object
129
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
130
- var IteratorPrototype$1, PrototypeOfArrayIteratorPrototype, arrayIterator;
131
-
132
- /* eslint-disable es/no-array-prototype-keys -- safe */
133
- if ([].keys) {
134
- arrayIterator = [].keys();
135
- // Safari 8 has buggy iterators w/o `next`
136
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
137
- else {
138
- PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
139
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$1 = PrototypeOfArrayIteratorPrototype;
140
- }
141
- }
142
-
143
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$1 == undefined || fails(function () {
144
- var test = {};
145
- // FF44- legacy iterators case
146
- return IteratorPrototype$1[ITERATOR$4].call(test) !== test;
147
- });
148
-
149
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$1 = {};
150
- else IteratorPrototype$1 = objectCreate(IteratorPrototype$1);
151
-
152
- // `%IteratorPrototype%[@@iterator]()` method
153
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
154
- if (!isCallable(IteratorPrototype$1[ITERATOR$4])) {
155
- redefine(IteratorPrototype$1, ITERATOR$4, function () {
156
- return this;
157
- });
158
- }
159
-
160
- var iteratorsCore = {
161
- IteratorPrototype: IteratorPrototype$1,
162
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
163
- };
164
-
165
- var IteratorPrototype = iteratorsCore.IteratorPrototype;
166
-
167
-
168
-
169
-
170
-
171
- var returnThis$1 = function () { return this; };
172
-
173
- var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
174
- var TO_STRING_TAG = NAME + ' Iterator';
175
- IteratorConstructor.prototype = objectCreate(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
176
- setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
177
- iterators[TO_STRING_TAG] = returnThis$1;
178
- return IteratorConstructor;
179
- };
180
-
181
- var String$1 = global_1.String;
182
- var TypeError$4 = global_1.TypeError;
183
-
184
- var aPossiblePrototype = function (argument) {
185
- if (typeof argument == 'object' || isCallable(argument)) return argument;
186
- throw TypeError$4("Can't set " + String$1(argument) + ' as a prototype');
187
- };
188
-
189
- /* eslint-disable no-proto -- safe */
190
-
191
-
192
-
193
-
194
- // `Object.setPrototypeOf` method
195
- // https://tc39.es/ecma262/#sec-object.setprototypeof
196
- // Works with __proto__ only. Old v8 can't work with null proto objects.
197
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
198
- Object.setPrototypeOf || ('__proto__' in {} ? function () {
199
- var CORRECT_SETTER = false;
200
- var test = {};
201
- var setter;
202
- try {
203
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
204
- setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
205
- setter(test, []);
206
- CORRECT_SETTER = test instanceof Array;
207
- } catch (error) { /* empty */ }
208
- return function setPrototypeOf(O, proto) {
209
- anObject(O);
210
- aPossiblePrototype(proto);
211
- if (CORRECT_SETTER) setter(O, proto);
212
- else O.__proto__ = proto;
213
- return O;
214
- };
215
- }() : undefined);
216
-
217
- var PROPER_FUNCTION_NAME = functionName.PROPER;
218
- var BUGGY_SAFARI_ITERATORS = iteratorsCore.BUGGY_SAFARI_ITERATORS;
219
- var ITERATOR$3 = wellKnownSymbol('iterator');
220
- var KEYS = 'keys';
221
- var VALUES = 'values';
222
- var ENTRIES = 'entries';
223
-
224
- var returnThis = function () { return this; };
225
-
226
- var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
227
- createIteratorConstructor(IteratorConstructor, NAME, next);
228
-
229
- var getIterationMethod = function (KIND) {
230
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
231
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
232
- switch (KIND) {
233
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
234
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
235
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
236
- } return function () { return new IteratorConstructor(this); };
237
- };
238
-
239
- var TO_STRING_TAG = NAME + ' Iterator';
240
- var INCORRECT_VALUES_NAME = false;
241
- var IterablePrototype = Iterable.prototype;
242
- var nativeIterator = IterablePrototype[ITERATOR$3]
243
- || IterablePrototype['@@iterator']
244
- || DEFAULT && IterablePrototype[DEFAULT];
245
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
246
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
247
- var CurrentIteratorPrototype, methods, KEY;
248
-
249
- // fix native
250
- if (anyNativeIterator) {
251
- CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
252
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
253
- // Set @@toStringTag to native iterators
254
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
255
- iterators[TO_STRING_TAG] = returnThis;
256
- }
257
- }
258
-
259
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
260
- if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
261
- {
262
- INCORRECT_VALUES_NAME = true;
263
- defaultIterator = function values() { return functionCall(nativeIterator, this); };
264
- }
265
- }
266
-
267
- // export additional methods
268
- if (DEFAULT) {
269
- methods = {
270
- values: getIterationMethod(VALUES),
271
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
272
- entries: getIterationMethod(ENTRIES)
273
- };
274
- if (FORCED) for (KEY in methods) {
275
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
276
- redefine(IterablePrototype, KEY, methods[KEY]);
277
- }
278
- } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
279
- }
280
-
281
- // define iterator
282
- if ((FORCED) && IterablePrototype[ITERATOR$3] !== defaultIterator) {
283
- redefine(IterablePrototype, ITERATOR$3, defaultIterator, { name: DEFAULT });
284
- }
285
- iterators[NAME] = defaultIterator;
286
-
287
- return methods;
288
- };
289
-
290
- var ARRAY_ITERATOR = 'Array Iterator';
291
- var setInternalState$3 = internalState.set;
292
- var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
293
-
294
- // `Array.prototype.entries` method
295
- // https://tc39.es/ecma262/#sec-array.prototype.entries
296
- // `Array.prototype.keys` method
297
- // https://tc39.es/ecma262/#sec-array.prototype.keys
298
- // `Array.prototype.values` method
299
- // https://tc39.es/ecma262/#sec-array.prototype.values
300
- // `Array.prototype[@@iterator]` method
301
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
302
- // `CreateArrayIterator` internal method
303
- // https://tc39.es/ecma262/#sec-createarrayiterator
304
- defineIterator(Array, 'Array', function (iterated, kind) {
305
- setInternalState$3(this, {
306
- type: ARRAY_ITERATOR,
307
- target: toIndexedObject(iterated), // target
308
- index: 0, // next index
309
- kind: kind // kind
310
- });
311
- // `%ArrayIteratorPrototype%.next` method
312
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
313
- }, function () {
314
- var state = getInternalState$1(this);
315
- var target = state.target;
316
- var kind = state.kind;
317
- var index = state.index++;
318
- if (!target || index >= target.length) {
319
- state.target = undefined;
320
- return { value: undefined, done: true };
321
- }
322
- if (kind == 'keys') return { value: index, done: false };
323
- if (kind == 'values') return { value: target[index], done: false };
324
- return { value: [index, target[index]], done: false };
325
- }, 'values');
326
-
327
- // argumentsList[@@iterator] is %ArrayProto_values%
328
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
329
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
330
- iterators.Arguments = iterators.Array;
331
-
332
- // iterable DOM collections
333
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
334
- var domIterables = {
335
- CSSRuleList: 0,
336
- CSSStyleDeclaration: 0,
337
- CSSValueList: 0,
338
- ClientRectList: 0,
339
- DOMRectList: 0,
340
- DOMStringList: 0,
341
- DOMTokenList: 1,
342
- DataTransferItemList: 0,
343
- FileList: 0,
344
- HTMLAllCollection: 0,
345
- HTMLCollection: 0,
346
- HTMLFormElement: 0,
347
- HTMLSelectElement: 0,
348
- MediaList: 0,
349
- MimeTypeArray: 0,
350
- NamedNodeMap: 0,
351
- NodeList: 1,
352
- PaintRequestList: 0,
353
- Plugin: 0,
354
- PluginArray: 0,
355
- SVGLengthList: 0,
356
- SVGNumberList: 0,
357
- SVGPathSegList: 0,
358
- SVGPointList: 0,
359
- SVGStringList: 0,
360
- SVGTransformList: 0,
361
- SourceBufferList: 0,
362
- StyleSheetList: 0,
363
- TextTrackCueList: 0,
364
- TextTrackList: 0,
365
- TouchList: 0
366
- };
367
-
368
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
369
-
370
- for (var COLLECTION_NAME in domIterables) {
371
- var Collection = global_1[COLLECTION_NAME];
372
- var CollectionPrototype = Collection && Collection.prototype;
373
- if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {
374
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
375
- }
376
- iterators[COLLECTION_NAME] = iterators.Array;
377
- }
378
-
379
- var symbol$3 = symbol$4;
380
-
381
- var symbol$2 = symbol$3;
382
-
383
- // `Symbol.asyncDispose` well-known symbol
384
- // https://github.com/tc39/proposal-using-statement
385
- defineWellKnownSymbol('asyncDispose');
386
-
387
- // `Symbol.dispose` well-known symbol
388
- // https://github.com/tc39/proposal-using-statement
389
- defineWellKnownSymbol('dispose');
390
-
391
- // `Symbol.matcher` well-known symbol
392
- // https://github.com/tc39/proposal-pattern-matching
393
- defineWellKnownSymbol('matcher');
394
-
395
- // `Symbol.metadata` well-known symbol
396
- // https://github.com/tc39/proposal-decorators
397
- defineWellKnownSymbol('metadata');
398
-
399
- // `Symbol.observable` well-known symbol
400
- // https://github.com/tc39/proposal-observable
401
- defineWellKnownSymbol('observable');
402
-
403
- // TODO: remove from `core-js@4`
404
-
405
-
406
- // `Symbol.patternMatch` well-known symbol
407
- // https://github.com/tc39/proposal-pattern-matching
408
- defineWellKnownSymbol('patternMatch');
409
-
410
- // TODO: remove from `core-js@4`
411
-
412
-
413
- defineWellKnownSymbol('replaceAll');
414
-
415
- // TODO: Remove from `core-js@4`
416
-
417
- // TODO: Remove from `core-js@4`
418
-
419
-
420
- var symbol$1 = symbol$2;
421
-
422
- var symbol = symbol$1;
423
-
424
- var charAt$1 = functionUncurryThis(''.charAt);
425
- var charCodeAt = functionUncurryThis(''.charCodeAt);
426
- var stringSlice = functionUncurryThis(''.slice);
427
-
428
- var createMethod = function (CONVERT_TO_STRING) {
429
- return function ($this, pos) {
430
- var S = toString_1(requireObjectCoercible($this));
431
- var position = toIntegerOrInfinity(pos);
432
- var size = S.length;
433
- var first, second;
434
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
435
- first = charCodeAt(S, position);
436
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
437
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
438
- ? CONVERT_TO_STRING
439
- ? charAt$1(S, position)
440
- : first
441
- : CONVERT_TO_STRING
442
- ? stringSlice(S, position, position + 2)
443
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
444
- };
445
- };
446
-
447
- var stringMultibyte = {
448
- // `String.prototype.codePointAt` method
449
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
450
- codeAt: createMethod(false),
451
- // `String.prototype.at` method
452
- // https://github.com/mathiasbynens/String.prototype.at
453
- charAt: createMethod(true)
454
- };
455
-
456
- var charAt = stringMultibyte.charAt;
457
-
458
-
459
-
460
-
461
- var STRING_ITERATOR = 'String Iterator';
462
- var setInternalState$2 = internalState.set;
463
- var getInternalState = internalState.getterFor(STRING_ITERATOR);
464
-
465
- // `String.prototype[@@iterator]` method
466
- // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
467
- defineIterator(String, 'String', function (iterated) {
468
- setInternalState$2(this, {
469
- type: STRING_ITERATOR,
470
- string: toString_1(iterated),
471
- index: 0
472
- });
473
- // `%StringIteratorPrototype%.next` method
474
- // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
475
- }, function next() {
476
- var state = getInternalState(this);
477
- var string = state.string;
478
- var index = state.index;
479
- var point;
480
- if (index >= string.length) return { value: undefined, done: true };
481
- point = charAt(string, index);
482
- state.index += point.length;
483
- return { value: point, done: false };
484
- });
485
-
486
- var ITERATOR$2 = wellKnownSymbol('iterator');
487
-
488
- var getIteratorMethod$4 = function (it) {
489
- if (it != undefined) return getMethod(it, ITERATOR$2)
490
- || getMethod(it, '@@iterator')
491
- || iterators[classof(it)];
492
- };
493
-
494
- var getIteratorMethod_1 = getIteratorMethod$4;
495
-
496
- var getIteratorMethod$3 = getIteratorMethod_1;
497
-
498
- var getIteratorMethod$2 = getIteratorMethod$3;
499
-
500
- var getIteratorMethod$1 = getIteratorMethod$2;
501
-
502
- var getIteratorMethod = getIteratorMethod$1;
503
-
504
- function _iterableToArrayLimit(arr, i) {
505
- var _i = arr == null ? null : typeof symbol !== "undefined" && getIteratorMethod(arr) || arr["@@iterator"];
506
-
507
- if (_i == null) return;
508
- var _arr = [];
509
- var _n = true;
510
- var _d = false;
511
-
512
- var _s, _e;
513
-
514
- try {
515
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
516
- _arr.push(_s.value);
517
-
518
- if (i && _arr.length === i) break;
519
- }
520
- } catch (err) {
521
- _d = true;
522
- _e = err;
523
- } finally {
524
- try {
525
- if (!_n && _i["return"] != null) _i["return"]();
526
- } finally {
527
- if (_d) throw _e;
528
- }
529
- }
530
-
531
- return _arr;
532
- }
533
-
534
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
535
-
536
- var SPECIES = wellKnownSymbol('species');
537
- var Array$2 = global_1.Array;
538
- var max = Math.max;
539
-
540
- // `Array.prototype.slice` method
541
- // https://tc39.es/ecma262/#sec-array.prototype.slice
542
- // fallback for not array-like ES3 strings and DOM objects
543
- _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
544
- slice: function slice(start, end) {
545
- var O = toIndexedObject(this);
546
- var length = lengthOfArrayLike(O);
547
- var k = toAbsoluteIndex(start, length);
548
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
549
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
550
- var Constructor, result, n;
551
- if (isArray$5(O)) {
552
- Constructor = O.constructor;
553
- // cross-realm fallback
554
- if (isConstructor(Constructor) && (Constructor === Array$2 || isArray$5(Constructor.prototype))) {
555
- Constructor = undefined;
556
- } else if (isObject(Constructor)) {
557
- Constructor = Constructor[SPECIES];
558
- if (Constructor === null) Constructor = undefined;
559
- }
560
- if (Constructor === Array$2 || Constructor === undefined) {
561
- return arraySlice(O, k, fin);
562
- }
563
- }
564
- result = new (Constructor === undefined ? Array$2 : Constructor)(max(fin - k, 0));
565
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
566
- result.length = n;
567
- return result;
568
- }
569
- });
570
-
571
- var slice$5 = entryVirtual('Array').slice;
572
-
573
- var ArrayPrototype$1 = Array.prototype;
574
-
575
- var slice$4 = function (it) {
576
- var own = it.slice;
577
- return it === ArrayPrototype$1 || (objectIsPrototypeOf(ArrayPrototype$1, it) && own === ArrayPrototype$1.slice) ? slice$5 : own;
578
- };
579
-
580
- var slice$3 = slice$4;
581
-
582
- var slice$2 = slice$3;
583
-
584
- var slice$1 = slice$2;
585
-
586
- var slice = slice$1;
587
-
588
- var iteratorClose = function (iterator, kind, value) {
589
- var innerResult, innerError;
590
- anObject(iterator);
591
- try {
592
- innerResult = getMethod(iterator, 'return');
593
- if (!innerResult) {
594
- if (kind === 'throw') throw value;
595
- return value;
596
- }
597
- innerResult = functionCall(innerResult, iterator);
598
- } catch (error) {
599
- innerError = true;
600
- innerResult = error;
601
- }
602
- if (kind === 'throw') throw value;
603
- if (innerError) throw innerResult;
604
- anObject(innerResult);
605
- return value;
606
- };
607
-
608
- // call something on iterator step with safe closing on error
609
- var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
610
- try {
611
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
612
- } catch (error) {
613
- iteratorClose(iterator, 'throw', error);
614
- }
615
- };
616
-
617
- var ITERATOR$1 = wellKnownSymbol('iterator');
618
- var ArrayPrototype = Array.prototype;
619
-
620
- // check on default Array iterator
621
- var isArrayIteratorMethod = function (it) {
622
- return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$1] === it);
623
- };
624
-
625
- var TypeError$3 = global_1.TypeError;
626
-
627
- var getIterator = function (argument, usingIterator) {
628
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$4(argument) : usingIterator;
629
- if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
630
- throw TypeError$3(tryToString(argument) + ' is not iterable');
631
- };
632
-
633
- var Array$1 = global_1.Array;
634
-
635
- // `Array.from` method implementation
636
- // https://tc39.es/ecma262/#sec-array.from
637
- var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
638
- var O = toObject(arrayLike);
639
- var IS_CONSTRUCTOR = isConstructor(this);
640
- var argumentsLength = arguments.length;
641
- var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
642
- var mapping = mapfn !== undefined;
643
- if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
644
- var iteratorMethod = getIteratorMethod$4(O);
645
- var index = 0;
646
- var length, result, step, iterator, next, value;
647
- // if the target is not iterable or it's an array with the default iterator - use a simple case
648
- if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
649
- iterator = getIterator(O, iteratorMethod);
650
- next = iterator.next;
651
- result = IS_CONSTRUCTOR ? new this() : [];
652
- for (;!(step = functionCall(next, iterator)).done; index++) {
653
- value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
654
- createProperty(result, index, value);
655
- }
656
- } else {
657
- length = lengthOfArrayLike(O);
658
- result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
659
- for (;length > index; index++) {
660
- value = mapping ? mapfn(O[index], index) : O[index];
661
- createProperty(result, index, value);
662
- }
663
- }
664
- result.length = index;
665
- return result;
666
- };
667
-
668
- var ITERATOR = wellKnownSymbol('iterator');
669
- var SAFE_CLOSING = false;
670
-
671
- try {
672
- var called = 0;
673
- var iteratorWithReturn = {
674
- next: function () {
675
- return { done: !!called++ };
676
- },
677
- 'return': function () {
678
- SAFE_CLOSING = true;
679
- }
680
- };
681
- iteratorWithReturn[ITERATOR] = function () {
682
- return this;
683
- };
684
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
685
- Array.from(iteratorWithReturn, function () { throw 2; });
686
- } catch (error) { /* empty */ }
687
-
688
- var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
689
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
690
- var ITERATION_SUPPORT = false;
691
- try {
692
- var object = {};
693
- object[ITERATOR] = function () {
694
- return {
695
- next: function () {
696
- return { done: ITERATION_SUPPORT = true };
697
- }
698
- };
699
- };
700
- exec(object);
701
- } catch (error) { /* empty */ }
702
- return ITERATION_SUPPORT;
703
- };
704
-
705
- var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
706
- // eslint-disable-next-line es/no-array-from -- required for testing
707
- Array.from(iterable);
708
- });
709
-
710
- // `Array.from` method
711
- // https://tc39.es/ecma262/#sec-array.from
712
- _export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
713
- from: arrayFrom
714
- });
715
-
716
- var from_1$4 = path.Array.from;
717
-
718
- var from_1$3 = from_1$4;
719
-
720
- var from_1$2 = from_1$3;
721
-
722
- var from_1$1 = from_1$2;
723
-
724
- var from_1 = from_1$1;
725
-
726
- function _arrayLikeToArray(arr, len) {
727
- if (len == null || len > arr.length) len = arr.length;
728
-
729
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
730
- arr2[i] = arr[i];
731
- }
732
-
733
- return arr2;
734
- }
735
-
736
- function _unsupportedIterableToArray(o, minLen) {
737
- var _context;
738
-
739
- if (!o) return;
740
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
741
-
742
- var n = slice(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);
743
-
744
- if (n === "Object" && o.constructor) n = o.constructor.name;
745
- if (n === "Map" || n === "Set") return from_1(o);
746
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
747
- }
748
-
749
- function _nonIterableRest() {
750
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
751
- }
752
-
753
- function _slicedToArray(arr, i) {
754
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
755
- }
756
-
757
- function canUseDOM() {
758
- return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
759
- }
760
- function areEqualShallow(objectA, objectB) {
761
- return Object.keys(objectA).length === Object.keys(objectB).length && Object.keys(objectA).every(function (objectKey) {
762
- if (!Object.prototype.hasOwnProperty.call(objectB, objectKey)) {
763
- return false;
764
- }
765
-
766
- return objectA[objectKey] === objectB[objectKey];
767
- });
768
- }
769
-
770
- function _extends() {
771
- _extends = Object.assign || function (target) {
772
- for (var i = 1; i < arguments.length; i++) {
773
- var source = arguments[i];
774
-
775
- for (var key in source) {
776
- if (Object.prototype.hasOwnProperty.call(source, key)) {
777
- target[key] = source[key];
778
- }
779
- }
780
- }
781
-
782
- return target;
783
- };
784
-
785
- return _extends.apply(this, arguments);
786
- }
787
-
788
- function Alignment(align, viewSize) {
789
- var predefined = {
790
- start: start,
791
- center: center,
792
- end: end
793
- };
794
-
795
- function start() {
796
- return 0;
797
- }
798
-
799
- function center(n) {
800
- return end(n) / 2;
801
- }
802
-
803
- function end(n) {
804
- return viewSize - n;
805
- }
806
-
807
- function percent() {
808
- return viewSize * Number(align);
809
- }
810
-
811
- function measure(n) {
812
- if (typeof align === 'number') return percent();
813
- return predefined[align](n);
814
- }
815
-
816
- var self = {
817
- measure: measure
818
- };
819
- return self;
820
- }
821
-
822
- function Animation(callback) {
823
- var animationFrame = 0;
824
-
825
- function ifAnimating(active, cb) {
826
- return function () {
827
- if (active === !!animationFrame) cb();
828
- };
829
- }
830
-
831
- function start() {
832
- animationFrame = window.requestAnimationFrame(callback);
833
- }
834
-
835
- function stop() {
836
- window.cancelAnimationFrame(animationFrame);
837
- animationFrame = 0;
838
- }
839
-
840
- var self = {
841
- proceed: ifAnimating(true, start),
842
- start: ifAnimating(false, start),
843
- stop: ifAnimating(true, stop)
844
- };
845
- return self;
846
- }
847
-
848
- function Axis(axis, contentDirection) {
849
- var scroll = axis === 'y' ? 'y' : 'x';
850
- var cross = axis === 'y' ? 'x' : 'y';
851
- var startEdge = getStartEdge();
852
- var endEdge = getEndEdge();
853
-
854
- function measureSize(rect) {
855
- var width = rect.width,
856
- height = rect.height;
857
- return scroll === 'x' ? width : height;
858
- }
859
-
860
- function getStartEdge() {
861
- if (scroll === 'y') return 'top';
862
- return contentDirection === 'rtl' ? 'right' : 'left';
863
- }
864
-
865
- function getEndEdge() {
866
- if (scroll === 'y') return 'bottom';
867
- return contentDirection === 'rtl' ? 'left' : 'right';
868
- }
869
-
870
- var self = {
871
- scroll: scroll,
872
- cross: cross,
873
- startEdge: startEdge,
874
- endEdge: endEdge,
875
- measureSize: measureSize
876
- };
877
- return self;
878
- }
879
-
880
- function Limit(min, max) {
881
- var length = Math.abs(min - max);
882
-
883
- function reachedMin(n) {
884
- return n < min;
885
- }
886
-
887
- function reachedMax(n) {
888
- return n > max;
889
- }
890
-
891
- function reachedAny(n) {
892
- return reachedMin(n) || reachedMax(n);
893
- }
894
-
895
- function constrain(n) {
896
- if (!reachedAny(n)) return n;
897
- return reachedMin(n) ? min : max;
898
- }
899
-
900
- function removeOffset(n) {
901
- if (!length) return n;
902
- return n - length * Math.ceil((n - max) / length);
903
- }
904
-
905
- var self = {
906
- constrain: constrain,
907
- length: length,
908
- max: max,
909
- min: min,
910
- reachedAny: reachedAny,
911
- reachedMax: reachedMax,
912
- reachedMin: reachedMin,
913
- removeOffset: removeOffset
914
- };
915
- return self;
916
- }
917
-
918
- function Counter(max, start, loop) {
919
- var _a = Limit(0, max),
920
- min = _a.min,
921
- constrain = _a.constrain;
922
-
923
- var loopEnd = max + 1;
924
- var counter = withinLimit(start);
925
-
926
- function withinLimit(n) {
927
- return !loop ? constrain(n) : Math.abs((loopEnd + n) % loopEnd);
928
- }
929
-
930
- function get() {
931
- return counter;
932
- }
933
-
934
- function set(n) {
935
- counter = withinLimit(n);
936
- return self;
937
- }
938
-
939
- function add(n) {
940
- return set(get() + n);
941
- }
942
-
943
- function clone() {
944
- return Counter(max, get(), loop);
945
- }
946
-
947
- var self = {
948
- add: add,
949
- clone: clone,
950
- get: get,
951
- set: set,
952
- min: min,
953
- max: max
954
- };
955
- return self;
956
- }
957
-
958
- function Direction(direction) {
959
- var sign = direction === 'rtl' ? -1 : 1;
960
-
961
- function applyTo(n) {
962
- return n * sign;
963
- }
964
-
965
- var self = {
966
- applyTo: applyTo
967
- };
968
- return self;
969
- }
970
-
971
- function EventStore() {
972
- var listeners = [];
973
-
974
- function add(node, type, handler, options) {
975
- if (options === void 0) {
976
- options = false;
977
- }
978
-
979
- node.addEventListener(type, handler, options);
980
- listeners.push(function () {
981
- return node.removeEventListener(type, handler, options);
982
- });
983
- return self;
984
- }
985
-
986
- function removeAll() {
987
- listeners = listeners.filter(function (remove) {
988
- return remove();
989
- });
990
- return self;
991
- }
992
-
993
- var self = {
994
- add: add,
995
- removeAll: removeAll
996
- };
997
- return self;
998
- }
999
-
1000
- function Vector1D(value) {
1001
- var vector = value;
1002
-
1003
- function get() {
1004
- return vector;
1005
- }
1006
-
1007
- function set(n) {
1008
- vector = readNumber(n);
1009
- return self;
1010
- }
1011
-
1012
- function add(n) {
1013
- vector += readNumber(n);
1014
- return self;
1015
- }
1016
-
1017
- function subtract(n) {
1018
- vector -= readNumber(n);
1019
- return self;
1020
- }
1021
-
1022
- function multiply(n) {
1023
- vector *= n;
1024
- return self;
1025
- }
1026
-
1027
- function divide(n) {
1028
- vector /= n;
1029
- return self;
1030
- }
1031
-
1032
- function normalize() {
1033
- if (vector !== 0) divide(vector);
1034
- return self;
1035
- }
1036
-
1037
- function readNumber(n) {
1038
- return typeof n === 'number' ? n : n.get();
1039
- }
1040
-
1041
- var self = {
1042
- add: add,
1043
- divide: divide,
1044
- get: get,
1045
- multiply: multiply,
1046
- normalize: normalize,
1047
- set: set,
1048
- subtract: subtract
1049
- };
1050
- return self;
1051
- }
1052
-
1053
- function map(value, iStart, iStop, oStart, oStop) {
1054
- return oStart + (oStop - oStart) * ((value - iStart) / (iStop - iStart));
1055
- }
1056
-
1057
- function mathSign(n) {
1058
- return !n ? 0 : n / Math.abs(n);
1059
- }
1060
-
1061
- function deltaAbs(valueB, valueA) {
1062
- return Math.abs(valueB - valueA);
1063
- }
1064
-
1065
- function factorAbs(valueB, valueA) {
1066
- if (valueB === 0 || valueA === 0) return 0;
1067
- if (Math.abs(valueB) <= Math.abs(valueA)) return 0;
1068
- var diff = deltaAbs(Math.abs(valueB), Math.abs(valueA));
1069
- return Math.abs(diff / valueB);
1070
- }
1071
-
1072
- function roundToDecimals(decimalPoints) {
1073
- var pow = Math.pow(10, decimalPoints);
1074
- return function (n) {
1075
- return Math.round(n * pow) / pow;
1076
- };
1077
- }
1078
-
1079
- function debounce(callback, time) {
1080
- var timeout = 0;
1081
- return function () {
1082
- window.clearTimeout(timeout);
1083
- timeout = window.setTimeout(callback, time) || 0;
1084
- };
1085
- }
1086
-
1087
- function groupArray(array, size) {
1088
- var groups = [];
1089
-
1090
- for (var i = 0; i < array.length; i += size) {
1091
- groups.push(array.slice(i, i + size));
1092
- }
1093
-
1094
- return groups;
1095
- }
1096
-
1097
- function arrayKeys(array) {
1098
- return Object.keys(array).map(Number);
1099
- }
1100
-
1101
- function arrayLast(array) {
1102
- return array[lastIndex(array)];
1103
- }
1104
-
1105
- function lastIndex(array) {
1106
- return Math.max(0, array.length - 1);
1107
- }
1108
-
1109
- function removeClass(node, className) {
1110
- var cl = node.classList;
1111
- if (className && cl.contains(className)) cl.remove(className);
1112
- }
1113
-
1114
- function addClass(node, className) {
1115
- var cl = node.classList;
1116
- if (className && !cl.contains(className)) cl.add(className);
1117
- }
1118
-
1119
- function DragHandler(axis, direction, rootNode, target, dragFree, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, events, loop, skipSnaps) {
1120
- var scrollAxis = axis.scroll,
1121
- crossAxis = axis.cross;
1122
- var focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];
1123
- var startScroll = Vector1D(0);
1124
- var startCross = Vector1D(0);
1125
- var dragStartPoint = Vector1D(0);
1126
- var activationEvents = EventStore();
1127
- var interactionEvents = EventStore();
1128
- var snapForceBoost = {
1129
- mouse: 2.5,
1130
- touch: 3.5
1131
- };
1132
- var freeForceBoost = {
1133
- mouse: 5,
1134
- touch: 7
1135
- };
1136
- var baseSpeed = dragFree ? 5 : 16;
1137
- var baseMass = 1;
1138
- var dragThreshold = 20;
1139
- var pointerIsDown = false;
1140
- var preventScroll = false;
1141
- var preventClick = false;
1142
- var isMouse = false;
1143
-
1144
- function addActivationEvents() {
1145
- var node = rootNode;
1146
- activationEvents.add(node, 'touchmove', function () {
1147
- return undefined;
1148
- }).add(node, 'touchend', function () {
1149
- return undefined;
1150
- }).add(node, 'touchstart', down).add(node, 'mousedown', down).add(node, 'touchcancel', up).add(node, 'contextmenu', up).add(node, 'click', click);
1151
- }
1152
-
1153
- function addInteractionEvents() {
1154
- var node = !isMouse ? rootNode : document;
1155
- interactionEvents.add(node, 'touchmove', move).add(node, 'touchend', up).add(node, 'mousemove', move).add(node, 'mouseup', up);
1156
- }
1157
-
1158
- function removeAllEvents() {
1159
- activationEvents.removeAll();
1160
- interactionEvents.removeAll();
1161
- }
1162
-
1163
- function isFocusNode(node) {
1164
- var name = node.nodeName || '';
1165
- return focusNodes.indexOf(name) > -1;
1166
- }
1167
-
1168
- function forceBoost() {
1169
- var boost = dragFree ? freeForceBoost : snapForceBoost;
1170
- var type = isMouse ? 'mouse' : 'touch';
1171
- return boost[type];
1172
- }
1173
-
1174
- function allowedForce(force, targetChanged) {
1175
- var next = index.clone().add(mathSign(force) * -1);
1176
- var isEdge = next.get() === index.min || next.get() === index.max;
1177
- var baseForce = scrollTarget.byDistance(force, !dragFree).distance;
1178
- if (dragFree || Math.abs(force) < dragThreshold) return baseForce;
1179
- if (!loop && isEdge) return baseForce * 0.6;
1180
- if (skipSnaps && targetChanged) return baseForce * 0.5;
1181
- return scrollTarget.byIndex(next.get(), 0).distance;
1182
- }
1183
-
1184
- function down(evt) {
1185
- isMouse = evt.type === 'mousedown';
1186
- if (isMouse && evt.button !== 0) return;
1187
- var isMoving = deltaAbs(target.get(), location.get()) >= 2;
1188
- var clearPreventClick = isMouse || !isMoving;
1189
- var isNotFocusNode = !isFocusNode(evt.target);
1190
- var preventDefault = isMoving || isMouse && isNotFocusNode;
1191
- pointerIsDown = true;
1192
- dragTracker.pointerDown(evt);
1193
- dragStartPoint.set(target);
1194
- target.set(location);
1195
- scrollBody.useBaseMass().useSpeed(80);
1196
- addInteractionEvents();
1197
- startScroll.set(dragTracker.readPoint(evt, scrollAxis));
1198
- startCross.set(dragTracker.readPoint(evt, crossAxis));
1199
- events.emit('pointerDown');
1200
- if (clearPreventClick) preventClick = false;
1201
- if (preventDefault) evt.preventDefault();
1202
- }
1203
-
1204
- function move(evt) {
1205
- if (!preventScroll && !isMouse) {
1206
- if (!evt.cancelable) return up();
1207
- var moveScroll = dragTracker.readPoint(evt, scrollAxis).get();
1208
- var moveCross = dragTracker.readPoint(evt, crossAxis).get();
1209
- var diffScroll = deltaAbs(moveScroll, startScroll.get());
1210
- var diffCross = deltaAbs(moveCross, startCross.get());
1211
- preventScroll = diffScroll > diffCross;
1212
- if (!preventScroll && !preventClick) return up();
1213
- }
1214
-
1215
- var diff = dragTracker.pointerMove(evt);
1216
- if (!preventClick && diff) preventClick = true;
1217
- animation.start();
1218
- target.add(direction.applyTo(diff));
1219
- evt.preventDefault();
1220
- }
1221
-
1222
- function up() {
1223
- var currentLocation = scrollTarget.byDistance(0, false);
1224
- var targetChanged = currentLocation.index !== index.get();
1225
- var rawForce = dragTracker.pointerUp() * forceBoost();
1226
- var force = allowedForce(direction.applyTo(rawForce), targetChanged);
1227
- var forceFactor = factorAbs(rawForce, force);
1228
- var isMoving = deltaAbs(target.get(), dragStartPoint.get()) >= 0.5;
1229
- var isVigorous = targetChanged && forceFactor > 0.75;
1230
- var isBelowThreshold = Math.abs(rawForce) < dragThreshold;
1231
- var speed = isVigorous ? 10 : baseSpeed;
1232
- var mass = isVigorous ? baseMass + 2.5 * forceFactor : baseMass;
1233
- if (isMoving && !isMouse) preventClick = true;
1234
- preventScroll = false;
1235
- pointerIsDown = false;
1236
- interactionEvents.removeAll();
1237
- scrollBody.useSpeed(isBelowThreshold ? 9 : speed).useMass(mass);
1238
- scrollTo.distance(force, !dragFree);
1239
- isMouse = false;
1240
- events.emit('pointerUp');
1241
- }
1242
-
1243
- function click(evt) {
1244
- if (preventClick) evt.preventDefault();
1245
- }
1246
-
1247
- function clickAllowed() {
1248
- return !preventClick;
1249
- }
1250
-
1251
- function pointerDown() {
1252
- return pointerIsDown;
1253
- }
1254
-
1255
- var self = {
1256
- addActivationEvents: addActivationEvents,
1257
- clickAllowed: clickAllowed,
1258
- pointerDown: pointerDown,
1259
- removeAllEvents: removeAllEvents
1260
- };
1261
- return self;
1262
- }
1263
-
1264
- function DragTracker(axis, pxToPercent) {
1265
- var scrollAxis = axis.scroll;
1266
- var coords = {
1267
- x: 'clientX',
1268
- y: 'clientY'
1269
- };
1270
- var startDrag = Vector1D(0);
1271
- var diffDrag = Vector1D(0);
1272
- var lastDrag = Vector1D(0);
1273
- var pointValue = Vector1D(0);
1274
- var trackInterval = 10;
1275
- var trackLength = 5;
1276
- var trackTime = 100;
1277
- var trackPoints = [];
1278
- var lastMoveTime = new Date().getTime();
1279
- var isMouse = false;
1280
-
1281
- function readPoint(evt, type) {
1282
- isMouse = !evt.touches;
1283
- var c = coords[type];
1284
- var value = isMouse ? evt[c] : evt.touches[0][c];
1285
- return pointValue.set(value);
1286
- }
1287
-
1288
- function pointerDown(evt) {
1289
- var point = readPoint(evt, scrollAxis);
1290
- startDrag.set(point);
1291
- lastDrag.set(point);
1292
- return pxToPercent.measure(startDrag.get());
1293
- }
1294
-
1295
- function pointerMove(evt) {
1296
- var point = readPoint(evt, scrollAxis);
1297
- var nowTime = new Date().getTime();
1298
- var diffTime = nowTime - lastMoveTime;
1299
-
1300
- if (diffTime >= trackInterval) {
1301
- if (diffTime >= trackTime) trackPoints = [];
1302
- trackPoints.push(point.get());
1303
- lastMoveTime = nowTime;
1304
- }
1305
-
1306
- diffDrag.set(point).subtract(lastDrag);
1307
- lastDrag.set(point);
1308
- return pxToPercent.measure(diffDrag.get());
1309
- }
1310
-
1311
- function pointerUp() {
1312
- var nowTime = new Date().getTime();
1313
- var diffTime = nowTime - lastMoveTime;
1314
- var currentPoint = lastDrag.get();
1315
- var force = trackPoints.slice(-trackLength).map(function (trackPoint) {
1316
- return currentPoint - trackPoint;
1317
- }).sort(function (p1, p2) {
1318
- return Math.abs(p1) < Math.abs(p2) ? 1 : -1;
1319
- })[0];
1320
- lastDrag.set(diffTime > trackTime || !force ? 0 : force);
1321
- trackPoints = [];
1322
- return pxToPercent.measure(lastDrag.get());
1323
- }
1324
-
1325
- var self = {
1326
- pointerDown: pointerDown,
1327
- pointerMove: pointerMove,
1328
- pointerUp: pointerUp,
1329
- readPoint: readPoint
1330
- };
1331
- return self;
1332
- }
1333
-
1334
- function PxToPercent(viewInPx) {
1335
- var totalPercent = 100;
1336
-
1337
- function measure(n) {
1338
- if (viewInPx === 0) return 0;
1339
- return n / viewInPx * totalPercent;
1340
- }
1341
-
1342
- var self = {
1343
- measure: measure,
1344
- totalPercent: totalPercent
1345
- };
1346
- return self;
1347
- }
1348
-
1349
- function ScrollBody(location, baseSpeed, baseMass) {
1350
- var roundToTwoDecimals = roundToDecimals(2);
1351
- var velocity = Vector1D(0);
1352
- var acceleration = Vector1D(0);
1353
- var attraction = Vector1D(0);
1354
- var attractionDirection = 0;
1355
- var speed = baseSpeed;
1356
- var mass = baseMass;
1357
-
1358
- function update() {
1359
- velocity.add(acceleration);
1360
- location.add(velocity);
1361
- acceleration.multiply(0);
1362
- }
1363
-
1364
- function applyForce(v) {
1365
- v.divide(mass);
1366
- acceleration.add(v);
1367
- }
1368
-
1369
- function seek(v) {
1370
- attraction.set(v).subtract(location);
1371
- var magnitude = map(attraction.get(), 0, 100, 0, speed);
1372
- attractionDirection = mathSign(attraction.get());
1373
- attraction.normalize().multiply(magnitude).subtract(velocity);
1374
- applyForce(attraction);
1375
- return self;
1376
- }
1377
-
1378
- function settle(v) {
1379
- var diff = v.get() - location.get();
1380
- var hasSettled = !roundToTwoDecimals(diff);
1381
- if (hasSettled) location.set(v);
1382
- return hasSettled;
1383
- }
1384
-
1385
- function direction() {
1386
- return attractionDirection;
1387
- }
1388
-
1389
- function useBaseSpeed() {
1390
- return useSpeed(baseSpeed);
1391
- }
1392
-
1393
- function useBaseMass() {
1394
- return useMass(baseMass);
1395
- }
1396
-
1397
- function useSpeed(n) {
1398
- speed = n;
1399
- return self;
1400
- }
1401
-
1402
- function useMass(n) {
1403
- mass = n;
1404
- return self;
1405
- }
1406
-
1407
- var self = {
1408
- direction: direction,
1409
- seek: seek,
1410
- settle: settle,
1411
- update: update,
1412
- useBaseMass: useBaseMass,
1413
- useBaseSpeed: useBaseSpeed,
1414
- useMass: useMass,
1415
- useSpeed: useSpeed
1416
- };
1417
- return self;
1418
- }
1419
-
1420
- function ScrollBounds(limit, location, target, scrollBody) {
1421
- var pullBackThreshold = 10;
1422
- var disabled = false;
1423
-
1424
- function shouldConstrain() {
1425
- if (disabled) return false;
1426
- if (!limit.reachedAny(target.get())) return false;
1427
- if (!limit.reachedAny(location.get())) return false;
1428
- return true;
1429
- }
1430
-
1431
- function constrain(pointerDown) {
1432
- if (!shouldConstrain()) return;
1433
- var friction = pointerDown ? 0.7 : 0.45;
1434
- var diffToTarget = target.get() - location.get();
1435
- target.subtract(diffToTarget * friction);
1436
-
1437
- if (!pointerDown && Math.abs(diffToTarget) < pullBackThreshold) {
1438
- target.set(limit.constrain(target.get()));
1439
- scrollBody.useSpeed(10).useMass(3);
1440
- }
1441
- }
1442
-
1443
- function toggleActive(active) {
1444
- disabled = !active;
1445
- }
1446
-
1447
- var self = {
1448
- constrain: constrain,
1449
- toggleActive: toggleActive
1450
- };
1451
- return self;
1452
- }
1453
-
1454
- function ScrollContain(viewSize, contentSize, snaps, snapsAligned, containScroll) {
1455
- var scrollBounds = Limit(-contentSize + viewSize, snaps[0]);
1456
- var snapsBounded = snapsAligned.map(scrollBounds.constrain);
1457
- var snapsContained = measureContained();
1458
-
1459
- function findDuplicates() {
1460
- var startSnap = snapsBounded[0];
1461
- var endSnap = arrayLast(snapsBounded);
1462
- var min = snapsBounded.lastIndexOf(startSnap);
1463
- var max = snapsBounded.indexOf(endSnap) + 1;
1464
- return Limit(min, max);
1465
- }
1466
-
1467
- function measureContained() {
1468
- if (contentSize <= viewSize) return [scrollBounds.max];
1469
- if (containScroll === 'keepSnaps') return snapsBounded;
1470
-
1471
- var _a = findDuplicates(),
1472
- min = _a.min,
1473
- max = _a.max;
1474
-
1475
- return snapsBounded.slice(min, max);
1476
- }
1477
-
1478
- var self = {
1479
- snapsContained: snapsContained
1480
- };
1481
- return self;
1482
- }
1483
-
1484
- function ScrollLimit(contentSize, scrollSnaps, loop) {
1485
- var limit = measureLimit();
1486
-
1487
- function measureLimit() {
1488
- var startSnap = scrollSnaps[0];
1489
- var endSnap = arrayLast(scrollSnaps);
1490
- var min = loop ? startSnap - contentSize : endSnap;
1491
- var max = startSnap;
1492
- return Limit(min, max);
1493
- }
1494
-
1495
- var self = {
1496
- limit: limit
1497
- };
1498
- return self;
1499
- }
1500
-
1501
- function ScrollLooper(contentSize, pxToPercent, limit, location, vectors) {
1502
- var min = limit.min + pxToPercent.measure(0.1);
1503
- var max = limit.max + pxToPercent.measure(0.1);
1504
-
1505
- var _a = Limit(min, max),
1506
- reachedMin = _a.reachedMin,
1507
- reachedMax = _a.reachedMax;
1508
-
1509
- function shouldLoop(direction) {
1510
- if (direction === 1) return reachedMax(location.get());
1511
- if (direction === -1) return reachedMin(location.get());
1512
- return false;
1513
- }
1514
-
1515
- function loop(direction) {
1516
- if (!shouldLoop(direction)) return;
1517
- var loopDistance = contentSize * (direction * -1);
1518
- vectors.forEach(function (v) {
1519
- return v.add(loopDistance);
1520
- });
1521
- }
1522
-
1523
- var self = {
1524
- loop: loop
1525
- };
1526
- return self;
1527
- }
1528
-
1529
- function ScrollProgress(limit) {
1530
- var max = limit.max,
1531
- scrollLength = limit.length;
1532
-
1533
- function get(n) {
1534
- var currentLocation = n - max;
1535
- return currentLocation / -scrollLength;
1536
- }
1537
-
1538
- var self = {
1539
- get: get
1540
- };
1541
- return self;
1542
- }
1543
-
1544
- function ScrollSnap(axis, alignment, pxToPercent, containerRect, slideRects, slidesToScroll) {
1545
- var startEdge = axis.startEdge,
1546
- endEdge = axis.endEdge;
1547
- var snaps = measureUnaligned();
1548
- var snapsAligned = measureAligned();
1549
-
1550
- function measureSizes() {
1551
- return groupArray(slideRects, slidesToScroll).map(function (rects) {
1552
- return arrayLast(rects)[endEdge] - rects[0][startEdge];
1553
- }).map(pxToPercent.measure).map(Math.abs);
1554
- }
1555
-
1556
- function measureUnaligned() {
1557
- return slideRects.map(function (rect) {
1558
- return containerRect[startEdge] - rect[startEdge];
1559
- }).map(pxToPercent.measure).map(function (snap) {
1560
- return -Math.abs(snap);
1561
- });
1562
- }
1563
-
1564
- function measureAligned() {
1565
- var groupedSnaps = groupArray(snaps, slidesToScroll).map(function (g) {
1566
- return g[0];
1567
- });
1568
- var alignments = measureSizes().map(alignment.measure);
1569
- return groupedSnaps.map(function (snap, index) {
1570
- return snap + alignments[index];
1571
- });
1572
- }
1573
-
1574
- var self = {
1575
- snaps: snaps,
1576
- snapsAligned: snapsAligned
1577
- };
1578
- return self;
1579
- }
1580
-
1581
- function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
1582
- var reachedAny = limit.reachedAny,
1583
- removeOffset = limit.removeOffset,
1584
- constrain = limit.constrain;
1585
-
1586
- function minDistance(d1, d2) {
1587
- return Math.abs(d1) < Math.abs(d2) ? d1 : d2;
1588
- }
1589
-
1590
- function findTargetSnap(target) {
1591
- var distance = loop ? removeOffset(target) : constrain(target);
1592
- var ascDiffsToSnaps = scrollSnaps.map(function (scrollSnap) {
1593
- return scrollSnap - distance;
1594
- }).map(function (diffToSnap) {
1595
- return shortcut(diffToSnap, 0);
1596
- }).map(function (diff, i) {
1597
- return {
1598
- diff: diff,
1599
- index: i
1600
- };
1601
- }).sort(function (d1, d2) {
1602
- return Math.abs(d1.diff) - Math.abs(d2.diff);
1603
- });
1604
- var index = ascDiffsToSnaps[0].index;
1605
- return {
1606
- index: index,
1607
- distance: distance
1608
- };
1609
- }
1610
-
1611
- function shortcut(target, direction) {
1612
- var t1 = target;
1613
- var t2 = target + contentSize;
1614
- var t3 = target - contentSize;
1615
- if (!loop) return t1;
1616
- if (!direction) return minDistance(minDistance(t1, t2), t3);
1617
- var shortest = minDistance(t1, direction === 1 ? t2 : t3);
1618
- return Math.abs(shortest) * direction;
1619
- }
1620
-
1621
- function byIndex(index, direction) {
1622
- var diffToSnap = scrollSnaps[index] - targetVector.get();
1623
- var distance = shortcut(diffToSnap, direction);
1624
- return {
1625
- index: index,
1626
- distance: distance
1627
- };
1628
- }
1629
-
1630
- function byDistance(distance, snap) {
1631
- var target = targetVector.get() + distance;
1632
-
1633
- var _a = findTargetSnap(target),
1634
- index = _a.index,
1635
- targetSnapDistance = _a.distance;
1636
-
1637
- var reachedBound = !loop && reachedAny(target);
1638
- if (!snap || reachedBound) return {
1639
- index: index,
1640
- distance: distance
1641
- };
1642
- var diffToSnap = scrollSnaps[index] - targetSnapDistance;
1643
- var snapDistance = distance + shortcut(diffToSnap, 0);
1644
- return {
1645
- index: index,
1646
- distance: snapDistance
1647
- };
1648
- }
1649
-
1650
- var self = {
1651
- byDistance: byDistance,
1652
- byIndex: byIndex,
1653
- shortcut: shortcut
1654
- };
1655
- return self;
1656
- }
1657
-
1658
- function ScrollTo(animation, indexCurrent, indexPrevious, scrollTarget, targetVector, events) {
1659
- function scrollTo(target) {
1660
- var distanceDiff = target.distance;
1661
- var indexDiff = target.index !== indexCurrent.get();
1662
-
1663
- if (distanceDiff) {
1664
- animation.start();
1665
- targetVector.add(distanceDiff);
1666
- }
1667
-
1668
- if (indexDiff) {
1669
- indexPrevious.set(indexCurrent.get());
1670
- indexCurrent.set(target.index);
1671
- events.emit('select');
1672
- }
1673
- }
1674
-
1675
- function distance(n, snap) {
1676
- var target = scrollTarget.byDistance(n, snap);
1677
- scrollTo(target);
1678
- }
1679
-
1680
- function index(n, direction) {
1681
- var targetIndex = indexCurrent.clone().set(n);
1682
- var target = scrollTarget.byIndex(targetIndex.get(), direction);
1683
- scrollTo(target);
1684
- }
1685
-
1686
- var self = {
1687
- distance: distance,
1688
- index: index
1689
- };
1690
- return self;
1691
- }
1692
-
1693
- function SlideLooper(axis, viewSize, contentSize, slideSizesWithGaps, scrollSnaps, slidesInView, scrollLocation, slides) {
1694
- var ascItems = arrayKeys(slideSizesWithGaps);
1695
- var descItems = arrayKeys(slideSizesWithGaps).reverse();
1696
- var loopPoints = startPoints().concat(endPoints());
1697
-
1698
- function removeSlideSizes(indexes, from) {
1699
- return indexes.reduce(function (a, i) {
1700
- return a - slideSizesWithGaps[i];
1701
- }, from);
1702
- }
1703
-
1704
- function slidesInGap(indexes, gap) {
1705
- return indexes.reduce(function (a, i) {
1706
- var remainingGap = removeSlideSizes(a, gap);
1707
- return remainingGap > 0 ? a.concat([i]) : a;
1708
- }, []);
1709
- }
1710
-
1711
- function findLoopPoints(indexes, edge) {
1712
- var isStartEdge = edge === 'start';
1713
- var offset = isStartEdge ? -contentSize : contentSize;
1714
- var slideBounds = slidesInView.findSlideBounds(offset);
1715
- return indexes.map(function (index) {
1716
- var initial = isStartEdge ? 0 : -contentSize;
1717
- var altered = isStartEdge ? contentSize : 0;
1718
- var bounds = slideBounds.filter(function (b) {
1719
- return b.index === index;
1720
- })[0];
1721
- var point = bounds[isStartEdge ? 'end' : 'start'];
1722
-
1723
- var getTarget = function getTarget() {
1724
- return scrollLocation.get() > point ? initial : altered;
1725
- };
1726
-
1727
- return {
1728
- point: point,
1729
- getTarget: getTarget,
1730
- index: index,
1731
- location: -1
1732
- };
1733
- });
1734
- }
1735
-
1736
- function startPoints() {
1737
- var gap = scrollSnaps[0] - 1;
1738
- var indexes = slidesInGap(descItems, gap);
1739
- return findLoopPoints(indexes, 'end');
1740
- }
1741
-
1742
- function endPoints() {
1743
- var gap = viewSize - scrollSnaps[0] - 1;
1744
- var indexes = slidesInGap(ascItems, gap);
1745
- return findLoopPoints(indexes, 'start');
1746
- }
1747
-
1748
- function canLoop() {
1749
- return loopPoints.every(function (_a) {
1750
- var index = _a.index;
1751
- var otherIndexes = ascItems.filter(function (i) {
1752
- return i !== index;
1753
- });
1754
- return removeSlideSizes(otherIndexes, viewSize) <= 0;
1755
- });
1756
- }
1757
-
1758
- function loop() {
1759
- loopPoints.forEach(function (loopPoint) {
1760
- var getTarget = loopPoint.getTarget,
1761
- location = loopPoint.location,
1762
- index = loopPoint.index;
1763
- var target = getTarget();
1764
-
1765
- if (target !== location) {
1766
- slides[index].style[axis.startEdge] = target + "%";
1767
- loopPoint.location = target;
1768
- }
1769
- });
1770
- }
1771
-
1772
- function clear() {
1773
- loopPoints.forEach(function (_a) {
1774
- var index = _a.index;
1775
- slides[index].style[axis.startEdge] = '';
1776
- });
1777
- }
1778
-
1779
- var self = {
1780
- canLoop: canLoop,
1781
- clear: clear,
1782
- loop: loop,
1783
- loopPoints: loopPoints
1784
- };
1785
- return self;
1786
- }
1787
-
1788
- function SlideFocus(rootNode, scrollTo, slidesToScroll) {
1789
- var eventStore = EventStore();
1790
- var removeAllEvents = eventStore.removeAll;
1791
- var lastTabPressTime = 0;
1792
-
1793
- function registerTabPress(event) {
1794
- if (event.keyCode !== 9) return;
1795
- lastTabPressTime = new Date().getTime();
1796
- }
1797
-
1798
- function addFocusEvent(slide, index) {
1799
- var focus = function focus() {
1800
- var nowTime = new Date().getTime();
1801
- var diffTime = nowTime - lastTabPressTime;
1802
- if (diffTime > 10) return;
1803
- rootNode.scrollLeft = 0;
1804
- var selectedIndex = Math.floor(index / slidesToScroll);
1805
- scrollTo.index(selectedIndex, 0);
1806
- };
1807
-
1808
- eventStore.add(slide, 'focus', focus, true);
1809
- }
1810
-
1811
- function addActivationEvents(slides) {
1812
- eventStore.add(document, 'keydown', registerTabPress, false);
1813
- slides.forEach(addFocusEvent);
1814
- }
1815
-
1816
- var self = {
1817
- addActivationEvents: addActivationEvents,
1818
- removeAllEvents: removeAllEvents
1819
- };
1820
- return self;
1821
- }
1822
-
1823
- function SlidesInView(viewSize, contentSize, slideSizes, snaps, loop, inViewThreshold) {
1824
- var threshold = Math.min(Math.max(inViewThreshold, 0.01), 0.99);
1825
- var offsets = loop ? [0, contentSize, -contentSize] : [0];
1826
- var slideBounds = offsets.reduce(function (a, offset) {
1827
- return a.concat(findSlideBounds(offset, threshold));
1828
- }, []);
1829
-
1830
- function findSlideBounds(offset, threshold) {
1831
- var thresholds = slideSizes.map(function (s) {
1832
- return s * (threshold || 0);
1833
- });
1834
- return snaps.map(function (snap, index) {
1835
- return {
1836
- start: snap - slideSizes[index] + thresholds[index] + offset,
1837
- end: snap + viewSize - thresholds[index] + offset,
1838
- index: index
1839
- };
1840
- });
1841
- }
1842
-
1843
- function check(location) {
1844
- return slideBounds.reduce(function (list, slideBound) {
1845
- var index = slideBound.index,
1846
- start = slideBound.start,
1847
- end = slideBound.end;
1848
- var inList = list.indexOf(index) !== -1;
1849
- var inView = start < location && end > location;
1850
- return !inList && inView ? list.concat([index]) : list;
1851
- }, []);
1852
- }
1853
-
1854
- var self = {
1855
- check: check,
1856
- findSlideBounds: findSlideBounds
1857
- };
1858
- return self;
1859
- }
1860
-
1861
- function SlideSizes(axis, pxToPercent, slides, slideRects, loop) {
1862
- var measureSize = axis.measureSize,
1863
- startEdge = axis.startEdge,
1864
- endEdge = axis.endEdge;
1865
- var sizesInPx = slideRects.map(measureSize);
1866
- var slideSizes = sizesInPx.map(pxToPercent.measure);
1867
- var slideSizesWithGaps = measureWithGaps();
1868
-
1869
- function measureWithGaps() {
1870
- return slideRects.map(function (rect, index, rects) {
1871
- var isLast = index === lastIndex(rects);
1872
- var style = window.getComputedStyle(arrayLast(slides));
1873
- var endGap = parseFloat(style.getPropertyValue("margin-" + endEdge));
1874
- if (isLast) return sizesInPx[index] + (loop ? endGap : 0);
1875
- return rects[index + 1][startEdge] - rect[startEdge];
1876
- }).map(pxToPercent.measure).map(Math.abs);
1877
- }
1878
-
1879
- var self = {
1880
- slideSizes: slideSizes,
1881
- slideSizesWithGaps: slideSizesWithGaps
1882
- };
1883
- return self;
1884
- }
1885
-
1886
- function Translate(axis, direction, container) {
1887
- var containerStyle = container.style;
1888
- var translate = axis.scroll === 'x' ? x : y;
1889
- var disabled = false;
1890
-
1891
- function x(n) {
1892
- return "translate3d(" + n + "%,0px,0px)";
1893
- }
1894
-
1895
- function y(n) {
1896
- return "translate3d(0px," + n + "%,0px)";
1897
- }
1898
-
1899
- function to(target) {
1900
- if (disabled) return;
1901
- containerStyle.transform = translate(direction.applyTo(target.get()));
1902
- }
1903
-
1904
- function toggleActive(active) {
1905
- disabled = !active;
1906
- }
1907
-
1908
- function clear() {
1909
- containerStyle.transform = '';
1910
- }
1911
-
1912
- var self = {
1913
- clear: clear,
1914
- to: to,
1915
- toggleActive: toggleActive
1916
- };
1917
- return self;
1918
- }
1919
-
1920
- function Engine(root, container, slides, options, events) {
1921
- // Options
1922
- var align = options.align,
1923
- scrollAxis = options.axis,
1924
- contentDirection = options.direction,
1925
- startIndex = options.startIndex,
1926
- inViewThreshold = options.inViewThreshold,
1927
- loop = options.loop,
1928
- speed = options.speed,
1929
- dragFree = options.dragFree,
1930
- slidesToScroll = options.slidesToScroll,
1931
- skipSnaps = options.skipSnaps,
1932
- containScroll = options.containScroll; // Measurements
1933
-
1934
- var containerRect = container.getBoundingClientRect();
1935
- var slideRects = slides.map(function (slide) {
1936
- return slide.getBoundingClientRect();
1937
- });
1938
- var direction = Direction(contentDirection);
1939
- var axis = Axis(scrollAxis, contentDirection);
1940
- var pxToPercent = PxToPercent(axis.measureSize(containerRect));
1941
- var viewSize = pxToPercent.totalPercent;
1942
- var alignment = Alignment(align, viewSize);
1943
-
1944
- var _a = SlideSizes(axis, pxToPercent, slides, slideRects, loop),
1945
- slideSizes = _a.slideSizes,
1946
- slideSizesWithGaps = _a.slideSizesWithGaps;
1947
-
1948
- var _b = ScrollSnap(axis, alignment, pxToPercent, containerRect, slideRects, slidesToScroll),
1949
- snaps = _b.snaps,
1950
- snapsAligned = _b.snapsAligned;
1951
-
1952
- var contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);
1953
- var snapsContained = ScrollContain(viewSize, contentSize, snaps, snapsAligned, containScroll).snapsContained;
1954
- var contain = !loop && containScroll !== '';
1955
- var scrollSnaps = contain ? snapsContained : snapsAligned;
1956
- var limit = ScrollLimit(contentSize, scrollSnaps, loop).limit; // Indexes
1957
-
1958
- var index = Counter(lastIndex(scrollSnaps), startIndex, loop);
1959
- var indexPrevious = index.clone();
1960
- var slideIndexes = arrayKeys(slides); // Draw
1961
-
1962
- var update = function update() {
1963
- if (!loop) engine.scrollBounds.constrain(engine.dragHandler.pointerDown());
1964
- engine.scrollBody.seek(target).update();
1965
- var settled = engine.scrollBody.settle(target);
1966
-
1967
- if (settled && !engine.dragHandler.pointerDown()) {
1968
- engine.animation.stop();
1969
- events.emit('settle');
1970
- }
1971
-
1972
- if (!settled) {
1973
- events.emit('scroll');
1974
- }
1975
-
1976
- if (loop) {
1977
- engine.scrollLooper.loop(engine.scrollBody.direction());
1978
- engine.slideLooper.loop();
1979
- }
1980
-
1981
- engine.translate.to(location);
1982
- engine.animation.proceed();
1983
- }; // Shared
1984
-
1985
-
1986
- var animation = Animation(update);
1987
- var startLocation = scrollSnaps[index.get()];
1988
- var location = Vector1D(startLocation);
1989
- var target = Vector1D(startLocation);
1990
- var scrollBody = ScrollBody(location, speed, 1);
1991
- var scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
1992
- var scrollTo = ScrollTo(animation, index, indexPrevious, scrollTarget, target, events);
1993
- var slidesInView = SlidesInView(viewSize, contentSize, slideSizes, snaps, loop, inViewThreshold); // DragHandler
1994
-
1995
- var dragHandler = DragHandler(axis, direction, root, target, dragFree, DragTracker(axis, pxToPercent), location, animation, scrollTo, scrollBody, scrollTarget, index, events, loop, skipSnaps); // Slider
1996
-
1997
- var engine = {
1998
- animation: animation,
1999
- axis: axis,
2000
- direction: direction,
2001
- dragHandler: dragHandler,
2002
- pxToPercent: pxToPercent,
2003
- index: index,
2004
- indexPrevious: indexPrevious,
2005
- limit: limit,
2006
- location: location,
2007
- options: options,
2008
- scrollBody: scrollBody,
2009
- scrollBounds: ScrollBounds(limit, location, target, scrollBody),
2010
- scrollLooper: ScrollLooper(contentSize, pxToPercent, limit, location, [location, target]),
2011
- scrollProgress: ScrollProgress(limit),
2012
- scrollSnaps: scrollSnaps,
2013
- scrollTarget: scrollTarget,
2014
- scrollTo: scrollTo,
2015
- slideFocus: SlideFocus(root, scrollTo, slidesToScroll),
2016
- slideLooper: SlideLooper(axis, viewSize, contentSize, slideSizesWithGaps, scrollSnaps, slidesInView, location, slides),
2017
- slidesInView: slidesInView,
2018
- slideIndexes: slideIndexes,
2019
- target: target,
2020
- translate: Translate(axis, direction, container)
2021
- };
2022
- return engine;
2023
- }
2024
-
2025
- function EventEmitter() {
2026
- var listeners = {};
2027
-
2028
- function getListeners(evt) {
2029
- var eventListeners = listeners[evt];
2030
- return eventListeners || [];
2031
- }
2032
-
2033
- function emit(evt) {
2034
- getListeners(evt).forEach(function (e) {
2035
- return e(evt);
2036
- });
2037
- return self;
2038
- }
2039
-
2040
- function on(evt, cb) {
2041
- listeners[evt] = getListeners(evt).concat([cb]);
2042
- return self;
2043
- }
2044
-
2045
- function off(evt, cb) {
2046
- listeners[evt] = getListeners(evt).filter(function (e) {
2047
- return e !== cb;
2048
- });
2049
- return self;
2050
- }
2051
-
2052
- var self = {
2053
- emit: emit,
2054
- off: off,
2055
- on: on
2056
- };
2057
- return self;
2058
- }
2059
-
2060
- var defaultOptions = {
2061
- align: 'center',
2062
- axis: 'x',
2063
- containScroll: '',
2064
- direction: 'ltr',
2065
- dragFree: false,
2066
- draggable: true,
2067
- draggableClass: 'is-draggable',
2068
- draggingClass: 'is-dragging',
2069
- inViewThreshold: 0,
2070
- loop: false,
2071
- skipSnaps: true,
2072
- selectedClass: 'is-selected',
2073
- slidesToScroll: 1,
2074
- speed: 10,
2075
- startIndex: 0
2076
- };
2077
-
2078
- function OptionsPseudo(node) {
2079
- var pseudoString = getComputedStyle(node, ':before').content;
2080
-
2081
- function get() {
2082
- try {
2083
- return JSON.parse(pseudoString.slice(1, -1).replace(/\\/g, ''));
2084
- } catch (error) {} // eslint-disable-line no-empty
2085
-
2086
-
2087
- return {};
2088
- }
2089
-
2090
- var self = {
2091
- get: get
2092
- };
2093
- return self;
2094
- }
2095
-
2096
- function EmblaCarousel(sliderRoot, userOptions) {
2097
- var events = EventEmitter();
2098
- var eventStore = EventStore();
2099
- var debouncedResize = debounce(resize, 500);
2100
- var reInit = reActivate;
2101
- var on = events.on,
2102
- off = events.off;
2103
- var engine;
2104
- var activated = false;
2105
-
2106
- var optionsBase = _extends({}, defaultOptions);
2107
-
2108
- var options = _extends({}, optionsBase);
2109
-
2110
- var optionsPseudo;
2111
- var rootNodeSize = 0;
2112
- var container;
2113
- var slides;
2114
- activate(userOptions);
2115
-
2116
- function setupElements() {
2117
- if (!sliderRoot) throw new Error('Missing root node 😢');
2118
- var sliderContainer = sliderRoot.querySelector('*');
2119
- if (!sliderContainer) throw new Error('Missing container node 😢');
2120
- container = sliderContainer;
2121
- slides = Array.prototype.slice.call(container.children);
2122
- optionsPseudo = OptionsPseudo(sliderRoot);
2123
- }
2124
-
2125
- function activate(partialOptions) {
2126
- setupElements();
2127
- optionsBase = _extends({}, optionsBase, partialOptions);
2128
- options = _extends({}, optionsBase, optionsPseudo.get());
2129
- engine = Engine(sliderRoot, container, slides, options, events);
2130
- eventStore.add(window, 'resize', debouncedResize);
2131
- engine.translate.to(engine.location);
2132
- rootNodeSize = engine.axis.measureSize(sliderRoot.getBoundingClientRect());
2133
-
2134
- if (options.loop) {
2135
- if (!engine.slideLooper.canLoop()) {
2136
- deActivate();
2137
- return activate({
2138
- loop: false
2139
- });
2140
- }
2141
-
2142
- engine.slideLooper.loop();
2143
- }
2144
-
2145
- if (options.draggable && container.offsetParent && slides.length) {
2146
- engine.dragHandler.addActivationEvents();
2147
-
2148
- if (options.draggableClass) {
2149
- addClass(sliderRoot, options.draggableClass);
2150
- }
2151
-
2152
- if (options.draggingClass) {
2153
- events.on('pointerDown', toggleDraggingClass).on('pointerUp', toggleDraggingClass);
2154
- }
2155
- }
2156
-
2157
- if (slides.length) {
2158
- engine.slideFocus.addActivationEvents(slides);
2159
- }
2160
-
2161
- if (options.selectedClass) {
2162
- toggleSelectedClass();
2163
- events.on('select', toggleSelectedClass).on('pointerUp', toggleSelectedClass);
2164
- }
2165
-
2166
- if (!activated) {
2167
- setTimeout(function () {
2168
- return events.emit('init');
2169
- }, 0);
2170
- activated = true;
2171
- }
2172
- }
2173
-
2174
- function toggleDraggingClass(evt) {
2175
- var draggingClass = options.draggingClass;
2176
- if (evt === 'pointerDown') addClass(sliderRoot, draggingClass);else removeClass(sliderRoot, draggingClass);
2177
- }
2178
-
2179
- function toggleSelectedClass() {
2180
- var selectedClass = options.selectedClass;
2181
- var inView = slidesInView(true);
2182
- var notInView = slidesNotInView(true);
2183
- notInView.forEach(function (index) {
2184
- return removeClass(slides[index], selectedClass);
2185
- });
2186
- inView.forEach(function (index) {
2187
- return addClass(slides[index], selectedClass);
2188
- });
2189
- }
2190
-
2191
- function deActivate() {
2192
- engine.dragHandler.removeAllEvents();
2193
- engine.slideFocus.removeAllEvents();
2194
- engine.animation.stop();
2195
- eventStore.removeAll();
2196
- engine.translate.clear();
2197
- engine.slideLooper.clear();
2198
- removeClass(sliderRoot, options.draggableClass);
2199
- slides.forEach(function (slide) {
2200
- return removeClass(slide, options.selectedClass);
2201
- });
2202
- events.off('select', toggleSelectedClass).off('pointerUp', toggleSelectedClass).off('pointerDown', toggleDraggingClass).off('pointerUp', toggleDraggingClass);
2203
- }
2204
-
2205
- function reActivate(partialOptions) {
2206
- if (!activated) return;
2207
- var startIndex = selectedScrollSnap();
2208
-
2209
- var newOptions = _extends({
2210
- startIndex: startIndex
2211
- }, partialOptions);
2212
-
2213
- deActivate();
2214
- activate(newOptions);
2215
- events.emit('reInit');
2216
- }
2217
-
2218
- function destroy() {
2219
- if (!activated) return;
2220
- deActivate();
2221
- activated = false;
2222
- events.emit('destroy');
2223
- }
2224
-
2225
- function resize() {
2226
- if (!activated) return;
2227
- var size = engine.axis.measureSize(sliderRoot.getBoundingClientRect());
2228
- if (rootNodeSize !== size) reActivate();
2229
- events.emit('resize');
2230
- }
2231
-
2232
- function slidesInView(target) {
2233
- var location = engine[target ? 'target' : 'location'].get();
2234
- var type = options.loop ? 'removeOffset' : 'constrain';
2235
- return engine.slidesInView.check(engine.limit[type](location));
2236
- }
2237
-
2238
- function slidesNotInView(target) {
2239
- var inView = slidesInView(target);
2240
- return engine.slideIndexes.filter(function (index) {
2241
- return inView.indexOf(index) === -1;
2242
- });
2243
- }
2244
-
2245
- function scrollTo(index, jump, direction) {
2246
- engine.scrollBody.useBaseMass().useSpeed(jump ? 100 : options.speed);
2247
- if (activated) engine.scrollTo.index(index, direction || 0);
2248
- }
2249
-
2250
- function scrollNext(jump) {
2251
- var next = engine.index.clone().add(1);
2252
- scrollTo(next.get(), jump === true, -1);
2253
- }
2254
-
2255
- function scrollPrev(jump) {
2256
- var prev = engine.index.clone().add(-1);
2257
- scrollTo(prev.get(), jump === true, 1);
2258
- }
2259
-
2260
- function canScrollNext() {
2261
- var next = engine.index.clone().add(1);
2262
- return next.get() !== selectedScrollSnap();
2263
- }
2264
-
2265
- function canScrollPrev() {
2266
- var prev = engine.index.clone().add(-1);
2267
- return prev.get() !== selectedScrollSnap();
2268
- }
2269
-
2270
- function scrollSnapList() {
2271
- return engine.scrollSnaps.map(engine.scrollProgress.get);
2272
- }
2273
-
2274
- function scrollProgress() {
2275
- return engine.scrollProgress.get(engine.location.get());
2276
- }
2277
-
2278
- function selectedScrollSnap() {
2279
- return engine.index.get();
2280
- }
2281
-
2282
- function previousScrollSnap() {
2283
- return engine.indexPrevious.get();
2284
- }
2285
-
2286
- function clickAllowed() {
2287
- return engine.dragHandler.clickAllowed();
2288
- }
2289
-
2290
- function dangerouslyGetEngine() {
2291
- return engine;
2292
- }
2293
-
2294
- function rootNode() {
2295
- return sliderRoot;
2296
- }
2297
-
2298
- function containerNode() {
2299
- return container;
2300
- }
2301
-
2302
- function slideNodes() {
2303
- return slides;
2304
- }
2305
-
2306
- var self = {
2307
- canScrollNext: canScrollNext,
2308
- canScrollPrev: canScrollPrev,
2309
- clickAllowed: clickAllowed,
2310
- containerNode: containerNode,
2311
- dangerouslyGetEngine: dangerouslyGetEngine,
2312
- destroy: destroy,
2313
- off: off,
2314
- on: on,
2315
- previousScrollSnap: previousScrollSnap,
2316
- reInit: reInit,
2317
- rootNode: rootNode,
2318
- scrollNext: scrollNext,
2319
- scrollPrev: scrollPrev,
2320
- scrollProgress: scrollProgress,
2321
- scrollSnapList: scrollSnapList,
2322
- scrollTo: scrollTo,
2323
- selectedScrollSnap: selectedScrollSnap,
2324
- slideNodes: slideNodes,
2325
- slidesInView: slidesInView,
2326
- slidesNotInView: slidesNotInView
2327
- };
2328
- return self;
2329
- }
2330
-
2331
- function useEmblaCarousel(options) {
2332
- if (options === void 0) {
2333
- options = {};
2334
- }
2335
-
2336
- var _a = useState(),
2337
- embla = _a[0],
2338
- setEmbla = _a[1];
2339
-
2340
- var _b = useState(),
2341
- viewport = _b[0],
2342
- setViewport = _b[1];
2343
-
2344
- var storedOptions = useRef(options);
2345
- var activeOptions = useMemo(function () {
2346
- if (!areEqualShallow(storedOptions.current, options)) {
2347
- storedOptions.current = options;
2348
- }
2349
-
2350
- return storedOptions.current;
2351
- }, [storedOptions, options]);
2352
- useEffect(function () {
2353
- if (canUseDOM() && viewport) {
2354
- var newEmbla_1 = EmblaCarousel(viewport, activeOptions);
2355
- setEmbla(newEmbla_1);
2356
- return function () {
2357
- return newEmbla_1.destroy();
2358
- };
2359
- } else {
2360
- setEmbla(undefined);
2361
- }
2362
- }, [viewport, activeOptions, setEmbla]);
2363
- return [setViewport, embla];
2364
- }
2365
-
2366
- var iterator$4 = wellKnownSymbolWrapped.f('iterator');
2367
-
2368
- var iterator$3 = iterator$4;
2369
-
2370
- var iterator$2 = iterator$3;
2371
-
2372
- var iterator$1 = iterator$2;
2373
-
2374
- var iterator = iterator$1;
2375
-
2376
- function _typeof(obj) {
2377
- "@babel/helpers - typeof";
2378
-
2379
- if (typeof symbol === "function" && typeof iterator === "symbol") {
2380
- _typeof = function _typeof(obj) {
2381
- return typeof obj;
2382
- };
2383
- } else {
2384
- _typeof = function _typeof(obj) {
2385
- return obj && typeof symbol === "function" && obj.constructor === symbol && obj !== symbol.prototype ? "symbol" : typeof obj;
2386
- };
2387
- }
2388
-
2389
- return _typeof(obj);
2390
- }
2391
-
2392
- var redefineAll = function (target, src, options) {
2393
- for (var key in src) {
2394
- if (options && options.unsafe && target[key]) target[key] = src[key];
2395
- else redefine(target, key, src[key], options);
2396
- } return target;
2397
- };
2398
-
2399
- var TypeError$2 = global_1.TypeError;
2400
-
2401
- var Result = function (stopped, result) {
2402
- this.stopped = stopped;
2403
- this.result = result;
2404
- };
2405
-
2406
- var ResultPrototype = Result.prototype;
2407
-
2408
- var iterate = function (iterable, unboundFunction, options) {
2409
- var that = options && options.that;
2410
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2411
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2412
- var INTERRUPTED = !!(options && options.INTERRUPTED);
2413
- var fn = functionBindContext(unboundFunction, that);
2414
- var iterator, iterFn, index, length, result, next, step;
2415
-
2416
- var stop = function (condition) {
2417
- if (iterator) iteratorClose(iterator, 'normal', condition);
2418
- return new Result(true, condition);
2419
- };
2420
-
2421
- var callFn = function (value) {
2422
- if (AS_ENTRIES) {
2423
- anObject(value);
2424
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2425
- } return INTERRUPTED ? fn(value, stop) : fn(value);
2426
- };
2427
-
2428
- if (IS_ITERATOR) {
2429
- iterator = iterable;
2430
- } else {
2431
- iterFn = getIteratorMethod$4(iterable);
2432
- if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
2433
- // optimisation for array iterators
2434
- if (isArrayIteratorMethod(iterFn)) {
2435
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2436
- result = callFn(iterable[index]);
2437
- if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
2438
- } return new Result(false);
2439
- }
2440
- iterator = getIterator(iterable, iterFn);
2441
- }
2442
-
2443
- next = iterator.next;
2444
- while (!(step = functionCall(next, iterator)).done) {
2445
- try {
2446
- result = callFn(step.value);
2447
- } catch (error) {
2448
- iteratorClose(iterator, 'throw', error);
2449
- }
2450
- if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
2451
- } return new Result(false);
2452
- };
2453
-
2454
- var TypeError$1 = global_1.TypeError;
2455
-
2456
- var anInstance = function (it, Prototype) {
2457
- if (objectIsPrototypeOf(Prototype, it)) return it;
2458
- throw TypeError$1('Incorrect invocation');
2459
- };
2460
-
2461
- var defineProperty = objectDefineProperty.f;
2462
- var forEach = arrayIteration.forEach;
2463
-
2464
-
2465
-
2466
- var setInternalState$1 = internalState.set;
2467
- var internalStateGetterFor$1 = internalState.getterFor;
2468
-
2469
- var collection = function (CONSTRUCTOR_NAME, wrapper, common) {
2470
- var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
2471
- var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
2472
- var ADDER = IS_MAP ? 'set' : 'add';
2473
- var NativeConstructor = global_1[CONSTRUCTOR_NAME];
2474
- var NativePrototype = NativeConstructor && NativeConstructor.prototype;
2475
- var exported = {};
2476
- var Constructor;
2477
-
2478
- if (!descriptors || !isCallable(NativeConstructor)
2479
- || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))
2480
- ) {
2481
- // create collection constructor
2482
- Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
2483
- internalMetadata.enable();
2484
- } else {
2485
- Constructor = wrapper(function (target, iterable) {
2486
- setInternalState$1(anInstance(target, Prototype), {
2487
- type: CONSTRUCTOR_NAME,
2488
- collection: new NativeConstructor()
2489
- });
2490
- if (iterable != undefined) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });
2491
- });
2492
-
2493
- var Prototype = Constructor.prototype;
2494
-
2495
- var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME);
2496
-
2497
- forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {
2498
- var IS_ADDER = KEY == 'add' || KEY == 'set';
2499
- if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {
2500
- createNonEnumerableProperty(Prototype, KEY, function (a, b) {
2501
- var collection = getInternalState(this).collection;
2502
- if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
2503
- var result = collection[KEY](a === 0 ? 0 : a, b);
2504
- return IS_ADDER ? this : result;
2505
- });
2506
- }
2507
- });
2508
-
2509
- IS_WEAK || defineProperty(Prototype, 'size', {
2510
- configurable: true,
2511
- get: function () {
2512
- return getInternalState(this).collection.size;
2513
- }
2514
- });
2515
- }
2516
-
2517
- setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);
2518
-
2519
- exported[CONSTRUCTOR_NAME] = Constructor;
2520
- _export({ global: true, forced: true }, exported);
2521
-
2522
- if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
2523
-
2524
- return Constructor;
2525
- };
2526
-
2527
- var getWeakData = internalMetadata.getWeakData;
2528
-
2529
-
2530
-
2531
-
2532
-
2533
-
2534
-
2535
-
2536
- var setInternalState = internalState.set;
2537
- var internalStateGetterFor = internalState.getterFor;
2538
- var find = arrayIteration.find;
2539
- var findIndex = arrayIteration.findIndex;
2540
- var splice = functionUncurryThis([].splice);
2541
- var id = 0;
2542
-
2543
- // fallback for uncaught frozen keys
2544
- var uncaughtFrozenStore = function (store) {
2545
- return store.frozen || (store.frozen = new UncaughtFrozenStore());
2546
- };
2547
-
2548
- var UncaughtFrozenStore = function () {
2549
- this.entries = [];
2550
- };
2551
-
2552
- var findUncaughtFrozen = function (store, key) {
2553
- return find(store.entries, function (it) {
2554
- return it[0] === key;
2555
- });
2556
- };
2557
-
2558
- UncaughtFrozenStore.prototype = {
2559
- get: function (key) {
2560
- var entry = findUncaughtFrozen(this, key);
2561
- if (entry) return entry[1];
2562
- },
2563
- has: function (key) {
2564
- return !!findUncaughtFrozen(this, key);
2565
- },
2566
- set: function (key, value) {
2567
- var entry = findUncaughtFrozen(this, key);
2568
- if (entry) entry[1] = value;
2569
- else this.entries.push([key, value]);
2570
- },
2571
- 'delete': function (key) {
2572
- var index = findIndex(this.entries, function (it) {
2573
- return it[0] === key;
2574
- });
2575
- if (~index) splice(this.entries, index, 1);
2576
- return !!~index;
2577
- }
2578
- };
2579
-
2580
- var collectionWeak = {
2581
- getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
2582
- var Constructor = wrapper(function (that, iterable) {
2583
- anInstance(that, Prototype);
2584
- setInternalState(that, {
2585
- type: CONSTRUCTOR_NAME,
2586
- id: id++,
2587
- frozen: undefined
2588
- });
2589
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
2590
- });
2591
-
2592
- var Prototype = Constructor.prototype;
2593
-
2594
- var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
2595
-
2596
- var define = function (that, key, value) {
2597
- var state = getInternalState(that);
2598
- var data = getWeakData(anObject(key), true);
2599
- if (data === true) uncaughtFrozenStore(state).set(key, value);
2600
- else data[state.id] = value;
2601
- return that;
2602
- };
2603
-
2604
- redefineAll(Prototype, {
2605
- // `{ WeakMap, WeakSet }.prototype.delete(key)` methods
2606
- // https://tc39.es/ecma262/#sec-weakmap.prototype.delete
2607
- // https://tc39.es/ecma262/#sec-weakset.prototype.delete
2608
- 'delete': function (key) {
2609
- var state = getInternalState(this);
2610
- if (!isObject(key)) return false;
2611
- var data = getWeakData(key);
2612
- if (data === true) return uncaughtFrozenStore(state)['delete'](key);
2613
- return data && hasOwnProperty_1(data, state.id) && delete data[state.id];
2614
- },
2615
- // `{ WeakMap, WeakSet }.prototype.has(key)` methods
2616
- // https://tc39.es/ecma262/#sec-weakmap.prototype.has
2617
- // https://tc39.es/ecma262/#sec-weakset.prototype.has
2618
- has: function has(key) {
2619
- var state = getInternalState(this);
2620
- if (!isObject(key)) return false;
2621
- var data = getWeakData(key);
2622
- if (data === true) return uncaughtFrozenStore(state).has(key);
2623
- return data && hasOwnProperty_1(data, state.id);
2624
- }
2625
- });
2626
-
2627
- redefineAll(Prototype, IS_MAP ? {
2628
- // `WeakMap.prototype.get(key)` method
2629
- // https://tc39.es/ecma262/#sec-weakmap.prototype.get
2630
- get: function get(key) {
2631
- var state = getInternalState(this);
2632
- if (isObject(key)) {
2633
- var data = getWeakData(key);
2634
- if (data === true) return uncaughtFrozenStore(state).get(key);
2635
- return data ? data[state.id] : undefined;
2636
- }
2637
- },
2638
- // `WeakMap.prototype.set(key, value)` method
2639
- // https://tc39.es/ecma262/#sec-weakmap.prototype.set
2640
- set: function set(key, value) {
2641
- return define(this, key, value);
2642
- }
2643
- } : {
2644
- // `WeakSet.prototype.add(value)` method
2645
- // https://tc39.es/ecma262/#sec-weakset.prototype.add
2646
- add: function add(value) {
2647
- return define(this, value, true);
2648
- }
2649
- });
2650
-
2651
- return Constructor;
2652
- }
2653
- };
2654
-
2655
- var enforceInternalState = internalState.enforce;
2656
-
2657
-
2658
- var IS_IE11 = !global_1.ActiveXObject && 'ActiveXObject' in global_1;
2659
- var InternalWeakMap;
2660
-
2661
- var wrapper = function (init) {
2662
- return function WeakMap() {
2663
- return init(this, arguments.length ? arguments[0] : undefined);
2664
- };
2665
- };
2666
-
2667
- // `WeakMap` constructor
2668
- // https://tc39.es/ecma262/#sec-weakmap-constructor
2669
- var $WeakMap = collection('WeakMap', wrapper, collectionWeak);
2670
-
2671
- // IE11 WeakMap frozen keys fix
2672
- // We can't use feature detection because it crash some old IE builds
2673
- // https://github.com/zloirock/core-js/issues/485
2674
- if (nativeWeakMap && IS_IE11) {
2675
- InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
2676
- internalMetadata.enable();
2677
- var WeakMapPrototype = $WeakMap.prototype;
2678
- var nativeDelete = functionUncurryThis(WeakMapPrototype['delete']);
2679
- var nativeHas = functionUncurryThis(WeakMapPrototype.has);
2680
- var nativeGet = functionUncurryThis(WeakMapPrototype.get);
2681
- var nativeSet = functionUncurryThis(WeakMapPrototype.set);
2682
- redefineAll(WeakMapPrototype, {
2683
- 'delete': function (key) {
2684
- if (isObject(key) && !objectIsExtensible(key)) {
2685
- var state = enforceInternalState(this);
2686
- if (!state.frozen) state.frozen = new InternalWeakMap();
2687
- return nativeDelete(this, key) || state.frozen['delete'](key);
2688
- } return nativeDelete(this, key);
2689
- },
2690
- has: function has(key) {
2691
- if (isObject(key) && !objectIsExtensible(key)) {
2692
- var state = enforceInternalState(this);
2693
- if (!state.frozen) state.frozen = new InternalWeakMap();
2694
- return nativeHas(this, key) || state.frozen.has(key);
2695
- } return nativeHas(this, key);
2696
- },
2697
- get: function get(key) {
2698
- if (isObject(key) && !objectIsExtensible(key)) {
2699
- var state = enforceInternalState(this);
2700
- if (!state.frozen) state.frozen = new InternalWeakMap();
2701
- return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);
2702
- } return nativeGet(this, key);
2703
- },
2704
- set: function set(key, value) {
2705
- if (isObject(key) && !objectIsExtensible(key)) {
2706
- var state = enforceInternalState(this);
2707
- if (!state.frozen) state.frozen = new InternalWeakMap();
2708
- nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);
2709
- } else nativeSet(this, key, value);
2710
- return this;
2711
- }
2712
- });
2713
- }
2714
-
2715
- var weakMap$2 = path.WeakMap;
2716
-
2717
- var weakMap$1 = weakMap$2;
2718
-
2719
- var weakMap = weakMap$1;
2720
-
2721
- function _interopRequireDefault(obj) {
2722
- return obj && obj.__esModule ? obj : {
2723
- "default": obj
2724
- };
2725
- }
2726
-
2727
- var ChevronLeft = createCommonjsModule(function (module, exports) {
2728
-
2729
-
2730
-
2731
-
2732
-
2733
-
2734
-
2735
-
2736
-
2737
-
2738
-
2739
- defineProperty$1(exports, "__esModule", {
2740
- value: true
2741
- });
2742
-
2743
- exports["default"] = void 0;
2744
-
2745
- var _extends2 = _interopRequireDefault(_extends$1);
2746
-
2747
- var React$1 = _interopRequireWildcard(React);
2748
-
2749
- function _getRequireWildcardCache(nodeInterop) { if (typeof weakMap !== "function") return null; var cacheBabelInterop = new weakMap(); var cacheNodeInterop = new weakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
2750
-
2751
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = defineProperty$1 && getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { defineProperty$1(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2752
-
2753
- function SvgChevronLeft(props, svgRef) {
2754
- return /*#__PURE__*/React$1.createElement("svg", (0, _extends2["default"])({}, props, {
2755
- xmlns: "http://www.w3.org/2000/svg",
2756
- viewBox: "0 0 1024 1024",
2757
- fill: "currentColor",
2758
- className: "Icon ".concat(props.className ? props.className : ''),
2759
- ref: svgRef
2760
- }), /*#__PURE__*/React$1.createElement("path", {
2761
- d: "M199.5 480L762.8 10.5c21.3-17.1 51.2-12.8 64 8.5 17.1 25.6 12.8 55.5-8.5 68.3L306.1 514.1l516.4 426.8c21.3 17.1 25.6 42.7 8.5 64-17.1 21.3-42.7 25.6-64 8.5L199.5 556.8c-12.8-8.5-17.1-21.3-17.1-38.4 0-17.1 4.2-29.9 17.1-38.4z"
2762
- }));
2763
- }
2764
-
2765
- var ForwardRef = /*#__PURE__*/React$1.forwardRef(SvgChevronLeft);
2766
- var _default = ForwardRef;
2767
- exports["default"] = _default;
2768
- });
2769
-
2770
- unwrapExports(ChevronLeft);
2771
-
2772
- var chevronLeft = ChevronLeft;
2773
-
2774
- var ChevronRight = createCommonjsModule(function (module, exports) {
2775
-
2776
-
2777
-
2778
-
2779
-
2780
-
2781
-
2782
-
2783
-
2784
-
2785
-
2786
- defineProperty$1(exports, "__esModule", {
2787
- value: true
2788
- });
2789
-
2790
- exports["default"] = void 0;
2791
-
2792
- var _extends2 = _interopRequireDefault(_extends$1);
2793
-
2794
- var React$1 = _interopRequireWildcard(React);
2795
-
2796
- function _getRequireWildcardCache(nodeInterop) { if (typeof weakMap !== "function") return null; var cacheBabelInterop = new weakMap(); var cacheNodeInterop = new weakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
2797
-
2798
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = defineProperty$1 && getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { defineProperty$1(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2799
-
2800
- function SvgChevronRight(props, svgRef) {
2801
- return /*#__PURE__*/React$1.createElement("svg", (0, _extends2["default"])({}, props, {
2802
- xmlns: "http://www.w3.org/2000/svg",
2803
- viewBox: "0 0 1024 1024",
2804
- fill: "currentColor",
2805
- className: "Icon ".concat(props.className ? props.className : ''),
2806
- ref: svgRef
2807
- }), /*#__PURE__*/React$1.createElement("path", {
2808
- d: "M841.6 518.4c0 17.1-4.3 29.9-17.1 38.4L257 1013.4c-21.3 17.1-46.9 12.8-64-8.5s-12.8-46.9 8.5-64l516.4-426.8L205.7 87.4c-21.3-12.8-25.6-42.7-8.5-68.3 12.8-21.3 42.7-25.6 64-8.5l563.3 469.5c12.9 8.5 17.1 21.3 17.1 38.3z"
2809
- }));
2810
- }
2811
-
2812
- var ForwardRef = /*#__PURE__*/React$1.forwardRef(SvgChevronRight);
2813
- var _default = ForwardRef;
2814
- exports["default"] = _default;
2815
- });
2816
-
2817
- unwrapExports(ChevronRight);
2818
-
2819
- var chevronRight = ChevronRight;
2820
-
2821
- var _s = $RefreshSig$();
2822
-
2823
- var _excluded = ["images", "width", "height"];
2824
-
2825
- var ImageCarousel = function ImageCarousel(_ref) {
2826
- _s();
2827
-
2828
- var images = _ref.images,
2829
- width = _ref.width,
2830
- height = _ref.height,
2831
- props = _objectWithoutProperties(_ref, _excluded);
2832
-
2833
- var imgWidth = width ? "".concat(width, "rem") : '100%';
2834
- var imgHeight = "".concat(height, "rem");
2835
-
2836
- var _useEmblaCarousel = useEmblaCarousel({
2837
- skipSnaps: false,
2838
- loop: true
2839
- }),
2840
- _useEmblaCarousel2 = _slicedToArray(_useEmblaCarousel, 2),
2841
- viewportRef = _useEmblaCarousel2[0],
2842
- embla = _useEmblaCarousel2[1];
2843
-
2844
- var _useState = useState(0),
2845
- _useState2 = _slicedToArray(_useState, 2),
2846
- selectedIndex = _useState2[0],
2847
- setSelectedIndex = _useState2[1];
2848
-
2849
- var scrollPrev = useCallback(function () {
2850
- return embla && embla.scrollPrev();
2851
- }, [embla]);
2852
- var scrollNext = useCallback(function () {
2853
- return embla && embla.scrollNext();
2854
- }, [embla]);
2855
- var onSelect = useCallback(function () {
2856
- if (!embla) return;
2857
- setSelectedIndex(embla.selectedScrollSnap());
2858
- }, [embla, setSelectedIndex]);
2859
- useEffect(function () {
2860
- if (!embla) return;
2861
- onSelect();
2862
- embla.on('select', onSelect);
2863
- }, [embla, onSelect]);
2864
-
2865
- if (images.length === 1) {
2866
- var image = images[0];
2867
- return /*#__PURE__*/React.createElement(Box, _extends$1({
2868
- width: imgWidth,
2869
- height: imgHeight
2870
- }, props), /*#__PURE__*/React.createElement("img", {
2871
- style: {
2872
- width: '100%',
2873
- height: '100%',
2874
- objectFit: 'cover'
2875
- },
2876
- src: image.src,
2877
- alt: image.alt
2878
- }));
2879
- }
2880
-
2881
- return /*#__PURE__*/React.createElement(Box, _extends$1({
2882
- as: "section",
2883
- position: "relative",
2884
- overflow: "hidden",
2885
- width: imgWidth
2886
- }, props), /*#__PURE__*/React.createElement(Box, {
2887
- ref: viewportRef
2888
- }, /*#__PURE__*/React.createElement(Box, {
2889
- display: "flex",
2890
- role: "group"
2891
- }, map$1(images).call(images, function (image, index) {
2892
- var _context;
2893
-
2894
- return /*#__PURE__*/React.createElement(Box, {
2895
- position: "relative",
2896
- flex: "0 0 100%",
2897
- key: index,
2898
- "aria-label": concat(_context = "Slide ".concat(index + 1, " of ")).call(_context, images.length)
2899
- }, /*#__PURE__*/React.createElement(Box, {
2900
- position: "relative",
2901
- height: imgHeight
2902
- }, /*#__PURE__*/React.createElement("img", {
2903
- style: {
2904
- width: '100%',
2905
- height: '100%',
2906
- objectFit: 'cover'
2907
- },
2908
- src: image.src,
2909
- alt: image.alt
2910
- })));
2911
- }))), /*#__PURE__*/React.createElement(Button, {
2912
- onClick: scrollPrev,
2913
- width: "16",
2914
- height: "100%",
2915
- position: "absolute",
2916
- left: "0",
2917
- top: "0",
2918
- bg: "none",
2919
- borderRadius: "0",
2920
- border: "0",
2921
- _hover: {
2922
- bg: 'none',
2923
- border: 0
2924
- },
2925
- _focus: {
2926
- boxShadow: 'none'
2927
- },
2928
- padding: "3"
2929
- }, /*#__PURE__*/React.createElement(Box, {
2930
- width: "100%",
2931
- padding: "3",
2932
- borderRadius: "50%",
2933
- bgColor: "black",
2934
- opacity: "0.6"
2935
- }, /*#__PURE__*/React.createElement(chevronLeft, null))), /*#__PURE__*/React.createElement(Button, {
2936
- onClick: scrollNext,
2937
- width: "16",
2938
- height: "100%",
2939
- position: "absolute",
2940
- right: "0",
2941
- top: "0",
2942
- bg: "none",
2943
- borderRadius: "0",
2944
- border: "0",
2945
- _hover: {
2946
- bg: 'none',
2947
- border: 0
2948
- },
2949
- _focus: {
2950
- boxShadow: 'none'
2951
- },
2952
- padding: "3"
2953
- }, /*#__PURE__*/React.createElement(Box, {
2954
- width: "100%",
2955
- padding: "3",
2956
- borderRadius: "50%",
2957
- bgColor: "black",
2958
- opacity: "0.6"
2959
- }, /*#__PURE__*/React.createElement(chevronRight, null))), /*#__PURE__*/React.createElement(Box, {
2960
- color: "white",
2961
- borderRadius: "1rem",
2962
- bgColor: "black",
2963
- opacity: "0.6",
2964
- paddingX: 3,
2965
- paddingY: 1,
2966
- fontSize: "xs",
2967
- position: "absolute",
2968
- bottom: 3,
2969
- left: "50%",
2970
- transform: "translateX(-50%)"
2971
- }, selectedIndex + 1, "/", images.length));
2972
- };
2973
-
2974
- _s(ImageCarousel, "jxp7tUf1mQMbqWwZGJWfZ+Ibdl8=", false, function () {
2975
- return [useEmblaCarousel];
2976
- });
2977
-
2978
- _c = ImageCarousel;
2979
- ImageCarousel.propTypes = {
2980
- /** Array of images with src and alt */
2981
- images: PropTypes.arrayOf(PropTypes.shape({
2982
- src: PropTypes.string.isRequired,
2983
- alt: PropTypes.string.isRequired
2984
- })).isRequired,
2985
-
2986
- /** Height of the carousel in rem */
2987
- height: PropTypes.number.isRequired,
2988
-
2989
- /** Width of the carousel in rem */
2990
- width: PropTypes.number
2991
- };
2992
-
2993
- var _c;
2994
-
2995
- $RefreshReg$(_c, "ImageCarousel");
2996
-
2997
- export default ImageCarousel;
2998
- //# sourceMappingURL=ImageCarousel-df49312f.js.map