react-lazy-load-image-component 1.5.0-beta.0 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc +5 -4
- package/.eslintrc +2 -2
- package/.github/workflows/codeql-analysis.yml +71 -0
- package/README.md +12 -0
- package/build/index.js +305 -1462
- package/package.json +26 -26
- package/src/hoc/trackWindowScroll.js +5 -5
- package/src/utils/get-scroll-ancestor.ts +35 -0
- package/webpack.config.js +20 -11
- package/src/utils/get-scroll-element.js +0 -39
package/build/index.js
CHANGED
@@ -1,1463 +1,306 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
(r.d = function(e, t, n) {
|
12
|
-
r.o(e, t) ||
|
13
|
-
Object.defineProperty(e, t, { enumerable: !0, get: n });
|
14
|
-
}),
|
15
|
-
(r.r = function(e) {
|
16
|
-
'undefined' != typeof Symbol &&
|
17
|
-
Symbol.toStringTag &&
|
18
|
-
Object.defineProperty(e, Symbol.toStringTag, {
|
19
|
-
value: 'Module',
|
20
|
-
}),
|
21
|
-
Object.defineProperty(e, '__esModule', { value: !0 });
|
22
|
-
}),
|
23
|
-
(r.t = function(e, t) {
|
24
|
-
if ((1 & t && (e = r(e)), 8 & t)) return e;
|
25
|
-
if (4 & t && 'object' == typeof e && e && e.__esModule) return e;
|
26
|
-
var n = Object.create(null);
|
27
|
-
if (
|
28
|
-
(r.r(n),
|
29
|
-
Object.defineProperty(n, 'default', {
|
30
|
-
enumerable: !0,
|
31
|
-
value: e,
|
32
|
-
}),
|
33
|
-
2 & t && 'string' != typeof e)
|
34
|
-
)
|
35
|
-
for (var o in e)
|
36
|
-
r.d(
|
37
|
-
n,
|
38
|
-
o,
|
39
|
-
function(t) {
|
40
|
-
return e[t];
|
41
|
-
}.bind(null, o)
|
42
|
-
);
|
43
|
-
return n;
|
44
|
-
}),
|
45
|
-
(r.n = function(e) {
|
46
|
-
var t =
|
47
|
-
e && e.__esModule
|
48
|
-
? function() {
|
49
|
-
return e.default;
|
50
|
-
}
|
51
|
-
: function() {
|
52
|
-
return e;
|
53
|
-
};
|
54
|
-
return r.d(t, 'a', t), t;
|
55
|
-
}),
|
56
|
-
(r.o = function(e, t) {
|
57
|
-
return Object.prototype.hasOwnProperty.call(e, t);
|
58
|
-
}),
|
59
|
-
(r.p = ''),
|
60
|
-
r((r.s = 8))
|
61
|
-
);
|
62
|
-
})([
|
63
|
-
function(e, t) {
|
64
|
-
e.exports = require('react');
|
65
|
-
},
|
66
|
-
function(e, t, r) {
|
67
|
-
e.exports = r(10)();
|
68
|
-
},
|
69
|
-
function(e, t, r) {
|
70
|
-
'use strict';
|
71
|
-
Object.defineProperty(t, '__esModule', { value: !0 }),
|
72
|
-
(t.default = function() {
|
73
|
-
return (
|
74
|
-
'undefined' != typeof window &&
|
75
|
-
'IntersectionObserver' in window &&
|
76
|
-
'isIntersecting' in
|
77
|
-
window.IntersectionObserverEntry.prototype
|
78
|
-
);
|
79
|
-
});
|
80
|
-
},
|
81
|
-
function(e, t, r) {
|
82
|
-
'use strict';
|
83
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
84
|
-
var n = (function() {
|
85
|
-
function e(e, t) {
|
86
|
-
for (var r = 0; r < t.length; r++) {
|
87
|
-
var n = t[r];
|
88
|
-
(n.enumerable = n.enumerable || !1),
|
89
|
-
(n.configurable = !0),
|
90
|
-
'value' in n && (n.writable = !0),
|
91
|
-
Object.defineProperty(e, n.key, n);
|
92
|
-
}
|
93
|
-
}
|
94
|
-
return function(t, r, n) {
|
95
|
-
return r && e(t.prototype, r), n && e(t, n), t;
|
96
|
-
};
|
97
|
-
})(),
|
98
|
-
o = u(r(0)),
|
99
|
-
i = r(1),
|
100
|
-
a = u(r(4)),
|
101
|
-
s = u(r(12)),
|
102
|
-
l = u(r(2));
|
103
|
-
function u(e) {
|
104
|
-
return e && e.__esModule ? e : { default: e };
|
105
|
-
}
|
106
|
-
var c = (function(e) {
|
107
|
-
function t(e) {
|
108
|
-
!(function(e, t) {
|
109
|
-
if (!(e instanceof t))
|
110
|
-
throw new TypeError(
|
111
|
-
'Cannot call a class as a function'
|
112
|
-
);
|
113
|
-
})(this, t);
|
114
|
-
var r = (function(e, t) {
|
115
|
-
if (!e)
|
116
|
-
throw new ReferenceError(
|
117
|
-
"this hasn't been initialised - super() hasn't been called"
|
118
|
-
);
|
119
|
-
return !t ||
|
120
|
-
('object' != typeof t && 'function' != typeof t)
|
121
|
-
? e
|
122
|
-
: t;
|
123
|
-
})(
|
124
|
-
this,
|
125
|
-
(t.__proto__ || Object.getPrototypeOf(t)).call(this, e)
|
126
|
-
),
|
127
|
-
n = e.afterLoad,
|
128
|
-
o = e.beforeLoad,
|
129
|
-
i = e.scrollPosition,
|
130
|
-
a = e.visibleByDefault;
|
131
|
-
return (
|
132
|
-
(r.state = { visible: a }),
|
133
|
-
a && (o(), n()),
|
134
|
-
(r.onVisible = r.onVisible.bind(r)),
|
135
|
-
(r.isScrollTracked = Boolean(
|
136
|
-
i &&
|
137
|
-
Number.isFinite(i.x) &&
|
138
|
-
i.x >= 0 &&
|
139
|
-
Number.isFinite(i.y) &&
|
140
|
-
i.y >= 0
|
141
|
-
)),
|
142
|
-
r
|
143
|
-
);
|
144
|
-
}
|
145
|
-
return (
|
146
|
-
(function(e, t) {
|
147
|
-
if ('function' != typeof t && null !== t)
|
148
|
-
throw new TypeError(
|
149
|
-
'Super expression must either be null or a function, not ' +
|
150
|
-
typeof t
|
151
|
-
);
|
152
|
-
(e.prototype = Object.create(t && t.prototype, {
|
153
|
-
constructor: {
|
154
|
-
value: e,
|
155
|
-
enumerable: !1,
|
156
|
-
writable: !0,
|
157
|
-
configurable: !0,
|
158
|
-
},
|
159
|
-
})),
|
160
|
-
t &&
|
161
|
-
(Object.setPrototypeOf
|
162
|
-
? Object.setPrototypeOf(e, t)
|
163
|
-
: (e.__proto__ = t));
|
164
|
-
})(t, e),
|
165
|
-
n(t, [
|
166
|
-
{
|
167
|
-
key: 'componentDidUpdate',
|
168
|
-
value: function(e, t) {
|
169
|
-
t.visible !== this.state.visible &&
|
170
|
-
this.props.afterLoad();
|
171
|
-
},
|
172
|
-
},
|
173
|
-
{
|
174
|
-
key: 'onVisible',
|
175
|
-
value: function() {
|
176
|
-
this.props.beforeLoad(),
|
177
|
-
this.setState({ visible: !0 });
|
178
|
-
},
|
179
|
-
},
|
180
|
-
{
|
181
|
-
key: 'render',
|
182
|
-
value: function() {
|
183
|
-
if (this.state.visible) return this.props.children;
|
184
|
-
var e = this.props,
|
185
|
-
t = e.className,
|
186
|
-
r = e.delayMethod,
|
187
|
-
n = e.delayTime,
|
188
|
-
i = e.height,
|
189
|
-
u = e.placeholder,
|
190
|
-
c = e.scrollPosition,
|
191
|
-
f = e.style,
|
192
|
-
p = e.threshold,
|
193
|
-
d = e.useIntersectionObserver,
|
194
|
-
y = e.width;
|
195
|
-
return this.isScrollTracked ||
|
196
|
-
(d && (0, l.default)())
|
197
|
-
? o.default.createElement(a.default, {
|
198
|
-
className: t,
|
199
|
-
height: i,
|
200
|
-
onVisible: this.onVisible,
|
201
|
-
placeholder: u,
|
202
|
-
scrollPosition: c,
|
203
|
-
style: f,
|
204
|
-
threshold: p,
|
205
|
-
useIntersectionObserver: d,
|
206
|
-
width: y,
|
207
|
-
})
|
208
|
-
: o.default.createElement(s.default, {
|
209
|
-
className: t,
|
210
|
-
delayMethod: r,
|
211
|
-
delayTime: n,
|
212
|
-
height: i,
|
213
|
-
onVisible: this.onVisible,
|
214
|
-
placeholder: u,
|
215
|
-
style: f,
|
216
|
-
threshold: p,
|
217
|
-
width: y,
|
218
|
-
});
|
219
|
-
},
|
220
|
-
},
|
221
|
-
]),
|
222
|
-
t
|
223
|
-
);
|
224
|
-
})(o.default.Component);
|
225
|
-
(c.propTypes = {
|
226
|
-
afterLoad: i.PropTypes.func,
|
227
|
-
beforeLoad: i.PropTypes.func,
|
228
|
-
useIntersectionObserver: i.PropTypes.bool,
|
229
|
-
visibleByDefault: i.PropTypes.bool,
|
230
|
-
}),
|
231
|
-
(c.defaultProps = {
|
232
|
-
afterLoad: function() {
|
233
|
-
return {};
|
234
|
-
},
|
235
|
-
beforeLoad: function() {
|
236
|
-
return {};
|
237
|
-
},
|
238
|
-
useIntersectionObserver: !0,
|
239
|
-
visibleByDefault: !1,
|
240
|
-
}),
|
241
|
-
(t.default = c);
|
242
|
-
},
|
243
|
-
function(e, t, r) {
|
244
|
-
'use strict';
|
245
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
246
|
-
var n =
|
247
|
-
Object.assign ||
|
248
|
-
function(e) {
|
249
|
-
for (var t = 1; t < arguments.length; t++) {
|
250
|
-
var r = arguments[t];
|
251
|
-
for (var n in r)
|
252
|
-
Object.prototype.hasOwnProperty.call(r, n) &&
|
253
|
-
(e[n] = r[n]);
|
254
|
-
}
|
255
|
-
return e;
|
256
|
-
},
|
257
|
-
o = (function() {
|
258
|
-
function e(e, t) {
|
259
|
-
for (var r = 0; r < t.length; r++) {
|
260
|
-
var n = t[r];
|
261
|
-
(n.enumerable = n.enumerable || !1),
|
262
|
-
(n.configurable = !0),
|
263
|
-
'value' in n && (n.writable = !0),
|
264
|
-
Object.defineProperty(e, n.key, n);
|
265
|
-
}
|
266
|
-
}
|
267
|
-
return function(t, r, n) {
|
268
|
-
return r && e(t.prototype, r), n && e(t, n), t;
|
269
|
-
};
|
270
|
-
})(),
|
271
|
-
i = u(r(0)),
|
272
|
-
a = u(r(5)),
|
273
|
-
s = r(1),
|
274
|
-
l = u(r(2));
|
275
|
-
function u(e) {
|
276
|
-
return e && e.__esModule ? e : { default: e };
|
277
|
-
}
|
278
|
-
var c = function(e) {
|
279
|
-
e.forEach(function(e) {
|
280
|
-
e.isIntersecting && e.target.onVisible();
|
281
|
-
});
|
282
|
-
},
|
283
|
-
f = {},
|
284
|
-
p = function(e) {
|
285
|
-
return (
|
286
|
-
(f[e] =
|
287
|
-
f[e] ||
|
288
|
-
new IntersectionObserver(c, { rootMargin: e + 'px' })),
|
289
|
-
f[e]
|
290
|
-
);
|
291
|
-
},
|
292
|
-
d = (function(e) {
|
293
|
-
function t(e) {
|
294
|
-
!(function(e, t) {
|
295
|
-
if (!(e instanceof t))
|
296
|
-
throw new TypeError(
|
297
|
-
'Cannot call a class as a function'
|
298
|
-
);
|
299
|
-
})(this, t);
|
300
|
-
var r = (function(e, t) {
|
301
|
-
if (!e)
|
302
|
-
throw new ReferenceError(
|
303
|
-
"this hasn't been initialised - super() hasn't been called"
|
304
|
-
);
|
305
|
-
return !t ||
|
306
|
-
('object' != typeof t && 'function' != typeof t)
|
307
|
-
? e
|
308
|
-
: t;
|
309
|
-
})(
|
310
|
-
this,
|
311
|
-
(t.__proto__ || Object.getPrototypeOf(t)).call(this, e)
|
312
|
-
);
|
313
|
-
if (
|
314
|
-
((r.supportsObserver =
|
315
|
-
!e.scrollPosition &&
|
316
|
-
e.useIntersectionObserver &&
|
317
|
-
(0, l.default)()),
|
318
|
-
r.supportsObserver)
|
319
|
-
) {
|
320
|
-
var n = e.threshold;
|
321
|
-
r.observer = p(n);
|
322
|
-
}
|
323
|
-
return r;
|
324
|
-
}
|
325
|
-
return (
|
326
|
-
(function(e, t) {
|
327
|
-
if ('function' != typeof t && null !== t)
|
328
|
-
throw new TypeError(
|
329
|
-
'Super expression must either be null or a function, not ' +
|
330
|
-
typeof t
|
331
|
-
);
|
332
|
-
(e.prototype = Object.create(t && t.prototype, {
|
333
|
-
constructor: {
|
334
|
-
value: e,
|
335
|
-
enumerable: !1,
|
336
|
-
writable: !0,
|
337
|
-
configurable: !0,
|
338
|
-
},
|
339
|
-
})),
|
340
|
-
t &&
|
341
|
-
(Object.setPrototypeOf
|
342
|
-
? Object.setPrototypeOf(e, t)
|
343
|
-
: (e.__proto__ = t));
|
344
|
-
})(t, e),
|
345
|
-
o(t, [
|
346
|
-
{
|
347
|
-
key: 'componentDidMount',
|
348
|
-
value: function() {
|
349
|
-
this.placeholder &&
|
350
|
-
this.observer &&
|
351
|
-
((this.placeholder.onVisible = this.props.onVisible),
|
352
|
-
this.observer.observe(this.placeholder)),
|
353
|
-
this.supportsObserver ||
|
354
|
-
this.updateVisibility();
|
355
|
-
},
|
356
|
-
},
|
357
|
-
{
|
358
|
-
key: 'componentWillUnmount',
|
359
|
-
value: function() {
|
360
|
-
this.observer &&
|
361
|
-
this.observer.unobserve(this.placeholder);
|
362
|
-
},
|
363
|
-
},
|
364
|
-
{
|
365
|
-
key: 'componentDidUpdate',
|
366
|
-
value: function() {
|
367
|
-
this.supportsObserver ||
|
368
|
-
this.updateVisibility();
|
369
|
-
},
|
370
|
-
},
|
371
|
-
{
|
372
|
-
key: 'getPlaceholderBoundingBox',
|
373
|
-
value: function() {
|
374
|
-
var e =
|
375
|
-
arguments.length > 0 &&
|
376
|
-
void 0 !== arguments[0]
|
377
|
-
? arguments[0]
|
378
|
-
: this.props.scrollPosition,
|
379
|
-
t = this.placeholder.getBoundingClientRect(),
|
380
|
-
r = a.default.findDOMNode(this.placeholder)
|
381
|
-
.style,
|
382
|
-
n = {
|
383
|
-
left:
|
384
|
-
parseInt(
|
385
|
-
r.getPropertyValue(
|
386
|
-
'margin-left'
|
387
|
-
),
|
388
|
-
10
|
389
|
-
) || 0,
|
390
|
-
top:
|
391
|
-
parseInt(
|
392
|
-
r.getPropertyValue(
|
393
|
-
'margin-top'
|
394
|
-
),
|
395
|
-
10
|
396
|
-
) || 0,
|
397
|
-
};
|
398
|
-
return {
|
399
|
-
bottom: e.y + t.bottom + n.top,
|
400
|
-
left: e.x + t.left + n.left,
|
401
|
-
right: e.x + t.right + n.left,
|
402
|
-
top: e.y + t.top + n.top,
|
403
|
-
};
|
404
|
-
},
|
405
|
-
},
|
406
|
-
{
|
407
|
-
key: 'isPlaceholderInViewport',
|
408
|
-
value: function() {
|
409
|
-
if (
|
410
|
-
'undefined' == typeof window ||
|
411
|
-
!this.placeholder
|
412
|
-
)
|
413
|
-
return !1;
|
414
|
-
var e = this.props,
|
415
|
-
t = e.scrollPosition,
|
416
|
-
r = e.threshold,
|
417
|
-
n = this.getPlaceholderBoundingBox(t),
|
418
|
-
o = t.y + window.innerHeight,
|
419
|
-
i = t.x,
|
420
|
-
a = t.x + window.innerWidth,
|
421
|
-
s = t.y;
|
422
|
-
return Boolean(
|
423
|
-
s - r <= n.bottom &&
|
424
|
-
o + r >= n.top &&
|
425
|
-
i - r <= n.right &&
|
426
|
-
a + r >= n.left
|
427
|
-
);
|
428
|
-
},
|
429
|
-
},
|
430
|
-
{
|
431
|
-
key: 'updateVisibility',
|
432
|
-
value: function() {
|
433
|
-
this.isPlaceholderInViewport() &&
|
434
|
-
this.props.onVisible();
|
435
|
-
},
|
436
|
-
},
|
437
|
-
{
|
438
|
-
key: 'render',
|
439
|
-
value: function() {
|
440
|
-
var e = this,
|
441
|
-
t = this.props,
|
442
|
-
r = t.className,
|
443
|
-
o = t.height,
|
444
|
-
a = t.placeholder,
|
445
|
-
s = t.style,
|
446
|
-
l = t.width;
|
447
|
-
if (a && 'function' != typeof a.type)
|
448
|
-
return i.default.cloneElement(a, {
|
449
|
-
ref: function(t) {
|
450
|
-
return (e.placeholder = t);
|
451
|
-
},
|
452
|
-
});
|
453
|
-
var u = n({ display: 'inline-block' }, s);
|
454
|
-
return (
|
455
|
-
void 0 !== l && (u.width = l),
|
456
|
-
void 0 !== o && (u.height = o),
|
457
|
-
i.default.createElement(
|
458
|
-
'span',
|
459
|
-
{
|
460
|
-
className: r,
|
461
|
-
ref: function(t) {
|
462
|
-
return (e.placeholder = t);
|
463
|
-
},
|
464
|
-
style: u,
|
465
|
-
},
|
466
|
-
a
|
467
|
-
)
|
468
|
-
);
|
469
|
-
},
|
470
|
-
},
|
471
|
-
]),
|
472
|
-
t
|
473
|
-
);
|
474
|
-
})(i.default.Component);
|
475
|
-
(d.propTypes = {
|
476
|
-
onVisible: s.PropTypes.func.isRequired,
|
477
|
-
className: s.PropTypes.string,
|
478
|
-
height: s.PropTypes.oneOfType([
|
479
|
-
s.PropTypes.number,
|
480
|
-
s.PropTypes.string,
|
481
|
-
]),
|
482
|
-
placeholder: s.PropTypes.element,
|
483
|
-
threshold: s.PropTypes.number,
|
484
|
-
useIntersectionObserver: s.PropTypes.bool,
|
485
|
-
scrollPosition: s.PropTypes.shape({
|
486
|
-
x: s.PropTypes.number.isRequired,
|
487
|
-
y: s.PropTypes.number.isRequired,
|
488
|
-
}),
|
489
|
-
width: s.PropTypes.oneOfType([
|
490
|
-
s.PropTypes.number,
|
491
|
-
s.PropTypes.string,
|
492
|
-
]),
|
493
|
-
}),
|
494
|
-
(d.defaultProps = {
|
495
|
-
className: '',
|
496
|
-
placeholder: null,
|
497
|
-
threshold: 100,
|
498
|
-
useIntersectionObserver: !0,
|
499
|
-
}),
|
500
|
-
(t.default = d);
|
501
|
-
},
|
502
|
-
function(e, t) {
|
503
|
-
e.exports = require('react-dom');
|
504
|
-
},
|
505
|
-
function(e, t, r) {
|
506
|
-
'use strict';
|
507
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
508
|
-
var n =
|
509
|
-
Object.assign ||
|
510
|
-
function(e) {
|
511
|
-
for (var t = 1; t < arguments.length; t++) {
|
512
|
-
var r = arguments[t];
|
513
|
-
for (var n in r)
|
514
|
-
Object.prototype.hasOwnProperty.call(r, n) &&
|
515
|
-
(e[n] = r[n]);
|
516
|
-
}
|
517
|
-
return e;
|
518
|
-
},
|
519
|
-
o = (function() {
|
520
|
-
function e(e, t) {
|
521
|
-
for (var r = 0; r < t.length; r++) {
|
522
|
-
var n = t[r];
|
523
|
-
(n.enumerable = n.enumerable || !1),
|
524
|
-
(n.configurable = !0),
|
525
|
-
'value' in n && (n.writable = !0),
|
526
|
-
Object.defineProperty(e, n.key, n);
|
527
|
-
}
|
528
|
-
}
|
529
|
-
return function(t, r, n) {
|
530
|
-
return r && e(t.prototype, r), n && e(t, n), t;
|
531
|
-
};
|
532
|
-
})(),
|
533
|
-
i = p(r(0)),
|
534
|
-
a = p(r(5)),
|
535
|
-
s = r(1),
|
536
|
-
l = p(r(13)),
|
537
|
-
u = p(r(14)),
|
538
|
-
c = p(r(2)),
|
539
|
-
f = p(r(15));
|
540
|
-
function p(e) {
|
541
|
-
return e && e.__esModule ? e : { default: e };
|
542
|
-
}
|
543
|
-
function d(e, t) {
|
544
|
-
if (!e)
|
545
|
-
throw new ReferenceError(
|
546
|
-
"this hasn't been initialised - super() hasn't been called"
|
547
|
-
);
|
548
|
-
return !t || ('object' != typeof t && 'function' != typeof t)
|
549
|
-
? e
|
550
|
-
: t;
|
551
|
-
}
|
552
|
-
var y = function() {
|
553
|
-
return 'undefined' == typeof window
|
554
|
-
? 0
|
555
|
-
: window.scrollX || window.pageXOffset;
|
556
|
-
},
|
557
|
-
h = function() {
|
558
|
-
return 'undefined' == typeof window
|
559
|
-
? 0
|
560
|
-
: window.scrollY || window.pageYOffset;
|
561
|
-
};
|
562
|
-
t.default = function(e) {
|
563
|
-
var t = (function(t) {
|
564
|
-
function r(e) {
|
565
|
-
!(function(e, t) {
|
566
|
-
if (!(e instanceof t))
|
567
|
-
throw new TypeError(
|
568
|
-
'Cannot call a class as a function'
|
569
|
-
);
|
570
|
-
})(this, r);
|
571
|
-
var t = d(
|
572
|
-
this,
|
573
|
-
(r.__proto__ || Object.getPrototypeOf(r)).call(this, e)
|
574
|
-
);
|
575
|
-
if (
|
576
|
-
((t.useIntersectionObserver =
|
577
|
-
e.useIntersectionObserver && (0, c.default)()),
|
578
|
-
t.useIntersectionObserver)
|
579
|
-
)
|
580
|
-
return d(t);
|
581
|
-
var n = t.onChangeScroll.bind(t);
|
582
|
-
return (
|
583
|
-
'debounce' === e.delayMethod
|
584
|
-
? (t.delayedScroll = (0, l.default)(n, e.delayTime))
|
585
|
-
: 'throttle' === e.delayMethod &&
|
586
|
-
(t.delayedScroll = (0, u.default)(
|
587
|
-
n,
|
588
|
-
e.delayTime
|
589
|
-
)),
|
590
|
-
(t.state = { scrollPosition: { x: y(), y: h() } }),
|
591
|
-
(t.baseComponentRef = i.default.createRef()),
|
592
|
-
t
|
593
|
-
);
|
594
|
-
}
|
595
|
-
return (
|
596
|
-
(function(e, t) {
|
597
|
-
if ('function' != typeof t && null !== t)
|
598
|
-
throw new TypeError(
|
599
|
-
'Super expression must either be null or a function, not ' +
|
600
|
-
typeof t
|
601
|
-
);
|
602
|
-
(e.prototype = Object.create(t && t.prototype, {
|
603
|
-
constructor: {
|
604
|
-
value: e,
|
605
|
-
enumerable: !1,
|
606
|
-
writable: !0,
|
607
|
-
configurable: !0,
|
608
|
-
},
|
609
|
-
})),
|
610
|
-
t &&
|
611
|
-
(Object.setPrototypeOf
|
612
|
-
? Object.setPrototypeOf(e, t)
|
613
|
-
: (e.__proto__ = t));
|
614
|
-
})(r, t),
|
615
|
-
o(r, [
|
616
|
-
{
|
617
|
-
key: 'componentDidMount',
|
618
|
-
value: function() {
|
619
|
-
this.addListeners();
|
620
|
-
},
|
621
|
-
},
|
622
|
-
{
|
623
|
-
key: 'componentWillUnmount',
|
624
|
-
value: function() {
|
625
|
-
this.removeListeners();
|
626
|
-
},
|
627
|
-
},
|
628
|
-
{
|
629
|
-
key: 'componentDidUpdate',
|
630
|
-
value: function() {
|
631
|
-
'undefined' == typeof window ||
|
632
|
-
this.useIntersectionObserver ||
|
633
|
-
((0, f.default)(
|
634
|
-
a.default.findDOMNode(
|
635
|
-
this.baseComponentRef.current
|
636
|
-
)
|
637
|
-
) !== this.scrollElement &&
|
638
|
-
(this.removeListeners(),
|
639
|
-
this.addListeners()));
|
640
|
-
},
|
641
|
-
},
|
642
|
-
{
|
643
|
-
key: 'addListeners',
|
644
|
-
value: function() {
|
645
|
-
'undefined' == typeof window ||
|
646
|
-
this.useIntersectionObserver ||
|
647
|
-
((this.scrollElement = (0, f.default)(
|
648
|
-
a.default.findDOMNode(
|
649
|
-
this.baseComponentRef.current
|
650
|
-
)
|
651
|
-
)),
|
652
|
-
this.scrollElement.addEventListener(
|
653
|
-
'scroll',
|
654
|
-
this.delayedScroll,
|
655
|
-
{ passive: !0 }
|
656
|
-
),
|
657
|
-
window.addEventListener(
|
658
|
-
'resize',
|
659
|
-
this.delayedScroll,
|
660
|
-
{ passive: !0 }
|
661
|
-
),
|
662
|
-
this.scrollElement !== window &&
|
663
|
-
window.addEventListener(
|
664
|
-
'scroll',
|
665
|
-
this.delayedScroll,
|
666
|
-
{ passive: !0 }
|
667
|
-
));
|
668
|
-
},
|
669
|
-
},
|
670
|
-
{
|
671
|
-
key: 'removeListeners',
|
672
|
-
value: function() {
|
673
|
-
'undefined' == typeof window ||
|
674
|
-
this.useIntersectionObserver ||
|
675
|
-
(this.scrollElement.removeEventListener(
|
676
|
-
'scroll',
|
677
|
-
this.delayedScroll
|
678
|
-
),
|
679
|
-
window.removeEventListener(
|
680
|
-
'resize',
|
681
|
-
this.delayedScroll
|
682
|
-
),
|
683
|
-
this.scrollElement !== window &&
|
684
|
-
window.removeEventListener(
|
685
|
-
'scroll',
|
686
|
-
this.delayedScroll
|
687
|
-
));
|
688
|
-
},
|
689
|
-
},
|
690
|
-
{
|
691
|
-
key: 'onChangeScroll',
|
692
|
-
value: function() {
|
693
|
-
this.useIntersectionObserver ||
|
694
|
-
this.setState({
|
695
|
-
scrollPosition: { x: y(), y: h() },
|
696
|
-
});
|
697
|
-
},
|
698
|
-
},
|
699
|
-
{
|
700
|
-
key: 'render',
|
701
|
-
value: function() {
|
702
|
-
var t = this.props,
|
703
|
-
r =
|
704
|
-
(t.delayMethod,
|
705
|
-
t.delayTime,
|
706
|
-
(function(e, t) {
|
707
|
-
var r = {};
|
708
|
-
for (var n in e)
|
709
|
-
t.indexOf(n) >= 0 ||
|
710
|
-
(Object.prototype.hasOwnProperty.call(
|
711
|
-
e,
|
712
|
-
n
|
713
|
-
) &&
|
714
|
-
(r[n] = e[n]));
|
715
|
-
return r;
|
716
|
-
})(t, ['delayMethod', 'delayTime'])),
|
717
|
-
o = this.useIntersectionObserver
|
718
|
-
? null
|
719
|
-
: this.state.scrollPosition;
|
720
|
-
return i.default.createElement(
|
721
|
-
e,
|
722
|
-
n(
|
723
|
-
{
|
724
|
-
ref: this.baseComponentRef,
|
725
|
-
scrollPosition: o,
|
726
|
-
},
|
727
|
-
r
|
728
|
-
)
|
729
|
-
);
|
730
|
-
},
|
731
|
-
},
|
732
|
-
]),
|
733
|
-
r
|
734
|
-
);
|
735
|
-
})(i.default.Component);
|
736
|
-
return (
|
737
|
-
(t.propTypes = {
|
738
|
-
delayMethod: s.PropTypes.oneOf(['debounce', 'throttle']),
|
739
|
-
delayTime: s.PropTypes.number,
|
740
|
-
useIntersectionObserver: s.PropTypes.bool,
|
741
|
-
}),
|
742
|
-
(t.defaultProps = {
|
743
|
-
delayMethod: 'throttle',
|
744
|
-
delayTime: 300,
|
745
|
-
useIntersectionObserver: !0,
|
746
|
-
}),
|
747
|
-
t
|
748
|
-
);
|
749
|
-
};
|
750
|
-
},
|
751
|
-
function(e, t) {
|
752
|
-
var r;
|
753
|
-
r = (function() {
|
754
|
-
return this;
|
755
|
-
})();
|
756
|
-
try {
|
757
|
-
r = r || new Function('return this')();
|
758
|
-
} catch (e) {
|
759
|
-
'object' == typeof window && (r = window);
|
760
|
-
}
|
761
|
-
e.exports = r;
|
762
|
-
},
|
763
|
-
function(e, t, r) {
|
764
|
-
'use strict';
|
765
|
-
Object.defineProperty(t, '__esModule', { value: !0 }),
|
766
|
-
(t.trackWindowScroll = t.LazyLoadComponent = t.LazyLoadImage = void 0);
|
767
|
-
var n = a(r(9)),
|
768
|
-
o = a(r(3)),
|
769
|
-
i = a(r(6));
|
770
|
-
function a(e) {
|
771
|
-
return e && e.__esModule ? e : { default: e };
|
772
|
-
}
|
773
|
-
(t.LazyLoadImage = n.default),
|
774
|
-
(t.LazyLoadComponent = o.default),
|
775
|
-
(t.trackWindowScroll = i.default);
|
776
|
-
},
|
777
|
-
function(e, t, r) {
|
778
|
-
'use strict';
|
779
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
780
|
-
var n =
|
781
|
-
Object.assign ||
|
782
|
-
function(e) {
|
783
|
-
for (var t = 1; t < arguments.length; t++) {
|
784
|
-
var r = arguments[t];
|
785
|
-
for (var n in r)
|
786
|
-
Object.prototype.hasOwnProperty.call(r, n) &&
|
787
|
-
(e[n] = r[n]);
|
788
|
-
}
|
789
|
-
return e;
|
790
|
-
},
|
791
|
-
o = (function() {
|
792
|
-
function e(e, t) {
|
793
|
-
for (var r = 0; r < t.length; r++) {
|
794
|
-
var n = t[r];
|
795
|
-
(n.enumerable = n.enumerable || !1),
|
796
|
-
(n.configurable = !0),
|
797
|
-
'value' in n && (n.writable = !0),
|
798
|
-
Object.defineProperty(e, n.key, n);
|
799
|
-
}
|
800
|
-
}
|
801
|
-
return function(t, r, n) {
|
802
|
-
return r && e(t.prototype, r), n && e(t, n), t;
|
803
|
-
};
|
804
|
-
})(),
|
805
|
-
i = l(r(0)),
|
806
|
-
a = r(1),
|
807
|
-
s = l(r(3));
|
808
|
-
function l(e) {
|
809
|
-
return e && e.__esModule ? e : { default: e };
|
810
|
-
}
|
811
|
-
var u = (function(e) {
|
812
|
-
function t(e) {
|
813
|
-
!(function(e, t) {
|
814
|
-
if (!(e instanceof t))
|
815
|
-
throw new TypeError(
|
816
|
-
'Cannot call a class as a function'
|
817
|
-
);
|
818
|
-
})(this, t);
|
819
|
-
var r = (function(e, t) {
|
820
|
-
if (!e)
|
821
|
-
throw new ReferenceError(
|
822
|
-
"this hasn't been initialised - super() hasn't been called"
|
823
|
-
);
|
824
|
-
return !t ||
|
825
|
-
('object' != typeof t && 'function' != typeof t)
|
826
|
-
? e
|
827
|
-
: t;
|
828
|
-
})(
|
829
|
-
this,
|
830
|
-
(t.__proto__ || Object.getPrototypeOf(t)).call(this, e)
|
831
|
-
);
|
832
|
-
return (r.state = { loaded: !1 }), r;
|
833
|
-
}
|
834
|
-
return (
|
835
|
-
(function(e, t) {
|
836
|
-
if ('function' != typeof t && null !== t)
|
837
|
-
throw new TypeError(
|
838
|
-
'Super expression must either be null or a function, not ' +
|
839
|
-
typeof t
|
840
|
-
);
|
841
|
-
(e.prototype = Object.create(t && t.prototype, {
|
842
|
-
constructor: {
|
843
|
-
value: e,
|
844
|
-
enumerable: !1,
|
845
|
-
writable: !0,
|
846
|
-
configurable: !0,
|
847
|
-
},
|
848
|
-
})),
|
849
|
-
t &&
|
850
|
-
(Object.setPrototypeOf
|
851
|
-
? Object.setPrototypeOf(e, t)
|
852
|
-
: (e.__proto__ = t));
|
853
|
-
})(t, e),
|
854
|
-
o(t, [
|
855
|
-
{
|
856
|
-
key: 'onImageLoad',
|
857
|
-
value: function() {
|
858
|
-
var e = this;
|
859
|
-
return this.state.loaded
|
860
|
-
? null
|
861
|
-
: function() {
|
862
|
-
e.props.afterLoad(),
|
863
|
-
e.setState({ loaded: !0 });
|
864
|
-
};
|
865
|
-
},
|
866
|
-
},
|
867
|
-
{
|
868
|
-
key: 'getImg',
|
869
|
-
value: function() {
|
870
|
-
var e = this.props,
|
871
|
-
t =
|
872
|
-
(e.afterLoad,
|
873
|
-
e.beforeLoad,
|
874
|
-
e.delayMethod,
|
875
|
-
e.delayTime,
|
876
|
-
e.effect,
|
877
|
-
e.placeholder,
|
878
|
-
e.placeholderSrc,
|
879
|
-
e.scrollPosition,
|
880
|
-
e.threshold,
|
881
|
-
e.useIntersectionObserver,
|
882
|
-
e.visibleByDefault,
|
883
|
-
e.wrapperClassName,
|
884
|
-
e.wrapperProps,
|
885
|
-
(function(e, t) {
|
886
|
-
var r = {};
|
887
|
-
for (var n in e)
|
888
|
-
t.indexOf(n) >= 0 ||
|
889
|
-
(Object.prototype.hasOwnProperty.call(
|
890
|
-
e,
|
891
|
-
n
|
892
|
-
) &&
|
893
|
-
(r[n] = e[n]));
|
894
|
-
return r;
|
895
|
-
})(e, [
|
896
|
-
'afterLoad',
|
897
|
-
'beforeLoad',
|
898
|
-
'delayMethod',
|
899
|
-
'delayTime',
|
900
|
-
'effect',
|
901
|
-
'placeholder',
|
902
|
-
'placeholderSrc',
|
903
|
-
'scrollPosition',
|
904
|
-
'threshold',
|
905
|
-
'useIntersectionObserver',
|
906
|
-
'visibleByDefault',
|
907
|
-
'wrapperClassName',
|
908
|
-
'wrapperProps',
|
909
|
-
]));
|
910
|
-
return i.default.createElement(
|
911
|
-
'img',
|
912
|
-
n({ onLoad: this.onImageLoad() }, t)
|
913
|
-
);
|
914
|
-
},
|
915
|
-
},
|
916
|
-
{
|
917
|
-
key: 'getLazyLoadImage',
|
918
|
-
value: function() {
|
919
|
-
var e = this.props,
|
920
|
-
t = e.beforeLoad,
|
921
|
-
r = e.className,
|
922
|
-
n = e.delayMethod,
|
923
|
-
o = e.delayTime,
|
924
|
-
a = e.height,
|
925
|
-
l = e.placeholder,
|
926
|
-
u = e.scrollPosition,
|
927
|
-
c = e.style,
|
928
|
-
f = e.threshold,
|
929
|
-
p = e.useIntersectionObserver,
|
930
|
-
d = e.visibleByDefault,
|
931
|
-
y = e.width;
|
932
|
-
return i.default.createElement(
|
933
|
-
s.default,
|
934
|
-
{
|
935
|
-
beforeLoad: t,
|
936
|
-
className: r,
|
937
|
-
delayMethod: n,
|
938
|
-
delayTime: o,
|
939
|
-
height: a,
|
940
|
-
placeholder: l,
|
941
|
-
scrollPosition: u,
|
942
|
-
style: c,
|
943
|
-
threshold: f,
|
944
|
-
useIntersectionObserver: p,
|
945
|
-
visibleByDefault: d,
|
946
|
-
width: y,
|
947
|
-
},
|
948
|
-
this.getImg()
|
949
|
-
);
|
950
|
-
},
|
951
|
-
},
|
952
|
-
{
|
953
|
-
key: 'getWrappedLazyLoadImage',
|
954
|
-
value: function(e) {
|
955
|
-
var t = this.props,
|
956
|
-
r = t.effect,
|
957
|
-
o = t.height,
|
958
|
-
a = t.placeholderSrc,
|
959
|
-
s = t.width,
|
960
|
-
l = t.wrapperClassName,
|
961
|
-
u = t.wrapperProps,
|
962
|
-
c = this.state.loaded,
|
963
|
-
f = c ? ' lazy-load-image-loaded' : '';
|
964
|
-
return i.default.createElement(
|
965
|
-
'span',
|
966
|
-
n(
|
967
|
-
{
|
968
|
-
className:
|
969
|
-
l +
|
970
|
-
' lazy-load-image-background ' +
|
971
|
-
r +
|
972
|
-
f,
|
973
|
-
style: {
|
974
|
-
backgroundImage:
|
975
|
-
c || !a ? '' : 'url(' + a + ')',
|
976
|
-
backgroundSize:
|
977
|
-
c || !a ? '' : '100% 100%',
|
978
|
-
color: 'transparent',
|
979
|
-
display: 'inline-block',
|
980
|
-
height: o,
|
981
|
-
width: s,
|
982
|
-
},
|
983
|
-
},
|
984
|
-
u
|
985
|
-
),
|
986
|
-
e
|
987
|
-
);
|
988
|
-
},
|
989
|
-
},
|
990
|
-
{
|
991
|
-
key: 'render',
|
992
|
-
value: function() {
|
993
|
-
var e = this.props,
|
994
|
-
t = e.effect,
|
995
|
-
r = e.placeholderSrc,
|
996
|
-
n = e.visibleByDefault,
|
997
|
-
o = e.wrapperClassName,
|
998
|
-
i = e.wrapperProps,
|
999
|
-
a = this.getLazyLoadImage();
|
1000
|
-
return ((t || r) && !n) || o || i
|
1001
|
-
? this.getWrappedLazyLoadImage(a)
|
1002
|
-
: a;
|
1003
|
-
},
|
1004
|
-
},
|
1005
|
-
]),
|
1006
|
-
t
|
1007
|
-
);
|
1008
|
-
})(i.default.Component);
|
1009
|
-
(u.propTypes = {
|
1010
|
-
afterLoad: a.PropTypes.func,
|
1011
|
-
beforeLoad: a.PropTypes.func,
|
1012
|
-
delayMethod: a.PropTypes.string,
|
1013
|
-
delayTime: a.PropTypes.number,
|
1014
|
-
effect: a.PropTypes.string,
|
1015
|
-
placeholderSrc: a.PropTypes.string,
|
1016
|
-
threshold: a.PropTypes.number,
|
1017
|
-
useIntersectionObserver: a.PropTypes.bool,
|
1018
|
-
visibleByDefault: a.PropTypes.bool,
|
1019
|
-
wrapperClassName: a.PropTypes.string,
|
1020
|
-
wrapperProps: a.PropTypes.object,
|
1021
|
-
}),
|
1022
|
-
(u.defaultProps = {
|
1023
|
-
afterLoad: function() {
|
1024
|
-
return {};
|
1025
|
-
},
|
1026
|
-
beforeLoad: function() {
|
1027
|
-
return {};
|
1028
|
-
},
|
1029
|
-
delayMethod: 'throttle',
|
1030
|
-
delayTime: 300,
|
1031
|
-
effect: '',
|
1032
|
-
placeholderSrc: null,
|
1033
|
-
threshold: 100,
|
1034
|
-
useIntersectionObserver: !0,
|
1035
|
-
visibleByDefault: !1,
|
1036
|
-
wrapperClassName: '',
|
1037
|
-
}),
|
1038
|
-
(t.default = u);
|
1039
|
-
},
|
1040
|
-
function(e, t, r) {
|
1041
|
-
'use strict';
|
1042
|
-
var n = r(11);
|
1043
|
-
function o() {}
|
1044
|
-
function i() {}
|
1045
|
-
(i.resetWarningCache = o),
|
1046
|
-
(e.exports = function() {
|
1047
|
-
function e(e, t, r, o, i, a) {
|
1048
|
-
if (a !== n) {
|
1049
|
-
var s = new Error(
|
1050
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types'
|
1051
|
-
);
|
1052
|
-
throw ((s.name = 'Invariant Violation'), s);
|
1053
|
-
}
|
1054
|
-
}
|
1055
|
-
function t() {
|
1056
|
-
return e;
|
1057
|
-
}
|
1058
|
-
e.isRequired = e;
|
1059
|
-
var r = {
|
1060
|
-
array: e,
|
1061
|
-
bool: e,
|
1062
|
-
func: e,
|
1063
|
-
number: e,
|
1064
|
-
object: e,
|
1065
|
-
string: e,
|
1066
|
-
symbol: e,
|
1067
|
-
any: e,
|
1068
|
-
arrayOf: t,
|
1069
|
-
element: e,
|
1070
|
-
elementType: e,
|
1071
|
-
instanceOf: t,
|
1072
|
-
node: e,
|
1073
|
-
objectOf: t,
|
1074
|
-
oneOf: t,
|
1075
|
-
oneOfType: t,
|
1076
|
-
shape: t,
|
1077
|
-
exact: t,
|
1078
|
-
checkPropTypes: i,
|
1079
|
-
resetWarningCache: o,
|
1080
|
-
};
|
1081
|
-
return (r.PropTypes = r), r;
|
1082
|
-
});
|
1083
|
-
},
|
1084
|
-
function(e, t, r) {
|
1085
|
-
'use strict';
|
1086
|
-
e.exports = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
1087
|
-
},
|
1088
|
-
function(e, t, r) {
|
1089
|
-
'use strict';
|
1090
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
1091
|
-
var n = (function() {
|
1092
|
-
function e(e, t) {
|
1093
|
-
for (var r = 0; r < t.length; r++) {
|
1094
|
-
var n = t[r];
|
1095
|
-
(n.enumerable = n.enumerable || !1),
|
1096
|
-
(n.configurable = !0),
|
1097
|
-
'value' in n && (n.writable = !0),
|
1098
|
-
Object.defineProperty(e, n.key, n);
|
1099
|
-
}
|
1100
|
-
}
|
1101
|
-
return function(t, r, n) {
|
1102
|
-
return r && e(t.prototype, r), n && e(t, n), t;
|
1103
|
-
};
|
1104
|
-
})(),
|
1105
|
-
o = s(r(0)),
|
1106
|
-
i = s(r(4)),
|
1107
|
-
a = s(r(6));
|
1108
|
-
function s(e) {
|
1109
|
-
return e && e.__esModule ? e : { default: e };
|
1110
|
-
}
|
1111
|
-
var l = (function(e) {
|
1112
|
-
function t(e) {
|
1113
|
-
return (
|
1114
|
-
(function(e, t) {
|
1115
|
-
if (!(e instanceof t))
|
1116
|
-
throw new TypeError(
|
1117
|
-
'Cannot call a class as a function'
|
1118
|
-
);
|
1119
|
-
})(this, t),
|
1120
|
-
(function(e, t) {
|
1121
|
-
if (!e)
|
1122
|
-
throw new ReferenceError(
|
1123
|
-
"this hasn't been initialised - super() hasn't been called"
|
1124
|
-
);
|
1125
|
-
return !t ||
|
1126
|
-
('object' != typeof t && 'function' != typeof t)
|
1127
|
-
? e
|
1128
|
-
: t;
|
1129
|
-
})(
|
1130
|
-
this,
|
1131
|
-
(t.__proto__ || Object.getPrototypeOf(t)).call(this, e)
|
1132
|
-
)
|
1133
|
-
);
|
1134
|
-
}
|
1135
|
-
return (
|
1136
|
-
(function(e, t) {
|
1137
|
-
if ('function' != typeof t && null !== t)
|
1138
|
-
throw new TypeError(
|
1139
|
-
'Super expression must either be null or a function, not ' +
|
1140
|
-
typeof t
|
1141
|
-
);
|
1142
|
-
(e.prototype = Object.create(t && t.prototype, {
|
1143
|
-
constructor: {
|
1144
|
-
value: e,
|
1145
|
-
enumerable: !1,
|
1146
|
-
writable: !0,
|
1147
|
-
configurable: !0,
|
1148
|
-
},
|
1149
|
-
})),
|
1150
|
-
t &&
|
1151
|
-
(Object.setPrototypeOf
|
1152
|
-
? Object.setPrototypeOf(e, t)
|
1153
|
-
: (e.__proto__ = t));
|
1154
|
-
})(t, e),
|
1155
|
-
n(t, [
|
1156
|
-
{
|
1157
|
-
key: 'render',
|
1158
|
-
value: function() {
|
1159
|
-
return o.default.createElement(
|
1160
|
-
i.default,
|
1161
|
-
this.props
|
1162
|
-
);
|
1163
|
-
},
|
1164
|
-
},
|
1165
|
-
]),
|
1166
|
-
t
|
1167
|
-
);
|
1168
|
-
})(o.default.Component);
|
1169
|
-
t.default = (0, a.default)(l);
|
1170
|
-
},
|
1171
|
-
function(e, t, r) {
|
1172
|
-
(function(t) {
|
1173
|
-
var r = 'Expected a function',
|
1174
|
-
n = NaN,
|
1175
|
-
o = '[object Symbol]',
|
1176
|
-
i = /^\s+|\s+$/g,
|
1177
|
-
a = /^[-+]0x[0-9a-f]+$/i,
|
1178
|
-
s = /^0b[01]+$/i,
|
1179
|
-
l = /^0o[0-7]+$/i,
|
1180
|
-
u = parseInt,
|
1181
|
-
c = 'object' == typeof t && t && t.Object === Object && t,
|
1182
|
-
f =
|
1183
|
-
'object' == typeof self &&
|
1184
|
-
self &&
|
1185
|
-
self.Object === Object &&
|
1186
|
-
self,
|
1187
|
-
p = c || f || Function('return this')(),
|
1188
|
-
d = Object.prototype.toString,
|
1189
|
-
y = Math.max,
|
1190
|
-
h = Math.min,
|
1191
|
-
b = function() {
|
1192
|
-
return p.Date.now();
|
1193
|
-
};
|
1194
|
-
function v(e) {
|
1195
|
-
var t = typeof e;
|
1196
|
-
return !!e && ('object' == t || 'function' == t);
|
1197
|
-
}
|
1198
|
-
function m(e) {
|
1199
|
-
if ('number' == typeof e) return e;
|
1200
|
-
if (
|
1201
|
-
(function(e) {
|
1202
|
-
return (
|
1203
|
-
'symbol' == typeof e ||
|
1204
|
-
((function(e) {
|
1205
|
-
return !!e && 'object' == typeof e;
|
1206
|
-
})(e) &&
|
1207
|
-
d.call(e) == o)
|
1208
|
-
);
|
1209
|
-
})(e)
|
1210
|
-
)
|
1211
|
-
return n;
|
1212
|
-
if (v(e)) {
|
1213
|
-
var t = 'function' == typeof e.valueOf ? e.valueOf() : e;
|
1214
|
-
e = v(t) ? t + '' : t;
|
1215
|
-
}
|
1216
|
-
if ('string' != typeof e) return 0 === e ? e : +e;
|
1217
|
-
e = e.replace(i, '');
|
1218
|
-
var r = s.test(e);
|
1219
|
-
return r || l.test(e)
|
1220
|
-
? u(e.slice(2), r ? 2 : 8)
|
1221
|
-
: a.test(e)
|
1222
|
-
? n
|
1223
|
-
: +e;
|
1224
|
-
}
|
1225
|
-
e.exports = function(e, t, n) {
|
1226
|
-
var o,
|
1227
|
-
i,
|
1228
|
-
a,
|
1229
|
-
s,
|
1230
|
-
l,
|
1231
|
-
u,
|
1232
|
-
c = 0,
|
1233
|
-
f = !1,
|
1234
|
-
p = !1,
|
1235
|
-
d = !0;
|
1236
|
-
if ('function' != typeof e) throw new TypeError(r);
|
1237
|
-
function w(t) {
|
1238
|
-
var r = o,
|
1239
|
-
n = i;
|
1240
|
-
return (o = i = void 0), (c = t), (s = e.apply(n, r));
|
1241
|
-
}
|
1242
|
-
function O(e) {
|
1243
|
-
var r = e - u;
|
1244
|
-
return void 0 === u || r >= t || r < 0 || (p && e - c >= a);
|
1245
|
-
}
|
1246
|
-
function g() {
|
1247
|
-
var e = b();
|
1248
|
-
if (O(e)) return P(e);
|
1249
|
-
l = setTimeout(
|
1250
|
-
g,
|
1251
|
-
(function(e) {
|
1252
|
-
var r = t - (e - u);
|
1253
|
-
return p ? h(r, a - (e - c)) : r;
|
1254
|
-
})(e)
|
1255
|
-
);
|
1256
|
-
}
|
1257
|
-
function P(e) {
|
1258
|
-
return (l = void 0), d && o ? w(e) : ((o = i = void 0), s);
|
1259
|
-
}
|
1260
|
-
function T() {
|
1261
|
-
var e = b(),
|
1262
|
-
r = O(e);
|
1263
|
-
if (((o = arguments), (i = this), (u = e), r)) {
|
1264
|
-
if (void 0 === l)
|
1265
|
-
return (function(e) {
|
1266
|
-
return (
|
1267
|
-
(c = e),
|
1268
|
-
(l = setTimeout(g, t)),
|
1269
|
-
f ? w(e) : s
|
1270
|
-
);
|
1271
|
-
})(u);
|
1272
|
-
if (p) return (l = setTimeout(g, t)), w(u);
|
1273
|
-
}
|
1274
|
-
return void 0 === l && (l = setTimeout(g, t)), s;
|
1275
|
-
}
|
1276
|
-
return (
|
1277
|
-
(t = m(t) || 0),
|
1278
|
-
v(n) &&
|
1279
|
-
((f = !!n.leading),
|
1280
|
-
(a = (p = 'maxWait' in n)
|
1281
|
-
? y(m(n.maxWait) || 0, t)
|
1282
|
-
: a),
|
1283
|
-
(d = 'trailing' in n ? !!n.trailing : d)),
|
1284
|
-
(T.cancel = function() {
|
1285
|
-
void 0 !== l && clearTimeout(l),
|
1286
|
-
(c = 0),
|
1287
|
-
(o = u = i = l = void 0);
|
1288
|
-
}),
|
1289
|
-
(T.flush = function() {
|
1290
|
-
return void 0 === l ? s : P(b());
|
1291
|
-
}),
|
1292
|
-
T
|
1293
|
-
);
|
1294
|
-
};
|
1295
|
-
}.call(this, r(7)));
|
1296
|
-
},
|
1297
|
-
function(e, t, r) {
|
1298
|
-
(function(t) {
|
1299
|
-
var r = 'Expected a function',
|
1300
|
-
n = NaN,
|
1301
|
-
o = '[object Symbol]',
|
1302
|
-
i = /^\s+|\s+$/g,
|
1303
|
-
a = /^[-+]0x[0-9a-f]+$/i,
|
1304
|
-
s = /^0b[01]+$/i,
|
1305
|
-
l = /^0o[0-7]+$/i,
|
1306
|
-
u = parseInt,
|
1307
|
-
c = 'object' == typeof t && t && t.Object === Object && t,
|
1308
|
-
f =
|
1309
|
-
'object' == typeof self &&
|
1310
|
-
self &&
|
1311
|
-
self.Object === Object &&
|
1312
|
-
self,
|
1313
|
-
p = c || f || Function('return this')(),
|
1314
|
-
d = Object.prototype.toString,
|
1315
|
-
y = Math.max,
|
1316
|
-
h = Math.min,
|
1317
|
-
b = function() {
|
1318
|
-
return p.Date.now();
|
1319
|
-
};
|
1320
|
-
function v(e, t, n) {
|
1321
|
-
var o,
|
1322
|
-
i,
|
1323
|
-
a,
|
1324
|
-
s,
|
1325
|
-
l,
|
1326
|
-
u,
|
1327
|
-
c = 0,
|
1328
|
-
f = !1,
|
1329
|
-
p = !1,
|
1330
|
-
d = !0;
|
1331
|
-
if ('function' != typeof e) throw new TypeError(r);
|
1332
|
-
function v(t) {
|
1333
|
-
var r = o,
|
1334
|
-
n = i;
|
1335
|
-
return (o = i = void 0), (c = t), (s = e.apply(n, r));
|
1336
|
-
}
|
1337
|
-
function O(e) {
|
1338
|
-
var r = e - u;
|
1339
|
-
return void 0 === u || r >= t || r < 0 || (p && e - c >= a);
|
1340
|
-
}
|
1341
|
-
function g() {
|
1342
|
-
var e = b();
|
1343
|
-
if (O(e)) return P(e);
|
1344
|
-
l = setTimeout(
|
1345
|
-
g,
|
1346
|
-
(function(e) {
|
1347
|
-
var r = t - (e - u);
|
1348
|
-
return p ? h(r, a - (e - c)) : r;
|
1349
|
-
})(e)
|
1350
|
-
);
|
1351
|
-
}
|
1352
|
-
function P(e) {
|
1353
|
-
return (l = void 0), d && o ? v(e) : ((o = i = void 0), s);
|
1354
|
-
}
|
1355
|
-
function T() {
|
1356
|
-
var e = b(),
|
1357
|
-
r = O(e);
|
1358
|
-
if (((o = arguments), (i = this), (u = e), r)) {
|
1359
|
-
if (void 0 === l)
|
1360
|
-
return (function(e) {
|
1361
|
-
return (
|
1362
|
-
(c = e),
|
1363
|
-
(l = setTimeout(g, t)),
|
1364
|
-
f ? v(e) : s
|
1365
|
-
);
|
1366
|
-
})(u);
|
1367
|
-
if (p) return (l = setTimeout(g, t)), v(u);
|
1368
|
-
}
|
1369
|
-
return void 0 === l && (l = setTimeout(g, t)), s;
|
1370
|
-
}
|
1371
|
-
return (
|
1372
|
-
(t = w(t) || 0),
|
1373
|
-
m(n) &&
|
1374
|
-
((f = !!n.leading),
|
1375
|
-
(a = (p = 'maxWait' in n)
|
1376
|
-
? y(w(n.maxWait) || 0, t)
|
1377
|
-
: a),
|
1378
|
-
(d = 'trailing' in n ? !!n.trailing : d)),
|
1379
|
-
(T.cancel = function() {
|
1380
|
-
void 0 !== l && clearTimeout(l),
|
1381
|
-
(c = 0),
|
1382
|
-
(o = u = i = l = void 0);
|
1383
|
-
}),
|
1384
|
-
(T.flush = function() {
|
1385
|
-
return void 0 === l ? s : P(b());
|
1386
|
-
}),
|
1387
|
-
T
|
1388
|
-
);
|
1389
|
-
}
|
1390
|
-
function m(e) {
|
1391
|
-
var t = typeof e;
|
1392
|
-
return !!e && ('object' == t || 'function' == t);
|
1393
|
-
}
|
1394
|
-
function w(e) {
|
1395
|
-
if ('number' == typeof e) return e;
|
1396
|
-
if (
|
1397
|
-
(function(e) {
|
1398
|
-
return (
|
1399
|
-
'symbol' == typeof e ||
|
1400
|
-
((function(e) {
|
1401
|
-
return !!e && 'object' == typeof e;
|
1402
|
-
})(e) &&
|
1403
|
-
d.call(e) == o)
|
1404
|
-
);
|
1405
|
-
})(e)
|
1406
|
-
)
|
1407
|
-
return n;
|
1408
|
-
if (m(e)) {
|
1409
|
-
var t = 'function' == typeof e.valueOf ? e.valueOf() : e;
|
1410
|
-
e = m(t) ? t + '' : t;
|
1411
|
-
}
|
1412
|
-
if ('string' != typeof e) return 0 === e ? e : +e;
|
1413
|
-
e = e.replace(i, '');
|
1414
|
-
var r = s.test(e);
|
1415
|
-
return r || l.test(e)
|
1416
|
-
? u(e.slice(2), r ? 2 : 8)
|
1417
|
-
: a.test(e)
|
1418
|
-
? n
|
1419
|
-
: +e;
|
1420
|
-
}
|
1421
|
-
e.exports = function(e, t, n) {
|
1422
|
-
var o = !0,
|
1423
|
-
i = !0;
|
1424
|
-
if ('function' != typeof e) throw new TypeError(r);
|
1425
|
-
return (
|
1426
|
-
m(n) &&
|
1427
|
-
((o = 'leading' in n ? !!n.leading : o),
|
1428
|
-
(i = 'trailing' in n ? !!n.trailing : i)),
|
1429
|
-
v(e, t, { leading: o, maxWait: t, trailing: i })
|
1430
|
-
);
|
1431
|
-
};
|
1432
|
-
}.call(this, r(7)));
|
1433
|
-
},
|
1434
|
-
function(e, t, r) {
|
1435
|
-
'use strict';
|
1436
|
-
Object.defineProperty(t, '__esModule', { value: !0 });
|
1437
|
-
var n = function(e, t) {
|
1438
|
-
return 'undefined' == typeof getComputedStyle
|
1439
|
-
? e.style[t]
|
1440
|
-
: getComputedStyle(e, null).getPropertyValue(t);
|
1441
|
-
},
|
1442
|
-
o = function(e) {
|
1443
|
-
return (
|
1444
|
-
n(e, 'overflow') + n(e, 'overflow-y') + n(e, 'overflow-x')
|
1445
|
-
);
|
1446
|
-
};
|
1447
|
-
t.default = function(e) {
|
1448
|
-
if (!(e instanceof HTMLElement)) return window;
|
1449
|
-
for (
|
1450
|
-
var t = e;
|
1451
|
-
t &&
|
1452
|
-
t !== document.body &&
|
1453
|
-
t !== document.documentElement &&
|
1454
|
-
t.parentNode;
|
1
|
+
/*
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
6
|
+
* or disable the default devtool with "devtool: false".
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
8
|
+
*/
|
9
|
+
/******/ (() => { // webpackBootstrap
|
10
|
+
/******/ var __webpack_modules__ = ({
|
1455
11
|
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
]);
|
12
|
+
/***/ "./src/components/LazyLoadComponent.jsx":
|
13
|
+
/*!**********************************************!*\
|
14
|
+
!*** ./src/components/LazyLoadComponent.jsx ***!
|
15
|
+
\**********************************************/
|
16
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _PlaceholderWithoutTracking_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlaceholderWithoutTracking.jsx */ \"./src/components/PlaceholderWithoutTracking.jsx\");\n/* harmony import */ var _PlaceholderWithTracking_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PlaceholderWithTracking.jsx */ \"./src/components/PlaceholderWithTracking.jsx\");\n/* harmony import */ var _utils_intersection_observer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/intersection-observer */ \"./src/utils/intersection-observer.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\nvar LazyLoadComponent = /*#__PURE__*/function (_React$Component) {\n _inherits(LazyLoadComponent, _React$Component);\n\n var _super = _createSuper(LazyLoadComponent);\n\n function LazyLoadComponent(props) {\n var _this;\n\n _classCallCheck(this, LazyLoadComponent);\n\n _this = _super.call(this, props);\n var afterLoad = props.afterLoad,\n beforeLoad = props.beforeLoad,\n scrollPosition = props.scrollPosition,\n visibleByDefault = props.visibleByDefault;\n _this.state = {\n visible: visibleByDefault\n };\n\n if (visibleByDefault) {\n beforeLoad();\n afterLoad();\n }\n\n _this.onVisible = _this.onVisible.bind(_assertThisInitialized(_this));\n _this.isScrollTracked = Boolean(scrollPosition && Number.isFinite(scrollPosition.x) && scrollPosition.x >= 0 && Number.isFinite(scrollPosition.y) && scrollPosition.y >= 0);\n return _this;\n }\n\n _createClass(LazyLoadComponent, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (prevState.visible !== this.state.visible) {\n this.props.afterLoad();\n }\n }\n }, {\n key: \"onVisible\",\n value: function onVisible() {\n this.props.beforeLoad();\n this.setState({\n visible: true\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.state.visible) {\n return this.props.children;\n }\n\n var _this$props = this.props,\n className = _this$props.className,\n delayMethod = _this$props.delayMethod,\n delayTime = _this$props.delayTime,\n height = _this$props.height,\n placeholder = _this$props.placeholder,\n scrollPosition = _this$props.scrollPosition,\n style = _this$props.style,\n threshold = _this$props.threshold,\n useIntersectionObserver = _this$props.useIntersectionObserver,\n width = _this$props.width;\n\n if (this.isScrollTracked || useIntersectionObserver && (0,_utils_intersection_observer__WEBPACK_IMPORTED_MODULE_4__.default)()) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PlaceholderWithoutTracking_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {\n className: className,\n height: height,\n onVisible: this.onVisible,\n placeholder: placeholder,\n scrollPosition: scrollPosition,\n style: style,\n threshold: threshold,\n useIntersectionObserver: useIntersectionObserver,\n width: width\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PlaceholderWithTracking_jsx__WEBPACK_IMPORTED_MODULE_3__.default, {\n className: className,\n delayMethod: delayMethod,\n delayTime: delayTime,\n height: height,\n onVisible: this.onVisible,\n placeholder: placeholder,\n style: style,\n threshold: threshold,\n width: width\n });\n }\n }]);\n\n return LazyLoadComponent;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nLazyLoadComponent.propTypes = {\n afterLoad: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.func,\n beforeLoad: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.func,\n useIntersectionObserver: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.bool,\n visibleByDefault: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.bool\n};\nLazyLoadComponent.defaultProps = {\n afterLoad: function afterLoad() {\n return {};\n },\n beforeLoad: function beforeLoad() {\n return {};\n },\n useIntersectionObserver: true,\n visibleByDefault: false\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LazyLoadComponent);\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/components/LazyLoadComponent.jsx?");
|
20
|
+
|
21
|
+
/***/ }),
|
22
|
+
|
23
|
+
/***/ "./src/components/LazyLoadImage.jsx":
|
24
|
+
/*!******************************************!*\
|
25
|
+
!*** ./src/components/LazyLoadImage.jsx ***!
|
26
|
+
\******************************************/
|
27
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
28
|
+
|
29
|
+
"use strict";
|
30
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _LazyLoadComponent_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LazyLoadComponent.jsx */ \"./src/components/LazyLoadComponent.jsx\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"afterLoad\", \"beforeLoad\", \"delayMethod\", \"delayTime\", \"effect\", \"placeholder\", \"placeholderSrc\", \"scrollPosition\", \"threshold\", \"useIntersectionObserver\", \"visibleByDefault\", \"wrapperClassName\", \"wrapperProps\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar LazyLoadImage = /*#__PURE__*/function (_React$Component) {\n _inherits(LazyLoadImage, _React$Component);\n\n var _super = _createSuper(LazyLoadImage);\n\n function LazyLoadImage(props) {\n var _this;\n\n _classCallCheck(this, LazyLoadImage);\n\n _this = _super.call(this, props);\n _this.state = {\n loaded: false\n };\n return _this;\n }\n\n _createClass(LazyLoadImage, [{\n key: \"onImageLoad\",\n value: function onImageLoad() {\n var _this2 = this;\n\n if (this.state.loaded) {\n return null;\n }\n\n return function () {\n _this2.props.afterLoad();\n\n _this2.setState({\n loaded: true\n });\n };\n }\n }, {\n key: \"getImg\",\n value: function getImg() {\n var _this$props = this.props,\n afterLoad = _this$props.afterLoad,\n beforeLoad = _this$props.beforeLoad,\n delayMethod = _this$props.delayMethod,\n delayTime = _this$props.delayTime,\n effect = _this$props.effect,\n placeholder = _this$props.placeholder,\n placeholderSrc = _this$props.placeholderSrc,\n scrollPosition = _this$props.scrollPosition,\n threshold = _this$props.threshold,\n useIntersectionObserver = _this$props.useIntersectionObserver,\n visibleByDefault = _this$props.visibleByDefault,\n wrapperClassName = _this$props.wrapperClassName,\n wrapperProps = _this$props.wrapperProps,\n imgProps = _objectWithoutProperties(_this$props, _excluded);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"img\", _extends({\n onLoad: this.onImageLoad()\n }, imgProps));\n }\n }, {\n key: \"getLazyLoadImage\",\n value: function getLazyLoadImage() {\n var _this$props2 = this.props,\n beforeLoad = _this$props2.beforeLoad,\n className = _this$props2.className,\n delayMethod = _this$props2.delayMethod,\n delayTime = _this$props2.delayTime,\n height = _this$props2.height,\n placeholder = _this$props2.placeholder,\n scrollPosition = _this$props2.scrollPosition,\n style = _this$props2.style,\n threshold = _this$props2.threshold,\n useIntersectionObserver = _this$props2.useIntersectionObserver,\n visibleByDefault = _this$props2.visibleByDefault,\n width = _this$props2.width;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_LazyLoadComponent_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {\n beforeLoad: beforeLoad,\n className: className,\n delayMethod: delayMethod,\n delayTime: delayTime,\n height: height,\n placeholder: placeholder,\n scrollPosition: scrollPosition,\n style: style,\n threshold: threshold,\n useIntersectionObserver: useIntersectionObserver,\n visibleByDefault: visibleByDefault,\n width: width\n }, this.getImg());\n }\n }, {\n key: \"getWrappedLazyLoadImage\",\n value: function getWrappedLazyLoadImage(lazyLoadImage) {\n var _this$props3 = this.props,\n effect = _this$props3.effect,\n height = _this$props3.height,\n placeholderSrc = _this$props3.placeholderSrc,\n width = _this$props3.width,\n wrapperClassName = _this$props3.wrapperClassName,\n wrapperProps = _this$props3.wrapperProps;\n var loaded = this.state.loaded;\n var loadedClassName = loaded ? ' lazy-load-image-loaded' : '';\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", _extends({\n className: wrapperClassName + ' lazy-load-image-background ' + effect + loadedClassName,\n style: {\n backgroundImage: loaded || !placeholderSrc ? '' : \"url(\".concat(placeholderSrc, \")\"),\n backgroundSize: loaded || !placeholderSrc ? '' : '100% 100%',\n color: 'transparent',\n display: 'inline-block',\n height: height,\n width: width\n }\n }, wrapperProps), lazyLoadImage);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n effect = _this$props4.effect,\n placeholderSrc = _this$props4.placeholderSrc,\n visibleByDefault = _this$props4.visibleByDefault,\n wrapperClassName = _this$props4.wrapperClassName,\n wrapperProps = _this$props4.wrapperProps;\n var lazyLoadImage = this.getLazyLoadImage();\n var needsWrapper = (effect || placeholderSrc) && !visibleByDefault;\n\n if (!needsWrapper && !wrapperClassName && !wrapperProps) {\n return lazyLoadImage;\n }\n\n return this.getWrappedLazyLoadImage(lazyLoadImage);\n }\n }]);\n\n return LazyLoadImage;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nLazyLoadImage.propTypes = {\n afterLoad: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.func,\n beforeLoad: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.func,\n delayMethod: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.string,\n delayTime: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.number,\n effect: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.string,\n placeholderSrc: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.string,\n threshold: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.number,\n useIntersectionObserver: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.bool,\n visibleByDefault: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.bool,\n wrapperClassName: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.string,\n wrapperProps: prop_types__WEBPACK_IMPORTED_MODULE_1__.PropTypes.object\n};\nLazyLoadImage.defaultProps = {\n afterLoad: function afterLoad() {\n return {};\n },\n beforeLoad: function beforeLoad() {\n return {};\n },\n delayMethod: 'throttle',\n delayTime: 300,\n effect: '',\n placeholderSrc: null,\n threshold: 100,\n useIntersectionObserver: true,\n visibleByDefault: false,\n wrapperClassName: ''\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LazyLoadImage);\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/components/LazyLoadImage.jsx?");
|
31
|
+
|
32
|
+
/***/ }),
|
33
|
+
|
34
|
+
/***/ "./src/components/PlaceholderWithTracking.jsx":
|
35
|
+
/*!****************************************************!*\
|
36
|
+
!*** ./src/components/PlaceholderWithTracking.jsx ***!
|
37
|
+
\****************************************************/
|
38
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
39
|
+
|
40
|
+
"use strict";
|
41
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PlaceholderWithoutTracking_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PlaceholderWithoutTracking.jsx */ \"./src/components/PlaceholderWithoutTracking.jsx\");\n/* harmony import */ var _hoc_trackWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hoc/trackWindowScroll.js */ \"./src/hoc/trackWindowScroll.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar PlaceholderWithTracking = /*#__PURE__*/function (_React$Component) {\n _inherits(PlaceholderWithTracking, _React$Component);\n\n var _super = _createSuper(PlaceholderWithTracking);\n\n function PlaceholderWithTracking(props) {\n _classCallCheck(this, PlaceholderWithTracking);\n\n return _super.call(this, props);\n }\n\n _createClass(PlaceholderWithTracking, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PlaceholderWithoutTracking_jsx__WEBPACK_IMPORTED_MODULE_1__.default, this.props);\n }\n }]);\n\n return PlaceholderWithTracking;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_hoc_trackWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__.default)(PlaceholderWithTracking));\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/components/PlaceholderWithTracking.jsx?");
|
42
|
+
|
43
|
+
/***/ }),
|
44
|
+
|
45
|
+
/***/ "./src/components/PlaceholderWithoutTracking.jsx":
|
46
|
+
/*!*******************************************************!*\
|
47
|
+
!*** ./src/components/PlaceholderWithoutTracking.jsx ***!
|
48
|
+
\*******************************************************/
|
49
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
50
|
+
|
51
|
+
"use strict";
|
52
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_intersection_observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/intersection-observer */ \"./src/utils/intersection-observer.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\nvar checkIntersections = function checkIntersections(entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n entry.target.onVisible();\n }\n });\n};\n\nvar LAZY_LOAD_OBSERVERS = {};\n\nvar getObserver = function getObserver(threshold) {\n LAZY_LOAD_OBSERVERS[threshold] = LAZY_LOAD_OBSERVERS[threshold] || new IntersectionObserver(checkIntersections, {\n rootMargin: threshold + 'px'\n });\n return LAZY_LOAD_OBSERVERS[threshold];\n};\n\nvar PlaceholderWithoutTracking = /*#__PURE__*/function (_React$Component) {\n _inherits(PlaceholderWithoutTracking, _React$Component);\n\n var _super = _createSuper(PlaceholderWithoutTracking);\n\n function PlaceholderWithoutTracking(props) {\n var _this;\n\n _classCallCheck(this, PlaceholderWithoutTracking);\n\n _this = _super.call(this, props);\n _this.supportsObserver = !props.scrollPosition && props.useIntersectionObserver && (0,_utils_intersection_observer__WEBPACK_IMPORTED_MODULE_3__.default)();\n\n if (_this.supportsObserver) {\n var threshold = props.threshold;\n _this.observer = getObserver(threshold);\n }\n\n return _this;\n }\n\n _createClass(PlaceholderWithoutTracking, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.placeholder && this.observer) {\n this.placeholder.onVisible = this.props.onVisible;\n this.observer.observe(this.placeholder);\n }\n\n if (!this.supportsObserver) {\n this.updateVisibility();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.observer) {\n this.observer.unobserve(this.placeholder);\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (!this.supportsObserver) {\n this.updateVisibility();\n }\n }\n }, {\n key: \"getPlaceholderBoundingBox\",\n value: function getPlaceholderBoundingBox() {\n var scrollPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.scrollPosition;\n var boundingRect = this.placeholder.getBoundingClientRect();\n var style = react_dom__WEBPACK_IMPORTED_MODULE_1___default().findDOMNode(this.placeholder).style;\n var margin = {\n left: parseInt(style.getPropertyValue('margin-left'), 10) || 0,\n top: parseInt(style.getPropertyValue('margin-top'), 10) || 0\n };\n return {\n bottom: scrollPosition.y + boundingRect.bottom + margin.top,\n left: scrollPosition.x + boundingRect.left + margin.left,\n right: scrollPosition.x + boundingRect.right + margin.left,\n top: scrollPosition.y + boundingRect.top + margin.top\n };\n }\n }, {\n key: \"isPlaceholderInViewport\",\n value: function isPlaceholderInViewport() {\n if (typeof window === 'undefined' || !this.placeholder) {\n return false;\n }\n\n var _this$props = this.props,\n scrollPosition = _this$props.scrollPosition,\n threshold = _this$props.threshold;\n var boundingBox = this.getPlaceholderBoundingBox(scrollPosition);\n var viewport = {\n bottom: scrollPosition.y + window.innerHeight,\n left: scrollPosition.x,\n right: scrollPosition.x + window.innerWidth,\n top: scrollPosition.y\n };\n return Boolean(viewport.top - threshold <= boundingBox.bottom && viewport.bottom + threshold >= boundingBox.top && viewport.left - threshold <= boundingBox.right && viewport.right + threshold >= boundingBox.left);\n }\n }, {\n key: \"updateVisibility\",\n value: function updateVisibility() {\n if (this.isPlaceholderInViewport()) {\n this.props.onVisible();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n className = _this$props2.className,\n height = _this$props2.height,\n placeholder = _this$props2.placeholder,\n style = _this$props2.style,\n width = _this$props2.width;\n\n if (placeholder && typeof placeholder.type !== 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(placeholder, {\n ref: function ref(el) {\n return _this2.placeholder = el;\n }\n });\n }\n\n var styleProp = _objectSpread({\n display: 'inline-block'\n }, style);\n\n if (typeof width !== 'undefined') {\n styleProp.width = width;\n }\n\n if (typeof height !== 'undefined') {\n styleProp.height = height;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", {\n className: className,\n ref: function ref(el) {\n return _this2.placeholder = el;\n },\n style: styleProp\n }, placeholder);\n }\n }]);\n\n return PlaceholderWithoutTracking;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nPlaceholderWithoutTracking.propTypes = {\n onVisible: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.func.isRequired,\n className: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.string,\n height: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number, prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.string]),\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.element,\n threshold: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number,\n useIntersectionObserver: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.bool,\n scrollPosition: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.shape({\n x: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number.isRequired,\n y: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number.isRequired\n }),\n width: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number, prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.string])\n};\nPlaceholderWithoutTracking.defaultProps = {\n className: '',\n placeholder: null,\n threshold: 100,\n useIntersectionObserver: true\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PlaceholderWithoutTracking);\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/components/PlaceholderWithoutTracking.jsx?");
|
53
|
+
|
54
|
+
/***/ }),
|
55
|
+
|
56
|
+
/***/ "./src/hoc/trackWindowScroll.js":
|
57
|
+
/*!**************************************!*\
|
58
|
+
!*** ./src/hoc/trackWindowScroll.js ***!
|
59
|
+
\**************************************/
|
60
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
61
|
+
|
62
|
+
"use strict";
|
63
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash.debounce */ \"./node_modules/lodash.debounce/index.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash.throttle */ \"./node_modules/lodash.throttle/index.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_intersection_observer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/intersection-observer */ \"./src/utils/intersection-observer.js\");\n/* harmony import */ var _utils_get_scroll_ancestor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-scroll-ancestor */ \"./src/utils/get-scroll-ancestor.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"delayMethod\", \"delayTime\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\nvar getScrollX = function getScrollX() {\n return typeof window === 'undefined' ? 0 : window.scrollX || window.pageXOffset;\n};\n\nvar getScrollY = function getScrollY() {\n return typeof window === 'undefined' ? 0 : window.scrollY || window.pageYOffset;\n};\n\nconsole.log(':)');\n\nvar trackWindowScroll = function trackWindowScroll(BaseComponent) {\n var ScrollAwareComponent = /*#__PURE__*/function (_React$Component) {\n _inherits(ScrollAwareComponent, _React$Component);\n\n var _super = _createSuper(ScrollAwareComponent);\n\n function ScrollAwareComponent(props) {\n var _this;\n\n _classCallCheck(this, ScrollAwareComponent);\n\n _this = _super.call(this, props);\n console.log('props', props);\n _this.useIntersectionObserver = props.useIntersectionObserver && (0,_utils_intersection_observer__WEBPACK_IMPORTED_MODULE_5__.default)();\n\n if (_this.useIntersectionObserver) {\n return _possibleConstructorReturn(_this);\n }\n\n var onChangeScroll = _this.onChangeScroll.bind(_assertThisInitialized(_this));\n\n if (props.delayMethod === 'debounce') {\n _this.delayedScroll = lodash_debounce__WEBPACK_IMPORTED_MODULE_3___default()(onChangeScroll, props.delayTime);\n } else if (props.delayMethod === 'throttle') {\n _this.delayedScroll = lodash_throttle__WEBPACK_IMPORTED_MODULE_4___default()(onChangeScroll, props.delayTime);\n }\n\n _this.state = {\n scrollPosition: {\n x: getScrollX(),\n y: getScrollY()\n }\n };\n _this.baseComponentRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createRef();\n return _this;\n }\n\n _createClass(ScrollAwareComponent, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.addListeners();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeListeners();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (typeof window === 'undefined' || this.useIntersectionObserver) {\n return;\n }\n\n var scrollElement = (0,_utils_get_scroll_ancestor__WEBPACK_IMPORTED_MODULE_6__.default)(react_dom__WEBPACK_IMPORTED_MODULE_1___default().findDOMNode(this.baseComponentRef.current));\n\n if (scrollElement !== this.scrollElement) {\n this.removeListeners();\n this.addListeners();\n }\n }\n }, {\n key: \"addListeners\",\n value: function addListeners() {\n if (typeof window === 'undefined' || this.useIntersectionObserver) {\n return;\n }\n\n this.scrollElement = (0,_utils_get_scroll_ancestor__WEBPACK_IMPORTED_MODULE_6__.default)(react_dom__WEBPACK_IMPORTED_MODULE_1___default().findDOMNode(this.baseComponentRef.current));\n this.scrollElement.addEventListener('scroll', this.delayedScroll, {\n passive: true\n });\n window.addEventListener('resize', this.delayedScroll, {\n passive: true\n });\n\n if (this.scrollElement !== window) {\n window.addEventListener('scroll', this.delayedScroll, {\n passive: true\n });\n }\n }\n }, {\n key: \"removeListeners\",\n value: function removeListeners() {\n if (typeof window === 'undefined' || this.useIntersectionObserver) {\n return;\n }\n\n this.scrollElement.removeEventListener('scroll', this.delayedScroll);\n window.removeEventListener('resize', this.delayedScroll);\n\n if (this.scrollElement !== window) {\n window.removeEventListener('scroll', this.delayedScroll);\n }\n }\n }, {\n key: \"onChangeScroll\",\n value: function onChangeScroll() {\n if (this.useIntersectionObserver) {\n return;\n }\n\n this.setState({\n scrollPosition: {\n x: getScrollX(),\n y: getScrollY()\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n delayMethod = _this$props.delayMethod,\n delayTime = _this$props.delayTime,\n props = _objectWithoutProperties(_this$props, _excluded);\n\n var scrollPosition = this.useIntersectionObserver ? null : this.state.scrollPosition;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(BaseComponent, _extends({\n ref: this.baseComponentRef,\n scrollPosition: scrollPosition\n }, props));\n }\n }]);\n\n return ScrollAwareComponent;\n }((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\n ScrollAwareComponent.propTypes = {\n delayMethod: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.oneOf(['debounce', 'throttle']),\n delayTime: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.number,\n useIntersectionObserver: prop_types__WEBPACK_IMPORTED_MODULE_2__.PropTypes.bool\n };\n ScrollAwareComponent.defaultProps = {\n delayMethod: 'throttle',\n delayTime: 300,\n useIntersectionObserver: true\n };\n return ScrollAwareComponent;\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (trackWindowScroll);\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/hoc/trackWindowScroll.js?");
|
64
|
+
|
65
|
+
/***/ }),
|
66
|
+
|
67
|
+
/***/ "./src/index.js":
|
68
|
+
/*!**********************!*\
|
69
|
+
!*** ./src/index.js ***!
|
70
|
+
\**********************/
|
71
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
72
|
+
|
73
|
+
"use strict";
|
74
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LazyLoadImage\": () => (/* reexport safe */ _components_LazyLoadImage_jsx__WEBPACK_IMPORTED_MODULE_0__.default),\n/* harmony export */ \"LazyLoadComponent\": () => (/* reexport safe */ _components_LazyLoadComponent_jsx__WEBPACK_IMPORTED_MODULE_1__.default),\n/* harmony export */ \"trackWindowScroll\": () => (/* reexport safe */ _hoc_trackWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__.default)\n/* harmony export */ });\n/* harmony import */ var _components_LazyLoadImage_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/LazyLoadImage.jsx */ \"./src/components/LazyLoadImage.jsx\");\n/* harmony import */ var _components_LazyLoadComponent_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/LazyLoadComponent.jsx */ \"./src/components/LazyLoadComponent.jsx\");\n/* harmony import */ var _hoc_trackWindowScroll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hoc/trackWindowScroll.js */ \"./src/hoc/trackWindowScroll.js\");\n\n\n\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/index.js?");
|
75
|
+
|
76
|
+
/***/ }),
|
77
|
+
|
78
|
+
/***/ "./src/utils/get-scroll-ancestor.ts":
|
79
|
+
/*!******************************************!*\
|
80
|
+
!*** ./src/utils/get-scroll-ancestor.ts ***!
|
81
|
+
\******************************************/
|
82
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
83
|
+
|
84
|
+
"use strict";
|
85
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Adapted from https://github.com/loktar00/react-lazy-load/blob/master/src/utils/parentScroll.js\nvar getElementOverflowValues = function getElementOverflowValues(element) {\n var computedStyle = getComputedStyle(element, null);\n return computedStyle.getPropertyValue('overflow') + computedStyle.getPropertyValue('overflow-y') + computedStyle.getPropertyValue('overflow-x');\n};\n\nvar getScrollAncestor = function getScrollAncestor(element) {\n console.log('getScrollAncestor');\n\n if (!(element instanceof HTMLElement)) {\n return window;\n }\n\n var parent = element;\n\n while (parent) {\n if (!(parent instanceof HTMLElement)) {\n break;\n }\n\n if (/(scroll|auto)/.test(getElementOverflowValues(parent))) {\n return parent;\n }\n\n parent = parent.parentNode;\n }\n\n return window;\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getScrollAncestor);\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/utils/get-scroll-ancestor.ts?");
|
86
|
+
|
87
|
+
/***/ }),
|
88
|
+
|
89
|
+
/***/ "./src/utils/intersection-observer.js":
|
90
|
+
/*!********************************************!*\
|
91
|
+
!*** ./src/utils/intersection-observer.js ***!
|
92
|
+
\********************************************/
|
93
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
94
|
+
|
95
|
+
"use strict";
|
96
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() {\n return typeof window !== 'undefined' && 'IntersectionObserver' in window && 'isIntersecting' in window.IntersectionObserverEntry.prototype;\n}\n\n//# sourceURL=webpack://react-lazy-load-image-component/./src/utils/intersection-observer.js?");
|
97
|
+
|
98
|
+
/***/ }),
|
99
|
+
|
100
|
+
/***/ "./node_modules/lodash.debounce/index.js":
|
101
|
+
/*!***********************************************!*\
|
102
|
+
!*** ./node_modules/lodash.debounce/index.js ***!
|
103
|
+
\***********************************************/
|
104
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
105
|
+
|
106
|
+
eval("/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/lodash.debounce/index.js?");
|
107
|
+
|
108
|
+
/***/ }),
|
109
|
+
|
110
|
+
/***/ "./node_modules/lodash.throttle/index.js":
|
111
|
+
/*!***********************************************!*\
|
112
|
+
!*** ./node_modules/lodash.throttle/index.js ***!
|
113
|
+
\***********************************************/
|
114
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
115
|
+
|
116
|
+
eval("/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/lodash.throttle/index.js?");
|
117
|
+
|
118
|
+
/***/ }),
|
119
|
+
|
120
|
+
/***/ "./node_modules/object-assign/index.js":
|
121
|
+
/*!*********************************************!*\
|
122
|
+
!*** ./node_modules/object-assign/index.js ***!
|
123
|
+
\*********************************************/
|
124
|
+
/***/ ((module) => {
|
125
|
+
|
126
|
+
"use strict";
|
127
|
+
eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/object-assign/index.js?");
|
128
|
+
|
129
|
+
/***/ }),
|
130
|
+
|
131
|
+
/***/ "./node_modules/prop-types/checkPropTypes.js":
|
132
|
+
/*!***************************************************!*\
|
133
|
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
134
|
+
\***************************************************/
|
135
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
136
|
+
|
137
|
+
"use strict";
|
138
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/prop-types/checkPropTypes.js?");
|
139
|
+
|
140
|
+
/***/ }),
|
141
|
+
|
142
|
+
/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
|
143
|
+
/*!************************************************************!*\
|
144
|
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
145
|
+
\************************************************************/
|
146
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
147
|
+
|
148
|
+
"use strict";
|
149
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/prop-types/factoryWithTypeCheckers.js?");
|
150
|
+
|
151
|
+
/***/ }),
|
152
|
+
|
153
|
+
/***/ "./node_modules/prop-types/index.js":
|
154
|
+
/*!******************************************!*\
|
155
|
+
!*** ./node_modules/prop-types/index.js ***!
|
156
|
+
\******************************************/
|
157
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
158
|
+
|
159
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/prop-types/index.js?");
|
160
|
+
|
161
|
+
/***/ }),
|
162
|
+
|
163
|
+
/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
164
|
+
/*!*************************************************************!*\
|
165
|
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
166
|
+
\*************************************************************/
|
167
|
+
/***/ ((module) => {
|
168
|
+
|
169
|
+
"use strict";
|
170
|
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/prop-types/lib/ReactPropTypesSecret.js?");
|
171
|
+
|
172
|
+
/***/ }),
|
173
|
+
|
174
|
+
/***/ "./node_modules/react-is/cjs/react-is.development.js":
|
175
|
+
/*!***********************************************************!*\
|
176
|
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
177
|
+
\***********************************************************/
|
178
|
+
/***/ ((__unused_webpack_module, exports) => {
|
179
|
+
|
180
|
+
"use strict";
|
181
|
+
eval("/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/react-is/cjs/react-is.development.js?");
|
182
|
+
|
183
|
+
/***/ }),
|
184
|
+
|
185
|
+
/***/ "./node_modules/react-is/index.js":
|
186
|
+
/*!****************************************!*\
|
187
|
+
!*** ./node_modules/react-is/index.js ***!
|
188
|
+
\****************************************/
|
189
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
190
|
+
|
191
|
+
"use strict";
|
192
|
+
eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack://react-lazy-load-image-component/./node_modules/react-is/index.js?");
|
193
|
+
|
194
|
+
/***/ }),
|
195
|
+
|
196
|
+
/***/ "react":
|
197
|
+
/*!************************!*\
|
198
|
+
!*** external "react" ***!
|
199
|
+
\************************/
|
200
|
+
/***/ ((module) => {
|
201
|
+
|
202
|
+
"use strict";
|
203
|
+
module.exports = require("react");
|
204
|
+
|
205
|
+
/***/ }),
|
206
|
+
|
207
|
+
/***/ "react-dom":
|
208
|
+
/*!****************************!*\
|
209
|
+
!*** external "react-dom" ***!
|
210
|
+
\****************************/
|
211
|
+
/***/ ((module) => {
|
212
|
+
|
213
|
+
"use strict";
|
214
|
+
module.exports = require("react-dom");
|
215
|
+
|
216
|
+
/***/ })
|
217
|
+
|
218
|
+
/******/ });
|
219
|
+
/************************************************************************/
|
220
|
+
/******/ // The module cache
|
221
|
+
/******/ var __webpack_module_cache__ = {};
|
222
|
+
/******/
|
223
|
+
/******/ // The require function
|
224
|
+
/******/ function __webpack_require__(moduleId) {
|
225
|
+
/******/ // Check if module is in cache
|
226
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
227
|
+
/******/ if (cachedModule !== undefined) {
|
228
|
+
/******/ return cachedModule.exports;
|
229
|
+
/******/ }
|
230
|
+
/******/ // Create a new module (and put it into the cache)
|
231
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
232
|
+
/******/ // no module.id needed
|
233
|
+
/******/ // no module.loaded needed
|
234
|
+
/******/ exports: {}
|
235
|
+
/******/ };
|
236
|
+
/******/
|
237
|
+
/******/ // Execute the module function
|
238
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
239
|
+
/******/
|
240
|
+
/******/ // Return the exports of the module
|
241
|
+
/******/ return module.exports;
|
242
|
+
/******/ }
|
243
|
+
/******/
|
244
|
+
/************************************************************************/
|
245
|
+
/******/ /* webpack/runtime/compat get default export */
|
246
|
+
/******/ (() => {
|
247
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
248
|
+
/******/ __webpack_require__.n = (module) => {
|
249
|
+
/******/ var getter = module && module.__esModule ?
|
250
|
+
/******/ () => (module['default']) :
|
251
|
+
/******/ () => (module);
|
252
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
253
|
+
/******/ return getter;
|
254
|
+
/******/ };
|
255
|
+
/******/ })();
|
256
|
+
/******/
|
257
|
+
/******/ /* webpack/runtime/define property getters */
|
258
|
+
/******/ (() => {
|
259
|
+
/******/ // define getter functions for harmony exports
|
260
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
261
|
+
/******/ for(var key in definition) {
|
262
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
263
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
264
|
+
/******/ }
|
265
|
+
/******/ }
|
266
|
+
/******/ };
|
267
|
+
/******/ })();
|
268
|
+
/******/
|
269
|
+
/******/ /* webpack/runtime/global */
|
270
|
+
/******/ (() => {
|
271
|
+
/******/ __webpack_require__.g = (function() {
|
272
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
273
|
+
/******/ try {
|
274
|
+
/******/ return this || new Function('return this')();
|
275
|
+
/******/ } catch (e) {
|
276
|
+
/******/ if (typeof window === 'object') return window;
|
277
|
+
/******/ }
|
278
|
+
/******/ })();
|
279
|
+
/******/ })();
|
280
|
+
/******/
|
281
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
282
|
+
/******/ (() => {
|
283
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
284
|
+
/******/ })();
|
285
|
+
/******/
|
286
|
+
/******/ /* webpack/runtime/make namespace object */
|
287
|
+
/******/ (() => {
|
288
|
+
/******/ // define __esModule on exports
|
289
|
+
/******/ __webpack_require__.r = (exports) => {
|
290
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
291
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
292
|
+
/******/ }
|
293
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
294
|
+
/******/ };
|
295
|
+
/******/ })();
|
296
|
+
/******/
|
297
|
+
/************************************************************************/
|
298
|
+
/******/
|
299
|
+
/******/ // startup
|
300
|
+
/******/ // Load entry module and return exports
|
301
|
+
/******/ // This entry module can't be inlined because the eval devtool is used.
|
302
|
+
/******/ var __webpack_exports__ = __webpack_require__("./src/index.js");
|
303
|
+
/******/ module.exports = __webpack_exports__;
|
304
|
+
/******/
|
305
|
+
/******/ })()
|
306
|
+
;
|