@egjs/react-flicking 4.16.0 → 4.16.1-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.
- package/dist/flicking.cjs.js +8 -917
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +12 -921
- package/dist/flicking.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/flicking.esm.js
CHANGED
|
@@ -1,919 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React__default, { useRef, useMemo, useState, useEffect } from "react";
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import VanillaFlicking__default, { ExternalRenderer, getFlickingAttached, VirtualRenderingStrategy, NormalRenderingStrategy, sync, range, EVENTS, getDefaultCameraTransform, getRenderingPanels, withFlickingMethods, CrossFlicking as CrossFlicking$1, SIDE_EVENTS, flickingReactiveAPIAdapter } from "@egjs/flicking";
|
|
4
3
|
export * from "@egjs/flicking";
|
|
5
4
|
import ListDiffer, { diff } from "@egjs/list-differ";
|
|
6
5
|
import Component from "@egjs/component";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
10
|
-
function requireReactJsxRuntime_production_min() {
|
|
11
|
-
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
12
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
13
|
-
var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
|
|
14
|
-
function q(c, a, g) {
|
|
15
|
-
var b, d = {}, e = null, h = null;
|
|
16
|
-
void 0 !== g && (e = "" + g);
|
|
17
|
-
void 0 !== a.key && (e = "" + a.key);
|
|
18
|
-
void 0 !== a.ref && (h = a.ref);
|
|
19
|
-
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
20
|
-
if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
|
|
21
|
-
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
22
|
-
}
|
|
23
|
-
reactJsxRuntime_production_min.Fragment = l;
|
|
24
|
-
reactJsxRuntime_production_min.jsx = q;
|
|
25
|
-
reactJsxRuntime_production_min.jsxs = q;
|
|
26
|
-
return reactJsxRuntime_production_min;
|
|
27
|
-
}
|
|
28
|
-
var reactJsxRuntime_development = {};
|
|
29
|
-
var hasRequiredReactJsxRuntime_development;
|
|
30
|
-
function requireReactJsxRuntime_development() {
|
|
31
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
32
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
33
|
-
if (process.env.NODE_ENV !== "production") {
|
|
34
|
-
(function() {
|
|
35
|
-
var React2 = React__default;
|
|
36
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
37
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
38
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
39
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
40
|
-
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
41
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
42
|
-
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
43
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
44
|
-
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
45
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
46
|
-
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
47
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
48
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
49
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
50
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
51
|
-
function getIteratorFn(maybeIterable) {
|
|
52
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
56
|
-
if (typeof maybeIterator === "function") {
|
|
57
|
-
return maybeIterator;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
62
|
-
function error(format) {
|
|
63
|
-
{
|
|
64
|
-
{
|
|
65
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
66
|
-
args[_key2 - 1] = arguments[_key2];
|
|
67
|
-
}
|
|
68
|
-
printWarning("error", format, args);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function printWarning(level, format, args) {
|
|
73
|
-
{
|
|
74
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
75
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
76
|
-
if (stack !== "") {
|
|
77
|
-
format += "%s";
|
|
78
|
-
args = args.concat([stack]);
|
|
79
|
-
}
|
|
80
|
-
var argsWithFormat = args.map(function(item) {
|
|
81
|
-
return String(item);
|
|
82
|
-
});
|
|
83
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
84
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
var enableScopeAPI = false;
|
|
88
|
-
var enableCacheElement = false;
|
|
89
|
-
var enableTransitionTracing = false;
|
|
90
|
-
var enableLegacyHidden = false;
|
|
91
|
-
var enableDebugTracing = false;
|
|
92
|
-
var REACT_MODULE_REFERENCE;
|
|
93
|
-
{
|
|
94
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
95
|
-
}
|
|
96
|
-
function isValidElementType(type) {
|
|
97
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
if (typeof type === "object" && type !== null) {
|
|
104
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
105
|
-
// types supported by any Flight configuration anywhere since
|
|
106
|
-
// we don't know which Flight build this will end up being used
|
|
107
|
-
// with.
|
|
108
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
115
|
-
var displayName = outerType.displayName;
|
|
116
|
-
if (displayName) {
|
|
117
|
-
return displayName;
|
|
118
|
-
}
|
|
119
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
120
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
121
|
-
}
|
|
122
|
-
function getContextName(type) {
|
|
123
|
-
return type.displayName || "Context";
|
|
124
|
-
}
|
|
125
|
-
function getComponentNameFromType(type) {
|
|
126
|
-
if (type == null) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
{
|
|
130
|
-
if (typeof type.tag === "number") {
|
|
131
|
-
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (typeof type === "function") {
|
|
135
|
-
return type.displayName || type.name || null;
|
|
136
|
-
}
|
|
137
|
-
if (typeof type === "string") {
|
|
138
|
-
return type;
|
|
139
|
-
}
|
|
140
|
-
switch (type) {
|
|
141
|
-
case REACT_FRAGMENT_TYPE:
|
|
142
|
-
return "Fragment";
|
|
143
|
-
case REACT_PORTAL_TYPE:
|
|
144
|
-
return "Portal";
|
|
145
|
-
case REACT_PROFILER_TYPE:
|
|
146
|
-
return "Profiler";
|
|
147
|
-
case REACT_STRICT_MODE_TYPE:
|
|
148
|
-
return "StrictMode";
|
|
149
|
-
case REACT_SUSPENSE_TYPE:
|
|
150
|
-
return "Suspense";
|
|
151
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
152
|
-
return "SuspenseList";
|
|
153
|
-
}
|
|
154
|
-
if (typeof type === "object") {
|
|
155
|
-
switch (type.$$typeof) {
|
|
156
|
-
case REACT_CONTEXT_TYPE:
|
|
157
|
-
var context = type;
|
|
158
|
-
return getContextName(context) + ".Consumer";
|
|
159
|
-
case REACT_PROVIDER_TYPE:
|
|
160
|
-
var provider = type;
|
|
161
|
-
return getContextName(provider._context) + ".Provider";
|
|
162
|
-
case REACT_FORWARD_REF_TYPE:
|
|
163
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
164
|
-
case REACT_MEMO_TYPE:
|
|
165
|
-
var outerName = type.displayName || null;
|
|
166
|
-
if (outerName !== null) {
|
|
167
|
-
return outerName;
|
|
168
|
-
}
|
|
169
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
170
|
-
case REACT_LAZY_TYPE: {
|
|
171
|
-
var lazyComponent = type;
|
|
172
|
-
var payload = lazyComponent._payload;
|
|
173
|
-
var init = lazyComponent._init;
|
|
174
|
-
try {
|
|
175
|
-
return getComponentNameFromType(init(payload));
|
|
176
|
-
} catch (x) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
var assign = Object.assign;
|
|
185
|
-
var disabledDepth = 0;
|
|
186
|
-
var prevLog;
|
|
187
|
-
var prevInfo;
|
|
188
|
-
var prevWarn;
|
|
189
|
-
var prevError;
|
|
190
|
-
var prevGroup;
|
|
191
|
-
var prevGroupCollapsed;
|
|
192
|
-
var prevGroupEnd;
|
|
193
|
-
function disabledLog() {
|
|
194
|
-
}
|
|
195
|
-
disabledLog.__reactDisabledLog = true;
|
|
196
|
-
function disableLogs() {
|
|
197
|
-
{
|
|
198
|
-
if (disabledDepth === 0) {
|
|
199
|
-
prevLog = console.log;
|
|
200
|
-
prevInfo = console.info;
|
|
201
|
-
prevWarn = console.warn;
|
|
202
|
-
prevError = console.error;
|
|
203
|
-
prevGroup = console.group;
|
|
204
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
205
|
-
prevGroupEnd = console.groupEnd;
|
|
206
|
-
var props = {
|
|
207
|
-
configurable: true,
|
|
208
|
-
enumerable: true,
|
|
209
|
-
value: disabledLog,
|
|
210
|
-
writable: true
|
|
211
|
-
};
|
|
212
|
-
Object.defineProperties(console, {
|
|
213
|
-
info: props,
|
|
214
|
-
log: props,
|
|
215
|
-
warn: props,
|
|
216
|
-
error: props,
|
|
217
|
-
group: props,
|
|
218
|
-
groupCollapsed: props,
|
|
219
|
-
groupEnd: props
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
disabledDepth++;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function reenableLogs() {
|
|
226
|
-
{
|
|
227
|
-
disabledDepth--;
|
|
228
|
-
if (disabledDepth === 0) {
|
|
229
|
-
var props = {
|
|
230
|
-
configurable: true,
|
|
231
|
-
enumerable: true,
|
|
232
|
-
writable: true
|
|
233
|
-
};
|
|
234
|
-
Object.defineProperties(console, {
|
|
235
|
-
log: assign({}, props, {
|
|
236
|
-
value: prevLog
|
|
237
|
-
}),
|
|
238
|
-
info: assign({}, props, {
|
|
239
|
-
value: prevInfo
|
|
240
|
-
}),
|
|
241
|
-
warn: assign({}, props, {
|
|
242
|
-
value: prevWarn
|
|
243
|
-
}),
|
|
244
|
-
error: assign({}, props, {
|
|
245
|
-
value: prevError
|
|
246
|
-
}),
|
|
247
|
-
group: assign({}, props, {
|
|
248
|
-
value: prevGroup
|
|
249
|
-
}),
|
|
250
|
-
groupCollapsed: assign({}, props, {
|
|
251
|
-
value: prevGroupCollapsed
|
|
252
|
-
}),
|
|
253
|
-
groupEnd: assign({}, props, {
|
|
254
|
-
value: prevGroupEnd
|
|
255
|
-
})
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (disabledDepth < 0) {
|
|
259
|
-
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
264
|
-
var prefix;
|
|
265
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
266
|
-
{
|
|
267
|
-
if (prefix === void 0) {
|
|
268
|
-
try {
|
|
269
|
-
throw Error();
|
|
270
|
-
} catch (x) {
|
|
271
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
272
|
-
prefix = match && match[1] || "";
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
return "\n" + prefix + name;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
var reentry = false;
|
|
279
|
-
var componentFrameCache;
|
|
280
|
-
{
|
|
281
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
282
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
283
|
-
}
|
|
284
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
285
|
-
if (!fn || reentry) {
|
|
286
|
-
return "";
|
|
287
|
-
}
|
|
288
|
-
{
|
|
289
|
-
var frame = componentFrameCache.get(fn);
|
|
290
|
-
if (frame !== void 0) {
|
|
291
|
-
return frame;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
var control;
|
|
295
|
-
reentry = true;
|
|
296
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
297
|
-
Error.prepareStackTrace = void 0;
|
|
298
|
-
var previousDispatcher;
|
|
299
|
-
{
|
|
300
|
-
previousDispatcher = ReactCurrentDispatcher.current;
|
|
301
|
-
ReactCurrentDispatcher.current = null;
|
|
302
|
-
disableLogs();
|
|
303
|
-
}
|
|
304
|
-
try {
|
|
305
|
-
if (construct) {
|
|
306
|
-
var Fake = function() {
|
|
307
|
-
throw Error();
|
|
308
|
-
};
|
|
309
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
310
|
-
set: function() {
|
|
311
|
-
throw Error();
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
315
|
-
try {
|
|
316
|
-
Reflect.construct(Fake, []);
|
|
317
|
-
} catch (x) {
|
|
318
|
-
control = x;
|
|
319
|
-
}
|
|
320
|
-
Reflect.construct(fn, [], Fake);
|
|
321
|
-
} else {
|
|
322
|
-
try {
|
|
323
|
-
Fake.call();
|
|
324
|
-
} catch (x) {
|
|
325
|
-
control = x;
|
|
326
|
-
}
|
|
327
|
-
fn.call(Fake.prototype);
|
|
328
|
-
}
|
|
329
|
-
} else {
|
|
330
|
-
try {
|
|
331
|
-
throw Error();
|
|
332
|
-
} catch (x) {
|
|
333
|
-
control = x;
|
|
334
|
-
}
|
|
335
|
-
fn();
|
|
336
|
-
}
|
|
337
|
-
} catch (sample) {
|
|
338
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
339
|
-
var sampleLines = sample.stack.split("\n");
|
|
340
|
-
var controlLines = control.stack.split("\n");
|
|
341
|
-
var s = sampleLines.length - 1;
|
|
342
|
-
var c = controlLines.length - 1;
|
|
343
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
344
|
-
c--;
|
|
345
|
-
}
|
|
346
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
347
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
348
|
-
if (s !== 1 || c !== 1) {
|
|
349
|
-
do {
|
|
350
|
-
s--;
|
|
351
|
-
c--;
|
|
352
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
353
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
354
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
355
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
356
|
-
}
|
|
357
|
-
{
|
|
358
|
-
if (typeof fn === "function") {
|
|
359
|
-
componentFrameCache.set(fn, _frame);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
return _frame;
|
|
363
|
-
}
|
|
364
|
-
} while (s >= 1 && c >= 0);
|
|
365
|
-
}
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
} finally {
|
|
371
|
-
reentry = false;
|
|
372
|
-
{
|
|
373
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
374
|
-
reenableLogs();
|
|
375
|
-
}
|
|
376
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
377
|
-
}
|
|
378
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
379
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
380
|
-
{
|
|
381
|
-
if (typeof fn === "function") {
|
|
382
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return syntheticFrame;
|
|
386
|
-
}
|
|
387
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
388
|
-
{
|
|
389
|
-
return describeNativeComponentFrame(fn, false);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
function shouldConstruct(Component2) {
|
|
393
|
-
var prototype = Component2.prototype;
|
|
394
|
-
return !!(prototype && prototype.isReactComponent);
|
|
395
|
-
}
|
|
396
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
397
|
-
if (type == null) {
|
|
398
|
-
return "";
|
|
399
|
-
}
|
|
400
|
-
if (typeof type === "function") {
|
|
401
|
-
{
|
|
402
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
if (typeof type === "string") {
|
|
406
|
-
return describeBuiltInComponentFrame(type);
|
|
407
|
-
}
|
|
408
|
-
switch (type) {
|
|
409
|
-
case REACT_SUSPENSE_TYPE:
|
|
410
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
411
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
412
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
413
|
-
}
|
|
414
|
-
if (typeof type === "object") {
|
|
415
|
-
switch (type.$$typeof) {
|
|
416
|
-
case REACT_FORWARD_REF_TYPE:
|
|
417
|
-
return describeFunctionComponentFrame(type.render);
|
|
418
|
-
case REACT_MEMO_TYPE:
|
|
419
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
420
|
-
case REACT_LAZY_TYPE: {
|
|
421
|
-
var lazyComponent = type;
|
|
422
|
-
var payload = lazyComponent._payload;
|
|
423
|
-
var init = lazyComponent._init;
|
|
424
|
-
try {
|
|
425
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
426
|
-
} catch (x) {
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
return "";
|
|
432
|
-
}
|
|
433
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
434
|
-
var loggedTypeFailures = {};
|
|
435
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
436
|
-
function setCurrentlyValidatingElement(element) {
|
|
437
|
-
{
|
|
438
|
-
if (element) {
|
|
439
|
-
var owner = element._owner;
|
|
440
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
441
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
442
|
-
} else {
|
|
443
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
448
|
-
{
|
|
449
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
450
|
-
for (var typeSpecName in typeSpecs) {
|
|
451
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
452
|
-
var error$1 = void 0;
|
|
453
|
-
try {
|
|
454
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
455
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
456
|
-
err.name = "Invariant Violation";
|
|
457
|
-
throw err;
|
|
458
|
-
}
|
|
459
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
460
|
-
} catch (ex) {
|
|
461
|
-
error$1 = ex;
|
|
462
|
-
}
|
|
463
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
464
|
-
setCurrentlyValidatingElement(element);
|
|
465
|
-
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
466
|
-
setCurrentlyValidatingElement(null);
|
|
467
|
-
}
|
|
468
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
469
|
-
loggedTypeFailures[error$1.message] = true;
|
|
470
|
-
setCurrentlyValidatingElement(element);
|
|
471
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
472
|
-
setCurrentlyValidatingElement(null);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
var isArrayImpl = Array.isArray;
|
|
479
|
-
function isArray(a) {
|
|
480
|
-
return isArrayImpl(a);
|
|
481
|
-
}
|
|
482
|
-
function typeName(value) {
|
|
483
|
-
{
|
|
484
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
485
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
486
|
-
return type;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
function willCoercionThrow(value) {
|
|
490
|
-
{
|
|
491
|
-
try {
|
|
492
|
-
testStringCoercion(value);
|
|
493
|
-
return false;
|
|
494
|
-
} catch (e) {
|
|
495
|
-
return true;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
function testStringCoercion(value) {
|
|
500
|
-
return "" + value;
|
|
501
|
-
}
|
|
502
|
-
function checkKeyStringCoercion(value) {
|
|
503
|
-
{
|
|
504
|
-
if (willCoercionThrow(value)) {
|
|
505
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
506
|
-
return testStringCoercion(value);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
511
|
-
var RESERVED_PROPS = {
|
|
512
|
-
key: true,
|
|
513
|
-
ref: true,
|
|
514
|
-
__self: true,
|
|
515
|
-
__source: true
|
|
516
|
-
};
|
|
517
|
-
var specialPropKeyWarningShown;
|
|
518
|
-
var specialPropRefWarningShown;
|
|
519
|
-
function hasValidRef(config) {
|
|
520
|
-
{
|
|
521
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
522
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
523
|
-
if (getter && getter.isReactWarning) {
|
|
524
|
-
return false;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
return config.ref !== void 0;
|
|
529
|
-
}
|
|
530
|
-
function hasValidKey(config) {
|
|
531
|
-
{
|
|
532
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
533
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
534
|
-
if (getter && getter.isReactWarning) {
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
return config.key !== void 0;
|
|
540
|
-
}
|
|
541
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
542
|
-
{
|
|
543
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current && self) ;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
547
|
-
{
|
|
548
|
-
var warnAboutAccessingKey = function() {
|
|
549
|
-
if (!specialPropKeyWarningShown) {
|
|
550
|
-
specialPropKeyWarningShown = true;
|
|
551
|
-
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
555
|
-
Object.defineProperty(props, "key", {
|
|
556
|
-
get: warnAboutAccessingKey,
|
|
557
|
-
configurable: true
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
562
|
-
{
|
|
563
|
-
var warnAboutAccessingRef = function() {
|
|
564
|
-
if (!specialPropRefWarningShown) {
|
|
565
|
-
specialPropRefWarningShown = true;
|
|
566
|
-
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
570
|
-
Object.defineProperty(props, "ref", {
|
|
571
|
-
get: warnAboutAccessingRef,
|
|
572
|
-
configurable: true
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
577
|
-
var element = {
|
|
578
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
579
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
580
|
-
// Built-in properties that belong on the element
|
|
581
|
-
type,
|
|
582
|
-
key,
|
|
583
|
-
ref,
|
|
584
|
-
props,
|
|
585
|
-
// Record the component responsible for creating this element.
|
|
586
|
-
_owner: owner
|
|
587
|
-
};
|
|
588
|
-
{
|
|
589
|
-
element._store = {};
|
|
590
|
-
Object.defineProperty(element._store, "validated", {
|
|
591
|
-
configurable: false,
|
|
592
|
-
enumerable: false,
|
|
593
|
-
writable: true,
|
|
594
|
-
value: false
|
|
595
|
-
});
|
|
596
|
-
Object.defineProperty(element, "_self", {
|
|
597
|
-
configurable: false,
|
|
598
|
-
enumerable: false,
|
|
599
|
-
writable: false,
|
|
600
|
-
value: self
|
|
601
|
-
});
|
|
602
|
-
Object.defineProperty(element, "_source", {
|
|
603
|
-
configurable: false,
|
|
604
|
-
enumerable: false,
|
|
605
|
-
writable: false,
|
|
606
|
-
value: source
|
|
607
|
-
});
|
|
608
|
-
if (Object.freeze) {
|
|
609
|
-
Object.freeze(element.props);
|
|
610
|
-
Object.freeze(element);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return element;
|
|
614
|
-
};
|
|
615
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
616
|
-
{
|
|
617
|
-
var propName;
|
|
618
|
-
var props = {};
|
|
619
|
-
var key = null;
|
|
620
|
-
var ref = null;
|
|
621
|
-
if (maybeKey !== void 0) {
|
|
622
|
-
{
|
|
623
|
-
checkKeyStringCoercion(maybeKey);
|
|
624
|
-
}
|
|
625
|
-
key = "" + maybeKey;
|
|
626
|
-
}
|
|
627
|
-
if (hasValidKey(config)) {
|
|
628
|
-
{
|
|
629
|
-
checkKeyStringCoercion(config.key);
|
|
630
|
-
}
|
|
631
|
-
key = "" + config.key;
|
|
632
|
-
}
|
|
633
|
-
if (hasValidRef(config)) {
|
|
634
|
-
ref = config.ref;
|
|
635
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
636
|
-
}
|
|
637
|
-
for (propName in config) {
|
|
638
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
639
|
-
props[propName] = config[propName];
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
if (type && type.defaultProps) {
|
|
643
|
-
var defaultProps = type.defaultProps;
|
|
644
|
-
for (propName in defaultProps) {
|
|
645
|
-
if (props[propName] === void 0) {
|
|
646
|
-
props[propName] = defaultProps[propName];
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
if (key || ref) {
|
|
651
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
652
|
-
if (key) {
|
|
653
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
654
|
-
}
|
|
655
|
-
if (ref) {
|
|
656
|
-
defineRefPropWarningGetter(props, displayName);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
663
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
664
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
665
|
-
{
|
|
666
|
-
if (element) {
|
|
667
|
-
var owner = element._owner;
|
|
668
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
669
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
670
|
-
} else {
|
|
671
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
var propTypesMisspellWarningShown;
|
|
676
|
-
{
|
|
677
|
-
propTypesMisspellWarningShown = false;
|
|
678
|
-
}
|
|
679
|
-
function isValidElement(object) {
|
|
680
|
-
{
|
|
681
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
function getDeclarationErrorAddendum() {
|
|
685
|
-
{
|
|
686
|
-
if (ReactCurrentOwner$1.current) {
|
|
687
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
688
|
-
if (name) {
|
|
689
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
return "";
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
function getSourceInfoErrorAddendum(source) {
|
|
696
|
-
{
|
|
697
|
-
return "";
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
var ownerHasKeyUseWarning = {};
|
|
701
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
702
|
-
{
|
|
703
|
-
var info = getDeclarationErrorAddendum();
|
|
704
|
-
if (!info) {
|
|
705
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
706
|
-
if (parentName) {
|
|
707
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
return info;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
function validateExplicitKey(element, parentType) {
|
|
714
|
-
{
|
|
715
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
element._store.validated = true;
|
|
719
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
720
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
724
|
-
var childOwner = "";
|
|
725
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
726
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
727
|
-
}
|
|
728
|
-
setCurrentlyValidatingElement$1(element);
|
|
729
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
730
|
-
setCurrentlyValidatingElement$1(null);
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
function validateChildKeys(node, parentType) {
|
|
734
|
-
{
|
|
735
|
-
if (typeof node !== "object") {
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
if (isArray(node)) {
|
|
739
|
-
for (var i = 0; i < node.length; i++) {
|
|
740
|
-
var child = node[i];
|
|
741
|
-
if (isValidElement(child)) {
|
|
742
|
-
validateExplicitKey(child, parentType);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
} else if (isValidElement(node)) {
|
|
746
|
-
if (node._store) {
|
|
747
|
-
node._store.validated = true;
|
|
748
|
-
}
|
|
749
|
-
} else if (node) {
|
|
750
|
-
var iteratorFn = getIteratorFn(node);
|
|
751
|
-
if (typeof iteratorFn === "function") {
|
|
752
|
-
if (iteratorFn !== node.entries) {
|
|
753
|
-
var iterator = iteratorFn.call(node);
|
|
754
|
-
var step;
|
|
755
|
-
while (!(step = iterator.next()).done) {
|
|
756
|
-
if (isValidElement(step.value)) {
|
|
757
|
-
validateExplicitKey(step.value, parentType);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
function validatePropTypes(element) {
|
|
766
|
-
{
|
|
767
|
-
var type = element.type;
|
|
768
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
769
|
-
return;
|
|
770
|
-
}
|
|
771
|
-
var propTypes;
|
|
772
|
-
if (typeof type === "function") {
|
|
773
|
-
propTypes = type.propTypes;
|
|
774
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
775
|
-
// Inner props are checked in the reconciler.
|
|
776
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
777
|
-
propTypes = type.propTypes;
|
|
778
|
-
} else {
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
|
-
if (propTypes) {
|
|
782
|
-
var name = getComponentNameFromType(type);
|
|
783
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
784
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
785
|
-
propTypesMisspellWarningShown = true;
|
|
786
|
-
var _name = getComponentNameFromType(type);
|
|
787
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
788
|
-
}
|
|
789
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
790
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
function validateFragmentProps(fragment) {
|
|
795
|
-
{
|
|
796
|
-
var keys2 = Object.keys(fragment.props);
|
|
797
|
-
for (var i = 0; i < keys2.length; i++) {
|
|
798
|
-
var key = keys2[i];
|
|
799
|
-
if (key !== "children" && key !== "key") {
|
|
800
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
801
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
802
|
-
setCurrentlyValidatingElement$1(null);
|
|
803
|
-
break;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
if (fragment.ref !== null) {
|
|
807
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
808
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
809
|
-
setCurrentlyValidatingElement$1(null);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
var didWarnAboutKeySpread = {};
|
|
814
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
815
|
-
{
|
|
816
|
-
var validType = isValidElementType(type);
|
|
817
|
-
if (!validType) {
|
|
818
|
-
var info = "";
|
|
819
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
820
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
821
|
-
}
|
|
822
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
823
|
-
if (sourceInfo) {
|
|
824
|
-
info += sourceInfo;
|
|
825
|
-
} else {
|
|
826
|
-
info += getDeclarationErrorAddendum();
|
|
827
|
-
}
|
|
828
|
-
var typeString;
|
|
829
|
-
if (type === null) {
|
|
830
|
-
typeString = "null";
|
|
831
|
-
} else if (isArray(type)) {
|
|
832
|
-
typeString = "array";
|
|
833
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
834
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
835
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
836
|
-
} else {
|
|
837
|
-
typeString = typeof type;
|
|
838
|
-
}
|
|
839
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
840
|
-
}
|
|
841
|
-
var element = jsxDEV(type, props, key, source, self);
|
|
842
|
-
if (element == null) {
|
|
843
|
-
return element;
|
|
844
|
-
}
|
|
845
|
-
if (validType) {
|
|
846
|
-
var children = props.children;
|
|
847
|
-
if (children !== void 0) {
|
|
848
|
-
if (isStaticChildren) {
|
|
849
|
-
if (isArray(children)) {
|
|
850
|
-
for (var i = 0; i < children.length; i++) {
|
|
851
|
-
validateChildKeys(children[i], type);
|
|
852
|
-
}
|
|
853
|
-
if (Object.freeze) {
|
|
854
|
-
Object.freeze(children);
|
|
855
|
-
}
|
|
856
|
-
} else {
|
|
857
|
-
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
858
|
-
}
|
|
859
|
-
} else {
|
|
860
|
-
validateChildKeys(children, type);
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
{
|
|
865
|
-
if (hasOwnProperty.call(props, "key")) {
|
|
866
|
-
var componentName = getComponentNameFromType(type);
|
|
867
|
-
var keys2 = Object.keys(props).filter(function(k) {
|
|
868
|
-
return k !== "key";
|
|
869
|
-
});
|
|
870
|
-
var beforeExample = keys2.length > 0 ? "{key: someKey, " + keys2.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
871
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
872
|
-
var afterExample = keys2.length > 0 ? "{" + keys2.join(": ..., ") + ": ...}" : "{}";
|
|
873
|
-
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
874
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
879
|
-
validateFragmentProps(element);
|
|
880
|
-
} else {
|
|
881
|
-
validatePropTypes(element);
|
|
882
|
-
}
|
|
883
|
-
return element;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
887
|
-
{
|
|
888
|
-
return jsxWithValidation(type, props, key, true);
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
892
|
-
{
|
|
893
|
-
return jsxWithValidation(type, props, key, false);
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
var jsx = jsxWithValidationDynamic;
|
|
897
|
-
var jsxs = jsxWithValidationStatic;
|
|
898
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
899
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
900
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
901
|
-
})();
|
|
902
|
-
}
|
|
903
|
-
return reactJsxRuntime_development;
|
|
904
|
-
}
|
|
905
|
-
var hasRequiredJsxRuntime;
|
|
906
|
-
function requireJsxRuntime() {
|
|
907
|
-
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
908
|
-
hasRequiredJsxRuntime = 1;
|
|
909
|
-
if (process.env.NODE_ENV === "production") {
|
|
910
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
911
|
-
} else {
|
|
912
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
913
|
-
}
|
|
914
|
-
return jsxRuntime.exports;
|
|
915
|
-
}
|
|
916
|
-
var jsxRuntimeExports = requireJsxRuntime();
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import React__default, { useRef, useMemo, useState, useEffect } from "react";
|
|
917
8
|
const DEFAULT_PROPS = {
|
|
918
9
|
viewportTag: "div",
|
|
919
10
|
cameraTag: "div",
|
|
@@ -1044,7 +135,7 @@ class StrictPanel extends React.Component {
|
|
|
1044
135
|
return this._elRef;
|
|
1045
136
|
}
|
|
1046
137
|
render() {
|
|
1047
|
-
return this._hide ? /* @__PURE__ */
|
|
138
|
+
return this._hide ? /* @__PURE__ */ jsx(Fragment, {}) : this._getElement();
|
|
1048
139
|
}
|
|
1049
140
|
show() {
|
|
1050
141
|
this._hide = false;
|
|
@@ -1058,7 +149,7 @@ class StrictPanel extends React.Component {
|
|
|
1058
149
|
});
|
|
1059
150
|
}
|
|
1060
151
|
}
|
|
1061
|
-
const ViewportSlot = React__default.memo((props) => /* @__PURE__ */
|
|
152
|
+
const ViewportSlot = React__default.memo((props) => /* @__PURE__ */ jsx(Fragment, { children: props.children }));
|
|
1062
153
|
var __defProp = Object.defineProperty;
|
|
1063
154
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
1064
155
|
var result = void 0;
|
|
@@ -1167,7 +258,7 @@ const _Flicking = class _Flicking extends React.Component {
|
|
|
1167
258
|
}
|
|
1168
259
|
const { viewportClasses, cameraClasses, cameraProps } = this._getClasses(attributes, props);
|
|
1169
260
|
const panels = !!props.virtual && (props.panelsPerView ?? -1) > 0 ? this._getVirtualPanels() : this._getPanels();
|
|
1170
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ jsxs(
|
|
1171
262
|
Viewport,
|
|
1172
263
|
{
|
|
1173
264
|
...attributes,
|
|
@@ -1176,7 +267,7 @@ const _Flicking = class _Flicking extends React.Component {
|
|
|
1176
267
|
e && (this._viewportElement = e);
|
|
1177
268
|
},
|
|
1178
269
|
children: [
|
|
1179
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ jsx(Camera, { className: cameraClasses.join(" "), ...cameraProps, children: panels }),
|
|
1180
271
|
this._getViewportSlot()
|
|
1181
272
|
]
|
|
1182
273
|
}
|
|
@@ -1275,7 +366,7 @@ const _Flicking = class _Flicking extends React.Component {
|
|
|
1275
366
|
const firstPanel = flicking?.panels[0];
|
|
1276
367
|
const size = firstPanel ? flicking.horizontal ? { width: firstPanel.size } : { height: firstPanel.size } : {};
|
|
1277
368
|
return renderingIndexes.map((idx) => {
|
|
1278
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ jsx(StrictPanel, { ref: this._panels[idx], children: /* @__PURE__ */ jsx("div", { "data-element-index": idx, className: panelClass, style: size }) }, idx);
|
|
1279
370
|
});
|
|
1280
371
|
}
|
|
1281
372
|
_getPanels() {
|
|
@@ -1283,7 +374,7 @@ const _Flicking = class _Flicking extends React.Component {
|
|
|
1283
374
|
const vanillaFlicking = this._vanillaFlicking;
|
|
1284
375
|
const diffResult = this._diffResult;
|
|
1285
376
|
const children = vanillaFlicking?.initialized ? diffResult ? getRenderingPanels(vanillaFlicking, diffResult) : getRenderingPanels(vanillaFlicking, diff(origChildren, origChildren)) : origChildren;
|
|
1286
|
-
return children.map((child, idx) => /* @__PURE__ */
|
|
377
|
+
return children.map((child, idx) => /* @__PURE__ */ jsx(StrictPanel, { ref: this._panels[idx], children: child }, child.key));
|
|
1287
378
|
}
|
|
1288
379
|
_isFragment(child) {
|
|
1289
380
|
if (child.type) {
|
|
@@ -1360,7 +451,7 @@ const _CrossFlicking = class _CrossFlicking extends Flicking {
|
|
|
1360
451
|
}
|
|
1361
452
|
const { viewportClasses, cameraClasses, cameraProps } = this._getClasses(attributes, props);
|
|
1362
453
|
const panels = this._getPanels();
|
|
1363
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsxs(
|
|
1364
455
|
Viewport,
|
|
1365
456
|
{
|
|
1366
457
|
...attributes,
|
|
@@ -1369,7 +460,7 @@ const _CrossFlicking = class _CrossFlicking extends Flicking {
|
|
|
1369
460
|
e && (this._viewportElement = e);
|
|
1370
461
|
},
|
|
1371
462
|
children: [
|
|
1372
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ jsx(Camera, { className: cameraClasses.join(" "), ...cameraProps, children: panels }),
|
|
1373
464
|
this._getViewportSlot()
|
|
1374
465
|
]
|
|
1375
466
|
}
|
|
@@ -1385,7 +476,7 @@ const _CrossFlicking = class _CrossFlicking extends Flicking {
|
|
|
1385
476
|
};
|
|
1386
477
|
_CrossFlicking.defaultProps = CROSSFLICKING_DEFAULT_PROPS;
|
|
1387
478
|
let CrossFlicking = _CrossFlicking;
|
|
1388
|
-
const CrossGroup = React__default.forwardRef(({ children, ...rest }, ref) => /* @__PURE__ */
|
|
479
|
+
const CrossGroup = React__default.forwardRef(({ children, ...rest }, ref) => /* @__PURE__ */ jsx("div", { ref, ...rest, children }));
|
|
1389
480
|
function keys(obj) {
|
|
1390
481
|
return Object.keys(obj);
|
|
1391
482
|
}
|