1 | | /******/ (function(modules) { // webpackBootstrap |
2 | | /******/ // The module cache |
3 | | /******/ var installedModules = {}; |
4 | | |
5 | | /******/ // The require function |
6 | | /******/ function __webpack_require__(moduleId) { |
7 | | |
8 | | /******/ // Check if module is in cache |
9 | | /******/ if(installedModules[moduleId]) |
10 | | /******/ return installedModules[moduleId].exports; |
11 | | |
12 | | /******/ // Create a new module (and put it into the cache) |
13 | | /******/ var module = installedModules[moduleId] = { |
14 | | /******/ exports: {}, |
15 | | /******/ id: moduleId, |
16 | | /******/ loaded: false |
17 | | /******/ }; |
18 | | |
19 | | /******/ // Execute the module function |
20 | | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
21 | | |
22 | | /******/ // Flag the module as loaded |
23 | | /******/ module.loaded = true; |
24 | | |
25 | | /******/ // Return the exports of the module |
26 | | /******/ return module.exports; |
27 | | /******/ } |
28 | | |
29 | | |
30 | | /******/ // expose the modules object (__webpack_modules__) |
31 | | /******/ __webpack_require__.m = modules; |
32 | | |
33 | | /******/ // expose the module cache |
34 | | /******/ __webpack_require__.c = installedModules; |
35 | | |
36 | | /******/ // __webpack_public_path__ |
37 | | /******/ __webpack_require__.p = ""; |
38 | | |
39 | | /******/ // Load entry module and return exports |
40 | | /******/ return __webpack_require__(0); |
41 | | /******/ }) |
42 | | /************************************************************************/ |
43 | | /******/ ([ |
44 | | /* 0 */ |
45 | | /***/ (function(module, exports, __webpack_require__) { |
46 | | |
47 | | __webpack_require__(1); |
48 | | module.exports = __webpack_require__(331); |
49 | | |
50 | | |
51 | | /***/ }), |
52 | | /* 1 */ |
53 | | /***/ (function(module, exports, __webpack_require__) { |
54 | | |
55 | | /* WEBPACK VAR INJECTION */(function(global) {"use strict"; |
56 | | |
57 | | __webpack_require__(2); |
58 | | |
59 | | __webpack_require__(327); |
60 | | |
61 | | __webpack_require__(328); |
62 | | |
63 | | if (global._babelPolyfill) { |
64 | | throw new Error("only one instance of babel-polyfill is allowed"); |
65 | | } |
66 | | global._babelPolyfill = true; |
67 | | |
68 | | var DEFINE_PROPERTY = "defineProperty"; |
69 | | function define(O, key, value) { |
70 | | O[key] || Object[DEFINE_PROPERTY](O, key, { |
71 | | writable: true, |
72 | | configurable: true, |
73 | | value: value |
74 | | }); |
75 | | } |
76 | | |
77 | | define(String.prototype, "padLeft", "".padStart); |
78 | | define(String.prototype, "padRight", "".padEnd); |
79 | | |
80 | | "pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) { |
81 | | [][key] && define(Array, key, Function.call.bind([][key])); |
82 | | }); |
83 | | /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) |
84 | | |
85 | | /***/ }), |
86 | | /* 2 */ |
87 | | /***/ (function(module, exports, __webpack_require__) { |
88 | | |
89 | | __webpack_require__(3); |
90 | | __webpack_require__(51); |
91 | | __webpack_require__(52); |
92 | | __webpack_require__(53); |
93 | | __webpack_require__(54); |
94 | | __webpack_require__(56); |
95 | | __webpack_require__(59); |
96 | | __webpack_require__(60); |
97 | | __webpack_require__(61); |
98 | | __webpack_require__(62); |
99 | | __webpack_require__(63); |
100 | | __webpack_require__(64); |
101 | | __webpack_require__(65); |
102 | | __webpack_require__(66); |
103 | | __webpack_require__(67); |
104 | | __webpack_require__(69); |
105 | | __webpack_require__(71); |
106 | | __webpack_require__(73); |
107 | | __webpack_require__(75); |
108 | | __webpack_require__(78); |
109 | | __webpack_require__(79); |
110 | | __webpack_require__(80); |
111 | | __webpack_require__(84); |
112 | | __webpack_require__(86); |
113 | | __webpack_require__(88); |
114 | | __webpack_require__(91); |
115 | | __webpack_require__(92); |
116 | | __webpack_require__(93); |
117 | | __webpack_require__(94); |
118 | | __webpack_require__(96); |
119 | | __webpack_require__(97); |
120 | | __webpack_require__(98); |
121 | | __webpack_require__(99); |
122 | | __webpack_require__(100); |
123 | | __webpack_require__(101); |
124 | | __webpack_require__(102); |
125 | | __webpack_require__(104); |
126 | | __webpack_require__(105); |
127 | | __webpack_require__(106); |
128 | | __webpack_require__(108); |
129 | | __webpack_require__(109); |
130 | | __webpack_require__(110); |
131 | | __webpack_require__(112); |
132 | | __webpack_require__(114); |
133 | | __webpack_require__(115); |
134 | | __webpack_require__(116); |
135 | | __webpack_require__(117); |
136 | | __webpack_require__(118); |
137 | | __webpack_require__(119); |
138 | | __webpack_require__(120); |
139 | | __webpack_require__(121); |
140 | | __webpack_require__(122); |
141 | | __webpack_require__(123); |
142 | | __webpack_require__(124); |
143 | | __webpack_require__(125); |
144 | | __webpack_require__(126); |
145 | | __webpack_require__(131); |
146 | | __webpack_require__(132); |
147 | | __webpack_require__(136); |
148 | | __webpack_require__(137); |
149 | | __webpack_require__(138); |
150 | | __webpack_require__(139); |
151 | | __webpack_require__(141); |
152 | | __webpack_require__(142); |
153 | | __webpack_require__(143); |
154 | | __webpack_require__(144); |
155 | | __webpack_require__(145); |
156 | | __webpack_require__(146); |
157 | | __webpack_require__(147); |
158 | | __webpack_require__(148); |
159 | | __webpack_require__(149); |
160 | | __webpack_require__(150); |
161 | | __webpack_require__(151); |
162 | | __webpack_require__(152); |
163 | | __webpack_require__(153); |
164 | | __webpack_require__(154); |
165 | | __webpack_require__(155); |
166 | | __webpack_require__(157); |
167 | | __webpack_require__(158); |
168 | | __webpack_require__(160); |
169 | | __webpack_require__(161); |
170 | | __webpack_require__(167); |
171 | | __webpack_require__(168); |
172 | | __webpack_require__(170); |
173 | | __webpack_require__(171); |
174 | | __webpack_require__(172); |
175 | | __webpack_require__(176); |
176 | | __webpack_require__(177); |
177 | | __webpack_require__(178); |
178 | | __webpack_require__(179); |
179 | | __webpack_require__(180); |
180 | | __webpack_require__(182); |
181 | | __webpack_require__(183); |
182 | | __webpack_require__(184); |
183 | | __webpack_require__(185); |
184 | | __webpack_require__(188); |
185 | | __webpack_require__(190); |
186 | | __webpack_require__(191); |
187 | | __webpack_require__(192); |
188 | | __webpack_require__(194); |
189 | | __webpack_require__(196); |
190 | | __webpack_require__(198); |
191 | | __webpack_require__(200); |
192 | | __webpack_require__(201); |
193 | | __webpack_require__(202); |
194 | | __webpack_require__(206); |
195 | | __webpack_require__(207); |
196 | | __webpack_require__(208); |
197 | | __webpack_require__(210); |
198 | | __webpack_require__(220); |
199 | | __webpack_require__(224); |
200 | | __webpack_require__(225); |
201 | | __webpack_require__(227); |
202 | | __webpack_require__(228); |
203 | | __webpack_require__(232); |
204 | | __webpack_require__(233); |
205 | | __webpack_require__(235); |
206 | | __webpack_require__(236); |
207 | | __webpack_require__(237); |
208 | | __webpack_require__(238); |
209 | | __webpack_require__(239); |
210 | | __webpack_require__(240); |
211 | | __webpack_require__(241); |
212 | | __webpack_require__(242); |
213 | | __webpack_require__(243); |
214 | | __webpack_require__(244); |
215 | | __webpack_require__(245); |
216 | | __webpack_require__(246); |
217 | | __webpack_require__(247); |
218 | | __webpack_require__(248); |
219 | | __webpack_require__(249); |
220 | | __webpack_require__(250); |
221 | | __webpack_require__(251); |
222 | | __webpack_require__(252); |
223 | | __webpack_require__(253); |
224 | | __webpack_require__(255); |
225 | | __webpack_require__(256); |
226 | | __webpack_require__(257); |
227 | | __webpack_require__(258); |
228 | | __webpack_require__(259); |
229 | | __webpack_require__(261); |
230 | | __webpack_require__(262); |
231 | | __webpack_require__(263); |
232 | | __webpack_require__(265); |
233 | | __webpack_require__(266); |
234 | | __webpack_require__(267); |
235 | | __webpack_require__(268); |
236 | | __webpack_require__(269); |
237 | | __webpack_require__(270); |
238 | | __webpack_require__(271); |
239 | | __webpack_require__(272); |
240 | | __webpack_require__(274); |
241 | | __webpack_require__(275); |
242 | | __webpack_require__(277); |
243 | | __webpack_require__(278); |
244 | | __webpack_require__(279); |
245 | | __webpack_require__(280); |
246 | | __webpack_require__(283); |
247 | | __webpack_require__(284); |
248 | | __webpack_require__(286); |
249 | | __webpack_require__(287); |
250 | | __webpack_require__(288); |
251 | | __webpack_require__(289); |
252 | | __webpack_require__(291); |
253 | | __webpack_require__(292); |
254 | | __webpack_require__(293); |
255 | | __webpack_require__(294); |
256 | | __webpack_require__(295); |
257 | | __webpack_require__(296); |
258 | | __webpack_require__(297); |
259 | | __webpack_require__(298); |
260 | | __webpack_require__(299); |
261 | | __webpack_require__(300); |
262 | | __webpack_require__(302); |
263 | | __webpack_require__(303); |
264 | | __webpack_require__(304); |
265 | | __webpack_require__(305); |
266 | | __webpack_require__(306); |
267 | | __webpack_require__(307); |
268 | | __webpack_require__(308); |
269 | | __webpack_require__(309); |
270 | | __webpack_require__(310); |
271 | | __webpack_require__(311); |
272 | | __webpack_require__(312); |
273 | | __webpack_require__(314); |
274 | | __webpack_require__(315); |
275 | | __webpack_require__(316); |
276 | | __webpack_require__(317); |
277 | | __webpack_require__(318); |
278 | | __webpack_require__(319); |
279 | | __webpack_require__(320); |
280 | | __webpack_require__(321); |
281 | | __webpack_require__(322); |
282 | | __webpack_require__(323); |
283 | | __webpack_require__(324); |
284 | | __webpack_require__(325); |
285 | | __webpack_require__(326); |
286 | | module.exports = __webpack_require__(9); |
287 | | |
288 | | |
289 | | /***/ }), |
290 | | /* 3 */ |
291 | | /***/ (function(module, exports, __webpack_require__) { |
292 | | |
293 | | 'use strict'; |
294 | | // ECMAScript 6 symbols shim |
295 | | var global = __webpack_require__(4); |
296 | | var has = __webpack_require__(5); |
297 | | var DESCRIPTORS = __webpack_require__(6); |
298 | | var $export = __webpack_require__(8); |
299 | | var redefine = __webpack_require__(18); |
300 | | var META = __webpack_require__(22).KEY; |
301 | | var $fails = __webpack_require__(7); |
302 | | var shared = __webpack_require__(23); |
303 | | var setToStringTag = __webpack_require__(25); |
304 | | var uid = __webpack_require__(19); |
305 | | var wks = __webpack_require__(26); |
306 | | var wksExt = __webpack_require__(27); |
307 | | var wksDefine = __webpack_require__(28); |
308 | | var enumKeys = __webpack_require__(29); |
309 | | var isArray = __webpack_require__(44); |
310 | | var anObject = __webpack_require__(12); |
311 | | var isObject = __webpack_require__(13); |
312 | | var toIObject = __webpack_require__(32); |
313 | | var toPrimitive = __webpack_require__(16); |
314 | | var createDesc = __webpack_require__(17); |
315 | | var _create = __webpack_require__(45); |
316 | | var gOPNExt = __webpack_require__(48); |
317 | | var $GOPD = __webpack_require__(50); |
318 | | var $DP = __webpack_require__(11); |
319 | | var $keys = __webpack_require__(30); |
320 | | var gOPD = $GOPD.f; |
321 | | var dP = $DP.f; |
322 | | var gOPN = gOPNExt.f; |
323 | | var $Symbol = global.Symbol; |
324 | | var $JSON = global.JSON; |
325 | | var _stringify = $JSON && $JSON.stringify; |
326 | | var PROTOTYPE = 'prototype'; |
327 | | var HIDDEN = wks('_hidden'); |
328 | | var TO_PRIMITIVE = wks('toPrimitive'); |
329 | | var isEnum = {}.propertyIsEnumerable; |
330 | | var SymbolRegistry = shared('symbol-registry'); |
331 | | var AllSymbols = shared('symbols'); |
332 | | var OPSymbols = shared('op-symbols'); |
333 | | var ObjectProto = Object[PROTOTYPE]; |
334 | | var USE_NATIVE = typeof $Symbol == 'function'; |
335 | | var QObject = global.QObject; |
336 | | // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 |
337 | | var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; |
338 | | |
339 | | // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 |
340 | | var setSymbolDesc = DESCRIPTORS && $fails(function () { |
341 | | return _create(dP({}, 'a', { |
342 | | get: function () { return dP(this, 'a', { value: 7 }).a; } |
343 | | })).a != 7; |
344 | | }) ? function (it, key, D) { |
345 | | var protoDesc = gOPD(ObjectProto, key); |
346 | | if (protoDesc) delete ObjectProto[key]; |
347 | | dP(it, key, D); |
348 | | if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); |
349 | | } : dP; |
350 | | |
351 | | var wrap = function (tag) { |
352 | | var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); |
353 | | sym._k = tag; |
354 | | return sym; |
355 | | }; |
356 | | |
357 | | var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { |
358 | | return typeof it == 'symbol'; |
359 | | } : function (it) { |
360 | | return it instanceof $Symbol; |
361 | | }; |
362 | | |
363 | | var $defineProperty = function defineProperty(it, key, D) { |
364 | | if (it === ObjectProto) $defineProperty(OPSymbols, key, D); |
365 | | anObject(it); |
366 | | key = toPrimitive(key, true); |
367 | | anObject(D); |
368 | | if (has(AllSymbols, key)) { |
369 | | if (!D.enumerable) { |
370 | | if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); |
371 | | it[HIDDEN][key] = true; |
372 | | } else { |
373 | | if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; |
374 | | D = _create(D, { enumerable: createDesc(0, false) }); |
375 | | } return setSymbolDesc(it, key, D); |
376 | | } return dP(it, key, D); |
377 | | }; |
378 | | var $defineProperties = function defineProperties(it, P) { |
379 | | anObject(it); |
380 | | var keys = enumKeys(P = toIObject(P)); |
381 | | var i = 0; |
382 | | var l = keys.length; |
383 | | var key; |
384 | | while (l > i) $defineProperty(it, key = keys[i++], P[key]); |
385 | | return it; |
386 | | }; |
387 | | var $create = function create(it, P) { |
388 | | return P === undefined ? _create(it) : $defineProperties(_create(it), P); |
389 | | }; |
390 | | var $propertyIsEnumerable = function propertyIsEnumerable(key) { |
391 | | var E = isEnum.call(this, key = toPrimitive(key, true)); |
392 | | if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; |
393 | | return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; |
394 | | }; |
395 | | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { |
396 | | it = toIObject(it); |
397 | | key = toPrimitive(key, true); |
398 | | if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; |
399 | | var D = gOPD(it, key); |
400 | | if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; |
401 | | return D; |
402 | | }; |
403 | | var $getOwnPropertyNames = function getOwnPropertyNames(it) { |
404 | | var names = gOPN(toIObject(it)); |
405 | | var result = []; |
406 | | var i = 0; |
407 | | var key; |
408 | | while (names.length > i) { |
409 | | if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); |
410 | | } return result; |
411 | | }; |
412 | | var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { |
413 | | var IS_OP = it === ObjectProto; |
414 | | var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); |
415 | | var result = []; |
416 | | var i = 0; |
417 | | var key; |
418 | | while (names.length > i) { |
419 | | if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); |
420 | | } return result; |
421 | | }; |
422 | | |
423 | | // 19.4.1.1 Symbol([description]) |
424 | | if (!USE_NATIVE) { |
425 | | $Symbol = function Symbol() { |
426 | | if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); |
427 | | var tag = uid(arguments.length > 0 ? arguments[0] : undefined); |
428 | | var $set = function (value) { |
429 | | if (this === ObjectProto) $set.call(OPSymbols, value); |
430 | | if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; |
431 | | setSymbolDesc(this, tag, createDesc(1, value)); |
432 | | }; |
433 | | if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); |
434 | | return wrap(tag); |
435 | | }; |
436 | | redefine($Symbol[PROTOTYPE], 'toString', function toString() { |
437 | | return this._k; |
438 | | }); |
439 | | |
440 | | $GOPD.f = $getOwnPropertyDescriptor; |
441 | | $DP.f = $defineProperty; |
442 | | __webpack_require__(49).f = gOPNExt.f = $getOwnPropertyNames; |
443 | | __webpack_require__(43).f = $propertyIsEnumerable; |
444 | | __webpack_require__(42).f = $getOwnPropertySymbols; |
445 | | |
446 | | if (DESCRIPTORS && !__webpack_require__(24)) { |
447 | | redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); |
448 | | } |
449 | | |
450 | | wksExt.f = function (name) { |
451 | | return wrap(wks(name)); |
452 | | }; |
453 | | } |
454 | | |
455 | | $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); |
456 | | |
457 | | for (var es6Symbols = ( |
458 | | // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 |
459 | | 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' |
460 | | ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); |
461 | | |
462 | | for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); |
463 | | |
464 | | $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { |
465 | | // 19.4.2.1 Symbol.for(key) |
466 | | 'for': function (key) { |
467 | | return has(SymbolRegistry, key += '') |
468 | | ? SymbolRegistry[key] |
469 | | : SymbolRegistry[key] = $Symbol(key); |
470 | | }, |
471 | | // 19.4.2.5 Symbol.keyFor(sym) |
472 | | keyFor: function keyFor(sym) { |
473 | | if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); |
474 | | for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; |
475 | | }, |
476 | | useSetter: function () { setter = true; }, |
477 | | useSimple: function () { setter = false; } |
478 | | }); |
479 | | |
480 | | $export($export.S + $export.F * !USE_NATIVE, 'Object', { |
481 | | // 19.1.2.2 Object.create(O [, Properties]) |
482 | | create: $create, |
483 | | // 19.1.2.4 Object.defineProperty(O, P, Attributes) |
484 | | defineProperty: $defineProperty, |
485 | | // 19.1.2.3 Object.defineProperties(O, Properties) |
486 | | defineProperties: $defineProperties, |
487 | | // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) |
488 | | getOwnPropertyDescriptor: $getOwnPropertyDescriptor, |
489 | | // 19.1.2.7 Object.getOwnPropertyNames(O) |
490 | | getOwnPropertyNames: $getOwnPropertyNames, |
491 | | // 19.1.2.8 Object.getOwnPropertySymbols(O) |
492 | | getOwnPropertySymbols: $getOwnPropertySymbols |
493 | | }); |
494 | | |
495 | | // 24.3.2 JSON.stringify(value [, replacer [, space]]) |
496 | | $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { |
497 | | var S = $Symbol(); |
498 | | // MS Edge converts symbol values to JSON as {} |
499 | | // WebKit converts symbol values to JSON as null |
500 | | // V8 throws on boxed symbols |
501 | | return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; |
502 | | })), 'JSON', { |
503 | | stringify: function stringify(it) { |
504 | | var args = [it]; |
505 | | var i = 1; |
506 | | var replacer, $replacer; |
507 | | while (arguments.length > i) args.push(arguments[i++]); |
508 | | $replacer = replacer = args[1]; |
509 | | if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined |
510 | | if (!isArray(replacer)) replacer = function (key, value) { |
511 | | if (typeof $replacer == 'function') value = $replacer.call(this, key, value); |
512 | | if (!isSymbol(value)) return value; |
513 | | }; |
514 | | args[1] = replacer; |
515 | | return _stringify.apply($JSON, args); |
516 | | } |
517 | | }); |
518 | | |
519 | | // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) |
520 | | $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); |
521 | | // 19.4.3.5 Symbol.prototype[@@toStringTag] |
522 | | setToStringTag($Symbol, 'Symbol'); |
523 | | // 20.2.1.9 Math[@@toStringTag] |
524 | | setToStringTag(Math, 'Math', true); |
525 | | // 24.3.3 JSON[@@toStringTag] |
526 | | setToStringTag(global.JSON, 'JSON', true); |
527 | | |
528 | | |
529 | | /***/ }), |
530 | | /* 4 */ |
531 | | /***/ (function(module, exports) { |
532 | | |
533 | | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 |
534 | | var global = module.exports = typeof window != 'undefined' && window.Math == Math |
535 | | ? window : typeof self != 'undefined' && self.Math == Math ? self |
536 | | // eslint-disable-next-line no-new-func |
537 | | : Function('return this')(); |
538 | | if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef |
539 | | |
540 | | |
541 | | /***/ }), |
542 | | /* 5 */ |
543 | | /***/ (function(module, exports) { |
544 | | |
545 | | var hasOwnProperty = {}.hasOwnProperty; |
546 | | module.exports = function (it, key) { |
547 | | return hasOwnProperty.call(it, key); |
548 | | }; |
549 | | |
550 | | |
551 | | /***/ }), |
552 | | /* 6 */ |
553 | | /***/ (function(module, exports, __webpack_require__) { |
554 | | |
555 | | // Thank's IE8 for his funny defineProperty |
556 | | module.exports = !__webpack_require__(7)(function () { |
557 | | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; |
558 | | }); |
559 | | |
560 | | |
561 | | /***/ }), |
562 | | /* 7 */ |
563 | | /***/ (function(module, exports) { |
564 | | |
565 | | module.exports = function (exec) { |
566 | | try { |
567 | | return !!exec(); |
568 | | } catch (e) { |
569 | | return true; |
570 | | } |
571 | | }; |
572 | | |
573 | | |
574 | | /***/ }), |
575 | | /* 8 */ |
576 | | /***/ (function(module, exports, __webpack_require__) { |
577 | | |
578 | | var global = __webpack_require__(4); |
579 | | var core = __webpack_require__(9); |
580 | | var hide = __webpack_require__(10); |
581 | | var redefine = __webpack_require__(18); |
582 | | var ctx = __webpack_require__(20); |
583 | | var PROTOTYPE = 'prototype'; |
584 | | |
585 | | var $export = function (type, name, source) { |
586 | | var IS_FORCED = type & $export.F; |
587 | | var IS_GLOBAL = type & $export.G; |
588 | | var IS_STATIC = type & $export.S; |
589 | | var IS_PROTO = type & $export.P; |
590 | | var IS_BIND = type & $export.B; |
591 | | var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; |
592 | | var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); |
593 | | var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); |
594 | | var key, own, out, exp; |
595 | | if (IS_GLOBAL) source = name; |
596 | | for (key in source) { |
597 | | // contains in native |
598 | | own = !IS_FORCED && target && target[key] !== undefined; |
599 | | // export native or passed |
600 | | out = (own ? target : source)[key]; |
601 | | // bind timers to global for call from export context |
602 | | exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; |
603 | | // extend global |
604 | | if (target) redefine(target, key, out, type & $export.U); |
605 | | // export |
606 | | if (exports[key] != out) hide(exports, key, exp); |
607 | | if (IS_PROTO && expProto[key] != out) expProto[key] = out; |
608 | | } |
609 | | }; |
610 | | global.core = core; |
611 | | // type bitmap |
612 | | $export.F = 1; // forced |
613 | | $export.G = 2; // global |
614 | | $export.S = 4; // static |
615 | | $export.P = 8; // proto |
616 | | $export.B = 16; // bind |
617 | | $export.W = 32; // wrap |
618 | | $export.U = 64; // safe |
619 | | $export.R = 128; // real proto method for `library` |
620 | | module.exports = $export; |
621 | | |
622 | | |
623 | | /***/ }), |
624 | | /* 9 */ |
625 | | /***/ (function(module, exports) { |
626 | | |
627 | | var core = module.exports = { version: '2.6.0' }; |
628 | | if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef |
629 | | |
630 | | |
631 | | /***/ }), |
632 | | /* 10 */ |
633 | | /***/ (function(module, exports, __webpack_require__) { |
634 | | |
635 | | var dP = __webpack_require__(11); |
636 | | var createDesc = __webpack_require__(17); |
637 | | module.exports = __webpack_require__(6) ? function (object, key, value) { |
638 | | return dP.f(object, key, createDesc(1, value)); |
639 | | } : function (object, key, value) { |
640 | | object[key] = value; |
641 | | return object; |
642 | | }; |
643 | | |
644 | | |
645 | | /***/ }), |
646 | | /* 11 */ |
647 | | /***/ (function(module, exports, __webpack_require__) { |
648 | | |
649 | | var anObject = __webpack_require__(12); |
650 | | var IE8_DOM_DEFINE = __webpack_require__(14); |
651 | | var toPrimitive = __webpack_require__(16); |
652 | | var dP = Object.defineProperty; |
653 | | |
654 | | exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes) { |
655 | | anObject(O); |
656 | | P = toPrimitive(P, true); |
657 | | anObject(Attributes); |
658 | | if (IE8_DOM_DEFINE) try { |
659 | | return dP(O, P, Attributes); |
660 | | } catch (e) { /* empty */ } |
661 | | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); |
662 | | if ('value' in Attributes) O[P] = Attributes.value; |
663 | | return O; |
664 | | }; |
665 | | |
666 | | |
667 | | /***/ }), |
668 | | /* 12 */ |
669 | | /***/ (function(module, exports, __webpack_require__) { |
670 | | |
671 | | var isObject = __webpack_require__(13); |
672 | | module.exports = function (it) { |
673 | | if (!isObject(it)) throw TypeError(it + ' is not an object!'); |
674 | | return it; |
675 | | }; |
676 | | |
677 | | |
678 | | /***/ }), |
679 | | /* 13 */ |
680 | | /***/ (function(module, exports) { |
681 | | |
682 | | module.exports = function (it) { |
683 | | return typeof it === 'object' ? it !== null : typeof it === 'function'; |
684 | | }; |
685 | | |
686 | | |
687 | | /***/ }), |
688 | | /* 14 */ |
689 | | /***/ (function(module, exports, __webpack_require__) { |
690 | | |
691 | | module.exports = !__webpack_require__(6) && !__webpack_require__(7)(function () { |
692 | | return Object.defineProperty(__webpack_require__(15)('div'), 'a', { get: function () { return 7; } }).a != 7; |
693 | | }); |
694 | | |
695 | | |
696 | | /***/ }), |
697 | | /* 15 */ |
698 | | /***/ (function(module, exports, __webpack_require__) { |
699 | | |
700 | | var isObject = __webpack_require__(13); |
701 | | var document = __webpack_require__(4).document; |
702 | | // typeof document.createElement is 'object' in old IE |
703 | | var is = isObject(document) && isObject(document.createElement); |
704 | | module.exports = function (it) { |
705 | | return is ? document.createElement(it) : {}; |
706 | | }; |
707 | | |
708 | | |
709 | | /***/ }), |
710 | | /* 16 */ |
711 | | /***/ (function(module, exports, __webpack_require__) { |
712 | | |
713 | | // 7.1.1 ToPrimitive(input [, PreferredType]) |
714 | | var isObject = __webpack_require__(13); |
715 | | // instead of the ES6 spec version, we didn't implement @@toPrimitive case |
716 | | // and the second argument - flag - preferred type is a string |
717 | | module.exports = function (it, S) { |
718 | | if (!isObject(it)) return it; |
719 | | var fn, val; |
720 | | if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; |
721 | | if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; |
722 | | if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; |
723 | | throw TypeError("Can't convert object to primitive value"); |
724 | | }; |
725 | | |
726 | | |
727 | | /***/ }), |
728 | | /* 17 */ |
729 | | /***/ (function(module, exports) { |
730 | | |
731 | | module.exports = function (bitmap, value) { |
732 | | return { |
733 | | enumerable: !(bitmap & 1), |
734 | | configurable: !(bitmap & 2), |
735 | | writable: !(bitmap & 4), |
736 | | value: value |
737 | | }; |
738 | | }; |
739 | | |
740 | | |
741 | | /***/ }), |
742 | | /* 18 */ |
743 | | /***/ (function(module, exports, __webpack_require__) { |
744 | | |
745 | | var global = __webpack_require__(4); |
746 | | var hide = __webpack_require__(10); |
747 | | var has = __webpack_require__(5); |
748 | | var SRC = __webpack_require__(19)('src'); |
749 | | var TO_STRING = 'toString'; |
750 | | var $toString = Function[TO_STRING]; |
751 | | var TPL = ('' + $toString).split(TO_STRING); |
752 | | |
753 | | __webpack_require__(9).inspectSource = function (it) { |
754 | | return $toString.call(it); |
755 | | }; |
756 | | |
757 | | (module.exports = function (O, key, val, safe) { |
758 | | var isFunction = typeof val == 'function'; |
759 | | if (isFunction) has(val, 'name') || hide(val, 'name', key); |
760 | | if (O[key] === val) return; |
761 | | if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); |
762 | | if (O === global) { |
763 | | O[key] = val; |
764 | | } else if (!safe) { |
765 | | delete O[key]; |
766 | | hide(O, key, val); |
767 | | } else if (O[key]) { |
768 | | O[key] = val; |
769 | | } else { |
770 | | hide(O, key, val); |
771 | | } |
772 | | // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative |
773 | | })(Function.prototype, TO_STRING, function toString() { |
774 | | return typeof this == 'function' && this[SRC] || $toString.call(this); |
775 | | }); |
776 | | |
777 | | |
778 | | /***/ }), |
779 | | /* 19 */ |
780 | | /***/ (function(module, exports) { |
781 | | |
782 | | var id = 0; |
783 | | var px = Math.random(); |
784 | | module.exports = function (key) { |
785 | | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); |
786 | | }; |
787 | | |
788 | | |
789 | | /***/ }), |
790 | | /* 20 */ |
791 | | /***/ (function(module, exports, __webpack_require__) { |
792 | | |
793 | | // optional / simple context binding |
794 | | var aFunction = __webpack_require__(21); |
795 | | module.exports = function (fn, that, length) { |
796 | | aFunction(fn); |
797 | | if (that === undefined) return fn; |
798 | | switch (length) { |
799 | | case 1: return function (a) { |
800 | | return fn.call(that, a); |
801 | | }; |
802 | | case 2: return function (a, b) { |
803 | | return fn.call(that, a, b); |
804 | | }; |
805 | | case 3: return function (a, b, c) { |
806 | | return fn.call(that, a, b, c); |
807 | | }; |
808 | | } |
809 | | return function (/* ...args */) { |
810 | | return fn.apply(that, arguments); |
811 | | }; |
812 | | }; |
813 | | |
814 | | |
815 | | /***/ }), |
816 | | /* 21 */ |
817 | | /***/ (function(module, exports) { |
818 | | |
819 | | module.exports = function (it) { |
820 | | if (typeof it != 'function') throw TypeError(it + ' is not a function!'); |
821 | | return it; |
822 | | }; |
823 | | |
824 | | |
825 | | /***/ }), |
826 | | /* 22 */ |
827 | | /***/ (function(module, exports, __webpack_require__) { |
828 | | |
829 | | var META = __webpack_require__(19)('meta'); |
830 | | var isObject = __webpack_require__(13); |
831 | | var has = __webpack_require__(5); |
832 | | var setDesc = __webpack_require__(11).f; |
833 | | var id = 0; |
834 | | var isExtensible = Object.isExtensible || function () { |
835 | | return true; |
836 | | }; |
837 | | var FREEZE = !__webpack_require__(7)(function () { |
838 | | return isExtensible(Object.preventExtensions({})); |
839 | | }); |
840 | | var setMeta = function (it) { |
841 | | setDesc(it, META, { value: { |
842 | | i: 'O' + ++id, // object ID |
843 | | w: {} // weak collections IDs |
844 | | } }); |
845 | | }; |
846 | | var fastKey = function (it, create) { |
847 | | // return primitive with prefix |
848 | | if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; |
849 | | if (!has(it, META)) { |
850 | | // can't set metadata to uncaught frozen object |
851 | | if (!isExtensible(it)) return 'F'; |
852 | | // not necessary to add metadata |
853 | | if (!create) return 'E'; |
854 | | // add missing metadata |
855 | | setMeta(it); |
856 | | // return object ID |
857 | | } return it[META].i; |
858 | | }; |
859 | | var getWeak = function (it, create) { |
860 | | if (!has(it, META)) { |
861 | | // can't set metadata to uncaught frozen object |
862 | | if (!isExtensible(it)) return true; |
863 | | // not necessary to add metadata |
864 | | if (!create) return false; |
865 | | // add missing metadata |
866 | | setMeta(it); |
867 | | // return hash weak collections IDs |
868 | | } return it[META].w; |
869 | | }; |
870 | | // add metadata on freeze-family methods calling |
871 | | var onFreeze = function (it) { |
872 | | if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); |
873 | | return it; |
874 | | }; |
875 | | var meta = module.exports = { |
876 | | KEY: META, |
877 | | NEED: false, |
878 | | fastKey: fastKey, |
879 | | getWeak: getWeak, |
880 | | onFreeze: onFreeze |
881 | | }; |
882 | | |
883 | | |
884 | | /***/ }), |
885 | | /* 23 */ |
886 | | /***/ (function(module, exports, __webpack_require__) { |
887 | | |
888 | | var core = __webpack_require__(9); |
889 | | var global = __webpack_require__(4); |
890 | | var SHARED = '__core-js_shared__'; |
891 | | var store = global[SHARED] || (global[SHARED] = {}); |
892 | | |
893 | | (module.exports = function (key, value) { |
894 | | return store[key] || (store[key] = value !== undefined ? value : {}); |
895 | | })('versions', []).push({ |
896 | | version: core.version, |
897 | | mode: __webpack_require__(24) ? 'pure' : 'global', |
898 | | copyright: '© 2018 Denis Pushkarev (zloirock.ru)' |
899 | | }); |
900 | | |
901 | | |
902 | | /***/ }), |
903 | | /* 24 */ |
904 | | /***/ (function(module, exports) { |
905 | | |
906 | | module.exports = false; |
907 | | |
908 | | |
909 | | /***/ }), |
910 | | /* 25 */ |
911 | | /***/ (function(module, exports, __webpack_require__) { |
912 | | |
913 | | var def = __webpack_require__(11).f; |
914 | | var has = __webpack_require__(5); |
915 | | var TAG = __webpack_require__(26)('toStringTag'); |
916 | | |
917 | | module.exports = function (it, tag, stat) { |
918 | | if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); |
919 | | }; |
920 | | |
921 | | |
922 | | /***/ }), |
923 | | /* 26 */ |
924 | | /***/ (function(module, exports, __webpack_require__) { |
925 | | |
926 | | var store = __webpack_require__(23)('wks'); |
927 | | var uid = __webpack_require__(19); |
928 | | var Symbol = __webpack_require__(4).Symbol; |
929 | | var USE_SYMBOL = typeof Symbol == 'function'; |
930 | | |
931 | | var $exports = module.exports = function (name) { |
932 | | return store[name] || (store[name] = |
933 | | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); |
934 | | }; |
935 | | |
936 | | $exports.store = store; |
937 | | |
938 | | |
939 | | /***/ }), |
940 | | /* 27 */ |
941 | | /***/ (function(module, exports, __webpack_require__) { |
942 | | |
943 | | exports.f = __webpack_require__(26); |
944 | | |
945 | | |
946 | | /***/ }), |
947 | | /* 28 */ |
948 | | /***/ (function(module, exports, __webpack_require__) { |
949 | | |
950 | | var global = __webpack_require__(4); |
951 | | var core = __webpack_require__(9); |
952 | | var LIBRARY = __webpack_require__(24); |
953 | | var wksExt = __webpack_require__(27); |
954 | | var defineProperty = __webpack_require__(11).f; |
955 | | module.exports = function (name) { |
956 | | var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); |
957 | | if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); |
958 | | }; |
959 | | |
960 | | |
961 | | /***/ }), |
962 | | /* 29 */ |
963 | | /***/ (function(module, exports, __webpack_require__) { |
964 | | |
965 | | // all enumerable object keys, includes symbols |
966 | | var getKeys = __webpack_require__(30); |
967 | | var gOPS = __webpack_require__(42); |
968 | | var pIE = __webpack_require__(43); |
969 | | module.exports = function (it) { |
970 | | var result = getKeys(it); |
971 | | var getSymbols = gOPS.f; |
972 | | if (getSymbols) { |
973 | | var symbols = getSymbols(it); |
974 | | var isEnum = pIE.f; |
975 | | var i = 0; |
976 | | var key; |
977 | | while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); |
978 | | } return result; |
979 | | }; |
980 | | |
981 | | |
982 | | /***/ }), |
983 | | /* 30 */ |
984 | | /***/ (function(module, exports, __webpack_require__) { |
985 | | |
986 | | // 19.1.2.14 / 15.2.3.14 Object.keys(O) |
987 | | var $keys = __webpack_require__(31); |
988 | | var enumBugKeys = __webpack_require__(41); |
989 | | |
990 | | module.exports = Object.keys || function keys(O) { |
991 | | return $keys(O, enumBugKeys); |
992 | | }; |
993 | | |
994 | | |
995 | | /***/ }), |
996 | | /* 31 */ |
997 | | /***/ (function(module, exports, __webpack_require__) { |
998 | | |
999 | | var has = __webpack_require__(5); |
1000 | | var toIObject = __webpack_require__(32); |
1001 | | var arrayIndexOf = __webpack_require__(36)(false); |
1002 | | var IE_PROTO = __webpack_require__(40)('IE_PROTO'); |
1003 | | |
1004 | | module.exports = function (object, names) { |
1005 | | var O = toIObject(object); |
1006 | | var i = 0; |
1007 | | var result = []; |
1008 | | var key; |
1009 | | for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); |
1010 | | // Don't enum bug & hidden keys |
1011 | | while (names.length > i) if (has(O, key = names[i++])) { |
1012 | | ~arrayIndexOf(result, key) || result.push(key); |
1013 | | } |
1014 | | return result; |
1015 | | }; |
1016 | | |
1017 | | |
1018 | | /***/ }), |
1019 | | /* 32 */ |
1020 | | /***/ (function(module, exports, __webpack_require__) { |
1021 | | |
1022 | | // to indexed object, toObject with fallback for non-array-like ES3 strings |
1023 | | var IObject = __webpack_require__(33); |
1024 | | var defined = __webpack_require__(35); |
1025 | | module.exports = function (it) { |
1026 | | return IObject(defined(it)); |
1027 | | }; |
1028 | | |
1029 | | |
1030 | | /***/ }), |
1031 | | /* 33 */ |
1032 | | /***/ (function(module, exports, __webpack_require__) { |
1033 | | |
1034 | | // fallback for non-array-like ES3 and non-enumerable old V8 strings |
1035 | | var cof = __webpack_require__(34); |
1036 | | // eslint-disable-next-line no-prototype-builtins |
1037 | | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { |
1038 | | return cof(it) == 'String' ? it.split('') : Object(it); |
1039 | | }; |
1040 | | |
1041 | | |
1042 | | /***/ }), |
1043 | | /* 34 */ |
1044 | | /***/ (function(module, exports) { |
1045 | | |
1046 | | var toString = {}.toString; |
1047 | | |
1048 | | module.exports = function (it) { |
1049 | | return toString.call(it).slice(8, -1); |
1050 | | }; |
1051 | | |
1052 | | |
1053 | | /***/ }), |
1054 | | /* 35 */ |
1055 | | /***/ (function(module, exports) { |
1056 | | |
1057 | | // 7.2.1 RequireObjectCoercible(argument) |
1058 | | module.exports = function (it) { |
1059 | | if (it == undefined) throw TypeError("Can't call method on " + it); |
1060 | | return it; |
1061 | | }; |
1062 | | |
1063 | | |
1064 | | /***/ }), |
1065 | | /* 36 */ |
1066 | | /***/ (function(module, exports, __webpack_require__) { |
1067 | | |
1068 | | // false -> Array#indexOf |
1069 | | // true -> Array#includes |
1070 | | var toIObject = __webpack_require__(32); |
1071 | | var toLength = __webpack_require__(37); |
1072 | | var toAbsoluteIndex = __webpack_require__(39); |
1073 | | module.exports = function (IS_INCLUDES) { |
1074 | | return function ($this, el, fromIndex) { |
1075 | | var O = toIObject($this); |
1076 | | var length = toLength(O.length); |
1077 | | var index = toAbsoluteIndex(fromIndex, length); |
1078 | | var value; |
1079 | | // Array#includes uses SameValueZero equality algorithm |
1080 | | // eslint-disable-next-line no-self-compare |
1081 | | if (IS_INCLUDES && el != el) while (length > index) { |
1082 | | value = O[index++]; |
1083 | | // eslint-disable-next-line no-self-compare |
1084 | | if (value != value) return true; |
1085 | | // Array#indexOf ignores holes, Array#includes - not |
1086 | | } else for (;length > index; index++) if (IS_INCLUDES || index in O) { |
1087 | | if (O[index] === el) return IS_INCLUDES || index || 0; |
1088 | | } return !IS_INCLUDES && -1; |
1089 | | }; |
1090 | | }; |
1091 | | |
1092 | | |
1093 | | /***/ }), |
1094 | | /* 37 */ |
1095 | | /***/ (function(module, exports, __webpack_require__) { |
1096 | | |
1097 | | // 7.1.15 ToLength |
1098 | | var toInteger = __webpack_require__(38); |
1099 | | var min = Math.min; |
1100 | | module.exports = function (it) { |
1101 | | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 |
1102 | | }; |
1103 | | |
1104 | | |
1105 | | /***/ }), |
1106 | | /* 38 */ |
1107 | | /***/ (function(module, exports) { |
1108 | | |
1109 | | // 7.1.4 ToInteger |
1110 | | var ceil = Math.ceil; |
1111 | | var floor = Math.floor; |
1112 | | module.exports = function (it) { |
1113 | | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); |
1114 | | }; |
1115 | | |
1116 | | |
1117 | | /***/ }), |
1118 | | /* 39 */ |
1119 | | /***/ (function(module, exports, __webpack_require__) { |
1120 | | |
1121 | | var toInteger = __webpack_require__(38); |
1122 | | var max = Math.max; |
1123 | | var min = Math.min; |
1124 | | module.exports = function (index, length) { |
1125 | | index = toInteger(index); |
1126 | | return index < 0 ? max(index + length, 0) : min(index, length); |
1127 | | }; |
1128 | | |
1129 | | |
1130 | | /***/ }), |
1131 | | /* 40 */ |
1132 | | /***/ (function(module, exports, __webpack_require__) { |
1133 | | |
1134 | | var shared = __webpack_require__(23)('keys'); |
1135 | | var uid = __webpack_require__(19); |
1136 | | module.exports = function (key) { |
1137 | | return shared[key] || (shared[key] = uid(key)); |
1138 | | }; |
1139 | | |
1140 | | |
1141 | | /***/ }), |
1142 | | /* 41 */ |
1143 | | /***/ (function(module, exports) { |
1144 | | |
1145 | | // IE 8- don't enum bug keys |
1146 | | module.exports = ( |
1147 | | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' |
1148 | | ).split(','); |
1149 | | |
1150 | | |
1151 | | /***/ }), |
1152 | | /* 42 */ |
1153 | | /***/ (function(module, exports) { |
1154 | | |
1155 | | exports.f = Object.getOwnPropertySymbols; |
1156 | | |
1157 | | |
1158 | | /***/ }), |
1159 | | /* 43 */ |
1160 | | /***/ (function(module, exports) { |
1161 | | |
1162 | | exports.f = {}.propertyIsEnumerable; |
1163 | | |
1164 | | |
1165 | | /***/ }), |
1166 | | /* 44 */ |
1167 | | /***/ (function(module, exports, __webpack_require__) { |
1168 | | |
1169 | | // 7.2.2 IsArray(argument) |
1170 | | var cof = __webpack_require__(34); |
1171 | | module.exports = Array.isArray || function isArray(arg) { |
1172 | | return cof(arg) == 'Array'; |
1173 | | }; |
1174 | | |
1175 | | |
1176 | | /***/ }), |
1177 | | /* 45 */ |
1178 | | /***/ (function(module, exports, __webpack_require__) { |
1179 | | |
1180 | | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) |
1181 | | var anObject = __webpack_require__(12); |
1182 | | var dPs = __webpack_require__(46); |
1183 | | var enumBugKeys = __webpack_require__(41); |
1184 | | var IE_PROTO = __webpack_require__(40)('IE_PROTO'); |
1185 | | var Empty = function () { /* empty */ }; |
1186 | | var PROTOTYPE = 'prototype'; |
1187 | | |
1188 | | // Create object with fake `null` prototype: use iframe Object with cleared prototype |
1189 | | var createDict = function () { |
1190 | | // Thrash, waste and sodomy: IE GC bug |
1191 | | var iframe = __webpack_require__(15)('iframe'); |
1192 | | var i = enumBugKeys.length; |
1193 | | var lt = '<'; |
1194 | | var gt = '>'; |
1195 | | var iframeDocument; |
1196 | | iframe.style.display = 'none'; |
1197 | | __webpack_require__(47).appendChild(iframe); |
1198 | | iframe.src = 'javascript:'; // eslint-disable-line no-script-url |
1199 | | // createDict = iframe.contentWindow.Object; |
1200 | | // html.removeChild(iframe); |
1201 | | iframeDocument = iframe.contentWindow.document; |
1202 | | iframeDocument.open(); |
1203 | | iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); |
1204 | | iframeDocument.close(); |
1205 | | createDict = iframeDocument.F; |
1206 | | while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; |
1207 | | return createDict(); |
1208 | | }; |
1209 | | |
1210 | | module.exports = Object.create || function create(O, Properties) { |
1211 | | var result; |
1212 | | if (O !== null) { |
1213 | | Empty[PROTOTYPE] = anObject(O); |
1214 | | result = new Empty(); |
1215 | | Empty[PROTOTYPE] = null; |
1216 | | // add "__proto__" for Object.getPrototypeOf polyfill |
1217 | | result[IE_PROTO] = O; |
1218 | | } else result = createDict(); |
1219 | | return Properties === undefined ? result : dPs(result, Properties); |
1220 | | }; |
1221 | | |
1222 | | |
1223 | | /***/ }), |
1224 | | /* 46 */ |
1225 | | /***/ (function(module, exports, __webpack_require__) { |
1226 | | |
1227 | | var dP = __webpack_require__(11); |
1228 | | var anObject = __webpack_require__(12); |
1229 | | var getKeys = __webpack_require__(30); |
1230 | | |
1231 | | module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties) { |
1232 | | anObject(O); |
1233 | | var keys = getKeys(Properties); |
1234 | | var length = keys.length; |
1235 | | var i = 0; |
1236 | | var P; |
1237 | | while (length > i) dP.f(O, P = keys[i++], Properties[P]); |
1238 | | return O; |
1239 | | }; |
1240 | | |
1241 | | |
1242 | | /***/ }), |
1243 | | /* 47 */ |
1244 | | /***/ (function(module, exports, __webpack_require__) { |
1245 | | |
1246 | | var document = __webpack_require__(4).document; |
1247 | | module.exports = document && document.documentElement; |
1248 | | |
1249 | | |
1250 | | /***/ }), |
1251 | | /* 48 */ |
1252 | | /***/ (function(module, exports, __webpack_require__) { |
1253 | | |
1254 | | // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window |
1255 | | var toIObject = __webpack_require__(32); |
1256 | | var gOPN = __webpack_require__(49).f; |
1257 | | var toString = {}.toString; |
1258 | | |
1259 | | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames |
1260 | | ? Object.getOwnPropertyNames(window) : []; |
1261 | | |
1262 | | var getWindowNames = function (it) { |
1263 | | try { |
1264 | | return gOPN(it); |
1265 | | } catch (e) { |
1266 | | return windowNames.slice(); |
1267 | | } |
1268 | | }; |
1269 | | |
1270 | | module.exports.f = function getOwnPropertyNames(it) { |
1271 | | return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); |
1272 | | }; |
1273 | | |
1274 | | |
1275 | | /***/ }), |
1276 | | /* 49 */ |
1277 | | /***/ (function(module, exports, __webpack_require__) { |
1278 | | |
1279 | | // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) |
1280 | | var $keys = __webpack_require__(31); |
1281 | | var hiddenKeys = __webpack_require__(41).concat('length', 'prototype'); |
1282 | | |
1283 | | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { |
1284 | | return $keys(O, hiddenKeys); |
1285 | | }; |
1286 | | |
1287 | | |
1288 | | /***/ }), |
1289 | | /* 50 */ |
1290 | | /***/ (function(module, exports, __webpack_require__) { |
1291 | | |
1292 | | var pIE = __webpack_require__(43); |
1293 | | var createDesc = __webpack_require__(17); |
1294 | | var toIObject = __webpack_require__(32); |
1295 | | var toPrimitive = __webpack_require__(16); |
1296 | | var has = __webpack_require__(5); |
1297 | | var IE8_DOM_DEFINE = __webpack_require__(14); |
1298 | | var gOPD = Object.getOwnPropertyDescriptor; |
1299 | | |
1300 | | exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P) { |
1301 | | O = toIObject(O); |
1302 | | P = toPrimitive(P, true); |
1303 | | if (IE8_DOM_DEFINE) try { |
1304 | | return gOPD(O, P); |
1305 | | } catch (e) { /* empty */ } |
1306 | | if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); |
1307 | | }; |
1308 | | |
1309 | | |
1310 | | /***/ }), |
1311 | | /* 51 */ |
1312 | | /***/ (function(module, exports, __webpack_require__) { |
1313 | | |
1314 | | var $export = __webpack_require__(8); |
1315 | | // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) |
1316 | | $export($export.S, 'Object', { create: __webpack_require__(45) }); |
1317 | | |
1318 | | |
1319 | | /***/ }), |
1320 | | /* 52 */ |
1321 | | /***/ (function(module, exports, __webpack_require__) { |
1322 | | |
1323 | | var $export = __webpack_require__(8); |
1324 | | // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) |
1325 | | $export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(11).f }); |
1326 | | |
1327 | | |
1328 | | /***/ }), |
1329 | | /* 53 */ |
1330 | | /***/ (function(module, exports, __webpack_require__) { |
1331 | | |
1332 | | var $export = __webpack_require__(8); |
1333 | | // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) |
1334 | | $export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperties: __webpack_require__(46) }); |
1335 | | |
1336 | | |
1337 | | /***/ }), |
1338 | | /* 54 */ |
1339 | | /***/ (function(module, exports, __webpack_require__) { |
1340 | | |
1341 | | // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) |
1342 | | var toIObject = __webpack_require__(32); |
1343 | | var $getOwnPropertyDescriptor = __webpack_require__(50).f; |
1344 | | |
1345 | | __webpack_require__(55)('getOwnPropertyDescriptor', function () { |
1346 | | return function getOwnPropertyDescriptor(it, key) { |
1347 | | return $getOwnPropertyDescriptor(toIObject(it), key); |
1348 | | }; |
1349 | | }); |
1350 | | |
1351 | | |
1352 | | /***/ }), |
1353 | | /* 55 */ |
1354 | | /***/ (function(module, exports, __webpack_require__) { |
1355 | | |
1356 | | // most Object methods by ES6 should accept primitives |
1357 | | var $export = __webpack_require__(8); |
1358 | | var core = __webpack_require__(9); |
1359 | | var fails = __webpack_require__(7); |
1360 | | module.exports = function (KEY, exec) { |
1361 | | var fn = (core.Object || {})[KEY] || Object[KEY]; |
1362 | | var exp = {}; |
1363 | | exp[KEY] = exec(fn); |
1364 | | $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); |
1365 | | }; |
1366 | | |
1367 | | |
1368 | | /***/ }), |
1369 | | /* 56 */ |
1370 | | /***/ (function(module, exports, __webpack_require__) { |
1371 | | |
1372 | | // 19.1.2.9 Object.getPrototypeOf(O) |
1373 | | var toObject = __webpack_require__(57); |
1374 | | var $getPrototypeOf = __webpack_require__(58); |
1375 | | |
1376 | | __webpack_require__(55)('getPrototypeOf', function () { |
1377 | | return function getPrototypeOf(it) { |
1378 | | return $getPrototypeOf(toObject(it)); |
1379 | | }; |
1380 | | }); |
1381 | | |
1382 | | |
1383 | | /***/ }), |
1384 | | /* 57 */ |
1385 | | /***/ (function(module, exports, __webpack_require__) { |
1386 | | |
1387 | | // 7.1.13 ToObject(argument) |
1388 | | var defined = __webpack_require__(35); |
1389 | | module.exports = function (it) { |
1390 | | return Object(defined(it)); |
1391 | | }; |
1392 | | |
1393 | | |
1394 | | /***/ }), |
1395 | | /* 58 */ |
1396 | | /***/ (function(module, exports, __webpack_require__) { |
1397 | | |
1398 | | // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) |
1399 | | var has = __webpack_require__(5); |
1400 | | var toObject = __webpack_require__(57); |
1401 | | var IE_PROTO = __webpack_require__(40)('IE_PROTO'); |
1402 | | var ObjectProto = Object.prototype; |
1403 | | |
1404 | | module.exports = Object.getPrototypeOf || function (O) { |
1405 | | O = toObject(O); |
1406 | | if (has(O, IE_PROTO)) return O[IE_PROTO]; |
1407 | | if (typeof O.constructor == 'function' && O instanceof O.constructor) { |
1408 | | return O.constructor.prototype; |
1409 | | } return O instanceof Object ? ObjectProto : null; |
1410 | | }; |
1411 | | |
1412 | | |
1413 | | /***/ }), |
1414 | | /* 59 */ |
1415 | | /***/ (function(module, exports, __webpack_require__) { |
1416 | | |
1417 | | // 19.1.2.14 Object.keys(O) |
1418 | | var toObject = __webpack_require__(57); |
1419 | | var $keys = __webpack_require__(30); |
1420 | | |
1421 | | __webpack_require__(55)('keys', function () { |
1422 | | return function keys(it) { |
1423 | | return $keys(toObject(it)); |
1424 | | }; |
1425 | | }); |
1426 | | |
1427 | | |
1428 | | /***/ }), |
1429 | | /* 60 */ |
1430 | | /***/ (function(module, exports, __webpack_require__) { |
1431 | | |
1432 | | // 19.1.2.7 Object.getOwnPropertyNames(O) |
1433 | | __webpack_require__(55)('getOwnPropertyNames', function () { |
1434 | | return __webpack_require__(48).f; |
1435 | | }); |
1436 | | |
1437 | | |
1438 | | /***/ }), |
1439 | | /* 61 */ |
1440 | | /***/ (function(module, exports, __webpack_require__) { |
1441 | | |
1442 | | // 19.1.2.5 Object.freeze(O) |
1443 | | var isObject = __webpack_require__(13); |
1444 | | var meta = __webpack_require__(22).onFreeze; |
1445 | | |
1446 | | __webpack_require__(55)('freeze', function ($freeze) { |
1447 | | return function freeze(it) { |
1448 | | return $freeze && isObject(it) ? $freeze(meta(it)) : it; |
1449 | | }; |
1450 | | }); |
1451 | | |
1452 | | |
1453 | | /***/ }), |
1454 | | /* 62 */ |
1455 | | /***/ (function(module, exports, __webpack_require__) { |
1456 | | |
1457 | | // 19.1.2.17 Object.seal(O) |
1458 | | var isObject = __webpack_require__(13); |
1459 | | var meta = __webpack_require__(22).onFreeze; |
1460 | | |
1461 | | __webpack_require__(55)('seal', function ($seal) { |
1462 | | return function seal(it) { |
1463 | | return $seal && isObject(it) ? $seal(meta(it)) : it; |
1464 | | }; |
1465 | | }); |
1466 | | |
1467 | | |
1468 | | /***/ }), |
1469 | | /* 63 */ |
1470 | | /***/ (function(module, exports, __webpack_require__) { |
1471 | | |
1472 | | // 19.1.2.15 Object.preventExtensions(O) |
1473 | | var isObject = __webpack_require__(13); |
1474 | | var meta = __webpack_require__(22).onFreeze; |
1475 | | |
1476 | | __webpack_require__(55)('preventExtensions', function ($preventExtensions) { |
1477 | | return function preventExtensions(it) { |
1478 | | return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; |
1479 | | }; |
1480 | | }); |
1481 | | |
1482 | | |
1483 | | /***/ }), |
1484 | | /* 64 */ |
1485 | | /***/ (function(module, exports, __webpack_require__) { |
1486 | | |
1487 | | // 19.1.2.12 Object.isFrozen(O) |
1488 | | var isObject = __webpack_require__(13); |
1489 | | |
1490 | | __webpack_require__(55)('isFrozen', function ($isFrozen) { |
1491 | | return function isFrozen(it) { |
1492 | | return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; |
1493 | | }; |
1494 | | }); |
1495 | | |
1496 | | |
1497 | | /***/ }), |
1498 | | /* 65 */ |
1499 | | /***/ (function(module, exports, __webpack_require__) { |
1500 | | |
1501 | | // 19.1.2.13 Object.isSealed(O) |
1502 | | var isObject = __webpack_require__(13); |
1503 | | |
1504 | | __webpack_require__(55)('isSealed', function ($isSealed) { |
1505 | | return function isSealed(it) { |
1506 | | return isObject(it) ? $isSealed ? $isSealed(it) : false : true; |
1507 | | }; |
1508 | | }); |
1509 | | |
1510 | | |
1511 | | /***/ }), |
1512 | | /* 66 */ |
1513 | | /***/ (function(module, exports, __webpack_require__) { |
1514 | | |
1515 | | // 19.1.2.11 Object.isExtensible(O) |
1516 | | var isObject = __webpack_require__(13); |
1517 | | |
1518 | | __webpack_require__(55)('isExtensible', function ($isExtensible) { |
1519 | | return function isExtensible(it) { |
1520 | | return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; |
1521 | | }; |
1522 | | }); |
1523 | | |
1524 | | |
1525 | | /***/ }), |
1526 | | /* 67 */ |
1527 | | /***/ (function(module, exports, __webpack_require__) { |
1528 | | |
1529 | | // 19.1.3.1 Object.assign(target, source) |
1530 | | var $export = __webpack_require__(8); |
1531 | | |
1532 | | $export($export.S + $export.F, 'Object', { assign: __webpack_require__(68) }); |
1533 | | |
1534 | | |
1535 | | /***/ }), |
1536 | | /* 68 */ |
1537 | | /***/ (function(module, exports, __webpack_require__) { |
1538 | | |
1539 | | 'use strict'; |
1540 | | // 19.1.2.1 Object.assign(target, source, ...) |
1541 | | var getKeys = __webpack_require__(30); |
1542 | | var gOPS = __webpack_require__(42); |
1543 | | var pIE = __webpack_require__(43); |
1544 | | var toObject = __webpack_require__(57); |
1545 | | var IObject = __webpack_require__(33); |
1546 | | var $assign = Object.assign; |
1547 | | |
1548 | | // should work with symbols and should have deterministic property order (V8 bug) |
1549 | | module.exports = !$assign || __webpack_require__(7)(function () { |
1550 | | var A = {}; |
1551 | | var B = {}; |
1552 | | // eslint-disable-next-line no-undef |
1553 | | var S = Symbol(); |
1554 | | var K = 'abcdefghijklmnopqrst'; |
1555 | | A[S] = 7; |
1556 | | K.split('').forEach(function (k) { B[k] = k; }); |
1557 | | return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; |
1558 | | }) ? function assign(target, source) { // eslint-disable-line no-unused-vars |
1559 | | var T = toObject(target); |
1560 | | var aLen = arguments.length; |
1561 | | var index = 1; |
1562 | | var getSymbols = gOPS.f; |
1563 | | var isEnum = pIE.f; |
1564 | | while (aLen > index) { |
1565 | | var S = IObject(arguments[index++]); |
1566 | | var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); |
1567 | | var length = keys.length; |
1568 | | var j = 0; |
1569 | | var key; |
1570 | | while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; |
1571 | | } return T; |
1572 | | } : $assign; |
1573 | | |
1574 | | |
1575 | | /***/ }), |
1576 | | /* 69 */ |
1577 | | /***/ (function(module, exports, __webpack_require__) { |
1578 | | |
1579 | | // 19.1.3.10 Object.is(value1, value2) |
1580 | | var $export = __webpack_require__(8); |
1581 | | $export($export.S, 'Object', { is: __webpack_require__(70) }); |
1582 | | |
1583 | | |
1584 | | /***/ }), |
1585 | | /* 70 */ |
1586 | | /***/ (function(module, exports) { |
1587 | | |
1588 | | // 7.2.9 SameValue(x, y) |
1589 | | module.exports = Object.is || function is(x, y) { |
1590 | | // eslint-disable-next-line no-self-compare |
1591 | | return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; |
1592 | | }; |
1593 | | |
1594 | | |
1595 | | /***/ }), |
1596 | | /* 71 */ |
1597 | | /***/ (function(module, exports, __webpack_require__) { |
1598 | | |
1599 | | // 19.1.3.19 Object.setPrototypeOf(O, proto) |
1600 | | var $export = __webpack_require__(8); |
1601 | | $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(72).set }); |
1602 | | |
1603 | | |
1604 | | /***/ }), |
1605 | | /* 72 */ |
1606 | | /***/ (function(module, exports, __webpack_require__) { |
1607 | | |
1608 | | // Works with __proto__ only. Old v8 can't work with null proto objects. |
1609 | | /* eslint-disable no-proto */ |
1610 | | var isObject = __webpack_require__(13); |
1611 | | var anObject = __webpack_require__(12); |
1612 | | var check = function (O, proto) { |
1613 | | anObject(O); |
1614 | | if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); |
1615 | | }; |
1616 | | module.exports = { |
1617 | | set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line |
1618 | | function (test, buggy, set) { |
1619 | | try { |
1620 | | set = __webpack_require__(20)(Function.call, __webpack_require__(50).f(Object.prototype, '__proto__').set, 2); |
1621 | | set(test, []); |
1622 | | buggy = !(test instanceof Array); |
1623 | | } catch (e) { buggy = true; } |
1624 | | return function setPrototypeOf(O, proto) { |
1625 | | check(O, proto); |
1626 | | if (buggy) O.__proto__ = proto; |
1627 | | else set(O, proto); |
1628 | | return O; |
1629 | | }; |
1630 | | }({}, false) : undefined), |
1631 | | check: check |
1632 | | }; |
1633 | | |
1634 | | |
1635 | | /***/ }), |
1636 | | /* 73 */ |
1637 | | /***/ (function(module, exports, __webpack_require__) { |
1638 | | |
1639 | | 'use strict'; |
1640 | | // 19.1.3.6 Object.prototype.toString() |
1641 | | var classof = __webpack_require__(74); |
1642 | | var test = {}; |
1643 | | test[__webpack_require__(26)('toStringTag')] = 'z'; |
1644 | | if (test + '' != '[object z]') { |
1645 | | __webpack_require__(18)(Object.prototype, 'toString', function toString() { |
1646 | | return '[object ' + classof(this) + ']'; |
1647 | | }, true); |
1648 | | } |
1649 | | |
1650 | | |
1651 | | /***/ }), |
1652 | | /* 74 */ |
1653 | | /***/ (function(module, exports, __webpack_require__) { |
1654 | | |
1655 | | // getting tag from 19.1.3.6 Object.prototype.toString() |
1656 | | var cof = __webpack_require__(34); |
1657 | | var TAG = __webpack_require__(26)('toStringTag'); |
1658 | | // ES3 wrong here |
1659 | | var ARG = cof(function () { return arguments; }()) == 'Arguments'; |
1660 | | |
1661 | | // fallback for IE11 Script Access Denied error |
1662 | | var tryGet = function (it, key) { |
1663 | | try { |
1664 | | return it[key]; |
1665 | | } catch (e) { /* empty */ } |
1666 | | }; |
1667 | | |
1668 | | module.exports = function (it) { |
1669 | | var O, T, B; |
1670 | | return it === undefined ? 'Undefined' : it === null ? 'Null' |
1671 | | // @@toStringTag case |
1672 | | : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T |
1673 | | // builtinTag case |
1674 | | : ARG ? cof(O) |
1675 | | // ES3 arguments fallback |
1676 | | : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; |
1677 | | }; |
1678 | | |
1679 | | |
1680 | | /***/ }), |
1681 | | /* 75 */ |
1682 | | /***/ (function(module, exports, __webpack_require__) { |
1683 | | |
1684 | | // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) |
1685 | | var $export = __webpack_require__(8); |
1686 | | |
1687 | | $export($export.P, 'Function', { bind: __webpack_require__(76) }); |
1688 | | |
1689 | | |
1690 | | /***/ }), |
1691 | | /* 76 */ |
1692 | | /***/ (function(module, exports, __webpack_require__) { |
1693 | | |
1694 | | 'use strict'; |
1695 | | var aFunction = __webpack_require__(21); |
1696 | | var isObject = __webpack_require__(13); |
1697 | | var invoke = __webpack_require__(77); |
1698 | | var arraySlice = [].slice; |
1699 | | var factories = {}; |
1700 | | |
1701 | | var construct = function (F, len, args) { |
1702 | | if (!(len in factories)) { |
1703 | | for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; |
1704 | | // eslint-disable-next-line no-new-func |
1705 | | factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); |
1706 | | } return factories[len](F, args); |
1707 | | }; |
1708 | | |
1709 | | module.exports = Function.bind || function bind(that /* , ...args */) { |
1710 | | var fn = aFunction(this); |
1711 | | var partArgs = arraySlice.call(arguments, 1); |
1712 | | var bound = function (/* args... */) { |
1713 | | var args = partArgs.concat(arraySlice.call(arguments)); |
1714 | | return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); |
1715 | | }; |
1716 | | if (isObject(fn.prototype)) bound.prototype = fn.prototype; |
1717 | | return bound; |
1718 | | }; |
1719 | | |
1720 | | |
1721 | | /***/ }), |
1722 | | /* 77 */ |
1723 | | /***/ (function(module, exports) { |
1724 | | |
1725 | | // fast apply, http://jsperf.lnkit.com/fast-apply/5 |
1726 | | module.exports = function (fn, args, that) { |
1727 | | var un = that === undefined; |
1728 | | switch (args.length) { |
1729 | | case 0: return un ? fn() |
1730 | | : fn.call(that); |
1731 | | case 1: return un ? fn(args[0]) |
1732 | | : fn.call(that, args[0]); |
1733 | | case 2: return un ? fn(args[0], args[1]) |
1734 | | : fn.call(that, args[0], args[1]); |
1735 | | case 3: return un ? fn(args[0], args[1], args[2]) |
1736 | | : fn.call(that, args[0], args[1], args[2]); |
1737 | | case 4: return un ? fn(args[0], args[1], args[2], args[3]) |
1738 | | : fn.call(that, args[0], args[1], args[2], args[3]); |
1739 | | } return fn.apply(that, args); |
1740 | | }; |
1741 | | |
1742 | | |
1743 | | /***/ }), |
1744 | | /* 78 */ |
1745 | | /***/ (function(module, exports, __webpack_require__) { |
1746 | | |
1747 | | var dP = __webpack_require__(11).f; |
1748 | | var FProto = Function.prototype; |
1749 | | var nameRE = /^\s*function ([^ (]*)/; |
1750 | | var NAME = 'name'; |
1751 | | |
1752 | | // 19.2.4.2 name |
1753 | | NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, { |
1754 | | configurable: true, |
1755 | | get: function () { |
1756 | | try { |
1757 | | return ('' + this).match(nameRE)[1]; |
1758 | | } catch (e) { |
1759 | | return ''; |
1760 | | } |
1761 | | } |
1762 | | }); |
1763 | | |
1764 | | |
1765 | | /***/ }), |
1766 | | /* 79 */ |
1767 | | /***/ (function(module, exports, __webpack_require__) { |
1768 | | |
1769 | | 'use strict'; |
1770 | | var isObject = __webpack_require__(13); |
1771 | | var getPrototypeOf = __webpack_require__(58); |
1772 | | var HAS_INSTANCE = __webpack_require__(26)('hasInstance'); |
1773 | | var FunctionProto = Function.prototype; |
1774 | | // 19.2.3.6 Function.prototype[@@hasInstance](V) |
1775 | | if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(11).f(FunctionProto, HAS_INSTANCE, { value: function (O) { |
1776 | | if (typeof this != 'function' || !isObject(O)) return false; |
1777 | | if (!isObject(this.prototype)) return O instanceof this; |
1778 | | // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: |
1779 | | while (O = getPrototypeOf(O)) if (this.prototype === O) return true; |
1780 | | return false; |
1781 | | } }); |
1782 | | |
1783 | | |
1784 | | /***/ }), |
1785 | | /* 80 */ |
1786 | | /***/ (function(module, exports, __webpack_require__) { |
1787 | | |
1788 | | var $export = __webpack_require__(8); |
1789 | | var $parseInt = __webpack_require__(81); |
1790 | | // 18.2.5 parseInt(string, radix) |
1791 | | $export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); |
1792 | | |
1793 | | |
1794 | | /***/ }), |
1795 | | /* 81 */ |
1796 | | /***/ (function(module, exports, __webpack_require__) { |
1797 | | |
1798 | | var $parseInt = __webpack_require__(4).parseInt; |
1799 | | var $trim = __webpack_require__(82).trim; |
1800 | | var ws = __webpack_require__(83); |
1801 | | var hex = /^[-+]?0[xX]/; |
1802 | | |
1803 | | module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { |
1804 | | var string = $trim(String(str), 3); |
1805 | | return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); |
1806 | | } : $parseInt; |
1807 | | |
1808 | | |
1809 | | /***/ }), |
1810 | | /* 82 */ |
1811 | | /***/ (function(module, exports, __webpack_require__) { |
1812 | | |
1813 | | var $export = __webpack_require__(8); |
1814 | | var defined = __webpack_require__(35); |
1815 | | var fails = __webpack_require__(7); |
1816 | | var spaces = __webpack_require__(83); |
1817 | | var space = '[' + spaces + ']'; |
1818 | | var non = '\u200b\u0085'; |
1819 | | var ltrim = RegExp('^' + space + space + '*'); |
1820 | | var rtrim = RegExp(space + space + '*$'); |
1821 | | |
1822 | | var exporter = function (KEY, exec, ALIAS) { |
1823 | | var exp = {}; |
1824 | | var FORCE = fails(function () { |
1825 | | return !!spaces[KEY]() || non[KEY]() != non; |
1826 | | }); |
1827 | | var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; |
1828 | | if (ALIAS) exp[ALIAS] = fn; |
1829 | | $export($export.P + $export.F * FORCE, 'String', exp); |
1830 | | }; |
1831 | | |
1832 | | // 1 -> String#trimLeft |
1833 | | // 2 -> String#trimRight |
1834 | | // 3 -> String#trim |
1835 | | var trim = exporter.trim = function (string, TYPE) { |
1836 | | string = String(defined(string)); |
1837 | | if (TYPE & 1) string = string.replace(ltrim, ''); |
1838 | | if (TYPE & 2) string = string.replace(rtrim, ''); |
1839 | | return string; |
1840 | | }; |
1841 | | |
1842 | | module.exports = exporter; |
1843 | | |
1844 | | |
1845 | | /***/ }), |
1846 | | /* 83 */ |
1847 | | /***/ (function(module, exports) { |
1848 | | |
1849 | | module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + |
1850 | | '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; |
1851 | | |
1852 | | |
1853 | | /***/ }), |
1854 | | /* 84 */ |
1855 | | /***/ (function(module, exports, __webpack_require__) { |
1856 | | |
1857 | | var $export = __webpack_require__(8); |
1858 | | var $parseFloat = __webpack_require__(85); |
1859 | | // 18.2.4 parseFloat(string) |
1860 | | $export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); |
1861 | | |
1862 | | |
1863 | | /***/ }), |
1864 | | /* 85 */ |
1865 | | /***/ (function(module, exports, __webpack_require__) { |
1866 | | |
1867 | | var $parseFloat = __webpack_require__(4).parseFloat; |
1868 | | var $trim = __webpack_require__(82).trim; |
1869 | | |
1870 | | module.exports = 1 / $parseFloat(__webpack_require__(83) + '-0') !== -Infinity ? function parseFloat(str) { |
1871 | | var string = $trim(String(str), 3); |
1872 | | var result = $parseFloat(string); |
1873 | | return result === 0 && string.charAt(0) == '-' ? -0 : result; |
1874 | | } : $parseFloat; |
1875 | | |
1876 | | |
1877 | | /***/ }), |
1878 | | /* 86 */ |
1879 | | /***/ (function(module, exports, __webpack_require__) { |
1880 | | |
1881 | | 'use strict'; |
1882 | | var global = __webpack_require__(4); |
1883 | | var has = __webpack_require__(5); |
1884 | | var cof = __webpack_require__(34); |
1885 | | var inheritIfRequired = __webpack_require__(87); |
1886 | | var toPrimitive = __webpack_require__(16); |
1887 | | var fails = __webpack_require__(7); |
1888 | | var gOPN = __webpack_require__(49).f; |
1889 | | var gOPD = __webpack_require__(50).f; |
1890 | | var dP = __webpack_require__(11).f; |
1891 | | var $trim = __webpack_require__(82).trim; |
1892 | | var NUMBER = 'Number'; |
1893 | | var $Number = global[NUMBER]; |
1894 | | var Base = $Number; |
1895 | | var proto = $Number.prototype; |
1896 | | // Opera ~12 has broken Object#toString |
1897 | | var BROKEN_COF = cof(__webpack_require__(45)(proto)) == NUMBER; |
1898 | | var TRIM = 'trim' in String.prototype; |
1899 | | |
1900 | | // 7.1.3 ToNumber(argument) |
1901 | | var toNumber = function (argument) { |
1902 | | var it = toPrimitive(argument, false); |
1903 | | if (typeof it == 'string' && it.length > 2) { |
1904 | | it = TRIM ? it.trim() : $trim(it, 3); |
1905 | | var first = it.charCodeAt(0); |
1906 | | var third, radix, maxCode; |
1907 | | if (first === 43 || first === 45) { |
1908 | | third = it.charCodeAt(2); |
1909 | | if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix |
1910 | | } else if (first === 48) { |
1911 | | switch (it.charCodeAt(1)) { |
1912 | | case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i |
1913 | | case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i |
1914 | | default: return +it; |
1915 | | } |
1916 | | for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { |
1917 | | code = digits.charCodeAt(i); |
1918 | | // parseInt parses a string to a first unavailable symbol |
1919 | | // but ToNumber should return NaN if a string contains unavailable symbols |
1920 | | if (code < 48 || code > maxCode) return NaN; |
1921 | | } return parseInt(digits, radix); |
1922 | | } |
1923 | | } return +it; |
1924 | | }; |
1925 | | |
1926 | | if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { |
1927 | | $Number = function Number(value) { |
1928 | | var it = arguments.length < 1 ? 0 : value; |
1929 | | var that = this; |
1930 | | return that instanceof $Number |
1931 | | // check on 1..constructor(foo) case |
1932 | | && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) |
1933 | | ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); |
1934 | | }; |
1935 | | for (var keys = __webpack_require__(6) ? gOPN(Base) : ( |
1936 | | // ES3: |
1937 | | 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + |
1938 | | // ES6 (in case, if modules with ES6 Number statics required before): |
1939 | | 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + |
1940 | | 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' |
1941 | | ).split(','), j = 0, key; keys.length > j; j++) { |
1942 | | if (has(Base, key = keys[j]) && !has($Number, key)) { |
1943 | | dP($Number, key, gOPD(Base, key)); |
1944 | | } |
1945 | | } |
1946 | | $Number.prototype = proto; |
1947 | | proto.constructor = $Number; |
1948 | | __webpack_require__(18)(global, NUMBER, $Number); |
1949 | | } |
1950 | | |
1951 | | |
1952 | | /***/ }), |
1953 | | /* 87 */ |
1954 | | /***/ (function(module, exports, __webpack_require__) { |
1955 | | |
1956 | | var isObject = __webpack_require__(13); |
1957 | | var setPrototypeOf = __webpack_require__(72).set; |
1958 | | module.exports = function (that, target, C) { |
1959 | | var S = target.constructor; |
1960 | | var P; |
1961 | | if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { |
1962 | | setPrototypeOf(that, P); |
1963 | | } return that; |
1964 | | }; |
1965 | | |
1966 | | |
1967 | | /***/ }), |
1968 | | /* 88 */ |
1969 | | /***/ (function(module, exports, __webpack_require__) { |
1970 | | |
1971 | | 'use strict'; |
1972 | | var $export = __webpack_require__(8); |
1973 | | var toInteger = __webpack_require__(38); |
1974 | | var aNumberValue = __webpack_require__(89); |
1975 | | var repeat = __webpack_require__(90); |
1976 | | var $toFixed = 1.0.toFixed; |
1977 | | var floor = Math.floor; |
1978 | | var data = [0, 0, 0, 0, 0, 0]; |
1979 | | var ERROR = 'Number.toFixed: incorrect invocation!'; |
1980 | | var ZERO = '0'; |
1981 | | |
1982 | | var multiply = function (n, c) { |
1983 | | var i = -1; |
1984 | | var c2 = c; |
1985 | | while (++i < 6) { |
1986 | | c2 += n * data[i]; |
1987 | | data[i] = c2 % 1e7; |
1988 | | c2 = floor(c2 / 1e7); |
1989 | | } |
1990 | | }; |
1991 | | var divide = function (n) { |
1992 | | var i = 6; |
1993 | | var c = 0; |
1994 | | while (--i >= 0) { |
1995 | | c += data[i]; |
1996 | | data[i] = floor(c / n); |
1997 | | c = (c % n) * 1e7; |
1998 | | } |
1999 | | }; |
2000 | | var numToString = function () { |
2001 | | var i = 6; |
2002 | | var s = ''; |
2003 | | while (--i >= 0) { |
2004 | | if (s !== '' || i === 0 || data[i] !== 0) { |
2005 | | var t = String(data[i]); |
2006 | | s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; |
2007 | | } |
2008 | | } return s; |
2009 | | }; |
2010 | | var pow = function (x, n, acc) { |
2011 | | return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); |
2012 | | }; |
2013 | | var log = function (x) { |
2014 | | var n = 0; |
2015 | | var x2 = x; |
2016 | | while (x2 >= 4096) { |
2017 | | n += 12; |
2018 | | x2 /= 4096; |
2019 | | } |
2020 | | while (x2 >= 2) { |
2021 | | n += 1; |
2022 | | x2 /= 2; |
2023 | | } return n; |
2024 | | }; |
2025 | | |
2026 | | $export($export.P + $export.F * (!!$toFixed && ( |
2027 | | 0.00008.toFixed(3) !== '0.000' || |
2028 | | 0.9.toFixed(0) !== '1' || |
2029 | | 1.255.toFixed(2) !== '1.25' || |
2030 | | 1000000000000000128.0.toFixed(0) !== '1000000000000000128' |
2031 | | ) || !__webpack_require__(7)(function () { |
2032 | | // V8 ~ Android 4.3- |
2033 | | $toFixed.call({}); |
2034 | | })), 'Number', { |
2035 | | toFixed: function toFixed(fractionDigits) { |
2036 | | var x = aNumberValue(this, ERROR); |
2037 | | var f = toInteger(fractionDigits); |
2038 | | var s = ''; |
2039 | | var m = ZERO; |
2040 | | var e, z, j, k; |
2041 | | if (f < 0 || f > 20) throw RangeError(ERROR); |
2042 | | // eslint-disable-next-line no-self-compare |
2043 | | if (x != x) return 'NaN'; |
2044 | | if (x <= -1e21 || x >= 1e21) return String(x); |
2045 | | if (x < 0) { |
2046 | | s = '-'; |
2047 | | x = -x; |
2048 | | } |
2049 | | if (x > 1e-21) { |
2050 | | e = log(x * pow(2, 69, 1)) - 69; |
2051 | | z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); |
2052 | | z *= 0x10000000000000; |
2053 | | e = 52 - e; |
2054 | | if (e > 0) { |
2055 | | multiply(0, z); |
2056 | | j = f; |
2057 | | while (j >= 7) { |
2058 | | multiply(1e7, 0); |
2059 | | j -= 7; |
2060 | | } |
2061 | | multiply(pow(10, j, 1), 0); |
2062 | | j = e - 1; |
2063 | | while (j >= 23) { |
2064 | | divide(1 << 23); |
2065 | | j -= 23; |
2066 | | } |
2067 | | divide(1 << j); |
2068 | | multiply(1, 1); |
2069 | | divide(2); |
2070 | | m = numToString(); |
2071 | | } else { |
2072 | | multiply(0, z); |
2073 | | multiply(1 << -e, 0); |
2074 | | m = numToString() + repeat.call(ZERO, f); |
2075 | | } |
2076 | | } |
2077 | | if (f > 0) { |
2078 | | k = m.length; |
2079 | | m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); |
2080 | | } else { |
2081 | | m = s + m; |
2082 | | } return m; |
2083 | | } |
2084 | | }); |
2085 | | |
2086 | | |
2087 | | /***/ }), |
2088 | | /* 89 */ |
2089 | | /***/ (function(module, exports, __webpack_require__) { |
2090 | | |
2091 | | var cof = __webpack_require__(34); |
2092 | | module.exports = function (it, msg) { |
2093 | | if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); |
2094 | | return +it; |
2095 | | }; |
2096 | | |
2097 | | |
2098 | | /***/ }), |
2099 | | /* 90 */ |
2100 | | /***/ (function(module, exports, __webpack_require__) { |
2101 | | |
2102 | | 'use strict'; |
2103 | | var toInteger = __webpack_require__(38); |
2104 | | var defined = __webpack_require__(35); |
2105 | | |
2106 | | module.exports = function repeat(count) { |
2107 | | var str = String(defined(this)); |
2108 | | var res = ''; |
2109 | | var n = toInteger(count); |
2110 | | if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); |
2111 | | for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; |
2112 | | return res; |
2113 | | }; |
2114 | | |
2115 | | |
2116 | | /***/ }), |
2117 | | /* 91 */ |
2118 | | /***/ (function(module, exports, __webpack_require__) { |
2119 | | |
2120 | | 'use strict'; |
2121 | | var $export = __webpack_require__(8); |
2122 | | var $fails = __webpack_require__(7); |
2123 | | var aNumberValue = __webpack_require__(89); |
2124 | | var $toPrecision = 1.0.toPrecision; |
2125 | | |
2126 | | $export($export.P + $export.F * ($fails(function () { |
2127 | | // IE7- |
2128 | | return $toPrecision.call(1, undefined) !== '1'; |
2129 | | }) || !$fails(function () { |
2130 | | // V8 ~ Android 4.3- |
2131 | | $toPrecision.call({}); |
2132 | | })), 'Number', { |
2133 | | toPrecision: function toPrecision(precision) { |
2134 | | var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); |
2135 | | return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); |
2136 | | } |
2137 | | }); |
2138 | | |
2139 | | |
2140 | | /***/ }), |
2141 | | /* 92 */ |
2142 | | /***/ (function(module, exports, __webpack_require__) { |
2143 | | |
2144 | | // 20.1.2.1 Number.EPSILON |
2145 | | var $export = __webpack_require__(8); |
2146 | | |
2147 | | $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); |
2148 | | |
2149 | | |
2150 | | /***/ }), |
2151 | | /* 93 */ |
2152 | | /***/ (function(module, exports, __webpack_require__) { |
2153 | | |
2154 | | // 20.1.2.2 Number.isFinite(number) |
2155 | | var $export = __webpack_require__(8); |
2156 | | var _isFinite = __webpack_require__(4).isFinite; |
2157 | | |
2158 | | $export($export.S, 'Number', { |
2159 | | isFinite: function isFinite(it) { |
2160 | | return typeof it == 'number' && _isFinite(it); |
2161 | | } |
2162 | | }); |
2163 | | |
2164 | | |
2165 | | /***/ }), |
2166 | | /* 94 */ |
2167 | | /***/ (function(module, exports, __webpack_require__) { |
2168 | | |
2169 | | // 20.1.2.3 Number.isInteger(number) |
2170 | | var $export = __webpack_require__(8); |
2171 | | |
2172 | | $export($export.S, 'Number', { isInteger: __webpack_require__(95) }); |
2173 | | |
2174 | | |
2175 | | /***/ }), |
2176 | | /* 95 */ |
2177 | | /***/ (function(module, exports, __webpack_require__) { |
2178 | | |
2179 | | // 20.1.2.3 Number.isInteger(number) |
2180 | | var isObject = __webpack_require__(13); |
2181 | | var floor = Math.floor; |
2182 | | module.exports = function isInteger(it) { |
2183 | | return !isObject(it) && isFinite(it) && floor(it) === it; |
2184 | | }; |
2185 | | |
2186 | | |
2187 | | /***/ }), |
2188 | | /* 96 */ |
2189 | | /***/ (function(module, exports, __webpack_require__) { |
2190 | | |
2191 | | // 20.1.2.4 Number.isNaN(number) |
2192 | | var $export = __webpack_require__(8); |
2193 | | |
2194 | | $export($export.S, 'Number', { |
2195 | | isNaN: function isNaN(number) { |
2196 | | // eslint-disable-next-line no-self-compare |
2197 | | return number != number; |
2198 | | } |
2199 | | }); |
2200 | | |
2201 | | |
2202 | | /***/ }), |
2203 | | /* 97 */ |
2204 | | /***/ (function(module, exports, __webpack_require__) { |
2205 | | |
2206 | | // 20.1.2.5 Number.isSafeInteger(number) |
2207 | | var $export = __webpack_require__(8); |
2208 | | var isInteger = __webpack_require__(95); |
2209 | | var abs = Math.abs; |
2210 | | |
2211 | | $export($export.S, 'Number', { |
2212 | | isSafeInteger: function isSafeInteger(number) { |
2213 | | return isInteger(number) && abs(number) <= 0x1fffffffffffff; |
2214 | | } |
2215 | | }); |
2216 | | |
2217 | | |
2218 | | /***/ }), |
2219 | | /* 98 */ |
2220 | | /***/ (function(module, exports, __webpack_require__) { |
2221 | | |
2222 | | // 20.1.2.6 Number.MAX_SAFE_INTEGER |
2223 | | var $export = __webpack_require__(8); |
2224 | | |
2225 | | $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); |
2226 | | |
2227 | | |
2228 | | /***/ }), |
2229 | | /* 99 */ |
2230 | | /***/ (function(module, exports, __webpack_require__) { |
2231 | | |
2232 | | // 20.1.2.10 Number.MIN_SAFE_INTEGER |
2233 | | var $export = __webpack_require__(8); |
2234 | | |
2235 | | $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); |
2236 | | |
2237 | | |
2238 | | /***/ }), |
2239 | | /* 100 */ |
2240 | | /***/ (function(module, exports, __webpack_require__) { |
2241 | | |
2242 | | var $export = __webpack_require__(8); |
2243 | | var $parseFloat = __webpack_require__(85); |
2244 | | // 20.1.2.12 Number.parseFloat(string) |
2245 | | $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); |
2246 | | |
2247 | | |
2248 | | /***/ }), |
2249 | | /* 101 */ |
2250 | | /***/ (function(module, exports, __webpack_require__) { |
2251 | | |
2252 | | var $export = __webpack_require__(8); |
2253 | | var $parseInt = __webpack_require__(81); |
2254 | | // 20.1.2.13 Number.parseInt(string, radix) |
2255 | | $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); |
2256 | | |
2257 | | |
2258 | | /***/ }), |
2259 | | /* 102 */ |
2260 | | /***/ (function(module, exports, __webpack_require__) { |
2261 | | |
2262 | | // 20.2.2.3 Math.acosh(x) |
2263 | | var $export = __webpack_require__(8); |
2264 | | var log1p = __webpack_require__(103); |
2265 | | var sqrt = Math.sqrt; |
2266 | | var $acosh = Math.acosh; |
2267 | | |
2268 | | $export($export.S + $export.F * !($acosh |
2269 | | // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 |
2270 | | && Math.floor($acosh(Number.MAX_VALUE)) == 710 |
2271 | | // Tor Browser bug: Math.acosh(Infinity) -> NaN |
2272 | | && $acosh(Infinity) == Infinity |
2273 | | ), 'Math', { |
2274 | | acosh: function acosh(x) { |
2275 | | return (x = +x) < 1 ? NaN : x > 94906265.62425156 |
2276 | | ? Math.log(x) + Math.LN2 |
2277 | | : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); |
2278 | | } |
2279 | | }); |
2280 | | |
2281 | | |
2282 | | /***/ }), |
2283 | | /* 103 */ |
2284 | | /***/ (function(module, exports) { |
2285 | | |
2286 | | // 20.2.2.20 Math.log1p(x) |
2287 | | module.exports = Math.log1p || function log1p(x) { |
2288 | | return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); |
2289 | | }; |
2290 | | |
2291 | | |
2292 | | /***/ }), |
2293 | | /* 104 */ |
2294 | | /***/ (function(module, exports, __webpack_require__) { |
2295 | | |
2296 | | // 20.2.2.5 Math.asinh(x) |
2297 | | var $export = __webpack_require__(8); |
2298 | | var $asinh = Math.asinh; |
2299 | | |
2300 | | function asinh(x) { |
2301 | | return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); |
2302 | | } |
2303 | | |
2304 | | // Tor Browser bug: Math.asinh(0) -> -0 |
2305 | | $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); |
2306 | | |
2307 | | |
2308 | | /***/ }), |
2309 | | /* 105 */ |
2310 | | /***/ (function(module, exports, __webpack_require__) { |
2311 | | |
2312 | | // 20.2.2.7 Math.atanh(x) |
2313 | | var $export = __webpack_require__(8); |
2314 | | var $atanh = Math.atanh; |
2315 | | |
2316 | | // Tor Browser bug: Math.atanh(-0) -> 0 |
2317 | | $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { |
2318 | | atanh: function atanh(x) { |
2319 | | return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; |
2320 | | } |
2321 | | }); |
2322 | | |
2323 | | |
2324 | | /***/ }), |
2325 | | /* 106 */ |
2326 | | /***/ (function(module, exports, __webpack_require__) { |
2327 | | |
2328 | | // 20.2.2.9 Math.cbrt(x) |
2329 | | var $export = __webpack_require__(8); |
2330 | | var sign = __webpack_require__(107); |
2331 | | |
2332 | | $export($export.S, 'Math', { |
2333 | | cbrt: function cbrt(x) { |
2334 | | return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); |
2335 | | } |
2336 | | }); |
2337 | | |
2338 | | |
2339 | | /***/ }), |
2340 | | /* 107 */ |
2341 | | /***/ (function(module, exports) { |
2342 | | |
2343 | | // 20.2.2.28 Math.sign(x) |
2344 | | module.exports = Math.sign || function sign(x) { |
2345 | | // eslint-disable-next-line no-self-compare |
2346 | | return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; |
2347 | | }; |
2348 | | |
2349 | | |
2350 | | /***/ }), |
2351 | | /* 108 */ |
2352 | | /***/ (function(module, exports, __webpack_require__) { |
2353 | | |
2354 | | // 20.2.2.11 Math.clz32(x) |
2355 | | var $export = __webpack_require__(8); |
2356 | | |
2357 | | $export($export.S, 'Math', { |
2358 | | clz32: function clz32(x) { |
2359 | | return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; |
2360 | | } |
2361 | | }); |
2362 | | |
2363 | | |
2364 | | /***/ }), |
2365 | | /* 109 */ |
2366 | | /***/ (function(module, exports, __webpack_require__) { |
2367 | | |
2368 | | // 20.2.2.12 Math.cosh(x) |
2369 | | var $export = __webpack_require__(8); |
2370 | | var exp = Math.exp; |
2371 | | |
2372 | | $export($export.S, 'Math', { |
2373 | | cosh: function cosh(x) { |
2374 | | return (exp(x = +x) + exp(-x)) / 2; |
2375 | | } |
2376 | | }); |
2377 | | |
2378 | | |
2379 | | /***/ }), |
2380 | | /* 110 */ |
2381 | | /***/ (function(module, exports, __webpack_require__) { |
2382 | | |
2383 | | // 20.2.2.14 Math.expm1(x) |
2384 | | var $export = __webpack_require__(8); |
2385 | | var $expm1 = __webpack_require__(111); |
2386 | | |
2387 | | $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); |
2388 | | |
2389 | | |
2390 | | /***/ }), |
2391 | | /* 111 */ |
2392 | | /***/ (function(module, exports) { |
2393 | | |
2394 | | // 20.2.2.14 Math.expm1(x) |
2395 | | var $expm1 = Math.expm1; |
2396 | | module.exports = (!$expm1 |
2397 | | // Old FF bug |
2398 | | || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 |
2399 | | // Tor Browser bug |
2400 | | || $expm1(-2e-17) != -2e-17 |
2401 | | ) ? function expm1(x) { |
2402 | | return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; |
2403 | | } : $expm1; |
2404 | | |
2405 | | |
2406 | | /***/ }), |
2407 | | /* 112 */ |
2408 | | /***/ (function(module, exports, __webpack_require__) { |
2409 | | |
2410 | | // 20.2.2.16 Math.fround(x) |
2411 | | var $export = __webpack_require__(8); |
2412 | | |
2413 | | $export($export.S, 'Math', { fround: __webpack_require__(113) }); |
2414 | | |
2415 | | |
2416 | | /***/ }), |
2417 | | /* 113 */ |
2418 | | /***/ (function(module, exports, __webpack_require__) { |
2419 | | |
2420 | | // 20.2.2.16 Math.fround(x) |
2421 | | var sign = __webpack_require__(107); |
2422 | | var pow = Math.pow; |
2423 | | var EPSILON = pow(2, -52); |
2424 | | var EPSILON32 = pow(2, -23); |
2425 | | var MAX32 = pow(2, 127) * (2 - EPSILON32); |
2426 | | var MIN32 = pow(2, -126); |
2427 | | |
2428 | | var roundTiesToEven = function (n) { |
2429 | | return n + 1 / EPSILON - 1 / EPSILON; |
2430 | | }; |
2431 | | |
2432 | | module.exports = Math.fround || function fround(x) { |
2433 | | var $abs = Math.abs(x); |
2434 | | var $sign = sign(x); |
2435 | | var a, result; |
2436 | | if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; |
2437 | | a = (1 + EPSILON32 / EPSILON) * $abs; |
2438 | | result = a - (a - $abs); |
2439 | | // eslint-disable-next-line no-self-compare |
2440 | | if (result > MAX32 || result != result) return $sign * Infinity; |
2441 | | return $sign * result; |
2442 | | }; |
2443 | | |
2444 | | |
2445 | | /***/ }), |
2446 | | /* 114 */ |
2447 | | /***/ (function(module, exports, __webpack_require__) { |
2448 | | |
2449 | | // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) |
2450 | | var $export = __webpack_require__(8); |
2451 | | var abs = Math.abs; |
2452 | | |
2453 | | $export($export.S, 'Math', { |
2454 | | hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars |
2455 | | var sum = 0; |
2456 | | var i = 0; |
2457 | | var aLen = arguments.length; |
2458 | | var larg = 0; |
2459 | | var arg, div; |
2460 | | while (i < aLen) { |
2461 | | arg = abs(arguments[i++]); |
2462 | | if (larg < arg) { |
2463 | | div = larg / arg; |
2464 | | sum = sum * div * div + 1; |
2465 | | larg = arg; |
2466 | | } else if (arg > 0) { |
2467 | | div = arg / larg; |
2468 | | sum += div * div; |
2469 | | } else sum += arg; |
2470 | | } |
2471 | | return larg === Infinity ? Infinity : larg * Math.sqrt(sum); |
2472 | | } |
2473 | | }); |
2474 | | |
2475 | | |
2476 | | /***/ }), |
2477 | | /* 115 */ |
2478 | | /***/ (function(module, exports, __webpack_require__) { |
2479 | | |
2480 | | // 20.2.2.18 Math.imul(x, y) |
2481 | | var $export = __webpack_require__(8); |
2482 | | var $imul = Math.imul; |
2483 | | |
2484 | | // some WebKit versions fails with big numbers, some has wrong arity |
2485 | | $export($export.S + $export.F * __webpack_require__(7)(function () { |
2486 | | return $imul(0xffffffff, 5) != -5 || $imul.length != 2; |
2487 | | }), 'Math', { |
2488 | | imul: function imul(x, y) { |
2489 | | var UINT16 = 0xffff; |
2490 | | var xn = +x; |
2491 | | var yn = +y; |
2492 | | var xl = UINT16 & xn; |
2493 | | var yl = UINT16 & yn; |
2494 | | return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); |
2495 | | } |
2496 | | }); |
2497 | | |
2498 | | |
2499 | | /***/ }), |
2500 | | /* 116 */ |
2501 | | /***/ (function(module, exports, __webpack_require__) { |
2502 | | |
2503 | | // 20.2.2.21 Math.log10(x) |
2504 | | var $export = __webpack_require__(8); |
2505 | | |
2506 | | $export($export.S, 'Math', { |
2507 | | log10: function log10(x) { |
2508 | | return Math.log(x) * Math.LOG10E; |
2509 | | } |
2510 | | }); |
2511 | | |
2512 | | |
2513 | | /***/ }), |
2514 | | /* 117 */ |
2515 | | /***/ (function(module, exports, __webpack_require__) { |
2516 | | |
2517 | | // 20.2.2.20 Math.log1p(x) |
2518 | | var $export = __webpack_require__(8); |
2519 | | |
2520 | | $export($export.S, 'Math', { log1p: __webpack_require__(103) }); |
2521 | | |
2522 | | |
2523 | | /***/ }), |
2524 | | /* 118 */ |
2525 | | /***/ (function(module, exports, __webpack_require__) { |
2526 | | |
2527 | | // 20.2.2.22 Math.log2(x) |
2528 | | var $export = __webpack_require__(8); |
2529 | | |
2530 | | $export($export.S, 'Math', { |
2531 | | log2: function log2(x) { |
2532 | | return Math.log(x) / Math.LN2; |
2533 | | } |
2534 | | }); |
2535 | | |
2536 | | |
2537 | | /***/ }), |
2538 | | /* 119 */ |
2539 | | /***/ (function(module, exports, __webpack_require__) { |
2540 | | |
2541 | | // 20.2.2.28 Math.sign(x) |
2542 | | var $export = __webpack_require__(8); |
2543 | | |
2544 | | $export($export.S, 'Math', { sign: __webpack_require__(107) }); |
2545 | | |
2546 | | |
2547 | | /***/ }), |
2548 | | /* 120 */ |
2549 | | /***/ (function(module, exports, __webpack_require__) { |
2550 | | |
2551 | | // 20.2.2.30 Math.sinh(x) |
2552 | | var $export = __webpack_require__(8); |
2553 | | var expm1 = __webpack_require__(111); |
2554 | | var exp = Math.exp; |
2555 | | |
2556 | | // V8 near Chromium 38 has a problem with very small numbers |
2557 | | $export($export.S + $export.F * __webpack_require__(7)(function () { |
2558 | | return !Math.sinh(-2e-17) != -2e-17; |
2559 | | }), 'Math', { |
2560 | | sinh: function sinh(x) { |
2561 | | return Math.abs(x = +x) < 1 |
2562 | | ? (expm1(x) - expm1(-x)) / 2 |
2563 | | : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); |
2564 | | } |
2565 | | }); |
2566 | | |
2567 | | |
2568 | | /***/ }), |
2569 | | /* 121 */ |
2570 | | /***/ (function(module, exports, __webpack_require__) { |
2571 | | |
2572 | | // 20.2.2.33 Math.tanh(x) |
2573 | | var $export = __webpack_require__(8); |
2574 | | var expm1 = __webpack_require__(111); |
2575 | | var exp = Math.exp; |
2576 | | |
2577 | | $export($export.S, 'Math', { |
2578 | | tanh: function tanh(x) { |
2579 | | var a = expm1(x = +x); |
2580 | | var b = expm1(-x); |
2581 | | return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); |
2582 | | } |
2583 | | }); |
2584 | | |
2585 | | |
2586 | | /***/ }), |
2587 | | /* 122 */ |
2588 | | /***/ (function(module, exports, __webpack_require__) { |
2589 | | |
2590 | | // 20.2.2.34 Math.trunc(x) |
2591 | | var $export = __webpack_require__(8); |
2592 | | |
2593 | | $export($export.S, 'Math', { |
2594 | | trunc: function trunc(it) { |
2595 | | return (it > 0 ? Math.floor : Math.ceil)(it); |
2596 | | } |
2597 | | }); |
2598 | | |
2599 | | |
2600 | | /***/ }), |
2601 | | /* 123 */ |
2602 | | /***/ (function(module, exports, __webpack_require__) { |
2603 | | |
2604 | | var $export = __webpack_require__(8); |
2605 | | var toAbsoluteIndex = __webpack_require__(39); |
2606 | | var fromCharCode = String.fromCharCode; |
2607 | | var $fromCodePoint = String.fromCodePoint; |
2608 | | |
2609 | | // length should be 1, old FF problem |
2610 | | $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { |
2611 | | // 21.1.2.2 String.fromCodePoint(...codePoints) |
2612 | | fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars |
2613 | | var res = []; |
2614 | | var aLen = arguments.length; |
2615 | | var i = 0; |
2616 | | var code; |
2617 | | while (aLen > i) { |
2618 | | code = +arguments[i++]; |
2619 | | if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); |
2620 | | res.push(code < 0x10000 |
2621 | | ? fromCharCode(code) |
2622 | | : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) |
2623 | | ); |
2624 | | } return res.join(''); |
2625 | | } |
2626 | | }); |
2627 | | |
2628 | | |
2629 | | /***/ }), |
2630 | | /* 124 */ |
2631 | | /***/ (function(module, exports, __webpack_require__) { |
2632 | | |
2633 | | var $export = __webpack_require__(8); |
2634 | | var toIObject = __webpack_require__(32); |
2635 | | var toLength = __webpack_require__(37); |
2636 | | |
2637 | | $export($export.S, 'String', { |
2638 | | // 21.1.2.4 String.raw(callSite, ...substitutions) |
2639 | | raw: function raw(callSite) { |
2640 | | var tpl = toIObject(callSite.raw); |
2641 | | var len = toLength(tpl.length); |
2642 | | var aLen = arguments.length; |
2643 | | var res = []; |
2644 | | var i = 0; |
2645 | | while (len > i) { |
2646 | | res.push(String(tpl[i++])); |
2647 | | if (i < aLen) res.push(String(arguments[i])); |
2648 | | } return res.join(''); |
2649 | | } |
2650 | | }); |
2651 | | |
2652 | | |
2653 | | /***/ }), |
2654 | | /* 125 */ |
2655 | | /***/ (function(module, exports, __webpack_require__) { |
2656 | | |
2657 | | 'use strict'; |
2658 | | // 21.1.3.25 String.prototype.trim() |
2659 | | __webpack_require__(82)('trim', function ($trim) { |
2660 | | return function trim() { |
2661 | | return $trim(this, 3); |
2662 | | }; |
2663 | | }); |
2664 | | |
2665 | | |
2666 | | /***/ }), |
2667 | | /* 126 */ |
2668 | | /***/ (function(module, exports, __webpack_require__) { |
2669 | | |
2670 | | 'use strict'; |
2671 | | var $at = __webpack_require__(127)(true); |
2672 | | |
2673 | | // 21.1.3.27 String.prototype[@@iterator]() |
2674 | | __webpack_require__(128)(String, 'String', function (iterated) { |
2675 | | this._t = String(iterated); // target |
2676 | | this._i = 0; // next index |
2677 | | // 21.1.5.2.1 %StringIteratorPrototype%.next() |
2678 | | }, function () { |
2679 | | var O = this._t; |
2680 | | var index = this._i; |
2681 | | var point; |
2682 | | if (index >= O.length) return { value: undefined, done: true }; |
2683 | | point = $at(O, index); |
2684 | | this._i += point.length; |
2685 | | return { value: point, done: false }; |
2686 | | }); |
2687 | | |
2688 | | |
2689 | | /***/ }), |
2690 | | /* 127 */ |
2691 | | /***/ (function(module, exports, __webpack_require__) { |
2692 | | |
2693 | | var toInteger = __webpack_require__(38); |
2694 | | var defined = __webpack_require__(35); |
2695 | | // true -> String#at |
2696 | | // false -> String#codePointAt |
2697 | | module.exports = function (TO_STRING) { |
2698 | | return function (that, pos) { |
2699 | | var s = String(defined(that)); |
2700 | | var i = toInteger(pos); |
2701 | | var l = s.length; |
2702 | | var a, b; |
2703 | | if (i < 0 || i >= l) return TO_STRING ? '' : undefined; |
2704 | | a = s.charCodeAt(i); |
2705 | | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff |
2706 | | ? TO_STRING ? s.charAt(i) : a |
2707 | | : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; |
2708 | | }; |
2709 | | }; |
2710 | | |
2711 | | |
2712 | | /***/ }), |
2713 | | /* 128 */ |
2714 | | /***/ (function(module, exports, __webpack_require__) { |
2715 | | |
2716 | | 'use strict'; |
2717 | | var LIBRARY = __webpack_require__(24); |
2718 | | var $export = __webpack_require__(8); |
2719 | | var redefine = __webpack_require__(18); |
2720 | | var hide = __webpack_require__(10); |
2721 | | var Iterators = __webpack_require__(129); |
2722 | | var $iterCreate = __webpack_require__(130); |
2723 | | var setToStringTag = __webpack_require__(25); |
2724 | | var getPrototypeOf = __webpack_require__(58); |
2725 | | var ITERATOR = __webpack_require__(26)('iterator'); |
2726 | | var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` |
2727 | | var FF_ITERATOR = '@@iterator'; |
2728 | | var KEYS = 'keys'; |
2729 | | var VALUES = 'values'; |
2730 | | |
2731 | | var returnThis = function () { return this; }; |
2732 | | |
2733 | | module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { |
2734 | | $iterCreate(Constructor, NAME, next); |
2735 | | var getMethod = function (kind) { |
2736 | | if (!BUGGY && kind in proto) return proto[kind]; |
2737 | | switch (kind) { |
2738 | | case KEYS: return function keys() { return new Constructor(this, kind); }; |
2739 | | case VALUES: return function values() { return new Constructor(this, kind); }; |
2740 | | } return function entries() { return new Constructor(this, kind); }; |
2741 | | }; |
2742 | | var TAG = NAME + ' Iterator'; |
2743 | | var DEF_VALUES = DEFAULT == VALUES; |
2744 | | var VALUES_BUG = false; |
2745 | | var proto = Base.prototype; |
2746 | | var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; |
2747 | | var $default = $native || getMethod(DEFAULT); |
2748 | | var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; |
2749 | | var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; |
2750 | | var methods, key, IteratorPrototype; |
2751 | | // Fix native |
2752 | | if ($anyNative) { |
2753 | | IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); |
2754 | | if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { |
2755 | | // Set @@toStringTag to native iterators |
2756 | | setToStringTag(IteratorPrototype, TAG, true); |
2757 | | // fix for some old engines |
2758 | | if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); |
2759 | | } |
2760 | | } |
2761 | | // fix Array#{values, @@iterator}.name in V8 / FF |
2762 | | if (DEF_VALUES && $native && $native.name !== VALUES) { |
2763 | | VALUES_BUG = true; |
2764 | | $default = function values() { return $native.call(this); }; |
2765 | | } |
2766 | | // Define iterator |
2767 | | if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { |
2768 | | hide(proto, ITERATOR, $default); |
2769 | | } |
2770 | | // Plug for library |
2771 | | Iterators[NAME] = $default; |
2772 | | Iterators[TAG] = returnThis; |
2773 | | if (DEFAULT) { |
2774 | | methods = { |
2775 | | values: DEF_VALUES ? $default : getMethod(VALUES), |
2776 | | keys: IS_SET ? $default : getMethod(KEYS), |
2777 | | entries: $entries |
2778 | | }; |
2779 | | if (FORCED) for (key in methods) { |
2780 | | if (!(key in proto)) redefine(proto, key, methods[key]); |
2781 | | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); |
2782 | | } |
2783 | | return methods; |
2784 | | }; |
2785 | | |
2786 | | |
2787 | | /***/ }), |
2788 | | /* 129 */ |
2789 | | /***/ (function(module, exports) { |
2790 | | |
2791 | | module.exports = {}; |
2792 | | |
2793 | | |
2794 | | /***/ }), |
2795 | | /* 130 */ |
2796 | | /***/ (function(module, exports, __webpack_require__) { |
2797 | | |
2798 | | 'use strict'; |
2799 | | var create = __webpack_require__(45); |
2800 | | var descriptor = __webpack_require__(17); |
2801 | | var setToStringTag = __webpack_require__(25); |
2802 | | var IteratorPrototype = {}; |
2803 | | |
2804 | | // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() |
2805 | | __webpack_require__(10)(IteratorPrototype, __webpack_require__(26)('iterator'), function () { return this; }); |
2806 | | |
2807 | | module.exports = function (Constructor, NAME, next) { |
2808 | | Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); |
2809 | | setToStringTag(Constructor, NAME + ' Iterator'); |
2810 | | }; |
2811 | | |
2812 | | |
2813 | | /***/ }), |
2814 | | /* 131 */ |
2815 | | /***/ (function(module, exports, __webpack_require__) { |
2816 | | |
2817 | | 'use strict'; |
2818 | | var $export = __webpack_require__(8); |
2819 | | var $at = __webpack_require__(127)(false); |
2820 | | $export($export.P, 'String', { |
2821 | | // 21.1.3.3 String.prototype.codePointAt(pos) |
2822 | | codePointAt: function codePointAt(pos) { |
2823 | | return $at(this, pos); |
2824 | | } |
2825 | | }); |
2826 | | |
2827 | | |
2828 | | /***/ }), |
2829 | | /* 132 */ |
2830 | | /***/ (function(module, exports, __webpack_require__) { |
2831 | | |
2832 | | // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) |
2833 | | 'use strict'; |
2834 | | var $export = __webpack_require__(8); |
2835 | | var toLength = __webpack_require__(37); |
2836 | | var context = __webpack_require__(133); |
2837 | | var ENDS_WITH = 'endsWith'; |
2838 | | var $endsWith = ''[ENDS_WITH]; |
2839 | | |
2840 | | $export($export.P + $export.F * __webpack_require__(135)(ENDS_WITH), 'String', { |
2841 | | endsWith: function endsWith(searchString /* , endPosition = @length */) { |
2842 | | var that = context(this, searchString, ENDS_WITH); |
2843 | | var endPosition = arguments.length > 1 ? arguments[1] : undefined; |
2844 | | var len = toLength(that.length); |
2845 | | var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); |
2846 | | var search = String(searchString); |
2847 | | return $endsWith |
2848 | | ? $endsWith.call(that, search, end) |
2849 | | : that.slice(end - search.length, end) === search; |
2850 | | } |
2851 | | }); |
2852 | | |
2853 | | |
2854 | | /***/ }), |
2855 | | /* 133 */ |
2856 | | /***/ (function(module, exports, __webpack_require__) { |
2857 | | |
2858 | | // helper for String#{startsWith, endsWith, includes} |
2859 | | var isRegExp = __webpack_require__(134); |
2860 | | var defined = __webpack_require__(35); |
2861 | | |
2862 | | module.exports = function (that, searchString, NAME) { |
2863 | | if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); |
2864 | | return String(defined(that)); |
2865 | | }; |
2866 | | |
2867 | | |
2868 | | /***/ }), |
2869 | | /* 134 */ |
2870 | | /***/ (function(module, exports, __webpack_require__) { |
2871 | | |
2872 | | // 7.2.8 IsRegExp(argument) |
2873 | | var isObject = __webpack_require__(13); |
2874 | | var cof = __webpack_require__(34); |
2875 | | var MATCH = __webpack_require__(26)('match'); |
2876 | | module.exports = function (it) { |
2877 | | var isRegExp; |
2878 | | return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); |
2879 | | }; |
2880 | | |
2881 | | |
2882 | | /***/ }), |
2883 | | /* 135 */ |
2884 | | /***/ (function(module, exports, __webpack_require__) { |
2885 | | |
2886 | | var MATCH = __webpack_require__(26)('match'); |
2887 | | module.exports = function (KEY) { |
2888 | | var re = /./; |
2889 | | try { |
2890 | | '/./'[KEY](re); |
2891 | | } catch (e) { |
2892 | | try { |
2893 | | re[MATCH] = false; |
2894 | | return !'/./'[KEY](re); |
2895 | | } catch (f) { /* empty */ } |
2896 | | } return true; |
2897 | | }; |
2898 | | |
2899 | | |
2900 | | /***/ }), |
2901 | | /* 136 */ |
2902 | | /***/ (function(module, exports, __webpack_require__) { |
2903 | | |
2904 | | // 21.1.3.7 String.prototype.includes(searchString, position = 0) |
2905 | | 'use strict'; |
2906 | | var $export = __webpack_require__(8); |
2907 | | var context = __webpack_require__(133); |
2908 | | var INCLUDES = 'includes'; |
2909 | | |
2910 | | $export($export.P + $export.F * __webpack_require__(135)(INCLUDES), 'String', { |
2911 | | includes: function includes(searchString /* , position = 0 */) { |
2912 | | return !!~context(this, searchString, INCLUDES) |
2913 | | .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); |
2914 | | } |
2915 | | }); |
2916 | | |
2917 | | |
2918 | | /***/ }), |
2919 | | /* 137 */ |
2920 | | /***/ (function(module, exports, __webpack_require__) { |
2921 | | |
2922 | | var $export = __webpack_require__(8); |
2923 | | |
2924 | | $export($export.P, 'String', { |
2925 | | // 21.1.3.13 String.prototype.repeat(count) |
2926 | | repeat: __webpack_require__(90) |
2927 | | }); |
2928 | | |
2929 | | |
2930 | | /***/ }), |
2931 | | /* 138 */ |
2932 | | /***/ (function(module, exports, __webpack_require__) { |
2933 | | |
2934 | | // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) |
2935 | | 'use strict'; |
2936 | | var $export = __webpack_require__(8); |
2937 | | var toLength = __webpack_require__(37); |
2938 | | var context = __webpack_require__(133); |
2939 | | var STARTS_WITH = 'startsWith'; |
2940 | | var $startsWith = ''[STARTS_WITH]; |
2941 | | |
2942 | | $export($export.P + $export.F * __webpack_require__(135)(STARTS_WITH), 'String', { |
2943 | | startsWith: function startsWith(searchString /* , position = 0 */) { |
2944 | | var that = context(this, searchString, STARTS_WITH); |
2945 | | var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); |
2946 | | var search = String(searchString); |
2947 | | return $startsWith |
2948 | | ? $startsWith.call(that, search, index) |
2949 | | : that.slice(index, index + search.length) === search; |
2950 | | } |
2951 | | }); |
2952 | | |
2953 | | |
2954 | | /***/ }), |
2955 | | /* 139 */ |
2956 | | /***/ (function(module, exports, __webpack_require__) { |
2957 | | |
2958 | | 'use strict'; |
2959 | | // B.2.3.2 String.prototype.anchor(name) |
2960 | | __webpack_require__(140)('anchor', function (createHTML) { |
2961 | | return function anchor(name) { |
2962 | | return createHTML(this, 'a', 'name', name); |
2963 | | }; |
2964 | | }); |
2965 | | |
2966 | | |
2967 | | /***/ }), |
2968 | | /* 140 */ |
2969 | | /***/ (function(module, exports, __webpack_require__) { |
2970 | | |
2971 | | var $export = __webpack_require__(8); |
2972 | | var fails = __webpack_require__(7); |
2973 | | var defined = __webpack_require__(35); |
2974 | | var quot = /"/g; |
2975 | | // B.2.3.2.1 CreateHTML(string, tag, attribute, value) |
2976 | | var createHTML = function (string, tag, attribute, value) { |
2977 | | var S = String(defined(string)); |
2978 | | var p1 = '<' + tag; |
2979 | | if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; |
2980 | | return p1 + '>' + S + '</' + tag + '>'; |
2981 | | }; |
2982 | | module.exports = function (NAME, exec) { |
2983 | | var O = {}; |
2984 | | O[NAME] = exec(createHTML); |
2985 | | $export($export.P + $export.F * fails(function () { |
2986 | | var test = ''[NAME]('"'); |
2987 | | return test !== test.toLowerCase() || test.split('"').length > 3; |
2988 | | }), 'String', O); |
2989 | | }; |
2990 | | |
2991 | | |
2992 | | /***/ }), |
2993 | | /* 141 */ |
2994 | | /***/ (function(module, exports, __webpack_require__) { |
2995 | | |
2996 | | 'use strict'; |
2997 | | // B.2.3.3 String.prototype.big() |
2998 | | __webpack_require__(140)('big', function (createHTML) { |
2999 | | return function big() { |
3000 | | return createHTML(this, 'big', '', ''); |
3001 | | }; |
3002 | | }); |
3003 | | |
3004 | | |
3005 | | /***/ }), |
3006 | | /* 142 */ |
3007 | | /***/ (function(module, exports, __webpack_require__) { |
3008 | | |
3009 | | 'use strict'; |
3010 | | // B.2.3.4 String.prototype.blink() |
3011 | | __webpack_require__(140)('blink', function (createHTML) { |
3012 | | return function blink() { |
3013 | | return createHTML(this, 'blink', '', ''); |
3014 | | }; |
3015 | | }); |
3016 | | |
3017 | | |
3018 | | /***/ }), |
3019 | | /* 143 */ |
3020 | | /***/ (function(module, exports, __webpack_require__) { |
3021 | | |
3022 | | 'use strict'; |
3023 | | // B.2.3.5 String.prototype.bold() |
3024 | | __webpack_require__(140)('bold', function (createHTML) { |
3025 | | return function bold() { |
3026 | | return createHTML(this, 'b', '', ''); |
3027 | | }; |
3028 | | }); |
3029 | | |
3030 | | |
3031 | | /***/ }), |
3032 | | /* 144 */ |
3033 | | /***/ (function(module, exports, __webpack_require__) { |
3034 | | |
3035 | | 'use strict'; |
3036 | | // B.2.3.6 String.prototype.fixed() |
3037 | | __webpack_require__(140)('fixed', function (createHTML) { |
3038 | | return function fixed() { |
3039 | | return createHTML(this, 'tt', '', ''); |
3040 | | }; |
3041 | | }); |
3042 | | |
3043 | | |
3044 | | /***/ }), |
3045 | | /* 145 */ |
3046 | | /***/ (function(module, exports, __webpack_require__) { |
3047 | | |
3048 | | 'use strict'; |
3049 | | // B.2.3.7 String.prototype.fontcolor(color) |
3050 | | __webpack_require__(140)('fontcolor', function (createHTML) { |
3051 | | return function fontcolor(color) { |
3052 | | return createHTML(this, 'font', 'color', color); |
3053 | | }; |
3054 | | }); |
3055 | | |
3056 | | |
3057 | | /***/ }), |
3058 | | /* 146 */ |
3059 | | /***/ (function(module, exports, __webpack_require__) { |
3060 | | |
3061 | | 'use strict'; |
3062 | | // B.2.3.8 String.prototype.fontsize(size) |
3063 | | __webpack_require__(140)('fontsize', function (createHTML) { |
3064 | | return function fontsize(size) { |
3065 | | return createHTML(this, 'font', 'size', size); |
3066 | | }; |
3067 | | }); |
3068 | | |
3069 | | |
3070 | | /***/ }), |
3071 | | /* 147 */ |
3072 | | /***/ (function(module, exports, __webpack_require__) { |
3073 | | |
3074 | | 'use strict'; |
3075 | | // B.2.3.9 String.prototype.italics() |
3076 | | __webpack_require__(140)('italics', function (createHTML) { |
3077 | | return function italics() { |
3078 | | return createHTML(this, 'i', '', ''); |
3079 | | }; |
3080 | | }); |
3081 | | |
3082 | | |
3083 | | /***/ }), |
3084 | | /* 148 */ |
3085 | | /***/ (function(module, exports, __webpack_require__) { |
3086 | | |
3087 | | 'use strict'; |
3088 | | // B.2.3.10 String.prototype.link(url) |
3089 | | __webpack_require__(140)('link', function (createHTML) { |
3090 | | return function link(url) { |
3091 | | return createHTML(this, 'a', 'href', url); |
3092 | | }; |
3093 | | }); |
3094 | | |
3095 | | |
3096 | | /***/ }), |
3097 | | /* 149 */ |
3098 | | /***/ (function(module, exports, __webpack_require__) { |
3099 | | |
3100 | | 'use strict'; |
3101 | | // B.2.3.11 String.prototype.small() |
3102 | | __webpack_require__(140)('small', function (createHTML) { |
3103 | | return function small() { |
3104 | | return createHTML(this, 'small', '', ''); |
3105 | | }; |
3106 | | }); |
3107 | | |
3108 | | |
3109 | | /***/ }), |
3110 | | /* 150 */ |
3111 | | /***/ (function(module, exports, __webpack_require__) { |
3112 | | |
3113 | | 'use strict'; |
3114 | | // B.2.3.12 String.prototype.strike() |
3115 | | __webpack_require__(140)('strike', function (createHTML) { |
3116 | | return function strike() { |
3117 | | return createHTML(this, 'strike', '', ''); |
3118 | | }; |
3119 | | }); |
3120 | | |
3121 | | |
3122 | | /***/ }), |
3123 | | /* 151 */ |
3124 | | /***/ (function(module, exports, __webpack_require__) { |
3125 | | |
3126 | | 'use strict'; |
3127 | | // B.2.3.13 String.prototype.sub() |
3128 | | __webpack_require__(140)('sub', function (createHTML) { |
3129 | | return function sub() { |
3130 | | return createHTML(this, 'sub', '', ''); |
3131 | | }; |
3132 | | }); |
3133 | | |
3134 | | |
3135 | | /***/ }), |
3136 | | /* 152 */ |
3137 | | /***/ (function(module, exports, __webpack_require__) { |
3138 | | |
3139 | | 'use strict'; |
3140 | | // B.2.3.14 String.prototype.sup() |
3141 | | __webpack_require__(140)('sup', function (createHTML) { |
3142 | | return function sup() { |
3143 | | return createHTML(this, 'sup', '', ''); |
3144 | | }; |
3145 | | }); |
3146 | | |
3147 | | |
3148 | | /***/ }), |
3149 | | /* 153 */ |
3150 | | /***/ (function(module, exports, __webpack_require__) { |
3151 | | |
3152 | | // 20.3.3.1 / 15.9.4.4 Date.now() |
3153 | | var $export = __webpack_require__(8); |
3154 | | |
3155 | | $export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); |
3156 | | |
3157 | | |
3158 | | /***/ }), |
3159 | | /* 154 */ |
3160 | | /***/ (function(module, exports, __webpack_require__) { |
3161 | | |
3162 | | 'use strict'; |
3163 | | var $export = __webpack_require__(8); |
3164 | | var toObject = __webpack_require__(57); |
3165 | | var toPrimitive = __webpack_require__(16); |
3166 | | |
3167 | | $export($export.P + $export.F * __webpack_require__(7)(function () { |
3168 | | return new Date(NaN).toJSON() !== null |
3169 | | || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; |
3170 | | }), 'Date', { |
3171 | | // eslint-disable-next-line no-unused-vars |
3172 | | toJSON: function toJSON(key) { |
3173 | | var O = toObject(this); |
3174 | | var pv = toPrimitive(O); |
3175 | | return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); |
3176 | | } |
3177 | | }); |
3178 | | |
3179 | | |
3180 | | /***/ }), |
3181 | | /* 155 */ |
3182 | | /***/ (function(module, exports, __webpack_require__) { |
3183 | | |
3184 | | // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() |
3185 | | var $export = __webpack_require__(8); |
3186 | | var toISOString = __webpack_require__(156); |
3187 | | |
3188 | | // PhantomJS / old WebKit has a broken implementations |
3189 | | $export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { |
3190 | | toISOString: toISOString |
3191 | | }); |
3192 | | |
3193 | | |
3194 | | /***/ }), |
3195 | | /* 156 */ |
3196 | | /***/ (function(module, exports, __webpack_require__) { |
3197 | | |
3198 | | 'use strict'; |
3199 | | // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() |
3200 | | var fails = __webpack_require__(7); |
3201 | | var getTime = Date.prototype.getTime; |
3202 | | var $toISOString = Date.prototype.toISOString; |
3203 | | |
3204 | | var lz = function (num) { |
3205 | | return num > 9 ? num : '0' + num; |
3206 | | }; |
3207 | | |
3208 | | // PhantomJS / old WebKit has a broken implementations |
3209 | | module.exports = (fails(function () { |
3210 | | return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; |
3211 | | }) || !fails(function () { |
3212 | | $toISOString.call(new Date(NaN)); |
3213 | | })) ? function toISOString() { |
3214 | | if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); |
3215 | | var d = this; |
3216 | | var y = d.getUTCFullYear(); |
3217 | | var m = d.getUTCMilliseconds(); |
3218 | | var s = y < 0 ? '-' : y > 9999 ? '+' : ''; |
3219 | | return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + |
3220 | | '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + |
3221 | | 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + |
3222 | | ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; |
3223 | | } : $toISOString; |
3224 | | |
3225 | | |
3226 | | /***/ }), |
3227 | | /* 157 */ |
3228 | | /***/ (function(module, exports, __webpack_require__) { |
3229 | | |
3230 | | var DateProto = Date.prototype; |
3231 | | var INVALID_DATE = 'Invalid Date'; |
3232 | | var TO_STRING = 'toString'; |
3233 | | var $toString = DateProto[TO_STRING]; |
3234 | | var getTime = DateProto.getTime; |
3235 | | if (new Date(NaN) + '' != INVALID_DATE) { |
3236 | | __webpack_require__(18)(DateProto, TO_STRING, function toString() { |
3237 | | var value = getTime.call(this); |
3238 | | // eslint-disable-next-line no-self-compare |
3239 | | return value === value ? $toString.call(this) : INVALID_DATE; |
3240 | | }); |
3241 | | } |
3242 | | |
3243 | | |
3244 | | /***/ }), |
3245 | | /* 158 */ |
3246 | | /***/ (function(module, exports, __webpack_require__) { |
3247 | | |
3248 | | var TO_PRIMITIVE = __webpack_require__(26)('toPrimitive'); |
3249 | | var proto = Date.prototype; |
3250 | | |
3251 | | if (!(TO_PRIMITIVE in proto)) __webpack_require__(10)(proto, TO_PRIMITIVE, __webpack_require__(159)); |
3252 | | |
3253 | | |
3254 | | /***/ }), |
3255 | | /* 159 */ |
3256 | | /***/ (function(module, exports, __webpack_require__) { |
3257 | | |
3258 | | 'use strict'; |
3259 | | var anObject = __webpack_require__(12); |
3260 | | var toPrimitive = __webpack_require__(16); |
3261 | | var NUMBER = 'number'; |
3262 | | |
3263 | | module.exports = function (hint) { |
3264 | | if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); |
3265 | | return toPrimitive(anObject(this), hint != NUMBER); |
3266 | | }; |
3267 | | |
3268 | | |
3269 | | /***/ }), |
3270 | | /* 160 */ |
3271 | | /***/ (function(module, exports, __webpack_require__) { |
3272 | | |
3273 | | // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) |
3274 | | var $export = __webpack_require__(8); |
3275 | | |
3276 | | $export($export.S, 'Array', { isArray: __webpack_require__(44) }); |
3277 | | |
3278 | | |
3279 | | /***/ }), |
3280 | | /* 161 */ |
3281 | | /***/ (function(module, exports, __webpack_require__) { |
3282 | | |
3283 | | 'use strict'; |
3284 | | var ctx = __webpack_require__(20); |
3285 | | var $export = __webpack_require__(8); |
3286 | | var toObject = __webpack_require__(57); |
3287 | | var call = __webpack_require__(162); |
3288 | | var isArrayIter = __webpack_require__(163); |
3289 | | var toLength = __webpack_require__(37); |
3290 | | var createProperty = __webpack_require__(164); |
3291 | | var getIterFn = __webpack_require__(165); |
3292 | | |
3293 | | $export($export.S + $export.F * !__webpack_require__(166)(function (iter) { Array.from(iter); }), 'Array', { |
3294 | | // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) |
3295 | | from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { |
3296 | | var O = toObject(arrayLike); |
3297 | | var C = typeof this == 'function' ? this : Array; |
3298 | | var aLen = arguments.length; |
3299 | | var mapfn = aLen > 1 ? arguments[1] : undefined; |
3300 | | var mapping = mapfn !== undefined; |
3301 | | var index = 0; |
3302 | | var iterFn = getIterFn(O); |
3303 | | var length, result, step, iterator; |
3304 | | if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); |
3305 | | // if object isn't iterable or it's array with default iterator - use simple case |
3306 | | if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { |
3307 | | for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { |
3308 | | createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); |
3309 | | } |
3310 | | } else { |
3311 | | length = toLength(O.length); |
3312 | | for (result = new C(length); length > index; index++) { |
3313 | | createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); |
3314 | | } |
3315 | | } |
3316 | | result.length = index; |
3317 | | return result; |
3318 | | } |
3319 | | }); |
3320 | | |
3321 | | |
3322 | | /***/ }), |
3323 | | /* 162 */ |
3324 | | /***/ (function(module, exports, __webpack_require__) { |
3325 | | |
3326 | | // call something on iterator step with safe closing on error |
3327 | | var anObject = __webpack_require__(12); |
3328 | | module.exports = function (iterator, fn, value, entries) { |
3329 | | try { |
3330 | | return entries ? fn(anObject(value)[0], value[1]) : fn(value); |
3331 | | // 7.4.6 IteratorClose(iterator, completion) |
3332 | | } catch (e) { |
3333 | | var ret = iterator['return']; |
3334 | | if (ret !== undefined) anObject(ret.call(iterator)); |
3335 | | throw e; |
3336 | | } |
3337 | | }; |
3338 | | |
3339 | | |
3340 | | /***/ }), |
3341 | | /* 163 */ |
3342 | | /***/ (function(module, exports, __webpack_require__) { |
3343 | | |
3344 | | // check on default Array iterator |
3345 | | var Iterators = __webpack_require__(129); |
3346 | | var ITERATOR = __webpack_require__(26)('iterator'); |
3347 | | var ArrayProto = Array.prototype; |
3348 | | |
3349 | | module.exports = function (it) { |
3350 | | return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); |
3351 | | }; |
3352 | | |
3353 | | |
3354 | | /***/ }), |
3355 | | /* 164 */ |
3356 | | /***/ (function(module, exports, __webpack_require__) { |
3357 | | |
3358 | | 'use strict'; |
3359 | | var $defineProperty = __webpack_require__(11); |
3360 | | var createDesc = __webpack_require__(17); |
3361 | | |
3362 | | module.exports = function (object, index, value) { |
3363 | | if (index in object) $defineProperty.f(object, index, createDesc(0, value)); |
3364 | | else object[index] = value; |
3365 | | }; |
3366 | | |
3367 | | |
3368 | | /***/ }), |
3369 | | /* 165 */ |
3370 | | /***/ (function(module, exports, __webpack_require__) { |
3371 | | |
3372 | | var classof = __webpack_require__(74); |
3373 | | var ITERATOR = __webpack_require__(26)('iterator'); |
3374 | | var Iterators = __webpack_require__(129); |
3375 | | module.exports = __webpack_require__(9).getIteratorMethod = function (it) { |
3376 | | if (it != undefined) return it[ITERATOR] |
3377 | | || it['@@iterator'] |
3378 | | || Iterators[classof(it)]; |
3379 | | }; |
3380 | | |
3381 | | |
3382 | | /***/ }), |
3383 | | /* 166 */ |
3384 | | /***/ (function(module, exports, __webpack_require__) { |
3385 | | |
3386 | | var ITERATOR = __webpack_require__(26)('iterator'); |
3387 | | var SAFE_CLOSING = false; |
3388 | | |
3389 | | try { |
3390 | | var riter = [7][ITERATOR](); |
3391 | | riter['return'] = function () { SAFE_CLOSING = true; }; |
3392 | | // eslint-disable-next-line no-throw-literal |
3393 | | Array.from(riter, function () { throw 2; }); |
3394 | | } catch (e) { /* empty */ } |
3395 | | |
3396 | | module.exports = function (exec, skipClosing) { |
3397 | | if (!skipClosing && !SAFE_CLOSING) return false; |
3398 | | var safe = false; |
3399 | | try { |
3400 | | var arr = [7]; |
3401 | | var iter = arr[ITERATOR](); |
3402 | | iter.next = function () { return { done: safe = true }; }; |
3403 | | arr[ITERATOR] = function () { return iter; }; |
3404 | | exec(arr); |
3405 | | } catch (e) { /* empty */ } |
3406 | | return safe; |
3407 | | }; |
3408 | | |
3409 | | |
3410 | | /***/ }), |
3411 | | /* 167 */ |
3412 | | /***/ (function(module, exports, __webpack_require__) { |
3413 | | |
3414 | | 'use strict'; |
3415 | | var $export = __webpack_require__(8); |
3416 | | var createProperty = __webpack_require__(164); |
3417 | | |
3418 | | // WebKit Array.of isn't generic |
3419 | | $export($export.S + $export.F * __webpack_require__(7)(function () { |
3420 | | function F() { /* empty */ } |
3421 | | return !(Array.of.call(F) instanceof F); |
3422 | | }), 'Array', { |
3423 | | // 22.1.2.3 Array.of( ...items) |
3424 | | of: function of(/* ...args */) { |
3425 | | var index = 0; |
3426 | | var aLen = arguments.length; |
3427 | | var result = new (typeof this == 'function' ? this : Array)(aLen); |
3428 | | while (aLen > index) createProperty(result, index, arguments[index++]); |
3429 | | result.length = aLen; |
3430 | | return result; |
3431 | | } |
3432 | | }); |
3433 | | |
3434 | | |
3435 | | /***/ }), |
3436 | | /* 168 */ |
3437 | | /***/ (function(module, exports, __webpack_require__) { |
3438 | | |
3439 | | 'use strict'; |
3440 | | // 22.1.3.13 Array.prototype.join(separator) |
3441 | | var $export = __webpack_require__(8); |
3442 | | var toIObject = __webpack_require__(32); |
3443 | | var arrayJoin = [].join; |
3444 | | |
3445 | | // fallback for not array-like strings |
3446 | | $export($export.P + $export.F * (__webpack_require__(33) != Object || !__webpack_require__(169)(arrayJoin)), 'Array', { |
3447 | | join: function join(separator) { |
3448 | | return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); |
3449 | | } |
3450 | | }); |
3451 | | |
3452 | | |
3453 | | /***/ }), |
3454 | | /* 169 */ |
3455 | | /***/ (function(module, exports, __webpack_require__) { |
3456 | | |
3457 | | 'use strict'; |
3458 | | var fails = __webpack_require__(7); |
3459 | | |
3460 | | module.exports = function (method, arg) { |
3461 | | return !!method && fails(function () { |
3462 | | // eslint-disable-next-line no-useless-call |
3463 | | arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); |
3464 | | }); |
3465 | | }; |
3466 | | |
3467 | | |
3468 | | /***/ }), |
3469 | | /* 170 */ |
3470 | | /***/ (function(module, exports, __webpack_require__) { |
3471 | | |
3472 | | 'use strict'; |
3473 | | var $export = __webpack_require__(8); |
3474 | | var html = __webpack_require__(47); |
3475 | | var cof = __webpack_require__(34); |
3476 | | var toAbsoluteIndex = __webpack_require__(39); |
3477 | | var toLength = __webpack_require__(37); |
3478 | | var arraySlice = [].slice; |
3479 | | |
3480 | | // fallback for not array-like ES3 strings and DOM objects |
3481 | | $export($export.P + $export.F * __webpack_require__(7)(function () { |
3482 | | if (html) arraySlice.call(html); |
3483 | | }), 'Array', { |
3484 | | slice: function slice(begin, end) { |
3485 | | var len = toLength(this.length); |
3486 | | var klass = cof(this); |
3487 | | end = end === undefined ? len : end; |
3488 | | if (klass == 'Array') return arraySlice.call(this, begin, end); |
3489 | | var start = toAbsoluteIndex(begin, len); |
3490 | | var upTo = toAbsoluteIndex(end, len); |
3491 | | var size = toLength(upTo - start); |
3492 | | var cloned = new Array(size); |
3493 | | var i = 0; |
3494 | | for (; i < size; i++) cloned[i] = klass == 'String' |
3495 | | ? this.charAt(start + i) |
3496 | | : this[start + i]; |
3497 | | return cloned; |
3498 | | } |
3499 | | }); |
3500 | | |
3501 | | |
3502 | | /***/ }), |
3503 | | /* 171 */ |
3504 | | /***/ (function(module, exports, __webpack_require__) { |
3505 | | |
3506 | | 'use strict'; |
3507 | | var $export = __webpack_require__(8); |
3508 | | var aFunction = __webpack_require__(21); |
3509 | | var toObject = __webpack_require__(57); |
3510 | | var fails = __webpack_require__(7); |
3511 | | var $sort = [].sort; |
3512 | | var test = [1, 2, 3]; |
3513 | | |
3514 | | $export($export.P + $export.F * (fails(function () { |
3515 | | // IE8- |
3516 | | test.sort(undefined); |
3517 | | }) || !fails(function () { |
3518 | | // V8 bug |
3519 | | test.sort(null); |
3520 | | // Old WebKit |
3521 | | }) || !__webpack_require__(169)($sort)), 'Array', { |
3522 | | // 22.1.3.25 Array.prototype.sort(comparefn) |
3523 | | sort: function sort(comparefn) { |
3524 | | return comparefn === undefined |
3525 | | ? $sort.call(toObject(this)) |
3526 | | : $sort.call(toObject(this), aFunction(comparefn)); |
3527 | | } |
3528 | | }); |
3529 | | |
3530 | | |
3531 | | /***/ }), |
3532 | | /* 172 */ |
3533 | | /***/ (function(module, exports, __webpack_require__) { |
3534 | | |
3535 | | 'use strict'; |
3536 | | var $export = __webpack_require__(8); |
3537 | | var $forEach = __webpack_require__(173)(0); |
3538 | | var STRICT = __webpack_require__(169)([].forEach, true); |
3539 | | |
3540 | | $export($export.P + $export.F * !STRICT, 'Array', { |
3541 | | // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) |
3542 | | forEach: function forEach(callbackfn /* , thisArg */) { |
3543 | | return $forEach(this, callbackfn, arguments[1]); |
3544 | | } |
3545 | | }); |
3546 | | |
3547 | | |
3548 | | /***/ }), |
3549 | | /* 173 */ |
3550 | | /***/ (function(module, exports, __webpack_require__) { |
3551 | | |
3552 | | // 0 -> Array#forEach |
3553 | | // 1 -> Array#map |
3554 | | // 2 -> Array#filter |
3555 | | // 3 -> Array#some |
3556 | | // 4 -> Array#every |
3557 | | // 5 -> Array#find |
3558 | | // 6 -> Array#findIndex |
3559 | | var ctx = __webpack_require__(20); |
3560 | | var IObject = __webpack_require__(33); |
3561 | | var toObject = __webpack_require__(57); |
3562 | | var toLength = __webpack_require__(37); |
3563 | | var asc = __webpack_require__(174); |
3564 | | module.exports = function (TYPE, $create) { |
3565 | | var IS_MAP = TYPE == 1; |
3566 | | var IS_FILTER = TYPE == 2; |
3567 | | var IS_SOME = TYPE == 3; |
3568 | | var IS_EVERY = TYPE == 4; |
3569 | | var IS_FIND_INDEX = TYPE == 6; |
3570 | | var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; |
3571 | | var create = $create || asc; |
3572 | | return function ($this, callbackfn, that) { |
3573 | | var O = toObject($this); |
3574 | | var self = IObject(O); |
3575 | | var f = ctx(callbackfn, that, 3); |
3576 | | var length = toLength(self.length); |
3577 | | var index = 0; |
3578 | | var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; |
3579 | | var val, res; |
3580 | | for (;length > index; index++) if (NO_HOLES || index in self) { |
3581 | | val = self[index]; |
3582 | | res = f(val, index, O); |
3583 | | if (TYPE) { |
3584 | | if (IS_MAP) result[index] = res; // map |
3585 | | else if (res) switch (TYPE) { |
3586 | | case 3: return true; // some |
3587 | | case 5: return val; // find |
3588 | | case 6: return index; // findIndex |
3589 | | case 2: result.push(val); // filter |
3590 | | } else if (IS_EVERY) return false; // every |
3591 | | } |
3592 | | } |
3593 | | return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; |
3594 | | }; |
3595 | | }; |
3596 | | |
3597 | | |
3598 | | /***/ }), |
3599 | | /* 174 */ |
3600 | | /***/ (function(module, exports, __webpack_require__) { |
3601 | | |
3602 | | // 9.4.2.3 ArraySpeciesCreate(originalArray, length) |
3603 | | var speciesConstructor = __webpack_require__(175); |
3604 | | |
3605 | | module.exports = function (original, length) { |
3606 | | return new (speciesConstructor(original))(length); |
3607 | | }; |
3608 | | |
3609 | | |
3610 | | /***/ }), |
3611 | | /* 175 */ |
3612 | | /***/ (function(module, exports, __webpack_require__) { |
3613 | | |
3614 | | var isObject = __webpack_require__(13); |
3615 | | var isArray = __webpack_require__(44); |
3616 | | var SPECIES = __webpack_require__(26)('species'); |
3617 | | |
3618 | | module.exports = function (original) { |
3619 | | var C; |
3620 | | if (isArray(original)) { |
3621 | | C = original.constructor; |
3622 | | // cross-realm fallback |
3623 | | if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; |
3624 | | if (isObject(C)) { |
3625 | | C = C[SPECIES]; |
3626 | | if (C === null) C = undefined; |
3627 | | } |
3628 | | } return C === undefined ? Array : C; |
3629 | | }; |
3630 | | |
3631 | | |
3632 | | /***/ }), |
3633 | | /* 176 */ |
3634 | | /***/ (function(module, exports, __webpack_require__) { |
3635 | | |
3636 | | 'use strict'; |
3637 | | var $export = __webpack_require__(8); |
3638 | | var $map = __webpack_require__(173)(1); |
3639 | | |
3640 | | $export($export.P + $export.F * !__webpack_require__(169)([].map, true), 'Array', { |
3641 | | // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) |
3642 | | map: function map(callbackfn /* , thisArg */) { |
3643 | | return $map(this, callbackfn, arguments[1]); |
3644 | | } |
3645 | | }); |
3646 | | |
3647 | | |
3648 | | /***/ }), |
3649 | | /* 177 */ |
3650 | | /***/ (function(module, exports, __webpack_require__) { |
3651 | | |
3652 | | 'use strict'; |
3653 | | var $export = __webpack_require__(8); |
3654 | | var $filter = __webpack_require__(173)(2); |
3655 | | |
3656 | | $export($export.P + $export.F * !__webpack_require__(169)([].filter, true), 'Array', { |
3657 | | // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) |
3658 | | filter: function filter(callbackfn /* , thisArg */) { |
3659 | | return $filter(this, callbackfn, arguments[1]); |
3660 | | } |
3661 | | }); |
3662 | | |
3663 | | |
3664 | | /***/ }), |
3665 | | /* 178 */ |
3666 | | /***/ (function(module, exports, __webpack_require__) { |
3667 | | |
3668 | | 'use strict'; |
3669 | | var $export = __webpack_require__(8); |
3670 | | var $some = __webpack_require__(173)(3); |
3671 | | |
3672 | | $export($export.P + $export.F * !__webpack_require__(169)([].some, true), 'Array', { |
3673 | | // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) |
3674 | | some: function some(callbackfn /* , thisArg */) { |
3675 | | return $some(this, callbackfn, arguments[1]); |
3676 | | } |
3677 | | }); |
3678 | | |
3679 | | |
3680 | | /***/ }), |
3681 | | /* 179 */ |
3682 | | /***/ (function(module, exports, __webpack_require__) { |
3683 | | |
3684 | | 'use strict'; |
3685 | | var $export = __webpack_require__(8); |
3686 | | var $every = __webpack_require__(173)(4); |
3687 | | |
3688 | | $export($export.P + $export.F * !__webpack_require__(169)([].every, true), 'Array', { |
3689 | | // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) |
3690 | | every: function every(callbackfn /* , thisArg */) { |
3691 | | return $every(this, callbackfn, arguments[1]); |
3692 | | } |
3693 | | }); |
3694 | | |
3695 | | |
3696 | | /***/ }), |
3697 | | /* 180 */ |
3698 | | /***/ (function(module, exports, __webpack_require__) { |
3699 | | |
3700 | | 'use strict'; |
3701 | | var $export = __webpack_require__(8); |
3702 | | var $reduce = __webpack_require__(181); |
3703 | | |
3704 | | $export($export.P + $export.F * !__webpack_require__(169)([].reduce, true), 'Array', { |
3705 | | // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) |
3706 | | reduce: function reduce(callbackfn /* , initialValue */) { |
3707 | | return $reduce(this, callbackfn, arguments.length, arguments[1], false); |
3708 | | } |
3709 | | }); |
3710 | | |
3711 | | |
3712 | | /***/ }), |
3713 | | /* 181 */ |
3714 | | /***/ (function(module, exports, __webpack_require__) { |
3715 | | |
3716 | | var aFunction = __webpack_require__(21); |
3717 | | var toObject = __webpack_require__(57); |
3718 | | var IObject = __webpack_require__(33); |
3719 | | var toLength = __webpack_require__(37); |
3720 | | |
3721 | | module.exports = function (that, callbackfn, aLen, memo, isRight) { |
3722 | | aFunction(callbackfn); |
3723 | | var O = toObject(that); |
3724 | | var self = IObject(O); |
3725 | | var length = toLength(O.length); |
3726 | | var index = isRight ? length - 1 : 0; |
3727 | | var i = isRight ? -1 : 1; |
3728 | | if (aLen < 2) for (;;) { |
3729 | | if (index in self) { |
3730 | | memo = self[index]; |
3731 | | index += i; |
3732 | | break; |
3733 | | } |
3734 | | index += i; |
3735 | | if (isRight ? index < 0 : length <= index) { |
3736 | | throw TypeError('Reduce of empty array with no initial value'); |
3737 | | } |
3738 | | } |
3739 | | for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { |
3740 | | memo = callbackfn(memo, self[index], index, O); |
3741 | | } |
3742 | | return memo; |
3743 | | }; |
3744 | | |
3745 | | |
3746 | | /***/ }), |
3747 | | /* 182 */ |
3748 | | /***/ (function(module, exports, __webpack_require__) { |
3749 | | |
3750 | | 'use strict'; |
3751 | | var $export = __webpack_require__(8); |
3752 | | var $reduce = __webpack_require__(181); |
3753 | | |
3754 | | $export($export.P + $export.F * !__webpack_require__(169)([].reduceRight, true), 'Array', { |
3755 | | // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) |
3756 | | reduceRight: function reduceRight(callbackfn /* , initialValue */) { |
3757 | | return $reduce(this, callbackfn, arguments.length, arguments[1], true); |
3758 | | } |
3759 | | }); |
3760 | | |
3761 | | |
3762 | | /***/ }), |
3763 | | /* 183 */ |
3764 | | /***/ (function(module, exports, __webpack_require__) { |
3765 | | |
3766 | | 'use strict'; |
3767 | | var $export = __webpack_require__(8); |
3768 | | var $indexOf = __webpack_require__(36)(false); |
3769 | | var $native = [].indexOf; |
3770 | | var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; |
3771 | | |
3772 | | $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { |
3773 | | // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) |
3774 | | indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { |
3775 | | return NEGATIVE_ZERO |
3776 | | // convert -0 to +0 |
3777 | | ? $native.apply(this, arguments) || 0 |
3778 | | : $indexOf(this, searchElement, arguments[1]); |
3779 | | } |
3780 | | }); |
3781 | | |
3782 | | |
3783 | | /***/ }), |
3784 | | /* 184 */ |
3785 | | /***/ (function(module, exports, __webpack_require__) { |
3786 | | |
3787 | | 'use strict'; |
3788 | | var $export = __webpack_require__(8); |
3789 | | var toIObject = __webpack_require__(32); |
3790 | | var toInteger = __webpack_require__(38); |
3791 | | var toLength = __webpack_require__(37); |
3792 | | var $native = [].lastIndexOf; |
3793 | | var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; |
3794 | | |
3795 | | $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { |
3796 | | // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) |
3797 | | lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { |
3798 | | // convert -0 to +0 |
3799 | | if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; |
3800 | | var O = toIObject(this); |
3801 | | var length = toLength(O.length); |
3802 | | var index = length - 1; |
3803 | | if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); |
3804 | | if (index < 0) index = length + index; |
3805 | | for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; |
3806 | | return -1; |
3807 | | } |
3808 | | }); |
3809 | | |
3810 | | |
3811 | | /***/ }), |
3812 | | /* 185 */ |
3813 | | /***/ (function(module, exports, __webpack_require__) { |
3814 | | |
3815 | | // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) |
3816 | | var $export = __webpack_require__(8); |
3817 | | |
3818 | | $export($export.P, 'Array', { copyWithin: __webpack_require__(186) }); |
3819 | | |
3820 | | __webpack_require__(187)('copyWithin'); |
3821 | | |
3822 | | |
3823 | | /***/ }), |
3824 | | /* 186 */ |
3825 | | /***/ (function(module, exports, __webpack_require__) { |
3826 | | |
3827 | | // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) |
3828 | | 'use strict'; |
3829 | | var toObject = __webpack_require__(57); |
3830 | | var toAbsoluteIndex = __webpack_require__(39); |
3831 | | var toLength = __webpack_require__(37); |
3832 | | |
3833 | | module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { |
3834 | | var O = toObject(this); |
3835 | | var len = toLength(O.length); |
3836 | | var to = toAbsoluteIndex(target, len); |
3837 | | var from = toAbsoluteIndex(start, len); |
3838 | | var end = arguments.length > 2 ? arguments[2] : undefined; |
3839 | | var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); |
3840 | | var inc = 1; |
3841 | | if (from < to && to < from + count) { |
3842 | | inc = -1; |
3843 | | from += count - 1; |
3844 | | to += count - 1; |
3845 | | } |
3846 | | while (count-- > 0) { |
3847 | | if (from in O) O[to] = O[from]; |
3848 | | else delete O[to]; |
3849 | | to += inc; |
3850 | | from += inc; |
3851 | | } return O; |
3852 | | }; |
3853 | | |
3854 | | |
3855 | | /***/ }), |
3856 | | /* 187 */ |
3857 | | /***/ (function(module, exports, __webpack_require__) { |
3858 | | |
3859 | | // 22.1.3.31 Array.prototype[@@unscopables] |
3860 | | var UNSCOPABLES = __webpack_require__(26)('unscopables'); |
3861 | | var ArrayProto = Array.prototype; |
3862 | | if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(10)(ArrayProto, UNSCOPABLES, {}); |
3863 | | module.exports = function (key) { |
3864 | | ArrayProto[UNSCOPABLES][key] = true; |
3865 | | }; |
3866 | | |
3867 | | |
3868 | | /***/ }), |
3869 | | /* 188 */ |
3870 | | /***/ (function(module, exports, __webpack_require__) { |
3871 | | |
3872 | | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) |
3873 | | var $export = __webpack_require__(8); |
3874 | | |
3875 | | $export($export.P, 'Array', { fill: __webpack_require__(189) }); |
3876 | | |
3877 | | __webpack_require__(187)('fill'); |
3878 | | |
3879 | | |
3880 | | /***/ }), |
3881 | | /* 189 */ |
3882 | | /***/ (function(module, exports, __webpack_require__) { |
3883 | | |
3884 | | // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) |
3885 | | 'use strict'; |
3886 | | var toObject = __webpack_require__(57); |
3887 | | var toAbsoluteIndex = __webpack_require__(39); |
3888 | | var toLength = __webpack_require__(37); |
3889 | | module.exports = function fill(value /* , start = 0, end = @length */) { |
3890 | | var O = toObject(this); |
3891 | | var length = toLength(O.length); |
3892 | | var aLen = arguments.length; |
3893 | | var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); |
3894 | | var end = aLen > 2 ? arguments[2] : undefined; |
3895 | | var endPos = end === undefined ? length : toAbsoluteIndex(end, length); |
3896 | | while (endPos > index) O[index++] = value; |
3897 | | return O; |
3898 | | }; |
3899 | | |
3900 | | |
3901 | | /***/ }), |
3902 | | /* 190 */ |
3903 | | /***/ (function(module, exports, __webpack_require__) { |
3904 | | |
3905 | | 'use strict'; |
3906 | | // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) |
3907 | | var $export = __webpack_require__(8); |
3908 | | var $find = __webpack_require__(173)(5); |
3909 | | var KEY = 'find'; |
3910 | | var forced = true; |
3911 | | // Shouldn't skip holes |
3912 | | if (KEY in []) Array(1)[KEY](function () { forced = false; }); |
3913 | | $export($export.P + $export.F * forced, 'Array', { |
3914 | | find: function find(callbackfn /* , that = undefined */) { |
3915 | | return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); |
3916 | | } |
3917 | | }); |
3918 | | __webpack_require__(187)(KEY); |
3919 | | |
3920 | | |
3921 | | /***/ }), |
3922 | | /* 191 */ |
3923 | | /***/ (function(module, exports, __webpack_require__) { |
3924 | | |
3925 | | 'use strict'; |
3926 | | // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) |
3927 | | var $export = __webpack_require__(8); |
3928 | | var $find = __webpack_require__(173)(6); |
3929 | | var KEY = 'findIndex'; |
3930 | | var forced = true; |
3931 | | // Shouldn't skip holes |
3932 | | if (KEY in []) Array(1)[KEY](function () { forced = false; }); |
3933 | | $export($export.P + $export.F * forced, 'Array', { |
3934 | | findIndex: function findIndex(callbackfn /* , that = undefined */) { |
3935 | | return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); |
3936 | | } |
3937 | | }); |
3938 | | __webpack_require__(187)(KEY); |
3939 | | |
3940 | | |
3941 | | /***/ }), |
3942 | | /* 192 */ |
3943 | | /***/ (function(module, exports, __webpack_require__) { |
3944 | | |
3945 | | __webpack_require__(193)('Array'); |
3946 | | |
3947 | | |
3948 | | /***/ }), |
3949 | | /* 193 */ |
3950 | | /***/ (function(module, exports, __webpack_require__) { |
3951 | | |
3952 | | 'use strict'; |
3953 | | var global = __webpack_require__(4); |
3954 | | var dP = __webpack_require__(11); |
3955 | | var DESCRIPTORS = __webpack_require__(6); |
3956 | | var SPECIES = __webpack_require__(26)('species'); |
3957 | | |
3958 | | module.exports = function (KEY) { |
3959 | | var C = global[KEY]; |
3960 | | if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { |
3961 | | configurable: true, |
3962 | | get: function () { return this; } |
3963 | | }); |
3964 | | }; |
3965 | | |
3966 | | |
3967 | | /***/ }), |
3968 | | /* 194 */ |
3969 | | /***/ (function(module, exports, __webpack_require__) { |
3970 | | |
3971 | | 'use strict'; |
3972 | | var addToUnscopables = __webpack_require__(187); |
3973 | | var step = __webpack_require__(195); |
3974 | | var Iterators = __webpack_require__(129); |
3975 | | var toIObject = __webpack_require__(32); |
3976 | | |
3977 | | // 22.1.3.4 Array.prototype.entries() |
3978 | | // 22.1.3.13 Array.prototype.keys() |
3979 | | // 22.1.3.29 Array.prototype.values() |
3980 | | // 22.1.3.30 Array.prototype[@@iterator]() |
3981 | | module.exports = __webpack_require__(128)(Array, 'Array', function (iterated, kind) { |
3982 | | this._t = toIObject(iterated); // target |
3983 | | this._i = 0; // next index |
3984 | | this._k = kind; // kind |
3985 | | // 22.1.5.2.1 %ArrayIteratorPrototype%.next() |
3986 | | }, function () { |
3987 | | var O = this._t; |
3988 | | var kind = this._k; |
3989 | | var index = this._i++; |
3990 | | if (!O || index >= O.length) { |
3991 | | this._t = undefined; |
3992 | | return step(1); |
3993 | | } |
3994 | | if (kind == 'keys') return step(0, index); |
3995 | | if (kind == 'values') return step(0, O[index]); |
3996 | | return step(0, [index, O[index]]); |
3997 | | }, 'values'); |
3998 | | |
3999 | | // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) |
4000 | | Iterators.Arguments = Iterators.Array; |
4001 | | |
4002 | | addToUnscopables('keys'); |
4003 | | addToUnscopables('values'); |
4004 | | addToUnscopables('entries'); |
4005 | | |
4006 | | |
4007 | | /***/ }), |
4008 | | /* 195 */ |
4009 | | /***/ (function(module, exports) { |
4010 | | |
4011 | | module.exports = function (done, value) { |
4012 | | return { value: value, done: !!done }; |
4013 | | }; |
4014 | | |
4015 | | |
4016 | | /***/ }), |
4017 | | /* 196 */ |
4018 | | /***/ (function(module, exports, __webpack_require__) { |
4019 | | |
4020 | | var global = __webpack_require__(4); |
4021 | | var inheritIfRequired = __webpack_require__(87); |
4022 | | var dP = __webpack_require__(11).f; |
4023 | | var gOPN = __webpack_require__(49).f; |
4024 | | var isRegExp = __webpack_require__(134); |
4025 | | var $flags = __webpack_require__(197); |
4026 | | var $RegExp = global.RegExp; |
4027 | | var Base = $RegExp; |
4028 | | var proto = $RegExp.prototype; |
4029 | | var re1 = /a/g; |
4030 | | var re2 = /a/g; |
4031 | | // "new" creates a new object, old webkit buggy here |
4032 | | var CORRECT_NEW = new $RegExp(re1) !== re1; |
4033 | | |
4034 | | if (__webpack_require__(6) && (!CORRECT_NEW || __webpack_require__(7)(function () { |
4035 | | re2[__webpack_require__(26)('match')] = false; |
4036 | | // RegExp constructor can alter flags and IsRegExp works correct with @@match |
4037 | | return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; |
4038 | | }))) { |
4039 | | $RegExp = function RegExp(p, f) { |
4040 | | var tiRE = this instanceof $RegExp; |
4041 | | var piRE = isRegExp(p); |
4042 | | var fiU = f === undefined; |
4043 | | return !tiRE && piRE && p.constructor === $RegExp && fiU ? p |
4044 | | : inheritIfRequired(CORRECT_NEW |
4045 | | ? new Base(piRE && !fiU ? p.source : p, f) |
4046 | | : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) |
4047 | | , tiRE ? this : proto, $RegExp); |
4048 | | }; |
4049 | | var proxy = function (key) { |
4050 | | key in $RegExp || dP($RegExp, key, { |
4051 | | configurable: true, |
4052 | | get: function () { return Base[key]; }, |
4053 | | set: function (it) { Base[key] = it; } |
4054 | | }); |
4055 | | }; |
4056 | | for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); |
4057 | | proto.constructor = $RegExp; |
4058 | | $RegExp.prototype = proto; |
4059 | | __webpack_require__(18)(global, 'RegExp', $RegExp); |
4060 | | } |
4061 | | |
4062 | | __webpack_require__(193)('RegExp'); |
4063 | | |
4064 | | |
4065 | | /***/ }), |
4066 | | /* 197 */ |
4067 | | /***/ (function(module, exports, __webpack_require__) { |
4068 | | |
4069 | | 'use strict'; |
4070 | | // 21.2.5.3 get RegExp.prototype.flags |
4071 | | var anObject = __webpack_require__(12); |
4072 | | module.exports = function () { |
4073 | | var that = anObject(this); |
4074 | | var result = ''; |
4075 | | if (that.global) result += 'g'; |
4076 | | if (that.ignoreCase) result += 'i'; |
4077 | | if (that.multiline) result += 'm'; |
4078 | | if (that.unicode) result += 'u'; |
4079 | | if (that.sticky) result += 'y'; |
4080 | | return result; |
4081 | | }; |
4082 | | |
4083 | | |
4084 | | /***/ }), |
4085 | | /* 198 */ |
4086 | | /***/ (function(module, exports, __webpack_require__) { |
4087 | | |
4088 | | 'use strict'; |
4089 | | var regexpExec = __webpack_require__(199); |
4090 | | __webpack_require__(8)({ |
4091 | | target: 'RegExp', |
4092 | | proto: true, |
4093 | | forced: regexpExec !== /./.exec |
4094 | | }, { |
4095 | | exec: regexpExec |
4096 | | }); |
4097 | | |
4098 | | |
4099 | | /***/ }), |
4100 | | /* 199 */ |
4101 | | /***/ (function(module, exports, __webpack_require__) { |
4102 | | |
4103 | | 'use strict'; |
4104 | | |
4105 | | var regexpFlags = __webpack_require__(197); |
4106 | | |
4107 | | var nativeExec = RegExp.prototype.exec; |
4108 | | // This always refers to the native implementation, because the |
4109 | | // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, |
4110 | | // which loads this file before patching the method. |
4111 | | var nativeReplace = String.prototype.replace; |
4112 | | |
4113 | | var patchedExec = nativeExec; |
4114 | | |
4115 | | var LAST_INDEX = 'lastIndex'; |
4116 | | |
4117 | | var UPDATES_LAST_INDEX_WRONG = (function () { |
4118 | | var re1 = /a/, |
4119 | | re2 = /b*/g; |
4120 | | nativeExec.call(re1, 'a'); |
4121 | | nativeExec.call(re2, 'a'); |
4122 | | return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; |
4123 | | })(); |
4124 | | |
4125 | | // nonparticipating capturing group, copied from es5-shim's String#split patch. |
4126 | | var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; |
4127 | | |
4128 | | var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; |
4129 | | |
4130 | | if (PATCH) { |
4131 | | patchedExec = function exec(str) { |
4132 | | var re = this; |
4133 | | var lastIndex, reCopy, match, i; |
4134 | | |
4135 | | if (NPCG_INCLUDED) { |
4136 | | reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); |
4137 | | } |
4138 | | if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; |
4139 | | |
4140 | | match = nativeExec.call(re, str); |
4141 | | |
4142 | | if (UPDATES_LAST_INDEX_WRONG && match) { |
4143 | | re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; |
4144 | | } |
4145 | | if (NPCG_INCLUDED && match && match.length > 1) { |
4146 | | // Fix browsers whose `exec` methods don't consistently return `undefined` |
4147 | | // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ |
4148 | | // eslint-disable-next-line no-loop-func |
4149 | | nativeReplace.call(match[0], reCopy, function () { |
4150 | | for (i = 1; i < arguments.length - 2; i++) { |
4151 | | if (arguments[i] === undefined) match[i] = undefined; |
4152 | | } |
4153 | | }); |
4154 | | } |
4155 | | |
4156 | | return match; |
4157 | | }; |
4158 | | } |
4159 | | |
4160 | | module.exports = patchedExec; |
4161 | | |
4162 | | |
4163 | | /***/ }), |
4164 | | /* 200 */ |
4165 | | /***/ (function(module, exports, __webpack_require__) { |
4166 | | |
4167 | | 'use strict'; |
4168 | | __webpack_require__(201); |
4169 | | var anObject = __webpack_require__(12); |
4170 | | var $flags = __webpack_require__(197); |
4171 | | var DESCRIPTORS = __webpack_require__(6); |
4172 | | var TO_STRING = 'toString'; |
4173 | | var $toString = /./[TO_STRING]; |
4174 | | |
4175 | | var define = function (fn) { |
4176 | | __webpack_require__(18)(RegExp.prototype, TO_STRING, fn, true); |
4177 | | }; |
4178 | | |
4179 | | // 21.2.5.14 RegExp.prototype.toString() |
4180 | | if (__webpack_require__(7)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { |
4181 | | define(function toString() { |
4182 | | var R = anObject(this); |
4183 | | return '/'.concat(R.source, '/', |
4184 | | 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); |
4185 | | }); |
4186 | | // FF44- RegExp#toString has a wrong name |
4187 | | } else if ($toString.name != TO_STRING) { |
4188 | | define(function toString() { |
4189 | | return $toString.call(this); |
4190 | | }); |
4191 | | } |
4192 | | |
4193 | | |
4194 | | /***/ }), |
4195 | | /* 201 */ |
4196 | | /***/ (function(module, exports, __webpack_require__) { |
4197 | | |
4198 | | // 21.2.5.3 get RegExp.prototype.flags() |
4199 | | if (__webpack_require__(6) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', { |
4200 | | configurable: true, |
4201 | | get: __webpack_require__(197) |
4202 | | }); |
4203 | | |
4204 | | |
4205 | | /***/ }), |
4206 | | /* 202 */ |
4207 | | /***/ (function(module, exports, __webpack_require__) { |
4208 | | |
4209 | | 'use strict'; |
4210 | | |
4211 | | var anObject = __webpack_require__(12); |
4212 | | var toLength = __webpack_require__(37); |
4213 | | var advanceStringIndex = __webpack_require__(203); |
4214 | | var regExpExec = __webpack_require__(204); |
4215 | | |
4216 | | // @@match logic |
4217 | | __webpack_require__(205)('match', 1, function (defined, MATCH, $match, maybeCallNative) { |
4218 | | return [ |
4219 | | // `String.prototype.match` method |
4220 | | // https://tc39.github.io/ecma262/#sec-string.prototype.match |
4221 | | function match(regexp) { |
4222 | | var O = defined(this); |
4223 | | var fn = regexp == undefined ? undefined : regexp[MATCH]; |
4224 | | return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); |
4225 | | }, |
4226 | | // `RegExp.prototype[@@match]` method |
4227 | | // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match |
4228 | | function (regexp) { |
4229 | | var res = maybeCallNative($match, regexp, this); |
4230 | | if (res.done) return res.value; |
4231 | | var rx = anObject(regexp); |
4232 | | var S = String(this); |
4233 | | if (!rx.global) return regExpExec(rx, S); |
4234 | | var fullUnicode = rx.unicode; |
4235 | | rx.lastIndex = 0; |
4236 | | var A = []; |
4237 | | var n = 0; |
4238 | | var result; |
4239 | | while ((result = regExpExec(rx, S)) !== null) { |
4240 | | var matchStr = String(result[0]); |
4241 | | A[n] = matchStr; |
4242 | | if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); |
4243 | | n++; |
4244 | | } |
4245 | | return n === 0 ? null : A; |
4246 | | } |
4247 | | ]; |
4248 | | }); |
4249 | | |
4250 | | |
4251 | | /***/ }), |
4252 | | /* 203 */ |
4253 | | /***/ (function(module, exports, __webpack_require__) { |
4254 | | |
4255 | | 'use strict'; |
4256 | | var at = __webpack_require__(127)(true); |
4257 | | |
4258 | | // `AdvanceStringIndex` abstract operation |
4259 | | // https://tc39.github.io/ecma262/#sec-advancestringindex |
4260 | | module.exports = function (S, index, unicode) { |
4261 | | return index + (unicode ? at(S, index).length : 1); |
4262 | | }; |
4263 | | |
4264 | | |
4265 | | /***/ }), |
4266 | | /* 204 */ |
4267 | | /***/ (function(module, exports, __webpack_require__) { |
4268 | | |
4269 | | 'use strict'; |
4270 | | |
4271 | | var classof = __webpack_require__(74); |
4272 | | var builtinExec = RegExp.prototype.exec; |
4273 | | |
4274 | | // `RegExpExec` abstract operation |
4275 | | // https://tc39.github.io/ecma262/#sec-regexpexec |
4276 | | module.exports = function (R, S) { |
4277 | | var exec = R.exec; |
4278 | | if (typeof exec === 'function') { |
4279 | | var result = exec.call(R, S); |
4280 | | if (typeof result !== 'object') { |
4281 | | throw new TypeError('RegExp exec method returned something other than an Object or null'); |
4282 | | } |
4283 | | return result; |
4284 | | } |
4285 | | if (classof(R) !== 'RegExp') { |
4286 | | throw new TypeError('RegExp#exec called on incompatible receiver'); |
4287 | | } |
4288 | | return builtinExec.call(R, S); |
4289 | | }; |
4290 | | |
4291 | | |
4292 | | /***/ }), |
4293 | | /* 205 */ |
4294 | | /***/ (function(module, exports, __webpack_require__) { |
4295 | | |
4296 | | 'use strict'; |
4297 | | __webpack_require__(198); |
4298 | | var redefine = __webpack_require__(18); |
4299 | | var hide = __webpack_require__(10); |
4300 | | var fails = __webpack_require__(7); |
4301 | | var defined = __webpack_require__(35); |
4302 | | var wks = __webpack_require__(26); |
4303 | | var regexpExec = __webpack_require__(199); |
4304 | | |
4305 | | var SPECIES = wks('species'); |
4306 | | |
4307 | | var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { |
4308 | | // #replace needs built-in support for named groups. |
4309 | | // #match works fine because it just return the exec results, even if it has |
4310 | | // a "grops" property. |
4311 | | var re = /./; |
4312 | | re.exec = function () { |
4313 | | var result = []; |
4314 | | result.groups = { a: '7' }; |
4315 | | return result; |
4316 | | }; |
4317 | | return ''.replace(re, '$<a>') !== '7'; |
4318 | | }); |
4319 | | |
4320 | | var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { |
4321 | | // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec |
4322 | | var re = /(?:)/; |
4323 | | var originalExec = re.exec; |
4324 | | re.exec = function () { return originalExec.apply(this, arguments); }; |
4325 | | var result = 'ab'.split(re); |
4326 | | return result.length === 2 && result[0] === 'a' && result[1] === 'b'; |
4327 | | })(); |
4328 | | |
4329 | | module.exports = function (KEY, length, exec) { |
4330 | | var SYMBOL = wks(KEY); |
4331 | | |
4332 | | var DELEGATES_TO_SYMBOL = !fails(function () { |
4333 | | // String methods call symbol-named RegEp methods |
4334 | | var O = {}; |
4335 | | O[SYMBOL] = function () { return 7; }; |
4336 | | return ''[KEY](O) != 7; |
4337 | | }); |
4338 | | |
4339 | | var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { |
4340 | | // Symbol-named RegExp methods call .exec |
4341 | | var execCalled = false; |
4342 | | var re = /a/; |
4343 | | re.exec = function () { execCalled = true; return null; }; |
4344 | | if (KEY === 'split') { |
4345 | | // RegExp[@@split] doesn't call the regex's exec method, but first creates |
4346 | | // a new one. We need to return the patched regex when creating the new one. |
4347 | | re.constructor = {}; |
4348 | | re.constructor[SPECIES] = function () { return re; }; |
4349 | | } |
4350 | | re[SYMBOL](''); |
4351 | | return !execCalled; |
4352 | | }) : undefined; |
4353 | | |
4354 | | if ( |
4355 | | !DELEGATES_TO_SYMBOL || |
4356 | | !DELEGATES_TO_EXEC || |
4357 | | (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || |
4358 | | (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) |
4359 | | ) { |
4360 | | var nativeRegExpMethod = /./[SYMBOL]; |
4361 | | var fns = exec( |
4362 | | defined, |
4363 | | SYMBOL, |
4364 | | ''[KEY], |
4365 | | function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { |
4366 | | if (regexp.exec === regexpExec) { |
4367 | | if (DELEGATES_TO_SYMBOL && !forceStringMethod) { |
4368 | | // The native String method already delegates to @@method (this |
4369 | | // polyfilled function), leasing to infinite recursion. |
4370 | | // We avoid it by directly calling the native @@method method. |
4371 | | return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; |
4372 | | } |
4373 | | return { done: true, value: nativeMethod.call(str, regexp, arg2) }; |
4374 | | } |
4375 | | return { done: false }; |
4376 | | } |
4377 | | ); |
4378 | | var strfn = fns[0]; |
4379 | | var rxfn = fns[1]; |
4380 | | |
4381 | | redefine(String.prototype, KEY, strfn); |
4382 | | hide(RegExp.prototype, SYMBOL, length == 2 |
4383 | | // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) |
4384 | | // 21.2.5.11 RegExp.prototype[@@split](string, limit) |
4385 | | ? function (string, arg) { return rxfn.call(string, this, arg); } |
4386 | | // 21.2.5.6 RegExp.prototype[@@match](string) |
4387 | | // 21.2.5.9 RegExp.prototype[@@search](string) |
4388 | | : function (string) { return rxfn.call(string, this); } |
4389 | | ); |
4390 | | } |
4391 | | }; |
4392 | | |
4393 | | |
4394 | | /***/ }), |
4395 | | /* 206 */ |
4396 | | /***/ (function(module, exports, __webpack_require__) { |
4397 | | |
4398 | | 'use strict'; |
4399 | | |
4400 | | var anObject = __webpack_require__(12); |
4401 | | var toObject = __webpack_require__(57); |
4402 | | var toLength = __webpack_require__(37); |
4403 | | var toInteger = __webpack_require__(38); |
4404 | | var advanceStringIndex = __webpack_require__(203); |
4405 | | var regExpExec = __webpack_require__(204); |
4406 | | var max = Math.max; |
4407 | | var min = Math.min; |
4408 | | var floor = Math.floor; |
4409 | | var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; |
4410 | | var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; |
4411 | | |
4412 | | var maybeToString = function (it) { |
4413 | | return it === undefined ? it : String(it); |
4414 | | }; |
4415 | | |
4416 | | // @@replace logic |
4417 | | __webpack_require__(205)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { |
4418 | | return [ |
4419 | | // `String.prototype.replace` method |
4420 | | // https://tc39.github.io/ecma262/#sec-string.prototype.replace |
4421 | | function replace(searchValue, replaceValue) { |
4422 | | var O = defined(this); |
4423 | | var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; |
4424 | | return fn !== undefined |
4425 | | ? fn.call(searchValue, O, replaceValue) |
4426 | | : $replace.call(String(O), searchValue, replaceValue); |
4427 | | }, |
4428 | | // `RegExp.prototype[@@replace]` method |
4429 | | // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace |
4430 | | function (regexp, replaceValue) { |
4431 | | var res = maybeCallNative($replace, regexp, this, replaceValue); |
4432 | | if (res.done) return res.value; |
4433 | | |
4434 | | var rx = anObject(regexp); |
4435 | | var S = String(this); |
4436 | | var functionalReplace = typeof replaceValue === 'function'; |
4437 | | if (!functionalReplace) replaceValue = String(replaceValue); |
4438 | | var global = rx.global; |
4439 | | if (global) { |
4440 | | var fullUnicode = rx.unicode; |
4441 | | rx.lastIndex = 0; |
4442 | | } |
4443 | | var results = []; |
4444 | | while (true) { |
4445 | | var result = regExpExec(rx, S); |
4446 | | if (result === null) break; |
4447 | | results.push(result); |
4448 | | if (!global) break; |
4449 | | var matchStr = String(result[0]); |
4450 | | if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); |
4451 | | } |
4452 | | var accumulatedResult = ''; |
4453 | | var nextSourcePosition = 0; |
4454 | | for (var i = 0; i < results.length; i++) { |
4455 | | result = results[i]; |
4456 | | var matched = String(result[0]); |
4457 | | var position = max(min(toInteger(result.index), S.length), 0); |
4458 | | var captures = []; |
4459 | | // NOTE: This is equivalent to |
4460 | | // captures = result.slice(1).map(maybeToString) |
4461 | | // but for some reason `nativeSlice.call(result, 1, result.length)` (called in |
4462 | | // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and |
4463 | | // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. |
4464 | | for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); |
4465 | | var namedCaptures = result.groups; |
4466 | | if (functionalReplace) { |
4467 | | var replacerArgs = [matched].concat(captures, position, S); |
4468 | | if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); |
4469 | | var replacement = String(replaceValue.apply(undefined, replacerArgs)); |
4470 | | } else { |
4471 | | replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); |
4472 | | } |
4473 | | if (position >= nextSourcePosition) { |
4474 | | accumulatedResult += S.slice(nextSourcePosition, position) + replacement; |
4475 | | nextSourcePosition = position + matched.length; |
4476 | | } |
4477 | | } |
4478 | | return accumulatedResult + S.slice(nextSourcePosition); |
4479 | | } |
4480 | | ]; |
4481 | | |
4482 | | // https://tc39.github.io/ecma262/#sec-getsubstitution |
4483 | | function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { |
4484 | | var tailPos = position + matched.length; |
4485 | | var m = captures.length; |
4486 | | var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; |
4487 | | if (namedCaptures !== undefined) { |
4488 | | namedCaptures = toObject(namedCaptures); |
4489 | | symbols = SUBSTITUTION_SYMBOLS; |
4490 | | } |
4491 | | return $replace.call(replacement, symbols, function (match, ch) { |
4492 | | var capture; |
4493 | | switch (ch.charAt(0)) { |
4494 | | case '$': return '$'; |
4495 | | case '&': return matched; |
4496 | | case '`': return str.slice(0, position); |
4497 | | case "'": return str.slice(tailPos); |
4498 | | case '<': |
4499 | | capture = namedCaptures[ch.slice(1, -1)]; |
4500 | | break; |
4501 | | default: // \d\d? |
4502 | | var n = +ch; |
4503 | | if (n === 0) return ch; |
4504 | | if (n > m) { |
4505 | | var f = floor(n / 10); |
4506 | | if (f === 0) return ch; |
4507 | | if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); |
4508 | | return ch; |
4509 | | } |
4510 | | capture = captures[n - 1]; |
4511 | | } |
4512 | | return capture === undefined ? '' : capture; |
4513 | | }); |
4514 | | } |
4515 | | }); |
4516 | | |
4517 | | |
4518 | | /***/ }), |
4519 | | /* 207 */ |
4520 | | /***/ (function(module, exports, __webpack_require__) { |
4521 | | |
4522 | | 'use strict'; |
4523 | | |
4524 | | var anObject = __webpack_require__(12); |
4525 | | var sameValue = __webpack_require__(70); |
4526 | | var regExpExec = __webpack_require__(204); |
4527 | | |
4528 | | // @@search logic |
4529 | | __webpack_require__(205)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { |
4530 | | return [ |
4531 | | // `String.prototype.search` method |
4532 | | // https://tc39.github.io/ecma262/#sec-string.prototype.search |
4533 | | function search(regexp) { |
4534 | | var O = defined(this); |
4535 | | var fn = regexp == undefined ? undefined : regexp[SEARCH]; |
4536 | | return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); |
4537 | | }, |
4538 | | // `RegExp.prototype[@@search]` method |
4539 | | // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search |
4540 | | function (regexp) { |
4541 | | var res = maybeCallNative($search, regexp, this); |
4542 | | if (res.done) return res.value; |
4543 | | var rx = anObject(regexp); |
4544 | | var S = String(this); |
4545 | | var previousLastIndex = rx.lastIndex; |
4546 | | if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; |
4547 | | var result = regExpExec(rx, S); |
4548 | | if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; |
4549 | | return result === null ? -1 : result.index; |
4550 | | } |
4551 | | ]; |
4552 | | }); |
4553 | | |
4554 | | |
4555 | | /***/ }), |
4556 | | /* 208 */ |
4557 | | /***/ (function(module, exports, __webpack_require__) { |
4558 | | |
4559 | | 'use strict'; |
4560 | | |
4561 | | var isRegExp = __webpack_require__(134); |
4562 | | var anObject = __webpack_require__(12); |
4563 | | var speciesConstructor = __webpack_require__(209); |
4564 | | var advanceStringIndex = __webpack_require__(203); |
4565 | | var toLength = __webpack_require__(37); |
4566 | | var callRegExpExec = __webpack_require__(204); |
4567 | | var regexpExec = __webpack_require__(199); |
4568 | | var $min = Math.min; |
4569 | | var $push = [].push; |
4570 | | var $SPLIT = 'split'; |
4571 | | var LENGTH = 'length'; |
4572 | | var LAST_INDEX = 'lastIndex'; |
4573 | | |
4574 | | // eslint-disable-next-line no-empty |
4575 | | var SUPPORTS_Y = !!(function () { try { return new RegExp('x', 'y'); } catch (e) {} })(); |
4576 | | |
4577 | | // @@split logic |
4578 | | __webpack_require__(205)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { |
4579 | | var internalSplit = $split; |
4580 | | if ( |
4581 | | 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || |
4582 | | 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || |
4583 | | 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || |
4584 | | '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || |
4585 | | '.'[$SPLIT](/()()/)[LENGTH] > 1 || |
4586 | | ''[$SPLIT](/.?/)[LENGTH] |
4587 | | ) { |
4588 | | // based on es5-shim implementation, need to rework it |
4589 | | internalSplit = function (separator, limit) { |
4590 | | var string = String(this); |
4591 | | if (separator === undefined && limit === 0) return []; |
4592 | | // If `separator` is not a regex, use native split |
4593 | | if (!isRegExp(separator)) return $split.call(string, separator, limit); |
4594 | | var output = []; |
4595 | | var flags = (separator.ignoreCase ? 'i' : '') + |
4596 | | (separator.multiline ? 'm' : '') + |
4597 | | (separator.unicode ? 'u' : '') + |
4598 | | (separator.sticky ? 'y' : ''); |
4599 | | var lastLastIndex = 0; |
4600 | | var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; |
4601 | | // Make `global` and avoid `lastIndex` issues by working with a copy |
4602 | | var separatorCopy = new RegExp(separator.source, flags + 'g'); |
4603 | | var match, lastIndex, lastLength; |
4604 | | while (match = regexpExec.call(separatorCopy, string)) { |
4605 | | lastIndex = separatorCopy[LAST_INDEX]; |
4606 | | if (lastIndex > lastLastIndex) { |
4607 | | output.push(string.slice(lastLastIndex, match.index)); |
4608 | | if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); |
4609 | | lastLength = match[0][LENGTH]; |
4610 | | lastLastIndex = lastIndex; |
4611 | | if (output[LENGTH] >= splitLimit) break; |
4612 | | } |
4613 | | if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop |
4614 | | } |
4615 | | if (lastLastIndex === string[LENGTH]) { |
4616 | | if (lastLength || !separatorCopy.test('')) output.push(''); |
4617 | | } else output.push(string.slice(lastLastIndex)); |
4618 | | return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; |
4619 | | }; |
4620 | | // Chakra, V8 |
4621 | | } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { |
4622 | | internalSplit = function (separator, limit) { |
4623 | | return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); |
4624 | | }; |
4625 | | } |
4626 | | |
4627 | | return [ |
4628 | | // `String.prototype.split` method |
4629 | | // https://tc39.github.io/ecma262/#sec-string.prototype.split |
4630 | | function split(separator, limit) { |
4631 | | var O = defined(this); |
4632 | | var splitter = separator == undefined ? undefined : separator[SPLIT]; |
4633 | | return splitter !== undefined |
4634 | | ? splitter.call(separator, O, limit) |
4635 | | : internalSplit.call(String(O), separator, limit); |
4636 | | }, |
4637 | | // `RegExp.prototype[@@split]` method |
4638 | | // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split |
4639 | | // |
4640 | | // NOTE: This cannot be properly polyfilled in engines that don't support |
4641 | | // the 'y' flag. |
4642 | | function (regexp, limit) { |
4643 | | var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); |
4644 | | if (res.done) return res.value; |
4645 | | |
4646 | | var rx = anObject(regexp); |
4647 | | var S = String(this); |
4648 | | var C = speciesConstructor(rx, RegExp); |
4649 | | |
4650 | | var unicodeMatching = rx.unicode; |
4651 | | var flags = (rx.ignoreCase ? 'i' : '') + |
4652 | | (rx.multiline ? 'm' : '') + |
4653 | | (rx.unicode ? 'u' : '') + |
4654 | | (SUPPORTS_Y ? 'y' : 'g'); |
4655 | | |
4656 | | // ^(? + rx + ) is needed, in combination with some S slicing, to |
4657 | | // simulate the 'y' flag. |
4658 | | var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); |
4659 | | var lim = limit === undefined ? 0xffffffff : limit >>> 0; |
4660 | | if (lim === 0) return []; |
4661 | | if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; |
4662 | | var p = 0; |
4663 | | var q = 0; |
4664 | | var A = []; |
4665 | | while (q < S.length) { |
4666 | | splitter.lastIndex = SUPPORTS_Y ? q : 0; |
4667 | | var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); |
4668 | | var e; |
4669 | | if ( |
4670 | | z === null || |
4671 | | (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p |
4672 | | ) { |
4673 | | q = advanceStringIndex(S, q, unicodeMatching); |
4674 | | } else { |
4675 | | A.push(S.slice(p, q)); |
4676 | | if (A.length === lim) return A; |
4677 | | for (var i = 1; i <= z.length - 1; i++) { |
4678 | | A.push(z[i]); |
4679 | | if (A.length === lim) return A; |
4680 | | } |
4681 | | q = p = e; |
4682 | | } |
4683 | | } |
4684 | | A.push(S.slice(p)); |
4685 | | return A; |
4686 | | } |
4687 | | ]; |
4688 | | }); |
4689 | | |
4690 | | |
4691 | | /***/ }), |
4692 | | /* 209 */ |
4693 | | /***/ (function(module, exports, __webpack_require__) { |
4694 | | |
4695 | | // 7.3.20 SpeciesConstructor(O, defaultConstructor) |
4696 | | var anObject = __webpack_require__(12); |
4697 | | var aFunction = __webpack_require__(21); |
4698 | | var SPECIES = __webpack_require__(26)('species'); |
4699 | | module.exports = function (O, D) { |
4700 | | var C = anObject(O).constructor; |
4701 | | var S; |
4702 | | return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); |
4703 | | }; |
4704 | | |
4705 | | |
4706 | | /***/ }), |
4707 | | /* 210 */ |
4708 | | /***/ (function(module, exports, __webpack_require__) { |
4709 | | |
4710 | | 'use strict'; |
4711 | | var LIBRARY = __webpack_require__(24); |
4712 | | var global = __webpack_require__(4); |
4713 | | var ctx = __webpack_require__(20); |
4714 | | var classof = __webpack_require__(74); |
4715 | | var $export = __webpack_require__(8); |
4716 | | var isObject = __webpack_require__(13); |
4717 | | var aFunction = __webpack_require__(21); |
4718 | | var anInstance = __webpack_require__(211); |
4719 | | var forOf = __webpack_require__(212); |
4720 | | var speciesConstructor = __webpack_require__(209); |
4721 | | var task = __webpack_require__(213).set; |
4722 | | var microtask = __webpack_require__(214)(); |
4723 | | var newPromiseCapabilityModule = __webpack_require__(215); |
4724 | | var perform = __webpack_require__(216); |
4725 | | var userAgent = __webpack_require__(217); |
4726 | | var promiseResolve = __webpack_require__(218); |
4727 | | var PROMISE = 'Promise'; |
4728 | | var TypeError = global.TypeError; |
4729 | | var process = global.process; |
4730 | | var versions = process && process.versions; |
4731 | | var v8 = versions && versions.v8 || ''; |
4732 | | var $Promise = global[PROMISE]; |
4733 | | var isNode = classof(process) == 'process'; |
4734 | | var empty = function () { /* empty */ }; |
4735 | | var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; |
4736 | | var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; |
4737 | | |
4738 | | var USE_NATIVE = !!function () { |
4739 | | try { |
4740 | | // correct subclassing with @@species support |
4741 | | var promise = $Promise.resolve(1); |
4742 | | var FakePromise = (promise.constructor = {})[__webpack_require__(26)('species')] = function (exec) { |
4743 | | exec(empty, empty); |
4744 | | }; |
4745 | | // unhandled rejections tracking support, NodeJS Promise without it fails @@species test |
4746 | | return (isNode || typeof PromiseRejectionEvent == 'function') |
4747 | | && promise.then(empty) instanceof FakePromise |
4748 | | // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables |
4749 | | // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 |
4750 | | // we can't detect it synchronously, so just check versions |
4751 | | && v8.indexOf('6.6') !== 0 |
4752 | | && userAgent.indexOf('Chrome/66') === -1; |
4753 | | } catch (e) { /* empty */ } |
4754 | | }(); |
4755 | | |
4756 | | // helpers |
4757 | | var isThenable = function (it) { |
4758 | | var then; |
4759 | | return isObject(it) && typeof (then = it.then) == 'function' ? then : false; |
4760 | | }; |
4761 | | var notify = function (promise, isReject) { |
4762 | | if (promise._n) return; |
4763 | | promise._n = true; |
4764 | | var chain = promise._c; |
4765 | | microtask(function () { |
4766 | | var value = promise._v; |
4767 | | var ok = promise._s == 1; |
4768 | | var i = 0; |
4769 | | var run = function (reaction) { |
4770 | | var handler = ok ? reaction.ok : reaction.fail; |
4771 | | var resolve = reaction.resolve; |
4772 | | var reject = reaction.reject; |
4773 | | var domain = reaction.domain; |
4774 | | var result, then, exited; |
4775 | | try { |
4776 | | if (handler) { |
4777 | | if (!ok) { |
4778 | | if (promise._h == 2) onHandleUnhandled(promise); |
4779 | | promise._h = 1; |
4780 | | } |
4781 | | if (handler === true) result = value; |
4782 | | else { |
4783 | | if (domain) domain.enter(); |
4784 | | result = handler(value); // may throw |
4785 | | if (domain) { |
4786 | | domain.exit(); |
4787 | | exited = true; |
4788 | | } |
4789 | | } |
4790 | | if (result === reaction.promise) { |
4791 | | reject(TypeError('Promise-chain cycle')); |
4792 | | } else if (then = isThenable(result)) { |
4793 | | then.call(result, resolve, reject); |
4794 | | } else resolve(result); |
4795 | | } else reject(value); |
4796 | | } catch (e) { |
4797 | | if (domain && !exited) domain.exit(); |
4798 | | reject(e); |
4799 | | } |
4800 | | }; |
4801 | | while (chain.length > i) run(chain[i++]); // variable length - can't use forEach |
4802 | | promise._c = []; |
4803 | | promise._n = false; |
4804 | | if (isReject && !promise._h) onUnhandled(promise); |
4805 | | }); |
4806 | | }; |
4807 | | var onUnhandled = function (promise) { |
4808 | | task.call(global, function () { |
4809 | | var value = promise._v; |
4810 | | var unhandled = isUnhandled(promise); |
4811 | | var result, handler, console; |
4812 | | if (unhandled) { |
4813 | | result = perform(function () { |
4814 | | if (isNode) { |
4815 | | process.emit('unhandledRejection', value, promise); |
4816 | | } else if (handler = global.onunhandledrejection) { |
4817 | | handler({ promise: promise, reason: value }); |
4818 | | } else if ((console = global.console) && console.error) { |
4819 | | console.error('Unhandled promise rejection', value); |
4820 | | } |
4821 | | }); |
4822 | | // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should |
4823 | | promise._h = isNode || isUnhandled(promise) ? 2 : 1; |
4824 | | } promise._a = undefined; |
4825 | | if (unhandled && result.e) throw result.v; |
4826 | | }); |
4827 | | }; |
4828 | | var isUnhandled = function (promise) { |
4829 | | return promise._h !== 1 && (promise._a || promise._c).length === 0; |
4830 | | }; |
4831 | | var onHandleUnhandled = function (promise) { |
4832 | | task.call(global, function () { |
4833 | | var handler; |
4834 | | if (isNode) { |
4835 | | process.emit('rejectionHandled', promise); |
4836 | | } else if (handler = global.onrejectionhandled) { |
4837 | | handler({ promise: promise, reason: promise._v }); |
4838 | | } |
4839 | | }); |
4840 | | }; |
4841 | | var $reject = function (value) { |
4842 | | var promise = this; |
4843 | | if (promise._d) return; |
4844 | | promise._d = true; |
4845 | | promise = promise._w || promise; // unwrap |
4846 | | promise._v = value; |
4847 | | promise._s = 2; |
4848 | | if (!promise._a) promise._a = promise._c.slice(); |
4849 | | notify(promise, true); |
4850 | | }; |
4851 | | var $resolve = function (value) { |
4852 | | var promise = this; |
4853 | | var then; |
4854 | | if (promise._d) return; |
4855 | | promise._d = true; |
4856 | | promise = promise._w || promise; // unwrap |
4857 | | try { |
4858 | | if (promise === value) throw TypeError("Promise can't be resolved itself"); |
4859 | | if (then = isThenable(value)) { |
4860 | | microtask(function () { |
4861 | | var wrapper = { _w: promise, _d: false }; // wrap |
4862 | | try { |
4863 | | then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); |
4864 | | } catch (e) { |
4865 | | $reject.call(wrapper, e); |
4866 | | } |
4867 | | }); |
4868 | | } else { |
4869 | | promise._v = value; |
4870 | | promise._s = 1; |
4871 | | notify(promise, false); |
4872 | | } |
4873 | | } catch (e) { |
4874 | | $reject.call({ _w: promise, _d: false }, e); // wrap |
4875 | | } |
4876 | | }; |
4877 | | |
4878 | | // constructor polyfill |
4879 | | if (!USE_NATIVE) { |
4880 | | // 25.4.3.1 Promise(executor) |
4881 | | $Promise = function Promise(executor) { |
4882 | | anInstance(this, $Promise, PROMISE, '_h'); |
4883 | | aFunction(executor); |
4884 | | Internal.call(this); |
4885 | | try { |
4886 | | executor(ctx($resolve, this, 1), ctx($reject, this, 1)); |
4887 | | } catch (err) { |
4888 | | $reject.call(this, err); |
4889 | | } |
4890 | | }; |
4891 | | // eslint-disable-next-line no-unused-vars |
4892 | | Internal = function Promise(executor) { |
4893 | | this._c = []; // <- awaiting reactions |
4894 | | this._a = undefined; // <- checked in isUnhandled reactions |
4895 | | this._s = 0; // <- state |
4896 | | this._d = false; // <- done |
4897 | | this._v = undefined; // <- value |
4898 | | this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled |
4899 | | this._n = false; // <- notify |
4900 | | }; |
4901 | | Internal.prototype = __webpack_require__(219)($Promise.prototype, { |
4902 | | // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) |
4903 | | then: function then(onFulfilled, onRejected) { |
4904 | | var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); |
4905 | | reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; |
4906 | | reaction.fail = typeof onRejected == 'function' && onRejected; |
4907 | | reaction.domain = isNode ? process.domain : undefined; |
4908 | | this._c.push(reaction); |
4909 | | if (this._a) this._a.push(reaction); |
4910 | | if (this._s) notify(this, false); |
4911 | | return reaction.promise; |
4912 | | }, |
4913 | | // 25.4.5.1 Promise.prototype.catch(onRejected) |
4914 | | 'catch': function (onRejected) { |
4915 | | return this.then(undefined, onRejected); |
4916 | | } |
4917 | | }); |
4918 | | OwnPromiseCapability = function () { |
4919 | | var promise = new Internal(); |
4920 | | this.promise = promise; |
4921 | | this.resolve = ctx($resolve, promise, 1); |
4922 | | this.reject = ctx($reject, promise, 1); |
4923 | | }; |
4924 | | newPromiseCapabilityModule.f = newPromiseCapability = function (C) { |
4925 | | return C === $Promise || C === Wrapper |
4926 | | ? new OwnPromiseCapability(C) |
4927 | | : newGenericPromiseCapability(C); |
4928 | | }; |
4929 | | } |
4930 | | |
4931 | | $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); |
4932 | | __webpack_require__(25)($Promise, PROMISE); |
4933 | | __webpack_require__(193)(PROMISE); |
4934 | | Wrapper = __webpack_require__(9)[PROMISE]; |
4935 | | |
4936 | | // statics |
4937 | | $export($export.S + $export.F * !USE_NATIVE, PROMISE, { |
4938 | | // 25.4.4.5 Promise.reject(r) |
4939 | | reject: function reject(r) { |
4940 | | var capability = newPromiseCapability(this); |
4941 | | var $$reject = capability.reject; |
4942 | | $$reject(r); |
4943 | | return capability.promise; |
4944 | | } |
4945 | | }); |
4946 | | $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { |
4947 | | // 25.4.4.6 Promise.resolve(x) |
4948 | | resolve: function resolve(x) { |
4949 | | return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); |
4950 | | } |
4951 | | }); |
4952 | | $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(166)(function (iter) { |
4953 | | $Promise.all(iter)['catch'](empty); |
4954 | | })), PROMISE, { |
4955 | | // 25.4.4.1 Promise.all(iterable) |
4956 | | all: function all(iterable) { |
4957 | | var C = this; |
4958 | | var capability = newPromiseCapability(C); |
4959 | | var resolve = capability.resolve; |
4960 | | var reject = capability.reject; |
4961 | | var result = perform(function () { |
4962 | | var values = []; |
4963 | | var index = 0; |
4964 | | var remaining = 1; |
4965 | | forOf(iterable, false, function (promise) { |
4966 | | var $index = index++; |
4967 | | var alreadyCalled = false; |
4968 | | values.push(undefined); |
4969 | | remaining++; |
4970 | | C.resolve(promise).then(function (value) { |
4971 | | if (alreadyCalled) return; |
4972 | | alreadyCalled = true; |
4973 | | values[$index] = value; |
4974 | | --remaining || resolve(values); |
4975 | | }, reject); |
4976 | | }); |
4977 | | --remaining || resolve(values); |
4978 | | }); |
4979 | | if (result.e) reject(result.v); |
4980 | | return capability.promise; |
4981 | | }, |
4982 | | // 25.4.4.4 Promise.race(iterable) |
4983 | | race: function race(iterable) { |
4984 | | var C = this; |
4985 | | var capability = newPromiseCapability(C); |
4986 | | var reject = capability.reject; |
4987 | | var result = perform(function () { |
4988 | | forOf(iterable, false, function (promise) { |
4989 | | C.resolve(promise).then(capability.resolve, reject); |
4990 | | }); |
4991 | | }); |
4992 | | if (result.e) reject(result.v); |
4993 | | return capability.promise; |
4994 | | } |
4995 | | }); |
4996 | | |
4997 | | |
4998 | | /***/ }), |
4999 | | /* 211 */ |
5000 | | /***/ (function(module, exports) { |
5001 | | |
5002 | | module.exports = function (it, Constructor, name, forbiddenField) { |
5003 | | if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { |
5004 | | throw TypeError(name + ': incorrect invocation!'); |
5005 | | } return it; |
5006 | | }; |
5007 | | |
5008 | | |
5009 | | /***/ }), |
5010 | | /* 212 */ |
5011 | | /***/ (function(module, exports, __webpack_require__) { |
5012 | | |
5013 | | var ctx = __webpack_require__(20); |
5014 | | var call = __webpack_require__(162); |
5015 | | var isArrayIter = __webpack_require__(163); |
5016 | | var anObject = __webpack_require__(12); |
5017 | | var toLength = __webpack_require__(37); |
5018 | | var getIterFn = __webpack_require__(165); |
5019 | | var BREAK = {}; |
5020 | | var RETURN = {}; |
5021 | | var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { |
5022 | | var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); |
5023 | | var f = ctx(fn, that, entries ? 2 : 1); |
5024 | | var index = 0; |
5025 | | var length, step, iterator, result; |
5026 | | if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); |
5027 | | // fast case for arrays with default iterator |
5028 | | if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { |
5029 | | result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); |
5030 | | if (result === BREAK || result === RETURN) return result; |
5031 | | } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { |
5032 | | result = call(iterator, f, step.value, entries); |
5033 | | if (result === BREAK || result === RETURN) return result; |
5034 | | } |
5035 | | }; |
5036 | | exports.BREAK = BREAK; |
5037 | | exports.RETURN = RETURN; |
5038 | | |
5039 | | |
5040 | | /***/ }), |
5041 | | /* 213 */ |
5042 | | /***/ (function(module, exports, __webpack_require__) { |
5043 | | |
5044 | | var ctx = __webpack_require__(20); |
5045 | | var invoke = __webpack_require__(77); |
5046 | | var html = __webpack_require__(47); |
5047 | | var cel = __webpack_require__(15); |
5048 | | var global = __webpack_require__(4); |
5049 | | var process = global.process; |
5050 | | var setTask = global.setImmediate; |
5051 | | var clearTask = global.clearImmediate; |
5052 | | var MessageChannel = global.MessageChannel; |
5053 | | var Dispatch = global.Dispatch; |
5054 | | var counter = 0; |
5055 | | var queue = {}; |
5056 | | var ONREADYSTATECHANGE = 'onreadystatechange'; |
5057 | | var defer, channel, port; |
5058 | | var run = function () { |
5059 | | var id = +this; |
5060 | | // eslint-disable-next-line no-prototype-builtins |
5061 | | if (queue.hasOwnProperty(id)) { |
5062 | | var fn = queue[id]; |
5063 | | delete queue[id]; |
5064 | | fn(); |
5065 | | } |
5066 | | }; |
5067 | | var listener = function (event) { |
5068 | | run.call(event.data); |
5069 | | }; |
5070 | | // Node.js 0.9+ & IE10+ has setImmediate, otherwise: |
5071 | | if (!setTask || !clearTask) { |
5072 | | setTask = function setImmediate(fn) { |
5073 | | var args = []; |
5074 | | var i = 1; |
5075 | | while (arguments.length > i) args.push(arguments[i++]); |
5076 | | queue[++counter] = function () { |
5077 | | // eslint-disable-next-line no-new-func |
5078 | | invoke(typeof fn == 'function' ? fn : Function(fn), args); |
5079 | | }; |
5080 | | defer(counter); |
5081 | | return counter; |
5082 | | }; |
5083 | | clearTask = function clearImmediate(id) { |
5084 | | delete queue[id]; |
5085 | | }; |
5086 | | // Node.js 0.8- |
5087 | | if (__webpack_require__(34)(process) == 'process') { |
5088 | | defer = function (id) { |
5089 | | process.nextTick(ctx(run, id, 1)); |
5090 | | }; |
5091 | | // Sphere (JS game engine) Dispatch API |
5092 | | } else if (Dispatch && Dispatch.now) { |
5093 | | defer = function (id) { |
5094 | | Dispatch.now(ctx(run, id, 1)); |
5095 | | }; |
5096 | | // Browsers with MessageChannel, includes WebWorkers |
5097 | | } else if (MessageChannel) { |
5098 | | channel = new MessageChannel(); |
5099 | | port = channel.port2; |
5100 | | channel.port1.onmessage = listener; |
5101 | | defer = ctx(port.postMessage, port, 1); |
5102 | | // Browsers with postMessage, skip WebWorkers |
5103 | | // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' |
5104 | | } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { |
5105 | | defer = function (id) { |
5106 | | global.postMessage(id + '', '*'); |
5107 | | }; |
5108 | | global.addEventListener('message', listener, false); |
5109 | | // IE8- |
5110 | | } else if (ONREADYSTATECHANGE in cel('script')) { |
5111 | | defer = function (id) { |
5112 | | html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { |
5113 | | html.removeChild(this); |
5114 | | run.call(id); |
5115 | | }; |
5116 | | }; |
5117 | | // Rest old browsers |
5118 | | } else { |
5119 | | defer = function (id) { |
5120 | | setTimeout(ctx(run, id, 1), 0); |
5121 | | }; |
5122 | | } |
5123 | | } |
5124 | | module.exports = { |
5125 | | set: setTask, |
5126 | | clear: clearTask |
5127 | | }; |
5128 | | |
5129 | | |
5130 | | /***/ }), |
5131 | | /* 214 */ |
5132 | | /***/ (function(module, exports, __webpack_require__) { |
5133 | | |
5134 | | var global = __webpack_require__(4); |
5135 | | var macrotask = __webpack_require__(213).set; |
5136 | | var Observer = global.MutationObserver || global.WebKitMutationObserver; |
5137 | | var process = global.process; |
5138 | | var Promise = global.Promise; |
5139 | | var isNode = __webpack_require__(34)(process) == 'process'; |
5140 | | |
5141 | | module.exports = function () { |
5142 | | var head, last, notify; |
5143 | | |
5144 | | var flush = function () { |
5145 | | var parent, fn; |
5146 | | if (isNode && (parent = process.domain)) parent.exit(); |
5147 | | while (head) { |
5148 | | fn = head.fn; |
5149 | | head = head.next; |
5150 | | try { |
5151 | | fn(); |
5152 | | } catch (e) { |
5153 | | if (head) notify(); |
5154 | | else last = undefined; |
5155 | | throw e; |
5156 | | } |
5157 | | } last = undefined; |
5158 | | if (parent) parent.enter(); |
5159 | | }; |
5160 | | |
5161 | | // Node.js |
5162 | | if (isNode) { |
5163 | | notify = function () { |
5164 | | process.nextTick(flush); |
5165 | | }; |
5166 | | // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 |
5167 | | } else if (Observer && !(global.navigator && global.navigator.standalone)) { |
5168 | | var toggle = true; |
5169 | | var node = document.createTextNode(''); |
5170 | | new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new |
5171 | | notify = function () { |
5172 | | node.data = toggle = !toggle; |
5173 | | }; |
5174 | | // environments with maybe non-completely correct, but existent Promise |
5175 | | } else if (Promise && Promise.resolve) { |
5176 | | // Promise.resolve without an argument throws an error in LG WebOS 2 |
5177 | | var promise = Promise.resolve(undefined); |
5178 | | notify = function () { |
5179 | | promise.then(flush); |
5180 | | }; |
5181 | | // for other environments - macrotask based on: |
5182 | | // - setImmediate |
5183 | | // - MessageChannel |
5184 | | // - window.postMessag |
5185 | | // - onreadystatechange |
5186 | | // - setTimeout |
5187 | | } else { |
5188 | | notify = function () { |
5189 | | // strange IE + webpack dev server bug - use .call(global) |
5190 | | macrotask.call(global, flush); |
5191 | | }; |
5192 | | } |
5193 | | |
5194 | | return function (fn) { |
5195 | | var task = { fn: fn, next: undefined }; |
5196 | | if (last) last.next = task; |
5197 | | if (!head) { |
5198 | | head = task; |
5199 | | notify(); |
5200 | | } last = task; |
5201 | | }; |
5202 | | }; |
5203 | | |
5204 | | |
5205 | | /***/ }), |
5206 | | /* 215 */ |
5207 | | /***/ (function(module, exports, __webpack_require__) { |
5208 | | |
5209 | | 'use strict'; |
5210 | | // 25.4.1.5 NewPromiseCapability(C) |
5211 | | var aFunction = __webpack_require__(21); |
5212 | | |
5213 | | function PromiseCapability(C) { |
5214 | | var resolve, reject; |
5215 | | this.promise = new C(function ($$resolve, $$reject) { |
5216 | | if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); |
5217 | | resolve = $$resolve; |
5218 | | reject = $$reject; |
5219 | | }); |
5220 | | this.resolve = aFunction(resolve); |
5221 | | this.reject = aFunction(reject); |
5222 | | } |
5223 | | |
5224 | | module.exports.f = function (C) { |
5225 | | return new PromiseCapability(C); |
5226 | | }; |
5227 | | |
5228 | | |
5229 | | /***/ }), |
5230 | | /* 216 */ |
5231 | | /***/ (function(module, exports) { |
5232 | | |
5233 | | module.exports = function (exec) { |
5234 | | try { |
5235 | | return { e: false, v: exec() }; |
5236 | | } catch (e) { |
5237 | | return { e: true, v: e }; |
5238 | | } |
5239 | | }; |
5240 | | |
5241 | | |
5242 | | /***/ }), |
5243 | | /* 217 */ |
5244 | | /***/ (function(module, exports, __webpack_require__) { |
5245 | | |
5246 | | var global = __webpack_require__(4); |
5247 | | var navigator = global.navigator; |
5248 | | |
5249 | | module.exports = navigator && navigator.userAgent || ''; |
5250 | | |
5251 | | |
5252 | | /***/ }), |
5253 | | /* 218 */ |
5254 | | /***/ (function(module, exports, __webpack_require__) { |
5255 | | |
5256 | | var anObject = __webpack_require__(12); |
5257 | | var isObject = __webpack_require__(13); |
5258 | | var newPromiseCapability = __webpack_require__(215); |
5259 | | |
5260 | | module.exports = function (C, x) { |
5261 | | anObject(C); |
5262 | | if (isObject(x) && x.constructor === C) return x; |
5263 | | var promiseCapability = newPromiseCapability.f(C); |
5264 | | var resolve = promiseCapability.resolve; |
5265 | | resolve(x); |
5266 | | return promiseCapability.promise; |
5267 | | }; |
5268 | | |
5269 | | |
5270 | | /***/ }), |
5271 | | /* 219 */ |
5272 | | /***/ (function(module, exports, __webpack_require__) { |
5273 | | |
5274 | | var redefine = __webpack_require__(18); |
5275 | | module.exports = function (target, src, safe) { |
5276 | | for (var key in src) redefine(target, key, src[key], safe); |
5277 | | return target; |
5278 | | }; |
5279 | | |
5280 | | |
5281 | | /***/ }), |
5282 | | /* 220 */ |
5283 | | /***/ (function(module, exports, __webpack_require__) { |
5284 | | |
5285 | | 'use strict'; |
5286 | | var strong = __webpack_require__(221); |
5287 | | var validate = __webpack_require__(222); |
5288 | | var MAP = 'Map'; |
5289 | | |
5290 | | // 23.1 Map Objects |
5291 | | module.exports = __webpack_require__(223)(MAP, function (get) { |
5292 | | return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; |
5293 | | }, { |
5294 | | // 23.1.3.6 Map.prototype.get(key) |
5295 | | get: function get(key) { |
5296 | | var entry = strong.getEntry(validate(this, MAP), key); |
5297 | | return entry && entry.v; |
5298 | | }, |
5299 | | // 23.1.3.9 Map.prototype.set(key, value) |
5300 | | set: function set(key, value) { |
5301 | | return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); |
5302 | | } |
5303 | | }, strong, true); |
5304 | | |
5305 | | |
5306 | | /***/ }), |
5307 | | /* 221 */ |
5308 | | /***/ (function(module, exports, __webpack_require__) { |
5309 | | |
5310 | | 'use strict'; |
5311 | | var dP = __webpack_require__(11).f; |
5312 | | var create = __webpack_require__(45); |
5313 | | var redefineAll = __webpack_require__(219); |
5314 | | var ctx = __webpack_require__(20); |
5315 | | var anInstance = __webpack_require__(211); |
5316 | | var forOf = __webpack_require__(212); |
5317 | | var $iterDefine = __webpack_require__(128); |
5318 | | var step = __webpack_require__(195); |
5319 | | var setSpecies = __webpack_require__(193); |
5320 | | var DESCRIPTORS = __webpack_require__(6); |
5321 | | var fastKey = __webpack_require__(22).fastKey; |
5322 | | var validate = __webpack_require__(222); |
5323 | | var SIZE = DESCRIPTORS ? '_s' : 'size'; |
5324 | | |
5325 | | var getEntry = function (that, key) { |
5326 | | // fast case |
5327 | | var index = fastKey(key); |
5328 | | var entry; |
5329 | | if (index !== 'F') return that._i[index]; |
5330 | | // frozen object case |
5331 | | for (entry = that._f; entry; entry = entry.n) { |
5332 | | if (entry.k == key) return entry; |
5333 | | } |
5334 | | }; |
5335 | | |
5336 | | module.exports = { |
5337 | | getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { |
5338 | | var C = wrapper(function (that, iterable) { |
5339 | | anInstance(that, C, NAME, '_i'); |
5340 | | that._t = NAME; // collection type |
5341 | | that._i = create(null); // index |
5342 | | that._f = undefined; // first entry |
5343 | | that._l = undefined; // last entry |
5344 | | that[SIZE] = 0; // size |
5345 | | if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); |
5346 | | }); |
5347 | | redefineAll(C.prototype, { |
5348 | | // 23.1.3.1 Map.prototype.clear() |
5349 | | // 23.2.3.2 Set.prototype.clear() |
5350 | | clear: function clear() { |
5351 | | for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { |
5352 | | entry.r = true; |
5353 | | if (entry.p) entry.p = entry.p.n = undefined; |
5354 | | delete data[entry.i]; |
5355 | | } |
5356 | | that._f = that._l = undefined; |
5357 | | that[SIZE] = 0; |
5358 | | }, |
5359 | | // 23.1.3.3 Map.prototype.delete(key) |
5360 | | // 23.2.3.4 Set.prototype.delete(value) |
5361 | | 'delete': function (key) { |
5362 | | var that = validate(this, NAME); |
5363 | | var entry = getEntry(that, key); |
5364 | | if (entry) { |
5365 | | var next = entry.n; |
5366 | | var prev = entry.p; |
5367 | | delete that._i[entry.i]; |
5368 | | entry.r = true; |
5369 | | if (prev) prev.n = next; |
5370 | | if (next) next.p = prev; |
5371 | | if (that._f == entry) that._f = next; |
5372 | | if (that._l == entry) that._l = prev; |
5373 | | that[SIZE]--; |
5374 | | } return !!entry; |
5375 | | }, |
5376 | | // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) |
5377 | | // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) |
5378 | | forEach: function forEach(callbackfn /* , that = undefined */) { |
5379 | | validate(this, NAME); |
5380 | | var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); |
5381 | | var entry; |
5382 | | while (entry = entry ? entry.n : this._f) { |
5383 | | f(entry.v, entry.k, this); |
5384 | | // revert to the last existing entry |
5385 | | while (entry && entry.r) entry = entry.p; |
5386 | | } |
5387 | | }, |
5388 | | // 23.1.3.7 Map.prototype.has(key) |
5389 | | // 23.2.3.7 Set.prototype.has(value) |
5390 | | has: function has(key) { |
5391 | | return !!getEntry(validate(this, NAME), key); |
5392 | | } |
5393 | | }); |
5394 | | if (DESCRIPTORS) dP(C.prototype, 'size', { |
5395 | | get: function () { |
5396 | | return validate(this, NAME)[SIZE]; |
5397 | | } |
5398 | | }); |
5399 | | return C; |
5400 | | }, |
5401 | | def: function (that, key, value) { |
5402 | | var entry = getEntry(that, key); |
5403 | | var prev, index; |
5404 | | // change existing entry |
5405 | | if (entry) { |
5406 | | entry.v = value; |
5407 | | // create new entry |
5408 | | } else { |
5409 | | that._l = entry = { |
5410 | | i: index = fastKey(key, true), // <- index |
5411 | | k: key, // <- key |
5412 | | v: value, // <- value |
5413 | | p: prev = that._l, // <- previous entry |
5414 | | n: undefined, // <- next entry |
5415 | | r: false // <- removed |
5416 | | }; |
5417 | | if (!that._f) that._f = entry; |
5418 | | if (prev) prev.n = entry; |
5419 | | that[SIZE]++; |
5420 | | // add to index |
5421 | | if (index !== 'F') that._i[index] = entry; |
5422 | | } return that; |
5423 | | }, |
5424 | | getEntry: getEntry, |
5425 | | setStrong: function (C, NAME, IS_MAP) { |
5426 | | // add .keys, .values, .entries, [@@iterator] |
5427 | | // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 |
5428 | | $iterDefine(C, NAME, function (iterated, kind) { |
5429 | | this._t = validate(iterated, NAME); // target |
5430 | | this._k = kind; // kind |
5431 | | this._l = undefined; // previous |
5432 | | }, function () { |
5433 | | var that = this; |
5434 | | var kind = that._k; |
5435 | | var entry = that._l; |
5436 | | // revert to the last existing entry |
5437 | | while (entry && entry.r) entry = entry.p; |
5438 | | // get next entry |
5439 | | if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { |
5440 | | // or finish the iteration |
5441 | | that._t = undefined; |
5442 | | return step(1); |
5443 | | } |
5444 | | // return step by kind |
5445 | | if (kind == 'keys') return step(0, entry.k); |
5446 | | if (kind == 'values') return step(0, entry.v); |
5447 | | return step(0, [entry.k, entry.v]); |
5448 | | }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); |
5449 | | |
5450 | | // add [@@species], 23.1.2.2, 23.2.2.2 |
5451 | | setSpecies(NAME); |
5452 | | } |
5453 | | }; |
5454 | | |
5455 | | |
5456 | | /***/ }), |
5457 | | /* 222 */ |
5458 | | /***/ (function(module, exports, __webpack_require__) { |
5459 | | |
5460 | | var isObject = __webpack_require__(13); |
5461 | | module.exports = function (it, TYPE) { |
5462 | | if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); |
5463 | | return it; |
5464 | | }; |
5465 | | |
5466 | | |
5467 | | /***/ }), |
5468 | | /* 223 */ |
5469 | | /***/ (function(module, exports, __webpack_require__) { |
5470 | | |
5471 | | 'use strict'; |
5472 | | var global = __webpack_require__(4); |
5473 | | var $export = __webpack_require__(8); |
5474 | | var redefine = __webpack_require__(18); |
5475 | | var redefineAll = __webpack_require__(219); |
5476 | | var meta = __webpack_require__(22); |
5477 | | var forOf = __webpack_require__(212); |
5478 | | var anInstance = __webpack_require__(211); |
5479 | | var isObject = __webpack_require__(13); |
5480 | | var fails = __webpack_require__(7); |
5481 | | var $iterDetect = __webpack_require__(166); |
5482 | | var setToStringTag = __webpack_require__(25); |
5483 | | var inheritIfRequired = __webpack_require__(87); |
5484 | | |
5485 | | module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { |
5486 | | var Base = global[NAME]; |
5487 | | var C = Base; |
5488 | | var ADDER = IS_MAP ? 'set' : 'add'; |
5489 | | var proto = C && C.prototype; |
5490 | | var O = {}; |
5491 | | var fixMethod = function (KEY) { |
5492 | | var fn = proto[KEY]; |
5493 | | redefine(proto, KEY, |
5494 | | KEY == 'delete' ? function (a) { |
5495 | | return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); |
5496 | | } : KEY == 'has' ? function has(a) { |
5497 | | return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); |
5498 | | } : KEY == 'get' ? function get(a) { |
5499 | | return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); |
5500 | | } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } |
5501 | | : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } |
5502 | | ); |
5503 | | }; |
5504 | | if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { |
5505 | | new C().entries().next(); |
5506 | | }))) { |
5507 | | // create collection constructor |
5508 | | C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); |
5509 | | redefineAll(C.prototype, methods); |
5510 | | meta.NEED = true; |
5511 | | } else { |
5512 | | var instance = new C(); |
5513 | | // early implementations not supports chaining |
5514 | | var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; |
5515 | | // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false |
5516 | | var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); |
5517 | | // most early implementations doesn't supports iterables, most modern - not close it correctly |
5518 | | var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new |
5519 | | // for early implementations -0 and +0 not the same |
5520 | | var BUGGY_ZERO = !IS_WEAK && fails(function () { |
5521 | | // V8 ~ Chromium 42- fails only with 5+ elements |
5522 | | var $instance = new C(); |
5523 | | var index = 5; |
5524 | | while (index--) $instance[ADDER](index, index); |
5525 | | return !$instance.has(-0); |
5526 | | }); |
5527 | | if (!ACCEPT_ITERABLES) { |
5528 | | C = wrapper(function (target, iterable) { |
5529 | | anInstance(target, C, NAME); |
5530 | | var that = inheritIfRequired(new Base(), target, C); |
5531 | | if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); |
5532 | | return that; |
5533 | | }); |
5534 | | C.prototype = proto; |
5535 | | proto.constructor = C; |
5536 | | } |
5537 | | if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { |
5538 | | fixMethod('delete'); |
5539 | | fixMethod('has'); |
5540 | | IS_MAP && fixMethod('get'); |
5541 | | } |
5542 | | if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); |
5543 | | // weak collections should not contains .clear method |
5544 | | if (IS_WEAK && proto.clear) delete proto.clear; |
5545 | | } |
5546 | | |
5547 | | setToStringTag(C, NAME); |
5548 | | |
5549 | | O[NAME] = C; |
5550 | | $export($export.G + $export.W + $export.F * (C != Base), O); |
5551 | | |
5552 | | if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); |
5553 | | |
5554 | | return C; |
5555 | | }; |
5556 | | |
5557 | | |
5558 | | /***/ }), |
5559 | | /* 224 */ |
5560 | | /***/ (function(module, exports, __webpack_require__) { |
5561 | | |
5562 | | 'use strict'; |
5563 | | var strong = __webpack_require__(221); |
5564 | | var validate = __webpack_require__(222); |
5565 | | var SET = 'Set'; |
5566 | | |
5567 | | // 23.2 Set Objects |
5568 | | module.exports = __webpack_require__(223)(SET, function (get) { |
5569 | | return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; |
5570 | | }, { |
5571 | | // 23.2.3.1 Set.prototype.add(value) |
5572 | | add: function add(value) { |
5573 | | return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); |
5574 | | } |
5575 | | }, strong); |
5576 | | |
5577 | | |
5578 | | /***/ }), |
5579 | | /* 225 */ |
5580 | | /***/ (function(module, exports, __webpack_require__) { |
5581 | | |
5582 | | 'use strict'; |
5583 | | var each = __webpack_require__(173)(0); |
5584 | | var redefine = __webpack_require__(18); |
5585 | | var meta = __webpack_require__(22); |
5586 | | var assign = __webpack_require__(68); |
5587 | | var weak = __webpack_require__(226); |
5588 | | var isObject = __webpack_require__(13); |
5589 | | var fails = __webpack_require__(7); |
5590 | | var validate = __webpack_require__(222); |
5591 | | var WEAK_MAP = 'WeakMap'; |
5592 | | var getWeak = meta.getWeak; |
5593 | | var isExtensible = Object.isExtensible; |
5594 | | var uncaughtFrozenStore = weak.ufstore; |
5595 | | var tmp = {}; |
5596 | | var InternalMap; |
5597 | | |
5598 | | var wrapper = function (get) { |
5599 | | return function WeakMap() { |
5600 | | return get(this, arguments.length > 0 ? arguments[0] : undefined); |
5601 | | }; |
5602 | | }; |
5603 | | |
5604 | | var methods = { |
5605 | | // 23.3.3.3 WeakMap.prototype.get(key) |
5606 | | get: function get(key) { |
5607 | | if (isObject(key)) { |
5608 | | var data = getWeak(key); |
5609 | | if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); |
5610 | | return data ? data[this._i] : undefined; |
5611 | | } |
5612 | | }, |
5613 | | // 23.3.3.5 WeakMap.prototype.set(key, value) |
5614 | | set: function set(key, value) { |
5615 | | return weak.def(validate(this, WEAK_MAP), key, value); |
5616 | | } |
5617 | | }; |
5618 | | |
5619 | | // 23.3 WeakMap Objects |
5620 | | var $WeakMap = module.exports = __webpack_require__(223)(WEAK_MAP, wrapper, methods, weak, true, true); |
5621 | | |
5622 | | // IE11 WeakMap frozen keys fix |
5623 | | if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { |
5624 | | InternalMap = weak.getConstructor(wrapper, WEAK_MAP); |
5625 | | assign(InternalMap.prototype, methods); |
5626 | | meta.NEED = true; |
5627 | | each(['delete', 'has', 'get', 'set'], function (key) { |
5628 | | var proto = $WeakMap.prototype; |
5629 | | var method = proto[key]; |
5630 | | redefine(proto, key, function (a, b) { |
5631 | | // store frozen objects on internal weakmap shim |
5632 | | if (isObject(a) && !isExtensible(a)) { |
5633 | | if (!this._f) this._f = new InternalMap(); |
5634 | | var result = this._f[key](a, b); |
5635 | | return key == 'set' ? this : result; |
5636 | | // store all the rest on native weakmap |
5637 | | } return method.call(this, a, b); |
5638 | | }); |
5639 | | }); |
5640 | | } |
5641 | | |
5642 | | |
5643 | | /***/ }), |
5644 | | /* 226 */ |
5645 | | /***/ (function(module, exports, __webpack_require__) { |
5646 | | |
5647 | | 'use strict'; |
5648 | | var redefineAll = __webpack_require__(219); |
5649 | | var getWeak = __webpack_require__(22).getWeak; |
5650 | | var anObject = __webpack_require__(12); |
5651 | | var isObject = __webpack_require__(13); |
5652 | | var anInstance = __webpack_require__(211); |
5653 | | var forOf = __webpack_require__(212); |
5654 | | var createArrayMethod = __webpack_require__(173); |
5655 | | var $has = __webpack_require__(5); |
5656 | | var validate = __webpack_require__(222); |
5657 | | var arrayFind = createArrayMethod(5); |
5658 | | var arrayFindIndex = createArrayMethod(6); |
5659 | | var id = 0; |
5660 | | |
5661 | | // fallback for uncaught frozen keys |
5662 | | var uncaughtFrozenStore = function (that) { |
5663 | | return that._l || (that._l = new UncaughtFrozenStore()); |
5664 | | }; |
5665 | | var UncaughtFrozenStore = function () { |
5666 | | this.a = []; |
5667 | | }; |
5668 | | var findUncaughtFrozen = function (store, key) { |
5669 | | return arrayFind(store.a, function (it) { |
5670 | | return it[0] === key; |
5671 | | }); |
5672 | | }; |
5673 | | UncaughtFrozenStore.prototype = { |
5674 | | get: function (key) { |
5675 | | var entry = findUncaughtFrozen(this, key); |
5676 | | if (entry) return entry[1]; |
5677 | | }, |
5678 | | has: function (key) { |
5679 | | return !!findUncaughtFrozen(this, key); |
5680 | | }, |
5681 | | set: function (key, value) { |
5682 | | var entry = findUncaughtFrozen(this, key); |
5683 | | if (entry) entry[1] = value; |
5684 | | else this.a.push([key, value]); |
5685 | | }, |
5686 | | 'delete': function (key) { |
5687 | | var index = arrayFindIndex(this.a, function (it) { |
5688 | | return it[0] === key; |
5689 | | }); |
5690 | | if (~index) this.a.splice(index, 1); |
5691 | | return !!~index; |
5692 | | } |
5693 | | }; |
5694 | | |
5695 | | module.exports = { |
5696 | | getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { |
5697 | | var C = wrapper(function (that, iterable) { |
5698 | | anInstance(that, C, NAME, '_i'); |
5699 | | that._t = NAME; // collection type |
5700 | | that._i = id++; // collection id |
5701 | | that._l = undefined; // leak store for uncaught frozen objects |
5702 | | if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); |
5703 | | }); |
5704 | | redefineAll(C.prototype, { |
5705 | | // 23.3.3.2 WeakMap.prototype.delete(key) |
5706 | | // 23.4.3.3 WeakSet.prototype.delete(value) |
5707 | | 'delete': function (key) { |
5708 | | if (!isObject(key)) return false; |
5709 | | var data = getWeak(key); |
5710 | | if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); |
5711 | | return data && $has(data, this._i) && delete data[this._i]; |
5712 | | }, |
5713 | | // 23.3.3.4 WeakMap.prototype.has(key) |
5714 | | // 23.4.3.4 WeakSet.prototype.has(value) |
5715 | | has: function has(key) { |
5716 | | if (!isObject(key)) return false; |
5717 | | var data = getWeak(key); |
5718 | | if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); |
5719 | | return data && $has(data, this._i); |
5720 | | } |
5721 | | }); |
5722 | | return C; |
5723 | | }, |
5724 | | def: function (that, key, value) { |
5725 | | var data = getWeak(anObject(key), true); |
5726 | | if (data === true) uncaughtFrozenStore(that).set(key, value); |
5727 | | else data[that._i] = value; |
5728 | | return that; |
5729 | | }, |
5730 | | ufstore: uncaughtFrozenStore |
5731 | | }; |
5732 | | |
5733 | | |
5734 | | /***/ }), |
5735 | | /* 227 */ |
5736 | | /***/ (function(module, exports, __webpack_require__) { |
5737 | | |
5738 | | 'use strict'; |
5739 | | var weak = __webpack_require__(226); |
5740 | | var validate = __webpack_require__(222); |
5741 | | var WEAK_SET = 'WeakSet'; |
5742 | | |
5743 | | // 23.4 WeakSet Objects |
5744 | | __webpack_require__(223)(WEAK_SET, function (get) { |
5745 | | return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; |
5746 | | }, { |
5747 | | // 23.4.3.1 WeakSet.prototype.add(value) |
5748 | | add: function add(value) { |
5749 | | return weak.def(validate(this, WEAK_SET), value, true); |
5750 | | } |
5751 | | }, weak, false, true); |
5752 | | |
5753 | | |
5754 | | /***/ }), |
5755 | | /* 228 */ |
5756 | | /***/ (function(module, exports, __webpack_require__) { |
5757 | | |
5758 | | 'use strict'; |
5759 | | var $export = __webpack_require__(8); |
5760 | | var $typed = __webpack_require__(229); |
5761 | | var buffer = __webpack_require__(230); |
5762 | | var anObject = __webpack_require__(12); |
5763 | | var toAbsoluteIndex = __webpack_require__(39); |
5764 | | var toLength = __webpack_require__(37); |
5765 | | var isObject = __webpack_require__(13); |
5766 | | var ArrayBuffer = __webpack_require__(4).ArrayBuffer; |
5767 | | var speciesConstructor = __webpack_require__(209); |
5768 | | var $ArrayBuffer = buffer.ArrayBuffer; |
5769 | | var $DataView = buffer.DataView; |
5770 | | var $isView = $typed.ABV && ArrayBuffer.isView; |
5771 | | var $slice = $ArrayBuffer.prototype.slice; |
5772 | | var VIEW = $typed.VIEW; |
5773 | | var ARRAY_BUFFER = 'ArrayBuffer'; |
5774 | | |
5775 | | $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); |
5776 | | |
5777 | | $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { |
5778 | | // 24.1.3.1 ArrayBuffer.isView(arg) |
5779 | | isView: function isView(it) { |
5780 | | return $isView && $isView(it) || isObject(it) && VIEW in it; |
5781 | | } |
5782 | | }); |
5783 | | |
5784 | | $export($export.P + $export.U + $export.F * __webpack_require__(7)(function () { |
5785 | | return !new $ArrayBuffer(2).slice(1, undefined).byteLength; |
5786 | | }), ARRAY_BUFFER, { |
5787 | | // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) |
5788 | | slice: function slice(start, end) { |
5789 | | if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix |
5790 | | var len = anObject(this).byteLength; |
5791 | | var first = toAbsoluteIndex(start, len); |
5792 | | var fin = toAbsoluteIndex(end === undefined ? len : end, len); |
5793 | | var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); |
5794 | | var viewS = new $DataView(this); |
5795 | | var viewT = new $DataView(result); |
5796 | | var index = 0; |
5797 | | while (first < fin) { |
5798 | | viewT.setUint8(index++, viewS.getUint8(first++)); |
5799 | | } return result; |
5800 | | } |
5801 | | }); |
5802 | | |
5803 | | __webpack_require__(193)(ARRAY_BUFFER); |
5804 | | |
5805 | | |
5806 | | /***/ }), |
5807 | | /* 229 */ |
5808 | | /***/ (function(module, exports, __webpack_require__) { |
5809 | | |
5810 | | var global = __webpack_require__(4); |
5811 | | var hide = __webpack_require__(10); |
5812 | | var uid = __webpack_require__(19); |
5813 | | var TYPED = uid('typed_array'); |
5814 | | var VIEW = uid('view'); |
5815 | | var ABV = !!(global.ArrayBuffer && global.DataView); |
5816 | | var CONSTR = ABV; |
5817 | | var i = 0; |
5818 | | var l = 9; |
5819 | | var Typed; |
5820 | | |
5821 | | var TypedArrayConstructors = ( |
5822 | | 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' |
5823 | | ).split(','); |
5824 | | |
5825 | | while (i < l) { |
5826 | | if (Typed = global[TypedArrayConstructors[i++]]) { |
5827 | | hide(Typed.prototype, TYPED, true); |
5828 | | hide(Typed.prototype, VIEW, true); |
5829 | | } else CONSTR = false; |
5830 | | } |
5831 | | |
5832 | | module.exports = { |
5833 | | ABV: ABV, |
5834 | | CONSTR: CONSTR, |
5835 | | TYPED: TYPED, |
5836 | | VIEW: VIEW |
5837 | | }; |
5838 | | |
5839 | | |
5840 | | /***/ }), |
5841 | | /* 230 */ |
5842 | | /***/ (function(module, exports, __webpack_require__) { |
5843 | | |
5844 | | 'use strict'; |
5845 | | var global = __webpack_require__(4); |
5846 | | var DESCRIPTORS = __webpack_require__(6); |
5847 | | var LIBRARY = __webpack_require__(24); |
5848 | | var $typed = __webpack_require__(229); |
5849 | | var hide = __webpack_require__(10); |
5850 | | var redefineAll = __webpack_require__(219); |
5851 | | var fails = __webpack_require__(7); |
5852 | | var anInstance = __webpack_require__(211); |
5853 | | var toInteger = __webpack_require__(38); |
5854 | | var toLength = __webpack_require__(37); |
5855 | | var toIndex = __webpack_require__(231); |
5856 | | var gOPN = __webpack_require__(49).f; |
5857 | | var dP = __webpack_require__(11).f; |
5858 | | var arrayFill = __webpack_require__(189); |
5859 | | var setToStringTag = __webpack_require__(25); |
5860 | | var ARRAY_BUFFER = 'ArrayBuffer'; |
5861 | | var DATA_VIEW = 'DataView'; |
5862 | | var PROTOTYPE = 'prototype'; |
5863 | | var WRONG_LENGTH = 'Wrong length!'; |
5864 | | var WRONG_INDEX = 'Wrong index!'; |
5865 | | var $ArrayBuffer = global[ARRAY_BUFFER]; |
5866 | | var $DataView = global[DATA_VIEW]; |
5867 | | var Math = global.Math; |
5868 | | var RangeError = global.RangeError; |
5869 | | // eslint-disable-next-line no-shadow-restricted-names |
5870 | | var Infinity = global.Infinity; |
5871 | | var BaseBuffer = $ArrayBuffer; |
5872 | | var abs = Math.abs; |
5873 | | var pow = Math.pow; |
5874 | | var floor = Math.floor; |
5875 | | var log = Math.log; |
5876 | | var LN2 = Math.LN2; |
5877 | | var BUFFER = 'buffer'; |
5878 | | var BYTE_LENGTH = 'byteLength'; |
5879 | | var BYTE_OFFSET = 'byteOffset'; |
5880 | | var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; |
5881 | | var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; |
5882 | | var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; |
5883 | | |
5884 | | // IEEE754 conversions based on https://github.com/feross/ieee754 |
5885 | | function packIEEE754(value, mLen, nBytes) { |
5886 | | var buffer = new Array(nBytes); |
5887 | | var eLen = nBytes * 8 - mLen - 1; |
5888 | | var eMax = (1 << eLen) - 1; |
5889 | | var eBias = eMax >> 1; |
5890 | | var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; |
5891 | | var i = 0; |
5892 | | var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; |
5893 | | var e, m, c; |
5894 | | value = abs(value); |
5895 | | // eslint-disable-next-line no-self-compare |
5896 | | if (value != value || value === Infinity) { |
5897 | | // eslint-disable-next-line no-self-compare |
5898 | | m = value != value ? 1 : 0; |
5899 | | e = eMax; |
5900 | | } else { |
5901 | | e = floor(log(value) / LN2); |
5902 | | if (value * (c = pow(2, -e)) < 1) { |
5903 | | e--; |
5904 | | c *= 2; |
5905 | | } |
5906 | | if (e + eBias >= 1) { |
5907 | | value += rt / c; |
5908 | | } else { |
5909 | | value += rt * pow(2, 1 - eBias); |
5910 | | } |
5911 | | if (value * c >= 2) { |
5912 | | e++; |
5913 | | c /= 2; |
5914 | | } |
5915 | | if (e + eBias >= eMax) { |
5916 | | m = 0; |
5917 | | e = eMax; |
5918 | | } else if (e + eBias >= 1) { |
5919 | | m = (value * c - 1) * pow(2, mLen); |
5920 | | e = e + eBias; |
5921 | | } else { |
5922 | | m = value * pow(2, eBias - 1) * pow(2, mLen); |
5923 | | e = 0; |
5924 | | } |
5925 | | } |
5926 | | for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); |
5927 | | e = e << mLen | m; |
5928 | | eLen += mLen; |
5929 | | for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); |
5930 | | buffer[--i] |= s * 128; |
5931 | | return buffer; |
5932 | | } |
5933 | | function unpackIEEE754(buffer, mLen, nBytes) { |
5934 | | var eLen = nBytes * 8 - mLen - 1; |
5935 | | var eMax = (1 << eLen) - 1; |
5936 | | var eBias = eMax >> 1; |
5937 | | var nBits = eLen - 7; |
5938 | | var i = nBytes - 1; |
5939 | | var s = buffer[i--]; |
5940 | | var e = s & 127; |
5941 | | var m; |
5942 | | s >>= 7; |
5943 | | for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); |
5944 | | m = e & (1 << -nBits) - 1; |
5945 | | e >>= -nBits; |
5946 | | nBits += mLen; |
5947 | | for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); |
5948 | | if (e === 0) { |
5949 | | e = 1 - eBias; |
5950 | | } else if (e === eMax) { |
5951 | | return m ? NaN : s ? -Infinity : Infinity; |
5952 | | } else { |
5953 | | m = m + pow(2, mLen); |
5954 | | e = e - eBias; |
5955 | | } return (s ? -1 : 1) * m * pow(2, e - mLen); |
5956 | | } |
5957 | | |
5958 | | function unpackI32(bytes) { |
5959 | | return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; |
5960 | | } |
5961 | | function packI8(it) { |
5962 | | return [it & 0xff]; |
5963 | | } |
5964 | | function packI16(it) { |
5965 | | return [it & 0xff, it >> 8 & 0xff]; |
5966 | | } |
5967 | | function packI32(it) { |
5968 | | return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; |
5969 | | } |
5970 | | function packF64(it) { |
5971 | | return packIEEE754(it, 52, 8); |
5972 | | } |
5973 | | function packF32(it) { |
5974 | | return packIEEE754(it, 23, 4); |
5975 | | } |
5976 | | |
5977 | | function addGetter(C, key, internal) { |
5978 | | dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); |
5979 | | } |
5980 | | |
5981 | | function get(view, bytes, index, isLittleEndian) { |
5982 | | var numIndex = +index; |
5983 | | var intIndex = toIndex(numIndex); |
5984 | | if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); |
5985 | | var store = view[$BUFFER]._b; |
5986 | | var start = intIndex + view[$OFFSET]; |
5987 | | var pack = store.slice(start, start + bytes); |
5988 | | return isLittleEndian ? pack : pack.reverse(); |
5989 | | } |
5990 | | function set(view, bytes, index, conversion, value, isLittleEndian) { |
5991 | | var numIndex = +index; |
5992 | | var intIndex = toIndex(numIndex); |
5993 | | if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); |
5994 | | var store = view[$BUFFER]._b; |
5995 | | var start = intIndex + view[$OFFSET]; |
5996 | | var pack = conversion(+value); |
5997 | | for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; |
5998 | | } |
5999 | | |
6000 | | if (!$typed.ABV) { |
6001 | | $ArrayBuffer = function ArrayBuffer(length) { |
6002 | | anInstance(this, $ArrayBuffer, ARRAY_BUFFER); |
6003 | | var byteLength = toIndex(length); |
6004 | | this._b = arrayFill.call(new Array(byteLength), 0); |
6005 | | this[$LENGTH] = byteLength; |
6006 | | }; |
6007 | | |
6008 | | $DataView = function DataView(buffer, byteOffset, byteLength) { |
6009 | | anInstance(this, $DataView, DATA_VIEW); |
6010 | | anInstance(buffer, $ArrayBuffer, DATA_VIEW); |
6011 | | var bufferLength = buffer[$LENGTH]; |
6012 | | var offset = toInteger(byteOffset); |
6013 | | if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); |
6014 | | byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); |
6015 | | if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); |
6016 | | this[$BUFFER] = buffer; |
6017 | | this[$OFFSET] = offset; |
6018 | | this[$LENGTH] = byteLength; |
6019 | | }; |
6020 | | |
6021 | | if (DESCRIPTORS) { |
6022 | | addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); |
6023 | | addGetter($DataView, BUFFER, '_b'); |
6024 | | addGetter($DataView, BYTE_LENGTH, '_l'); |
6025 | | addGetter($DataView, BYTE_OFFSET, '_o'); |
6026 | | } |
6027 | | |
6028 | | redefineAll($DataView[PROTOTYPE], { |
6029 | | getInt8: function getInt8(byteOffset) { |
6030 | | return get(this, 1, byteOffset)[0] << 24 >> 24; |
6031 | | }, |
6032 | | getUint8: function getUint8(byteOffset) { |
6033 | | return get(this, 1, byteOffset)[0]; |
6034 | | }, |
6035 | | getInt16: function getInt16(byteOffset /* , littleEndian */) { |
6036 | | var bytes = get(this, 2, byteOffset, arguments[1]); |
6037 | | return (bytes[1] << 8 | bytes[0]) << 16 >> 16; |
6038 | | }, |
6039 | | getUint16: function getUint16(byteOffset /* , littleEndian */) { |
6040 | | var bytes = get(this, 2, byteOffset, arguments[1]); |
6041 | | return bytes[1] << 8 | bytes[0]; |
6042 | | }, |
6043 | | getInt32: function getInt32(byteOffset /* , littleEndian */) { |
6044 | | return unpackI32(get(this, 4, byteOffset, arguments[1])); |
6045 | | }, |
6046 | | getUint32: function getUint32(byteOffset /* , littleEndian */) { |
6047 | | return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; |
6048 | | }, |
6049 | | getFloat32: function getFloat32(byteOffset /* , littleEndian */) { |
6050 | | return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); |
6051 | | }, |
6052 | | getFloat64: function getFloat64(byteOffset /* , littleEndian */) { |
6053 | | return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); |
6054 | | }, |
6055 | | setInt8: function setInt8(byteOffset, value) { |
6056 | | set(this, 1, byteOffset, packI8, value); |
6057 | | }, |
6058 | | setUint8: function setUint8(byteOffset, value) { |
6059 | | set(this, 1, byteOffset, packI8, value); |
6060 | | }, |
6061 | | setInt16: function setInt16(byteOffset, value /* , littleEndian */) { |
6062 | | set(this, 2, byteOffset, packI16, value, arguments[2]); |
6063 | | }, |
6064 | | setUint16: function setUint16(byteOffset, value /* , littleEndian */) { |
6065 | | set(this, 2, byteOffset, packI16, value, arguments[2]); |
6066 | | }, |
6067 | | setInt32: function setInt32(byteOffset, value /* , littleEndian */) { |
6068 | | set(this, 4, byteOffset, packI32, value, arguments[2]); |
6069 | | }, |
6070 | | setUint32: function setUint32(byteOffset, value /* , littleEndian */) { |
6071 | | set(this, 4, byteOffset, packI32, value, arguments[2]); |
6072 | | }, |
6073 | | setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { |
6074 | | set(this, 4, byteOffset, packF32, value, arguments[2]); |
6075 | | }, |
6076 | | setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { |
6077 | | set(this, 8, byteOffset, packF64, value, arguments[2]); |
6078 | | } |
6079 | | }); |
6080 | | } else { |
6081 | | if (!fails(function () { |
6082 | | $ArrayBuffer(1); |
6083 | | }) || !fails(function () { |
6084 | | new $ArrayBuffer(-1); // eslint-disable-line no-new |
6085 | | }) || fails(function () { |
6086 | | new $ArrayBuffer(); // eslint-disable-line no-new |
6087 | | new $ArrayBuffer(1.5); // eslint-disable-line no-new |
6088 | | new $ArrayBuffer(NaN); // eslint-disable-line no-new |
6089 | | return $ArrayBuffer.name != ARRAY_BUFFER; |
6090 | | })) { |
6091 | | $ArrayBuffer = function ArrayBuffer(length) { |
6092 | | anInstance(this, $ArrayBuffer); |
6093 | | return new BaseBuffer(toIndex(length)); |
6094 | | }; |
6095 | | var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; |
6096 | | for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { |
6097 | | if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); |
6098 | | } |
6099 | | if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; |
6100 | | } |
6101 | | // iOS Safari 7.x bug |
6102 | | var view = new $DataView(new $ArrayBuffer(2)); |
6103 | | var $setInt8 = $DataView[PROTOTYPE].setInt8; |
6104 | | view.setInt8(0, 2147483648); |
6105 | | view.setInt8(1, 2147483649); |
6106 | | if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { |
6107 | | setInt8: function setInt8(byteOffset, value) { |
6108 | | $setInt8.call(this, byteOffset, value << 24 >> 24); |
6109 | | }, |
6110 | | setUint8: function setUint8(byteOffset, value) { |
6111 | | $setInt8.call(this, byteOffset, value << 24 >> 24); |
6112 | | } |
6113 | | }, true); |
6114 | | } |
6115 | | setToStringTag($ArrayBuffer, ARRAY_BUFFER); |
6116 | | setToStringTag($DataView, DATA_VIEW); |
6117 | | hide($DataView[PROTOTYPE], $typed.VIEW, true); |
6118 | | exports[ARRAY_BUFFER] = $ArrayBuffer; |
6119 | | exports[DATA_VIEW] = $DataView; |
6120 | | |
6121 | | |
6122 | | /***/ }), |
6123 | | /* 231 */ |
6124 | | /***/ (function(module, exports, __webpack_require__) { |
6125 | | |
6126 | | // https://tc39.github.io/ecma262/#sec-toindex |
6127 | | var toInteger = __webpack_require__(38); |
6128 | | var toLength = __webpack_require__(37); |
6129 | | module.exports = function (it) { |
6130 | | if (it === undefined) return 0; |
6131 | | var number = toInteger(it); |
6132 | | var length = toLength(number); |
6133 | | if (number !== length) throw RangeError('Wrong length!'); |
6134 | | return length; |
6135 | | }; |
6136 | | |
6137 | | |
6138 | | /***/ }), |
6139 | | /* 232 */ |
6140 | | /***/ (function(module, exports, __webpack_require__) { |
6141 | | |
6142 | | var $export = __webpack_require__(8); |
6143 | | $export($export.G + $export.W + $export.F * !__webpack_require__(229).ABV, { |
6144 | | DataView: __webpack_require__(230).DataView |
6145 | | }); |
6146 | | |
6147 | | |
6148 | | /***/ }), |
6149 | | /* 233 */ |
6150 | | /***/ (function(module, exports, __webpack_require__) { |
6151 | | |
6152 | | __webpack_require__(234)('Int8', 1, function (init) { |
6153 | | return function Int8Array(data, byteOffset, length) { |
6154 | | return init(this, data, byteOffset, length); |
6155 | | }; |
6156 | | }); |
6157 | | |
6158 | | |
6159 | | /***/ }), |
6160 | | /* 234 */ |
6161 | | /***/ (function(module, exports, __webpack_require__) { |
6162 | | |
6163 | | 'use strict'; |
6164 | | if (__webpack_require__(6)) { |
6165 | | var LIBRARY = __webpack_require__(24); |
6166 | | var global = __webpack_require__(4); |
6167 | | var fails = __webpack_require__(7); |
6168 | | var $export = __webpack_require__(8); |
6169 | | var $typed = __webpack_require__(229); |
6170 | | var $buffer = __webpack_require__(230); |
6171 | | var ctx = __webpack_require__(20); |
6172 | | var anInstance = __webpack_require__(211); |
6173 | | var propertyDesc = __webpack_require__(17); |
6174 | | var hide = __webpack_require__(10); |
6175 | | var redefineAll = __webpack_require__(219); |
6176 | | var toInteger = __webpack_require__(38); |
6177 | | var toLength = __webpack_require__(37); |
6178 | | var toIndex = __webpack_require__(231); |
6179 | | var toAbsoluteIndex = __webpack_require__(39); |
6180 | | var toPrimitive = __webpack_require__(16); |
6181 | | var has = __webpack_require__(5); |
6182 | | var classof = __webpack_require__(74); |
6183 | | var isObject = __webpack_require__(13); |
6184 | | var toObject = __webpack_require__(57); |
6185 | | var isArrayIter = __webpack_require__(163); |
6186 | | var create = __webpack_require__(45); |
6187 | | var getPrototypeOf = __webpack_require__(58); |
6188 | | var gOPN = __webpack_require__(49).f; |
6189 | | var getIterFn = __webpack_require__(165); |
6190 | | var uid = __webpack_require__(19); |
6191 | | var wks = __webpack_require__(26); |
6192 | | var createArrayMethod = __webpack_require__(173); |
6193 | | var createArrayIncludes = __webpack_require__(36); |
6194 | | var speciesConstructor = __webpack_require__(209); |
6195 | | var ArrayIterators = __webpack_require__(194); |
6196 | | var Iterators = __webpack_require__(129); |
6197 | | var $iterDetect = __webpack_require__(166); |
6198 | | var setSpecies = __webpack_require__(193); |
6199 | | var arrayFill = __webpack_require__(189); |
6200 | | var arrayCopyWithin = __webpack_require__(186); |
6201 | | var $DP = __webpack_require__(11); |
6202 | | var $GOPD = __webpack_require__(50); |
6203 | | var dP = $DP.f; |
6204 | | var gOPD = $GOPD.f; |
6205 | | var RangeError = global.RangeError; |
6206 | | var TypeError = global.TypeError; |
6207 | | var Uint8Array = global.Uint8Array; |
6208 | | var ARRAY_BUFFER = 'ArrayBuffer'; |
6209 | | var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; |
6210 | | var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; |
6211 | | var PROTOTYPE = 'prototype'; |
6212 | | var ArrayProto = Array[PROTOTYPE]; |
6213 | | var $ArrayBuffer = $buffer.ArrayBuffer; |
6214 | | var $DataView = $buffer.DataView; |
6215 | | var arrayForEach = createArrayMethod(0); |
6216 | | var arrayFilter = createArrayMethod(2); |
6217 | | var arraySome = createArrayMethod(3); |
6218 | | var arrayEvery = createArrayMethod(4); |
6219 | | var arrayFind = createArrayMethod(5); |
6220 | | var arrayFindIndex = createArrayMethod(6); |
6221 | | var arrayIncludes = createArrayIncludes(true); |
6222 | | var arrayIndexOf = createArrayIncludes(false); |
6223 | | var arrayValues = ArrayIterators.values; |
6224 | | var arrayKeys = ArrayIterators.keys; |
6225 | | var arrayEntries = ArrayIterators.entries; |
6226 | | var arrayLastIndexOf = ArrayProto.lastIndexOf; |
6227 | | var arrayReduce = ArrayProto.reduce; |
6228 | | var arrayReduceRight = ArrayProto.reduceRight; |
6229 | | var arrayJoin = ArrayProto.join; |
6230 | | var arraySort = ArrayProto.sort; |
6231 | | var arraySlice = ArrayProto.slice; |
6232 | | var arrayToString = ArrayProto.toString; |
6233 | | var arrayToLocaleString = ArrayProto.toLocaleString; |
6234 | | var ITERATOR = wks('iterator'); |
6235 | | var TAG = wks('toStringTag'); |
6236 | | var TYPED_CONSTRUCTOR = uid('typed_constructor'); |
6237 | | var DEF_CONSTRUCTOR = uid('def_constructor'); |
6238 | | var ALL_CONSTRUCTORS = $typed.CONSTR; |
6239 | | var TYPED_ARRAY = $typed.TYPED; |
6240 | | var VIEW = $typed.VIEW; |
6241 | | var WRONG_LENGTH = 'Wrong length!'; |
6242 | | |
6243 | | var $map = createArrayMethod(1, function (O, length) { |
6244 | | return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); |
6245 | | }); |
6246 | | |
6247 | | var LITTLE_ENDIAN = fails(function () { |
6248 | | // eslint-disable-next-line no-undef |
6249 | | return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; |
6250 | | }); |
6251 | | |
6252 | | var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { |
6253 | | new Uint8Array(1).set({}); |
6254 | | }); |
6255 | | |
6256 | | var toOffset = function (it, BYTES) { |
6257 | | var offset = toInteger(it); |
6258 | | if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); |
6259 | | return offset; |
6260 | | }; |
6261 | | |
6262 | | var validate = function (it) { |
6263 | | if (isObject(it) && TYPED_ARRAY in it) return it; |
6264 | | throw TypeError(it + ' is not a typed array!'); |
6265 | | }; |
6266 | | |
6267 | | var allocate = function (C, length) { |
6268 | | if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { |
6269 | | throw TypeError('It is not a typed array constructor!'); |
6270 | | } return new C(length); |
6271 | | }; |
6272 | | |
6273 | | var speciesFromList = function (O, list) { |
6274 | | return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); |
6275 | | }; |
6276 | | |
6277 | | var fromList = function (C, list) { |
6278 | | var index = 0; |
6279 | | var length = list.length; |
6280 | | var result = allocate(C, length); |
6281 | | while (length > index) result[index] = list[index++]; |
6282 | | return result; |
6283 | | }; |
6284 | | |
6285 | | var addGetter = function (it, key, internal) { |
6286 | | dP(it, key, { get: function () { return this._d[internal]; } }); |
6287 | | }; |
6288 | | |
6289 | | var $from = function from(source /* , mapfn, thisArg */) { |
6290 | | var O = toObject(source); |
6291 | | var aLen = arguments.length; |
6292 | | var mapfn = aLen > 1 ? arguments[1] : undefined; |
6293 | | var mapping = mapfn !== undefined; |
6294 | | var iterFn = getIterFn(O); |
6295 | | var i, length, values, result, step, iterator; |
6296 | | if (iterFn != undefined && !isArrayIter(iterFn)) { |
6297 | | for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { |
6298 | | values.push(step.value); |
6299 | | } O = values; |
6300 | | } |
6301 | | if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); |
6302 | | for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { |
6303 | | result[i] = mapping ? mapfn(O[i], i) : O[i]; |
6304 | | } |
6305 | | return result; |
6306 | | }; |
6307 | | |
6308 | | var $of = function of(/* ...items */) { |
6309 | | var index = 0; |
6310 | | var length = arguments.length; |
6311 | | var result = allocate(this, length); |
6312 | | while (length > index) result[index] = arguments[index++]; |
6313 | | return result; |
6314 | | }; |
6315 | | |
6316 | | // iOS Safari 6.x fails here |
6317 | | var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); |
6318 | | |
6319 | | var $toLocaleString = function toLocaleString() { |
6320 | | return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); |
6321 | | }; |
6322 | | |
6323 | | var proto = { |
6324 | | copyWithin: function copyWithin(target, start /* , end */) { |
6325 | | return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); |
6326 | | }, |
6327 | | every: function every(callbackfn /* , thisArg */) { |
6328 | | return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); |
6329 | | }, |
6330 | | fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars |
6331 | | return arrayFill.apply(validate(this), arguments); |
6332 | | }, |
6333 | | filter: function filter(callbackfn /* , thisArg */) { |
6334 | | return speciesFromList(this, arrayFilter(validate(this), callbackfn, |
6335 | | arguments.length > 1 ? arguments[1] : undefined)); |
6336 | | }, |
6337 | | find: function find(predicate /* , thisArg */) { |
6338 | | return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); |
6339 | | }, |
6340 | | findIndex: function findIndex(predicate /* , thisArg */) { |
6341 | | return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); |
6342 | | }, |
6343 | | forEach: function forEach(callbackfn /* , thisArg */) { |
6344 | | arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); |
6345 | | }, |
6346 | | indexOf: function indexOf(searchElement /* , fromIndex */) { |
6347 | | return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); |
6348 | | }, |
6349 | | includes: function includes(searchElement /* , fromIndex */) { |
6350 | | return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); |
6351 | | }, |
6352 | | join: function join(separator) { // eslint-disable-line no-unused-vars |
6353 | | return arrayJoin.apply(validate(this), arguments); |
6354 | | }, |
6355 | | lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars |
6356 | | return arrayLastIndexOf.apply(validate(this), arguments); |
6357 | | }, |
6358 | | map: function map(mapfn /* , thisArg */) { |
6359 | | return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); |
6360 | | }, |
6361 | | reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars |
6362 | | return arrayReduce.apply(validate(this), arguments); |
6363 | | }, |
6364 | | reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars |
6365 | | return arrayReduceRight.apply(validate(this), arguments); |
6366 | | }, |
6367 | | reverse: function reverse() { |
6368 | | var that = this; |
6369 | | var length = validate(that).length; |
6370 | | var middle = Math.floor(length / 2); |
6371 | | var index = 0; |
6372 | | var value; |
6373 | | while (index < middle) { |
6374 | | value = that[index]; |
6375 | | that[index++] = that[--length]; |
6376 | | that[length] = value; |
6377 | | } return that; |
6378 | | }, |
6379 | | some: function some(callbackfn /* , thisArg */) { |
6380 | | return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); |
6381 | | }, |
6382 | | sort: function sort(comparefn) { |
6383 | | return arraySort.call(validate(this), comparefn); |
6384 | | }, |
6385 | | subarray: function subarray(begin, end) { |
6386 | | var O = validate(this); |
6387 | | var length = O.length; |
6388 | | var $begin = toAbsoluteIndex(begin, length); |
6389 | | return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( |
6390 | | O.buffer, |
6391 | | O.byteOffset + $begin * O.BYTES_PER_ELEMENT, |
6392 | | toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) |
6393 | | ); |
6394 | | } |
6395 | | }; |
6396 | | |
6397 | | var $slice = function slice(start, end) { |
6398 | | return speciesFromList(this, arraySlice.call(validate(this), start, end)); |
6399 | | }; |
6400 | | |
6401 | | var $set = function set(arrayLike /* , offset */) { |
6402 | | validate(this); |
6403 | | var offset = toOffset(arguments[1], 1); |
6404 | | var length = this.length; |
6405 | | var src = toObject(arrayLike); |
6406 | | var len = toLength(src.length); |
6407 | | var index = 0; |
6408 | | if (len + offset > length) throw RangeError(WRONG_LENGTH); |
6409 | | while (index < len) this[offset + index] = src[index++]; |
6410 | | }; |
6411 | | |
6412 | | var $iterators = { |
6413 | | entries: function entries() { |
6414 | | return arrayEntries.call(validate(this)); |
6415 | | }, |
6416 | | keys: function keys() { |
6417 | | return arrayKeys.call(validate(this)); |
6418 | | }, |
6419 | | values: function values() { |
6420 | | return arrayValues.call(validate(this)); |
6421 | | } |
6422 | | }; |
6423 | | |
6424 | | var isTAIndex = function (target, key) { |
6425 | | return isObject(target) |
6426 | | && target[TYPED_ARRAY] |
6427 | | && typeof key != 'symbol' |
6428 | | && key in target |
6429 | | && String(+key) == String(key); |
6430 | | }; |
6431 | | var $getDesc = function getOwnPropertyDescriptor(target, key) { |
6432 | | return isTAIndex(target, key = toPrimitive(key, true)) |
6433 | | ? propertyDesc(2, target[key]) |
6434 | | : gOPD(target, key); |
6435 | | }; |
6436 | | var $setDesc = function defineProperty(target, key, desc) { |
6437 | | if (isTAIndex(target, key = toPrimitive(key, true)) |
6438 | | && isObject(desc) |
6439 | | && has(desc, 'value') |
6440 | | && !has(desc, 'get') |
6441 | | && !has(desc, 'set') |
6442 | | // TODO: add validation descriptor w/o calling accessors |
6443 | | && !desc.configurable |
6444 | | && (!has(desc, 'writable') || desc.writable) |
6445 | | && (!has(desc, 'enumerable') || desc.enumerable) |
6446 | | ) { |
6447 | | target[key] = desc.value; |
6448 | | return target; |
6449 | | } return dP(target, key, desc); |
6450 | | }; |
6451 | | |
6452 | | if (!ALL_CONSTRUCTORS) { |
6453 | | $GOPD.f = $getDesc; |
6454 | | $DP.f = $setDesc; |
6455 | | } |
6456 | | |
6457 | | $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { |
6458 | | getOwnPropertyDescriptor: $getDesc, |
6459 | | defineProperty: $setDesc |
6460 | | }); |
6461 | | |
6462 | | if (fails(function () { arrayToString.call({}); })) { |
6463 | | arrayToString = arrayToLocaleString = function toString() { |
6464 | | return arrayJoin.call(this); |
6465 | | }; |
6466 | | } |
6467 | | |
6468 | | var $TypedArrayPrototype$ = redefineAll({}, proto); |
6469 | | redefineAll($TypedArrayPrototype$, $iterators); |
6470 | | hide($TypedArrayPrototype$, ITERATOR, $iterators.values); |
6471 | | redefineAll($TypedArrayPrototype$, { |
6472 | | slice: $slice, |
6473 | | set: $set, |
6474 | | constructor: function () { /* noop */ }, |
6475 | | toString: arrayToString, |
6476 | | toLocaleString: $toLocaleString |
6477 | | }); |
6478 | | addGetter($TypedArrayPrototype$, 'buffer', 'b'); |
6479 | | addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); |
6480 | | addGetter($TypedArrayPrototype$, 'byteLength', 'l'); |
6481 | | addGetter($TypedArrayPrototype$, 'length', 'e'); |
6482 | | dP($TypedArrayPrototype$, TAG, { |
6483 | | get: function () { return this[TYPED_ARRAY]; } |
6484 | | }); |
6485 | | |
6486 | | // eslint-disable-next-line max-statements |
6487 | | module.exports = function (KEY, BYTES, wrapper, CLAMPED) { |
6488 | | CLAMPED = !!CLAMPED; |
6489 | | var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; |
6490 | | var GETTER = 'get' + KEY; |
6491 | | var SETTER = 'set' + KEY; |
6492 | | var TypedArray = global[NAME]; |
6493 | | var Base = TypedArray || {}; |
6494 | | var TAC = TypedArray && getPrototypeOf(TypedArray); |
6495 | | var FORCED = !TypedArray || !$typed.ABV; |
6496 | | var O = {}; |
6497 | | var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; |
6498 | | var getter = function (that, index) { |
6499 | | var data = that._d; |
6500 | | return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); |
6501 | | }; |
6502 | | var setter = function (that, index, value) { |
6503 | | var data = that._d; |
6504 | | if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; |
6505 | | data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); |
6506 | | }; |
6507 | | var addElement = function (that, index) { |
6508 | | dP(that, index, { |
6509 | | get: function () { |
6510 | | return getter(this, index); |
6511 | | }, |
6512 | | set: function (value) { |
6513 | | return setter(this, index, value); |
6514 | | }, |
6515 | | enumerable: true |
6516 | | }); |
6517 | | }; |
6518 | | if (FORCED) { |
6519 | | TypedArray = wrapper(function (that, data, $offset, $length) { |
6520 | | anInstance(that, TypedArray, NAME, '_d'); |
6521 | | var index = 0; |
6522 | | var offset = 0; |
6523 | | var buffer, byteLength, length, klass; |
6524 | | if (!isObject(data)) { |
6525 | | length = toIndex(data); |
6526 | | byteLength = length * BYTES; |
6527 | | buffer = new $ArrayBuffer(byteLength); |
6528 | | } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { |
6529 | | buffer = data; |
6530 | | offset = toOffset($offset, BYTES); |
6531 | | var $len = data.byteLength; |
6532 | | if ($length === undefined) { |
6533 | | if ($len % BYTES) throw RangeError(WRONG_LENGTH); |
6534 | | byteLength = $len - offset; |
6535 | | if (byteLength < 0) throw RangeError(WRONG_LENGTH); |
6536 | | } else { |
6537 | | byteLength = toLength($length) * BYTES; |
6538 | | if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); |
6539 | | } |
6540 | | length = byteLength / BYTES; |
6541 | | } else if (TYPED_ARRAY in data) { |
6542 | | return fromList(TypedArray, data); |
6543 | | } else { |
6544 | | return $from.call(TypedArray, data); |
6545 | | } |
6546 | | hide(that, '_d', { |
6547 | | b: buffer, |
6548 | | o: offset, |
6549 | | l: byteLength, |
6550 | | e: length, |
6551 | | v: new $DataView(buffer) |
6552 | | }); |
6553 | | while (index < length) addElement(that, index++); |
6554 | | }); |
6555 | | TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); |
6556 | | hide(TypedArrayPrototype, 'constructor', TypedArray); |
6557 | | } else if (!fails(function () { |
6558 | | TypedArray(1); |
6559 | | }) || !fails(function () { |
6560 | | new TypedArray(-1); // eslint-disable-line no-new |
6561 | | }) || !$iterDetect(function (iter) { |
6562 | | new TypedArray(); // eslint-disable-line no-new |
6563 | | new TypedArray(null); // eslint-disable-line no-new |
6564 | | new TypedArray(1.5); // eslint-disable-line no-new |
6565 | | new TypedArray(iter); // eslint-disable-line no-new |
6566 | | }, true)) { |
6567 | | TypedArray = wrapper(function (that, data, $offset, $length) { |
6568 | | anInstance(that, TypedArray, NAME); |
6569 | | var klass; |
6570 | | // `ws` module bug, temporarily remove validation length for Uint8Array |
6571 | | // https://github.com/websockets/ws/pull/645 |
6572 | | if (!isObject(data)) return new Base(toIndex(data)); |
6573 | | if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { |
6574 | | return $length !== undefined |
6575 | | ? new Base(data, toOffset($offset, BYTES), $length) |
6576 | | : $offset !== undefined |
6577 | | ? new Base(data, toOffset($offset, BYTES)) |
6578 | | : new Base(data); |
6579 | | } |
6580 | | if (TYPED_ARRAY in data) return fromList(TypedArray, data); |
6581 | | return $from.call(TypedArray, data); |
6582 | | }); |
6583 | | arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { |
6584 | | if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); |
6585 | | }); |
6586 | | TypedArray[PROTOTYPE] = TypedArrayPrototype; |
6587 | | if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; |
6588 | | } |
6589 | | var $nativeIterator = TypedArrayPrototype[ITERATOR]; |
6590 | | var CORRECT_ITER_NAME = !!$nativeIterator |
6591 | | && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); |
6592 | | var $iterator = $iterators.values; |
6593 | | hide(TypedArray, TYPED_CONSTRUCTOR, true); |
6594 | | hide(TypedArrayPrototype, TYPED_ARRAY, NAME); |
6595 | | hide(TypedArrayPrototype, VIEW, true); |
6596 | | hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); |
6597 | | |
6598 | | if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { |
6599 | | dP(TypedArrayPrototype, TAG, { |
6600 | | get: function () { return NAME; } |
6601 | | }); |
6602 | | } |
6603 | | |
6604 | | O[NAME] = TypedArray; |
6605 | | |
6606 | | $export($export.G + $export.W + $export.F * (TypedArray != Base), O); |
6607 | | |
6608 | | $export($export.S, NAME, { |
6609 | | BYTES_PER_ELEMENT: BYTES |
6610 | | }); |
6611 | | |
6612 | | $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { |
6613 | | from: $from, |
6614 | | of: $of |
6615 | | }); |
6616 | | |
6617 | | if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); |
6618 | | |
6619 | | $export($export.P, NAME, proto); |
6620 | | |
6621 | | setSpecies(NAME); |
6622 | | |
6623 | | $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); |
6624 | | |
6625 | | $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); |
6626 | | |
6627 | | if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; |
6628 | | |
6629 | | $export($export.P + $export.F * fails(function () { |
6630 | | new TypedArray(1).slice(); |
6631 | | }), NAME, { slice: $slice }); |
6632 | | |
6633 | | $export($export.P + $export.F * (fails(function () { |
6634 | | return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); |
6635 | | }) || !fails(function () { |
6636 | | TypedArrayPrototype.toLocaleString.call([1, 2]); |
6637 | | })), NAME, { toLocaleString: $toLocaleString }); |
6638 | | |
6639 | | Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; |
6640 | | if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); |
6641 | | }; |
6642 | | } else module.exports = function () { /* empty */ }; |
6643 | | |
6644 | | |
6645 | | /***/ }), |
6646 | | /* 235 */ |
6647 | | /***/ (function(module, exports, __webpack_require__) { |
6648 | | |
6649 | | __webpack_require__(234)('Uint8', 1, function (init) { |
6650 | | return function Uint8Array(data, byteOffset, length) { |
6651 | | return init(this, data, byteOffset, length); |
6652 | | }; |
6653 | | }); |
6654 | | |
6655 | | |
6656 | | /***/ }), |
6657 | | /* 236 */ |
6658 | | /***/ (function(module, exports, __webpack_require__) { |
6659 | | |
6660 | | __webpack_require__(234)('Uint8', 1, function (init) { |
6661 | | return function Uint8ClampedArray(data, byteOffset, length) { |
6662 | | return init(this, data, byteOffset, length); |
6663 | | }; |
6664 | | }, true); |
6665 | | |
6666 | | |
6667 | | /***/ }), |
6668 | | /* 237 */ |
6669 | | /***/ (function(module, exports, __webpack_require__) { |
6670 | | |
6671 | | __webpack_require__(234)('Int16', 2, function (init) { |
6672 | | return function Int16Array(data, byteOffset, length) { |
6673 | | return init(this, data, byteOffset, length); |
6674 | | }; |
6675 | | }); |
6676 | | |
6677 | | |
6678 | | /***/ }), |
6679 | | /* 238 */ |
6680 | | /***/ (function(module, exports, __webpack_require__) { |
6681 | | |
6682 | | __webpack_require__(234)('Uint16', 2, function (init) { |
6683 | | return function Uint16Array(data, byteOffset, length) { |
6684 | | return init(this, data, byteOffset, length); |
6685 | | }; |
6686 | | }); |
6687 | | |
6688 | | |
6689 | | /***/ }), |
6690 | | /* 239 */ |
6691 | | /***/ (function(module, exports, __webpack_require__) { |
6692 | | |
6693 | | __webpack_require__(234)('Int32', 4, function (init) { |
6694 | | return function Int32Array(data, byteOffset, length) { |
6695 | | return init(this, data, byteOffset, length); |
6696 | | }; |
6697 | | }); |
6698 | | |
6699 | | |
6700 | | /***/ }), |
6701 | | /* 240 */ |
6702 | | /***/ (function(module, exports, __webpack_require__) { |
6703 | | |
6704 | | __webpack_require__(234)('Uint32', 4, function (init) { |
6705 | | return function Uint32Array(data, byteOffset, length) { |
6706 | | return init(this, data, byteOffset, length); |
6707 | | }; |
6708 | | }); |
6709 | | |
6710 | | |
6711 | | /***/ }), |
6712 | | /* 241 */ |
6713 | | /***/ (function(module, exports, __webpack_require__) { |
6714 | | |
6715 | | __webpack_require__(234)('Float32', 4, function (init) { |
6716 | | return function Float32Array(data, byteOffset, length) { |
6717 | | return init(this, data, byteOffset, length); |
6718 | | }; |
6719 | | }); |
6720 | | |
6721 | | |
6722 | | /***/ }), |
6723 | | /* 242 */ |
6724 | | /***/ (function(module, exports, __webpack_require__) { |
6725 | | |
6726 | | __webpack_require__(234)('Float64', 8, function (init) { |
6727 | | return function Float64Array(data, byteOffset, length) { |
6728 | | return init(this, data, byteOffset, length); |
6729 | | }; |
6730 | | }); |
6731 | | |
6732 | | |
6733 | | /***/ }), |
6734 | | /* 243 */ |
6735 | | /***/ (function(module, exports, __webpack_require__) { |
6736 | | |
6737 | | // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) |
6738 | | var $export = __webpack_require__(8); |
6739 | | var aFunction = __webpack_require__(21); |
6740 | | var anObject = __webpack_require__(12); |
6741 | | var rApply = (__webpack_require__(4).Reflect || {}).apply; |
6742 | | var fApply = Function.apply; |
6743 | | // MS Edge argumentsList argument is optional |
6744 | | $export($export.S + $export.F * !__webpack_require__(7)(function () { |
6745 | | rApply(function () { /* empty */ }); |
6746 | | }), 'Reflect', { |
6747 | | apply: function apply(target, thisArgument, argumentsList) { |
6748 | | var T = aFunction(target); |
6749 | | var L = anObject(argumentsList); |
6750 | | return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); |
6751 | | } |
6752 | | }); |
6753 | | |
6754 | | |
6755 | | /***/ }), |
6756 | | /* 244 */ |
6757 | | /***/ (function(module, exports, __webpack_require__) { |
6758 | | |
6759 | | // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) |
6760 | | var $export = __webpack_require__(8); |
6761 | | var create = __webpack_require__(45); |
6762 | | var aFunction = __webpack_require__(21); |
6763 | | var anObject = __webpack_require__(12); |
6764 | | var isObject = __webpack_require__(13); |
6765 | | var fails = __webpack_require__(7); |
6766 | | var bind = __webpack_require__(76); |
6767 | | var rConstruct = (__webpack_require__(4).Reflect || {}).construct; |
6768 | | |
6769 | | // MS Edge supports only 2 arguments and argumentsList argument is optional |
6770 | | // FF Nightly sets third argument as `new.target`, but does not create `this` from it |
6771 | | var NEW_TARGET_BUG = fails(function () { |
6772 | | function F() { /* empty */ } |
6773 | | return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); |
6774 | | }); |
6775 | | var ARGS_BUG = !fails(function () { |
6776 | | rConstruct(function () { /* empty */ }); |
6777 | | }); |
6778 | | |
6779 | | $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { |
6780 | | construct: function construct(Target, args /* , newTarget */) { |
6781 | | aFunction(Target); |
6782 | | anObject(args); |
6783 | | var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); |
6784 | | if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); |
6785 | | if (Target == newTarget) { |
6786 | | // w/o altered newTarget, optimization for 0-4 arguments |
6787 | | switch (args.length) { |
6788 | | case 0: return new Target(); |
6789 | | case 1: return new Target(args[0]); |
6790 | | case 2: return new Target(args[0], args[1]); |
6791 | | case 3: return new Target(args[0], args[1], args[2]); |
6792 | | case 4: return new Target(args[0], args[1], args[2], args[3]); |
6793 | | } |
6794 | | // w/o altered newTarget, lot of arguments case |
6795 | | var $args = [null]; |
6796 | | $args.push.apply($args, args); |
6797 | | return new (bind.apply(Target, $args))(); |
6798 | | } |
6799 | | // with altered newTarget, not support built-in constructors |
6800 | | var proto = newTarget.prototype; |
6801 | | var instance = create(isObject(proto) ? proto : Object.prototype); |
6802 | | var result = Function.apply.call(Target, instance, args); |
6803 | | return isObject(result) ? result : instance; |
6804 | | } |
6805 | | }); |
6806 | | |
6807 | | |
6808 | | /***/ }), |
6809 | | /* 245 */ |
6810 | | /***/ (function(module, exports, __webpack_require__) { |
6811 | | |
6812 | | // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) |
6813 | | var dP = __webpack_require__(11); |
6814 | | var $export = __webpack_require__(8); |
6815 | | var anObject = __webpack_require__(12); |
6816 | | var toPrimitive = __webpack_require__(16); |
6817 | | |
6818 | | // MS Edge has broken Reflect.defineProperty - throwing instead of returning false |
6819 | | $export($export.S + $export.F * __webpack_require__(7)(function () { |
6820 | | // eslint-disable-next-line no-undef |
6821 | | Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); |
6822 | | }), 'Reflect', { |
6823 | | defineProperty: function defineProperty(target, propertyKey, attributes) { |
6824 | | anObject(target); |
6825 | | propertyKey = toPrimitive(propertyKey, true); |
6826 | | anObject(attributes); |
6827 | | try { |
6828 | | dP.f(target, propertyKey, attributes); |
6829 | | return true; |
6830 | | } catch (e) { |
6831 | | return false; |
6832 | | } |
6833 | | } |
6834 | | }); |
6835 | | |
6836 | | |
6837 | | /***/ }), |
6838 | | /* 246 */ |
6839 | | /***/ (function(module, exports, __webpack_require__) { |
6840 | | |
6841 | | // 26.1.4 Reflect.deleteProperty(target, propertyKey) |
6842 | | var $export = __webpack_require__(8); |
6843 | | var gOPD = __webpack_require__(50).f; |
6844 | | var anObject = __webpack_require__(12); |
6845 | | |
6846 | | $export($export.S, 'Reflect', { |
6847 | | deleteProperty: function deleteProperty(target, propertyKey) { |
6848 | | var desc = gOPD(anObject(target), propertyKey); |
6849 | | return desc && !desc.configurable ? false : delete target[propertyKey]; |
6850 | | } |
6851 | | }); |
6852 | | |
6853 | | |
6854 | | /***/ }), |
6855 | | /* 247 */ |
6856 | | /***/ (function(module, exports, __webpack_require__) { |
6857 | | |
6858 | | 'use strict'; |
6859 | | // 26.1.5 Reflect.enumerate(target) |
6860 | | var $export = __webpack_require__(8); |
6861 | | var anObject = __webpack_require__(12); |
6862 | | var Enumerate = function (iterated) { |
6863 | | this._t = anObject(iterated); // target |
6864 | | this._i = 0; // next index |
6865 | | var keys = this._k = []; // keys |
6866 | | var key; |
6867 | | for (key in iterated) keys.push(key); |
6868 | | }; |
6869 | | __webpack_require__(130)(Enumerate, 'Object', function () { |
6870 | | var that = this; |
6871 | | var keys = that._k; |
6872 | | var key; |
6873 | | do { |
6874 | | if (that._i >= keys.length) return { value: undefined, done: true }; |
6875 | | } while (!((key = keys[that._i++]) in that._t)); |
6876 | | return { value: key, done: false }; |
6877 | | }); |
6878 | | |
6879 | | $export($export.S, 'Reflect', { |
6880 | | enumerate: function enumerate(target) { |
6881 | | return new Enumerate(target); |
6882 | | } |
6883 | | }); |
6884 | | |
6885 | | |
6886 | | /***/ }), |
6887 | | /* 248 */ |
6888 | | /***/ (function(module, exports, __webpack_require__) { |
6889 | | |
6890 | | // 26.1.6 Reflect.get(target, propertyKey [, receiver]) |
6891 | | var gOPD = __webpack_require__(50); |
6892 | | var getPrototypeOf = __webpack_require__(58); |
6893 | | var has = __webpack_require__(5); |
6894 | | var $export = __webpack_require__(8); |
6895 | | var isObject = __webpack_require__(13); |
6896 | | var anObject = __webpack_require__(12); |
6897 | | |
6898 | | function get(target, propertyKey /* , receiver */) { |
6899 | | var receiver = arguments.length < 3 ? target : arguments[2]; |
6900 | | var desc, proto; |
6901 | | if (anObject(target) === receiver) return target[propertyKey]; |
6902 | | if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') |
6903 | | ? desc.value |
6904 | | : desc.get !== undefined |
6905 | | ? desc.get.call(receiver) |
6906 | | : undefined; |
6907 | | if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); |
6908 | | } |
6909 | | |
6910 | | $export($export.S, 'Reflect', { get: get }); |
6911 | | |
6912 | | |
6913 | | /***/ }), |
6914 | | /* 249 */ |
6915 | | /***/ (function(module, exports, __webpack_require__) { |
6916 | | |
6917 | | // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) |
6918 | | var gOPD = __webpack_require__(50); |
6919 | | var $export = __webpack_require__(8); |
6920 | | var anObject = __webpack_require__(12); |
6921 | | |
6922 | | $export($export.S, 'Reflect', { |
6923 | | getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { |
6924 | | return gOPD.f(anObject(target), propertyKey); |
6925 | | } |
6926 | | }); |
6927 | | |
6928 | | |
6929 | | /***/ }), |
6930 | | /* 250 */ |
6931 | | /***/ (function(module, exports, __webpack_require__) { |
6932 | | |
6933 | | // 26.1.8 Reflect.getPrototypeOf(target) |
6934 | | var $export = __webpack_require__(8); |
6935 | | var getProto = __webpack_require__(58); |
6936 | | var anObject = __webpack_require__(12); |
6937 | | |
6938 | | $export($export.S, 'Reflect', { |
6939 | | getPrototypeOf: function getPrototypeOf(target) { |
6940 | | return getProto(anObject(target)); |
6941 | | } |
6942 | | }); |
6943 | | |
6944 | | |
6945 | | /***/ }), |
6946 | | /* 251 */ |
6947 | | /***/ (function(module, exports, __webpack_require__) { |
6948 | | |
6949 | | // 26.1.9 Reflect.has(target, propertyKey) |
6950 | | var $export = __webpack_require__(8); |
6951 | | |
6952 | | $export($export.S, 'Reflect', { |
6953 | | has: function has(target, propertyKey) { |
6954 | | return propertyKey in target; |
6955 | | } |
6956 | | }); |
6957 | | |
6958 | | |
6959 | | /***/ }), |
6960 | | /* 252 */ |
6961 | | /***/ (function(module, exports, __webpack_require__) { |
6962 | | |
6963 | | // 26.1.10 Reflect.isExtensible(target) |
6964 | | var $export = __webpack_require__(8); |
6965 | | var anObject = __webpack_require__(12); |
6966 | | var $isExtensible = Object.isExtensible; |
6967 | | |
6968 | | $export($export.S, 'Reflect', { |
6969 | | isExtensible: function isExtensible(target) { |
6970 | | anObject(target); |
6971 | | return $isExtensible ? $isExtensible(target) : true; |
6972 | | } |
6973 | | }); |
6974 | | |
6975 | | |
6976 | | /***/ }), |
6977 | | /* 253 */ |
6978 | | /***/ (function(module, exports, __webpack_require__) { |
6979 | | |
6980 | | // 26.1.11 Reflect.ownKeys(target) |
6981 | | var $export = __webpack_require__(8); |
6982 | | |
6983 | | $export($export.S, 'Reflect', { ownKeys: __webpack_require__(254) }); |
6984 | | |
6985 | | |
6986 | | /***/ }), |
6987 | | /* 254 */ |
6988 | | /***/ (function(module, exports, __webpack_require__) { |
6989 | | |
6990 | | // all object keys, includes non-enumerable and symbols |
6991 | | var gOPN = __webpack_require__(49); |
6992 | | var gOPS = __webpack_require__(42); |
6993 | | var anObject = __webpack_require__(12); |
6994 | | var Reflect = __webpack_require__(4).Reflect; |
6995 | | module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { |
6996 | | var keys = gOPN.f(anObject(it)); |
6997 | | var getSymbols = gOPS.f; |
6998 | | return getSymbols ? keys.concat(getSymbols(it)) : keys; |
6999 | | }; |
7000 | | |
7001 | | |
7002 | | /***/ }), |
7003 | | /* 255 */ |
7004 | | /***/ (function(module, exports, __webpack_require__) { |
7005 | | |
7006 | | // 26.1.12 Reflect.preventExtensions(target) |
7007 | | var $export = __webpack_require__(8); |
7008 | | var anObject = __webpack_require__(12); |
7009 | | var $preventExtensions = Object.preventExtensions; |
7010 | | |
7011 | | $export($export.S, 'Reflect', { |
7012 | | preventExtensions: function preventExtensions(target) { |
7013 | | anObject(target); |
7014 | | try { |
7015 | | if ($preventExtensions) $preventExtensions(target); |
7016 | | return true; |
7017 | | } catch (e) { |
7018 | | return false; |
7019 | | } |
7020 | | } |
7021 | | }); |
7022 | | |
7023 | | |
7024 | | /***/ }), |
7025 | | /* 256 */ |
7026 | | /***/ (function(module, exports, __webpack_require__) { |
7027 | | |
7028 | | // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) |
7029 | | var dP = __webpack_require__(11); |
7030 | | var gOPD = __webpack_require__(50); |
7031 | | var getPrototypeOf = __webpack_require__(58); |
7032 | | var has = __webpack_require__(5); |
7033 | | var $export = __webpack_require__(8); |
7034 | | var createDesc = __webpack_require__(17); |
7035 | | var anObject = __webpack_require__(12); |
7036 | | var isObject = __webpack_require__(13); |
7037 | | |
7038 | | function set(target, propertyKey, V /* , receiver */) { |
7039 | | var receiver = arguments.length < 4 ? target : arguments[3]; |
7040 | | var ownDesc = gOPD.f(anObject(target), propertyKey); |
7041 | | var existingDescriptor, proto; |
7042 | | if (!ownDesc) { |
7043 | | if (isObject(proto = getPrototypeOf(target))) { |
7044 | | return set(proto, propertyKey, V, receiver); |
7045 | | } |
7046 | | ownDesc = createDesc(0); |
7047 | | } |
7048 | | if (has(ownDesc, 'value')) { |
7049 | | if (ownDesc.writable === false || !isObject(receiver)) return false; |
7050 | | if (existingDescriptor = gOPD.f(receiver, propertyKey)) { |
7051 | | if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; |
7052 | | existingDescriptor.value = V; |
7053 | | dP.f(receiver, propertyKey, existingDescriptor); |
7054 | | } else dP.f(receiver, propertyKey, createDesc(0, V)); |
7055 | | return true; |
7056 | | } |
7057 | | return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); |
7058 | | } |
7059 | | |
7060 | | $export($export.S, 'Reflect', { set: set }); |
7061 | | |
7062 | | |
7063 | | /***/ }), |
7064 | | /* 257 */ |
7065 | | /***/ (function(module, exports, __webpack_require__) { |
7066 | | |
7067 | | // 26.1.14 Reflect.setPrototypeOf(target, proto) |
7068 | | var $export = __webpack_require__(8); |
7069 | | var setProto = __webpack_require__(72); |
7070 | | |
7071 | | if (setProto) $export($export.S, 'Reflect', { |
7072 | | setPrototypeOf: function setPrototypeOf(target, proto) { |
7073 | | setProto.check(target, proto); |
7074 | | try { |
7075 | | setProto.set(target, proto); |
7076 | | return true; |
7077 | | } catch (e) { |
7078 | | return false; |
7079 | | } |
7080 | | } |
7081 | | }); |
7082 | | |
7083 | | |
7084 | | /***/ }), |
7085 | | /* 258 */ |
7086 | | /***/ (function(module, exports, __webpack_require__) { |
7087 | | |
7088 | | 'use strict'; |
7089 | | // https://github.com/tc39/Array.prototype.includes |
7090 | | var $export = __webpack_require__(8); |
7091 | | var $includes = __webpack_require__(36)(true); |
7092 | | |
7093 | | $export($export.P, 'Array', { |
7094 | | includes: function includes(el /* , fromIndex = 0 */) { |
7095 | | return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); |
7096 | | } |
7097 | | }); |
7098 | | |
7099 | | __webpack_require__(187)('includes'); |
7100 | | |
7101 | | |
7102 | | /***/ }), |
7103 | | /* 259 */ |
7104 | | /***/ (function(module, exports, __webpack_require__) { |
7105 | | |
7106 | | 'use strict'; |
7107 | | // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap |
7108 | | var $export = __webpack_require__(8); |
7109 | | var flattenIntoArray = __webpack_require__(260); |
7110 | | var toObject = __webpack_require__(57); |
7111 | | var toLength = __webpack_require__(37); |
7112 | | var aFunction = __webpack_require__(21); |
7113 | | var arraySpeciesCreate = __webpack_require__(174); |
7114 | | |
7115 | | $export($export.P, 'Array', { |
7116 | | flatMap: function flatMap(callbackfn /* , thisArg */) { |
7117 | | var O = toObject(this); |
7118 | | var sourceLen, A; |
7119 | | aFunction(callbackfn); |
7120 | | sourceLen = toLength(O.length); |
7121 | | A = arraySpeciesCreate(O, 0); |
7122 | | flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); |
7123 | | return A; |
7124 | | } |
7125 | | }); |
7126 | | |
7127 | | __webpack_require__(187)('flatMap'); |
7128 | | |
7129 | | |
7130 | | /***/ }), |
7131 | | /* 260 */ |
7132 | | /***/ (function(module, exports, __webpack_require__) { |
7133 | | |
7134 | | 'use strict'; |
7135 | | // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray |
7136 | | var isArray = __webpack_require__(44); |
7137 | | var isObject = __webpack_require__(13); |
7138 | | var toLength = __webpack_require__(37); |
7139 | | var ctx = __webpack_require__(20); |
7140 | | var IS_CONCAT_SPREADABLE = __webpack_require__(26)('isConcatSpreadable'); |
7141 | | |
7142 | | function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { |
7143 | | var targetIndex = start; |
7144 | | var sourceIndex = 0; |
7145 | | var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; |
7146 | | var element, spreadable; |
7147 | | |
7148 | | while (sourceIndex < sourceLen) { |
7149 | | if (sourceIndex in source) { |
7150 | | element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; |
7151 | | |
7152 | | spreadable = false; |
7153 | | if (isObject(element)) { |
7154 | | spreadable = element[IS_CONCAT_SPREADABLE]; |
7155 | | spreadable = spreadable !== undefined ? !!spreadable : isArray(element); |
7156 | | } |
7157 | | |
7158 | | if (spreadable && depth > 0) { |
7159 | | targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; |
7160 | | } else { |
7161 | | if (targetIndex >= 0x1fffffffffffff) throw TypeError(); |
7162 | | target[targetIndex] = element; |
7163 | | } |
7164 | | |
7165 | | targetIndex++; |
7166 | | } |
7167 | | sourceIndex++; |
7168 | | } |
7169 | | return targetIndex; |
7170 | | } |
7171 | | |
7172 | | module.exports = flattenIntoArray; |
7173 | | |
7174 | | |
7175 | | /***/ }), |
7176 | | /* 261 */ |
7177 | | /***/ (function(module, exports, __webpack_require__) { |
7178 | | |
7179 | | 'use strict'; |
7180 | | // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten |
7181 | | var $export = __webpack_require__(8); |
7182 | | var flattenIntoArray = __webpack_require__(260); |
7183 | | var toObject = __webpack_require__(57); |
7184 | | var toLength = __webpack_require__(37); |
7185 | | var toInteger = __webpack_require__(38); |
7186 | | var arraySpeciesCreate = __webpack_require__(174); |
7187 | | |
7188 | | $export($export.P, 'Array', { |
7189 | | flatten: function flatten(/* depthArg = 1 */) { |
7190 | | var depthArg = arguments[0]; |
7191 | | var O = toObject(this); |
7192 | | var sourceLen = toLength(O.length); |
7193 | | var A = arraySpeciesCreate(O, 0); |
7194 | | flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); |
7195 | | return A; |
7196 | | } |
7197 | | }); |
7198 | | |
7199 | | __webpack_require__(187)('flatten'); |
7200 | | |
7201 | | |
7202 | | /***/ }), |
7203 | | /* 262 */ |
7204 | | /***/ (function(module, exports, __webpack_require__) { |
7205 | | |
7206 | | 'use strict'; |
7207 | | // https://github.com/mathiasbynens/String.prototype.at |
7208 | | var $export = __webpack_require__(8); |
7209 | | var $at = __webpack_require__(127)(true); |
7210 | | |
7211 | | $export($export.P, 'String', { |
7212 | | at: function at(pos) { |
7213 | | return $at(this, pos); |
7214 | | } |
7215 | | }); |
7216 | | |
7217 | | |
7218 | | /***/ }), |
7219 | | /* 263 */ |
7220 | | /***/ (function(module, exports, __webpack_require__) { |
7221 | | |
7222 | | 'use strict'; |
7223 | | // https://github.com/tc39/proposal-string-pad-start-end |
7224 | | var $export = __webpack_require__(8); |
7225 | | var $pad = __webpack_require__(264); |
7226 | | var userAgent = __webpack_require__(217); |
7227 | | |
7228 | | // https://github.com/zloirock/core-js/issues/280 |
7229 | | $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { |
7230 | | padStart: function padStart(maxLength /* , fillString = ' ' */) { |
7231 | | return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); |
7232 | | } |
7233 | | }); |
7234 | | |
7235 | | |
7236 | | /***/ }), |
7237 | | /* 264 */ |
7238 | | /***/ (function(module, exports, __webpack_require__) { |
7239 | | |
7240 | | // https://github.com/tc39/proposal-string-pad-start-end |
7241 | | var toLength = __webpack_require__(37); |
7242 | | var repeat = __webpack_require__(90); |
7243 | | var defined = __webpack_require__(35); |
7244 | | |
7245 | | module.exports = function (that, maxLength, fillString, left) { |
7246 | | var S = String(defined(that)); |
7247 | | var stringLength = S.length; |
7248 | | var fillStr = fillString === undefined ? ' ' : String(fillString); |
7249 | | var intMaxLength = toLength(maxLength); |
7250 | | if (intMaxLength <= stringLength || fillStr == '') return S; |
7251 | | var fillLen = intMaxLength - stringLength; |
7252 | | var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); |
7253 | | if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); |
7254 | | return left ? stringFiller + S : S + stringFiller; |
7255 | | }; |
7256 | | |
7257 | | |
7258 | | /***/ }), |
7259 | | /* 265 */ |
7260 | | /***/ (function(module, exports, __webpack_require__) { |
7261 | | |
7262 | | 'use strict'; |
7263 | | // https://github.com/tc39/proposal-string-pad-start-end |
7264 | | var $export = __webpack_require__(8); |
7265 | | var $pad = __webpack_require__(264); |
7266 | | var userAgent = __webpack_require__(217); |
7267 | | |
7268 | | // https://github.com/zloirock/core-js/issues/280 |
7269 | | $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { |
7270 | | padEnd: function padEnd(maxLength /* , fillString = ' ' */) { |
7271 | | return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); |
7272 | | } |
7273 | | }); |
7274 | | |
7275 | | |
7276 | | /***/ }), |
7277 | | /* 266 */ |
7278 | | /***/ (function(module, exports, __webpack_require__) { |
7279 | | |
7280 | | 'use strict'; |
7281 | | // https://github.com/sebmarkbage/ecmascript-string-left-right-trim |
7282 | | __webpack_require__(82)('trimLeft', function ($trim) { |
7283 | | return function trimLeft() { |
7284 | | return $trim(this, 1); |
7285 | | }; |
7286 | | }, 'trimStart'); |
7287 | | |
7288 | | |
7289 | | /***/ }), |
7290 | | /* 267 */ |
7291 | | /***/ (function(module, exports, __webpack_require__) { |
7292 | | |
7293 | | 'use strict'; |
7294 | | // https://github.com/sebmarkbage/ecmascript-string-left-right-trim |
7295 | | __webpack_require__(82)('trimRight', function ($trim) { |
7296 | | return function trimRight() { |
7297 | | return $trim(this, 2); |
7298 | | }; |
7299 | | }, 'trimEnd'); |
7300 | | |
7301 | | |
7302 | | /***/ }), |
7303 | | /* 268 */ |
7304 | | /***/ (function(module, exports, __webpack_require__) { |
7305 | | |
7306 | | 'use strict'; |
7307 | | // https://tc39.github.io/String.prototype.matchAll/ |
7308 | | var $export = __webpack_require__(8); |
7309 | | var defined = __webpack_require__(35); |
7310 | | var toLength = __webpack_require__(37); |
7311 | | var isRegExp = __webpack_require__(134); |
7312 | | var getFlags = __webpack_require__(197); |
7313 | | var RegExpProto = RegExp.prototype; |
7314 | | |
7315 | | var $RegExpStringIterator = function (regexp, string) { |
7316 | | this._r = regexp; |
7317 | | this._s = string; |
7318 | | }; |
7319 | | |
7320 | | __webpack_require__(130)($RegExpStringIterator, 'RegExp String', function next() { |
7321 | | var match = this._r.exec(this._s); |
7322 | | return { value: match, done: match === null }; |
7323 | | }); |
7324 | | |
7325 | | $export($export.P, 'String', { |
7326 | | matchAll: function matchAll(regexp) { |
7327 | | defined(this); |
7328 | | if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); |
7329 | | var S = String(this); |
7330 | | var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); |
7331 | | var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); |
7332 | | rx.lastIndex = toLength(regexp.lastIndex); |
7333 | | return new $RegExpStringIterator(rx, S); |
7334 | | } |
7335 | | }); |
7336 | | |
7337 | | |
7338 | | /***/ }), |
7339 | | /* 269 */ |
7340 | | /***/ (function(module, exports, __webpack_require__) { |
7341 | | |
7342 | | __webpack_require__(28)('asyncIterator'); |
7343 | | |
7344 | | |
7345 | | /***/ }), |
7346 | | /* 270 */ |
7347 | | /***/ (function(module, exports, __webpack_require__) { |
7348 | | |
7349 | | __webpack_require__(28)('observable'); |
7350 | | |
7351 | | |
7352 | | /***/ }), |
7353 | | /* 271 */ |
7354 | | /***/ (function(module, exports, __webpack_require__) { |
7355 | | |
7356 | | // https://github.com/tc39/proposal-object-getownpropertydescriptors |
7357 | | var $export = __webpack_require__(8); |
7358 | | var ownKeys = __webpack_require__(254); |
7359 | | var toIObject = __webpack_require__(32); |
7360 | | var gOPD = __webpack_require__(50); |
7361 | | var createProperty = __webpack_require__(164); |
7362 | | |
7363 | | $export($export.S, 'Object', { |
7364 | | getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { |
7365 | | var O = toIObject(object); |
7366 | | var getDesc = gOPD.f; |
7367 | | var keys = ownKeys(O); |
7368 | | var result = {}; |
7369 | | var i = 0; |
7370 | | var key, desc; |
7371 | | while (keys.length > i) { |
7372 | | desc = getDesc(O, key = keys[i++]); |
7373 | | if (desc !== undefined) createProperty(result, key, desc); |
7374 | | } |
7375 | | return result; |
7376 | | } |
7377 | | }); |
7378 | | |
7379 | | |
7380 | | /***/ }), |
7381 | | /* 272 */ |
7382 | | /***/ (function(module, exports, __webpack_require__) { |
7383 | | |
7384 | | // https://github.com/tc39/proposal-object-values-entries |
7385 | | var $export = __webpack_require__(8); |
7386 | | var $values = __webpack_require__(273)(false); |
7387 | | |
7388 | | $export($export.S, 'Object', { |
7389 | | values: function values(it) { |
7390 | | return $values(it); |
7391 | | } |
7392 | | }); |
7393 | | |
7394 | | |
7395 | | /***/ }), |
7396 | | /* 273 */ |
7397 | | /***/ (function(module, exports, __webpack_require__) { |
7398 | | |
7399 | | var getKeys = __webpack_require__(30); |
7400 | | var toIObject = __webpack_require__(32); |
7401 | | var isEnum = __webpack_require__(43).f; |
7402 | | module.exports = function (isEntries) { |
7403 | | return function (it) { |
7404 | | var O = toIObject(it); |
7405 | | var keys = getKeys(O); |
7406 | | var length = keys.length; |
7407 | | var i = 0; |
7408 | | var result = []; |
7409 | | var key; |
7410 | | while (length > i) if (isEnum.call(O, key = keys[i++])) { |
7411 | | result.push(isEntries ? [key, O[key]] : O[key]); |
7412 | | } return result; |
7413 | | }; |
7414 | | }; |
7415 | | |
7416 | | |
7417 | | /***/ }), |
7418 | | /* 274 */ |
7419 | | /***/ (function(module, exports, __webpack_require__) { |
7420 | | |
7421 | | // https://github.com/tc39/proposal-object-values-entries |
7422 | | var $export = __webpack_require__(8); |
7423 | | var $entries = __webpack_require__(273)(true); |
7424 | | |
7425 | | $export($export.S, 'Object', { |
7426 | | entries: function entries(it) { |
7427 | | return $entries(it); |
7428 | | } |
7429 | | }); |
7430 | | |
7431 | | |
7432 | | /***/ }), |
7433 | | /* 275 */ |
7434 | | /***/ (function(module, exports, __webpack_require__) { |
7435 | | |
7436 | | 'use strict'; |
7437 | | var $export = __webpack_require__(8); |
7438 | | var toObject = __webpack_require__(57); |
7439 | | var aFunction = __webpack_require__(21); |
7440 | | var $defineProperty = __webpack_require__(11); |
7441 | | |
7442 | | // B.2.2.2 Object.prototype.__defineGetter__(P, getter) |
7443 | | __webpack_require__(6) && $export($export.P + __webpack_require__(276), 'Object', { |
7444 | | __defineGetter__: function __defineGetter__(P, getter) { |
7445 | | $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); |
7446 | | } |
7447 | | }); |
7448 | | |
7449 | | |
7450 | | /***/ }), |
7451 | | /* 276 */ |
7452 | | /***/ (function(module, exports, __webpack_require__) { |
7453 | | |
7454 | | 'use strict'; |
7455 | | // Forced replacement prototype accessors methods |
7456 | | module.exports = __webpack_require__(24) || !__webpack_require__(7)(function () { |
7457 | | var K = Math.random(); |
7458 | | // In FF throws only define methods |
7459 | | // eslint-disable-next-line no-undef, no-useless-call |
7460 | | __defineSetter__.call(null, K, function () { /* empty */ }); |
7461 | | delete __webpack_require__(4)[K]; |
7462 | | }); |
7463 | | |
7464 | | |
7465 | | /***/ }), |
7466 | | /* 277 */ |
7467 | | /***/ (function(module, exports, __webpack_require__) { |
7468 | | |
7469 | | 'use strict'; |
7470 | | var $export = __webpack_require__(8); |
7471 | | var toObject = __webpack_require__(57); |
7472 | | var aFunction = __webpack_require__(21); |
7473 | | var $defineProperty = __webpack_require__(11); |
7474 | | |
7475 | | // B.2.2.3 Object.prototype.__defineSetter__(P, setter) |
7476 | | __webpack_require__(6) && $export($export.P + __webpack_require__(276), 'Object', { |
7477 | | __defineSetter__: function __defineSetter__(P, setter) { |
7478 | | $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); |
7479 | | } |
7480 | | }); |
7481 | | |
7482 | | |
7483 | | /***/ }), |
7484 | | /* 278 */ |
7485 | | /***/ (function(module, exports, __webpack_require__) { |
7486 | | |
7487 | | 'use strict'; |
7488 | | var $export = __webpack_require__(8); |
7489 | | var toObject = __webpack_require__(57); |
7490 | | var toPrimitive = __webpack_require__(16); |
7491 | | var getPrototypeOf = __webpack_require__(58); |
7492 | | var getOwnPropertyDescriptor = __webpack_require__(50).f; |
7493 | | |
7494 | | // B.2.2.4 Object.prototype.__lookupGetter__(P) |
7495 | | __webpack_require__(6) && $export($export.P + __webpack_require__(276), 'Object', { |
7496 | | __lookupGetter__: function __lookupGetter__(P) { |
7497 | | var O = toObject(this); |
7498 | | var K = toPrimitive(P, true); |
7499 | | var D; |
7500 | | do { |
7501 | | if (D = getOwnPropertyDescriptor(O, K)) return D.get; |
7502 | | } while (O = getPrototypeOf(O)); |
7503 | | } |
7504 | | }); |
7505 | | |
7506 | | |
7507 | | /***/ }), |
7508 | | /* 279 */ |
7509 | | /***/ (function(module, exports, __webpack_require__) { |
7510 | | |
7511 | | 'use strict'; |
7512 | | var $export = __webpack_require__(8); |
7513 | | var toObject = __webpack_require__(57); |
7514 | | var toPrimitive = __webpack_require__(16); |
7515 | | var getPrototypeOf = __webpack_require__(58); |
7516 | | var getOwnPropertyDescriptor = __webpack_require__(50).f; |
7517 | | |
7518 | | // B.2.2.5 Object.prototype.__lookupSetter__(P) |
7519 | | __webpack_require__(6) && $export($export.P + __webpack_require__(276), 'Object', { |
7520 | | __lookupSetter__: function __lookupSetter__(P) { |
7521 | | var O = toObject(this); |
7522 | | var K = toPrimitive(P, true); |
7523 | | var D; |
7524 | | do { |
7525 | | if (D = getOwnPropertyDescriptor(O, K)) return D.set; |
7526 | | } while (O = getPrototypeOf(O)); |
7527 | | } |
7528 | | }); |
7529 | | |
7530 | | |
7531 | | /***/ }), |
7532 | | /* 280 */ |
7533 | | /***/ (function(module, exports, __webpack_require__) { |
7534 | | |
7535 | | // https://github.com/DavidBruant/Map-Set.prototype.toJSON |
7536 | | var $export = __webpack_require__(8); |
7537 | | |
7538 | | $export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(281)('Map') }); |
7539 | | |
7540 | | |
7541 | | /***/ }), |
7542 | | /* 281 */ |
7543 | | /***/ (function(module, exports, __webpack_require__) { |
7544 | | |
7545 | | // https://github.com/DavidBruant/Map-Set.prototype.toJSON |
7546 | | var classof = __webpack_require__(74); |
7547 | | var from = __webpack_require__(282); |
7548 | | module.exports = function (NAME) { |
7549 | | return function toJSON() { |
7550 | | if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); |
7551 | | return from(this); |
7552 | | }; |
7553 | | }; |
7554 | | |
7555 | | |
7556 | | /***/ }), |
7557 | | /* 282 */ |
7558 | | /***/ (function(module, exports, __webpack_require__) { |
7559 | | |
7560 | | var forOf = __webpack_require__(212); |
7561 | | |
7562 | | module.exports = function (iter, ITERATOR) { |
7563 | | var result = []; |
7564 | | forOf(iter, false, result.push, result, ITERATOR); |
7565 | | return result; |
7566 | | }; |
7567 | | |
7568 | | |
7569 | | /***/ }), |
7570 | | /* 283 */ |
7571 | | /***/ (function(module, exports, __webpack_require__) { |
7572 | | |
7573 | | // https://github.com/DavidBruant/Map-Set.prototype.toJSON |
7574 | | var $export = __webpack_require__(8); |
7575 | | |
7576 | | $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(281)('Set') }); |
7577 | | |
7578 | | |
7579 | | /***/ }), |
7580 | | /* 284 */ |
7581 | | /***/ (function(module, exports, __webpack_require__) { |
7582 | | |
7583 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of |
7584 | | __webpack_require__(285)('Map'); |
7585 | | |
7586 | | |
7587 | | /***/ }), |
7588 | | /* 285 */ |
7589 | | /***/ (function(module, exports, __webpack_require__) { |
7590 | | |
7591 | | 'use strict'; |
7592 | | // https://tc39.github.io/proposal-setmap-offrom/ |
7593 | | var $export = __webpack_require__(8); |
7594 | | |
7595 | | module.exports = function (COLLECTION) { |
7596 | | $export($export.S, COLLECTION, { of: function of() { |
7597 | | var length = arguments.length; |
7598 | | var A = new Array(length); |
7599 | | while (length--) A[length] = arguments[length]; |
7600 | | return new this(A); |
7601 | | } }); |
7602 | | }; |
7603 | | |
7604 | | |
7605 | | /***/ }), |
7606 | | /* 286 */ |
7607 | | /***/ (function(module, exports, __webpack_require__) { |
7608 | | |
7609 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of |
7610 | | __webpack_require__(285)('Set'); |
7611 | | |
7612 | | |
7613 | | /***/ }), |
7614 | | /* 287 */ |
7615 | | /***/ (function(module, exports, __webpack_require__) { |
7616 | | |
7617 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of |
7618 | | __webpack_require__(285)('WeakMap'); |
7619 | | |
7620 | | |
7621 | | /***/ }), |
7622 | | /* 288 */ |
7623 | | /***/ (function(module, exports, __webpack_require__) { |
7624 | | |
7625 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of |
7626 | | __webpack_require__(285)('WeakSet'); |
7627 | | |
7628 | | |
7629 | | /***/ }), |
7630 | | /* 289 */ |
7631 | | /***/ (function(module, exports, __webpack_require__) { |
7632 | | |
7633 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from |
7634 | | __webpack_require__(290)('Map'); |
7635 | | |
7636 | | |
7637 | | /***/ }), |
7638 | | /* 290 */ |
7639 | | /***/ (function(module, exports, __webpack_require__) { |
7640 | | |
7641 | | 'use strict'; |
7642 | | // https://tc39.github.io/proposal-setmap-offrom/ |
7643 | | var $export = __webpack_require__(8); |
7644 | | var aFunction = __webpack_require__(21); |
7645 | | var ctx = __webpack_require__(20); |
7646 | | var forOf = __webpack_require__(212); |
7647 | | |
7648 | | module.exports = function (COLLECTION) { |
7649 | | $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { |
7650 | | var mapFn = arguments[1]; |
7651 | | var mapping, A, n, cb; |
7652 | | aFunction(this); |
7653 | | mapping = mapFn !== undefined; |
7654 | | if (mapping) aFunction(mapFn); |
7655 | | if (source == undefined) return new this(); |
7656 | | A = []; |
7657 | | if (mapping) { |
7658 | | n = 0; |
7659 | | cb = ctx(mapFn, arguments[2], 2); |
7660 | | forOf(source, false, function (nextItem) { |
7661 | | A.push(cb(nextItem, n++)); |
7662 | | }); |
7663 | | } else { |
7664 | | forOf(source, false, A.push, A); |
7665 | | } |
7666 | | return new this(A); |
7667 | | } }); |
7668 | | }; |
7669 | | |
7670 | | |
7671 | | /***/ }), |
7672 | | /* 291 */ |
7673 | | /***/ (function(module, exports, __webpack_require__) { |
7674 | | |
7675 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from |
7676 | | __webpack_require__(290)('Set'); |
7677 | | |
7678 | | |
7679 | | /***/ }), |
7680 | | /* 292 */ |
7681 | | /***/ (function(module, exports, __webpack_require__) { |
7682 | | |
7683 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from |
7684 | | __webpack_require__(290)('WeakMap'); |
7685 | | |
7686 | | |
7687 | | /***/ }), |
7688 | | /* 293 */ |
7689 | | /***/ (function(module, exports, __webpack_require__) { |
7690 | | |
7691 | | // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from |
7692 | | __webpack_require__(290)('WeakSet'); |
7693 | | |
7694 | | |
7695 | | /***/ }), |
7696 | | /* 294 */ |
7697 | | /***/ (function(module, exports, __webpack_require__) { |
7698 | | |
7699 | | // https://github.com/tc39/proposal-global |
7700 | | var $export = __webpack_require__(8); |
7701 | | |
7702 | | $export($export.G, { global: __webpack_require__(4) }); |
7703 | | |
7704 | | |
7705 | | /***/ }), |
7706 | | /* 295 */ |
7707 | | /***/ (function(module, exports, __webpack_require__) { |
7708 | | |
7709 | | // https://github.com/tc39/proposal-global |
7710 | | var $export = __webpack_require__(8); |
7711 | | |
7712 | | $export($export.S, 'System', { global: __webpack_require__(4) }); |
7713 | | |
7714 | | |
7715 | | /***/ }), |
7716 | | /* 296 */ |
7717 | | /***/ (function(module, exports, __webpack_require__) { |
7718 | | |
7719 | | // https://github.com/ljharb/proposal-is-error |
7720 | | var $export = __webpack_require__(8); |
7721 | | var cof = __webpack_require__(34); |
7722 | | |
7723 | | $export($export.S, 'Error', { |
7724 | | isError: function isError(it) { |
7725 | | return cof(it) === 'Error'; |
7726 | | } |
7727 | | }); |
7728 | | |
7729 | | |
7730 | | /***/ }), |
7731 | | /* 297 */ |
7732 | | /***/ (function(module, exports, __webpack_require__) { |
7733 | | |
7734 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7735 | | var $export = __webpack_require__(8); |
7736 | | |
7737 | | $export($export.S, 'Math', { |
7738 | | clamp: function clamp(x, lower, upper) { |
7739 | | return Math.min(upper, Math.max(lower, x)); |
7740 | | } |
7741 | | }); |
7742 | | |
7743 | | |
7744 | | /***/ }), |
7745 | | /* 298 */ |
7746 | | /***/ (function(module, exports, __webpack_require__) { |
7747 | | |
7748 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7749 | | var $export = __webpack_require__(8); |
7750 | | |
7751 | | $export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); |
7752 | | |
7753 | | |
7754 | | /***/ }), |
7755 | | /* 299 */ |
7756 | | /***/ (function(module, exports, __webpack_require__) { |
7757 | | |
7758 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7759 | | var $export = __webpack_require__(8); |
7760 | | var RAD_PER_DEG = 180 / Math.PI; |
7761 | | |
7762 | | $export($export.S, 'Math', { |
7763 | | degrees: function degrees(radians) { |
7764 | | return radians * RAD_PER_DEG; |
7765 | | } |
7766 | | }); |
7767 | | |
7768 | | |
7769 | | /***/ }), |
7770 | | /* 300 */ |
7771 | | /***/ (function(module, exports, __webpack_require__) { |
7772 | | |
7773 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7774 | | var $export = __webpack_require__(8); |
7775 | | var scale = __webpack_require__(301); |
7776 | | var fround = __webpack_require__(113); |
7777 | | |
7778 | | $export($export.S, 'Math', { |
7779 | | fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { |
7780 | | return fround(scale(x, inLow, inHigh, outLow, outHigh)); |
7781 | | } |
7782 | | }); |
7783 | | |
7784 | | |
7785 | | /***/ }), |
7786 | | /* 301 */ |
7787 | | /***/ (function(module, exports) { |
7788 | | |
7789 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7790 | | module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { |
7791 | | if ( |
7792 | | arguments.length === 0 |
7793 | | // eslint-disable-next-line no-self-compare |
7794 | | || x != x |
7795 | | // eslint-disable-next-line no-self-compare |
7796 | | || inLow != inLow |
7797 | | // eslint-disable-next-line no-self-compare |
7798 | | || inHigh != inHigh |
7799 | | // eslint-disable-next-line no-self-compare |
7800 | | || outLow != outLow |
7801 | | // eslint-disable-next-line no-self-compare |
7802 | | || outHigh != outHigh |
7803 | | ) return NaN; |
7804 | | if (x === Infinity || x === -Infinity) return x; |
7805 | | return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; |
7806 | | }; |
7807 | | |
7808 | | |
7809 | | /***/ }), |
7810 | | /* 302 */ |
7811 | | /***/ (function(module, exports, __webpack_require__) { |
7812 | | |
7813 | | // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 |
7814 | | var $export = __webpack_require__(8); |
7815 | | |
7816 | | $export($export.S, 'Math', { |
7817 | | iaddh: function iaddh(x0, x1, y0, y1) { |
7818 | | var $x0 = x0 >>> 0; |
7819 | | var $x1 = x1 >>> 0; |
7820 | | var $y0 = y0 >>> 0; |
7821 | | return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; |
7822 | | } |
7823 | | }); |
7824 | | |
7825 | | |
7826 | | /***/ }), |
7827 | | /* 303 */ |
7828 | | /***/ (function(module, exports, __webpack_require__) { |
7829 | | |
7830 | | // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 |
7831 | | var $export = __webpack_require__(8); |
7832 | | |
7833 | | $export($export.S, 'Math', { |
7834 | | isubh: function isubh(x0, x1, y0, y1) { |
7835 | | var $x0 = x0 >>> 0; |
7836 | | var $x1 = x1 >>> 0; |
7837 | | var $y0 = y0 >>> 0; |
7838 | | return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; |
7839 | | } |
7840 | | }); |
7841 | | |
7842 | | |
7843 | | /***/ }), |
7844 | | /* 304 */ |
7845 | | /***/ (function(module, exports, __webpack_require__) { |
7846 | | |
7847 | | // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 |
7848 | | var $export = __webpack_require__(8); |
7849 | | |
7850 | | $export($export.S, 'Math', { |
7851 | | imulh: function imulh(u, v) { |
7852 | | var UINT16 = 0xffff; |
7853 | | var $u = +u; |
7854 | | var $v = +v; |
7855 | | var u0 = $u & UINT16; |
7856 | | var v0 = $v & UINT16; |
7857 | | var u1 = $u >> 16; |
7858 | | var v1 = $v >> 16; |
7859 | | var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); |
7860 | | return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); |
7861 | | } |
7862 | | }); |
7863 | | |
7864 | | |
7865 | | /***/ }), |
7866 | | /* 305 */ |
7867 | | /***/ (function(module, exports, __webpack_require__) { |
7868 | | |
7869 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7870 | | var $export = __webpack_require__(8); |
7871 | | |
7872 | | $export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); |
7873 | | |
7874 | | |
7875 | | /***/ }), |
7876 | | /* 306 */ |
7877 | | /***/ (function(module, exports, __webpack_require__) { |
7878 | | |
7879 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7880 | | var $export = __webpack_require__(8); |
7881 | | var DEG_PER_RAD = Math.PI / 180; |
7882 | | |
7883 | | $export($export.S, 'Math', { |
7884 | | radians: function radians(degrees) { |
7885 | | return degrees * DEG_PER_RAD; |
7886 | | } |
7887 | | }); |
7888 | | |
7889 | | |
7890 | | /***/ }), |
7891 | | /* 307 */ |
7892 | | /***/ (function(module, exports, __webpack_require__) { |
7893 | | |
7894 | | // https://rwaldron.github.io/proposal-math-extensions/ |
7895 | | var $export = __webpack_require__(8); |
7896 | | |
7897 | | $export($export.S, 'Math', { scale: __webpack_require__(301) }); |
7898 | | |
7899 | | |
7900 | | /***/ }), |
7901 | | /* 308 */ |
7902 | | /***/ (function(module, exports, __webpack_require__) { |
7903 | | |
7904 | | // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 |
7905 | | var $export = __webpack_require__(8); |
7906 | | |
7907 | | $export($export.S, 'Math', { |
7908 | | umulh: function umulh(u, v) { |
7909 | | var UINT16 = 0xffff; |
7910 | | var $u = +u; |
7911 | | var $v = +v; |
7912 | | var u0 = $u & UINT16; |
7913 | | var v0 = $v & UINT16; |
7914 | | var u1 = $u >>> 16; |
7915 | | var v1 = $v >>> 16; |
7916 | | var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); |
7917 | | return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); |
7918 | | } |
7919 | | }); |
7920 | | |
7921 | | |
7922 | | /***/ }), |
7923 | | /* 309 */ |
7924 | | /***/ (function(module, exports, __webpack_require__) { |
7925 | | |
7926 | | // http://jfbastien.github.io/papers/Math.signbit.html |
7927 | | var $export = __webpack_require__(8); |
7928 | | |
7929 | | $export($export.S, 'Math', { signbit: function signbit(x) { |
7930 | | // eslint-disable-next-line no-self-compare |
7931 | | return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; |
7932 | | } }); |
7933 | | |
7934 | | |
7935 | | /***/ }), |
7936 | | /* 310 */ |
7937 | | /***/ (function(module, exports, __webpack_require__) { |
7938 | | |
7939 | | // https://github.com/tc39/proposal-promise-finally |
7940 | | 'use strict'; |
7941 | | var $export = __webpack_require__(8); |
7942 | | var core = __webpack_require__(9); |
7943 | | var global = __webpack_require__(4); |
7944 | | var speciesConstructor = __webpack_require__(209); |
7945 | | var promiseResolve = __webpack_require__(218); |
7946 | | |
7947 | | $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { |
7948 | | var C = speciesConstructor(this, core.Promise || global.Promise); |
7949 | | var isFunction = typeof onFinally == 'function'; |
7950 | | return this.then( |
7951 | | isFunction ? function (x) { |
7952 | | return promiseResolve(C, onFinally()).then(function () { return x; }); |
7953 | | } : onFinally, |
7954 | | isFunction ? function (e) { |
7955 | | return promiseResolve(C, onFinally()).then(function () { throw e; }); |
7956 | | } : onFinally |
7957 | | ); |
7958 | | } }); |
7959 | | |
7960 | | |
7961 | | /***/ }), |
7962 | | /* 311 */ |
7963 | | /***/ (function(module, exports, __webpack_require__) { |
7964 | | |
7965 | | 'use strict'; |
7966 | | // https://github.com/tc39/proposal-promise-try |
7967 | | var $export = __webpack_require__(8); |
7968 | | var newPromiseCapability = __webpack_require__(215); |
7969 | | var perform = __webpack_require__(216); |
7970 | | |
7971 | | $export($export.S, 'Promise', { 'try': function (callbackfn) { |
7972 | | var promiseCapability = newPromiseCapability.f(this); |
7973 | | var result = perform(callbackfn); |
7974 | | (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); |
7975 | | return promiseCapability.promise; |
7976 | | } }); |
7977 | | |
7978 | | |
7979 | | /***/ }), |
7980 | | /* 312 */ |
7981 | | /***/ (function(module, exports, __webpack_require__) { |
7982 | | |
7983 | | var metadata = __webpack_require__(313); |
7984 | | var anObject = __webpack_require__(12); |
7985 | | var toMetaKey = metadata.key; |
7986 | | var ordinaryDefineOwnMetadata = metadata.set; |
7987 | | |
7988 | | metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { |
7989 | | ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); |
7990 | | } }); |
7991 | | |
7992 | | |
7993 | | /***/ }), |
7994 | | /* 313 */ |
7995 | | /***/ (function(module, exports, __webpack_require__) { |
7996 | | |
7997 | | var Map = __webpack_require__(220); |
7998 | | var $export = __webpack_require__(8); |
7999 | | var shared = __webpack_require__(23)('metadata'); |
8000 | | var store = shared.store || (shared.store = new (__webpack_require__(225))()); |
8001 | | |
8002 | | var getOrCreateMetadataMap = function (target, targetKey, create) { |
8003 | | var targetMetadata = store.get(target); |
8004 | | if (!targetMetadata) { |
8005 | | if (!create) return undefined; |
8006 | | store.set(target, targetMetadata = new Map()); |
8007 | | } |
8008 | | var keyMetadata = targetMetadata.get(targetKey); |
8009 | | if (!keyMetadata) { |
8010 | | if (!create) return undefined; |
8011 | | targetMetadata.set(targetKey, keyMetadata = new Map()); |
8012 | | } return keyMetadata; |
8013 | | }; |
8014 | | var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { |
8015 | | var metadataMap = getOrCreateMetadataMap(O, P, false); |
8016 | | return metadataMap === undefined ? false : metadataMap.has(MetadataKey); |
8017 | | }; |
8018 | | var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { |
8019 | | var metadataMap = getOrCreateMetadataMap(O, P, false); |
8020 | | return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); |
8021 | | }; |
8022 | | var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { |
8023 | | getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); |
8024 | | }; |
8025 | | var ordinaryOwnMetadataKeys = function (target, targetKey) { |
8026 | | var metadataMap = getOrCreateMetadataMap(target, targetKey, false); |
8027 | | var keys = []; |
8028 | | if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); |
8029 | | return keys; |
8030 | | }; |
8031 | | var toMetaKey = function (it) { |
8032 | | return it === undefined || typeof it == 'symbol' ? it : String(it); |
8033 | | }; |
8034 | | var exp = function (O) { |
8035 | | $export($export.S, 'Reflect', O); |
8036 | | }; |
8037 | | |
8038 | | module.exports = { |
8039 | | store: store, |
8040 | | map: getOrCreateMetadataMap, |
8041 | | has: ordinaryHasOwnMetadata, |
8042 | | get: ordinaryGetOwnMetadata, |
8043 | | set: ordinaryDefineOwnMetadata, |
8044 | | keys: ordinaryOwnMetadataKeys, |
8045 | | key: toMetaKey, |
8046 | | exp: exp |
8047 | | }; |
8048 | | |
8049 | | |
8050 | | /***/ }), |
8051 | | /* 314 */ |
8052 | | /***/ (function(module, exports, __webpack_require__) { |
8053 | | |
8054 | | var metadata = __webpack_require__(313); |
8055 | | var anObject = __webpack_require__(12); |
8056 | | var toMetaKey = metadata.key; |
8057 | | var getOrCreateMetadataMap = metadata.map; |
8058 | | var store = metadata.store; |
8059 | | |
8060 | | metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { |
8061 | | var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); |
8062 | | var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); |
8063 | | if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; |
8064 | | if (metadataMap.size) return true; |
8065 | | var targetMetadata = store.get(target); |
8066 | | targetMetadata['delete'](targetKey); |
8067 | | return !!targetMetadata.size || store['delete'](target); |
8068 | | } }); |
8069 | | |
8070 | | |
8071 | | /***/ }), |
8072 | | /* 315 */ |
8073 | | /***/ (function(module, exports, __webpack_require__) { |
8074 | | |
8075 | | var metadata = __webpack_require__(313); |
8076 | | var anObject = __webpack_require__(12); |
8077 | | var getPrototypeOf = __webpack_require__(58); |
8078 | | var ordinaryHasOwnMetadata = metadata.has; |
8079 | | var ordinaryGetOwnMetadata = metadata.get; |
8080 | | var toMetaKey = metadata.key; |
8081 | | |
8082 | | var ordinaryGetMetadata = function (MetadataKey, O, P) { |
8083 | | var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); |
8084 | | if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); |
8085 | | var parent = getPrototypeOf(O); |
8086 | | return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; |
8087 | | }; |
8088 | | |
8089 | | metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { |
8090 | | return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); |
8091 | | } }); |
8092 | | |
8093 | | |
8094 | | /***/ }), |
8095 | | /* 316 */ |
8096 | | /***/ (function(module, exports, __webpack_require__) { |
8097 | | |
8098 | | var Set = __webpack_require__(224); |
8099 | | var from = __webpack_require__(282); |
8100 | | var metadata = __webpack_require__(313); |
8101 | | var anObject = __webpack_require__(12); |
8102 | | var getPrototypeOf = __webpack_require__(58); |
8103 | | var ordinaryOwnMetadataKeys = metadata.keys; |
8104 | | var toMetaKey = metadata.key; |
8105 | | |
8106 | | var ordinaryMetadataKeys = function (O, P) { |
8107 | | var oKeys = ordinaryOwnMetadataKeys(O, P); |
8108 | | var parent = getPrototypeOf(O); |
8109 | | if (parent === null) return oKeys; |
8110 | | var pKeys = ordinaryMetadataKeys(parent, P); |
8111 | | return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; |
8112 | | }; |
8113 | | |
8114 | | metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { |
8115 | | return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); |
8116 | | } }); |
8117 | | |
8118 | | |
8119 | | /***/ }), |
8120 | | /* 317 */ |
8121 | | /***/ (function(module, exports, __webpack_require__) { |
8122 | | |
8123 | | var metadata = __webpack_require__(313); |
8124 | | var anObject = __webpack_require__(12); |
8125 | | var ordinaryGetOwnMetadata = metadata.get; |
8126 | | var toMetaKey = metadata.key; |
8127 | | |
8128 | | metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { |
8129 | | return ordinaryGetOwnMetadata(metadataKey, anObject(target) |
8130 | | , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); |
8131 | | } }); |
8132 | | |
8133 | | |
8134 | | /***/ }), |
8135 | | /* 318 */ |
8136 | | /***/ (function(module, exports, __webpack_require__) { |
8137 | | |
8138 | | var metadata = __webpack_require__(313); |
8139 | | var anObject = __webpack_require__(12); |
8140 | | var ordinaryOwnMetadataKeys = metadata.keys; |
8141 | | var toMetaKey = metadata.key; |
8142 | | |
8143 | | metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { |
8144 | | return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); |
8145 | | } }); |
8146 | | |
8147 | | |
8148 | | /***/ }), |
8149 | | /* 319 */ |
8150 | | /***/ (function(module, exports, __webpack_require__) { |
8151 | | |
8152 | | var metadata = __webpack_require__(313); |
8153 | | var anObject = __webpack_require__(12); |
8154 | | var getPrototypeOf = __webpack_require__(58); |
8155 | | var ordinaryHasOwnMetadata = metadata.has; |
8156 | | var toMetaKey = metadata.key; |
8157 | | |
8158 | | var ordinaryHasMetadata = function (MetadataKey, O, P) { |
8159 | | var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); |
8160 | | if (hasOwn) return true; |
8161 | | var parent = getPrototypeOf(O); |
8162 | | return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; |
8163 | | }; |
8164 | | |
8165 | | metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { |
8166 | | return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); |
8167 | | } }); |
8168 | | |
8169 | | |
8170 | | /***/ }), |
8171 | | /* 320 */ |
8172 | | /***/ (function(module, exports, __webpack_require__) { |
8173 | | |
8174 | | var metadata = __webpack_require__(313); |
8175 | | var anObject = __webpack_require__(12); |
8176 | | var ordinaryHasOwnMetadata = metadata.has; |
8177 | | var toMetaKey = metadata.key; |
8178 | | |
8179 | | metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { |
8180 | | return ordinaryHasOwnMetadata(metadataKey, anObject(target) |
8181 | | , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); |
8182 | | } }); |
8183 | | |
8184 | | |
8185 | | /***/ }), |
8186 | | /* 321 */ |
8187 | | /***/ (function(module, exports, __webpack_require__) { |
8188 | | |
8189 | | var $metadata = __webpack_require__(313); |
8190 | | var anObject = __webpack_require__(12); |
8191 | | var aFunction = __webpack_require__(21); |
8192 | | var toMetaKey = $metadata.key; |
8193 | | var ordinaryDefineOwnMetadata = $metadata.set; |
8194 | | |
8195 | | $metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { |
8196 | | return function decorator(target, targetKey) { |
8197 | | ordinaryDefineOwnMetadata( |
8198 | | metadataKey, metadataValue, |
8199 | | (targetKey !== undefined ? anObject : aFunction)(target), |
8200 | | toMetaKey(targetKey) |
8201 | | ); |
8202 | | }; |
8203 | | } }); |
8204 | | |
8205 | | |
8206 | | /***/ }), |
8207 | | /* 322 */ |
8208 | | /***/ (function(module, exports, __webpack_require__) { |
8209 | | |
8210 | | // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask |
8211 | | var $export = __webpack_require__(8); |
8212 | | var microtask = __webpack_require__(214)(); |
8213 | | var process = __webpack_require__(4).process; |
8214 | | var isNode = __webpack_require__(34)(process) == 'process'; |
8215 | | |
8216 | | $export($export.G, { |
8217 | | asap: function asap(fn) { |
8218 | | var domain = isNode && process.domain; |
8219 | | microtask(domain ? domain.bind(fn) : fn); |
8220 | | } |
8221 | | }); |
8222 | | |
8223 | | |
8224 | | /***/ }), |
8225 | | /* 323 */ |
8226 | | /***/ (function(module, exports, __webpack_require__) { |
8227 | | |
8228 | | 'use strict'; |
8229 | | // https://github.com/zenparsing/es-observable |
8230 | | var $export = __webpack_require__(8); |
8231 | | var global = __webpack_require__(4); |
8232 | | var core = __webpack_require__(9); |
8233 | | var microtask = __webpack_require__(214)(); |
8234 | | var OBSERVABLE = __webpack_require__(26)('observable'); |
8235 | | var aFunction = __webpack_require__(21); |
8236 | | var anObject = __webpack_require__(12); |
8237 | | var anInstance = __webpack_require__(211); |
8238 | | var redefineAll = __webpack_require__(219); |
8239 | | var hide = __webpack_require__(10); |
8240 | | var forOf = __webpack_require__(212); |
8241 | | var RETURN = forOf.RETURN; |
8242 | | |
8243 | | var getMethod = function (fn) { |
8244 | | return fn == null ? undefined : aFunction(fn); |
8245 | | }; |
8246 | | |
8247 | | var cleanupSubscription = function (subscription) { |
8248 | | var cleanup = subscription._c; |
8249 | | if (cleanup) { |
8250 | | subscription._c = undefined; |
8251 | | cleanup(); |
8252 | | } |
8253 | | }; |
8254 | | |
8255 | | var subscriptionClosed = function (subscription) { |
8256 | | return subscription._o === undefined; |
8257 | | }; |
8258 | | |
8259 | | var closeSubscription = function (subscription) { |
8260 | | if (!subscriptionClosed(subscription)) { |
8261 | | subscription._o = undefined; |
8262 | | cleanupSubscription(subscription); |
8263 | | } |
8264 | | }; |
8265 | | |
8266 | | var Subscription = function (observer, subscriber) { |
8267 | | anObject(observer); |
8268 | | this._c = undefined; |
8269 | | this._o = observer; |
8270 | | observer = new SubscriptionObserver(this); |
8271 | | try { |
8272 | | var cleanup = subscriber(observer); |
8273 | | var subscription = cleanup; |
8274 | | if (cleanup != null) { |
8275 | | if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; |
8276 | | else aFunction(cleanup); |
8277 | | this._c = cleanup; |
8278 | | } |
8279 | | } catch (e) { |
8280 | | observer.error(e); |
8281 | | return; |
8282 | | } if (subscriptionClosed(this)) cleanupSubscription(this); |
8283 | | }; |
8284 | | |
8285 | | Subscription.prototype = redefineAll({}, { |
8286 | | unsubscribe: function unsubscribe() { closeSubscription(this); } |
8287 | | }); |
8288 | | |
8289 | | var SubscriptionObserver = function (subscription) { |
8290 | | this._s = subscription; |
8291 | | }; |
8292 | | |
8293 | | SubscriptionObserver.prototype = redefineAll({}, { |
8294 | | next: function next(value) { |
8295 | | var subscription = this._s; |
8296 | | if (!subscriptionClosed(subscription)) { |
8297 | | var observer = subscription._o; |
8298 | | try { |
8299 | | var m = getMethod(observer.next); |
8300 | | if (m) return m.call(observer, value); |
8301 | | } catch (e) { |
8302 | | try { |
8303 | | closeSubscription(subscription); |
8304 | | } finally { |
8305 | | throw e; |
8306 | | } |
8307 | | } |
8308 | | } |
8309 | | }, |
8310 | | error: function error(value) { |
8311 | | var subscription = this._s; |
8312 | | if (subscriptionClosed(subscription)) throw value; |
8313 | | var observer = subscription._o; |
8314 | | subscription._o = undefined; |
8315 | | try { |
8316 | | var m = getMethod(observer.error); |
8317 | | if (!m) throw value; |
8318 | | value = m.call(observer, value); |
8319 | | } catch (e) { |
8320 | | try { |
8321 | | cleanupSubscription(subscription); |
8322 | | } finally { |
8323 | | throw e; |
8324 | | } |
8325 | | } cleanupSubscription(subscription); |
8326 | | return value; |
8327 | | }, |
8328 | | complete: function complete(value) { |
8329 | | var subscription = this._s; |
8330 | | if (!subscriptionClosed(subscription)) { |
8331 | | var observer = subscription._o; |
8332 | | subscription._o = undefined; |
8333 | | try { |
8334 | | var m = getMethod(observer.complete); |
8335 | | value = m ? m.call(observer, value) : undefined; |
8336 | | } catch (e) { |
8337 | | try { |
8338 | | cleanupSubscription(subscription); |
8339 | | } finally { |
8340 | | throw e; |
8341 | | } |
8342 | | } cleanupSubscription(subscription); |
8343 | | return value; |
8344 | | } |
8345 | | } |
8346 | | }); |
8347 | | |
8348 | | var $Observable = function Observable(subscriber) { |
8349 | | anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); |
8350 | | }; |
8351 | | |
8352 | | redefineAll($Observable.prototype, { |
8353 | | subscribe: function subscribe(observer) { |
8354 | | return new Subscription(observer, this._f); |
8355 | | }, |
8356 | | forEach: function forEach(fn) { |
8357 | | var that = this; |
8358 | | return new (core.Promise || global.Promise)(function (resolve, reject) { |
8359 | | aFunction(fn); |
8360 | | var subscription = that.subscribe({ |
8361 | | next: function (value) { |
8362 | | try { |
8363 | | return fn(value); |
8364 | | } catch (e) { |
8365 | | reject(e); |
8366 | | subscription.unsubscribe(); |
8367 | | } |
8368 | | }, |
8369 | | error: reject, |
8370 | | complete: resolve |
8371 | | }); |
8372 | | }); |
8373 | | } |
8374 | | }); |
8375 | | |
8376 | | redefineAll($Observable, { |
8377 | | from: function from(x) { |
8378 | | var C = typeof this === 'function' ? this : $Observable; |
8379 | | var method = getMethod(anObject(x)[OBSERVABLE]); |
8380 | | if (method) { |
8381 | | var observable = anObject(method.call(x)); |
8382 | | return observable.constructor === C ? observable : new C(function (observer) { |
8383 | | return observable.subscribe(observer); |
8384 | | }); |
8385 | | } |
8386 | | return new C(function (observer) { |
8387 | | var done = false; |
8388 | | microtask(function () { |
8389 | | if (!done) { |
8390 | | try { |
8391 | | if (forOf(x, false, function (it) { |
8392 | | observer.next(it); |
8393 | | if (done) return RETURN; |
8394 | | }) === RETURN) return; |
8395 | | } catch (e) { |
8396 | | if (done) throw e; |
8397 | | observer.error(e); |
8398 | | return; |
8399 | | } observer.complete(); |
8400 | | } |
8401 | | }); |
8402 | | return function () { done = true; }; |
8403 | | }); |
8404 | | }, |
8405 | | of: function of() { |
8406 | | for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; |
8407 | | return new (typeof this === 'function' ? this : $Observable)(function (observer) { |
8408 | | var done = false; |
8409 | | microtask(function () { |
8410 | | if (!done) { |
8411 | | for (var j = 0; j < items.length; ++j) { |
8412 | | observer.next(items[j]); |
8413 | | if (done) return; |
8414 | | } observer.complete(); |
8415 | | } |
8416 | | }); |
8417 | | return function () { done = true; }; |
8418 | | }); |
8419 | | } |
8420 | | }); |
8421 | | |
8422 | | hide($Observable.prototype, OBSERVABLE, function () { return this; }); |
8423 | | |
8424 | | $export($export.G, { Observable: $Observable }); |
8425 | | |
8426 | | __webpack_require__(193)('Observable'); |
8427 | | |
8428 | | |
8429 | | /***/ }), |
8430 | | /* 324 */ |
8431 | | /***/ (function(module, exports, __webpack_require__) { |
8432 | | |
8433 | | // ie9- setTimeout & setInterval additional parameters fix |
8434 | | var global = __webpack_require__(4); |
8435 | | var $export = __webpack_require__(8); |
8436 | | var userAgent = __webpack_require__(217); |
8437 | | var slice = [].slice; |
8438 | | var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check |
8439 | | var wrap = function (set) { |
8440 | | return function (fn, time /* , ...args */) { |
8441 | | var boundArgs = arguments.length > 2; |
8442 | | var args = boundArgs ? slice.call(arguments, 2) : false; |
8443 | | return set(boundArgs ? function () { |
8444 | | // eslint-disable-next-line no-new-func |
8445 | | (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); |
8446 | | } : fn, time); |
8447 | | }; |
8448 | | }; |
8449 | | $export($export.G + $export.B + $export.F * MSIE, { |
8450 | | setTimeout: wrap(global.setTimeout), |
8451 | | setInterval: wrap(global.setInterval) |
8452 | | }); |
8453 | | |
8454 | | |
8455 | | /***/ }), |
8456 | | /* 325 */ |
8457 | | /***/ (function(module, exports, __webpack_require__) { |
8458 | | |
8459 | | var $export = __webpack_require__(8); |
8460 | | var $task = __webpack_require__(213); |
8461 | | $export($export.G + $export.B, { |
8462 | | setImmediate: $task.set, |
8463 | | clearImmediate: $task.clear |
8464 | | }); |
8465 | | |
8466 | | |
8467 | | /***/ }), |
8468 | | /* 326 */ |
8469 | | /***/ (function(module, exports, __webpack_require__) { |
8470 | | |
8471 | | var $iterators = __webpack_require__(194); |
8472 | | var getKeys = __webpack_require__(30); |
8473 | | var redefine = __webpack_require__(18); |
8474 | | var global = __webpack_require__(4); |
8475 | | var hide = __webpack_require__(10); |
8476 | | var Iterators = __webpack_require__(129); |
8477 | | var wks = __webpack_require__(26); |
8478 | | var ITERATOR = wks('iterator'); |
8479 | | var TO_STRING_TAG = wks('toStringTag'); |
8480 | | var ArrayValues = Iterators.Array; |
8481 | | |
8482 | | var DOMIterables = { |
8483 | | CSSRuleList: true, // TODO: Not spec compliant, should be false. |
8484 | | CSSStyleDeclaration: false, |
8485 | | CSSValueList: false, |
8486 | | ClientRectList: false, |
8487 | | DOMRectList: false, |
8488 | | DOMStringList: false, |
8489 | | DOMTokenList: true, |
8490 | | DataTransferItemList: false, |
8491 | | FileList: false, |
8492 | | HTMLAllCollection: false, |
8493 | | HTMLCollection: false, |
8494 | | HTMLFormElement: false, |
8495 | | HTMLSelectElement: false, |
8496 | | MediaList: true, // TODO: Not spec compliant, should be false. |
8497 | | MimeTypeArray: false, |
8498 | | NamedNodeMap: false, |
8499 | | NodeList: true, |
8500 | | PaintRequestList: false, |
8501 | | Plugin: false, |
8502 | | PluginArray: false, |
8503 | | SVGLengthList: false, |
8504 | | SVGNumberList: false, |
8505 | | SVGPathSegList: false, |
8506 | | SVGPointList: false, |
8507 | | SVGStringList: false, |
8508 | | SVGTransformList: false, |
8509 | | SourceBufferList: false, |
8510 | | StyleSheetList: true, // TODO: Not spec compliant, should be false. |
8511 | | TextTrackCueList: false, |
8512 | | TextTrackList: false, |
8513 | | TouchList: false |
8514 | | }; |
8515 | | |
8516 | | for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { |
8517 | | var NAME = collections[i]; |
8518 | | var explicit = DOMIterables[NAME]; |
8519 | | var Collection = global[NAME]; |
8520 | | var proto = Collection && Collection.prototype; |
8521 | | var key; |
8522 | | if (proto) { |
8523 | | if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); |
8524 | | if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); |
8525 | | Iterators[NAME] = ArrayValues; |
8526 | | if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); |
8527 | | } |
8528 | | } |
8529 | | |
8530 | | |
8531 | | /***/ }), |
8532 | | /* 327 */ |
8533 | | /***/ (function(module, exports) { |
8534 | | |
8535 | | /* WEBPACK VAR INJECTION */(function(global) {/** |
8536 | | * Copyright (c) 2014, Facebook, Inc. |
8537 | | * All rights reserved. |
8538 | | * |
8539 | | * This source code is licensed under the BSD-style license found in the |
8540 | | * https://raw.github.com/facebook/regenerator/master/LICENSE file. An |
8541 | | * additional grant of patent rights can be found in the PATENTS file in |
8542 | | * the same directory. |
8543 | | */ |
8544 | | |
8545 | | !(function(global) { |
8546 | | "use strict"; |
8547 | | |
8548 | | var Op = Object.prototype; |
8549 | | var hasOwn = Op.hasOwnProperty; |
8550 | | var undefined; // More compressible than void 0. |
8551 | | var $Symbol = typeof Symbol === "function" ? Symbol : {}; |
8552 | | var iteratorSymbol = $Symbol.iterator || "@@iterator"; |
8553 | | var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; |
8554 | | var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; |
8555 | | |
8556 | | var inModule = typeof module === "object"; |
8557 | | var runtime = global.regeneratorRuntime; |
8558 | | if (runtime) { |
8559 | | if (inModule) { |
8560 | | // If regeneratorRuntime is defined globally and we're in a module, |
8561 | | // make the exports object identical to regeneratorRuntime. |
8562 | | module.exports = runtime; |
8563 | | } |
8564 | | // Don't bother evaluating the rest of this file if the runtime was |
8565 | | // already defined globally. |
8566 | | return; |
8567 | | } |
8568 | | |
8569 | | // Define the runtime globally (as expected by generated code) as either |
8570 | | // module.exports (if we're in a module) or a new, empty object. |
8571 | | runtime = global.regeneratorRuntime = inModule ? module.exports : {}; |
8572 | | |
8573 | | function wrap(innerFn, outerFn, self, tryLocsList) { |
8574 | | // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. |
8575 | | var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; |
8576 | | var generator = Object.create(protoGenerator.prototype); |
8577 | | var context = new Context(tryLocsList || []); |
8578 | | |
8579 | | // The ._invoke method unifies the implementations of the .next, |
8580 | | // .throw, and .return methods. |
8581 | | generator._invoke = makeInvokeMethod(innerFn, self, context); |
8582 | | |
8583 | | return generator; |
8584 | | } |
8585 | | runtime.wrap = wrap; |
8586 | | |
8587 | | // Try/catch helper to minimize deoptimizations. Returns a completion |
8588 | | // record like context.tryEntries[i].completion. This interface could |
8589 | | // have been (and was previously) designed to take a closure to be |
8590 | | // invoked without arguments, but in all the cases we care about we |
8591 | | // already have an existing method we want to call, so there's no need |
8592 | | // to create a new function object. We can even get away with assuming |
8593 | | // the method takes exactly one argument, since that happens to be true |
8594 | | // in every case, so we don't have to touch the arguments object. The |
8595 | | // only additional allocation required is the completion record, which |
8596 | | // has a stable shape and so hopefully should be cheap to allocate. |
8597 | | function tryCatch(fn, obj, arg) { |
8598 | | try { |
8599 | | return { type: "normal", arg: fn.call(obj, arg) }; |
8600 | | } catch (err) { |
8601 | | return { type: "throw", arg: err }; |
8602 | | } |
8603 | | } |
8604 | | |
8605 | | var GenStateSuspendedStart = "suspendedStart"; |
8606 | | var GenStateSuspendedYield = "suspendedYield"; |
8607 | | var GenStateExecuting = "executing"; |
8608 | | var GenStateCompleted = "completed"; |
8609 | | |
8610 | | // Returning this object from the innerFn has the same effect as |
8611 | | // breaking out of the dispatch switch statement. |
8612 | | var ContinueSentinel = {}; |
8613 | | |
8614 | | // Dummy constructor functions that we use as the .constructor and |
8615 | | // .constructor.prototype properties for functions that return Generator |
8616 | | // objects. For full spec compliance, you may wish to configure your |
8617 | | // minifier not to mangle the names of these two functions. |
8618 | | function Generator() {} |
8619 | | function GeneratorFunction() {} |
8620 | | function GeneratorFunctionPrototype() {} |
8621 | | |
8622 | | // This is a polyfill for %IteratorPrototype% for environments that |
8623 | | // don't natively support it. |
8624 | | var IteratorPrototype = {}; |
8625 | | IteratorPrototype[iteratorSymbol] = function () { |
8626 | | return this; |
8627 | | }; |
8628 | | |
8629 | | var getProto = Object.getPrototypeOf; |
8630 | | var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); |
8631 | | if (NativeIteratorPrototype && |
8632 | | NativeIteratorPrototype !== Op && |
8633 | | hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { |
8634 | | // This environment has a native %IteratorPrototype%; use it instead |
8635 | | // of the polyfill. |
8636 | | IteratorPrototype = NativeIteratorPrototype; |
8637 | | } |
8638 | | |
8639 | | var Gp = GeneratorFunctionPrototype.prototype = |
8640 | | Generator.prototype = Object.create(IteratorPrototype); |
8641 | | GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; |
8642 | | GeneratorFunctionPrototype.constructor = GeneratorFunction; |
8643 | | GeneratorFunctionPrototype[toStringTagSymbol] = |
8644 | | GeneratorFunction.displayName = "GeneratorFunction"; |
8645 | | |
8646 | | // Helper for defining the .next, .throw, and .return methods of the |
8647 | | // Iterator interface in terms of a single ._invoke method. |
8648 | | function defineIteratorMethods(prototype) { |
8649 | | ["next", "throw", "return"].forEach(function(method) { |
8650 | | prototype[method] = function(arg) { |
8651 | | return this._invoke(method, arg); |
8652 | | }; |
8653 | | }); |
8654 | | } |
8655 | | |
8656 | | runtime.isGeneratorFunction = function(genFun) { |
8657 | | var ctor = typeof genFun === "function" && genFun.constructor; |
8658 | | return ctor |
8659 | | ? ctor === GeneratorFunction || |
8660 | | // For the native GeneratorFunction constructor, the best we can |
8661 | | // do is to check its .name property. |
8662 | | (ctor.displayName || ctor.name) === "GeneratorFunction" |
8663 | | : false; |
8664 | | }; |
8665 | | |
8666 | | runtime.mark = function(genFun) { |
8667 | | if (Object.setPrototypeOf) { |
8668 | | Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); |
8669 | | } else { |
8670 | | genFun.__proto__ = GeneratorFunctionPrototype; |
8671 | | if (!(toStringTagSymbol in genFun)) { |
8672 | | genFun[toStringTagSymbol] = "GeneratorFunction"; |
8673 | | } |
8674 | | } |
8675 | | genFun.prototype = Object.create(Gp); |
8676 | | return genFun; |
8677 | | }; |
8678 | | |
8679 | | // Within the body of any async function, `await x` is transformed to |
8680 | | // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test |
8681 | | // `hasOwn.call(value, "__await")` to determine if the yielded value is |
8682 | | // meant to be awaited. |
8683 | | runtime.awrap = function(arg) { |
8684 | | return { __await: arg }; |
8685 | | }; |
8686 | | |
8687 | | function AsyncIterator(generator) { |
8688 | | function invoke(method, arg, resolve, reject) { |
8689 | | var record = tryCatch(generator[method], generator, arg); |
8690 | | if (record.type === "throw") { |
8691 | | reject(record.arg); |
8692 | | } else { |
8693 | | var result = record.arg; |
8694 | | var value = result.value; |
8695 | | if (value && |
8696 | | typeof value === "object" && |
8697 | | hasOwn.call(value, "__await")) { |
8698 | | return Promise.resolve(value.__await).then(function(value) { |
8699 | | invoke("next", value, resolve, reject); |
8700 | | }, function(err) { |
8701 | | invoke("throw", err, resolve, reject); |
8702 | | }); |
8703 | | } |
8704 | | |
8705 | | return Promise.resolve(value).then(function(unwrapped) { |
8706 | | // When a yielded Promise is resolved, its final value becomes |
8707 | | // the .value of the Promise<{value,done}> result for the |
8708 | | // current iteration. If the Promise is rejected, however, the |
8709 | | // result for this iteration will be rejected with the same |
8710 | | // reason. Note that rejections of yielded Promises are not |
8711 | | // thrown back into the generator function, as is the case |
8712 | | // when an awaited Promise is rejected. This difference in |
8713 | | // behavior between yield and await is important, because it |
8714 | | // allows the consumer to decide what to do with the yielded |
8715 | | // rejection (swallow it and continue, manually .throw it back |
8716 | | // into the generator, abandon iteration, whatever). With |
8717 | | // await, by contrast, there is no opportunity to examine the |
8718 | | // rejection reason outside the generator function, so the |
8719 | | // only option is to throw it from the await expression, and |
8720 | | // let the generator function handle the exception. |
8721 | | result.value = unwrapped; |
8722 | | resolve(result); |
8723 | | }, reject); |
8724 | | } |
8725 | | } |
8726 | | |
8727 | | if (typeof global.process === "object" && global.process.domain) { |
8728 | | invoke = global.process.domain.bind(invoke); |
8729 | | } |
8730 | | |
8731 | | var previousPromise; |
8732 | | |
8733 | | function enqueue(method, arg) { |
8734 | | function callInvokeWithMethodAndArg() { |
8735 | | return new Promise(function(resolve, reject) { |
8736 | | invoke(method, arg, resolve, reject); |
8737 | | }); |
8738 | | } |
8739 | | |
8740 | | return previousPromise = |
8741 | | // If enqueue has been called before, then we want to wait until |
8742 | | // all previous Promises have been resolved before calling invoke, |
8743 | | // so that results are always delivered in the correct order. If |
8744 | | // enqueue has not been called before, then it is important to |
8745 | | // call invoke immediately, without waiting on a callback to fire, |
8746 | | // so that the async generator function has the opportunity to do |
8747 | | // any necessary setup in a predictable way. This predictability |
8748 | | // is why the Promise constructor synchronously invokes its |
8749 | | // executor callback, and why async functions synchronously |
8750 | | // execute code before the first await. Since we implement simple |
8751 | | // async functions in terms of async generators, it is especially |
8752 | | // important to get this right, even though it requires care. |
8753 | | previousPromise ? previousPromise.then( |
8754 | | callInvokeWithMethodAndArg, |
8755 | | // Avoid propagating failures to Promises returned by later |
8756 | | // invocations of the iterator. |
8757 | | callInvokeWithMethodAndArg |
8758 | | ) : callInvokeWithMethodAndArg(); |
8759 | | } |
8760 | | |
8761 | | // Define the unified helper method that is used to implement .next, |
8762 | | // .throw, and .return (see defineIteratorMethods). |
8763 | | this._invoke = enqueue; |
8764 | | } |
8765 | | |
8766 | | defineIteratorMethods(AsyncIterator.prototype); |
8767 | | AsyncIterator.prototype[asyncIteratorSymbol] = function () { |
8768 | | return this; |
8769 | | }; |
8770 | | runtime.AsyncIterator = AsyncIterator; |
8771 | | |
8772 | | // Note that simple async functions are implemented on top of |
8773 | | // AsyncIterator objects; they just return a Promise for the value of |
8774 | | // the final result produced by the iterator. |
8775 | | runtime.async = function(innerFn, outerFn, self, tryLocsList) { |
8776 | | var iter = new AsyncIterator( |
8777 | | wrap(innerFn, outerFn, self, tryLocsList) |
8778 | | ); |
8779 | | |
8780 | | return runtime.isGeneratorFunction(outerFn) |
8781 | | ? iter // If outerFn is a generator, return the full iterator. |
8782 | | : iter.next().then(function(result) { |
8783 | | return result.done ? result.value : iter.next(); |
8784 | | }); |
8785 | | }; |
8786 | | |
8787 | | function makeInvokeMethod(innerFn, self, context) { |
8788 | | var state = GenStateSuspendedStart; |
8789 | | |
8790 | | return function invoke(method, arg) { |
8791 | | if (state === GenStateExecuting) { |
8792 | | throw new Error("Generator is already running"); |
8793 | | } |
8794 | | |
8795 | | if (state === GenStateCompleted) { |
8796 | | if (method === "throw") { |
8797 | | throw arg; |
8798 | | } |
8799 | | |
8800 | | // Be forgiving, per 25.3.3.3.3 of the spec: |
8801 | | // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume |
8802 | | return doneResult(); |
8803 | | } |
8804 | | |
8805 | | context.method = method; |
8806 | | context.arg = arg; |
8807 | | |
8808 | | while (true) { |
8809 | | var delegate = context.delegate; |
8810 | | if (delegate) { |
8811 | | var delegateResult = maybeInvokeDelegate(delegate, context); |
8812 | | if (delegateResult) { |
8813 | | if (delegateResult === ContinueSentinel) continue; |
8814 | | return delegateResult; |
8815 | | } |
8816 | | } |
8817 | | |
8818 | | if (context.method === "next") { |
8819 | | // Setting context._sent for legacy support of Babel's |
8820 | | // function.sent implementation. |
8821 | | context.sent = context._sent = context.arg; |
8822 | | |
8823 | | } else if (context.method === "throw") { |
8824 | | if (state === GenStateSuspendedStart) { |
8825 | | state = GenStateCompleted; |
8826 | | throw context.arg; |
8827 | | } |
8828 | | |
8829 | | context.dispatchException(context.arg); |
8830 | | |
8831 | | } else if (context.method === "return") { |
8832 | | context.abrupt("return", context.arg); |
8833 | | } |
8834 | | |
8835 | | state = GenStateExecuting; |
8836 | | |
8837 | | var record = tryCatch(innerFn, self, context); |
8838 | | if (record.type === "normal") { |
8839 | | // If an exception is thrown from innerFn, we leave state === |
8840 | | // GenStateExecuting and loop back for another invocation. |
8841 | | state = context.done |
8842 | | ? GenStateCompleted |
8843 | | : GenStateSuspendedYield; |
8844 | | |
8845 | | if (record.arg === ContinueSentinel) { |
8846 | | continue; |
8847 | | } |
8848 | | |
8849 | | return { |
8850 | | value: record.arg, |
8851 | | done: context.done |
8852 | | }; |
8853 | | |
8854 | | } else if (record.type === "throw") { |
8855 | | state = GenStateCompleted; |
8856 | | // Dispatch the exception by looping back around to the |
8857 | | // context.dispatchException(context.arg) call above. |
8858 | | context.method = "throw"; |
8859 | | context.arg = record.arg; |
8860 | | } |
8861 | | } |
8862 | | }; |
8863 | | } |
8864 | | |
8865 | | // Call delegate.iterator[context.method](context.arg) and handle the |
8866 | | // result, either by returning a { value, done } result from the |
8867 | | // delegate iterator, or by modifying context.method and context.arg, |
8868 | | // setting context.delegate to null, and returning the ContinueSentinel. |
8869 | | function maybeInvokeDelegate(delegate, context) { |
8870 | | var method = delegate.iterator[context.method]; |
8871 | | if (method === undefined) { |
8872 | | // A .throw or .return when the delegate iterator has no .throw |
8873 | | // method always terminates the yield* loop. |
8874 | | context.delegate = null; |
8875 | | |
8876 | | if (context.method === "throw") { |
8877 | | if (delegate.iterator.return) { |
8878 | | // If the delegate iterator has a return method, give it a |
8879 | | // chance to clean up. |
8880 | | context.method = "return"; |
8881 | | context.arg = undefined; |
8882 | | maybeInvokeDelegate(delegate, context); |
8883 | | |
8884 | | if (context.method === "throw") { |
8885 | | // If maybeInvokeDelegate(context) changed context.method from |
8886 | | // "return" to "throw", let that override the TypeError below. |
8887 | | return ContinueSentinel; |
8888 | | } |
8889 | | } |
8890 | | |
8891 | | context.method = "throw"; |
8892 | | context.arg = new TypeError( |
8893 | | "The iterator does not provide a 'throw' method"); |
8894 | | } |
8895 | | |
8896 | | return ContinueSentinel; |
8897 | | } |
8898 | | |
8899 | | var record = tryCatch(method, delegate.iterator, context.arg); |
8900 | | |
8901 | | if (record.type === "throw") { |
8902 | | context.method = "throw"; |
8903 | | context.arg = record.arg; |
8904 | | context.delegate = null; |
8905 | | return ContinueSentinel; |
8906 | | } |
8907 | | |
8908 | | var info = record.arg; |
8909 | | |
8910 | | if (! info) { |
8911 | | context.method = "throw"; |
8912 | | context.arg = new TypeError("iterator result is not an object"); |
8913 | | context.delegate = null; |
8914 | | return ContinueSentinel; |
8915 | | } |
8916 | | |
8917 | | if (info.done) { |
8918 | | // Assign the result of the finished delegate to the temporary |
8919 | | // variable specified by delegate.resultName (see delegateYield). |
8920 | | context[delegate.resultName] = info.value; |
8921 | | |
8922 | | // Resume execution at the desired location (see delegateYield). |
8923 | | context.next = delegate.nextLoc; |
8924 | | |
8925 | | // If context.method was "throw" but the delegate handled the |
8926 | | // exception, let the outer generator proceed normally. If |
8927 | | // context.method was "next", forget context.arg since it has been |
8928 | | // "consumed" by the delegate iterator. If context.method was |
8929 | | // "return", allow the original .return call to continue in the |
8930 | | // outer generator. |
8931 | | if (context.method !== "return") { |
8932 | | context.method = "next"; |
8933 | | context.arg = undefined; |
8934 | | } |
8935 | | |
8936 | | } else { |
8937 | | // Re-yield the result returned by the delegate method. |
8938 | | return info; |
8939 | | } |
8940 | | |
8941 | | // The delegate iterator is finished, so forget it and continue with |
8942 | | // the outer generator. |
8943 | | context.delegate = null; |
8944 | | return ContinueSentinel; |
8945 | | } |
8946 | | |
8947 | | // Define Generator.prototype.{next,throw,return} in terms of the |
8948 | | // unified ._invoke helper method. |
8949 | | defineIteratorMethods(Gp); |
8950 | | |
8951 | | Gp[toStringTagSymbol] = "Generator"; |
8952 | | |
8953 | | // A Generator should always return itself as the iterator object when the |
8954 | | // @@iterator function is called on it. Some browsers' implementations of the |
8955 | | // iterator prototype chain incorrectly implement this, causing the Generator |
8956 | | // object to not be returned from this call. This ensures that doesn't happen. |
8957 | | // See https://github.com/facebook/regenerator/issues/274 for more details. |
8958 | | Gp[iteratorSymbol] = function() { |
8959 | | return this; |
8960 | | }; |
8961 | | |
8962 | | Gp.toString = function() { |
8963 | | return "[object Generator]"; |
8964 | | }; |
8965 | | |
8966 | | function pushTryEntry(locs) { |
8967 | | var entry = { tryLoc: locs[0] }; |
8968 | | |
8969 | | if (1 in locs) { |
8970 | | entry.catchLoc = locs[1]; |
8971 | | } |
8972 | | |
8973 | | if (2 in locs) { |
8974 | | entry.finallyLoc = locs[2]; |
8975 | | entry.afterLoc = locs[3]; |
8976 | | } |
8977 | | |
8978 | | this.tryEntries.push(entry); |
8979 | | } |
8980 | | |
8981 | | function resetTryEntry(entry) { |
8982 | | var record = entry.completion || {}; |
8983 | | record.type = "normal"; |
8984 | | delete record.arg; |
8985 | | entry.completion = record; |
8986 | | } |
8987 | | |
8988 | | function Context(tryLocsList) { |
8989 | | // The root entry object (effectively a try statement without a catch |
8990 | | // or a finally block) gives us a place to store values thrown from |
8991 | | // locations where there is no enclosing try statement. |
8992 | | this.tryEntries = [{ tryLoc: "root" }]; |
8993 | | tryLocsList.forEach(pushTryEntry, this); |
8994 | | this.reset(true); |
8995 | | } |
8996 | | |
8997 | | runtime.keys = function(object) { |
8998 | | var keys = []; |
8999 | | for (var key in object) { |
9000 | | keys.push(key); |
9001 | | } |
9002 | | keys.reverse(); |
9003 | | |
9004 | | // Rather than returning an object with a next method, we keep |
9005 | | // things simple and return the next function itself. |
9006 | | return function next() { |
9007 | | while (keys.length) { |
9008 | | var key = keys.pop(); |
9009 | | if (key in object) { |
9010 | | next.value = key; |
9011 | | next.done = false; |
9012 | | return next; |
9013 | | } |
9014 | | } |
9015 | | |
9016 | | // To avoid creating an additional object, we just hang the .value |
9017 | | // and .done properties off the next function object itself. This |
9018 | | // also ensures that the minifier will not anonymize the function. |
9019 | | next.done = true; |
9020 | | return next; |
9021 | | }; |
9022 | | }; |
9023 | | |
9024 | | function values(iterable) { |
9025 | | if (iterable) { |
9026 | | var iteratorMethod = iterable[iteratorSymbol]; |
9027 | | if (iteratorMethod) { |
9028 | | return iteratorMethod.call(iterable); |
9029 | | } |
9030 | | |
9031 | | if (typeof iterable.next === "function") { |
9032 | | return iterable; |
9033 | | } |
9034 | | |
9035 | | if (!isNaN(iterable.length)) { |
9036 | | var i = -1, next = function next() { |
9037 | | while (++i < iterable.length) { |
9038 | | if (hasOwn.call(iterable, i)) { |
9039 | | next.value = iterable[i]; |
9040 | | next.done = false; |
9041 | | return next; |
9042 | | } |
9043 | | } |
9044 | | |
9045 | | next.value = undefined; |
9046 | | next.done = true; |
9047 | | |
9048 | | return next; |
9049 | | }; |
9050 | | |
9051 | | return next.next = next; |
9052 | | } |
9053 | | } |
9054 | | |
9055 | | // Return an iterator with no values. |
9056 | | return { next: doneResult }; |
9057 | | } |
9058 | | runtime.values = values; |
9059 | | |
9060 | | function doneResult() { |
9061 | | return { value: undefined, done: true }; |
9062 | | } |
9063 | | |
9064 | | Context.prototype = { |
9065 | | constructor: Context, |
9066 | | |
9067 | | reset: function(skipTempReset) { |
9068 | | this.prev = 0; |
9069 | | this.next = 0; |
9070 | | // Resetting context._sent for legacy support of Babel's |
9071 | | // function.sent implementation. |
9072 | | this.sent = this._sent = undefined; |
9073 | | this.done = false; |
9074 | | this.delegate = null; |
9075 | | |
9076 | | this.method = "next"; |
9077 | | this.arg = undefined; |
9078 | | |
9079 | | this.tryEntries.forEach(resetTryEntry); |
9080 | | |
9081 | | if (!skipTempReset) { |
9082 | | for (var name in this) { |
9083 | | // Not sure about the optimal order of these conditions: |
9084 | | if (name.charAt(0) === "t" && |
9085 | | hasOwn.call(this, name) && |
9086 | | !isNaN(+name.slice(1))) { |
9087 | | this[name] = undefined; |
9088 | | } |
9089 | | } |
9090 | | } |
9091 | | }, |
9092 | | |
9093 | | stop: function() { |
9094 | | this.done = true; |
9095 | | |
9096 | | var rootEntry = this.tryEntries[0]; |
9097 | | var rootRecord = rootEntry.completion; |
9098 | | if (rootRecord.type === "throw") { |
9099 | | throw rootRecord.arg; |
9100 | | } |
9101 | | |
9102 | | return this.rval; |
9103 | | }, |
9104 | | |
9105 | | dispatchException: function(exception) { |
9106 | | if (this.done) { |
9107 | | throw exception; |
9108 | | } |
9109 | | |
9110 | | var context = this; |
9111 | | function handle(loc, caught) { |
9112 | | record.type = "throw"; |
9113 | | record.arg = exception; |
9114 | | context.next = loc; |
9115 | | |
9116 | | if (caught) { |
9117 | | // If the dispatched exception was caught by a catch block, |
9118 | | // then let that catch block handle the exception normally. |
9119 | | context.method = "next"; |
9120 | | context.arg = undefined; |
9121 | | } |
9122 | | |
9123 | | return !! caught; |
9124 | | } |
9125 | | |
9126 | | for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
9127 | | var entry = this.tryEntries[i]; |
9128 | | var record = entry.completion; |
9129 | | |
9130 | | if (entry.tryLoc === "root") { |
9131 | | // Exception thrown outside of any try block that could handle |
9132 | | // it, so set the completion value of the entire function to |
9133 | | // throw the exception. |
9134 | | return handle("end"); |
9135 | | } |
9136 | | |
9137 | | if (entry.tryLoc <= this.prev) { |
9138 | | var hasCatch = hasOwn.call(entry, "catchLoc"); |
9139 | | var hasFinally = hasOwn.call(entry, "finallyLoc"); |
9140 | | |
9141 | | if (hasCatch && hasFinally) { |
9142 | | if (this.prev < entry.catchLoc) { |
9143 | | return handle(entry.catchLoc, true); |
9144 | | } else if (this.prev < entry.finallyLoc) { |
9145 | | return handle(entry.finallyLoc); |
9146 | | } |
9147 | | |
9148 | | } else if (hasCatch) { |
9149 | | if (this.prev < entry.catchLoc) { |
9150 | | return handle(entry.catchLoc, true); |
9151 | | } |
9152 | | |
9153 | | } else if (hasFinally) { |
9154 | | if (this.prev < entry.finallyLoc) { |
9155 | | return handle(entry.finallyLoc); |
9156 | | } |
9157 | | |
9158 | | } else { |
9159 | | throw new Error("try statement without catch or finally"); |
9160 | | } |
9161 | | } |
9162 | | } |
9163 | | }, |
9164 | | |
9165 | | abrupt: function(type, arg) { |
9166 | | for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
9167 | | var entry = this.tryEntries[i]; |
9168 | | if (entry.tryLoc <= this.prev && |
9169 | | hasOwn.call(entry, "finallyLoc") && |
9170 | | this.prev < entry.finallyLoc) { |
9171 | | var finallyEntry = entry; |
9172 | | break; |
9173 | | } |
9174 | | } |
9175 | | |
9176 | | if (finallyEntry && |
9177 | | (type === "break" || |
9178 | | type === "continue") && |
9179 | | finallyEntry.tryLoc <= arg && |
9180 | | arg <= finallyEntry.finallyLoc) { |
9181 | | // Ignore the finally entry if control is not jumping to a |
9182 | | // location outside the try/catch block. |
9183 | | finallyEntry = null; |
9184 | | } |
9185 | | |
9186 | | var record = finallyEntry ? finallyEntry.completion : {}; |
9187 | | record.type = type; |
9188 | | record.arg = arg; |
9189 | | |
9190 | | if (finallyEntry) { |
9191 | | this.method = "next"; |
9192 | | this.next = finallyEntry.finallyLoc; |
9193 | | return ContinueSentinel; |
9194 | | } |
9195 | | |
9196 | | return this.complete(record); |
9197 | | }, |
9198 | | |
9199 | | complete: function(record, afterLoc) { |
9200 | | if (record.type === "throw") { |
9201 | | throw record.arg; |
9202 | | } |
9203 | | |
9204 | | if (record.type === "break" || |
9205 | | record.type === "continue") { |
9206 | | this.next = record.arg; |
9207 | | } else if (record.type === "return") { |
9208 | | this.rval = this.arg = record.arg; |
9209 | | this.method = "return"; |
9210 | | this.next = "end"; |
9211 | | } else if (record.type === "normal" && afterLoc) { |
9212 | | this.next = afterLoc; |
9213 | | } |
9214 | | |
9215 | | return ContinueSentinel; |
9216 | | }, |
9217 | | |
9218 | | finish: function(finallyLoc) { |
9219 | | for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
9220 | | var entry = this.tryEntries[i]; |
9221 | | if (entry.finallyLoc === finallyLoc) { |
9222 | | this.complete(entry.completion, entry.afterLoc); |
9223 | | resetTryEntry(entry); |
9224 | | return ContinueSentinel; |
9225 | | } |
9226 | | } |
9227 | | }, |
9228 | | |
9229 | | "catch": function(tryLoc) { |
9230 | | for (var i = this.tryEntries.length - 1; i >= 0; --i) { |
9231 | | var entry = this.tryEntries[i]; |
9232 | | if (entry.tryLoc === tryLoc) { |
9233 | | var record = entry.completion; |
9234 | | if (record.type === "throw") { |
9235 | | var thrown = record.arg; |
9236 | | resetTryEntry(entry); |
9237 | | } |
9238 | | return thrown; |
9239 | | } |
9240 | | } |
9241 | | |
9242 | | // The context.catch method must only be called with a location |
9243 | | // argument that corresponds to a known catch block. |
9244 | | throw new Error("illegal catch attempt"); |
9245 | | }, |
9246 | | |
9247 | | delegateYield: function(iterable, resultName, nextLoc) { |
9248 | | this.delegate = { |
9249 | | iterator: values(iterable), |
9250 | | resultName: resultName, |
9251 | | nextLoc: nextLoc |
9252 | | }; |
9253 | | |
9254 | | if (this.method === "next") { |
9255 | | // Deliberately forget the last sent value so that we don't |
9256 | | // accidentally pass it on to the delegate. |
9257 | | this.arg = undefined; |
9258 | | } |
9259 | | |
9260 | | return ContinueSentinel; |
9261 | | } |
9262 | | }; |
9263 | | })( |
9264 | | // Among the various tricks for obtaining a reference to the global |
9265 | | // object, this seems to be the most reliable technique that does not |
9266 | | // use indirect eval (which violates Content Security Policy). |
9267 | | typeof global === "object" ? global : |
9268 | | typeof window === "object" ? window : |
9269 | | typeof self === "object" ? self : this |
9270 | | ); |
9271 | | |
9272 | | /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) |
9273 | | |
9274 | | /***/ }), |
9275 | | /* 328 */ |
9276 | | /***/ (function(module, exports, __webpack_require__) { |
9277 | | |
9278 | | __webpack_require__(329); |
9279 | | module.exports = __webpack_require__(9).RegExp.escape; |
9280 | | |
9281 | | |
9282 | | /***/ }), |
9283 | | /* 329 */ |
9284 | | /***/ (function(module, exports, __webpack_require__) { |
9285 | | |
9286 | | // https://github.com/benjamingr/RexExp.escape |
9287 | | var $export = __webpack_require__(8); |
9288 | | var $re = __webpack_require__(330)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); |
9289 | | |
9290 | | $export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); |
9291 | | |
9292 | | |
9293 | | /***/ }), |
9294 | | /* 330 */ |
9295 | | /***/ (function(module, exports) { |
9296 | | |
9297 | | module.exports = function (regExp, replace) { |
9298 | | var replacer = replace === Object(replace) ? function (part) { |
9299 | | return replace[part]; |
9300 | | } : replace; |
9301 | | return function (it) { |
9302 | | return String(it).replace(regExp, replacer); |
9303 | | }; |
9304 | | }; |
9305 | | |
9306 | | |
9307 | | /***/ }), |
9308 | | /* 331 */ |
9309 | | /***/ (function(module, exports, __webpack_require__) { |
9310 | | |
9311 | | 'use strict'; |
9312 | | |
9313 | | __webpack_require__(1); |
9314 | | |
9315 | | var _react = __webpack_require__(332); |
9316 | | |
9317 | | var _react2 = _interopRequireDefault(_react); |
9318 | | |
9319 | | var _reactDom = __webpack_require__(368); |
9320 | | |
9321 | | var _reactDom2 = _interopRequireDefault(_reactDom); |
9322 | | |
9323 | | var _filterableTable = __webpack_require__(515); |
9324 | | |
9325 | | var _filterableTable2 = _interopRequireDefault(_filterableTable); |
9326 | | |
9327 | | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
9328 | | |
9329 | | __webpack_require__(516); |
9330 | | |
9331 | | /** |
9332 | | * Courtesy: https://stackoverflow.com/a/3177838/1845153 |
9333 | | * |
9334 | | * Converts unix seconds into human readable time. |
9335 | | * Looks like exact javascript convert of WordPress's human_time_diff, except this always compares from current time, instead of getting two arguments. |
9336 | | * |
9337 | | * @param {int} seconds Seconds ago to convert to human readable time |
9338 | | * |
9339 | | * @returns {string} Human readable time ago |
9340 | | */ |
9341 | | var timeSince = function timeSince(seconds) { |
9342 | | |
9343 | | var interval = Math.floor(seconds / 31536000); |
9344 | | |
9345 | | if (interval >= 1) { |
9346 | | return interval + " years"; |
9347 | | } |
9348 | | interval = Math.floor(seconds / 2592000); |
9349 | | if (interval >= 1) { |
9350 | | return interval + " months"; |
9351 | | } |
9352 | | interval = Math.floor(seconds / 86400); |
9353 | | if (interval >= 1) { |
9354 | | return interval + " days"; |
9355 | | } |
9356 | | interval = Math.floor(seconds / 3600); |
9357 | | if (interval >= 1) { |
9358 | | return interval + " hours"; |
9359 | | } |
9360 | | interval = Math.floor(seconds / 60); |
9361 | | if (interval >= 1) { |
9362 | | return interval + " minutes"; |
9363 | | } |
9364 | | return Math.floor(seconds) + " seconds"; |
9365 | | }; |
9366 | | |
9367 | | /** |
9368 | | * Custom render function for lastUpdatedColumn. Will display X time ago instead of unix timestamp |
9369 | | */ |
9370 | | var renderHumanizeTime = function renderHumanizeTime(time) { |
9371 | | return timeSince(time) + " ago"; |
9372 | | }; |
9373 | | |
9374 | | _reactDom2.default.render(_react2.default.createElement(_filterableTable2.default, { |
9375 | | initialSortField: wpcApplicationTracker.initialSortField, |
9376 | | columns: wpcApplicationTracker.displayColumns, |
9377 | | customRender: { |
9378 | | lastUpdate: renderHumanizeTime |
9379 | | } |
9380 | | }), document.getElementById('wpc-application-tracker')); |
9381 | | |
9382 | | /***/ }), |
9383 | | /* 332 */ |
9384 | | /***/ (function(module, exports, __webpack_require__) { |
9385 | | |
9386 | | 'use strict'; |
9387 | | |
9388 | | module.exports = __webpack_require__(333); |
9389 | | |
9390 | | |
9391 | | /***/ }), |
9392 | | /* 333 */ |
9393 | | /***/ (function(module, exports, __webpack_require__) { |
9394 | | |
9395 | | /** |
9396 | | * Copyright (c) 2013-present, Facebook, Inc. |
9397 | | * |
9398 | | * This source code is licensed under the MIT license found in the |
9399 | | * LICENSE file in the root directory of this source tree. |
9400 | | * |
9401 | | */ |
9402 | | |
9403 | | 'use strict'; |
9404 | | |
9405 | | var _assign = __webpack_require__(334); |
9406 | | |
9407 | | var ReactBaseClasses = __webpack_require__(335); |
9408 | | var ReactChildren = __webpack_require__(344); |
9409 | | var ReactDOMFactories = __webpack_require__(352); |
9410 | | var ReactElement = __webpack_require__(346); |
9411 | | var ReactPropTypes = __webpack_require__(359); |
9412 | | var ReactVersion = __webpack_require__(364); |
9413 | | |
9414 | | var createReactClass = __webpack_require__(365); |
9415 | | var onlyChild = __webpack_require__(367); |
9416 | | |
9417 | | var createElement = ReactElement.createElement; |
9418 | | var createFactory = ReactElement.createFactory; |
9419 | | var cloneElement = ReactElement.cloneElement; |
9420 | | |
9421 | | if (true) { |
9422 | | var lowPriorityWarning = __webpack_require__(343); |
9423 | | var canDefineProperty = __webpack_require__(340); |
9424 | | var ReactElementValidator = __webpack_require__(353); |
9425 | | var didWarnPropTypesDeprecated = false; |
9426 | | createElement = ReactElementValidator.createElement; |
9427 | | createFactory = ReactElementValidator.createFactory; |
9428 | | cloneElement = ReactElementValidator.cloneElement; |
9429 | | } |
9430 | | |
9431 | | var __spread = _assign; |
9432 | | var createMixin = function (mixin) { |
9433 | | return mixin; |
9434 | | }; |
9435 | | |
9436 | | if (true) { |
9437 | | var warnedForSpread = false; |
9438 | | var warnedForCreateMixin = false; |
9439 | | __spread = function () { |
9440 | | lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.'); |
9441 | | warnedForSpread = true; |
9442 | | return _assign.apply(null, arguments); |
9443 | | }; |
9444 | | |
9445 | | createMixin = function (mixin) { |
9446 | | lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.'); |
9447 | | warnedForCreateMixin = true; |
9448 | | return mixin; |
9449 | | }; |
9450 | | } |
9451 | | |
9452 | | var React = { |
9453 | | // Modern |
9454 | | |
9455 | | Children: { |
9456 | | map: ReactChildren.map, |
9457 | | forEach: ReactChildren.forEach, |
9458 | | count: ReactChildren.count, |
9459 | | toArray: ReactChildren.toArray, |
9460 | | only: onlyChild |
9461 | | }, |
9462 | | |
9463 | | Component: ReactBaseClasses.Component, |
9464 | | PureComponent: ReactBaseClasses.PureComponent, |
9465 | | |
9466 | | createElement: createElement, |
9467 | | cloneElement: cloneElement, |
9468 | | isValidElement: ReactElement.isValidElement, |
9469 | | |
9470 | | // Classic |
9471 | | |
9472 | | PropTypes: ReactPropTypes, |
9473 | | createClass: createReactClass, |
9474 | | createFactory: createFactory, |
9475 | | createMixin: createMixin, |
9476 | | |
9477 | | // This looks DOM specific but these are actually isomorphic helpers |
9478 | | // since they are just generating DOM strings. |
9479 | | DOM: ReactDOMFactories, |
9480 | | |
9481 | | version: ReactVersion, |
9482 | | |
9483 | | // Deprecated hook for JSX spread, don't use this for anything. |
9484 | | __spread: __spread |
9485 | | }; |
9486 | | |
9487 | | if (true) { |
9488 | | var warnedForCreateClass = false; |
9489 | | if (canDefineProperty) { |
9490 | | Object.defineProperty(React, 'PropTypes', { |
9491 | | get: function () { |
9492 | | lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs'); |
9493 | | didWarnPropTypesDeprecated = true; |
9494 | | return ReactPropTypes; |
9495 | | } |
9496 | | }); |
9497 | | |
9498 | | Object.defineProperty(React, 'createClass', { |
9499 | | get: function () { |
9500 | | lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class'); |
9501 | | warnedForCreateClass = true; |
9502 | | return createReactClass; |
9503 | | } |
9504 | | }); |
9505 | | } |
9506 | | |
9507 | | // React.DOM factories are deprecated. Wrap these methods so that |
9508 | | // invocations of the React.DOM namespace and alert users to switch |
9509 | | // to the `react-dom-factories` package. |
9510 | | React.DOM = {}; |
9511 | | var warnedForFactories = false; |
9512 | | Object.keys(ReactDOMFactories).forEach(function (factory) { |
9513 | | React.DOM[factory] = function () { |
9514 | | if (!warnedForFactories) { |
9515 | | lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory); |
9516 | | warnedForFactories = true; |
9517 | | } |
9518 | | return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments); |
9519 | | }; |
9520 | | }); |
9521 | | } |
9522 | | |
9523 | | module.exports = React; |
9524 | | |
9525 | | /***/ }), |
9526 | | /* 334 */ |
9527 | | /***/ (function(module, exports) { |
9528 | | |
9529 | | /* |
| 1 | !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),t.exports=n(331)},function(t,e,n){(function(t){"use strict";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(2),n(327),n(328),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(3),n(51),n(52),n(53),n(54),n(56),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(69),n(71),n(73),n(75),n(78),n(79),n(80),n(84),n(86),n(88),n(91),n(92),n(93),n(94),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(104),n(105),n(106),n(108),n(109),n(110),n(112),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(131),n(132),n(136),n(137),n(138),n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(157),n(158),n(160),n(161),n(167),n(168),n(170),n(171),n(172),n(176),n(177),n(178),n(179),n(180),n(182),n(183),n(184),n(185),n(188),n(190),n(191),n(192),n(194),n(196),n(198),n(200),n(201),n(202),n(206),n(207),n(208),n(210),n(220),n(224),n(225),n(227),n(228),n(232),n(233),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(255),n(256),n(257),n(258),n(259),n(261),n(262),n(263),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(274),n(275),n(277),n(278),n(279),n(280),n(283),n(284),n(286),n(287),n(288),n(289),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),t.exports=n(9)},function(t,e,n){"use strict";var r=n(4),o=n(5),i=n(6),a=n(8),u=n(18),s=n(22).KEY,c=n(7),l=n(23),f=n(25),p=n(19),d=n(26),h=n(27),v=n(28),m=n(29),g=n(44),y=n(12),_=n(13),b=n(32),x=n(16),E=n(17),w=n(45),C=n(48),S=n(50),P=n(11),T=n(30),k=S.f,M=P.f,N=C.f,O=r.Symbol,I=r.JSON,A=I&&I.stringify,R="prototype",D=d("_hidden"),F=d("toPrimitive"),L={}.propertyIsEnumerable,U=l("symbol-registry"),j=l("symbols"),V=l("op-symbols"),W=Object[R],B="function"==typeof O,H=r.QObject,q=!H||!H[R]||!H[R].findChild,K=i&&c(function(){return 7!=w(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=k(W,e);r&&delete W[e],M(t,e,n),r&&t!==W&&M(W,e,r)}:M,Y=function(t){var e=j[t]=w(O[R]);return e._k=t,e},z=B&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},G=function(t,e,n){return t===W&&G(V,e,n),y(t),e=x(e,!0),y(n),o(j,e)?(n.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),n=w(n,{enumerable:E(0,!1)})):(o(t,D)||M(t,D,E(1,{})),t[D][e]=!0),K(t,e,n)):M(t,e,n)},Q=function(t,e){y(t);for(var n,r=m(e=b(e)),o=0,i=r.length;i>o;)G(t,n=r[o++],e[n]);return t},X=function(t,e){return void 0===e?w(t):Q(w(t),e)},$=function(t){var e=L.call(this,t=x(t,!0));return!(this===W&&o(j,t)&&!o(V,t))&&(!(e||!o(this,t)||!o(j,t)||o(this,D)&&this[D][t])||e)},J=function(t,e){if(t=b(t),e=x(e,!0),t!==W||!o(j,e)||o(V,e)){var n=k(t,e);return!n||!o(j,e)||o(t,D)&&t[D][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=N(b(t)),r=[],i=0;n.length>i;)o(j,e=n[i++])||e==D||e==s||r.push(e);return r},tt=function(t){for(var e,n=t===W,r=N(n?V:b(t)),i=[],a=0;r.length>a;)!o(j,e=r[a++])||n&&!o(W,e)||i.push(j[e]);return i};B||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(V,n),o(this,D)&&o(this[D],t)&&(this[D][t]=!1),K(this,t,E(1,n))};return i&&q&&K(W,t,{configurable:!0,set:e}),Y(t)},u(O[R],"toString",function(){return this._k}),S.f=J,P.f=G,n(49).f=C.f=Z,n(43).f=$,n(42).f=tt,i&&!n(24)&&u(W,"propertyIsEnumerable",$,!0),h.f=function(t){return Y(d(t))}),a(a.G+a.W+a.F*!B,{Symbol:O});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=T(d.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return o(U,t+="")?U[t]:U[t]=O(t)},keyFor:function(t){if(!z(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!B,"Object",{create:X,defineProperty:G,defineProperties:Q,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),I&&a(a.S+a.F*(!B||c(function(){var t=O();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(_(e)||void 0!==t)&&!z(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,A.apply(I,r)}}),O[R][F]||n(10)(O[R],F,O[R].valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(4),o=n(9),i=n(10),a=n(18),u=n(20),s="prototype",c=function(t,e,n){var l,f,p,d,h=t&c.F,v=t&c.G,m=t&c.S,g=t&c.P,y=t&c.B,_=v?r:m?r[e]||(r[e]={}):(r[e]||{})[s],b=v?o:o[e]||(o[e]={}),x=b[s]||(b[s]={});v&&(n=e);for(l in n)f=!h&&_&&void 0!==_[l],p=(f?_:n)[l],d=y&&f?u(p,r):g&&"function"==typeof p?u(Function.call,p):p,_&&a(_,l,p,t&c.U),b[l]!=p&&i(b,l,d),g&&x[l]!=p&&(x[l]=p)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports={version:"2.6.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(11),o=n(17);t.exports=n(6)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(12),o=n(14),i=n(16),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(6)&&!n(7)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(13),o=n(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(4),o=n(10),i=n(5),a=n(19)("src"),u="toString",s=Function[u],c=(""+s).split(u);n(9).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,u){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(19)("meta"),o=n(13),i=n(5),a=n(11).f,u=0,s=Object.isExtensible||function(){return!0},c=!n(7)(function(){return s(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!e)return"E";l(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!s(t))return!0;if(!e)return!1;l(t)}return t[r].w},d=function(t){return c&&h.NEED&&s(t)&&!i(t,r)&&l(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var r=n(9),o=n(4),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(24)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(11).f,o=n(5),i=n(26)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(23)("wks"),o=n(19),i=n(4).Symbol,a="function"==typeof i,u=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};u.store=r},function(t,e,n){e.f=n(26)},function(t,e,n){var r=n(4),o=n(9),i=n(24),a=n(27),u=n(11).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(30),o=n(42),i=n(43);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,u=n(t),s=i.f,c=0;u.length>c;)s.call(t,a=u[c++])&&e.push(a);return e}},function(t,e,n){var r=n(31),o=n(41);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(5),o=n(32),i=n(36)(!1),a=n(40)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),s=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;e.length>s;)r(u,n=e[s++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(33),o=n(35);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(32),o=n(37),i=n(39);t.exports=function(t){return function(e,n,a){var u,s=r(e),c=o(s.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if(u=s[l++],u!=u)return!0}else for(;c>l;l++)if((t||l in s)&&s[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(38),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(38),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(23)("keys"),o=n(19);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(34);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(12),o=n(46),i=n(41),a=n(40)("IE_PROTO"),u=function(){},s="prototype",c=function(){var t,e=n(15)("iframe"),r=i.length,o="<",a=">";for(e.style.display="none",n(47).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),c=t.F;r--;)delete c[s][i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[s]=r(t),n=new u,u[s]=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(11),o=n(12),i=n(30);t.exports=n(6)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,s=0;u>s;)r.f(t,n=a[s++],e[n]);return t}},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(32),o=n(49).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?u(t):o(r(t))}},function(t,e,n){var r=n(31),o=n(41).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(43),o=n(17),i=n(32),a=n(16),u=n(5),s=n(14),c=Object.getOwnPropertyDescriptor;e.f=n(6)?c:function(t,e){if(t=i(t),e=a(e,!0),s)try{return c(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(8);r(r.S,"Object",{create:n(45)})},function(t,e,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(46)})},function(t,e,n){var r=n(32),o=n(50).f;n(55)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){var r=n(8),o=n(9),i=n(7);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(57),o=n(58);n(55)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(35);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(5),o=n(57),i=n(40)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(57),o=n(30);n(55)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){n(55)("getOwnPropertyNames",function(){return n(48).f})},function(t,e,n){var r=n(13),o=n(22).onFreeze;n(55)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(13),o=n(22).onFreeze;n(55)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(13),o=n(22).onFreeze;n(55)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(13);n(55)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(13);n(55)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(13);n(55)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(8);r(r.S+r.F,"Object",{assign:n(68)})},function(t,e,n){"use strict";var r=n(30),o=n(42),i=n(43),a=n(57),u=n(33),s=Object.assign;t.exports=!s||n(7)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){for(var n=a(t),s=arguments.length,c=1,l=o.f,f=i.f;s>c;)for(var p,d=u(arguments[c++]),h=l?r(d).concat(l(d)):r(d),v=h.length,m=0;v>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:s},function(t,e,n){var r=n(8);r(r.S,"Object",{is:n(70)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(72).set})},function(t,e,n){var r=n(13),o=n(12),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(20)(Function.call,n(50).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){"use strict";var r=n(74),o={};o[n(26)("toStringTag")]="z",o+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(34),o=n(26)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e,n){var r=n(8);r(r.P,"Function",{bind:n(76)})},function(t,e,n){"use strict";var r=n(21),o=n(13),i=n(77),a=[].slice,u={},s=function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?s(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(u.prototype=e.prototype),u}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(11).f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n(6)&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(13),o=n(58),i=n(26)("hasInstance"),a=Function.prototype;i in a||n(11).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(8),o=n(81);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(4).parseInt,o=n(82).trim,i=n(83),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(8),o=n(35),i=n(7),a=n(83),u="["+a+"]",s=" |
| 2 | ",c=RegExp("^"+u+u+"*"),l=RegExp(u+u+"*$"),f=function(t,e,n){var o={},u=i(function(){return!!a[t]()||s[t]()!=s}),c=o[t]=u?e(p):a[t];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},p=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(l,"")),t};t.exports=f},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(8),o=n(85);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){var r=n(4).parseFloat,o=n(82).trim;t.exports=1/r(n(83)+"-0")!==-(1/0)?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(4),o=n(5),i=n(34),a=n(87),u=n(16),s=n(7),c=n(49).f,l=n(50).f,f=n(11).f,p=n(82).trim,d="Number",h=r[d],v=h,m=h.prototype,g=i(n(45)(m))==d,y="trim"in String.prototype,_=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=y?e.trim():p(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,s=e.slice(2),c=0,l=s.length;c<l;c++)if(a=s.charCodeAt(c),a<48||a>o)return NaN;return parseInt(s,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(g?s(function(){m.valueOf.call(n)}):i(n)!=d)?a(new v(_(e)),n,h):_(e)};for(var b,x=n(6)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;x.length>E;E++)o(v,b=x[E])&&!o(h,b)&&f(h,b,l(v,b));h.prototype=m,m.constructor=h,n(18)(r,d,h)}},function(t,e,n){var r=n(13),o=n(72).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(8),o=n(38),i=n(89),a=n(90),u=1..toFixed,s=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",p=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=s(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=s(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call(f,7-n.length)+n}return e},v=function(t,e,n){return 0===e?n:e%2===1?v(t,e-1,n*t):v(t*t,e/2,n)},m=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,s=i(this,l),c=o(t),g="",y=f;if(c<0||c>20)throw RangeError(l);if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(g="-",s=-s),s>1e-21)if(e=m(s*v(2,69,1))-69,n=e<0?s*v(2,-e,1):s/v(2,e,1),n*=4503599627370496,e=52-e,e>0){for(p(0,n),r=c;r>=7;)p(1e7,0),r-=7;for(p(v(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<<r),p(1,1),d(2),y=h()}else p(0,n),p(1<<-e,0),y=h()+a.call(f,c);return c>0?(u=y.length,y=g+(u<=c?"0."+a.call(f,c-u)+y:y.slice(0,u-c)+"."+y.slice(u-c))):y=g+y,y}})},function(t,e,n){var r=n(34);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(38),o=n(35);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(8),o=n(7),i=n(89),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(8),o=n(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(8);r(r.S,"Number",{isInteger:n(95)})},function(t,e,n){var r=n(13),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r=n(8);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(8),o=n(95),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(8),o=n(85);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(8),o=n(81);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(8),o=n(103),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=n(8),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(8),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(8),o=n(107);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(8);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(8),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(8),o=n(111);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(8);r(r.S,"Math",{fround:n(113)})},function(t,e,n){var r=n(107),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),s=o(2,-126),c=function(t){return t+1/i-1/i};t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),l=r(t);return o<s?l*c(o/s/a)*s*a:(e=(1+a/i)*o,n=e-(e-o),n>u||n!=n?l*(1/0):l*n)}},function(t,e,n){var r=n(8),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,u=arguments.length,s=0;a<u;)n=o(arguments[a++]),s<n?(r=s/n,i=i*r*r+1,s=n):n>0?(r=n/s,i+=r*r):i+=n;return s===1/0?1/0:s*Math.sqrt(i)}})},function(t,e,n){var r=n(8),o=Math.imul;r(r.S+r.F*n(7)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(8);r(r.S,"Math",{log1p:n(103)})},function(t,e,n){var r=n(8);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(8);r(r.S,"Math",{sign:n(107)})},function(t,e,n){var r=n(8),o=n(111),i=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(8),o=n(111),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(8);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(8),o=n(39),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(8),o=n(32),i=n(37);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},function(t,e,n){"use strict";n(82)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(127)(!0);n(128)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(38),o=n(35);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),s=r(n),c=u.length;return s<0||s>=c?t?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):i:t?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(24),o=n(8),i=n(18),a=n(10),u=n(129),s=n(130),c=n(25),l=n(58),f=n(26)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",m=function(){return this};t.exports=function(t,e,n,g,y,_,b){s(n,e,g);var x,E,w,C=function(t){if(!p&&t in k)return k[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",P=y==v,T=!1,k=t.prototype,M=k[f]||k[d]||y&&k[y],N=M||C(y),O=y?P?C("entries"):N:void 0,I="Array"==e?k.entries||M:M;if(I&&(w=l(I.call(new t)),w!==Object.prototype&&w.next&&(c(w,S,!0),r||"function"==typeof w[f]||a(w,f,m))),P&&M&&M.name!==v&&(T=!0,N=function(){return M.call(this)}),r&&!b||!p&&!T&&k[f]||a(k,f,N),u[e]=N,u[S]=m,y)if(x={values:P?N:C(v),keys:_?N:C(h),entries:O},b)for(E in x)E in k||i(k,E,x[E]);else o(o.P+o.F*(p||T),e,x);return x}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(45),o=n(17),i=n(25),a={};n(10)(a,n(26)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(8),o=n(127)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(8),o=n(37),i=n(133),a="endsWith",u=""[a];r(r.P+r.F*n(135)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),s=void 0===n?r:Math.min(o(n),r),c=String(t);return u?u.call(e,c,s):e.slice(s-c.length,s)===c}})},function(t,e,n){var r=n(134),o=n(35);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(13),o=n(34),i=n(26)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(26)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){"use strict";var r=n(8),o=n(133),i="includes";r(r.P+r.F*n(135)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(8);r(r.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var r=n(8),o=n(37),i=n(133),a="startsWith",u=""[a];r(r.P+r.F*n(135)(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(140)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(8),o=n(7),i=n(35),a=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(140)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(140)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(140)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(140)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(140)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(140)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(140)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(140)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(140)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(140)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(140)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(140)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(8),o=n(57),i=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(8),o=n(156);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(7),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1)); |
| 3 | })||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],u=r.getTime;new Date(NaN)+""!=o&&n(18)(r,i,function(){var t=u.call(this);return t===t?a.call(this):o})},function(t,e,n){var r=n(26)("toPrimitive"),o=Date.prototype;r in o||n(10)(o,r,n(159))},function(t,e,n){"use strict";var r=n(12),o=n(16),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},function(t,e,n){var r=n(8);r(r.S,"Array",{isArray:n(44)})},function(t,e,n){"use strict";var r=n(20),o=n(8),i=n(57),a=n(162),u=n(163),s=n(37),c=n(164),l=n(165);o(o.S+o.F*!n(166)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,p=i(t),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,g=0,y=l(p);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==y||d==Array&&u(y))for(e=s(p.length),n=new d(e);e>g;g++)c(n,g,m?v(p[g],g):p[g]);else for(f=y.call(p),n=new d;!(o=f.next()).done;g++)c(n,g,m?a(f,v,[o.value,g],!0):o.value);return n.length=g,n}})},function(t,e,n){var r=n(12);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(129),o=n(26)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(11),o=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(74),o=n(26)("iterator"),i=n(129);t.exports=n(9).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(26)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(8),o=n(164);r(r.S+r.F*n(7)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(8),o=n(32),i=[].join;r(r.P+r.F*(n(33)!=Object||!n(169)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(8),o=n(47),i=n(34),a=n(39),u=n(37),s=[].slice;r(r.P+r.F*n(7)(function(){o&&s.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return s.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=u(c-o),f=new Array(l),p=0;p<l;p++)f[p]="String"==r?this.charAt(o+p):this[o+p];return f}})},function(t,e,n){"use strict";var r=n(8),o=n(21),i=n(57),a=n(7),u=[].sort,s=[1,2,3];r(r.P+r.F*(a(function(){s.sort(void 0)})||!a(function(){s.sort(null)})||!n(169)(u)),"Array",{sort:function(t){return void 0===t?u.call(i(this)):u.call(i(this),o(t))}})},function(t,e,n){"use strict";var r=n(8),o=n(173)(0),i=n(169)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(20),o=n(33),i=n(57),a=n(37),u=n(174);t.exports=function(t,e){var n=1==t,s=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,d=e||u;return function(e,u,h){for(var v,m,g=i(e),y=o(g),_=r(u,h,3),b=a(y.length),x=0,E=n?d(e,b):s?d(e,0):void 0;b>x;x++)if((p||x in y)&&(v=y[x],m=_(v,x,g),t))if(n)E[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:E.push(v)}else if(l)return!1;return f?-1:c||l?l:E}}},function(t,e,n){var r=n(175);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(13),o=n(44),i=n(26)("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(8),o=n(173)(1);r(r.P+r.F*!n(169)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),o=n(173)(2);r(r.P+r.F*!n(169)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),o=n(173)(3);r(r.P+r.F*!n(169)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),o=n(173)(4);r(r.P+r.F*!n(169)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),o=n(181);r(r.P+r.F*!n(169)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(21),o=n(57),i=n(33),a=n(37);t.exports=function(t,e,n,u,s){r(e);var c=o(t),l=i(c),f=a(c.length),p=s?f-1:0,d=s?-1:1;if(n<2)for(;;){if(p in l){u=l[p],p+=d;break}if(p+=d,s?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;s?p>=0:f>p;p+=d)p in l&&(u=e(u,l[p],p,c));return u}},function(t,e,n){"use strict";var r=n(8),o=n(181);r(r.P+r.F*!n(169)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(8),o=n(36)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(169)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),o=n(32),i=n(38),a=n(37),u=[].lastIndexOf,s=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(s||!n(169)(u)),"Array",{lastIndexOf:function(t){if(s)return u.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(8);r(r.P,"Array",{copyWithin:n(186)}),n(187)("copyWithin")},function(t,e,n){"use strict";var r=n(57),o=n(39),i=n(37);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),s=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-s,a-u),f=1;for(s<u&&u<s+l&&(f=-1,s+=l-1,u+=l-1);l-- >0;)s in n?n[u]=n[s]:delete n[u],u+=f,s+=f;return n}},function(t,e,n){var r=n(26)("unscopables"),o=Array.prototype;void 0==o[r]&&n(10)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){var r=n(8);r(r.P,"Array",{fill:n(189)}),n(187)("fill")},function(t,e,n){"use strict";var r=n(57),o=n(39),i=n(37);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,c=void 0===s?n:o(s,n);c>u;)e[u++]=t;return e}},function(t,e,n){"use strict";var r=n(8),o=n(173)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(187)(i)},function(t,e,n){"use strict";var r=n(8),o=n(173)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(187)(i)},function(t,e,n){n(193)("Array")},function(t,e,n){"use strict";var r=n(4),o=n(11),i=n(6),a=n(26)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(187),o=n(195),i=n(129),a=n(32);t.exports=n(128)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),o=n(87),i=n(11).f,a=n(49).f,u=n(134),s=n(197),c=r.RegExp,l=c,f=c.prototype,p=/a/g,d=/a/g,h=new c(p)!==p;if(n(6)&&(!h||n(7)(function(){return d[n(26)("match")]=!1,c(p)!=p||c(d)==d||"/a/i"!=c(p,"i")}))){c=function(t,e){var n=this instanceof c,r=u(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(h?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?s.call(t):e),n?this:f,c)};for(var v=(function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),m=a(l),g=0;m.length>g;)v(m[g++]);f.constructor=c,c.prototype=f,n(18)(r,"RegExp",c)}n(193)("RegExp")},function(t,e,n){"use strict";var r=n(12);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(199);n(8)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){"use strict";var r=n(197),o=RegExp.prototype.exec,i=String.prototype.replace,a=o,u="lastIndex",s=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[u]||0!==e[u]}(),c=void 0!==/()??/.exec("")[1],l=s||c;l&&(a=function(t){var e,n,a,l,f=this;return c&&(n=new RegExp("^"+f.source+"$(?!\\s)",r.call(f))),s&&(e=f[u]),a=o.call(f,t),s&&a&&(f[u]=f.global?a.index+a[0].length:e),c&&a&&a.length>1&&i.call(a[0],n,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(a[l]=void 0)}),a}),t.exports=a},function(t,e,n){"use strict";n(201);var r=n(12),o=n(197),i=n(6),a="toString",u=/./[a],s=function(t){n(18)(RegExp.prototype,a,t,!0)};n(7)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):u.name!=a&&s(function(){return u.call(this)})},function(t,e,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(197)})},function(t,e,n){"use strict";var r=n(12),o=n(37),i=n(203),a=n(204);n(205)("match",1,function(t,e,n,u){return[function(n){var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=u(n,t,this);if(e.done)return e.value;var s=r(t),c=String(this);if(!s.global)return a(s,c);var l=s.unicode;s.lastIndex=0;for(var f,p=[],d=0;null!==(f=a(s,c));){var h=String(f[0]);p[d]=h,""===h&&(s.lastIndex=i(c,o(s.lastIndex),l)),d++}return 0===d?null:p}]})},function(t,e,n){"use strict";var r=n(127)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){"use strict";var r=n(74),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";n(198);var r=n(18),o=n(10),i=n(7),a=n(35),u=n(26),s=n(199),c=u("species"),l=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=u(t),d=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),h=d?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e}):void 0;if(!d||!h||"replace"===t&&!l||"split"===t&&!f){var v=/./[p],m=n(a,p,""[t],function(t,e,n,r,o){return e.exec===s?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=m[0],y=m[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},function(t,e,n){"use strict";var r=n(12),o=n(57),i=n(37),a=n(38),u=n(203),s=n(204),c=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n(205)("replace",2,function(t,e,n,v){function m(t,e,r,i,a,u){var s=r+t.length,c=i.length,l=d;return void 0!==a&&(a=o(a),l=p),n.call(u,l,function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(s);case"<":u=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return o;if(l>c){var p=f(l/10);return 0===p?o:p<=c?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):o}u=i[l-1]}return void 0===u?"":u})}return[function(r,o){var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var f=r(t),p=String(this),d="function"==typeof e;d||(e=String(e));var g=f.global;if(g){var y=f.unicode;f.lastIndex=0}for(var _=[];;){var b=s(f,p);if(null===b)break;if(_.push(b),!g)break;var x=String(b[0]);""===x&&(f.lastIndex=u(p,i(f.lastIndex),y))}for(var E="",w=0,C=0;C<_.length;C++){b=_[C];for(var S=String(b[0]),P=c(l(a(b.index),p.length),0),T=[],k=1;k<b.length;k++)T.push(h(b[k]));var M=b.groups;if(d){var N=[S].concat(T,P,p);void 0!==M&&N.push(M);var O=String(e.apply(void 0,N))}else O=m(S,p,P,T,M,e);P>=w&&(E+=p.slice(w,P)+O,w=P+S.length)}return E+p.slice(w)}]})},function(t,e,n){"use strict";var r=n(12),o=n(70),i=n(204);n(205)("search",1,function(t,e,n,a){return[function(n){var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),s=String(this),c=u.lastIndex;o(c,0)||(u.lastIndex=0);var l=i(u,s);return o(u.lastIndex,c)||(u.lastIndex=c),null===l?-1:l.index}]})},function(t,e,n){"use strict";var r=n(134),o=n(12),i=n(209),a=n(203),u=n(37),s=n(204),c=n(199),l=Math.min,f=[].push,p="split",d="length",h="lastIndex",v=!!function(){try{return new RegExp("x","y")}catch(t){}}();n(205)("split",2,function(t,e,n,m){var g=n;return"c"=="abbc"[p](/(b)*/)[1]||4!="test"[p](/(?:)/,-1)[d]||2!="ab"[p](/(?:ab)*/)[d]||4!="."[p](/(.?)(.?)/)[d]||"."[p](/()()/)[d]>1||""[p](/.?/)[d]?g=function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,a,u,s=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,v=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,l+"g");(i=c.call(m,o))&&(a=m[h],!(a>p&&(s.push(o.slice(p,i.index)),i[d]>1&&i.index<o[d]&&f.apply(s,i.slice(1)),u=i[0][d],p=a,s[d]>=v)));)m[h]===i.index&&m[h]++;return p===o[d]?!u&&m.test("")||s.push(""):s.push(o.slice(p)),s[d]>v?s.slice(0,v):s}:"0"[p](void 0,0)[d]&&(g=function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}),[function(n,r){var o=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,o,r):g.call(String(o),n,r)},function(t,e){var r=m(g,t,this,e,g!==n);if(r.done)return r.value;var c=o(t),f=String(this),p=i(c,RegExp),d=c.unicode,h=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(v?"y":"g"),y=new p(v?c:"^(?:"+c.source+")",h),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===f.length)return null===s(y,f)?[f]:[];for(var b=0,x=0,E=[];x<f.length;){y.lastIndex=v?x:0;var w,C=s(y,v?f:f.slice(x));if(null===C||(w=l(u(y.lastIndex+(v?0:x)),f.length))===b)x=a(f,x,d);else{if(E.push(f.slice(b,x)),E.length===_)return E;for(var S=1;S<=C.length-1;S++)if(E.push(C[S]),E.length===_)return E;x=b=w}}return E.push(f.slice(b)),E}]})},function(t,e,n){var r=n(12),o=n(21),i=n(26)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){"use strict";var r,o,i,a,u=n(24),s=n(4),c=n(20),l=n(74),f=n(8),p=n(13),d=n(21),h=n(211),v=n(212),m=n(209),g=n(213).set,y=n(214)(),_=n(215),b=n(216),x=n(217),E=n(218),w="Promise",C=s.TypeError,S=s.process,P=S&&S.versions,T=P&&P.v8||"",k=s[w],M="process"==l(S),N=function(){},O=o=_.f,I=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(26)("species")]=function(t){t(N,N)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(N)instanceof e&&0!==T.indexOf("6.6")&&x.indexOf("Chrome/66")===-1}catch(t){}}(),A=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,u=o?e.ok:e.fail,s=e.resolve,c=e.reject,l=e.domain;try{u?(o||(2==t._h&&L(t),t._h=1),u===!0?n=r:(l&&l.enter(),n=u(r),l&&(l.exit(),a=!0)),n===e.promise?c(C("Promise-chain cycle")):(i=A(n))?i.call(n,s,c):s(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&D(t)})}},D=function(t){g.call(s,function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=b(function(){M?S.emit("unhandledRejection",o,t):(n=s.onunhandledrejection)?n({promise:t,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=M||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){g.call(s,function(){var e;M?S.emit("rejectionHandled",t):(e=s.onrejectionhandled)&&e({promise:t,reason:t._v})})},U=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},j=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=A(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,c(j,r,1),c(U,r,1))}catch(t){U.call(r,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){U.call({_w:n,_d:!1},t)}}};I||(k=function(t){h(this,k,w,"_h"),d(t),r.call(this);try{t(c(j,this,1),c(U,this,1))}catch(t){U.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(219)(k.prototype,{then:function(t,e){var n=O(m(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=M?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(j,t,1),this.reject=c(U,t,1)},_.f=O=function(t){return t===k||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!I,{Promise:k}),n(25)(k,w),n(193)(w),a=n(9)[w],f(f.S+f.F*!I,w,{reject:function(t){var e=O(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(u||!I),w,{resolve:function(t){return E(u&&this===a?k:this,t)}}),f(f.S+f.F*!(I&&n(166)(function(t){k.all(t).catch(N)})),w,{all:function(t){var e=this,n=O(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;v(t,!1,function(t){var u=i++,s=!1;n.push(void 0),a++,e.resolve(t).then(function(t){s||(s=!0,n[u]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=O(e),r=n.reject,o=b(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(20),o=n(162),i=n(163),a=n(12),u=n(37),s=n(165),c={},l={},e=t.exports=function(t,e,n,f,p){var d,h,v,m,g=p?function(){return t}:s(t),y=r(n,f,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=u(t.length);d>_;_++)if(m=e?y(a(h=t[_])[0],h[1]):y(t[_]),m===c||m===l)return m}else for(v=g.call(t);!(h=v.next()).done;)if(m=o(v,y,h.value,e),m===c||m===l)return m};e.BREAK=c,e.RETURN=l},function(t,e,n){var r,o,i,a=n(20),u=n(77),s=n(47),c=n(15),l=n(4),f=l.process,p=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,m=0,g={},y="onreadystatechange",_=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){_.call(t.data)};p&&d||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++m]=function(){u("function"==typeof t?t:Function(t),e)},r(m),m},d=function(t){delete g[t]},"process"==n(34)(f)?r=function(t){f.nextTick(a(_,t,1))}:v&&v.now?r=function(t){v.now(a(_,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r=y in c("script")?function(t){s.appendChild(c("script"))[y]=function(){s.removeChild(this),_.call(t)}}:function(t){setTimeout(a(_,t,1),0)}),t.exports={set:p,clear:d}},function(t,e,n){var r=n(4),o=n(213).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(34)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(s&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var l=u.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=o(e),this.reject=o(n)}var o=n(21);t.exports.f=function(t){return new r(t)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(4),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){var r=n(12),o=n(13),i=n(215);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(221),o=n(222),i="Map";t.exports=n(223)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(11).f,o=n(45),i=n(219),a=n(20),u=n(211),s=n(212),c=n(128),l=n(195),f=n(193),p=n(6),d=n(22).fastKey,h=n(222),v=p?"_s":"size",m=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t(function(t,r){u(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&s(r,n,t[c],t)});return i(l.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=m(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(h(this,e),t)}}),p&&r(l.prototype,"size",{get:function(){return h(this,e)[v]}}),l},def:function(t,e,n){var r,o,i=m(t,e);return i?i.v=n:(t._l=i={i:o=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:m,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(4),o=n(8),i=n(18),a=n(219),u=n(22),s=n(212),c=n(211),l=n(13),f=n(7),p=n(166),d=n(25),h=n(87);t.exports=function(t,e,n,v,m,g){var y=r[t],_=y,b=m?"set":"add",x=_&&_.prototype,E={},w=function(t){var e=x[t];i(x,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(g||x.forEach&&!f(function(){(new _).entries().next()}))){var C=new _,S=C[b](g?{}:-0,1)!=C,P=f(function(){C.has(1)}),T=p(function(t){new _(t)}),k=!g&&f(function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)});T||(_=e(function(e,n){c(e,_,t);var r=h(new y,e,_);return void 0!=n&&s(n,m,r[b],r),r}),_.prototype=x,x.constructor=_),(P||k)&&(w("delete"),w("has"),m&&w("get")),(k||S)&&w(b),g&&x.clear&&delete x.clear}else _=v.getConstructor(e,t,m,b),a(_.prototype,n),u.NEED=!0;return d(_,t),E[t]=_,o(o.G+o.W+o.F*(_!=y),E),g||v.setStrong(_,t,m),_}},function(t,e,n){"use strict";var r=n(221),o=n(222),i="Set";t.exports=n(223)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(173)(0),i=n(18),a=n(22),u=n(68),s=n(226),c=n(13),l=n(7),f=n(222),p="WeakMap",d=a.getWeak,h=Object.isExtensible,v=s.ufstore,m={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=d(t);return e===!0?v(f(this,p)).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(f(this,p),t,e)}},_=t.exports=n(223)(p,g,y,s,!0,!0);l(function(){return 7!=(new _).set((Object.freeze||Object)(m),7).get(m)})&&(r=s.getConstructor(g,p),u(r.prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=_.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!h(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(219),o=n(22).getWeak,i=n(12),a=n(13),u=n(211),s=n(212),c=n(173),l=n(5),f=n(222),p=c(5),d=c(6),h=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},g=function(t,e){return p(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){u(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,void 0!=r&&s(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return n===!0?v(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return n===!0?v(f(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return r===!0?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){"use strict";var r=n(226),o=n(222),i="WeakSet";n(223)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(8),o=n(229),i=n(230),a=n(12),u=n(39),s=n(37),c=n(13),l=n(4).ArrayBuffer,f=n(209),p=i.ArrayBuffer,d=i.DataView,h=o.ABV&&l.isView,v=p.prototype.slice,m=o.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(l!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,g,{isView:function(t){return h&&h(t)||c(t)&&m in t}}),r(r.P+r.U+r.F*n(7)(function(){return!new p(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,r=u(t,n),o=u(void 0===e?n:e,n),i=new(f(this,p))(s(o-r)),c=new d(this),l=new d(i),h=0;r<o;)l.setUint8(h++,c.getUint8(r++));return i}}),n(193)(g)},function(t,e,n){for(var r,o=n(4),i=n(10),a=n(19),u=a("typed_array"),s=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,p=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<p;)(r=o[d[f++]])?(i(r.prototype,u,!0),i(r.prototype,s,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:u,VIEW:s}},function(t,e,n){"use strict";function r(t,e,n){var r,o,i,a=new Array(n),u=8*n-e-1,s=(1<<u)-1,c=s>>1,l=23===e?W(2,-24)-W(2,-77):0,f=0,p=t<0||0===t&&1/t<0?1:0;for(t=V(t),t!=t||t===U?(o=t!=t?1:0,r=s):(r=B(H(t)/q),t*(i=W(2,-r))<1&&(r--,i*=2),t+=r+c>=1?l/i:l*W(2,1-c),t*i>=2&&(r++,i/=2),r+c>=s?(o=0,r=s):r+c>=1?(o=(t*i-1)*W(2,e),r+=c):(o=t*W(2,c-1)*W(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<<e|o,u+=e;u>0;a[f++]=255&r,r/=256,u-=8);return a[--f]|=128*p,a}function o(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,u=o-7,s=n-1,c=t[s--],l=127&c;for(c>>=7;u>0;l=256*l+t[s],s--,u-=8);for(r=l&(1<<-u)-1,l>>=-u,u+=e;u>0;r=256*r+t[s],s--,u-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-U:U;r+=W(2,e),l-=a}return(c?-1:1)*r*W(2,l-e)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function u(t){return[255&t,t>>8&255]}function s(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function c(t){return r(t,52,8)}function l(t){return r(t,23,4)}function f(t,e,n){P(t[O],e,{get:function(){return this[n]}})}function p(t,e,n,r){var o=+n,i=C(o);if(i+e>t[Q])throw L(A);var a=t[G]._b,u=i+t[X],s=a.slice(u,u+e);return r?s:s.reverse()}function d(t,e,n,r,o,i){var a=+n,u=C(a);if(u+e>t[Q])throw L(A);for(var s=t[G]._b,c=u+t[X],l=r(+o),f=0;f<e;f++)s[c+f]=l[i?f:e-f-1]}var h=n(4),v=n(6),m=n(24),g=n(229),y=n(10),_=n(219),b=n(7),x=n(211),E=n(38),w=n(37),C=n(231),S=n(49).f,P=n(11).f,T=n(189),k=n(25),M="ArrayBuffer",N="DataView",O="prototype",I="Wrong length!",A="Wrong index!",R=h[M],D=h[N],F=h.Math,L=h.RangeError,U=h.Infinity,j=R,V=F.abs,W=F.pow,B=F.floor,H=F.log,q=F.LN2,K="buffer",Y="byteLength",z="byteOffset",G=v?"_b":K,Q=v?"_l":Y,X=v?"_o":z;if(g.ABV){if(!b(function(){R(1)})||!b(function(){new R(-1)})||b(function(){return new R,new R(1.5),new R(NaN),R.name!=M})){R=function(t){return x(this,R),new j(C(t))};for(var $,J=R[O]=j[O],Z=S(j),tt=0;Z.length>tt;)($=Z[tt++])in R||y(R,$,j[$]);m||(J.constructor=R)}var et=new D(new R(2)),nt=D[O].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||_(D[O],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else R=function(t){x(this,R,M);var e=C(t);this._b=T.call(new Array(e),0),this[Q]=e},D=function(t,e,n){x(this,D,N),x(t,R,N);var r=t[Q],o=E(e);if(o<0||o>r)throw L("Wrong offset!");if(n=void 0===n?r-o:w(n),o+n>r)throw L(I);this[G]=t,this[X]=o,this[Q]=n},v&&(f(R,Y,"_l"),f(D,K,"_b"),f(D,Y,"_l"),f(D,z,"_o")),_(D[O],{getInt8:function(t){return p(this,1,t)[0]<<24>>24},getUint8:function(t){return p(this,1,t)[0]},getInt16:function(t){var e=p(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=p(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return i(p(this,4,t,arguments[1]))},getUint32:function(t){return i(p(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(p(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(p(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){d(this,1,t,a,e)},setUint8:function(t,e){d(this,1,t,a,e)},setInt16:function(t,e){d(this,2,t,u,e,arguments[2])},setUint16:function(t,e){d(this,2,t,u,e,arguments[2])},setInt32:function(t,e){d(this,4,t,s,e,arguments[2])},setUint32:function(t,e){d(this,4,t,s,e,arguments[2])},setFloat32:function(t,e){d(this,4,t,l,e,arguments[2])},setFloat64:function(t,e){d(this,8,t,c,e,arguments[2])}});k(R,M),k(D,N),y(D[O],g.VIEW,!0),e[M]=R,e[N]=D},function(t,e,n){var r=n(38),o=n(37);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(8);r(r.G+r.W+r.F*!n(229).ABV,{DataView:n(230).DataView})},function(t,e,n){n(234)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(6)){var r=n(24),o=n(4),i=n(7),a=n(8),u=n(229),s=n(230),c=n(20),l=n(211),f=n(17),p=n(10),d=n(219),h=n(38),v=n(37),m=n(231),g=n(39),y=n(16),_=n(5),b=n(74),x=n(13),E=n(57),w=n(163),C=n(45),S=n(58),P=n(49).f,T=n(165),k=n(19),M=n(26),N=n(173),O=n(36),I=n(209),A=n(194),R=n(129),D=n(166),F=n(193),L=n(189),U=n(186),j=n(11),V=n(50),W=j.f,B=V.f,H=o.RangeError,q=o.TypeError,K=o.Uint8Array,Y="ArrayBuffer",z="Shared"+Y,G="BYTES_PER_ELEMENT",Q="prototype",X=Array[Q],$=s.ArrayBuffer,J=s.DataView,Z=N(0),tt=N(2),et=N(3),nt=N(4),rt=N(5),ot=N(6),it=O(!0),at=O(!1),ut=A.values,st=A.keys,ct=A.entries,lt=X.lastIndexOf,ft=X.reduce,pt=X.reduceRight,dt=X.join,ht=X.sort,vt=X.slice,mt=X.toString,gt=X.toLocaleString,yt=M("iterator"),_t=M("toStringTag"),bt=k("typed_constructor"),xt=k("def_constructor"),Et=u.CONSTR,wt=u.TYPED,Ct=u.VIEW,St="Wrong length!",Pt=N(1,function(t,e){ |
| 4 | return Ot(I(t,t[xt]),e)}),Tt=i(function(){return 1===new K(new Uint16Array([1]).buffer)[0]}),kt=!!K&&!!K[Q].set&&i(function(){new K(1).set({})}),Mt=function(t,e){var n=h(t);if(n<0||n%e)throw H("Wrong offset!");return n},Nt=function(t){if(x(t)&&wt in t)return t;throw q(t+" is not a typed array!")},Ot=function(t,e){if(!(x(t)&&bt in t))throw q("It is not a typed array constructor!");return new t(e)},It=function(t,e){return At(I(t,t[xt]),e)},At=function(t,e){for(var n=0,r=e.length,o=Ot(t,r);r>n;)o[n]=e[n++];return o},Rt=function(t,e,n){W(t,e,{get:function(){return this._d[n]}})},Dt=function(t){var e,n,r,o,i,a,u=E(t),s=arguments.length,l=s>1?arguments[1]:void 0,f=void 0!==l,p=T(u);if(void 0!=p&&!w(p)){for(a=p.call(u),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);u=r}for(f&&s>2&&(l=c(l,arguments[2],2)),e=0,n=v(u.length),o=Ot(this,n);n>e;e++)o[e]=f?l(u[e],e):u[e];return o},Ft=function(){for(var t=0,e=arguments.length,n=Ot(this,e);e>t;)n[t]=arguments[t++];return n},Lt=!!K&&i(function(){gt.call(new K(1))}),Ut=function(){return gt.apply(Lt?vt.call(Nt(this)):Nt(this),arguments)},jt={copyWithin:function(t,e){return U.call(Nt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Nt(this),arguments)},filter:function(t){return It(this,tt(Nt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Nt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Nt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Nt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Nt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return dt.apply(Nt(this),arguments)},lastIndexOf:function(t){return lt.apply(Nt(this),arguments)},map:function(t){return Pt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ft.apply(Nt(this),arguments)},reduceRight:function(t){return pt.apply(Nt(this),arguments)},reverse:function(){for(var t,e=this,n=Nt(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Nt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ht.call(Nt(this),t)},subarray:function(t,e){var n=Nt(this),r=n.length,o=g(t,r);return new(I(n,n[xt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===e?r:g(e,r))-o))}},Vt=function(t,e){return It(this,vt.call(Nt(this),t,e))},Wt=function(t){Nt(this);var e=Mt(arguments[1],1),n=this.length,r=E(t),o=v(r.length),i=0;if(o+e>n)throw H(St);for(;i<o;)this[e+i]=r[i++]},Bt={entries:function(){return ct.call(Nt(this))},keys:function(){return st.call(Nt(this))},values:function(){return ut.call(Nt(this))}},Ht=function(t,e){return x(t)&&t[wt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},qt=function(t,e){return Ht(t,e=y(e,!0))?f(2,t[e]):B(t,e)},Kt=function(t,e,n){return!(Ht(t,e=y(e,!0))&&x(n)&&_(n,"value"))||_(n,"get")||_(n,"set")||n.configurable||_(n,"writable")&&!n.writable||_(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};Et||(V.f=qt,j.f=Kt),a(a.S+a.F*!Et,"Object",{getOwnPropertyDescriptor:qt,defineProperty:Kt}),i(function(){mt.call({})})&&(mt=gt=function(){return dt.call(this)});var Yt=d({},jt);d(Yt,Bt),p(Yt,yt,Bt.values),d(Yt,{slice:Vt,set:Wt,constructor:function(){},toString:mt,toLocaleString:Ut}),Rt(Yt,"buffer","b"),Rt(Yt,"byteOffset","o"),Rt(Yt,"byteLength","l"),Rt(Yt,"length","e"),W(Yt,_t,{get:function(){return this[wt]}}),t.exports=function(t,e,n,s){s=!!s;var c=t+(s?"Clamped":"")+"Array",f="get"+t,d="set"+t,h=o[c],g=h||{},y=h&&S(h),_=!h||!u.ABV,E={},w=h&&h[Q],T=function(t,n){var r=t._d;return r.v[f](n*e+r.o,Tt)},k=function(t,n,r){var o=t._d;s&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[d](n*e+o.o,r,Tt)},M=function(t,e){W(t,e,{get:function(){return T(this,e)},set:function(t){return k(this,e,t)},enumerable:!0})};_?(h=n(function(t,n,r,o){l(t,h,c,"_d");var i,a,u,s,f=0,d=0;if(x(n)){if(!(n instanceof $||(s=b(n))==Y||s==z))return wt in n?At(h,n):Dt.call(h,n);i=n,d=Mt(r,e);var g=n.byteLength;if(void 0===o){if(g%e)throw H(St);if(a=g-d,a<0)throw H(St)}else if(a=v(o)*e,a+d>g)throw H(St);u=a/e}else u=m(n),a=u*e,i=new $(a);for(p(t,"_d",{b:i,o:d,l:a,e:u,v:new J(i)});f<u;)M(t,f++)}),w=h[Q]=C(Yt),p(w,"constructor",h)):i(function(){h(1)})&&i(function(){new h(-1)})&&D(function(t){new h,new h(null),new h(1.5),new h(t)},!0)||(h=n(function(t,n,r,o){l(t,h,c);var i;return x(n)?n instanceof $||(i=b(n))==Y||i==z?void 0!==o?new g(n,Mt(r,e),o):void 0!==r?new g(n,Mt(r,e)):new g(n):wt in n?At(h,n):Dt.call(h,n):new g(m(n))}),Z(y!==Function.prototype?P(g).concat(P(y)):P(g),function(t){t in h||p(h,t,g[t])}),h[Q]=w,r||(w.constructor=h));var N=w[yt],O=!!N&&("values"==N.name||void 0==N.name),I=Bt.values;p(h,bt,!0),p(w,wt,c),p(w,Ct,!0),p(w,xt,h),(s?new h(1)[_t]==c:_t in w)||W(w,_t,{get:function(){return c}}),E[c]=h,a(a.G+a.W+a.F*(h!=g),E),a(a.S,c,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){g.of.call(h,1)}),c,{from:Dt,of:Ft}),G in w||p(w,G,e),a(a.P,c,jt),F(c),a(a.P+a.F*kt,c,{set:Wt}),a(a.P+a.F*!O,c,Bt),r||w.toString==mt||(w.toString=mt),a(a.P+a.F*i(function(){new h(1).slice()}),c,{slice:Vt}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()})||!i(function(){w.toLocaleString.call([1,2])})),c,{toLocaleString:Ut}),R[c]=O?N:I,r||O||p(w,yt,I)}}else t.exports=function(){}},function(t,e,n){n(234)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(234)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(234)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(8),o=n(21),i=n(12),a=(n(4).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(7)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),s=i(n);return a?a(r,e,s):u.call(r,e,s)}})},function(t,e,n){var r=n(8),o=n(45),i=n(21),a=n(12),u=n(13),s=n(7),c=n(76),l=(n(4).Reflect||{}).construct,f=s(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),p=!s(function(){l(function(){})});r(r.S+r.F*(f||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!f)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var s=n.prototype,d=o(u(s)?s:Object.prototype),h=Function.apply.call(t,d,e);return u(h)?h:d}})},function(t,e,n){var r=n(11),o=n(8),i=n(12),a=n(16);o(o.S+o.F*n(7)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(8),o=n(50).f,i=n(12);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(8),o=n(12),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(130)(i,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){function r(t,e){var n,u,l=arguments.length<3?t:arguments[2];return c(t)===l?t[e]:(n=o.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:s(u=i(t))?r(u,e,l):void 0}var o=n(50),i=n(58),a=n(5),u=n(8),s=n(13),c=n(12);u(u.S,"Reflect",{get:r})},function(t,e,n){var r=n(50),o=n(8),i=n(12);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(8),o=n(58),i=n(12);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(8);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(8),o=n(12),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(254)})},function(t,e,n){var r=n(49),o=n(42),i=n(12),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(8),o=n(12),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){function r(t,e,n){var s,p,d=arguments.length<4?t:arguments[3],h=i.f(l(t),e);if(!h){if(f(p=a(t)))return r(p,e,n,d);h=c(0)}if(u(h,"value")){if(h.writable===!1||!f(d))return!1;if(s=i.f(d,e)){if(s.get||s.set||s.writable===!1)return!1;s.value=n,o.f(d,e,s)}else o.f(d,e,c(0,n));return!0}return void 0!==h.set&&(h.set.call(d,n),!0)}var o=n(11),i=n(50),a=n(58),u=n(5),s=n(8),c=n(17),l=n(12),f=n(13);s(s.S,"Reflect",{set:r})},function(t,e,n){var r=n(8),o=n(72);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(8),o=n(36)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(187)("includes")},function(t,e,n){"use strict";var r=n(8),o=n(260),i=n(57),a=n(37),u=n(21),s=n(174);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return u(t),e=a(r.length),n=s(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(187)("flatMap")},function(t,e,n){"use strict";function r(t,e,n,c,l,f,p,d){for(var h,v,m=l,g=0,y=!!p&&u(p,d,3);g<c;){if(g in n){if(h=y?y(n[g],g,e):n[g],v=!1,i(h)&&(v=h[s],v=void 0!==v?!!v:o(h)),v&&f>0)m=r(t,e,h,a(h.length),m,f-1)-1;else{if(m>=9007199254740991)throw TypeError();t[m]=h}m++}g++}return m}var o=n(44),i=n(13),a=n(37),u=n(20),s=n(26)("isConcatSpreadable");t.exports=r},function(t,e,n){"use strict";var r=n(8),o=n(260),i=n(57),a=n(37),u=n(38),s=n(174);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=i(this),n=a(e.length),r=s(e,0);return o(r,e,e,n,0,void 0===t?1:u(t)),r}}),n(187)("flatten")},function(t,e,n){"use strict";var r=n(8),o=n(127)(!0);r(r.P,"String",{at:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(8),o=n(264),i=n(217);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(37),o=n(90),i=n(35);t.exports=function(t,e,n,a){var u=String(i(t)),s=u.length,c=void 0===n?" ":String(n),l=r(e);if(l<=s||""==c)return u;var f=l-s,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+u:u+p}},function(t,e,n){"use strict";var r=n(8),o=n(264),i=n(217);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(82)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(82)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(8),o=n(35),i=n(37),a=n(134),u=n(197),s=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(130)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(o(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in s?String(t.flags):u.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(t.lastIndex),new c(r,e)}})},function(t,e,n){n(28)("asyncIterator")},function(t,e,n){n(28)("observable")},function(t,e,n){var r=n(8),o=n(254),i=n(32),a=n(50),u=n(164);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),s=a.f,c=o(r),l={},f=0;c.length>f;)n=s(r,e=c[f++]),void 0!==n&&u(l,e,n);return l}})},function(t,e,n){var r=n(8),o=n(273)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){var r=n(30),o=n(32),i=n(43).f;t.exports=function(t){return function(e){for(var n,a=o(e),u=r(a),s=u.length,c=0,l=[];s>c;)i.call(a,n=u[c++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(8),o=n(273)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";var r=n(8),o=n(57),i=n(21),a=n(11);n(6)&&r(r.P+n(276),"Object",{__defineGetter__:function(t,e){a.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";t.exports=n(24)||!n(7)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(4)[t]})},function(t,e,n){"use strict";var r=n(8),o=n(57),i=n(21),a=n(11);n(6)&&r(r.P+n(276),"Object",{__defineSetter__:function(t,e){a.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(8),o=n(57),i=n(16),a=n(58),u=n(50).f;n(6)&&r(r.P+n(276),"Object",{__lookupGetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=u(n,r))return e.get;while(n=a(n))}})},function(t,e,n){"use strict";var r=n(8),o=n(57),i=n(16),a=n(58),u=n(50).f;n(6)&&r(r.P+n(276),"Object",{__lookupSetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=u(n,r))return e.set;while(n=a(n))}})},function(t,e,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(281)("Map")})},function(t,e,n){var r=n(74),o=n(282);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,n){var r=n(212);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(281)("Set")})},function(t,e,n){n(285)("Map")},function(t,e,n){"use strict";var r=n(8);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){n(285)("Set")},function(t,e,n){n(285)("WeakMap")},function(t,e,n){n(285)("WeakSet")},function(t,e,n){n(290)("Map")},function(t,e,n){"use strict";var r=n(8),o=n(21),i=n(20),a=n(212);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,u,s=arguments[1];return o(this),e=void 0!==s,e&&o(s),void 0==t?new this:(n=[],e?(r=0,u=i(s,arguments[2],2),a(t,!1,function(t){n.push(u(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){n(290)("Set")},function(t,e,n){n(290)("WeakMap")},function(t,e,n){n(290)("WeakSet")},function(t,e,n){var r=n(8);r(r.G,{global:n(4)})},function(t,e,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(t,e,n){var r=n(8),o=n(34);r(r.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(8);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(8),o=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*o}})},function(t,e,n){var r=n(8),o=n(301),i=n(113);r(r.S,"Math",{fscale:function(t,e,n,r,a){return i(o(t,e,n,r,a))}})},function(t,e){t.exports=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-(1/0)?t:(t-e)*(o-r)/(n-e)+r}},function(t,e,n){var r=n(8);r(r.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(8);r(r.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(8);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,u=r>>16,s=o>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>16)+((i*s>>>0)+(c&n)>>16)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(8),o=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*o}})},function(t,e,n){var r=n(8);r(r.S,"Math",{scale:n(301)})},function(t,e,n){var r=n(8);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,u=r>>>16,s=o>>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>>16)+((i*s>>>0)+(c&n)>>>16)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(8),o=n(9),i=n(4),a=n(209),u=n(218);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(8),o=n(215),i=n(216);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(313),o=n(12),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},function(t,e,n){var r=n(220),o=n(8),i=n(23)("metadata"),a=i.store||(i.store=new(n(225))),u=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i},s=function(t,e,n){var r=u(e,n,!1);return void 0!==r&&r.has(t)},c=function(t,e,n){var r=u(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){u(n,r,!0).set(t,e)},f=function(t,e){var n=u(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},p=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},d=function(t){o(o.S,"Reflect",t)};t.exports={store:a,map:u,has:s,get:c,set:l,keys:f,key:p,exp:d}},function(t,e,n){var r=n(313),o=n(12),i=r.key,a=r.map,u=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var s=u.get(e);return s.delete(n),!!s.size||u.delete(e)}})},function(t,e,n){var r=n(313),o=n(12),i=n(58),a=r.has,u=r.get,s=r.key,c=function(t,e,n){var r=a(t,e,n);if(r)return u(t,e,n);var o=i(e);return null!==o?c(t,o,n):void 0};r.exp({getMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(224),o=n(282),i=n(313),a=n(12),u=n(58),s=i.keys,c=i.key,l=function(t,e){var n=s(t,e),i=u(t);if(null===i)return n;var a=l(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(313),o=n(12),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(313),o=n(12),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(313),o=n(12),i=n(58),a=r.has,u=r.key,s=function(t,e,n){var r=a(t,e,n);if(r)return!0;var o=i(e);return null!==o&&s(t,o,n)};r.exp({hasMetadata:function(t,e){return s(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(313),o=n(12),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(313),o=n(12),i=n(21),a=r.key,u=r.set;r.exp({metadata:function(t,e){return function(n,r){u(t,e,(void 0!==r?o:i)(n),a(r))}}})},function(t,e,n){var r=n(8),o=n(214)(),i=n(4).process,a="process"==n(34)(i);r(r.G,{asap:function(t){var e=a&&i.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(8),o=n(4),i=n(9),a=n(214)(),u=n(26)("observable"),s=n(21),c=n(12),l=n(211),f=n(219),p=n(10),d=n(212),h=d.RETURN,v=function(t){return null==t?void 0:s(t)},m=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},y=function(t){g(t)||(t._o=void 0,m(t))},_=function(t,e){c(t),this._c=void 0,this._o=t,t=new b(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:s(n),this._c=n)}catch(e){return void t.error(e)}g(this)&&m(this)};_.prototype=f({},{unsubscribe:function(){y(this)}});var b=function(t){this._s=t};b.prototype=f({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=v(n.next);if(r)return r.call(n,t)}catch(t){try{y(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=v(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{m(e)}finally{throw t}}return m(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=v(n.complete);t=r?r.call(n,t):void 0}catch(t){try{m(e)}finally{throw t}}return m(e),t}}});var x=function(t){l(this,x,"Observable","_f")._f=s(t)};f(x.prototype,{subscribe:function(t){return new _(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(n,r){s(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n})})}}),f(x,{from:function(t){var e="function"==typeof this?this:x,n=v(c(t)[u]);if(n){var r=c(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(d(t,!1,function(t){if(e.next(t),n)return h})===h)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:x)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),p(x.prototype,u,function(){return this}),r(r.G,{Observable:x}),n(193)("Observable")},function(t,e,n){var r=n(4),o=n(8),i=n(217),a=[].slice,u=/MSIE .\./.test(i),s=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*u,{setTimeout:s(r.setTimeout),setInterval:s(r.setInterval)})},function(t,e,n){var r=n(8),o=n(213);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var r=n(194),o=n(30),i=n(18),a=n(4),u=n(10),s=n(129),c=n(26),l=c("iterator"),f=c("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var m,g=h[v],y=d[g],_=a[g],b=_&&_.prototype;if(b&&(b[l]||u(b,l,p),b[f]||u(b,f,g),s[g]=p,y))for(m in r)b[m]||i(b,m,r[m],!0)}},function(t,e){(function(e){!function(e){"use strict";function n(t,e,n,r){var i=e&&e.prototype instanceof o?e:o,a=Object.create(i.prototype),u=new d(r||[]);return a._invoke=c(t,n,u),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function o(){}function i(){}function a(){}function u(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function s(t){function n(e,o,i,a){var u=r(t[e],t,o);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&y.call(c,"__await")?Promise.resolve(c.__await).then(function(t){n("next",t,i,a)},function(t){n("throw",t,i,a)}):Promise.resolve(c).then(function(t){s.value=t,i(s)},a)}a(u.arg)}function o(t,e){function r(){return new Promise(function(r,o){n(t,e,r,o)})}return i=i?i.then(r,r):r()}"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n));var i;this._invoke=o}function c(t,e,n){var o=S;return function(i,a){if(o===T)throw new Error("Generator is already running");if(o===k){if("throw"===i)throw a;return v()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=l(u,n);if(s){if(s===M)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===S)throw o=k,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=T;var c=r(t,e,n);if("normal"===c.type){if(o=n.done?k:P,c.arg===M)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=k,n.method="throw",n.arg=c.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,l(t,e),"throw"===e.method))return M;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return M}var o=r(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,M;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=m),e.delegate=null,M):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,M)}function f(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function h(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(y.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=m,e.done=!0,e};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,g=Object.prototype,y=g.hasOwnProperty,_="function"==typeof Symbol?Symbol:{},b=_.iterator||"@@iterator",x=_.asyncIterator||"@@asyncIterator",E=_.toStringTag||"@@toStringTag",w="object"==typeof t,C=e.regeneratorRuntime;if(C)return void(w&&(t.exports=C));C=e.regeneratorRuntime=w?t.exports:{},C.wrap=n;var S="suspendedStart",P="suspendedYield",T="executing",k="completed",M={},N={};N[b]=function(){return this};var O=Object.getPrototypeOf,I=O&&O(O(h([])));I&&I!==g&&y.call(I,b)&&(N=I);var A=a.prototype=o.prototype=Object.create(N);i.prototype=A.constructor=a,a.constructor=i,a[E]=i.displayName="GeneratorFunction",C.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},C.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,E in t||(t[E]="GeneratorFunction")),t.prototype=Object.create(A),t},C.awrap=function(t){return{__await:t}},u(s.prototype),s.prototype[x]=function(){return this},C.AsyncIterator=s,C.async=function(t,e,r,o){var i=new s(n(t,e,r,o));return C.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},u(A),A[E]="Generator",A[b]=function(){return this},A.toString=function(){return"[object Generator]"},C.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=h,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&y.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return i.type="throw",i.arg=t,n.next=e,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=y.call(o,"catchLoc"),u=y.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,M):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),M},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),M}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:h(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),M}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}())},function(t,e,n){n(329),t.exports=n(9).RegExp.escape},function(t,e,n){var r=n(8),o=n(330)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return o(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n(1);var o=n(332),i=r(o),a=n(362),u=r(a),s=n(501),c=r(s);n(515);var l=function(t){return t.humanizedTime};u.default.render(i.default.createElement(c.default,{initialSortField:wpcApplicationTracker.initialSortField,columns:wpcApplicationTracker.displayColumns,customRender:{lastUpdate:l}}),document.getElementById("wpc-application-tracker"))},function(t,e,n){"use strict";t.exports=n(333)},function(t,e,n){"use strict";var r=n(334),o=n(335),i=n(344),a=n(352),u=n(346),s=n(353),c=n(358),l=n(359),f=n(361),p=u.createElement,d=u.createFactory,h=u.cloneElement,v=r,m=function(t){return t},g={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:f},Component:o.Component,PureComponent:o.PureComponent,createElement:p,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:l,createFactory:d,createMixin:m,DOM:a,version:c,__spread:v};t.exports=g},function(t,e){/* |
9534 | | |
9535 | | 'use strict'; |
9536 | | /* eslint-disable no-unused-vars */ |
9537 | | var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
9538 | | var hasOwnProperty = Object.prototype.hasOwnProperty; |
9539 | | var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
9540 | | |
9541 | | function toObject(val) { |
9542 | | if (val === null || val === undefined) { |
9543 | | throw new TypeError('Object.assign cannot be called with null or undefined'); |
9544 | | } |
9545 | | |
9546 | | return Object(val); |
9547 | | } |
9548 | | |
9549 | | function shouldUseNative() { |
9550 | | try { |
9551 | | if (!Object.assign) { |
9552 | | return false; |
9553 | | } |
9554 | | |
9555 | | // Detect buggy property enumeration order in older V8 versions. |
9556 | | |
9557 | | // https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
9558 | | var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
9559 | | test1[5] = 'de'; |
9560 | | if (Object.getOwnPropertyNames(test1)[0] === '5') { |
9561 | | return false; |
9562 | | } |
9563 | | |
9564 | | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
9565 | | var test2 = {}; |
9566 | | for (var i = 0; i < 10; i++) { |
9567 | | test2['_' + String.fromCharCode(i)] = i; |
9568 | | } |
9569 | | var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
9570 | | return test2[n]; |
9571 | | }); |
9572 | | if (order2.join('') !== '0123456789') { |
9573 | | return false; |
9574 | | } |
9575 | | |
9576 | | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
9577 | | var test3 = {}; |
9578 | | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
9579 | | test3[letter] = letter; |
9580 | | }); |
9581 | | if (Object.keys(Object.assign({}, test3)).join('') !== |
9582 | | 'abcdefghijklmnopqrst') { |
9583 | | return false; |
9584 | | } |
9585 | | |
9586 | | return true; |
9587 | | } catch (err) { |
9588 | | // We don't expect any of the above to throw, but better to be safe. |
9589 | | return false; |
9590 | | } |
9591 | | } |
9592 | | |
9593 | | module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
9594 | | var from; |
9595 | | var to = toObject(target); |
9596 | | var symbols; |
9597 | | |
9598 | | for (var s = 1; s < arguments.length; s++) { |
9599 | | from = Object(arguments[s]); |
9600 | | |
9601 | | for (var key in from) { |
9602 | | if (hasOwnProperty.call(from, key)) { |
9603 | | to[key] = from[key]; |
9604 | | } |
9605 | | } |
9606 | | |
9607 | | if (getOwnPropertySymbols) { |
9608 | | symbols = getOwnPropertySymbols(from); |
9609 | | for (var i = 0; i < symbols.length; i++) { |
9610 | | if (propIsEnumerable.call(from, symbols[i])) { |
9611 | | to[symbols[i]] = from[symbols[i]]; |
9612 | | } |
9613 | | } |
9614 | | } |
9615 | | } |
9616 | | |
9617 | | return to; |
9618 | | }; |
9619 | | |
9620 | | |
9621 | | /***/ }), |
9622 | | /* 335 */ |
9623 | | /***/ (function(module, exports, __webpack_require__) { |
9624 | | |
9625 | | /** |
9626 | | * Copyright (c) 2013-present, Facebook, Inc. |
9627 | | * |
9628 | | * This source code is licensed under the MIT license found in the |
9629 | | * LICENSE file in the root directory of this source tree. |
9630 | | * |
9631 | | */ |
9632 | | |
9633 | | 'use strict'; |
9634 | | |
9635 | | var _prodInvariant = __webpack_require__(336), |
9636 | | _assign = __webpack_require__(334); |
9637 | | |
9638 | | var ReactNoopUpdateQueue = __webpack_require__(337); |
9639 | | |
9640 | | var canDefineProperty = __webpack_require__(340); |
9641 | | var emptyObject = __webpack_require__(341); |
9642 | | var invariant = __webpack_require__(342); |
9643 | | var lowPriorityWarning = __webpack_require__(343); |
9644 | | |
9645 | | /** |
9646 | | * Base class helpers for the updating state of a component. |
9647 | | */ |
9648 | | function ReactComponent(props, context, updater) { |
9649 | | this.props = props; |
9650 | | this.context = context; |
9651 | | this.refs = emptyObject; |
9652 | | // We initialize the default updater but the real one gets injected by the |
9653 | | // renderer. |
9654 | | this.updater = updater || ReactNoopUpdateQueue; |
9655 | | } |
9656 | | |
9657 | | ReactComponent.prototype.isReactComponent = {}; |
9658 | | |
9659 | | /** |
9660 | | * Sets a subset of the state. Always use this to mutate |
9661 | | * state. You should treat `this.state` as immutable. |
9662 | | * |
9663 | | * There is no guarantee that `this.state` will be immediately updated, so |
9664 | | * accessing `this.state` after calling this method may return the old value. |
9665 | | * |
9666 | | * There is no guarantee that calls to `setState` will run synchronously, |
9667 | | * as they may eventually be batched together. You can provide an optional |
9668 | | * callback that will be executed when the call to setState is actually |
9669 | | * completed. |
9670 | | * |
9671 | | * When a function is provided to setState, it will be called at some point in |
9672 | | * the future (not synchronously). It will be called with the up to date |
9673 | | * component arguments (state, props, context). These values can be different |
9674 | | * from this.* because your function may be called after receiveProps but before |
9675 | | * shouldComponentUpdate, and this new state, props, and context will not yet be |
9676 | | * assigned to this. |
9677 | | * |
9678 | | * @param {object|function} partialState Next partial state or function to |
9679 | | * produce next partial state to be merged with current state. |
9680 | | * @param {?function} callback Called after state is updated. |
9681 | | * @final |
9682 | | * @protected |
9683 | | */ |
9684 | | ReactComponent.prototype.setState = function (partialState, callback) { |
9685 | | !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? true ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; |
9686 | | this.updater.enqueueSetState(this, partialState); |
9687 | | if (callback) { |
9688 | | this.updater.enqueueCallback(this, callback, 'setState'); |
9689 | | } |
9690 | | }; |
9691 | | |
9692 | | /** |
9693 | | * Forces an update. This should only be invoked when it is known with |
9694 | | * certainty that we are **not** in a DOM transaction. |
9695 | | * |
9696 | | * You may want to call this when you know that some deeper aspect of the |
9697 | | * component's state has changed but `setState` was not called. |
9698 | | * |
9699 | | * This will not invoke `shouldComponentUpdate`, but it will invoke |
9700 | | * `componentWillUpdate` and `componentDidUpdate`. |
9701 | | * |
9702 | | * @param {?function} callback Called after update is complete. |
9703 | | * @final |
9704 | | * @protected |
9705 | | */ |
9706 | | ReactComponent.prototype.forceUpdate = function (callback) { |
9707 | | this.updater.enqueueForceUpdate(this); |
9708 | | if (callback) { |
9709 | | this.updater.enqueueCallback(this, callback, 'forceUpdate'); |
9710 | | } |
9711 | | }; |
9712 | | |
9713 | | /** |
9714 | | * Deprecated APIs. These APIs used to exist on classic React classes but since |
9715 | | * we would like to deprecate them, we're not going to move them over to this |
9716 | | * modern base class. Instead, we define a getter that warns if it's accessed. |
9717 | | */ |
9718 | | if (true) { |
9719 | | var deprecatedAPIs = { |
9720 | | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], |
9721 | | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] |
9722 | | }; |
9723 | | var defineDeprecationWarning = function (methodName, info) { |
9724 | | if (canDefineProperty) { |
9725 | | Object.defineProperty(ReactComponent.prototype, methodName, { |
9726 | | get: function () { |
9727 | | lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); |
9728 | | return undefined; |
9729 | | } |
9730 | | }); |
9731 | | } |
9732 | | }; |
9733 | | for (var fnName in deprecatedAPIs) { |
9734 | | if (deprecatedAPIs.hasOwnProperty(fnName)) { |
9735 | | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); |
9736 | | } |
9737 | | } |
9738 | | } |
9739 | | |
9740 | | /** |
9741 | | * Base class helpers for the updating state of a component. |
9742 | | */ |
9743 | | function ReactPureComponent(props, context, updater) { |
9744 | | // Duplicated from ReactComponent. |
9745 | | this.props = props; |
9746 | | this.context = context; |
9747 | | this.refs = emptyObject; |
9748 | | // We initialize the default updater but the real one gets injected by the |
9749 | | // renderer. |
9750 | | this.updater = updater || ReactNoopUpdateQueue; |
9751 | | } |
9752 | | |
9753 | | function ComponentDummy() {} |
9754 | | ComponentDummy.prototype = ReactComponent.prototype; |
9755 | | ReactPureComponent.prototype = new ComponentDummy(); |
9756 | | ReactPureComponent.prototype.constructor = ReactPureComponent; |
9757 | | // Avoid an extra prototype jump for these methods. |
9758 | | _assign(ReactPureComponent.prototype, ReactComponent.prototype); |
9759 | | ReactPureComponent.prototype.isPureReactComponent = true; |
9760 | | |
9761 | | module.exports = { |
9762 | | Component: ReactComponent, |
9763 | | PureComponent: ReactPureComponent |
9764 | | }; |
9765 | | |
9766 | | /***/ }), |
9767 | | /* 336 */ |
9768 | | /***/ (function(module, exports) { |
9769 | | |
9770 | | /** |
9771 | | * Copyright (c) 2013-present, Facebook, Inc. |
9772 | | * |
9773 | | * This source code is licensed under the MIT license found in the |
9774 | | * LICENSE file in the root directory of this source tree. |
9775 | | * |
9776 | | * |
9777 | | */ |
9778 | | 'use strict'; |
9779 | | |
9780 | | /** |
9781 | | * WARNING: DO NOT manually require this module. |
9782 | | * This is a replacement for `invariant(...)` used by the error code system |
9783 | | * and will _only_ be required by the corresponding babel pass. |
9784 | | * It always throws. |
9785 | | */ |
9786 | | |
9787 | | function reactProdInvariant(code) { |
9788 | | var argCount = arguments.length - 1; |
9789 | | |
9790 | | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; |
9791 | | |
9792 | | for (var argIdx = 0; argIdx < argCount; argIdx++) { |
9793 | | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); |
9794 | | } |
9795 | | |
9796 | | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; |
9797 | | |
9798 | | var error = new Error(message); |
9799 | | error.name = 'Invariant Violation'; |
9800 | | error.framesToPop = 1; // we don't care about reactProdInvariant's own frame |
9801 | | |
9802 | | throw error; |
9803 | | } |
9804 | | |
9805 | | module.exports = reactProdInvariant; |
9806 | | |
9807 | | /***/ }), |
9808 | | /* 337 */ |
9809 | | /***/ (function(module, exports, __webpack_require__) { |
9810 | | |
9811 | | /** |
9812 | | * Copyright (c) 2015-present, Facebook, Inc. |
9813 | | * |
9814 | | * This source code is licensed under the MIT license found in the |
9815 | | * LICENSE file in the root directory of this source tree. |
9816 | | * |
9817 | | */ |
9818 | | |
9819 | | 'use strict'; |
9820 | | |
9821 | | var warning = __webpack_require__(338); |
9822 | | |
9823 | | function warnNoop(publicInstance, callerName) { |
9824 | | if (true) { |
9825 | | var constructor = publicInstance.constructor; |
9826 | | true ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; |
9827 | | } |
9828 | | } |
9829 | | |
9830 | | /** |
9831 | | * This is the abstract API for an update queue. |
9832 | | */ |
9833 | | var ReactNoopUpdateQueue = { |
9834 | | /** |
9835 | | * Checks whether or not this composite component is mounted. |
9836 | | * @param {ReactClass} publicInstance The instance we want to test. |
9837 | | * @return {boolean} True if mounted, false otherwise. |
9838 | | * @protected |
9839 | | * @final |
9840 | | */ |
9841 | | isMounted: function (publicInstance) { |
9842 | | return false; |
9843 | | }, |
9844 | | |
9845 | | /** |
9846 | | * Enqueue a callback that will be executed after all the pending updates |
9847 | | * have processed. |
9848 | | * |
9849 | | * @param {ReactClass} publicInstance The instance to use as `this` context. |
9850 | | * @param {?function} callback Called after state is updated. |
9851 | | * @internal |
9852 | | */ |
9853 | | enqueueCallback: function (publicInstance, callback) {}, |
9854 | | |
9855 | | /** |
9856 | | * Forces an update. This should only be invoked when it is known with |
9857 | | * certainty that we are **not** in a DOM transaction. |
9858 | | * |
9859 | | * You may want to call this when you know that some deeper aspect of the |
9860 | | * component's state has changed but `setState` was not called. |
9861 | | * |
9862 | | * This will not invoke `shouldComponentUpdate`, but it will invoke |
9863 | | * `componentWillUpdate` and `componentDidUpdate`. |
9864 | | * |
9865 | | * @param {ReactClass} publicInstance The instance that should rerender. |
9866 | | * @internal |
9867 | | */ |
9868 | | enqueueForceUpdate: function (publicInstance) { |
9869 | | warnNoop(publicInstance, 'forceUpdate'); |
9870 | | }, |
9871 | | |
9872 | | /** |
9873 | | * Replaces all of the state. Always use this or `setState` to mutate state. |
9874 | | * You should treat `this.state` as immutable. |
9875 | | * |
9876 | | * There is no guarantee that `this.state` will be immediately updated, so |
9877 | | * accessing `this.state` after calling this method may return the old value. |
9878 | | * |
9879 | | * @param {ReactClass} publicInstance The instance that should rerender. |
9880 | | * @param {object} completeState Next state. |
9881 | | * @internal |
9882 | | */ |
9883 | | enqueueReplaceState: function (publicInstance, completeState) { |
9884 | | warnNoop(publicInstance, 'replaceState'); |
9885 | | }, |
9886 | | |
9887 | | /** |
9888 | | * Sets a subset of the state. This only exists because _pendingState is |
9889 | | * internal. This provides a merging strategy that is not available to deep |
9890 | | * properties which is confusing. TODO: Expose pendingState or don't use it |
9891 | | * during the merge. |
9892 | | * |
9893 | | * @param {ReactClass} publicInstance The instance that should rerender. |
9894 | | * @param {object} partialState Next partial state to be merged with state. |
9895 | | * @internal |
9896 | | */ |
9897 | | enqueueSetState: function (publicInstance, partialState) { |
9898 | | warnNoop(publicInstance, 'setState'); |
9899 | | } |
9900 | | }; |
9901 | | |
9902 | | module.exports = ReactNoopUpdateQueue; |
9903 | | |
9904 | | /***/ }), |
9905 | | /* 338 */ |
9906 | | /***/ (function(module, exports, __webpack_require__) { |
9907 | | |
9908 | | /** |
9909 | | * Copyright (c) 2014-present, Facebook, Inc. |
9910 | | * |
9911 | | * This source code is licensed under the MIT license found in the |
9912 | | * LICENSE file in the root directory of this source tree. |
9913 | | * |
9914 | | */ |
9915 | | |
9916 | | 'use strict'; |
9917 | | |
9918 | | var emptyFunction = __webpack_require__(339); |
9919 | | |
9920 | | /** |
9921 | | * Similar to invariant but only logs a warning if the condition is not met. |
9922 | | * This can be used to log issues in development environments in critical |
9923 | | * paths. Removing the logging code for production environments will keep the |
9924 | | * same logic and follow the same code paths. |
9925 | | */ |
9926 | | |
9927 | | var warning = emptyFunction; |
9928 | | |
9929 | | if (true) { |
9930 | | var printWarning = function printWarning(format) { |
9931 | | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
9932 | | args[_key - 1] = arguments[_key]; |
9933 | | } |
9934 | | |
9935 | | var argIndex = 0; |
9936 | | var message = 'Warning: ' + format.replace(/%s/g, function () { |
9937 | | return args[argIndex++]; |
9938 | | }); |
9939 | | if (typeof console !== 'undefined') { |
9940 | | console.error(message); |
9941 | | } |
9942 | | try { |
9943 | | // --- Welcome to debugging React --- |
9944 | | // This error was thrown as a convenience so that you can use this stack |
9945 | | // to find the callsite that caused this warning to fire. |
9946 | | throw new Error(message); |
9947 | | } catch (x) {} |
9948 | | }; |
9949 | | |
9950 | | warning = function warning(condition, format) { |
9951 | | if (format === undefined) { |
9952 | | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); |
9953 | | } |
9954 | | |
9955 | | if (format.indexOf('Failed Composite propType: ') === 0) { |
9956 | | return; // Ignore CompositeComponent proptype check. |
9957 | | } |
9958 | | |
9959 | | if (!condition) { |
9960 | | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { |
9961 | | args[_key2 - 2] = arguments[_key2]; |
9962 | | } |
9963 | | |
9964 | | printWarning.apply(undefined, [format].concat(args)); |
9965 | | } |
9966 | | }; |
9967 | | } |
9968 | | |
9969 | | module.exports = warning; |
9970 | | |
9971 | | /***/ }), |
9972 | | /* 339 */ |
9973 | | /***/ (function(module, exports) { |
9974 | | |
9975 | | "use strict"; |
9976 | | |
9977 | | /** |
9978 | | * Copyright (c) 2013-present, Facebook, Inc. |
9979 | | * |
9980 | | * This source code is licensed under the MIT license found in the |
9981 | | * LICENSE file in the root directory of this source tree. |
9982 | | * |
9983 | | * |
9984 | | */ |
9985 | | |
9986 | | function makeEmptyFunction(arg) { |
9987 | | return function () { |
9988 | | return arg; |
9989 | | }; |
9990 | | } |
9991 | | |
9992 | | /** |
9993 | | * This function accepts and discards inputs; it has no side effects. This is |
9994 | | * primarily useful idiomatically for overridable function endpoints which |
9995 | | * always need to be callable, since JS lacks a null-call idiom ala Cocoa. |
9996 | | */ |
9997 | | var emptyFunction = function emptyFunction() {}; |
9998 | | |
9999 | | emptyFunction.thatReturns = makeEmptyFunction; |
10000 | | emptyFunction.thatReturnsFalse = makeEmptyFunction(false); |
10001 | | emptyFunction.thatReturnsTrue = makeEmptyFunction(true); |
10002 | | emptyFunction.thatReturnsNull = makeEmptyFunction(null); |
10003 | | emptyFunction.thatReturnsThis = function () { |
10004 | | return this; |
10005 | | }; |
10006 | | emptyFunction.thatReturnsArgument = function (arg) { |
10007 | | return arg; |
10008 | | }; |
10009 | | |
10010 | | module.exports = emptyFunction; |
10011 | | |
10012 | | /***/ }), |
10013 | | /* 340 */ |
10014 | | /***/ (function(module, exports, __webpack_require__) { |
10015 | | |
10016 | | /** |
10017 | | * Copyright (c) 2013-present, Facebook, Inc. |
10018 | | * |
10019 | | * This source code is licensed under the MIT license found in the |
10020 | | * LICENSE file in the root directory of this source tree. |
10021 | | * |
10022 | | * |
10023 | | */ |
10024 | | |
10025 | | 'use strict'; |
10026 | | |
10027 | | var canDefineProperty = false; |
10028 | | if (true) { |
10029 | | try { |
10030 | | // $FlowFixMe https://github.com/facebook/flow/issues/285 |
10031 | | Object.defineProperty({}, 'x', { get: function () {} }); |
10032 | | canDefineProperty = true; |
10033 | | } catch (x) { |
10034 | | // IE will fail on defineProperty |
10035 | | } |
10036 | | } |
10037 | | |
10038 | | module.exports = canDefineProperty; |
10039 | | |
10040 | | /***/ }), |
10041 | | /* 341 */ |
10042 | | /***/ (function(module, exports, __webpack_require__) { |
10043 | | |
10044 | | /** |
10045 | | * Copyright (c) 2013-present, Facebook, Inc. |
10046 | | * |
10047 | | * This source code is licensed under the MIT license found in the |
10048 | | * LICENSE file in the root directory of this source tree. |
10049 | | * |
10050 | | */ |
10051 | | |
10052 | | 'use strict'; |
10053 | | |
10054 | | var emptyObject = {}; |
10055 | | |
10056 | | if (true) { |
10057 | | Object.freeze(emptyObject); |
10058 | | } |
10059 | | |
10060 | | module.exports = emptyObject; |
10061 | | |
10062 | | /***/ }), |
10063 | | /* 342 */ |
10064 | | /***/ (function(module, exports, __webpack_require__) { |
10065 | | |
10066 | | /** |
10067 | | * Copyright (c) 2013-present, Facebook, Inc. |
10068 | | * |
10069 | | * This source code is licensed under the MIT license found in the |
10070 | | * LICENSE file in the root directory of this source tree. |
10071 | | * |
10072 | | */ |
10073 | | |
10074 | | 'use strict'; |
10075 | | |
10076 | | /** |
10077 | | * Use invariant() to assert state which your program assumes to be true. |
10078 | | * |
10079 | | * Provide sprintf-style format (only %s is supported) and arguments |
10080 | | * to provide information about what broke and what you were |
10081 | | * expecting. |
10082 | | * |
10083 | | * The invariant message will be stripped in production, but the invariant |
10084 | | * will remain to ensure logic does not differ in production. |
10085 | | */ |
10086 | | |
10087 | | var validateFormat = function validateFormat(format) {}; |
10088 | | |
10089 | | if (true) { |
10090 | | validateFormat = function validateFormat(format) { |
10091 | | if (format === undefined) { |
10092 | | throw new Error('invariant requires an error message argument'); |
10093 | | } |
10094 | | }; |
10095 | | } |
10096 | | |
10097 | | function invariant(condition, format, a, b, c, d, e, f) { |
10098 | | validateFormat(format); |
10099 | | |
10100 | | if (!condition) { |
10101 | | var error; |
10102 | | if (format === undefined) { |
10103 | | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
10104 | | } else { |
10105 | | var args = [a, b, c, d, e, f]; |
10106 | | var argIndex = 0; |
10107 | | error = new Error(format.replace(/%s/g, function () { |
10108 | | return args[argIndex++]; |
10109 | | })); |
10110 | | error.name = 'Invariant Violation'; |
10111 | | } |
10112 | | |
10113 | | error.framesToPop = 1; // we don't care about invariant's own frame |
10114 | | throw error; |
10115 | | } |
10116 | | } |
10117 | | |
10118 | | module.exports = invariant; |
10119 | | |
10120 | | /***/ }), |
10121 | | /* 343 */ |
10122 | | /***/ (function(module, exports, __webpack_require__) { |
10123 | | |
10124 | | /** |
10125 | | * Copyright (c) 2014-present, Facebook, Inc. |
10126 | | * |
10127 | | * This source code is licensed under the MIT license found in the |
10128 | | * LICENSE file in the root directory of this source tree. |
10129 | | * |
10130 | | */ |
10131 | | |
10132 | | 'use strict'; |
10133 | | |
10134 | | /** |
10135 | | * Forked from fbjs/warning: |
10136 | | * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js |
10137 | | * |
10138 | | * Only change is we use console.warn instead of console.error, |
10139 | | * and do nothing when 'console' is not supported. |
10140 | | * This really simplifies the code. |
10141 | | * --- |
10142 | | * Similar to invariant but only logs a warning if the condition is not met. |
10143 | | * This can be used to log issues in development environments in critical |
10144 | | * paths. Removing the logging code for production environments will keep the |
10145 | | * same logic and follow the same code paths. |
10146 | | */ |
10147 | | |
10148 | | var lowPriorityWarning = function () {}; |
10149 | | |
10150 | | if (true) { |
10151 | | var printWarning = function (format) { |
10152 | | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
10153 | | args[_key - 1] = arguments[_key]; |
10154 | | } |
10155 | | |
10156 | | var argIndex = 0; |
10157 | | var message = 'Warning: ' + format.replace(/%s/g, function () { |
10158 | | return args[argIndex++]; |
10159 | | }); |
10160 | | if (typeof console !== 'undefined') { |
10161 | | console.warn(message); |
10162 | | } |
10163 | | try { |
10164 | | // --- Welcome to debugging React --- |
10165 | | // This error was thrown as a convenience so that you can use this stack |
10166 | | // to find the callsite that caused this warning to fire. |
10167 | | throw new Error(message); |
10168 | | } catch (x) {} |
10169 | | }; |
10170 | | |
10171 | | lowPriorityWarning = function (condition, format) { |
10172 | | if (format === undefined) { |
10173 | | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); |
10174 | | } |
10175 | | if (!condition) { |
10176 | | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { |
10177 | | args[_key2 - 2] = arguments[_key2]; |
10178 | | } |
10179 | | |
10180 | | printWarning.apply(undefined, [format].concat(args)); |
10181 | | } |
10182 | | }; |
10183 | | } |
10184 | | |
10185 | | module.exports = lowPriorityWarning; |
10186 | | |
10187 | | /***/ }), |
10188 | | /* 344 */ |
10189 | | /***/ (function(module, exports, __webpack_require__) { |
10190 | | |
10191 | | /** |
10192 | | * Copyright (c) 2013-present, Facebook, Inc. |
10193 | | * |
10194 | | * This source code is licensed under the MIT license found in the |
10195 | | * LICENSE file in the root directory of this source tree. |
10196 | | * |
10197 | | */ |
10198 | | |
10199 | | 'use strict'; |
10200 | | |
10201 | | var PooledClass = __webpack_require__(345); |
10202 | | var ReactElement = __webpack_require__(346); |
10203 | | |
10204 | | var emptyFunction = __webpack_require__(339); |
10205 | | var traverseAllChildren = __webpack_require__(349); |
10206 | | |
10207 | | var twoArgumentPooler = PooledClass.twoArgumentPooler; |
10208 | | var fourArgumentPooler = PooledClass.fourArgumentPooler; |
10209 | | |
10210 | | var userProvidedKeyEscapeRegex = /\/+/g; |
10211 | | function escapeUserProvidedKey(text) { |
10212 | | return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); |
10213 | | } |
10214 | | |
10215 | | /** |
10216 | | * PooledClass representing the bookkeeping associated with performing a child |
10217 | | * traversal. Allows avoiding binding callbacks. |
10218 | | * |
10219 | | * @constructor ForEachBookKeeping |
10220 | | * @param {!function} forEachFunction Function to perform traversal with. |
10221 | | * @param {?*} forEachContext Context to perform context with. |
10222 | | */ |
10223 | | function ForEachBookKeeping(forEachFunction, forEachContext) { |
10224 | | this.func = forEachFunction; |
10225 | | this.context = forEachContext; |
10226 | | this.count = 0; |
10227 | | } |
10228 | | ForEachBookKeeping.prototype.destructor = function () { |
10229 | | this.func = null; |
10230 | | this.context = null; |
10231 | | this.count = 0; |
10232 | | }; |
10233 | | PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); |
10234 | | |
10235 | | function forEachSingleChild(bookKeeping, child, name) { |
10236 | | var func = bookKeeping.func, |
10237 | | context = bookKeeping.context; |
10238 | | |
10239 | | func.call(context, child, bookKeeping.count++); |
10240 | | } |
10241 | | |
10242 | | /** |
10243 | | * Iterates through children that are typically specified as `props.children`. |
10244 | | * |
10245 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach |
10246 | | * |
10247 | | * The provided forEachFunc(child, index) will be called for each |
10248 | | * leaf child. |
10249 | | * |
10250 | | * @param {?*} children Children tree container. |
10251 | | * @param {function(*, int)} forEachFunc |
10252 | | * @param {*} forEachContext Context for forEachContext. |
10253 | | */ |
10254 | | function forEachChildren(children, forEachFunc, forEachContext) { |
10255 | | if (children == null) { |
10256 | | return children; |
10257 | | } |
10258 | | var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); |
10259 | | traverseAllChildren(children, forEachSingleChild, traverseContext); |
10260 | | ForEachBookKeeping.release(traverseContext); |
10261 | | } |
10262 | | |
10263 | | /** |
10264 | | * PooledClass representing the bookkeeping associated with performing a child |
10265 | | * mapping. Allows avoiding binding callbacks. |
10266 | | * |
10267 | | * @constructor MapBookKeeping |
10268 | | * @param {!*} mapResult Object containing the ordered map of results. |
10269 | | * @param {!function} mapFunction Function to perform mapping with. |
10270 | | * @param {?*} mapContext Context to perform mapping with. |
10271 | | */ |
10272 | | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { |
10273 | | this.result = mapResult; |
10274 | | this.keyPrefix = keyPrefix; |
10275 | | this.func = mapFunction; |
10276 | | this.context = mapContext; |
10277 | | this.count = 0; |
10278 | | } |
10279 | | MapBookKeeping.prototype.destructor = function () { |
10280 | | this.result = null; |
10281 | | this.keyPrefix = null; |
10282 | | this.func = null; |
10283 | | this.context = null; |
10284 | | this.count = 0; |
10285 | | }; |
10286 | | PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); |
10287 | | |
10288 | | function mapSingleChildIntoContext(bookKeeping, child, childKey) { |
10289 | | var result = bookKeeping.result, |
10290 | | keyPrefix = bookKeeping.keyPrefix, |
10291 | | func = bookKeeping.func, |
10292 | | context = bookKeeping.context; |
10293 | | |
10294 | | |
10295 | | var mappedChild = func.call(context, child, bookKeeping.count++); |
10296 | | if (Array.isArray(mappedChild)) { |
10297 | | mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); |
10298 | | } else if (mappedChild != null) { |
10299 | | if (ReactElement.isValidElement(mappedChild)) { |
10300 | | mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, |
10301 | | // Keep both the (mapped) and old keys if they differ, just as |
10302 | | // traverseAllChildren used to do for objects as children |
10303 | | keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); |
10304 | | } |
10305 | | result.push(mappedChild); |
10306 | | } |
10307 | | } |
10308 | | |
10309 | | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { |
10310 | | var escapedPrefix = ''; |
10311 | | if (prefix != null) { |
10312 | | escapedPrefix = escapeUserProvidedKey(prefix) + '/'; |
10313 | | } |
10314 | | var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); |
10315 | | traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); |
10316 | | MapBookKeeping.release(traverseContext); |
10317 | | } |
10318 | | |
10319 | | /** |
10320 | | * Maps children that are typically specified as `props.children`. |
10321 | | * |
10322 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map |
10323 | | * |
10324 | | * The provided mapFunction(child, key, index) will be called for each |
10325 | | * leaf child. |
10326 | | * |
10327 | | * @param {?*} children Children tree container. |
10328 | | * @param {function(*, int)} func The map function. |
10329 | | * @param {*} context Context for mapFunction. |
10330 | | * @return {object} Object containing the ordered map of results. |
10331 | | */ |
10332 | | function mapChildren(children, func, context) { |
10333 | | if (children == null) { |
10334 | | return children; |
10335 | | } |
10336 | | var result = []; |
10337 | | mapIntoWithKeyPrefixInternal(children, result, null, func, context); |
10338 | | return result; |
10339 | | } |
10340 | | |
10341 | | function forEachSingleChildDummy(traverseContext, child, name) { |
10342 | | return null; |
10343 | | } |
10344 | | |
10345 | | /** |
10346 | | * Count the number of children that are typically specified as |
10347 | | * `props.children`. |
10348 | | * |
10349 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count |
10350 | | * |
10351 | | * @param {?*} children Children tree container. |
10352 | | * @return {number} The number of children. |
10353 | | */ |
10354 | | function countChildren(children, context) { |
10355 | | return traverseAllChildren(children, forEachSingleChildDummy, null); |
10356 | | } |
10357 | | |
10358 | | /** |
10359 | | * Flatten a children object (typically specified as `props.children`) and |
10360 | | * return an array with appropriately re-keyed children. |
10361 | | * |
10362 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray |
10363 | | */ |
10364 | | function toArray(children) { |
10365 | | var result = []; |
10366 | | mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); |
10367 | | return result; |
10368 | | } |
10369 | | |
10370 | | var ReactChildren = { |
10371 | | forEach: forEachChildren, |
10372 | | map: mapChildren, |
10373 | | mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, |
10374 | | count: countChildren, |
10375 | | toArray: toArray |
10376 | | }; |
10377 | | |
10378 | | module.exports = ReactChildren; |
10379 | | |
10380 | | /***/ }), |
10381 | | /* 345 */ |
10382 | | /***/ (function(module, exports, __webpack_require__) { |
10383 | | |
10384 | | /** |
10385 | | * Copyright (c) 2013-present, Facebook, Inc. |
10386 | | * |
10387 | | * This source code is licensed under the MIT license found in the |
10388 | | * LICENSE file in the root directory of this source tree. |
10389 | | * |
10390 | | * |
10391 | | */ |
10392 | | |
10393 | | 'use strict'; |
10394 | | |
10395 | | var _prodInvariant = __webpack_require__(336); |
10396 | | |
10397 | | var invariant = __webpack_require__(342); |
10398 | | |
10399 | | /** |
10400 | | * Static poolers. Several custom versions for each potential number of |
10401 | | * arguments. A completely generic pooler is easy to implement, but would |
10402 | | * require accessing the `arguments` object. In each of these, `this` refers to |
10403 | | * the Class itself, not an instance. If any others are needed, simply add them |
10404 | | * here, or in their own files. |
10405 | | */ |
10406 | | var oneArgumentPooler = function (copyFieldsFrom) { |
10407 | | var Klass = this; |
10408 | | if (Klass.instancePool.length) { |
10409 | | var instance = Klass.instancePool.pop(); |
10410 | | Klass.call(instance, copyFieldsFrom); |
10411 | | return instance; |
10412 | | } else { |
10413 | | return new Klass(copyFieldsFrom); |
10414 | | } |
10415 | | }; |
10416 | | |
10417 | | var twoArgumentPooler = function (a1, a2) { |
10418 | | var Klass = this; |
10419 | | if (Klass.instancePool.length) { |
10420 | | var instance = Klass.instancePool.pop(); |
10421 | | Klass.call(instance, a1, a2); |
10422 | | return instance; |
10423 | | } else { |
10424 | | return new Klass(a1, a2); |
10425 | | } |
10426 | | }; |
10427 | | |
10428 | | var threeArgumentPooler = function (a1, a2, a3) { |
10429 | | var Klass = this; |
10430 | | if (Klass.instancePool.length) { |
10431 | | var instance = Klass.instancePool.pop(); |
10432 | | Klass.call(instance, a1, a2, a3); |
10433 | | return instance; |
10434 | | } else { |
10435 | | return new Klass(a1, a2, a3); |
10436 | | } |
10437 | | }; |
10438 | | |
10439 | | var fourArgumentPooler = function (a1, a2, a3, a4) { |
10440 | | var Klass = this; |
10441 | | if (Klass.instancePool.length) { |
10442 | | var instance = Klass.instancePool.pop(); |
10443 | | Klass.call(instance, a1, a2, a3, a4); |
10444 | | return instance; |
10445 | | } else { |
10446 | | return new Klass(a1, a2, a3, a4); |
10447 | | } |
10448 | | }; |
10449 | | |
10450 | | var standardReleaser = function (instance) { |
10451 | | var Klass = this; |
10452 | | !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; |
10453 | | instance.destructor(); |
10454 | | if (Klass.instancePool.length < Klass.poolSize) { |
10455 | | Klass.instancePool.push(instance); |
10456 | | } |
10457 | | }; |
10458 | | |
10459 | | var DEFAULT_POOL_SIZE = 10; |
10460 | | var DEFAULT_POOLER = oneArgumentPooler; |
10461 | | |
10462 | | /** |
10463 | | * Augments `CopyConstructor` to be a poolable class, augmenting only the class |
10464 | | * itself (statically) not adding any prototypical fields. Any CopyConstructor |
10465 | | * you give this may have a `poolSize` property, and will look for a |
10466 | | * prototypical `destructor` on instances. |
10467 | | * |
10468 | | * @param {Function} CopyConstructor Constructor that can be used to reset. |
10469 | | * @param {Function} pooler Customizable pooler. |
10470 | | */ |
10471 | | var addPoolingTo = function (CopyConstructor, pooler) { |
10472 | | // Casting as any so that flow ignores the actual implementation and trusts |
10473 | | // it to match the type we declared |
10474 | | var NewKlass = CopyConstructor; |
10475 | | NewKlass.instancePool = []; |
10476 | | NewKlass.getPooled = pooler || DEFAULT_POOLER; |
10477 | | if (!NewKlass.poolSize) { |
10478 | | NewKlass.poolSize = DEFAULT_POOL_SIZE; |
10479 | | } |
10480 | | NewKlass.release = standardReleaser; |
10481 | | return NewKlass; |
10482 | | }; |
10483 | | |
10484 | | var PooledClass = { |
10485 | | addPoolingTo: addPoolingTo, |
10486 | | oneArgumentPooler: oneArgumentPooler, |
10487 | | twoArgumentPooler: twoArgumentPooler, |
10488 | | threeArgumentPooler: threeArgumentPooler, |
10489 | | fourArgumentPooler: fourArgumentPooler |
10490 | | }; |
10491 | | |
10492 | | module.exports = PooledClass; |
10493 | | |
10494 | | /***/ }), |
10495 | | /* 346 */ |
10496 | | /***/ (function(module, exports, __webpack_require__) { |
10497 | | |
10498 | | /** |
10499 | | * Copyright (c) 2014-present, Facebook, Inc. |
10500 | | * |
10501 | | * This source code is licensed under the MIT license found in the |
10502 | | * LICENSE file in the root directory of this source tree. |
10503 | | * |
10504 | | */ |
10505 | | |
10506 | | 'use strict'; |
10507 | | |
10508 | | var _assign = __webpack_require__(334); |
10509 | | |
10510 | | var ReactCurrentOwner = __webpack_require__(347); |
10511 | | |
10512 | | var warning = __webpack_require__(338); |
10513 | | var canDefineProperty = __webpack_require__(340); |
10514 | | var hasOwnProperty = Object.prototype.hasOwnProperty; |
10515 | | |
10516 | | var REACT_ELEMENT_TYPE = __webpack_require__(348); |
10517 | | |
10518 | | var RESERVED_PROPS = { |
10519 | | key: true, |
10520 | | ref: true, |
10521 | | __self: true, |
10522 | | __source: true |
10523 | | }; |
10524 | | |
10525 | | var specialPropKeyWarningShown, specialPropRefWarningShown; |
10526 | | |
10527 | | function hasValidRef(config) { |
10528 | | if (true) { |
10529 | | if (hasOwnProperty.call(config, 'ref')) { |
10530 | | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; |
10531 | | if (getter && getter.isReactWarning) { |
10532 | | return false; |
10533 | | } |
10534 | | } |
10535 | | } |
10536 | | return config.ref !== undefined; |
10537 | | } |
10538 | | |
10539 | | function hasValidKey(config) { |
10540 | | if (true) { |
10541 | | if (hasOwnProperty.call(config, 'key')) { |
10542 | | var getter = Object.getOwnPropertyDescriptor(config, 'key').get; |
10543 | | if (getter && getter.isReactWarning) { |
10544 | | return false; |
10545 | | } |
10546 | | } |
10547 | | } |
10548 | | return config.key !== undefined; |
10549 | | } |
10550 | | |
10551 | | function defineKeyPropWarningGetter(props, displayName) { |
10552 | | var warnAboutAccessingKey = function () { |
10553 | | if (!specialPropKeyWarningShown) { |
10554 | | specialPropKeyWarningShown = true; |
10555 | | true ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; |
10556 | | } |
10557 | | }; |
10558 | | warnAboutAccessingKey.isReactWarning = true; |
10559 | | Object.defineProperty(props, 'key', { |
10560 | | get: warnAboutAccessingKey, |
10561 | | configurable: true |
10562 | | }); |
10563 | | } |
10564 | | |
10565 | | function defineRefPropWarningGetter(props, displayName) { |
10566 | | var warnAboutAccessingRef = function () { |
10567 | | if (!specialPropRefWarningShown) { |
10568 | | specialPropRefWarningShown = true; |
10569 | | true ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; |
10570 | | } |
10571 | | }; |
10572 | | warnAboutAccessingRef.isReactWarning = true; |
10573 | | Object.defineProperty(props, 'ref', { |
10574 | | get: warnAboutAccessingRef, |
10575 | | configurable: true |
10576 | | }); |
10577 | | } |
10578 | | |
10579 | | /** |
10580 | | * Factory method to create a new React element. This no longer adheres to |
10581 | | * the class pattern, so do not use new to call it. Also, no instanceof check |
10582 | | * will work. Instead test $$typeof field against Symbol.for('react.element') to check |
10583 | | * if something is a React Element. |
10584 | | * |
10585 | | * @param {*} type |
10586 | | * @param {*} key |
10587 | | * @param {string|object} ref |
10588 | | * @param {*} self A *temporary* helper to detect places where `this` is |
10589 | | * different from the `owner` when React.createElement is called, so that we |
10590 | | * can warn. We want to get rid of owner and replace string `ref`s with arrow |
10591 | | * functions, and as long as `this` and owner are the same, there will be no |
10592 | | * change in behavior. |
10593 | | * @param {*} source An annotation object (added by a transpiler or otherwise) |
10594 | | * indicating filename, line number, and/or other information. |
10595 | | * @param {*} owner |
10596 | | * @param {*} props |
10597 | | * @internal |
10598 | | */ |
10599 | | var ReactElement = function (type, key, ref, self, source, owner, props) { |
10600 | | var element = { |
10601 | | // This tag allow us to uniquely identify this as a React Element |
10602 | | $$typeof: REACT_ELEMENT_TYPE, |
10603 | | |
10604 | | // Built-in properties that belong on the element |
10605 | | type: type, |
10606 | | key: key, |
10607 | | ref: ref, |
10608 | | props: props, |
10609 | | |
10610 | | // Record the component responsible for creating this element. |
10611 | | _owner: owner |
10612 | | }; |
10613 | | |
10614 | | if (true) { |
10615 | | // The validation flag is currently mutative. We put it on |
10616 | | // an external backing store so that we can freeze the whole object. |
10617 | | // This can be replaced with a WeakMap once they are implemented in |
10618 | | // commonly used development environments. |
10619 | | element._store = {}; |
10620 | | |
10621 | | // To make comparing ReactElements easier for testing purposes, we make |
10622 | | // the validation flag non-enumerable (where possible, which should |
10623 | | // include every environment we run tests in), so the test framework |
10624 | | // ignores it. |
10625 | | if (canDefineProperty) { |
10626 | | Object.defineProperty(element._store, 'validated', { |
10627 | | configurable: false, |
10628 | | enumerable: false, |
10629 | | writable: true, |
10630 | | value: false |
10631 | | }); |
10632 | | // self and source are DEV only properties. |
10633 | | Object.defineProperty(element, '_self', { |
10634 | | configurable: false, |
10635 | | enumerable: false, |
10636 | | writable: false, |
10637 | | value: self |
10638 | | }); |
10639 | | // Two elements created in two different places should be considered |
10640 | | // equal for testing purposes and therefore we hide it from enumeration. |
10641 | | Object.defineProperty(element, '_source', { |
10642 | | configurable: false, |
10643 | | enumerable: false, |
10644 | | writable: false, |
10645 | | value: source |
10646 | | }); |
10647 | | } else { |
10648 | | element._store.validated = false; |
10649 | | element._self = self; |
10650 | | element._source = source; |
10651 | | } |
10652 | | if (Object.freeze) { |
10653 | | Object.freeze(element.props); |
10654 | | Object.freeze(element); |
10655 | | } |
10656 | | } |
10657 | | |
10658 | | return element; |
10659 | | }; |
10660 | | |
10661 | | /** |
10662 | | * Create and return a new ReactElement of the given type. |
10663 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement |
10664 | | */ |
10665 | | ReactElement.createElement = function (type, config, children) { |
10666 | | var propName; |
10667 | | |
10668 | | // Reserved names are extracted |
10669 | | var props = {}; |
10670 | | |
10671 | | var key = null; |
10672 | | var ref = null; |
10673 | | var self = null; |
10674 | | var source = null; |
10675 | | |
10676 | | if (config != null) { |
10677 | | if (hasValidRef(config)) { |
10678 | | ref = config.ref; |
10679 | | } |
10680 | | if (hasValidKey(config)) { |
10681 | | key = '' + config.key; |
10682 | | } |
10683 | | |
10684 | | self = config.__self === undefined ? null : config.__self; |
10685 | | source = config.__source === undefined ? null : config.__source; |
10686 | | // Remaining properties are added to a new props object |
10687 | | for (propName in config) { |
10688 | | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { |
10689 | | props[propName] = config[propName]; |
10690 | | } |
10691 | | } |
10692 | | } |
10693 | | |
10694 | | // Children can be more than one argument, and those are transferred onto |
10695 | | // the newly allocated props object. |
10696 | | var childrenLength = arguments.length - 2; |
10697 | | if (childrenLength === 1) { |
10698 | | props.children = children; |
10699 | | } else if (childrenLength > 1) { |
10700 | | var childArray = Array(childrenLength); |
10701 | | for (var i = 0; i < childrenLength; i++) { |
10702 | | childArray[i] = arguments[i + 2]; |
10703 | | } |
10704 | | if (true) { |
10705 | | if (Object.freeze) { |
10706 | | Object.freeze(childArray); |
10707 | | } |
10708 | | } |
10709 | | props.children = childArray; |
10710 | | } |
10711 | | |
10712 | | // Resolve default props |
10713 | | if (type && type.defaultProps) { |
10714 | | var defaultProps = type.defaultProps; |
10715 | | for (propName in defaultProps) { |
10716 | | if (props[propName] === undefined) { |
10717 | | props[propName] = defaultProps[propName]; |
10718 | | } |
10719 | | } |
10720 | | } |
10721 | | if (true) { |
10722 | | if (key || ref) { |
10723 | | if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { |
10724 | | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; |
10725 | | if (key) { |
10726 | | defineKeyPropWarningGetter(props, displayName); |
10727 | | } |
10728 | | if (ref) { |
10729 | | defineRefPropWarningGetter(props, displayName); |
10730 | | } |
10731 | | } |
10732 | | } |
10733 | | } |
10734 | | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); |
10735 | | }; |
10736 | | |
10737 | | /** |
10738 | | * Return a function that produces ReactElements of a given type. |
10739 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory |
10740 | | */ |
10741 | | ReactElement.createFactory = function (type) { |
10742 | | var factory = ReactElement.createElement.bind(null, type); |
10743 | | // Expose the type on the factory and the prototype so that it can be |
10744 | | // easily accessed on elements. E.g. `<Foo />.type === Foo`. |
10745 | | // This should not be named `constructor` since this may not be the function |
10746 | | // that created the element, and it may not even be a constructor. |
10747 | | // Legacy hook TODO: Warn if this is accessed |
10748 | | factory.type = type; |
10749 | | return factory; |
10750 | | }; |
10751 | | |
10752 | | ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { |
10753 | | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); |
10754 | | |
10755 | | return newElement; |
10756 | | }; |
10757 | | |
10758 | | /** |
10759 | | * Clone and return a new ReactElement using element as the starting point. |
10760 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement |
10761 | | */ |
10762 | | ReactElement.cloneElement = function (element, config, children) { |
10763 | | var propName; |
10764 | | |
10765 | | // Original props are copied |
10766 | | var props = _assign({}, element.props); |
10767 | | |
10768 | | // Reserved names are extracted |
10769 | | var key = element.key; |
10770 | | var ref = element.ref; |
10771 | | // Self is preserved since the owner is preserved. |
10772 | | var self = element._self; |
10773 | | // Source is preserved since cloneElement is unlikely to be targeted by a |
10774 | | // transpiler, and the original source is probably a better indicator of the |
10775 | | // true owner. |
10776 | | var source = element._source; |
10777 | | |
10778 | | // Owner will be preserved, unless ref is overridden |
10779 | | var owner = element._owner; |
10780 | | |
10781 | | if (config != null) { |
10782 | | if (hasValidRef(config)) { |
10783 | | // Silently steal the ref from the parent. |
10784 | | ref = config.ref; |
10785 | | owner = ReactCurrentOwner.current; |
10786 | | } |
10787 | | if (hasValidKey(config)) { |
10788 | | key = '' + config.key; |
10789 | | } |
10790 | | |
10791 | | // Remaining properties override existing props |
10792 | | var defaultProps; |
10793 | | if (element.type && element.type.defaultProps) { |
10794 | | defaultProps = element.type.defaultProps; |
10795 | | } |
10796 | | for (propName in config) { |
10797 | | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { |
10798 | | if (config[propName] === undefined && defaultProps !== undefined) { |
10799 | | // Resolve default props |
10800 | | props[propName] = defaultProps[propName]; |
10801 | | } else { |
10802 | | props[propName] = config[propName]; |
10803 | | } |
10804 | | } |
10805 | | } |
10806 | | } |
10807 | | |
10808 | | // Children can be more than one argument, and those are transferred onto |
10809 | | // the newly allocated props object. |
10810 | | var childrenLength = arguments.length - 2; |
10811 | | if (childrenLength === 1) { |
10812 | | props.children = children; |
10813 | | } else if (childrenLength > 1) { |
10814 | | var childArray = Array(childrenLength); |
10815 | | for (var i = 0; i < childrenLength; i++) { |
10816 | | childArray[i] = arguments[i + 2]; |
10817 | | } |
10818 | | props.children = childArray; |
10819 | | } |
10820 | | |
10821 | | return ReactElement(element.type, key, ref, self, source, owner, props); |
10822 | | }; |
10823 | | |
10824 | | /** |
10825 | | * Verifies the object is a ReactElement. |
10826 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement |
10827 | | * @param {?object} object |
10828 | | * @return {boolean} True if `object` is a valid component. |
10829 | | * @final |
10830 | | */ |
10831 | | ReactElement.isValidElement = function (object) { |
10832 | | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
10833 | | }; |
10834 | | |
10835 | | module.exports = ReactElement; |
10836 | | |
10837 | | /***/ }), |
10838 | | /* 347 */ |
10839 | | /***/ (function(module, exports) { |
10840 | | |
10841 | | /** |
10842 | | * Copyright (c) 2013-present, Facebook, Inc. |
10843 | | * |
10844 | | * This source code is licensed under the MIT license found in the |
10845 | | * LICENSE file in the root directory of this source tree. |
10846 | | * |
10847 | | * |
10848 | | */ |
10849 | | |
10850 | | 'use strict'; |
10851 | | |
10852 | | /** |
10853 | | * Keeps track of the current owner. |
10854 | | * |
10855 | | * The current owner is the component who should own any components that are |
10856 | | * currently being constructed. |
10857 | | */ |
10858 | | var ReactCurrentOwner = { |
10859 | | /** |
10860 | | * @internal |
10861 | | * @type {ReactComponent} |
10862 | | */ |
10863 | | current: null |
10864 | | }; |
10865 | | |
10866 | | module.exports = ReactCurrentOwner; |
10867 | | |
10868 | | /***/ }), |
10869 | | /* 348 */ |
10870 | | /***/ (function(module, exports) { |
10871 | | |
10872 | | /** |
10873 | | * Copyright (c) 2014-present, Facebook, Inc. |
10874 | | * |
10875 | | * This source code is licensed under the MIT license found in the |
10876 | | * LICENSE file in the root directory of this source tree. |
10877 | | * |
10878 | | * |
10879 | | */ |
10880 | | |
10881 | | 'use strict'; |
10882 | | |
10883 | | // The Symbol used to tag the ReactElement type. If there is no native Symbol |
10884 | | // nor polyfill, then a plain number is used for performance. |
10885 | | |
10886 | | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; |
10887 | | |
10888 | | module.exports = REACT_ELEMENT_TYPE; |
10889 | | |
10890 | | /***/ }), |
10891 | | /* 349 */ |
10892 | | /***/ (function(module, exports, __webpack_require__) { |
10893 | | |
10894 | | /** |
10895 | | * Copyright (c) 2013-present, Facebook, Inc. |
10896 | | * |
10897 | | * This source code is licensed under the MIT license found in the |
10898 | | * LICENSE file in the root directory of this source tree. |
10899 | | * |
10900 | | */ |
10901 | | |
10902 | | 'use strict'; |
10903 | | |
10904 | | var _prodInvariant = __webpack_require__(336); |
10905 | | |
10906 | | var ReactCurrentOwner = __webpack_require__(347); |
10907 | | var REACT_ELEMENT_TYPE = __webpack_require__(348); |
10908 | | |
10909 | | var getIteratorFn = __webpack_require__(350); |
10910 | | var invariant = __webpack_require__(342); |
10911 | | var KeyEscapeUtils = __webpack_require__(351); |
10912 | | var warning = __webpack_require__(338); |
10913 | | |
10914 | | var SEPARATOR = '.'; |
10915 | | var SUBSEPARATOR = ':'; |
10916 | | |
10917 | | /** |
10918 | | * This is inlined from ReactElement since this file is shared between |
10919 | | * isomorphic and renderers. We could extract this to a |
10920 | | * |
10921 | | */ |
10922 | | |
10923 | | /** |
10924 | | * TODO: Test that a single child and an array with one item have the same key |
10925 | | * pattern. |
10926 | | */ |
10927 | | |
10928 | | var didWarnAboutMaps = false; |
10929 | | |
10930 | | /** |
10931 | | * Generate a key string that identifies a component within a set. |
10932 | | * |
10933 | | * @param {*} component A component that could contain a manual key. |
10934 | | * @param {number} index Index that is used if a manual key is not provided. |
10935 | | * @return {string} |
10936 | | */ |
10937 | | function getComponentKey(component, index) { |
10938 | | // Do some typechecking here since we call this blindly. We want to ensure |
10939 | | // that we don't block potential future ES APIs. |
10940 | | if (component && typeof component === 'object' && component.key != null) { |
10941 | | // Explicit key |
10942 | | return KeyEscapeUtils.escape(component.key); |
10943 | | } |
10944 | | // Implicit key determined by the index in the set |
10945 | | return index.toString(36); |
10946 | | } |
10947 | | |
10948 | | /** |
10949 | | * @param {?*} children Children tree container. |
10950 | | * @param {!string} nameSoFar Name of the key path so far. |
10951 | | * @param {!function} callback Callback to invoke with each child found. |
10952 | | * @param {?*} traverseContext Used to pass information throughout the traversal |
10953 | | * process. |
10954 | | * @return {!number} The number of children in this subtree. |
10955 | | */ |
10956 | | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { |
10957 | | var type = typeof children; |
10958 | | |
10959 | | if (type === 'undefined' || type === 'boolean') { |
10960 | | // All of the above are perceived as null. |
10961 | | children = null; |
10962 | | } |
10963 | | |
10964 | | if (children === null || type === 'string' || type === 'number' || |
10965 | | // The following is inlined from ReactElement. This means we can optimize |
10966 | | // some checks. React Fiber also inlines this logic for similar purposes. |
10967 | | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { |
10968 | | callback(traverseContext, children, |
10969 | | // If it's the only child, treat the name as if it was wrapped in an array |
10970 | | // so that it's consistent if the number of children grows. |
10971 | | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); |
10972 | | return 1; |
10973 | | } |
10974 | | |
10975 | | var child; |
10976 | | var nextName; |
10977 | | var subtreeCount = 0; // Count of children found in the current subtree. |
10978 | | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; |
10979 | | |
10980 | | if (Array.isArray(children)) { |
10981 | | for (var i = 0; i < children.length; i++) { |
10982 | | child = children[i]; |
10983 | | nextName = nextNamePrefix + getComponentKey(child, i); |
10984 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
10985 | | } |
10986 | | } else { |
10987 | | var iteratorFn = getIteratorFn(children); |
10988 | | if (iteratorFn) { |
10989 | | var iterator = iteratorFn.call(children); |
10990 | | var step; |
10991 | | if (iteratorFn !== children.entries) { |
10992 | | var ii = 0; |
10993 | | while (!(step = iterator.next()).done) { |
10994 | | child = step.value; |
10995 | | nextName = nextNamePrefix + getComponentKey(child, ii++); |
10996 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
10997 | | } |
10998 | | } else { |
10999 | | if (true) { |
11000 | | var mapsAsChildrenAddendum = ''; |
11001 | | if (ReactCurrentOwner.current) { |
11002 | | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); |
11003 | | if (mapsAsChildrenOwnerName) { |
11004 | | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; |
11005 | | } |
11006 | | } |
11007 | | true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; |
11008 | | didWarnAboutMaps = true; |
11009 | | } |
11010 | | // Iterator will provide entry [k,v] tuples rather than values. |
11011 | | while (!(step = iterator.next()).done) { |
11012 | | var entry = step.value; |
11013 | | if (entry) { |
11014 | | child = entry[1]; |
11015 | | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); |
11016 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
11017 | | } |
11018 | | } |
11019 | | } |
11020 | | } else if (type === 'object') { |
11021 | | var addendum = ''; |
11022 | | if (true) { |
11023 | | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; |
11024 | | if (children._isReactElement) { |
11025 | | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; |
11026 | | } |
11027 | | if (ReactCurrentOwner.current) { |
11028 | | var name = ReactCurrentOwner.current.getName(); |
11029 | | if (name) { |
11030 | | addendum += ' Check the render method of `' + name + '`.'; |
11031 | | } |
11032 | | } |
11033 | | } |
11034 | | var childrenString = String(children); |
11035 | | true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; |
11036 | | } |
11037 | | } |
11038 | | |
11039 | | return subtreeCount; |
11040 | | } |
11041 | | |
11042 | | /** |
11043 | | * Traverses children that are typically specified as `props.children`, but |
11044 | | * might also be specified through attributes: |
11045 | | * |
11046 | | * - `traverseAllChildren(this.props.children, ...)` |
11047 | | * - `traverseAllChildren(this.props.leftPanelChildren, ...)` |
11048 | | * |
11049 | | * The `traverseContext` is an optional argument that is passed through the |
11050 | | * entire traversal. It can be used to store accumulations or anything else that |
11051 | | * the callback might find relevant. |
11052 | | * |
11053 | | * @param {?*} children Children tree object. |
11054 | | * @param {!function} callback To invoke upon traversing each child. |
11055 | | * @param {?*} traverseContext Context for traversal. |
11056 | | * @return {!number} The number of children in this subtree. |
11057 | | */ |
11058 | | function traverseAllChildren(children, callback, traverseContext) { |
11059 | | if (children == null) { |
11060 | | return 0; |
11061 | | } |
11062 | | |
11063 | | return traverseAllChildrenImpl(children, '', callback, traverseContext); |
11064 | | } |
11065 | | |
11066 | | module.exports = traverseAllChildren; |
11067 | | |
11068 | | /***/ }), |
11069 | | /* 350 */ |
11070 | | /***/ (function(module, exports) { |
11071 | | |
11072 | | /** |
11073 | | * Copyright (c) 2013-present, Facebook, Inc. |
11074 | | * |
11075 | | * This source code is licensed under the MIT license found in the |
11076 | | * LICENSE file in the root directory of this source tree. |
11077 | | * |
11078 | | * |
11079 | | */ |
11080 | | |
11081 | | 'use strict'; |
11082 | | |
11083 | | /* global Symbol */ |
11084 | | |
11085 | | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
11086 | | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
11087 | | |
11088 | | /** |
11089 | | * Returns the iterator method function contained on the iterable object. |
11090 | | * |
11091 | | * Be sure to invoke the function with the iterable as context: |
11092 | | * |
11093 | | * var iteratorFn = getIteratorFn(myIterable); |
11094 | | * if (iteratorFn) { |
11095 | | * var iterator = iteratorFn.call(myIterable); |
11096 | | * ... |
11097 | | * } |
11098 | | * |
11099 | | * @param {?object} maybeIterable |
11100 | | * @return {?function} |
11101 | | */ |
11102 | | function getIteratorFn(maybeIterable) { |
11103 | | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
11104 | | if (typeof iteratorFn === 'function') { |
11105 | | return iteratorFn; |
11106 | | } |
11107 | | } |
11108 | | |
11109 | | module.exports = getIteratorFn; |
11110 | | |
11111 | | /***/ }), |
11112 | | /* 351 */ |
11113 | | /***/ (function(module, exports) { |
11114 | | |
11115 | | /** |
11116 | | * Copyright (c) 2013-present, Facebook, Inc. |
11117 | | * |
11118 | | * This source code is licensed under the MIT license found in the |
11119 | | * LICENSE file in the root directory of this source tree. |
11120 | | * |
11121 | | * |
11122 | | */ |
11123 | | |
11124 | | 'use strict'; |
11125 | | |
11126 | | /** |
11127 | | * Escape and wrap key so it is safe to use as a reactid |
11128 | | * |
11129 | | * @param {string} key to be escaped. |
11130 | | * @return {string} the escaped key. |
11131 | | */ |
11132 | | |
11133 | | function escape(key) { |
11134 | | var escapeRegex = /[=:]/g; |
11135 | | var escaperLookup = { |
11136 | | '=': '=0', |
11137 | | ':': '=2' |
11138 | | }; |
11139 | | var escapedString = ('' + key).replace(escapeRegex, function (match) { |
11140 | | return escaperLookup[match]; |
11141 | | }); |
11142 | | |
11143 | | return '$' + escapedString; |
11144 | | } |
11145 | | |
11146 | | /** |
11147 | | * Unescape and unwrap key for human-readable display |
11148 | | * |
11149 | | * @param {string} key to unescape. |
11150 | | * @return {string} the unescaped key. |
11151 | | */ |
11152 | | function unescape(key) { |
11153 | | var unescapeRegex = /(=0|=2)/g; |
11154 | | var unescaperLookup = { |
11155 | | '=0': '=', |
11156 | | '=2': ':' |
11157 | | }; |
11158 | | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); |
11159 | | |
11160 | | return ('' + keySubstring).replace(unescapeRegex, function (match) { |
11161 | | return unescaperLookup[match]; |
11162 | | }); |
11163 | | } |
11164 | | |
11165 | | var KeyEscapeUtils = { |
11166 | | escape: escape, |
11167 | | unescape: unescape |
11168 | | }; |
11169 | | |
11170 | | module.exports = KeyEscapeUtils; |
11171 | | |
11172 | | /***/ }), |
11173 | | /* 352 */ |
11174 | | /***/ (function(module, exports, __webpack_require__) { |
11175 | | |
11176 | | /** |
11177 | | * Copyright (c) 2013-present, Facebook, Inc. |
11178 | | * |
11179 | | * This source code is licensed under the MIT license found in the |
11180 | | * LICENSE file in the root directory of this source tree. |
11181 | | * |
11182 | | */ |
11183 | | |
11184 | | 'use strict'; |
11185 | | |
11186 | | var ReactElement = __webpack_require__(346); |
11187 | | |
11188 | | /** |
11189 | | * Create a factory that creates HTML tag elements. |
11190 | | * |
11191 | | * @private |
11192 | | */ |
11193 | | var createDOMFactory = ReactElement.createFactory; |
11194 | | if (true) { |
11195 | | var ReactElementValidator = __webpack_require__(353); |
11196 | | createDOMFactory = ReactElementValidator.createFactory; |
11197 | | } |
11198 | | |
11199 | | /** |
11200 | | * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. |
11201 | | * |
11202 | | * @public |
11203 | | */ |
11204 | | var ReactDOMFactories = { |
11205 | | a: createDOMFactory('a'), |
11206 | | abbr: createDOMFactory('abbr'), |
11207 | | address: createDOMFactory('address'), |
11208 | | area: createDOMFactory('area'), |
11209 | | article: createDOMFactory('article'), |
11210 | | aside: createDOMFactory('aside'), |
11211 | | audio: createDOMFactory('audio'), |
11212 | | b: createDOMFactory('b'), |
11213 | | base: createDOMFactory('base'), |
11214 | | bdi: createDOMFactory('bdi'), |
11215 | | bdo: createDOMFactory('bdo'), |
11216 | | big: createDOMFactory('big'), |
11217 | | blockquote: createDOMFactory('blockquote'), |
11218 | | body: createDOMFactory('body'), |
11219 | | br: createDOMFactory('br'), |
11220 | | button: createDOMFactory('button'), |
11221 | | canvas: createDOMFactory('canvas'), |
11222 | | caption: createDOMFactory('caption'), |
11223 | | cite: createDOMFactory('cite'), |
11224 | | code: createDOMFactory('code'), |
11225 | | col: createDOMFactory('col'), |
11226 | | colgroup: createDOMFactory('colgroup'), |
11227 | | data: createDOMFactory('data'), |
11228 | | datalist: createDOMFactory('datalist'), |
11229 | | dd: createDOMFactory('dd'), |
11230 | | del: createDOMFactory('del'), |
11231 | | details: createDOMFactory('details'), |
11232 | | dfn: createDOMFactory('dfn'), |
11233 | | dialog: createDOMFactory('dialog'), |
11234 | | div: createDOMFactory('div'), |
11235 | | dl: createDOMFactory('dl'), |
11236 | | dt: createDOMFactory('dt'), |
11237 | | em: createDOMFactory('em'), |
11238 | | embed: createDOMFactory('embed'), |
11239 | | fieldset: createDOMFactory('fieldset'), |
11240 | | figcaption: createDOMFactory('figcaption'), |
11241 | | figure: createDOMFactory('figure'), |
11242 | | footer: createDOMFactory('footer'), |
11243 | | form: createDOMFactory('form'), |
11244 | | h1: createDOMFactory('h1'), |
11245 | | h2: createDOMFactory('h2'), |
11246 | | h3: createDOMFactory('h3'), |
11247 | | h4: createDOMFactory('h4'), |
11248 | | h5: createDOMFactory('h5'), |
11249 | | h6: createDOMFactory('h6'), |
11250 | | head: createDOMFactory('head'), |
11251 | | header: createDOMFactory('header'), |
11252 | | hgroup: createDOMFactory('hgroup'), |
11253 | | hr: createDOMFactory('hr'), |
11254 | | html: createDOMFactory('html'), |
11255 | | i: createDOMFactory('i'), |
11256 | | iframe: createDOMFactory('iframe'), |
11257 | | img: createDOMFactory('img'), |
11258 | | input: createDOMFactory('input'), |
11259 | | ins: createDOMFactory('ins'), |
11260 | | kbd: createDOMFactory('kbd'), |
11261 | | keygen: createDOMFactory('keygen'), |
11262 | | label: createDOMFactory('label'), |
11263 | | legend: createDOMFactory('legend'), |
11264 | | li: createDOMFactory('li'), |
11265 | | link: createDOMFactory('link'), |
11266 | | main: createDOMFactory('main'), |
11267 | | map: createDOMFactory('map'), |
11268 | | mark: createDOMFactory('mark'), |
11269 | | menu: createDOMFactory('menu'), |
11270 | | menuitem: createDOMFactory('menuitem'), |
11271 | | meta: createDOMFactory('meta'), |
11272 | | meter: createDOMFactory('meter'), |
11273 | | nav: createDOMFactory('nav'), |
11274 | | noscript: createDOMFactory('noscript'), |
11275 | | object: createDOMFactory('object'), |
11276 | | ol: createDOMFactory('ol'), |
11277 | | optgroup: createDOMFactory('optgroup'), |
11278 | | option: createDOMFactory('option'), |
11279 | | output: createDOMFactory('output'), |
11280 | | p: createDOMFactory('p'), |
11281 | | param: createDOMFactory('param'), |
11282 | | picture: createDOMFactory('picture'), |
11283 | | pre: createDOMFactory('pre'), |
11284 | | progress: createDOMFactory('progress'), |
11285 | | q: createDOMFactory('q'), |
11286 | | rp: createDOMFactory('rp'), |
11287 | | rt: createDOMFactory('rt'), |
11288 | | ruby: createDOMFactory('ruby'), |
11289 | | s: createDOMFactory('s'), |
11290 | | samp: createDOMFactory('samp'), |
11291 | | script: createDOMFactory('script'), |
11292 | | section: createDOMFactory('section'), |
11293 | | select: createDOMFactory('select'), |
11294 | | small: createDOMFactory('small'), |
11295 | | source: createDOMFactory('source'), |
11296 | | span: createDOMFactory('span'), |
11297 | | strong: createDOMFactory('strong'), |
11298 | | style: createDOMFactory('style'), |
11299 | | sub: createDOMFactory('sub'), |
11300 | | summary: createDOMFactory('summary'), |
11301 | | sup: createDOMFactory('sup'), |
11302 | | table: createDOMFactory('table'), |
11303 | | tbody: createDOMFactory('tbody'), |
11304 | | td: createDOMFactory('td'), |
11305 | | textarea: createDOMFactory('textarea'), |
11306 | | tfoot: createDOMFactory('tfoot'), |
11307 | | th: createDOMFactory('th'), |
11308 | | thead: createDOMFactory('thead'), |
11309 | | time: createDOMFactory('time'), |
11310 | | title: createDOMFactory('title'), |
11311 | | tr: createDOMFactory('tr'), |
11312 | | track: createDOMFactory('track'), |
11313 | | u: createDOMFactory('u'), |
11314 | | ul: createDOMFactory('ul'), |
11315 | | 'var': createDOMFactory('var'), |
11316 | | video: createDOMFactory('video'), |
11317 | | wbr: createDOMFactory('wbr'), |
11318 | | |
11319 | | // SVG |
11320 | | circle: createDOMFactory('circle'), |
11321 | | clipPath: createDOMFactory('clipPath'), |
11322 | | defs: createDOMFactory('defs'), |
11323 | | ellipse: createDOMFactory('ellipse'), |
11324 | | g: createDOMFactory('g'), |
11325 | | image: createDOMFactory('image'), |
11326 | | line: createDOMFactory('line'), |
11327 | | linearGradient: createDOMFactory('linearGradient'), |
11328 | | mask: createDOMFactory('mask'), |
11329 | | path: createDOMFactory('path'), |
11330 | | pattern: createDOMFactory('pattern'), |
11331 | | polygon: createDOMFactory('polygon'), |
11332 | | polyline: createDOMFactory('polyline'), |
11333 | | radialGradient: createDOMFactory('radialGradient'), |
11334 | | rect: createDOMFactory('rect'), |
11335 | | stop: createDOMFactory('stop'), |
11336 | | svg: createDOMFactory('svg'), |
11337 | | text: createDOMFactory('text'), |
11338 | | tspan: createDOMFactory('tspan') |
11339 | | }; |
11340 | | |
11341 | | module.exports = ReactDOMFactories; |
11342 | | |
11343 | | /***/ }), |
11344 | | /* 353 */ |
11345 | | /***/ (function(module, exports, __webpack_require__) { |
11346 | | |
11347 | | /** |
11348 | | * Copyright (c) 2014-present, Facebook, Inc. |
11349 | | * |
11350 | | * This source code is licensed under the MIT license found in the |
11351 | | * LICENSE file in the root directory of this source tree. |
11352 | | * |
11353 | | */ |
11354 | | |
11355 | | /** |
11356 | | * ReactElementValidator provides a wrapper around a element factory |
11357 | | * which validates the props passed to the element. This is intended to be |
11358 | | * used only in DEV and could be replaced by a static type checker for languages |
11359 | | * that support it. |
11360 | | */ |
11361 | | |
11362 | | 'use strict'; |
11363 | | |
11364 | | var ReactCurrentOwner = __webpack_require__(347); |
11365 | | var ReactComponentTreeHook = __webpack_require__(354); |
11366 | | var ReactElement = __webpack_require__(346); |
11367 | | |
11368 | | var checkReactTypeSpec = __webpack_require__(355); |
11369 | | |
11370 | | var canDefineProperty = __webpack_require__(340); |
11371 | | var getIteratorFn = __webpack_require__(350); |
11372 | | var warning = __webpack_require__(338); |
11373 | | var lowPriorityWarning = __webpack_require__(343); |
11374 | | |
11375 | | function getDeclarationErrorAddendum() { |
11376 | | if (ReactCurrentOwner.current) { |
11377 | | var name = ReactCurrentOwner.current.getName(); |
11378 | | if (name) { |
11379 | | return ' Check the render method of `' + name + '`.'; |
11380 | | } |
11381 | | } |
11382 | | return ''; |
11383 | | } |
11384 | | |
11385 | | function getSourceInfoErrorAddendum(elementProps) { |
11386 | | if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { |
11387 | | var source = elementProps.__source; |
11388 | | var fileName = source.fileName.replace(/^.*[\\\/]/, ''); |
11389 | | var lineNumber = source.lineNumber; |
11390 | | return ' Check your code at ' + fileName + ':' + lineNumber + '.'; |
11391 | | } |
11392 | | return ''; |
11393 | | } |
11394 | | |
11395 | | /** |
11396 | | * Warn if there's no key explicitly set on dynamic arrays of children or |
11397 | | * object keys are not valid. This allows us to keep track of children between |
11398 | | * updates. |
11399 | | */ |
11400 | | var ownerHasKeyUseWarning = {}; |
11401 | | |
11402 | | function getCurrentComponentErrorInfo(parentType) { |
11403 | | var info = getDeclarationErrorAddendum(); |
11404 | | |
11405 | | if (!info) { |
11406 | | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; |
11407 | | if (parentName) { |
11408 | | info = ' Check the top-level render call using <' + parentName + '>.'; |
11409 | | } |
11410 | | } |
11411 | | return info; |
11412 | | } |
11413 | | |
11414 | | /** |
11415 | | * Warn if the element doesn't have an explicit key assigned to it. |
11416 | | * This element is in an array. The array could grow and shrink or be |
11417 | | * reordered. All children that haven't already been validated are required to |
11418 | | * have a "key" property assigned to it. Error statuses are cached so a warning |
11419 | | * will only be shown once. |
11420 | | * |
11421 | | * @internal |
11422 | | * @param {ReactElement} element Element that requires a key. |
11423 | | * @param {*} parentType element's parent's type. |
11424 | | */ |
11425 | | function validateExplicitKey(element, parentType) { |
11426 | | if (!element._store || element._store.validated || element.key != null) { |
11427 | | return; |
11428 | | } |
11429 | | element._store.validated = true; |
11430 | | |
11431 | | var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); |
11432 | | |
11433 | | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); |
11434 | | if (memoizer[currentComponentErrorInfo]) { |
11435 | | return; |
11436 | | } |
11437 | | memoizer[currentComponentErrorInfo] = true; |
11438 | | |
11439 | | // Usually the current owner is the offender, but if it accepts children as a |
11440 | | // property, it may be the creator of the child that's responsible for |
11441 | | // assigning it a key. |
11442 | | var childOwner = ''; |
11443 | | if (element && element._owner && element._owner !== ReactCurrentOwner.current) { |
11444 | | // Give the component that originally created this child. |
11445 | | childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; |
11446 | | } |
11447 | | |
11448 | | true ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; |
11449 | | } |
11450 | | |
11451 | | /** |
11452 | | * Ensure that every element either is passed in a static location, in an |
11453 | | * array with an explicit keys property defined, or in an object literal |
11454 | | * with valid key property. |
11455 | | * |
11456 | | * @internal |
11457 | | * @param {ReactNode} node Statically passed child of any type. |
11458 | | * @param {*} parentType node's parent's type. |
11459 | | */ |
11460 | | function validateChildKeys(node, parentType) { |
11461 | | if (typeof node !== 'object') { |
11462 | | return; |
11463 | | } |
11464 | | if (Array.isArray(node)) { |
11465 | | for (var i = 0; i < node.length; i++) { |
11466 | | var child = node[i]; |
11467 | | if (ReactElement.isValidElement(child)) { |
11468 | | validateExplicitKey(child, parentType); |
11469 | | } |
11470 | | } |
11471 | | } else if (ReactElement.isValidElement(node)) { |
11472 | | // This element was passed in a valid location. |
11473 | | if (node._store) { |
11474 | | node._store.validated = true; |
11475 | | } |
11476 | | } else if (node) { |
11477 | | var iteratorFn = getIteratorFn(node); |
11478 | | // Entry iterators provide implicit keys. |
11479 | | if (iteratorFn) { |
11480 | | if (iteratorFn !== node.entries) { |
11481 | | var iterator = iteratorFn.call(node); |
11482 | | var step; |
11483 | | while (!(step = iterator.next()).done) { |
11484 | | if (ReactElement.isValidElement(step.value)) { |
11485 | | validateExplicitKey(step.value, parentType); |
11486 | | } |
11487 | | } |
11488 | | } |
11489 | | } |
11490 | | } |
11491 | | } |
11492 | | |
11493 | | /** |
11494 | | * Given an element, validate that its props follow the propTypes definition, |
11495 | | * provided by the type. |
11496 | | * |
11497 | | * @param {ReactElement} element |
11498 | | */ |
11499 | | function validatePropTypes(element) { |
11500 | | var componentClass = element.type; |
11501 | | if (typeof componentClass !== 'function') { |
11502 | | return; |
11503 | | } |
11504 | | var name = componentClass.displayName || componentClass.name; |
11505 | | if (componentClass.propTypes) { |
11506 | | checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); |
11507 | | } |
11508 | | if (typeof componentClass.getDefaultProps === 'function') { |
11509 | | true ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; |
11510 | | } |
11511 | | } |
11512 | | |
11513 | | var ReactElementValidator = { |
11514 | | createElement: function (type, props, children) { |
11515 | | var validType = typeof type === 'string' || typeof type === 'function'; |
11516 | | // We warn in this case but don't throw. We expect the element creation to |
11517 | | // succeed and there will likely be errors in render. |
11518 | | if (!validType) { |
11519 | | if (typeof type !== 'function' && typeof type !== 'string') { |
11520 | | var info = ''; |
11521 | | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { |
11522 | | info += ' You likely forgot to export your component from the file ' + "it's defined in."; |
11523 | | } |
11524 | | |
11525 | | var sourceInfo = getSourceInfoErrorAddendum(props); |
11526 | | if (sourceInfo) { |
11527 | | info += sourceInfo; |
11528 | | } else { |
11529 | | info += getDeclarationErrorAddendum(); |
11530 | | } |
11531 | | |
11532 | | info += ReactComponentTreeHook.getCurrentStackAddendum(); |
11533 | | |
11534 | | var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null; |
11535 | | ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource); |
11536 | | true ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0; |
11537 | | ReactComponentTreeHook.popNonStandardWarningStack(); |
11538 | | } |
11539 | | } |
11540 | | |
11541 | | var element = ReactElement.createElement.apply(this, arguments); |
11542 | | |
11543 | | // The result can be nullish if a mock or a custom function is used. |
11544 | | // TODO: Drop this when these are no longer allowed as the type argument. |
11545 | | if (element == null) { |
11546 | | return element; |
11547 | | } |
11548 | | |
11549 | | // Skip key warning if the type isn't valid since our key validation logic |
11550 | | // doesn't expect a non-string/function type and can throw confusing errors. |
11551 | | // We don't want exception behavior to differ between dev and prod. |
11552 | | // (Rendering will throw with a helpful message and as soon as the type is |
11553 | | // fixed, the key warnings will appear.) |
11554 | | if (validType) { |
11555 | | for (var i = 2; i < arguments.length; i++) { |
11556 | | validateChildKeys(arguments[i], type); |
11557 | | } |
11558 | | } |
11559 | | |
11560 | | validatePropTypes(element); |
11561 | | |
11562 | | return element; |
11563 | | }, |
11564 | | |
11565 | | createFactory: function (type) { |
11566 | | var validatedFactory = ReactElementValidator.createElement.bind(null, type); |
11567 | | // Legacy hook TODO: Warn if this is accessed |
11568 | | validatedFactory.type = type; |
11569 | | |
11570 | | if (true) { |
11571 | | if (canDefineProperty) { |
11572 | | Object.defineProperty(validatedFactory, 'type', { |
11573 | | enumerable: false, |
11574 | | get: function () { |
11575 | | lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); |
11576 | | Object.defineProperty(this, 'type', { |
11577 | | value: type |
11578 | | }); |
11579 | | return type; |
11580 | | } |
11581 | | }); |
11582 | | } |
11583 | | } |
11584 | | |
11585 | | return validatedFactory; |
11586 | | }, |
11587 | | |
11588 | | cloneElement: function (element, props, children) { |
11589 | | var newElement = ReactElement.cloneElement.apply(this, arguments); |
11590 | | for (var i = 2; i < arguments.length; i++) { |
11591 | | validateChildKeys(arguments[i], newElement.type); |
11592 | | } |
11593 | | validatePropTypes(newElement); |
11594 | | return newElement; |
11595 | | } |
11596 | | }; |
11597 | | |
11598 | | module.exports = ReactElementValidator; |
11599 | | |
11600 | | /***/ }), |
11601 | | /* 354 */ |
11602 | | /***/ (function(module, exports, __webpack_require__) { |
11603 | | |
11604 | | /** |
11605 | | * Copyright (c) 2016-present, Facebook, Inc. |
11606 | | * |
11607 | | * This source code is licensed under the MIT license found in the |
11608 | | * LICENSE file in the root directory of this source tree. |
11609 | | * |
11610 | | * |
11611 | | */ |
11612 | | |
11613 | | 'use strict'; |
11614 | | |
11615 | | var _prodInvariant = __webpack_require__(336); |
11616 | | |
11617 | | var ReactCurrentOwner = __webpack_require__(347); |
11618 | | |
11619 | | var invariant = __webpack_require__(342); |
11620 | | var warning = __webpack_require__(338); |
11621 | | |
11622 | | function isNative(fn) { |
11623 | | // Based on isNative() from Lodash |
11624 | | var funcToString = Function.prototype.toString; |
11625 | | var hasOwnProperty = Object.prototype.hasOwnProperty; |
11626 | | var reIsNative = RegExp('^' + funcToString |
11627 | | // Take an example native function source for comparison |
11628 | | .call(hasOwnProperty |
11629 | | // Strip regex characters so we can use it for regex |
11630 | | ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' |
11631 | | // Remove hasOwnProperty from the template to make it generic |
11632 | | ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); |
11633 | | try { |
11634 | | var source = funcToString.call(fn); |
11635 | | return reIsNative.test(source); |
11636 | | } catch (err) { |
11637 | | return false; |
11638 | | } |
11639 | | } |
11640 | | |
11641 | | var canUseCollections = |
11642 | | // Array.from |
11643 | | typeof Array.from === 'function' && |
11644 | | // Map |
11645 | | typeof Map === 'function' && isNative(Map) && |
11646 | | // Map.prototype.keys |
11647 | | Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && |
11648 | | // Set |
11649 | | typeof Set === 'function' && isNative(Set) && |
11650 | | // Set.prototype.keys |
11651 | | Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); |
11652 | | |
11653 | | var setItem; |
11654 | | var getItem; |
11655 | | var removeItem; |
11656 | | var getItemIDs; |
11657 | | var addRoot; |
11658 | | var removeRoot; |
11659 | | var getRootIDs; |
11660 | | |
11661 | | if (canUseCollections) { |
11662 | | var itemMap = new Map(); |
11663 | | var rootIDSet = new Set(); |
11664 | | |
11665 | | setItem = function (id, item) { |
11666 | | itemMap.set(id, item); |
11667 | | }; |
11668 | | getItem = function (id) { |
11669 | | return itemMap.get(id); |
11670 | | }; |
11671 | | removeItem = function (id) { |
11672 | | itemMap['delete'](id); |
11673 | | }; |
11674 | | getItemIDs = function () { |
11675 | | return Array.from(itemMap.keys()); |
11676 | | }; |
11677 | | |
11678 | | addRoot = function (id) { |
11679 | | rootIDSet.add(id); |
11680 | | }; |
11681 | | removeRoot = function (id) { |
11682 | | rootIDSet['delete'](id); |
11683 | | }; |
11684 | | getRootIDs = function () { |
11685 | | return Array.from(rootIDSet.keys()); |
11686 | | }; |
11687 | | } else { |
11688 | | var itemByKey = {}; |
11689 | | var rootByKey = {}; |
11690 | | |
11691 | | // Use non-numeric keys to prevent V8 performance issues: |
11692 | | // https://github.com/facebook/react/pull/7232 |
11693 | | var getKeyFromID = function (id) { |
11694 | | return '.' + id; |
11695 | | }; |
11696 | | var getIDFromKey = function (key) { |
11697 | | return parseInt(key.substr(1), 10); |
11698 | | }; |
11699 | | |
11700 | | setItem = function (id, item) { |
11701 | | var key = getKeyFromID(id); |
11702 | | itemByKey[key] = item; |
11703 | | }; |
11704 | | getItem = function (id) { |
11705 | | var key = getKeyFromID(id); |
11706 | | return itemByKey[key]; |
11707 | | }; |
11708 | | removeItem = function (id) { |
11709 | | var key = getKeyFromID(id); |
11710 | | delete itemByKey[key]; |
11711 | | }; |
11712 | | getItemIDs = function () { |
11713 | | return Object.keys(itemByKey).map(getIDFromKey); |
11714 | | }; |
11715 | | |
11716 | | addRoot = function (id) { |
11717 | | var key = getKeyFromID(id); |
11718 | | rootByKey[key] = true; |
11719 | | }; |
11720 | | removeRoot = function (id) { |
11721 | | var key = getKeyFromID(id); |
11722 | | delete rootByKey[key]; |
11723 | | }; |
11724 | | getRootIDs = function () { |
11725 | | return Object.keys(rootByKey).map(getIDFromKey); |
11726 | | }; |
11727 | | } |
11728 | | |
11729 | | var unmountedIDs = []; |
11730 | | |
11731 | | function purgeDeep(id) { |
11732 | | var item = getItem(id); |
11733 | | if (item) { |
11734 | | var childIDs = item.childIDs; |
11735 | | |
11736 | | removeItem(id); |
11737 | | childIDs.forEach(purgeDeep); |
11738 | | } |
11739 | | } |
11740 | | |
11741 | | function describeComponentFrame(name, source, ownerName) { |
11742 | | return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); |
11743 | | } |
11744 | | |
11745 | | function getDisplayName(element) { |
11746 | | if (element == null) { |
11747 | | return '#empty'; |
11748 | | } else if (typeof element === 'string' || typeof element === 'number') { |
11749 | | return '#text'; |
11750 | | } else if (typeof element.type === 'string') { |
11751 | | return element.type; |
11752 | | } else { |
11753 | | return element.type.displayName || element.type.name || 'Unknown'; |
11754 | | } |
11755 | | } |
11756 | | |
11757 | | function describeID(id) { |
11758 | | var name = ReactComponentTreeHook.getDisplayName(id); |
11759 | | var element = ReactComponentTreeHook.getElement(id); |
11760 | | var ownerID = ReactComponentTreeHook.getOwnerID(id); |
11761 | | var ownerName; |
11762 | | if (ownerID) { |
11763 | | ownerName = ReactComponentTreeHook.getDisplayName(ownerID); |
11764 | | } |
11765 | | true ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; |
11766 | | return describeComponentFrame(name, element && element._source, ownerName); |
11767 | | } |
11768 | | |
11769 | | var ReactComponentTreeHook = { |
11770 | | onSetChildren: function (id, nextChildIDs) { |
11771 | | var item = getItem(id); |
11772 | | !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; |
11773 | | item.childIDs = nextChildIDs; |
11774 | | |
11775 | | for (var i = 0; i < nextChildIDs.length; i++) { |
11776 | | var nextChildID = nextChildIDs[i]; |
11777 | | var nextChild = getItem(nextChildID); |
11778 | | !nextChild ? true ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; |
11779 | | !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? true ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; |
11780 | | !nextChild.isMounted ? true ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; |
11781 | | if (nextChild.parentID == null) { |
11782 | | nextChild.parentID = id; |
11783 | | // TODO: This shouldn't be necessary but mounting a new root during in |
11784 | | // componentWillMount currently causes not-yet-mounted components to |
11785 | | // be purged from our tree data so their parent id is missing. |
11786 | | } |
11787 | | !(nextChild.parentID === id) ? true ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; |
11788 | | } |
11789 | | }, |
11790 | | onBeforeMountComponent: function (id, element, parentID) { |
11791 | | var item = { |
11792 | | element: element, |
11793 | | parentID: parentID, |
11794 | | text: null, |
11795 | | childIDs: [], |
11796 | | isMounted: false, |
11797 | | updateCount: 0 |
11798 | | }; |
11799 | | setItem(id, item); |
11800 | | }, |
11801 | | onBeforeUpdateComponent: function (id, element) { |
11802 | | var item = getItem(id); |
11803 | | if (!item || !item.isMounted) { |
11804 | | // We may end up here as a result of setState() in componentWillUnmount(). |
11805 | | // In this case, ignore the element. |
11806 | | return; |
11807 | | } |
11808 | | item.element = element; |
11809 | | }, |
11810 | | onMountComponent: function (id) { |
11811 | | var item = getItem(id); |
11812 | | !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; |
11813 | | item.isMounted = true; |
11814 | | var isRoot = item.parentID === 0; |
11815 | | if (isRoot) { |
11816 | | addRoot(id); |
11817 | | } |
11818 | | }, |
11819 | | onUpdateComponent: function (id) { |
11820 | | var item = getItem(id); |
11821 | | if (!item || !item.isMounted) { |
11822 | | // We may end up here as a result of setState() in componentWillUnmount(). |
11823 | | // In this case, ignore the element. |
11824 | | return; |
11825 | | } |
11826 | | item.updateCount++; |
11827 | | }, |
11828 | | onUnmountComponent: function (id) { |
11829 | | var item = getItem(id); |
11830 | | if (item) { |
11831 | | // We need to check if it exists. |
11832 | | // `item` might not exist if it is inside an error boundary, and a sibling |
11833 | | // error boundary child threw while mounting. Then this instance never |
11834 | | // got a chance to mount, but it still gets an unmounting event during |
11835 | | // the error boundary cleanup. |
11836 | | item.isMounted = false; |
11837 | | var isRoot = item.parentID === 0; |
11838 | | if (isRoot) { |
11839 | | removeRoot(id); |
11840 | | } |
11841 | | } |
11842 | | unmountedIDs.push(id); |
11843 | | }, |
11844 | | purgeUnmountedComponents: function () { |
11845 | | if (ReactComponentTreeHook._preventPurging) { |
11846 | | // Should only be used for testing. |
11847 | | return; |
11848 | | } |
11849 | | |
11850 | | for (var i = 0; i < unmountedIDs.length; i++) { |
11851 | | var id = unmountedIDs[i]; |
11852 | | purgeDeep(id); |
11853 | | } |
11854 | | unmountedIDs.length = 0; |
11855 | | }, |
11856 | | isMounted: function (id) { |
11857 | | var item = getItem(id); |
11858 | | return item ? item.isMounted : false; |
11859 | | }, |
11860 | | getCurrentStackAddendum: function (topElement) { |
11861 | | var info = ''; |
11862 | | if (topElement) { |
11863 | | var name = getDisplayName(topElement); |
11864 | | var owner = topElement._owner; |
11865 | | info += describeComponentFrame(name, topElement._source, owner && owner.getName()); |
11866 | | } |
11867 | | |
11868 | | var currentOwner = ReactCurrentOwner.current; |
11869 | | var id = currentOwner && currentOwner._debugID; |
11870 | | |
11871 | | info += ReactComponentTreeHook.getStackAddendumByID(id); |
11872 | | return info; |
11873 | | }, |
11874 | | getStackAddendumByID: function (id) { |
11875 | | var info = ''; |
11876 | | while (id) { |
11877 | | info += describeID(id); |
11878 | | id = ReactComponentTreeHook.getParentID(id); |
11879 | | } |
11880 | | return info; |
11881 | | }, |
11882 | | getChildIDs: function (id) { |
11883 | | var item = getItem(id); |
11884 | | return item ? item.childIDs : []; |
11885 | | }, |
11886 | | getDisplayName: function (id) { |
11887 | | var element = ReactComponentTreeHook.getElement(id); |
11888 | | if (!element) { |
11889 | | return null; |
11890 | | } |
11891 | | return getDisplayName(element); |
11892 | | }, |
11893 | | getElement: function (id) { |
11894 | | var item = getItem(id); |
11895 | | return item ? item.element : null; |
11896 | | }, |
11897 | | getOwnerID: function (id) { |
11898 | | var element = ReactComponentTreeHook.getElement(id); |
11899 | | if (!element || !element._owner) { |
11900 | | return null; |
11901 | | } |
11902 | | return element._owner._debugID; |
11903 | | }, |
11904 | | getParentID: function (id) { |
11905 | | var item = getItem(id); |
11906 | | return item ? item.parentID : null; |
11907 | | }, |
11908 | | getSource: function (id) { |
11909 | | var item = getItem(id); |
11910 | | var element = item ? item.element : null; |
11911 | | var source = element != null ? element._source : null; |
11912 | | return source; |
11913 | | }, |
11914 | | getText: function (id) { |
11915 | | var element = ReactComponentTreeHook.getElement(id); |
11916 | | if (typeof element === 'string') { |
11917 | | return element; |
11918 | | } else if (typeof element === 'number') { |
11919 | | return '' + element; |
11920 | | } else { |
11921 | | return null; |
11922 | | } |
11923 | | }, |
11924 | | getUpdateCount: function (id) { |
11925 | | var item = getItem(id); |
11926 | | return item ? item.updateCount : 0; |
11927 | | }, |
11928 | | |
11929 | | |
11930 | | getRootIDs: getRootIDs, |
11931 | | getRegisteredIDs: getItemIDs, |
11932 | | |
11933 | | pushNonStandardWarningStack: function (isCreatingElement, currentSource) { |
11934 | | if (typeof console.reactStack !== 'function') { |
11935 | | return; |
11936 | | } |
11937 | | |
11938 | | var stack = []; |
11939 | | var currentOwner = ReactCurrentOwner.current; |
11940 | | var id = currentOwner && currentOwner._debugID; |
11941 | | |
11942 | | try { |
11943 | | if (isCreatingElement) { |
11944 | | stack.push({ |
11945 | | name: id ? ReactComponentTreeHook.getDisplayName(id) : null, |
11946 | | fileName: currentSource ? currentSource.fileName : null, |
11947 | | lineNumber: currentSource ? currentSource.lineNumber : null |
11948 | | }); |
11949 | | } |
11950 | | |
11951 | | while (id) { |
11952 | | var element = ReactComponentTreeHook.getElement(id); |
11953 | | var parentID = ReactComponentTreeHook.getParentID(id); |
11954 | | var ownerID = ReactComponentTreeHook.getOwnerID(id); |
11955 | | var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; |
11956 | | var source = element && element._source; |
11957 | | stack.push({ |
11958 | | name: ownerName, |
11959 | | fileName: source ? source.fileName : null, |
11960 | | lineNumber: source ? source.lineNumber : null |
11961 | | }); |
11962 | | id = parentID; |
11963 | | } |
11964 | | } catch (err) { |
11965 | | // Internal state is messed up. |
11966 | | // Stop building the stack (it's just a nice to have). |
11967 | | } |
11968 | | |
11969 | | console.reactStack(stack); |
11970 | | }, |
11971 | | popNonStandardWarningStack: function () { |
11972 | | if (typeof console.reactStackEnd !== 'function') { |
11973 | | return; |
11974 | | } |
11975 | | console.reactStackEnd(); |
11976 | | } |
11977 | | }; |
11978 | | |
11979 | | module.exports = ReactComponentTreeHook; |
11980 | | |
11981 | | /***/ }), |
11982 | | /* 355 */ |
11983 | | /***/ (function(module, exports, __webpack_require__) { |
11984 | | |
11985 | | /* WEBPACK VAR INJECTION */(function(process) {/** |
11986 | | * Copyright (c) 2013-present, Facebook, Inc. |
11987 | | * |
11988 | | * This source code is licensed under the MIT license found in the |
11989 | | * LICENSE file in the root directory of this source tree. |
11990 | | * |
11991 | | */ |
11992 | | |
11993 | | 'use strict'; |
11994 | | |
11995 | | var _prodInvariant = __webpack_require__(336); |
11996 | | |
11997 | | var ReactPropTypeLocationNames = __webpack_require__(357); |
11998 | | var ReactPropTypesSecret = __webpack_require__(358); |
11999 | | |
12000 | | var invariant = __webpack_require__(342); |
12001 | | var warning = __webpack_require__(338); |
12002 | | |
12003 | | var ReactComponentTreeHook; |
12004 | | |
12005 | | if (typeof process !== 'undefined' && ({"NODE_ENV":"development"}) && ("development") === 'test') { |
12006 | | // Temporary hack. |
12007 | | // Inline requires don't work well with Jest: |
12008 | | // https://github.com/facebook/react/issues/7240 |
12009 | | // Remove the inline requires when we don't need them anymore: |
12010 | | // https://github.com/facebook/react/pull/7178 |
12011 | | ReactComponentTreeHook = __webpack_require__(354); |
12012 | | } |
12013 | | |
12014 | | var loggedTypeFailures = {}; |
12015 | | |
12016 | | /** |
12017 | | * Assert that the values match with the type specs. |
12018 | | * Error messages are memorized and will only be shown once. |
12019 | | * |
12020 | | * @param {object} typeSpecs Map of name to a ReactPropType |
12021 | | * @param {object} values Runtime values that need to be type-checked |
12022 | | * @param {string} location e.g. "prop", "context", "child context" |
12023 | | * @param {string} componentName Name of the component for error messages. |
12024 | | * @param {?object} element The React element that is being type-checked |
12025 | | * @param {?number} debugID The React component instance that is being type-checked |
12026 | | * @private |
12027 | | */ |
12028 | | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { |
12029 | | for (var typeSpecName in typeSpecs) { |
12030 | | if (typeSpecs.hasOwnProperty(typeSpecName)) { |
12031 | | var error; |
12032 | | // Prop type validation may throw. In case they do, we don't want to |
12033 | | // fail the render phase where it didn't fail before. So we log it. |
12034 | | // After these have been cleaned up, we'll let them throw. |
12035 | | try { |
12036 | | // This is intentionally an invariant that gets caught. It's the same |
12037 | | // behavior as without this statement except with a better message. |
12038 | | !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; |
12039 | | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
12040 | | } catch (ex) { |
12041 | | error = ex; |
12042 | | } |
12043 | | true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; |
12044 | | if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
12045 | | // Only monitor this failure once because there tends to be a lot of the |
12046 | | // same error. |
12047 | | loggedTypeFailures[error.message] = true; |
12048 | | |
12049 | | var componentStackInfo = ''; |
12050 | | |
12051 | | if (true) { |
12052 | | if (!ReactComponentTreeHook) { |
12053 | | ReactComponentTreeHook = __webpack_require__(354); |
12054 | | } |
12055 | | if (debugID !== null) { |
12056 | | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); |
12057 | | } else if (element !== null) { |
12058 | | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); |
12059 | | } |
12060 | | } |
12061 | | |
12062 | | true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; |
12063 | | } |
12064 | | } |
12065 | | } |
12066 | | } |
12067 | | |
12068 | | module.exports = checkReactTypeSpec; |
12069 | | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(356))) |
12070 | | |
12071 | | /***/ }), |
12072 | | /* 356 */ |
12073 | | /***/ (function(module, exports) { |
12074 | | |
12075 | | // shim for using process in browser |
12076 | | var process = module.exports = {}; |
12077 | | |
12078 | | // cached from whatever global is present so that test runners that stub it |
12079 | | // don't break things. But we need to wrap it in a try catch in case it is |
12080 | | // wrapped in strict mode code which doesn't define any globals. It's inside a |
12081 | | // function because try/catches deoptimize in certain engines. |
12082 | | |
12083 | | var cachedSetTimeout; |
12084 | | var cachedClearTimeout; |
12085 | | |
12086 | | function defaultSetTimout() { |
12087 | | throw new Error('setTimeout has not been defined'); |
12088 | | } |
12089 | | function defaultClearTimeout () { |
12090 | | throw new Error('clearTimeout has not been defined'); |
12091 | | } |
12092 | | (function () { |
12093 | | try { |
12094 | | if (typeof setTimeout === 'function') { |
12095 | | cachedSetTimeout = setTimeout; |
12096 | | } else { |
12097 | | cachedSetTimeout = defaultSetTimout; |
12098 | | } |
12099 | | } catch (e) { |
12100 | | cachedSetTimeout = defaultSetTimout; |
12101 | | } |
12102 | | try { |
12103 | | if (typeof clearTimeout === 'function') { |
12104 | | cachedClearTimeout = clearTimeout; |
12105 | | } else { |
12106 | | cachedClearTimeout = defaultClearTimeout; |
12107 | | } |
12108 | | } catch (e) { |
12109 | | cachedClearTimeout = defaultClearTimeout; |
12110 | | } |
12111 | | } ()) |
12112 | | function runTimeout(fun) { |
12113 | | if (cachedSetTimeout === setTimeout) { |
12114 | | //normal enviroments in sane situations |
12115 | | return setTimeout(fun, 0); |
12116 | | } |
12117 | | // if setTimeout wasn't available but was latter defined |
12118 | | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { |
12119 | | cachedSetTimeout = setTimeout; |
12120 | | return setTimeout(fun, 0); |
12121 | | } |
12122 | | try { |
12123 | | // when when somebody has screwed with setTimeout but no I.E. maddness |
12124 | | return cachedSetTimeout(fun, 0); |
12125 | | } catch(e){ |
12126 | | try { |
12127 | | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
12128 | | return cachedSetTimeout.call(null, fun, 0); |
12129 | | } catch(e){ |
12130 | | // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error |
12131 | | return cachedSetTimeout.call(this, fun, 0); |
12132 | | } |
12133 | | } |
12134 | | |
12135 | | |
12136 | | } |
12137 | | function runClearTimeout(marker) { |
12138 | | if (cachedClearTimeout === clearTimeout) { |
12139 | | //normal enviroments in sane situations |
12140 | | return clearTimeout(marker); |
12141 | | } |
12142 | | // if clearTimeout wasn't available but was latter defined |
12143 | | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
12144 | | cachedClearTimeout = clearTimeout; |
12145 | | return clearTimeout(marker); |
12146 | | } |
12147 | | try { |
12148 | | // when when somebody has screwed with setTimeout but no I.E. maddness |
12149 | | return cachedClearTimeout(marker); |
12150 | | } catch (e){ |
12151 | | try { |
12152 | | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
12153 | | return cachedClearTimeout.call(null, marker); |
12154 | | } catch (e){ |
12155 | | // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. |
12156 | | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
12157 | | return cachedClearTimeout.call(this, marker); |
12158 | | } |
12159 | | } |
12160 | | |
12161 | | |
12162 | | |
12163 | | } |
12164 | | var queue = []; |
12165 | | var draining = false; |
12166 | | var currentQueue; |
12167 | | var queueIndex = -1; |
12168 | | |
12169 | | function cleanUpNextTick() { |
12170 | | if (!draining || !currentQueue) { |
12171 | | return; |
12172 | | } |
12173 | | draining = false; |
12174 | | if (currentQueue.length) { |
12175 | | queue = currentQueue.concat(queue); |
12176 | | } else { |
12177 | | queueIndex = -1; |
12178 | | } |
12179 | | if (queue.length) { |
12180 | | drainQueue(); |
12181 | | } |
12182 | | } |
12183 | | |
12184 | | function drainQueue() { |
12185 | | if (draining) { |
12186 | | return; |
12187 | | } |
12188 | | var timeout = runTimeout(cleanUpNextTick); |
12189 | | draining = true; |
12190 | | |
12191 | | var len = queue.length; |
12192 | | while(len) { |
12193 | | currentQueue = queue; |
12194 | | queue = []; |
12195 | | while (++queueIndex < len) { |
12196 | | if (currentQueue) { |
12197 | | currentQueue[queueIndex].run(); |
12198 | | } |
12199 | | } |
12200 | | queueIndex = -1; |
12201 | | len = queue.length; |
12202 | | } |
12203 | | currentQueue = null; |
12204 | | draining = false; |
12205 | | runClearTimeout(timeout); |
12206 | | } |
12207 | | |
12208 | | process.nextTick = function (fun) { |
12209 | | var args = new Array(arguments.length - 1); |
12210 | | if (arguments.length > 1) { |
12211 | | for (var i = 1; i < arguments.length; i++) { |
12212 | | args[i - 1] = arguments[i]; |
12213 | | } |
12214 | | } |
12215 | | queue.push(new Item(fun, args)); |
12216 | | if (queue.length === 1 && !draining) { |
12217 | | runTimeout(drainQueue); |
12218 | | } |
12219 | | }; |
12220 | | |
12221 | | // v8 likes predictible objects |
12222 | | function Item(fun, array) { |
12223 | | this.fun = fun; |
12224 | | this.array = array; |
12225 | | } |
12226 | | Item.prototype.run = function () { |
12227 | | this.fun.apply(null, this.array); |
12228 | | }; |
12229 | | process.title = 'browser'; |
12230 | | process.browser = true; |
12231 | | process.env = {}; |
12232 | | process.argv = []; |
12233 | | process.version = ''; // empty string to avoid regexp issues |
12234 | | process.versions = {}; |
12235 | | |
12236 | | function noop() {} |
12237 | | |
12238 | | process.on = noop; |
12239 | | process.addListener = noop; |
12240 | | process.once = noop; |
12241 | | process.off = noop; |
12242 | | process.removeListener = noop; |
12243 | | process.removeAllListeners = noop; |
12244 | | process.emit = noop; |
12245 | | process.prependListener = noop; |
12246 | | process.prependOnceListener = noop; |
12247 | | |
12248 | | process.listeners = function (name) { return [] } |
12249 | | |
12250 | | process.binding = function (name) { |
12251 | | throw new Error('process.binding is not supported'); |
12252 | | }; |
12253 | | |
12254 | | process.cwd = function () { return '/' }; |
12255 | | process.chdir = function (dir) { |
12256 | | throw new Error('process.chdir is not supported'); |
12257 | | }; |
12258 | | process.umask = function() { return 0; }; |
12259 | | |
12260 | | |
12261 | | /***/ }), |
12262 | | /* 357 */ |
12263 | | /***/ (function(module, exports, __webpack_require__) { |
12264 | | |
12265 | | /** |
12266 | | * Copyright (c) 2013-present, Facebook, Inc. |
12267 | | * |
12268 | | * This source code is licensed under the MIT license found in the |
12269 | | * LICENSE file in the root directory of this source tree. |
12270 | | * |
12271 | | * |
12272 | | */ |
12273 | | |
12274 | | 'use strict'; |
12275 | | |
12276 | | var ReactPropTypeLocationNames = {}; |
12277 | | |
12278 | | if (true) { |
12279 | | ReactPropTypeLocationNames = { |
12280 | | prop: 'prop', |
12281 | | context: 'context', |
12282 | | childContext: 'child context' |
12283 | | }; |
12284 | | } |
12285 | | |
12286 | | module.exports = ReactPropTypeLocationNames; |
12287 | | |
12288 | | /***/ }), |
12289 | | /* 358 */ |
12290 | | /***/ (function(module, exports) { |
12291 | | |
12292 | | /** |
12293 | | * Copyright (c) 2013-present, Facebook, Inc. |
12294 | | * |
12295 | | * This source code is licensed under the MIT license found in the |
12296 | | * LICENSE file in the root directory of this source tree. |
12297 | | * |
12298 | | * |
12299 | | */ |
12300 | | |
12301 | | 'use strict'; |
12302 | | |
12303 | | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
12304 | | |
12305 | | module.exports = ReactPropTypesSecret; |
12306 | | |
12307 | | /***/ }), |
12308 | | /* 359 */ |
12309 | | /***/ (function(module, exports, __webpack_require__) { |
12310 | | |
12311 | | /** |
12312 | | * Copyright (c) 2013-present, Facebook, Inc. |
12313 | | * |
12314 | | * This source code is licensed under the MIT license found in the |
12315 | | * LICENSE file in the root directory of this source tree. |
12316 | | * |
12317 | | */ |
12318 | | |
12319 | | 'use strict'; |
12320 | | |
12321 | | var _require = __webpack_require__(346), |
12322 | | isValidElement = _require.isValidElement; |
12323 | | |
12324 | | var factory = __webpack_require__(360); |
12325 | | |
12326 | | module.exports = factory(isValidElement); |
12327 | | |
12328 | | /***/ }), |
12329 | | /* 360 */ |
12330 | | /***/ (function(module, exports, __webpack_require__) { |
12331 | | |
12332 | | /** |
12333 | | * Copyright (c) 2013-present, Facebook, Inc. |
12334 | | * |
12335 | | * This source code is licensed under the MIT license found in the |
12336 | | * LICENSE file in the root directory of this source tree. |
12337 | | */ |
12338 | | |
12339 | | 'use strict'; |
12340 | | |
12341 | | // React 15.5 references this module, and assumes PropTypes are still callable in production. |
12342 | | // Therefore we re-export development-only version with all the PropTypes checks here. |
12343 | | // However if one is migrating to the `prop-types` npm library, they will go through the |
12344 | | // `index.js` entry point, and it will branch depending on the environment. |
12345 | | var factory = __webpack_require__(361); |
12346 | | module.exports = function(isValidElement) { |
12347 | | // It is still allowed in 15.5. |
12348 | | var throwOnDirectAccess = false; |
12349 | | return factory(isValidElement, throwOnDirectAccess); |
12350 | | }; |
12351 | | |
12352 | | |
12353 | | /***/ }), |
12354 | | /* 361 */ |
12355 | | /***/ (function(module, exports, __webpack_require__) { |
12356 | | |
12357 | | /** |
12358 | | * Copyright (c) 2013-present, Facebook, Inc. |
12359 | | * |
12360 | | * This source code is licensed under the MIT license found in the |
12361 | | * LICENSE file in the root directory of this source tree. |
12362 | | */ |
12363 | | |
12364 | | 'use strict'; |
12365 | | |
12366 | | var assign = __webpack_require__(334); |
12367 | | |
12368 | | var ReactPropTypesSecret = __webpack_require__(362); |
12369 | | var checkPropTypes = __webpack_require__(363); |
12370 | | |
12371 | | var printWarning = function() {}; |
12372 | | |
12373 | | if (true) { |
12374 | | printWarning = function(text) { |
12375 | | var message = 'Warning: ' + text; |
12376 | | if (typeof console !== 'undefined') { |
12377 | | console.error(message); |
12378 | | } |
12379 | | try { |
12380 | | // --- Welcome to debugging React --- |
12381 | | // This error was thrown as a convenience so that you can use this stack |
12382 | | // to find the callsite that caused this warning to fire. |
12383 | | throw new Error(message); |
12384 | | } catch (x) {} |
12385 | | }; |
12386 | | } |
12387 | | |
12388 | | function emptyFunctionThatReturnsNull() { |
12389 | | return null; |
12390 | | } |
12391 | | |
12392 | | module.exports = function(isValidElement, throwOnDirectAccess) { |
12393 | | /* global Symbol */ |
12394 | | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
12395 | | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
12396 | | |
12397 | | /** |
12398 | | * Returns the iterator method function contained on the iterable object. |
12399 | | * |
12400 | | * Be sure to invoke the function with the iterable as context: |
12401 | | * |
12402 | | * var iteratorFn = getIteratorFn(myIterable); |
12403 | | * if (iteratorFn) { |
12404 | | * var iterator = iteratorFn.call(myIterable); |
12405 | | * ... |
12406 | | * } |
12407 | | * |
12408 | | * @param {?object} maybeIterable |
12409 | | * @return {?function} |
12410 | | */ |
12411 | | function getIteratorFn(maybeIterable) { |
12412 | | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
12413 | | if (typeof iteratorFn === 'function') { |
12414 | | return iteratorFn; |
12415 | | } |
12416 | | } |
12417 | | |
12418 | | /** |
12419 | | * Collection of methods that allow declaration and validation of props that are |
12420 | | * supplied to React components. Example usage: |
12421 | | * |
12422 | | * var Props = require('ReactPropTypes'); |
12423 | | * var MyArticle = React.createClass({ |
12424 | | * propTypes: { |
12425 | | * // An optional string prop named "description". |
12426 | | * description: Props.string, |
12427 | | * |
12428 | | * // A required enum prop named "category". |
12429 | | * category: Props.oneOf(['News','Photos']).isRequired, |
12430 | | * |
12431 | | * // A prop named "dialog" that requires an instance of Dialog. |
12432 | | * dialog: Props.instanceOf(Dialog).isRequired |
12433 | | * }, |
12434 | | * render: function() { ... } |
12435 | | * }); |
12436 | | * |
12437 | | * A more formal specification of how these methods are used: |
12438 | | * |
12439 | | * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
12440 | | * decl := ReactPropTypes.{type}(.isRequired)? |
12441 | | * |
12442 | | * Each and every declaration produces a function with the same signature. This |
12443 | | * allows the creation of custom validation functions. For example: |
12444 | | * |
12445 | | * var MyLink = React.createClass({ |
12446 | | * propTypes: { |
12447 | | * // An optional string or URI prop named "href". |
12448 | | * href: function(props, propName, componentName) { |
12449 | | * var propValue = props[propName]; |
12450 | | * if (propValue != null && typeof propValue !== 'string' && |
12451 | | * !(propValue instanceof URI)) { |
12452 | | * return new Error( |
12453 | | * 'Expected a string or an URI for ' + propName + ' in ' + |
12454 | | * componentName |
12455 | | * ); |
12456 | | * } |
12457 | | * } |
12458 | | * }, |
12459 | | * render: function() {...} |
12460 | | * }); |
12461 | | * |
12462 | | * @internal |
12463 | | */ |
12464 | | |
12465 | | var ANONYMOUS = '<<anonymous>>'; |
12466 | | |
12467 | | // Important! |
12468 | | // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
12469 | | var ReactPropTypes = { |
12470 | | array: createPrimitiveTypeChecker('array'), |
12471 | | bool: createPrimitiveTypeChecker('boolean'), |
12472 | | func: createPrimitiveTypeChecker('function'), |
12473 | | number: createPrimitiveTypeChecker('number'), |
12474 | | object: createPrimitiveTypeChecker('object'), |
12475 | | string: createPrimitiveTypeChecker('string'), |
12476 | | symbol: createPrimitiveTypeChecker('symbol'), |
12477 | | |
12478 | | any: createAnyTypeChecker(), |
12479 | | arrayOf: createArrayOfTypeChecker, |
12480 | | element: createElementTypeChecker(), |
12481 | | instanceOf: createInstanceTypeChecker, |
12482 | | node: createNodeChecker(), |
12483 | | objectOf: createObjectOfTypeChecker, |
12484 | | oneOf: createEnumTypeChecker, |
12485 | | oneOfType: createUnionTypeChecker, |
12486 | | shape: createShapeTypeChecker, |
12487 | | exact: createStrictShapeTypeChecker, |
12488 | | }; |
12489 | | |
12490 | | /** |
12491 | | * inlined Object.is polyfill to avoid requiring consumers ship their own |
12492 | | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
12493 | | */ |
12494 | | /*eslint-disable no-self-compare*/ |
12495 | | function is(x, y) { |
12496 | | // SameValue algorithm |
12497 | | if (x === y) { |
12498 | | // Steps 1-5, 7-10 |
12499 | | // Steps 6.b-6.e: +0 != -0 |
12500 | | return x !== 0 || 1 / x === 1 / y; |
12501 | | } else { |
12502 | | // Step 6.a: NaN == NaN |
12503 | | return x !== x && y !== y; |
12504 | | } |
12505 | | } |
12506 | | /*eslint-enable no-self-compare*/ |
12507 | | |
12508 | | /** |
12509 | | * We use an Error-like object for backward compatibility as people may call |
12510 | | * PropTypes directly and inspect their output. However, we don't use real |
12511 | | * Errors anymore. We don't inspect their stack anyway, and creating them |
12512 | | * is prohibitively expensive if they are created too often, such as what |
12513 | | * happens in oneOfType() for any type before the one that matched. |
12514 | | */ |
12515 | | function PropTypeError(message) { |
12516 | | this.message = message; |
12517 | | this.stack = ''; |
12518 | | } |
12519 | | // Make `instanceof Error` still work for returned errors. |
12520 | | PropTypeError.prototype = Error.prototype; |
12521 | | |
12522 | | function createChainableTypeChecker(validate) { |
12523 | | if (true) { |
12524 | | var manualPropTypeCallCache = {}; |
12525 | | var manualPropTypeWarningCount = 0; |
12526 | | } |
12527 | | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
12528 | | componentName = componentName || ANONYMOUS; |
12529 | | propFullName = propFullName || propName; |
12530 | | |
12531 | | if (secret !== ReactPropTypesSecret) { |
12532 | | if (throwOnDirectAccess) { |
12533 | | // New behavior only for users of `prop-types` package |
12534 | | var err = new Error( |
12535 | | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
12536 | | 'Use `PropTypes.checkPropTypes()` to call them. ' + |
12537 | | 'Read more at http://fb.me/use-check-prop-types' |
12538 | | ); |
12539 | | err.name = 'Invariant Violation'; |
12540 | | throw err; |
12541 | | } else if (("development") !== 'production' && typeof console !== 'undefined') { |
12542 | | // Old behavior for people using React.PropTypes |
12543 | | var cacheKey = componentName + ':' + propName; |
12544 | | if ( |
12545 | | !manualPropTypeCallCache[cacheKey] && |
12546 | | // Avoid spamming the console because they are often not actionable except for lib authors |
12547 | | manualPropTypeWarningCount < 3 |
12548 | | ) { |
12549 | | printWarning( |
12550 | | 'You are manually calling a React.PropTypes validation ' + |
12551 | | 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
12552 | | 'and will throw in the standalone `prop-types` package. ' + |
12553 | | 'You may be seeing this warning due to a third-party PropTypes ' + |
12554 | | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
12555 | | ); |
12556 | | manualPropTypeCallCache[cacheKey] = true; |
12557 | | manualPropTypeWarningCount++; |
12558 | | } |
12559 | | } |
12560 | | } |
12561 | | if (props[propName] == null) { |
12562 | | if (isRequired) { |
12563 | | if (props[propName] === null) { |
12564 | | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
12565 | | } |
12566 | | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
12567 | | } |
12568 | | return null; |
12569 | | } else { |
12570 | | return validate(props, propName, componentName, location, propFullName); |
12571 | | } |
12572 | | } |
12573 | | |
12574 | | var chainedCheckType = checkType.bind(null, false); |
12575 | | chainedCheckType.isRequired = checkType.bind(null, true); |
12576 | | |
12577 | | return chainedCheckType; |
12578 | | } |
12579 | | |
12580 | | function createPrimitiveTypeChecker(expectedType) { |
12581 | | function validate(props, propName, componentName, location, propFullName, secret) { |
12582 | | var propValue = props[propName]; |
12583 | | var propType = getPropType(propValue); |
12584 | | if (propType !== expectedType) { |
12585 | | // `propValue` being instance of, say, date/regexp, pass the 'object' |
12586 | | // check, but we can offer a more precise error message here rather than |
12587 | | // 'of type `object`'. |
12588 | | var preciseType = getPreciseType(propValue); |
12589 | | |
12590 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); |
12591 | | } |
12592 | | return null; |
12593 | | } |
12594 | | return createChainableTypeChecker(validate); |
12595 | | } |
12596 | | |
12597 | | function createAnyTypeChecker() { |
12598 | | return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
12599 | | } |
12600 | | |
12601 | | function createArrayOfTypeChecker(typeChecker) { |
12602 | | function validate(props, propName, componentName, location, propFullName) { |
12603 | | if (typeof typeChecker !== 'function') { |
12604 | | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
12605 | | } |
12606 | | var propValue = props[propName]; |
12607 | | if (!Array.isArray(propValue)) { |
12608 | | var propType = getPropType(propValue); |
12609 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
12610 | | } |
12611 | | for (var i = 0; i < propValue.length; i++) { |
12612 | | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
12613 | | if (error instanceof Error) { |
12614 | | return error; |
12615 | | } |
12616 | | } |
12617 | | return null; |
12618 | | } |
12619 | | return createChainableTypeChecker(validate); |
12620 | | } |
12621 | | |
12622 | | function createElementTypeChecker() { |
12623 | | function validate(props, propName, componentName, location, propFullName) { |
12624 | | var propValue = props[propName]; |
12625 | | if (!isValidElement(propValue)) { |
12626 | | var propType = getPropType(propValue); |
12627 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
12628 | | } |
12629 | | return null; |
12630 | | } |
12631 | | return createChainableTypeChecker(validate); |
12632 | | } |
12633 | | |
12634 | | function createInstanceTypeChecker(expectedClass) { |
12635 | | function validate(props, propName, componentName, location, propFullName) { |
12636 | | if (!(props[propName] instanceof expectedClass)) { |
12637 | | var expectedClassName = expectedClass.name || ANONYMOUS; |
12638 | | var actualClassName = getClassName(props[propName]); |
12639 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
12640 | | } |
12641 | | return null; |
12642 | | } |
12643 | | return createChainableTypeChecker(validate); |
12644 | | } |
12645 | | |
12646 | | function createEnumTypeChecker(expectedValues) { |
12647 | | if (!Array.isArray(expectedValues)) { |
12648 | | true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0; |
12649 | | return emptyFunctionThatReturnsNull; |
12650 | | } |
12651 | | |
12652 | | function validate(props, propName, componentName, location, propFullName) { |
12653 | | var propValue = props[propName]; |
12654 | | for (var i = 0; i < expectedValues.length; i++) { |
12655 | | if (is(propValue, expectedValues[i])) { |
12656 | | return null; |
12657 | | } |
12658 | | } |
12659 | | |
12660 | | var valuesString = JSON.stringify(expectedValues); |
12661 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
12662 | | } |
12663 | | return createChainableTypeChecker(validate); |
12664 | | } |
12665 | | |
12666 | | function createObjectOfTypeChecker(typeChecker) { |
12667 | | function validate(props, propName, componentName, location, propFullName) { |
12668 | | if (typeof typeChecker !== 'function') { |
12669 | | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
12670 | | } |
12671 | | var propValue = props[propName]; |
12672 | | var propType = getPropType(propValue); |
12673 | | if (propType !== 'object') { |
12674 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
12675 | | } |
12676 | | for (var key in propValue) { |
12677 | | if (propValue.hasOwnProperty(key)) { |
12678 | | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
12679 | | if (error instanceof Error) { |
12680 | | return error; |
12681 | | } |
12682 | | } |
12683 | | } |
12684 | | return null; |
12685 | | } |
12686 | | return createChainableTypeChecker(validate); |
12687 | | } |
12688 | | |
12689 | | function createUnionTypeChecker(arrayOfTypeCheckers) { |
12690 | | if (!Array.isArray(arrayOfTypeCheckers)) { |
12691 | | true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; |
12692 | | return emptyFunctionThatReturnsNull; |
12693 | | } |
12694 | | |
12695 | | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
12696 | | var checker = arrayOfTypeCheckers[i]; |
12697 | | if (typeof checker !== 'function') { |
12698 | | printWarning( |
12699 | | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
12700 | | 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
12701 | | ); |
12702 | | return emptyFunctionThatReturnsNull; |
12703 | | } |
12704 | | } |
12705 | | |
12706 | | function validate(props, propName, componentName, location, propFullName) { |
12707 | | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
12708 | | var checker = arrayOfTypeCheckers[i]; |
12709 | | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { |
12710 | | return null; |
12711 | | } |
12712 | | } |
12713 | | |
12714 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); |
12715 | | } |
12716 | | return createChainableTypeChecker(validate); |
12717 | | } |
12718 | | |
12719 | | function createNodeChecker() { |
12720 | | function validate(props, propName, componentName, location, propFullName) { |
12721 | | if (!isNode(props[propName])) { |
12722 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
12723 | | } |
12724 | | return null; |
12725 | | } |
12726 | | return createChainableTypeChecker(validate); |
12727 | | } |
12728 | | |
12729 | | function createShapeTypeChecker(shapeTypes) { |
12730 | | function validate(props, propName, componentName, location, propFullName) { |
12731 | | var propValue = props[propName]; |
12732 | | var propType = getPropType(propValue); |
12733 | | if (propType !== 'object') { |
12734 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
12735 | | } |
12736 | | for (var key in shapeTypes) { |
12737 | | var checker = shapeTypes[key]; |
12738 | | if (!checker) { |
12739 | | continue; |
12740 | | } |
12741 | | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
12742 | | if (error) { |
12743 | | return error; |
12744 | | } |
12745 | | } |
12746 | | return null; |
12747 | | } |
12748 | | return createChainableTypeChecker(validate); |
12749 | | } |
12750 | | |
12751 | | function createStrictShapeTypeChecker(shapeTypes) { |
12752 | | function validate(props, propName, componentName, location, propFullName) { |
12753 | | var propValue = props[propName]; |
12754 | | var propType = getPropType(propValue); |
12755 | | if (propType !== 'object') { |
12756 | | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
12757 | | } |
12758 | | // We need to check all keys in case some are required but missing from |
12759 | | // props. |
12760 | | var allKeys = assign({}, props[propName], shapeTypes); |
12761 | | for (var key in allKeys) { |
12762 | | var checker = shapeTypes[key]; |
12763 | | if (!checker) { |
12764 | | return new PropTypeError( |
12765 | | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
12766 | | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
12767 | | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
12768 | | ); |
12769 | | } |
12770 | | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
12771 | | if (error) { |
12772 | | return error; |
12773 | | } |
12774 | | } |
12775 | | return null; |
12776 | | } |
12777 | | |
12778 | | return createChainableTypeChecker(validate); |
12779 | | } |
12780 | | |
12781 | | function isNode(propValue) { |
12782 | | switch (typeof propValue) { |
12783 | | case 'number': |
12784 | | case 'string': |
12785 | | case 'undefined': |
12786 | | return true; |
12787 | | case 'boolean': |
12788 | | return !propValue; |
12789 | | case 'object': |
12790 | | if (Array.isArray(propValue)) { |
12791 | | return propValue.every(isNode); |
12792 | | } |
12793 | | if (propValue === null || isValidElement(propValue)) { |
12794 | | return true; |
12795 | | } |
12796 | | |
12797 | | var iteratorFn = getIteratorFn(propValue); |
12798 | | if (iteratorFn) { |
12799 | | var iterator = iteratorFn.call(propValue); |
12800 | | var step; |
12801 | | if (iteratorFn !== propValue.entries) { |
12802 | | while (!(step = iterator.next()).done) { |
12803 | | if (!isNode(step.value)) { |
12804 | | return false; |
12805 | | } |
12806 | | } |
12807 | | } else { |
12808 | | // Iterator will provide entry [k,v] tuples rather than values. |
12809 | | while (!(step = iterator.next()).done) { |
12810 | | var entry = step.value; |
12811 | | if (entry) { |
12812 | | if (!isNode(entry[1])) { |
12813 | | return false; |
12814 | | } |
12815 | | } |
12816 | | } |
12817 | | } |
12818 | | } else { |
12819 | | return false; |
12820 | | } |
12821 | | |
12822 | | return true; |
12823 | | default: |
12824 | | return false; |
12825 | | } |
12826 | | } |
12827 | | |
12828 | | function isSymbol(propType, propValue) { |
12829 | | // Native Symbol. |
12830 | | if (propType === 'symbol') { |
12831 | | return true; |
12832 | | } |
12833 | | |
12834 | | // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
12835 | | if (propValue['@@toStringTag'] === 'Symbol') { |
12836 | | return true; |
12837 | | } |
12838 | | |
12839 | | // Fallback for non-spec compliant Symbols which are polyfilled. |
12840 | | if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
12841 | | return true; |
12842 | | } |
12843 | | |
12844 | | return false; |
12845 | | } |
12846 | | |
12847 | | // Equivalent of `typeof` but with special handling for array and regexp. |
12848 | | function getPropType(propValue) { |
12849 | | var propType = typeof propValue; |
12850 | | if (Array.isArray(propValue)) { |
12851 | | return 'array'; |
12852 | | } |
12853 | | if (propValue instanceof RegExp) { |
12854 | | // Old webkits (at least until Android 4.0) return 'function' rather than |
12855 | | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
12856 | | // passes PropTypes.object. |
12857 | | return 'object'; |
12858 | | } |
12859 | | if (isSymbol(propType, propValue)) { |
12860 | | return 'symbol'; |
12861 | | } |
12862 | | return propType; |
12863 | | } |
12864 | | |
12865 | | // This handles more types than `getPropType`. Only used for error messages. |
12866 | | // See `createPrimitiveTypeChecker`. |
12867 | | function getPreciseType(propValue) { |
12868 | | if (typeof propValue === 'undefined' || propValue === null) { |
12869 | | return '' + propValue; |
12870 | | } |
12871 | | var propType = getPropType(propValue); |
12872 | | if (propType === 'object') { |
12873 | | if (propValue instanceof Date) { |
12874 | | return 'date'; |
12875 | | } else if (propValue instanceof RegExp) { |
12876 | | return 'regexp'; |
12877 | | } |
12878 | | } |
12879 | | return propType; |
12880 | | } |
12881 | | |
12882 | | // Returns a string that is postfixed to a warning about an invalid type. |
12883 | | // For example, "undefined" or "of type array" |
12884 | | function getPostfixForTypeWarning(value) { |
12885 | | var type = getPreciseType(value); |
12886 | | switch (type) { |
12887 | | case 'array': |
12888 | | case 'object': |
12889 | | return 'an ' + type; |
12890 | | case 'boolean': |
12891 | | case 'date': |
12892 | | case 'regexp': |
12893 | | return 'a ' + type; |
12894 | | default: |
12895 | | return type; |
12896 | | } |
12897 | | } |
12898 | | |
12899 | | // Returns class name of the object, if any. |
12900 | | function getClassName(propValue) { |
12901 | | if (!propValue.constructor || !propValue.constructor.name) { |
12902 | | return ANONYMOUS; |
12903 | | } |
12904 | | return propValue.constructor.name; |
12905 | | } |
12906 | | |
12907 | | ReactPropTypes.checkPropTypes = checkPropTypes; |
12908 | | ReactPropTypes.PropTypes = ReactPropTypes; |
12909 | | |
12910 | | return ReactPropTypes; |
12911 | | }; |
12912 | | |
12913 | | |
12914 | | /***/ }), |
12915 | | /* 362 */ |
12916 | | /***/ (function(module, exports) { |
12917 | | |
12918 | | /** |
12919 | | * Copyright (c) 2013-present, Facebook, Inc. |
12920 | | * |
12921 | | * This source code is licensed under the MIT license found in the |
12922 | | * LICENSE file in the root directory of this source tree. |
12923 | | */ |
12924 | | |
12925 | | 'use strict'; |
12926 | | |
12927 | | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
12928 | | |
12929 | | module.exports = ReactPropTypesSecret; |
12930 | | |
12931 | | |
12932 | | /***/ }), |
12933 | | /* 363 */ |
12934 | | /***/ (function(module, exports, __webpack_require__) { |
12935 | | |
12936 | | /** |
12937 | | * Copyright (c) 2013-present, Facebook, Inc. |
12938 | | * |
12939 | | * This source code is licensed under the MIT license found in the |
12940 | | * LICENSE file in the root directory of this source tree. |
12941 | | */ |
12942 | | |
12943 | | 'use strict'; |
12944 | | |
12945 | | var printWarning = function() {}; |
12946 | | |
12947 | | if (true) { |
12948 | | var ReactPropTypesSecret = __webpack_require__(362); |
12949 | | var loggedTypeFailures = {}; |
12950 | | |
12951 | | printWarning = function(text) { |
12952 | | var message = 'Warning: ' + text; |
12953 | | if (typeof console !== 'undefined') { |
12954 | | console.error(message); |
12955 | | } |
12956 | | try { |
12957 | | // --- Welcome to debugging React --- |
12958 | | // This error was thrown as a convenience so that you can use this stack |
12959 | | // to find the callsite that caused this warning to fire. |
12960 | | throw new Error(message); |
12961 | | } catch (x) {} |
12962 | | }; |
12963 | | } |
12964 | | |
12965 | | /** |
12966 | | * Assert that the values match with the type specs. |
12967 | | * Error messages are memorized and will only be shown once. |
12968 | | * |
12969 | | * @param {object} typeSpecs Map of name to a ReactPropType |
12970 | | * @param {object} values Runtime values that need to be type-checked |
12971 | | * @param {string} location e.g. "prop", "context", "child context" |
12972 | | * @param {string} componentName Name of the component for error messages. |
12973 | | * @param {?Function} getStack Returns the component stack. |
12974 | | * @private |
12975 | | */ |
12976 | | function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
12977 | | if (true) { |
12978 | | for (var typeSpecName in typeSpecs) { |
12979 | | if (typeSpecs.hasOwnProperty(typeSpecName)) { |
12980 | | var error; |
12981 | | // Prop type validation may throw. In case they do, we don't want to |
12982 | | // fail the render phase where it didn't fail before. So we log it. |
12983 | | // After these have been cleaned up, we'll let them throw. |
12984 | | try { |
12985 | | // This is intentionally an invariant that gets caught. It's the same |
12986 | | // behavior as without this statement except with a better message. |
12987 | | if (typeof typeSpecs[typeSpecName] !== 'function') { |
12988 | | var err = Error( |
12989 | | (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
12990 | | 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' |
12991 | | ); |
12992 | | err.name = 'Invariant Violation'; |
12993 | | throw err; |
12994 | | } |
12995 | | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
12996 | | } catch (ex) { |
12997 | | error = ex; |
12998 | | } |
12999 | | if (error && !(error instanceof Error)) { |
13000 | | printWarning( |
13001 | | (componentName || 'React class') + ': type specification of ' + |
13002 | | location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
13003 | | 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
13004 | | 'You may have forgotten to pass an argument to the type checker ' + |
13005 | | 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
13006 | | 'shape all require an argument).' |
13007 | | ) |
13008 | | |
13009 | | } |
13010 | | if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
13011 | | // Only monitor this failure once because there tends to be a lot of the |
13012 | | // same error. |
13013 | | loggedTypeFailures[error.message] = true; |
13014 | | |
13015 | | var stack = getStack ? getStack() : ''; |
13016 | | |
13017 | | printWarning( |
13018 | | 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
13019 | | ); |
13020 | | } |
13021 | | } |
13022 | | } |
13023 | | } |
13024 | | } |
13025 | | |
13026 | | module.exports = checkPropTypes; |
13027 | | |
13028 | | |
13029 | | /***/ }), |
13030 | | /* 364 */ |
13031 | | /***/ (function(module, exports) { |
13032 | | |
13033 | | /** |
13034 | | * Copyright (c) 2013-present, Facebook, Inc. |
13035 | | * |
13036 | | * This source code is licensed under the MIT license found in the |
13037 | | * LICENSE file in the root directory of this source tree. |
13038 | | * |
13039 | | */ |
13040 | | |
13041 | | 'use strict'; |
13042 | | |
13043 | | module.exports = '15.6.2'; |
13044 | | |
13045 | | /***/ }), |
13046 | | /* 365 */ |
13047 | | /***/ (function(module, exports, __webpack_require__) { |
13048 | | |
13049 | | /** |
13050 | | * Copyright (c) 2013-present, Facebook, Inc. |
13051 | | * |
13052 | | * This source code is licensed under the MIT license found in the |
13053 | | * LICENSE file in the root directory of this source tree. |
13054 | | * |
13055 | | */ |
13056 | | |
13057 | | 'use strict'; |
13058 | | |
13059 | | var _require = __webpack_require__(335), |
13060 | | Component = _require.Component; |
13061 | | |
13062 | | var _require2 = __webpack_require__(346), |
13063 | | isValidElement = _require2.isValidElement; |
13064 | | |
13065 | | var ReactNoopUpdateQueue = __webpack_require__(337); |
13066 | | var factory = __webpack_require__(366); |
13067 | | |
13068 | | module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); |
13069 | | |
13070 | | /***/ }), |
13071 | | /* 366 */ |
13072 | | /***/ (function(module, exports, __webpack_require__) { |
13073 | | |
13074 | | /** |
13075 | | * Copyright (c) 2013-present, Facebook, Inc. |
13076 | | * |
13077 | | * This source code is licensed under the MIT license found in the |
13078 | | * LICENSE file in the root directory of this source tree. |
13079 | | * |
13080 | | */ |
13081 | | |
13082 | | 'use strict'; |
13083 | | |
13084 | | var _assign = __webpack_require__(334); |
13085 | | |
13086 | | var emptyObject = __webpack_require__(341); |
13087 | | var _invariant = __webpack_require__(342); |
13088 | | |
13089 | | if (true) { |
13090 | | var warning = __webpack_require__(338); |
13091 | | } |
13092 | | |
13093 | | var MIXINS_KEY = 'mixins'; |
13094 | | |
13095 | | // Helper function to allow the creation of anonymous functions which do not |
13096 | | // have .name set to the name of the variable being assigned to. |
13097 | | function identity(fn) { |
13098 | | return fn; |
13099 | | } |
13100 | | |
13101 | | var ReactPropTypeLocationNames; |
13102 | | if (true) { |
13103 | | ReactPropTypeLocationNames = { |
13104 | | prop: 'prop', |
13105 | | context: 'context', |
13106 | | childContext: 'child context' |
13107 | | }; |
13108 | | } else { |
13109 | | ReactPropTypeLocationNames = {}; |
13110 | | } |
13111 | | |
13112 | | function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { |
13113 | | /** |
13114 | | * Policies that describe methods in `ReactClassInterface`. |
13115 | | */ |
13116 | | |
13117 | | var injectedMixins = []; |
13118 | | |
13119 | | /** |
13120 | | * Composite components are higher-level components that compose other composite |
13121 | | * or host components. |
13122 | | * |
13123 | | * To create a new type of `ReactClass`, pass a specification of |
13124 | | * your new class to `React.createClass`. The only requirement of your class |
13125 | | * specification is that you implement a `render` method. |
13126 | | * |
13127 | | * var MyComponent = React.createClass({ |
13128 | | * render: function() { |
13129 | | * return <div>Hello World</div>; |
13130 | | * } |
13131 | | * }); |
13132 | | * |
13133 | | * The class specification supports a specific protocol of methods that have |
13134 | | * special meaning (e.g. `render`). See `ReactClassInterface` for |
13135 | | * more the comprehensive protocol. Any other properties and methods in the |
13136 | | * class specification will be available on the prototype. |
13137 | | * |
13138 | | * @interface ReactClassInterface |
13139 | | * @internal |
13140 | | */ |
13141 | | var ReactClassInterface = { |
13142 | | /** |
13143 | | * An array of Mixin objects to include when defining your component. |
13144 | | * |
13145 | | * @type {array} |
13146 | | * @optional |
13147 | | */ |
13148 | | mixins: 'DEFINE_MANY', |
13149 | | |
13150 | | /** |
13151 | | * An object containing properties and methods that should be defined on |
13152 | | * the component's constructor instead of its prototype (static methods). |
13153 | | * |
13154 | | * @type {object} |
13155 | | * @optional |
13156 | | */ |
13157 | | statics: 'DEFINE_MANY', |
13158 | | |
13159 | | /** |
13160 | | * Definition of prop types for this component. |
13161 | | * |
13162 | | * @type {object} |
13163 | | * @optional |
13164 | | */ |
13165 | | propTypes: 'DEFINE_MANY', |
13166 | | |
13167 | | /** |
13168 | | * Definition of context types for this component. |
13169 | | * |
13170 | | * @type {object} |
13171 | | * @optional |
13172 | | */ |
13173 | | contextTypes: 'DEFINE_MANY', |
13174 | | |
13175 | | /** |
13176 | | * Definition of context types this component sets for its children. |
13177 | | * |
13178 | | * @type {object} |
13179 | | * @optional |
13180 | | */ |
13181 | | childContextTypes: 'DEFINE_MANY', |
13182 | | |
13183 | | // ==== Definition methods ==== |
13184 | | |
13185 | | /** |
13186 | | * Invoked when the component is mounted. Values in the mapping will be set on |
13187 | | * `this.props` if that prop is not specified (i.e. using an `in` check). |
13188 | | * |
13189 | | * This method is invoked before `getInitialState` and therefore cannot rely |
13190 | | * on `this.state` or use `this.setState`. |
13191 | | * |
13192 | | * @return {object} |
13193 | | * @optional |
13194 | | */ |
13195 | | getDefaultProps: 'DEFINE_MANY_MERGED', |
13196 | | |
13197 | | /** |
13198 | | * Invoked once before the component is mounted. The return value will be used |
13199 | | * as the initial value of `this.state`. |
13200 | | * |
13201 | | * getInitialState: function() { |
13202 | | * return { |
13203 | | * isOn: false, |
13204 | | * fooBaz: new BazFoo() |
13205 | | * } |
13206 | | * } |
13207 | | * |
13208 | | * @return {object} |
13209 | | * @optional |
13210 | | */ |
13211 | | getInitialState: 'DEFINE_MANY_MERGED', |
13212 | | |
13213 | | /** |
13214 | | * @return {object} |
13215 | | * @optional |
13216 | | */ |
13217 | | getChildContext: 'DEFINE_MANY_MERGED', |
13218 | | |
13219 | | /** |
13220 | | * Uses props from `this.props` and state from `this.state` to render the |
13221 | | * structure of the component. |
13222 | | * |
13223 | | * No guarantees are made about when or how often this method is invoked, so |
13224 | | * it must not have side effects. |
13225 | | * |
13226 | | * render: function() { |
13227 | | * var name = this.props.name; |
13228 | | * return <div>Hello, {name}!</div>; |
13229 | | * } |
13230 | | * |
13231 | | * @return {ReactComponent} |
13232 | | * @required |
13233 | | */ |
13234 | | render: 'DEFINE_ONCE', |
13235 | | |
13236 | | // ==== Delegate methods ==== |
13237 | | |
13238 | | /** |
13239 | | * Invoked when the component is initially created and about to be mounted. |
13240 | | * This may have side effects, but any external subscriptions or data created |
13241 | | * by this method must be cleaned up in `componentWillUnmount`. |
13242 | | * |
13243 | | * @optional |
13244 | | */ |
13245 | | componentWillMount: 'DEFINE_MANY', |
13246 | | |
13247 | | /** |
13248 | | * Invoked when the component has been mounted and has a DOM representation. |
13249 | | * However, there is no guarantee that the DOM node is in the document. |
13250 | | * |
13251 | | * Use this as an opportunity to operate on the DOM when the component has |
13252 | | * been mounted (initialized and rendered) for the first time. |
13253 | | * |
13254 | | * @param {DOMElement} rootNode DOM element representing the component. |
13255 | | * @optional |
13256 | | */ |
13257 | | componentDidMount: 'DEFINE_MANY', |
13258 | | |
13259 | | /** |
13260 | | * Invoked before the component receives new props. |
13261 | | * |
13262 | | * Use this as an opportunity to react to a prop transition by updating the |
13263 | | * state using `this.setState`. Current props are accessed via `this.props`. |
13264 | | * |
13265 | | * componentWillReceiveProps: function(nextProps, nextContext) { |
13266 | | * this.setState({ |
13267 | | * likesIncreasing: nextProps.likeCount > this.props.likeCount |
13268 | | * }); |
13269 | | * } |
13270 | | * |
13271 | | * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop |
13272 | | * transition may cause a state change, but the opposite is not true. If you |
13273 | | * need it, you are probably looking for `componentWillUpdate`. |
13274 | | * |
13275 | | * @param {object} nextProps |
13276 | | * @optional |
13277 | | */ |
13278 | | componentWillReceiveProps: 'DEFINE_MANY', |
13279 | | |
13280 | | /** |
13281 | | * Invoked while deciding if the component should be updated as a result of |
13282 | | * receiving new props, state and/or context. |
13283 | | * |
13284 | | * Use this as an opportunity to `return false` when you're certain that the |
13285 | | * transition to the new props/state/context will not require a component |
13286 | | * update. |
13287 | | * |
13288 | | * shouldComponentUpdate: function(nextProps, nextState, nextContext) { |
13289 | | * return !equal(nextProps, this.props) || |
13290 | | * !equal(nextState, this.state) || |
13291 | | * !equal(nextContext, this.context); |
13292 | | * } |
13293 | | * |
13294 | | * @param {object} nextProps |
13295 | | * @param {?object} nextState |
13296 | | * @param {?object} nextContext |
13297 | | * @return {boolean} True if the component should update. |
13298 | | * @optional |
13299 | | */ |
13300 | | shouldComponentUpdate: 'DEFINE_ONCE', |
13301 | | |
13302 | | /** |
13303 | | * Invoked when the component is about to update due to a transition from |
13304 | | * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` |
13305 | | * and `nextContext`. |
13306 | | * |
13307 | | * Use this as an opportunity to perform preparation before an update occurs. |
13308 | | * |
13309 | | * NOTE: You **cannot** use `this.setState()` in this method. |
13310 | | * |
13311 | | * @param {object} nextProps |
13312 | | * @param {?object} nextState |
13313 | | * @param {?object} nextContext |
13314 | | * @param {ReactReconcileTransaction} transaction |
13315 | | * @optional |
13316 | | */ |
13317 | | componentWillUpdate: 'DEFINE_MANY', |
13318 | | |
13319 | | /** |
13320 | | * Invoked when the component's DOM representation has been updated. |
13321 | | * |
13322 | | * Use this as an opportunity to operate on the DOM when the component has |
13323 | | * been updated. |
13324 | | * |
13325 | | * @param {object} prevProps |
13326 | | * @param {?object} prevState |
13327 | | * @param {?object} prevContext |
13328 | | * @param {DOMElement} rootNode DOM element representing the component. |
13329 | | * @optional |
13330 | | */ |
13331 | | componentDidUpdate: 'DEFINE_MANY', |
13332 | | |
13333 | | /** |
13334 | | * Invoked when the component is about to be removed from its parent and have |
13335 | | * its DOM representation destroyed. |
13336 | | * |
13337 | | * Use this as an opportunity to deallocate any external resources. |
13338 | | * |
13339 | | * NOTE: There is no `componentDidUnmount` since your component will have been |
13340 | | * destroyed by that point. |
13341 | | * |
13342 | | * @optional |
13343 | | */ |
13344 | | componentWillUnmount: 'DEFINE_MANY', |
13345 | | |
13346 | | /** |
13347 | | * Replacement for (deprecated) `componentWillMount`. |
13348 | | * |
13349 | | * @optional |
13350 | | */ |
13351 | | UNSAFE_componentWillMount: 'DEFINE_MANY', |
13352 | | |
13353 | | /** |
13354 | | * Replacement for (deprecated) `componentWillReceiveProps`. |
13355 | | * |
13356 | | * @optional |
13357 | | */ |
13358 | | UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', |
13359 | | |
13360 | | /** |
13361 | | * Replacement for (deprecated) `componentWillUpdate`. |
13362 | | * |
13363 | | * @optional |
13364 | | */ |
13365 | | UNSAFE_componentWillUpdate: 'DEFINE_MANY', |
13366 | | |
13367 | | // ==== Advanced methods ==== |
13368 | | |
13369 | | /** |
13370 | | * Updates the component's currently mounted DOM representation. |
13371 | | * |
13372 | | * By default, this implements React's rendering and reconciliation algorithm. |
13373 | | * Sophisticated clients may wish to override this. |
13374 | | * |
13375 | | * @param {ReactReconcileTransaction} transaction |
13376 | | * @internal |
13377 | | * @overridable |
13378 | | */ |
13379 | | updateComponent: 'OVERRIDE_BASE' |
13380 | | }; |
13381 | | |
13382 | | /** |
13383 | | * Similar to ReactClassInterface but for static methods. |
13384 | | */ |
13385 | | var ReactClassStaticInterface = { |
13386 | | /** |
13387 | | * This method is invoked after a component is instantiated and when it |
13388 | | * receives new props. Return an object to update state in response to |
13389 | | * prop changes. Return null to indicate no change to state. |
13390 | | * |
13391 | | * If an object is returned, its keys will be merged into the existing state. |
13392 | | * |
13393 | | * @return {object || null} |
13394 | | * @optional |
13395 | | */ |
13396 | | getDerivedStateFromProps: 'DEFINE_MANY_MERGED' |
13397 | | }; |
13398 | | |
13399 | | /** |
13400 | | * Mapping from class specification keys to special processing functions. |
13401 | | * |
13402 | | * Although these are declared like instance properties in the specification |
13403 | | * when defining classes using `React.createClass`, they are actually static |
13404 | | * and are accessible on the constructor instead of the prototype. Despite |
13405 | | * being static, they must be defined outside of the "statics" key under |
13406 | | * which all other static methods are defined. |
13407 | | */ |
13408 | | var RESERVED_SPEC_KEYS = { |
13409 | | displayName: function(Constructor, displayName) { |
13410 | | Constructor.displayName = displayName; |
13411 | | }, |
13412 | | mixins: function(Constructor, mixins) { |
13413 | | if (mixins) { |
13414 | | for (var i = 0; i < mixins.length; i++) { |
13415 | | mixSpecIntoComponent(Constructor, mixins[i]); |
13416 | | } |
13417 | | } |
13418 | | }, |
13419 | | childContextTypes: function(Constructor, childContextTypes) { |
13420 | | if (true) { |
13421 | | validateTypeDef(Constructor, childContextTypes, 'childContext'); |
13422 | | } |
13423 | | Constructor.childContextTypes = _assign( |
13424 | | {}, |
13425 | | Constructor.childContextTypes, |
13426 | | childContextTypes |
13427 | | ); |
13428 | | }, |
13429 | | contextTypes: function(Constructor, contextTypes) { |
13430 | | if (true) { |
13431 | | validateTypeDef(Constructor, contextTypes, 'context'); |
13432 | | } |
13433 | | Constructor.contextTypes = _assign( |
13434 | | {}, |
13435 | | Constructor.contextTypes, |
13436 | | contextTypes |
13437 | | ); |
13438 | | }, |
13439 | | /** |
13440 | | * Special case getDefaultProps which should move into statics but requires |
13441 | | * automatic merging. |
13442 | | */ |
13443 | | getDefaultProps: function(Constructor, getDefaultProps) { |
13444 | | if (Constructor.getDefaultProps) { |
13445 | | Constructor.getDefaultProps = createMergedResultFunction( |
13446 | | Constructor.getDefaultProps, |
13447 | | getDefaultProps |
13448 | | ); |
13449 | | } else { |
13450 | | Constructor.getDefaultProps = getDefaultProps; |
13451 | | } |
13452 | | }, |
13453 | | propTypes: function(Constructor, propTypes) { |
13454 | | if (true) { |
13455 | | validateTypeDef(Constructor, propTypes, 'prop'); |
13456 | | } |
13457 | | Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); |
13458 | | }, |
13459 | | statics: function(Constructor, statics) { |
13460 | | mixStaticSpecIntoComponent(Constructor, statics); |
13461 | | }, |
13462 | | autobind: function() {} |
13463 | | }; |
13464 | | |
13465 | | function validateTypeDef(Constructor, typeDef, location) { |
13466 | | for (var propName in typeDef) { |
13467 | | if (typeDef.hasOwnProperty(propName)) { |
13468 | | // use a warning instead of an _invariant so components |
13469 | | // don't show up in prod but only in __DEV__ |
13470 | | if (true) { |
13471 | | warning( |
13472 | | typeof typeDef[propName] === 'function', |
13473 | | '%s: %s type `%s` is invalid; it must be a function, usually from ' + |
13474 | | 'React.PropTypes.', |
13475 | | Constructor.displayName || 'ReactClass', |
13476 | | ReactPropTypeLocationNames[location], |
13477 | | propName |
13478 | | ); |
13479 | | } |
13480 | | } |
13481 | | } |
13482 | | } |
13483 | | |
13484 | | function validateMethodOverride(isAlreadyDefined, name) { |
13485 | | var specPolicy = ReactClassInterface.hasOwnProperty(name) |
13486 | | ? ReactClassInterface[name] |
13487 | | : null; |
13488 | | |
13489 | | // Disallow overriding of base class methods unless explicitly allowed. |
13490 | | if (ReactClassMixin.hasOwnProperty(name)) { |
13491 | | _invariant( |
13492 | | specPolicy === 'OVERRIDE_BASE', |
13493 | | 'ReactClassInterface: You are attempting to override ' + |
13494 | | '`%s` from your class specification. Ensure that your method names ' + |
13495 | | 'do not overlap with React methods.', |
13496 | | name |
13497 | | ); |
13498 | | } |
13499 | | |
13500 | | // Disallow defining methods more than once unless explicitly allowed. |
13501 | | if (isAlreadyDefined) { |
13502 | | _invariant( |
13503 | | specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', |
13504 | | 'ReactClassInterface: You are attempting to define ' + |
13505 | | '`%s` on your component more than once. This conflict may be due ' + |
13506 | | 'to a mixin.', |
13507 | | name |
13508 | | ); |
13509 | | } |
13510 | | } |
13511 | | |
13512 | | /** |
13513 | | * Mixin helper which handles policy validation and reserved |
13514 | | * specification keys when building React classes. |
13515 | | */ |
13516 | | function mixSpecIntoComponent(Constructor, spec) { |
13517 | | if (!spec) { |
13518 | | if (true) { |
13519 | | var typeofSpec = typeof spec; |
13520 | | var isMixinValid = typeofSpec === 'object' && spec !== null; |
13521 | | |
13522 | | if (true) { |
13523 | | warning( |
13524 | | isMixinValid, |
13525 | | "%s: You're attempting to include a mixin that is either null " + |
13526 | | 'or not an object. Check the mixins included by the component, ' + |
13527 | | 'as well as any mixins they include themselves. ' + |
13528 | | 'Expected object but got %s.', |
13529 | | Constructor.displayName || 'ReactClass', |
13530 | | spec === null ? null : typeofSpec |
13531 | | ); |
13532 | | } |
13533 | | } |
13534 | | |
13535 | | return; |
13536 | | } |
13537 | | |
13538 | | _invariant( |
13539 | | typeof spec !== 'function', |
13540 | | "ReactClass: You're attempting to " + |
13541 | | 'use a component class or function as a mixin. Instead, just use a ' + |
13542 | | 'regular object.' |
13543 | | ); |
13544 | | _invariant( |
13545 | | !isValidElement(spec), |
13546 | | "ReactClass: You're attempting to " + |
13547 | | 'use a component as a mixin. Instead, just use a regular object.' |
13548 | | ); |
13549 | | |
13550 | | var proto = Constructor.prototype; |
13551 | | var autoBindPairs = proto.__reactAutoBindPairs; |
13552 | | |
13553 | | // By handling mixins before any other properties, we ensure the same |
13554 | | // chaining order is applied to methods with DEFINE_MANY policy, whether |
13555 | | // mixins are listed before or after these methods in the spec. |
13556 | | if (spec.hasOwnProperty(MIXINS_KEY)) { |
13557 | | RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); |
13558 | | } |
13559 | | |
13560 | | for (var name in spec) { |
13561 | | if (!spec.hasOwnProperty(name)) { |
13562 | | continue; |
13563 | | } |
13564 | | |
13565 | | if (name === MIXINS_KEY) { |
13566 | | // We have already handled mixins in a special case above. |
13567 | | continue; |
13568 | | } |
13569 | | |
13570 | | var property = spec[name]; |
13571 | | var isAlreadyDefined = proto.hasOwnProperty(name); |
13572 | | validateMethodOverride(isAlreadyDefined, name); |
13573 | | |
13574 | | if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { |
13575 | | RESERVED_SPEC_KEYS[name](Constructor, property); |
13576 | | } else { |
13577 | | // Setup methods on prototype: |
13578 | | // The following member methods should not be automatically bound: |
13579 | | // 1. Expected ReactClass methods (in the "interface"). |
13580 | | // 2. Overridden methods (that were mixed in). |
13581 | | var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); |
13582 | | var isFunction = typeof property === 'function'; |
13583 | | var shouldAutoBind = |
13584 | | isFunction && |
13585 | | !isReactClassMethod && |
13586 | | !isAlreadyDefined && |
13587 | | spec.autobind !== false; |
13588 | | |
13589 | | if (shouldAutoBind) { |
13590 | | autoBindPairs.push(name, property); |
13591 | | proto[name] = property; |
13592 | | } else { |
13593 | | if (isAlreadyDefined) { |
13594 | | var specPolicy = ReactClassInterface[name]; |
13595 | | |
13596 | | // These cases should already be caught by validateMethodOverride. |
13597 | | _invariant( |
13598 | | isReactClassMethod && |
13599 | | (specPolicy === 'DEFINE_MANY_MERGED' || |
13600 | | specPolicy === 'DEFINE_MANY'), |
13601 | | 'ReactClass: Unexpected spec policy %s for key %s ' + |
13602 | | 'when mixing in component specs.', |
13603 | | specPolicy, |
13604 | | name |
13605 | | ); |
13606 | | |
13607 | | // For methods which are defined more than once, call the existing |
13608 | | // methods before calling the new property, merging if appropriate. |
13609 | | if (specPolicy === 'DEFINE_MANY_MERGED') { |
13610 | | proto[name] = createMergedResultFunction(proto[name], property); |
13611 | | } else if (specPolicy === 'DEFINE_MANY') { |
13612 | | proto[name] = createChainedFunction(proto[name], property); |
13613 | | } |
13614 | | } else { |
13615 | | proto[name] = property; |
13616 | | if (true) { |
13617 | | // Add verbose displayName to the function, which helps when looking |
13618 | | // at profiling tools. |
13619 | | if (typeof property === 'function' && spec.displayName) { |
13620 | | proto[name].displayName = spec.displayName + '_' + name; |
13621 | | } |
13622 | | } |
13623 | | } |
13624 | | } |
13625 | | } |
13626 | | } |
13627 | | } |
13628 | | |
13629 | | function mixStaticSpecIntoComponent(Constructor, statics) { |
13630 | | if (!statics) { |
13631 | | return; |
13632 | | } |
13633 | | |
13634 | | for (var name in statics) { |
13635 | | var property = statics[name]; |
13636 | | if (!statics.hasOwnProperty(name)) { |
13637 | | continue; |
13638 | | } |
13639 | | |
13640 | | var isReserved = name in RESERVED_SPEC_KEYS; |
13641 | | _invariant( |
13642 | | !isReserved, |
13643 | | 'ReactClass: You are attempting to define a reserved ' + |
13644 | | 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + |
13645 | | 'as an instance property instead; it will still be accessible on the ' + |
13646 | | 'constructor.', |
13647 | | name |
13648 | | ); |
13649 | | |
13650 | | var isAlreadyDefined = name in Constructor; |
13651 | | if (isAlreadyDefined) { |
13652 | | var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) |
13653 | | ? ReactClassStaticInterface[name] |
13654 | | : null; |
13655 | | |
13656 | | _invariant( |
13657 | | specPolicy === 'DEFINE_MANY_MERGED', |
13658 | | 'ReactClass: You are attempting to define ' + |
13659 | | '`%s` on your component more than once. This conflict may be ' + |
13660 | | 'due to a mixin.', |
13661 | | name |
13662 | | ); |
13663 | | |
13664 | | Constructor[name] = createMergedResultFunction(Constructor[name], property); |
13665 | | |
13666 | | return; |
13667 | | } |
13668 | | |
13669 | | Constructor[name] = property; |
13670 | | } |
13671 | | } |
13672 | | |
13673 | | /** |
13674 | | * Merge two objects, but throw if both contain the same key. |
13675 | | * |
13676 | | * @param {object} one The first object, which is mutated. |
13677 | | * @param {object} two The second object |
13678 | | * @return {object} one after it has been mutated to contain everything in two. |
13679 | | */ |
13680 | | function mergeIntoWithNoDuplicateKeys(one, two) { |
13681 | | _invariant( |
13682 | | one && two && typeof one === 'object' && typeof two === 'object', |
13683 | | 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' |
13684 | | ); |
13685 | | |
13686 | | for (var key in two) { |
13687 | | if (two.hasOwnProperty(key)) { |
13688 | | _invariant( |
13689 | | one[key] === undefined, |
13690 | | 'mergeIntoWithNoDuplicateKeys(): ' + |
13691 | | 'Tried to merge two objects with the same key: `%s`. This conflict ' + |
13692 | | 'may be due to a mixin; in particular, this may be caused by two ' + |
13693 | | 'getInitialState() or getDefaultProps() methods returning objects ' + |
13694 | | 'with clashing keys.', |
13695 | | key |
13696 | | ); |
13697 | | one[key] = two[key]; |
13698 | | } |
13699 | | } |
13700 | | return one; |
13701 | | } |
13702 | | |
13703 | | /** |
13704 | | * Creates a function that invokes two functions and merges their return values. |
13705 | | * |
13706 | | * @param {function} one Function to invoke first. |
13707 | | * @param {function} two Function to invoke second. |
13708 | | * @return {function} Function that invokes the two argument functions. |
13709 | | * @private |
13710 | | */ |
13711 | | function createMergedResultFunction(one, two) { |
13712 | | return function mergedResult() { |
13713 | | var a = one.apply(this, arguments); |
13714 | | var b = two.apply(this, arguments); |
13715 | | if (a == null) { |
13716 | | return b; |
13717 | | } else if (b == null) { |
13718 | | return a; |
13719 | | } |
13720 | | var c = {}; |
13721 | | mergeIntoWithNoDuplicateKeys(c, a); |
13722 | | mergeIntoWithNoDuplicateKeys(c, b); |
13723 | | return c; |
13724 | | }; |
13725 | | } |
13726 | | |
13727 | | /** |
13728 | | * Creates a function that invokes two functions and ignores their return vales. |
13729 | | * |
13730 | | * @param {function} one Function to invoke first. |
13731 | | * @param {function} two Function to invoke second. |
13732 | | * @return {function} Function that invokes the two argument functions. |
13733 | | * @private |
13734 | | */ |
13735 | | function createChainedFunction(one, two) { |
13736 | | return function chainedFunction() { |
13737 | | one.apply(this, arguments); |
13738 | | two.apply(this, arguments); |
13739 | | }; |
13740 | | } |
13741 | | |
13742 | | /** |
13743 | | * Binds a method to the component. |
13744 | | * |
13745 | | * @param {object} component Component whose method is going to be bound. |
13746 | | * @param {function} method Method to be bound. |
13747 | | * @return {function} The bound method. |
13748 | | */ |
13749 | | function bindAutoBindMethod(component, method) { |
13750 | | var boundMethod = method.bind(component); |
13751 | | if (true) { |
13752 | | boundMethod.__reactBoundContext = component; |
13753 | | boundMethod.__reactBoundMethod = method; |
13754 | | boundMethod.__reactBoundArguments = null; |
13755 | | var componentName = component.constructor.displayName; |
13756 | | var _bind = boundMethod.bind; |
13757 | | boundMethod.bind = function(newThis) { |
13758 | | for ( |
13759 | | var _len = arguments.length, |
13760 | | args = Array(_len > 1 ? _len - 1 : 0), |
13761 | | _key = 1; |
13762 | | _key < _len; |
13763 | | _key++ |
13764 | | ) { |
13765 | | args[_key - 1] = arguments[_key]; |
13766 | | } |
13767 | | |
13768 | | // User is trying to bind() an autobound method; we effectively will |
13769 | | // ignore the value of "this" that the user is trying to use, so |
13770 | | // let's warn. |
13771 | | if (newThis !== component && newThis !== null) { |
13772 | | if (true) { |
13773 | | warning( |
13774 | | false, |
13775 | | 'bind(): React component methods may only be bound to the ' + |
13776 | | 'component instance. See %s', |
13777 | | componentName |
13778 | | ); |
13779 | | } |
13780 | | } else if (!args.length) { |
13781 | | if (true) { |
13782 | | warning( |
13783 | | false, |
13784 | | 'bind(): You are binding a component method to the component. ' + |
13785 | | 'React does this for you automatically in a high-performance ' + |
13786 | | 'way, so you can safely remove this call. See %s', |
13787 | | componentName |
13788 | | ); |
13789 | | } |
13790 | | return boundMethod; |
13791 | | } |
13792 | | var reboundMethod = _bind.apply(boundMethod, arguments); |
13793 | | reboundMethod.__reactBoundContext = component; |
13794 | | reboundMethod.__reactBoundMethod = method; |
13795 | | reboundMethod.__reactBoundArguments = args; |
13796 | | return reboundMethod; |
13797 | | }; |
13798 | | } |
13799 | | return boundMethod; |
13800 | | } |
13801 | | |
13802 | | /** |
13803 | | * Binds all auto-bound methods in a component. |
13804 | | * |
13805 | | * @param {object} component Component whose method is going to be bound. |
13806 | | */ |
13807 | | function bindAutoBindMethods(component) { |
13808 | | var pairs = component.__reactAutoBindPairs; |
13809 | | for (var i = 0; i < pairs.length; i += 2) { |
13810 | | var autoBindKey = pairs[i]; |
13811 | | var method = pairs[i + 1]; |
13812 | | component[autoBindKey] = bindAutoBindMethod(component, method); |
13813 | | } |
13814 | | } |
13815 | | |
13816 | | var IsMountedPreMixin = { |
13817 | | componentDidMount: function() { |
13818 | | this.__isMounted = true; |
13819 | | } |
13820 | | }; |
13821 | | |
13822 | | var IsMountedPostMixin = { |
13823 | | componentWillUnmount: function() { |
13824 | | this.__isMounted = false; |
13825 | | } |
13826 | | }; |
13827 | | |
13828 | | /** |
13829 | | * Add more to the ReactClass base class. These are all legacy features and |
13830 | | * therefore not already part of the modern ReactComponent. |
13831 | | */ |
13832 | | var ReactClassMixin = { |
13833 | | /** |
13834 | | * TODO: This will be deprecated because state should always keep a consistent |
13835 | | * type signature and the only use case for this, is to avoid that. |
13836 | | */ |
13837 | | replaceState: function(newState, callback) { |
13838 | | this.updater.enqueueReplaceState(this, newState, callback); |
13839 | | }, |
13840 | | |
13841 | | /** |
13842 | | * Checks whether or not this composite component is mounted. |
13843 | | * @return {boolean} True if mounted, false otherwise. |
13844 | | * @protected |
13845 | | * @final |
13846 | | */ |
13847 | | isMounted: function() { |
13848 | | if (true) { |
13849 | | warning( |
13850 | | this.__didWarnIsMounted, |
13851 | | '%s: isMounted is deprecated. Instead, make sure to clean up ' + |
13852 | | 'subscriptions and pending requests in componentWillUnmount to ' + |
13853 | | 'prevent memory leaks.', |
13854 | | (this.constructor && this.constructor.displayName) || |
13855 | | this.name || |
13856 | | 'Component' |
13857 | | ); |
13858 | | this.__didWarnIsMounted = true; |
13859 | | } |
13860 | | return !!this.__isMounted; |
13861 | | } |
13862 | | }; |
13863 | | |
13864 | | var ReactClassComponent = function() {}; |
13865 | | _assign( |
13866 | | ReactClassComponent.prototype, |
13867 | | ReactComponent.prototype, |
13868 | | ReactClassMixin |
13869 | | ); |
13870 | | |
13871 | | /** |
13872 | | * Creates a composite component class given a class specification. |
13873 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass |
13874 | | * |
13875 | | * @param {object} spec Class specification (which must define `render`). |
13876 | | * @return {function} Component constructor function. |
13877 | | * @public |
13878 | | */ |
13879 | | function createClass(spec) { |
13880 | | // To keep our warnings more understandable, we'll use a little hack here to |
13881 | | // ensure that Constructor.name !== 'Constructor'. This makes sure we don't |
13882 | | // unnecessarily identify a class without displayName as 'Constructor'. |
13883 | | var Constructor = identity(function(props, context, updater) { |
13884 | | // This constructor gets overridden by mocks. The argument is used |
13885 | | // by mocks to assert on what gets mounted. |
13886 | | |
13887 | | if (true) { |
13888 | | warning( |
13889 | | this instanceof Constructor, |
13890 | | 'Something is calling a React component directly. Use a factory or ' + |
13891 | | 'JSX instead. See: https://fb.me/react-legacyfactory' |
13892 | | ); |
13893 | | } |
13894 | | |
13895 | | // Wire up auto-binding |
13896 | | if (this.__reactAutoBindPairs.length) { |
13897 | | bindAutoBindMethods(this); |
13898 | | } |
13899 | | |
13900 | | this.props = props; |
13901 | | this.context = context; |
13902 | | this.refs = emptyObject; |
13903 | | this.updater = updater || ReactNoopUpdateQueue; |
13904 | | |
13905 | | this.state = null; |
13906 | | |
13907 | | // ReactClasses doesn't have constructors. Instead, they use the |
13908 | | // getInitialState and componentWillMount methods for initialization. |
13909 | | |
13910 | | var initialState = this.getInitialState ? this.getInitialState() : null; |
13911 | | if (true) { |
13912 | | // We allow auto-mocks to proceed as if they're returning null. |
13913 | | if ( |
13914 | | initialState === undefined && |
13915 | | this.getInitialState._isMockFunction |
13916 | | ) { |
13917 | | // This is probably bad practice. Consider warning here and |
13918 | | // deprecating this convenience. |
13919 | | initialState = null; |
13920 | | } |
13921 | | } |
13922 | | _invariant( |
13923 | | typeof initialState === 'object' && !Array.isArray(initialState), |
13924 | | '%s.getInitialState(): must return an object or null', |
13925 | | Constructor.displayName || 'ReactCompositeComponent' |
13926 | | ); |
13927 | | |
13928 | | this.state = initialState; |
13929 | | }); |
13930 | | Constructor.prototype = new ReactClassComponent(); |
13931 | | Constructor.prototype.constructor = Constructor; |
13932 | | Constructor.prototype.__reactAutoBindPairs = []; |
13933 | | |
13934 | | injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); |
13935 | | |
13936 | | mixSpecIntoComponent(Constructor, IsMountedPreMixin); |
13937 | | mixSpecIntoComponent(Constructor, spec); |
13938 | | mixSpecIntoComponent(Constructor, IsMountedPostMixin); |
13939 | | |
13940 | | // Initialize the defaultProps property after all mixins have been merged. |
13941 | | if (Constructor.getDefaultProps) { |
13942 | | Constructor.defaultProps = Constructor.getDefaultProps(); |
13943 | | } |
13944 | | |
13945 | | if (true) { |
13946 | | // This is a tag to indicate that the use of these method names is ok, |
13947 | | // since it's used with createClass. If it's not, then it's likely a |
13948 | | // mistake so we'll warn you to use the static property, property |
13949 | | // initializer or constructor respectively. |
13950 | | if (Constructor.getDefaultProps) { |
13951 | | Constructor.getDefaultProps.isReactClassApproved = {}; |
13952 | | } |
13953 | | if (Constructor.prototype.getInitialState) { |
13954 | | Constructor.prototype.getInitialState.isReactClassApproved = {}; |
13955 | | } |
13956 | | } |
13957 | | |
13958 | | _invariant( |
13959 | | Constructor.prototype.render, |
13960 | | 'createClass(...): Class specification must implement a `render` method.' |
13961 | | ); |
13962 | | |
13963 | | if (true) { |
13964 | | warning( |
13965 | | !Constructor.prototype.componentShouldUpdate, |
13966 | | '%s has a method called ' + |
13967 | | 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + |
13968 | | 'The name is phrased as a question because the function is ' + |
13969 | | 'expected to return a value.', |
13970 | | spec.displayName || 'A component' |
13971 | | ); |
13972 | | warning( |
13973 | | !Constructor.prototype.componentWillRecieveProps, |
13974 | | '%s has a method called ' + |
13975 | | 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', |
13976 | | spec.displayName || 'A component' |
13977 | | ); |
13978 | | warning( |
13979 | | !Constructor.prototype.UNSAFE_componentWillRecieveProps, |
13980 | | '%s has a method called UNSAFE_componentWillRecieveProps(). ' + |
13981 | | 'Did you mean UNSAFE_componentWillReceiveProps()?', |
13982 | | spec.displayName || 'A component' |
13983 | | ); |
13984 | | } |
13985 | | |
13986 | | // Reduce time spent doing lookups by setting these on the prototype. |
13987 | | for (var methodName in ReactClassInterface) { |
13988 | | if (!Constructor.prototype[methodName]) { |
13989 | | Constructor.prototype[methodName] = null; |
13990 | | } |
13991 | | } |
13992 | | |
13993 | | return Constructor; |
13994 | | } |
13995 | | |
13996 | | return createClass; |
13997 | | } |
13998 | | |
13999 | | module.exports = factory; |
14000 | | |
14001 | | |
14002 | | /***/ }), |
14003 | | /* 367 */ |
14004 | | /***/ (function(module, exports, __webpack_require__) { |
14005 | | |
14006 | | /** |
14007 | | * Copyright (c) 2013-present, Facebook, Inc. |
14008 | | * |
14009 | | * This source code is licensed under the MIT license found in the |
14010 | | * LICENSE file in the root directory of this source tree. |
14011 | | * |
14012 | | */ |
14013 | | 'use strict'; |
14014 | | |
14015 | | var _prodInvariant = __webpack_require__(336); |
14016 | | |
14017 | | var ReactElement = __webpack_require__(346); |
14018 | | |
14019 | | var invariant = __webpack_require__(342); |
14020 | | |
14021 | | /** |
14022 | | * Returns the first child in a collection of children and verifies that there |
14023 | | * is only one child in the collection. |
14024 | | * |
14025 | | * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only |
14026 | | * |
14027 | | * The current implementation of this function assumes that a single child gets |
14028 | | * passed without a wrapper, but the purpose of this helper function is to |
14029 | | * abstract away the particular structure of children. |
14030 | | * |
14031 | | * @param {?object} children Child collection structure. |
14032 | | * @return {ReactElement} The first and only `ReactElement` contained in the |
14033 | | * structure. |
14034 | | */ |
14035 | | function onlyChild(children) { |
14036 | | !ReactElement.isValidElement(children) ? true ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; |
14037 | | return children; |
14038 | | } |
14039 | | |
14040 | | module.exports = onlyChild; |
14041 | | |
14042 | | /***/ }), |
14043 | | /* 368 */ |
14044 | | /***/ (function(module, exports, __webpack_require__) { |
14045 | | |
14046 | | 'use strict'; |
14047 | | |
14048 | | module.exports = __webpack_require__(369); |
14049 | | |
14050 | | |
14051 | | /***/ }), |
14052 | | /* 369 */ |
14053 | | /***/ (function(module, exports, __webpack_require__) { |
14054 | | |
14055 | | /** |
14056 | | * Copyright (c) 2013-present, Facebook, Inc. |
14057 | | * |
14058 | | * This source code is licensed under the MIT license found in the |
14059 | | * LICENSE file in the root directory of this source tree. |
14060 | | * |
14061 | | */ |
14062 | | |
14063 | | /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ |
14064 | | |
14065 | | 'use strict'; |
14066 | | |
14067 | | var ReactDOMComponentTree = __webpack_require__(370); |
14068 | | var ReactDefaultInjection = __webpack_require__(374); |
14069 | | var ReactMount = __webpack_require__(503); |
14070 | | var ReactReconciler = __webpack_require__(395); |
14071 | | var ReactUpdates = __webpack_require__(392); |
14072 | | var ReactVersion = __webpack_require__(508); |
14073 | | |
14074 | | var findDOMNode = __webpack_require__(509); |
14075 | | var getHostComponentFromComposite = __webpack_require__(510); |
14076 | | var renderSubtreeIntoContainer = __webpack_require__(511); |
14077 | | var warning = __webpack_require__(338); |
14078 | | |
14079 | | ReactDefaultInjection.inject(); |
14080 | | |
14081 | | var ReactDOM = { |
14082 | | findDOMNode: findDOMNode, |
14083 | | render: ReactMount.render, |
14084 | | unmountComponentAtNode: ReactMount.unmountComponentAtNode, |
14085 | | version: ReactVersion, |
14086 | | |
14087 | | /* eslint-disable camelcase */ |
14088 | | unstable_batchedUpdates: ReactUpdates.batchedUpdates, |
14089 | | unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer |
14090 | | /* eslint-enable camelcase */ |
14091 | | }; |
14092 | | |
14093 | | // Inject the runtime into a devtools global hook regardless of browser. |
14094 | | // Allows for debugging when the hook is injected on the page. |
14095 | | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { |
14096 | | __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ |
14097 | | ComponentTree: { |
14098 | | getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, |
14099 | | getNodeFromInstance: function (inst) { |
14100 | | // inst is an internal instance (but could be a composite) |
14101 | | if (inst._renderedComponent) { |
14102 | | inst = getHostComponentFromComposite(inst); |
14103 | | } |
14104 | | if (inst) { |
14105 | | return ReactDOMComponentTree.getNodeFromInstance(inst); |
14106 | | } else { |
14107 | | return null; |
14108 | | } |
14109 | | } |
14110 | | }, |
14111 | | Mount: ReactMount, |
14112 | | Reconciler: ReactReconciler |
14113 | | }); |
14114 | | } |
14115 | | |
14116 | | if (true) { |
14117 | | var ExecutionEnvironment = __webpack_require__(384); |
14118 | | if (ExecutionEnvironment.canUseDOM && window.top === window.self) { |
14119 | | // First check if devtools is not installed |
14120 | | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { |
14121 | | // If we're in Chrome or Firefox, provide a download link if not installed. |
14122 | | if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { |
14123 | | // Firefox does not have the issue with devtools loaded over file:// |
14124 | | var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; |
14125 | | console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); |
14126 | | } |
14127 | | } |
14128 | | |
14129 | | var testFunc = function testFn() {}; |
14130 | | true ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; |
14131 | | |
14132 | | // If we're in IE8, check to see if we are in compatibility mode and provide |
14133 | | // information on preventing compatibility mode |
14134 | | var ieCompatibilityMode = document.documentMode && document.documentMode < 8; |
14135 | | |
14136 | | true ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; |
14137 | | |
14138 | | var expectedFeatures = [ |
14139 | | // shims |
14140 | | Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; |
14141 | | |
14142 | | for (var i = 0; i < expectedFeatures.length; i++) { |
14143 | | if (!expectedFeatures[i]) { |
14144 | | true ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; |
14145 | | break; |
14146 | | } |
14147 | | } |
14148 | | } |
14149 | | } |
14150 | | |
14151 | | if (true) { |
14152 | | var ReactInstrumentation = __webpack_require__(398); |
14153 | | var ReactDOMUnknownPropertyHook = __webpack_require__(512); |
14154 | | var ReactDOMNullInputValuePropHook = __webpack_require__(513); |
14155 | | var ReactDOMInvalidARIAHook = __webpack_require__(514); |
14156 | | |
14157 | | ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); |
14158 | | ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); |
14159 | | ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); |
14160 | | } |
14161 | | |
14162 | | module.exports = ReactDOM; |
14163 | | |
14164 | | /***/ }), |
14165 | | /* 370 */ |
14166 | | /***/ (function(module, exports, __webpack_require__) { |
14167 | | |
14168 | | /** |
14169 | | * Copyright (c) 2013-present, Facebook, Inc. |
14170 | | * |
14171 | | * This source code is licensed under the MIT license found in the |
14172 | | * LICENSE file in the root directory of this source tree. |
14173 | | * |
14174 | | */ |
14175 | | |
14176 | | 'use strict'; |
14177 | | |
14178 | | var _prodInvariant = __webpack_require__(371); |
14179 | | |
14180 | | var DOMProperty = __webpack_require__(372); |
14181 | | var ReactDOMComponentFlags = __webpack_require__(373); |
14182 | | |
14183 | | var invariant = __webpack_require__(342); |
14184 | | |
14185 | | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; |
14186 | | var Flags = ReactDOMComponentFlags; |
14187 | | |
14188 | | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); |
14189 | | |
14190 | | /** |
14191 | | * Check if a given node should be cached. |
14192 | | */ |
14193 | | function shouldPrecacheNode(node, nodeID) { |
14194 | | return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; |
14195 | | } |
14196 | | |
14197 | | /** |
14198 | | * Drill down (through composites and empty components) until we get a host or |
14199 | | * host text component. |
14200 | | * |
14201 | | * This is pretty polymorphic but unavoidable with the current structure we have |
14202 | | * for `_renderedChildren`. |
14203 | | */ |
14204 | | function getRenderedHostOrTextFromComponent(component) { |
14205 | | var rendered; |
14206 | | while (rendered = component._renderedComponent) { |
14207 | | component = rendered; |
14208 | | } |
14209 | | return component; |
14210 | | } |
14211 | | |
14212 | | /** |
14213 | | * Populate `_hostNode` on the rendered host/text component with the given |
14214 | | * DOM node. The passed `inst` can be a composite. |
14215 | | */ |
14216 | | function precacheNode(inst, node) { |
14217 | | var hostInst = getRenderedHostOrTextFromComponent(inst); |
14218 | | hostInst._hostNode = node; |
14219 | | node[internalInstanceKey] = hostInst; |
14220 | | } |
14221 | | |
14222 | | function uncacheNode(inst) { |
14223 | | var node = inst._hostNode; |
14224 | | if (node) { |
14225 | | delete node[internalInstanceKey]; |
14226 | | inst._hostNode = null; |
14227 | | } |
14228 | | } |
14229 | | |
14230 | | /** |
14231 | | * Populate `_hostNode` on each child of `inst`, assuming that the children |
14232 | | * match up with the DOM (element) children of `node`. |
14233 | | * |
14234 | | * We cache entire levels at once to avoid an n^2 problem where we access the |
14235 | | * children of a node sequentially and have to walk from the start to our target |
14236 | | * node every time. |
14237 | | * |
14238 | | * Since we update `_renderedChildren` and the actual DOM at (slightly) |
14239 | | * different times, we could race here and see a newer `_renderedChildren` than |
14240 | | * the DOM nodes we see. To avoid this, ReactMultiChild calls |
14241 | | * `prepareToManageChildren` before we change `_renderedChildren`, at which |
14242 | | * time the container's child nodes are always cached (until it unmounts). |
14243 | | */ |
14244 | | function precacheChildNodes(inst, node) { |
14245 | | if (inst._flags & Flags.hasCachedChildNodes) { |
14246 | | return; |
14247 | | } |
14248 | | var children = inst._renderedChildren; |
14249 | | var childNode = node.firstChild; |
14250 | | outer: for (var name in children) { |
14251 | | if (!children.hasOwnProperty(name)) { |
14252 | | continue; |
14253 | | } |
14254 | | var childInst = children[name]; |
14255 | | var childID = getRenderedHostOrTextFromComponent(childInst)._domID; |
14256 | | if (childID === 0) { |
14257 | | // We're currently unmounting this child in ReactMultiChild; skip it. |
14258 | | continue; |
14259 | | } |
14260 | | // We assume the child nodes are in the same order as the child instances. |
14261 | | for (; childNode !== null; childNode = childNode.nextSibling) { |
14262 | | if (shouldPrecacheNode(childNode, childID)) { |
14263 | | precacheNode(childInst, childNode); |
14264 | | continue outer; |
14265 | | } |
14266 | | } |
14267 | | // We reached the end of the DOM children without finding an ID match. |
14268 | | true ? true ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; |
14269 | | } |
14270 | | inst._flags |= Flags.hasCachedChildNodes; |
14271 | | } |
14272 | | |
14273 | | /** |
14274 | | * Given a DOM node, return the closest ReactDOMComponent or |
14275 | | * ReactDOMTextComponent instance ancestor. |
14276 | | */ |
14277 | | function getClosestInstanceFromNode(node) { |
14278 | | if (node[internalInstanceKey]) { |
14279 | | return node[internalInstanceKey]; |
14280 | | } |
14281 | | |
14282 | | // Walk up the tree until we find an ancestor whose instance we have cached. |
14283 | | var parents = []; |
14284 | | while (!node[internalInstanceKey]) { |
14285 | | parents.push(node); |
14286 | | if (node.parentNode) { |
14287 | | node = node.parentNode; |
14288 | | } else { |
14289 | | // Top of the tree. This node must not be part of a React tree (or is |
14290 | | // unmounted, potentially). |
14291 | | return null; |
14292 | | } |
14293 | | } |
14294 | | |
14295 | | var closest; |
14296 | | var inst; |
14297 | | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { |
14298 | | closest = inst; |
14299 | | if (parents.length) { |
14300 | | precacheChildNodes(inst, node); |
14301 | | } |
14302 | | } |
14303 | | |
14304 | | return closest; |
14305 | | } |
14306 | | |
14307 | | /** |
14308 | | * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent |
14309 | | * instance, or null if the node was not rendered by this React. |
14310 | | */ |
14311 | | function getInstanceFromNode(node) { |
14312 | | var inst = getClosestInstanceFromNode(node); |
14313 | | if (inst != null && inst._hostNode === node) { |
14314 | | return inst; |
14315 | | } else { |
14316 | | return null; |
14317 | | } |
14318 | | } |
14319 | | |
14320 | | /** |
14321 | | * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding |
14322 | | * DOM node. |
14323 | | */ |
14324 | | function getNodeFromInstance(inst) { |
14325 | | // Without this first invariant, passing a non-DOM-component triggers the next |
14326 | | // invariant for a missing parent, which is super confusing. |
14327 | | !(inst._hostNode !== undefined) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; |
14328 | | |
14329 | | if (inst._hostNode) { |
14330 | | return inst._hostNode; |
14331 | | } |
14332 | | |
14333 | | // Walk up the tree until we find an ancestor whose DOM node we have cached. |
14334 | | var parents = []; |
14335 | | while (!inst._hostNode) { |
14336 | | parents.push(inst); |
14337 | | !inst._hostParent ? true ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; |
14338 | | inst = inst._hostParent; |
14339 | | } |
14340 | | |
14341 | | // Now parents contains each ancestor that does *not* have a cached native |
14342 | | // node, and `inst` is the deepest ancestor that does. |
14343 | | for (; parents.length; inst = parents.pop()) { |
14344 | | precacheChildNodes(inst, inst._hostNode); |
14345 | | } |
14346 | | |
14347 | | return inst._hostNode; |
14348 | | } |
14349 | | |
14350 | | var ReactDOMComponentTree = { |
14351 | | getClosestInstanceFromNode: getClosestInstanceFromNode, |
14352 | | getInstanceFromNode: getInstanceFromNode, |
14353 | | getNodeFromInstance: getNodeFromInstance, |
14354 | | precacheChildNodes: precacheChildNodes, |
14355 | | precacheNode: precacheNode, |
14356 | | uncacheNode: uncacheNode |
14357 | | }; |
14358 | | |
14359 | | module.exports = ReactDOMComponentTree; |
14360 | | |
14361 | | /***/ }), |
14362 | | /* 371 */ |
14363 | | /***/ (function(module, exports) { |
14364 | | |
14365 | | /** |
14366 | | * Copyright (c) 2013-present, Facebook, Inc. |
14367 | | * |
14368 | | * This source code is licensed under the MIT license found in the |
14369 | | * LICENSE file in the root directory of this source tree. |
14370 | | * |
14371 | | * |
14372 | | */ |
14373 | | 'use strict'; |
14374 | | |
14375 | | /** |
14376 | | * WARNING: DO NOT manually require this module. |
14377 | | * This is a replacement for `invariant(...)` used by the error code system |
14378 | | * and will _only_ be required by the corresponding babel pass. |
14379 | | * It always throws. |
14380 | | */ |
14381 | | |
14382 | | function reactProdInvariant(code) { |
14383 | | var argCount = arguments.length - 1; |
14384 | | |
14385 | | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; |
14386 | | |
14387 | | for (var argIdx = 0; argIdx < argCount; argIdx++) { |
14388 | | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); |
14389 | | } |
14390 | | |
14391 | | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; |
14392 | | |
14393 | | var error = new Error(message); |
14394 | | error.name = 'Invariant Violation'; |
14395 | | error.framesToPop = 1; // we don't care about reactProdInvariant's own frame |
14396 | | |
14397 | | throw error; |
14398 | | } |
14399 | | |
14400 | | module.exports = reactProdInvariant; |
14401 | | |
14402 | | /***/ }), |
14403 | | /* 372 */ |
14404 | | /***/ (function(module, exports, __webpack_require__) { |
14405 | | |
14406 | | /** |
14407 | | * Copyright (c) 2013-present, Facebook, Inc. |
14408 | | * |
14409 | | * This source code is licensed under the MIT license found in the |
14410 | | * LICENSE file in the root directory of this source tree. |
14411 | | * |
14412 | | */ |
14413 | | |
14414 | | 'use strict'; |
14415 | | |
14416 | | var _prodInvariant = __webpack_require__(371); |
14417 | | |
14418 | | var invariant = __webpack_require__(342); |
14419 | | |
14420 | | function checkMask(value, bitmask) { |
14421 | | return (value & bitmask) === bitmask; |
14422 | | } |
14423 | | |
14424 | | var DOMPropertyInjection = { |
14425 | | /** |
14426 | | * Mapping from normalized, camelcased property names to a configuration that |
14427 | | * specifies how the associated DOM property should be accessed or rendered. |
14428 | | */ |
14429 | | MUST_USE_PROPERTY: 0x1, |
14430 | | HAS_BOOLEAN_VALUE: 0x4, |
14431 | | HAS_NUMERIC_VALUE: 0x8, |
14432 | | HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, |
14433 | | HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, |
14434 | | |
14435 | | /** |
14436 | | * Inject some specialized knowledge about the DOM. This takes a config object |
14437 | | * with the following properties: |
14438 | | * |
14439 | | * isCustomAttribute: function that given an attribute name will return true |
14440 | | * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* |
14441 | | * attributes where it's impossible to enumerate all of the possible |
14442 | | * attribute names, |
14443 | | * |
14444 | | * Properties: object mapping DOM property name to one of the |
14445 | | * DOMPropertyInjection constants or null. If your attribute isn't in here, |
14446 | | * it won't get written to the DOM. |
14447 | | * |
14448 | | * DOMAttributeNames: object mapping React attribute name to the DOM |
14449 | | * attribute name. Attribute names not specified use the **lowercase** |
14450 | | * normalized name. |
14451 | | * |
14452 | | * DOMAttributeNamespaces: object mapping React attribute name to the DOM |
14453 | | * attribute namespace URL. (Attribute names not specified use no namespace.) |
14454 | | * |
14455 | | * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. |
14456 | | * Property names not specified use the normalized name. |
14457 | | * |
14458 | | * DOMMutationMethods: Properties that require special mutation methods. If |
14459 | | * `value` is undefined, the mutation method should unset the property. |
14460 | | * |
14461 | | * @param {object} domPropertyConfig the config as described above. |
14462 | | */ |
14463 | | injectDOMPropertyConfig: function (domPropertyConfig) { |
14464 | | var Injection = DOMPropertyInjection; |
14465 | | var Properties = domPropertyConfig.Properties || {}; |
14466 | | var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; |
14467 | | var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; |
14468 | | var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; |
14469 | | var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; |
14470 | | |
14471 | | if (domPropertyConfig.isCustomAttribute) { |
14472 | | DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); |
14473 | | } |
14474 | | |
14475 | | for (var propName in Properties) { |
14476 | | !!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; |
14477 | | |
14478 | | var lowerCased = propName.toLowerCase(); |
14479 | | var propConfig = Properties[propName]; |
14480 | | |
14481 | | var propertyInfo = { |
14482 | | attributeName: lowerCased, |
14483 | | attributeNamespace: null, |
14484 | | propertyName: propName, |
14485 | | mutationMethod: null, |
14486 | | |
14487 | | mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), |
14488 | | hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), |
14489 | | hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), |
14490 | | hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), |
14491 | | hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) |
14492 | | }; |
14493 | | !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; |
14494 | | |
14495 | | if (true) { |
14496 | | DOMProperty.getPossibleStandardName[lowerCased] = propName; |
14497 | | } |
14498 | | |
14499 | | if (DOMAttributeNames.hasOwnProperty(propName)) { |
14500 | | var attributeName = DOMAttributeNames[propName]; |
14501 | | propertyInfo.attributeName = attributeName; |
14502 | | if (true) { |
14503 | | DOMProperty.getPossibleStandardName[attributeName] = propName; |
14504 | | } |
14505 | | } |
14506 | | |
14507 | | if (DOMAttributeNamespaces.hasOwnProperty(propName)) { |
14508 | | propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; |
14509 | | } |
14510 | | |
14511 | | if (DOMPropertyNames.hasOwnProperty(propName)) { |
14512 | | propertyInfo.propertyName = DOMPropertyNames[propName]; |
14513 | | } |
14514 | | |
14515 | | if (DOMMutationMethods.hasOwnProperty(propName)) { |
14516 | | propertyInfo.mutationMethod = DOMMutationMethods[propName]; |
14517 | | } |
14518 | | |
14519 | | DOMProperty.properties[propName] = propertyInfo; |
14520 | | } |
14521 | | } |
14522 | | }; |
14523 | | |
14524 | | /* eslint-disable max-len */ |
14525 | | var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; |
14526 | | /* eslint-enable max-len */ |
14527 | | |
14528 | | /** |
14529 | | * DOMProperty exports lookup objects that can be used like functions: |
14530 | | * |
14531 | | * > DOMProperty.isValid['id'] |
14532 | | * true |
14533 | | * > DOMProperty.isValid['foobar'] |
14534 | | * undefined |
14535 | | * |
14536 | | * Although this may be confusing, it performs better in general. |
14537 | | * |
14538 | | * @see http://jsperf.com/key-exists |
14539 | | * @see http://jsperf.com/key-missing |
14540 | | */ |
14541 | | var DOMProperty = { |
14542 | | ID_ATTRIBUTE_NAME: 'data-reactid', |
14543 | | ROOT_ATTRIBUTE_NAME: 'data-reactroot', |
14544 | | |
14545 | | ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, |
14546 | | ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', |
14547 | | |
14548 | | /** |
14549 | | * Map from property "standard name" to an object with info about how to set |
14550 | | * the property in the DOM. Each object contains: |
14551 | | * |
14552 | | * attributeName: |
14553 | | * Used when rendering markup or with `*Attribute()`. |
14554 | | * attributeNamespace |
14555 | | * propertyName: |
14556 | | * Used on DOM node instances. (This includes properties that mutate due to |
14557 | | * external factors.) |
14558 | | * mutationMethod: |
14559 | | * If non-null, used instead of the property or `setAttribute()` after |
14560 | | * initial render. |
14561 | | * mustUseProperty: |
14562 | | * Whether the property must be accessed and mutated as an object property. |
14563 | | * hasBooleanValue: |
14564 | | * Whether the property should be removed when set to a falsey value. |
14565 | | * hasNumericValue: |
14566 | | * Whether the property must be numeric or parse as a numeric and should be |
14567 | | * removed when set to a falsey value. |
14568 | | * hasPositiveNumericValue: |
14569 | | * Whether the property must be positive numeric or parse as a positive |
14570 | | * numeric and should be removed when set to a falsey value. |
14571 | | * hasOverloadedBooleanValue: |
14572 | | * Whether the property can be used as a flag as well as with a value. |
14573 | | * Removed when strictly equal to false; present without a value when |
14574 | | * strictly equal to true; present with a value otherwise. |
14575 | | */ |
14576 | | properties: {}, |
14577 | | |
14578 | | /** |
14579 | | * Mapping from lowercase property names to the properly cased version, used |
14580 | | * to warn in the case of missing properties. Available only in __DEV__. |
14581 | | * |
14582 | | * autofocus is predefined, because adding it to the property whitelist |
14583 | | * causes unintended side effects. |
14584 | | * |
14585 | | * @type {Object} |
14586 | | */ |
14587 | | getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null, |
14588 | | |
14589 | | /** |
14590 | | * All of the isCustomAttribute() functions that have been injected. |
14591 | | */ |
14592 | | _isCustomAttributeFunctions: [], |
14593 | | |
14594 | | /** |
14595 | | * Checks whether a property name is a custom attribute. |
14596 | | * @method |
14597 | | */ |
14598 | | isCustomAttribute: function (attributeName) { |
14599 | | for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { |
14600 | | var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; |
14601 | | if (isCustomAttributeFn(attributeName)) { |
14602 | | return true; |
14603 | | } |
14604 | | } |
14605 | | return false; |
14606 | | }, |
14607 | | |
14608 | | injection: DOMPropertyInjection |
14609 | | }; |
14610 | | |
14611 | | module.exports = DOMProperty; |
14612 | | |
14613 | | /***/ }), |
14614 | | /* 373 */ |
14615 | | /***/ (function(module, exports) { |
14616 | | |
14617 | | /** |
14618 | | * Copyright (c) 2015-present, Facebook, Inc. |
14619 | | * |
14620 | | * This source code is licensed under the MIT license found in the |
14621 | | * LICENSE file in the root directory of this source tree. |
14622 | | * |
14623 | | */ |
14624 | | |
14625 | | 'use strict'; |
14626 | | |
14627 | | var ReactDOMComponentFlags = { |
14628 | | hasCachedChildNodes: 1 << 0 |
14629 | | }; |
14630 | | |
14631 | | module.exports = ReactDOMComponentFlags; |
14632 | | |
14633 | | /***/ }), |
14634 | | /* 374 */ |
14635 | | /***/ (function(module, exports, __webpack_require__) { |
14636 | | |
14637 | | /** |
14638 | | * Copyright (c) 2013-present, Facebook, Inc. |
14639 | | * |
14640 | | * This source code is licensed under the MIT license found in the |
14641 | | * LICENSE file in the root directory of this source tree. |
14642 | | * |
14643 | | */ |
14644 | | |
14645 | | 'use strict'; |
14646 | | |
14647 | | var ARIADOMPropertyConfig = __webpack_require__(375); |
14648 | | var BeforeInputEventPlugin = __webpack_require__(376); |
14649 | | var ChangeEventPlugin = __webpack_require__(391); |
14650 | | var DefaultEventPluginOrder = __webpack_require__(409); |
14651 | | var EnterLeaveEventPlugin = __webpack_require__(410); |
14652 | | var HTMLDOMPropertyConfig = __webpack_require__(415); |
14653 | | var ReactComponentBrowserEnvironment = __webpack_require__(416); |
14654 | | var ReactDOMComponent = __webpack_require__(429); |
14655 | | var ReactDOMComponentTree = __webpack_require__(370); |
14656 | | var ReactDOMEmptyComponent = __webpack_require__(474); |
14657 | | var ReactDOMTreeTraversal = __webpack_require__(475); |
14658 | | var ReactDOMTextComponent = __webpack_require__(476); |
14659 | | var ReactDefaultBatchingStrategy = __webpack_require__(477); |
14660 | | var ReactEventListener = __webpack_require__(478); |
14661 | | var ReactInjection = __webpack_require__(481); |
14662 | | var ReactReconcileTransaction = __webpack_require__(482); |
14663 | | var SVGDOMPropertyConfig = __webpack_require__(490); |
14664 | | var SelectEventPlugin = __webpack_require__(491); |
14665 | | var SimpleEventPlugin = __webpack_require__(492); |
14666 | | |
14667 | | var alreadyInjected = false; |
14668 | | |
14669 | | function inject() { |
14670 | | if (alreadyInjected) { |
14671 | | // TODO: This is currently true because these injections are shared between |
14672 | | // the client and the server package. They should be built independently |
14673 | | // and not share any injection state. Then this problem will be solved. |
14674 | | return; |
14675 | | } |
14676 | | alreadyInjected = true; |
14677 | | |
14678 | | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); |
14679 | | |
14680 | | /** |
14681 | | * Inject modules for resolving DOM hierarchy and plugin ordering. |
14682 | | */ |
14683 | | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); |
14684 | | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); |
14685 | | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); |
14686 | | |
14687 | | /** |
14688 | | * Some important event plugins included by default (without having to require |
14689 | | * them). |
14690 | | */ |
14691 | | ReactInjection.EventPluginHub.injectEventPluginsByName({ |
14692 | | SimpleEventPlugin: SimpleEventPlugin, |
14693 | | EnterLeaveEventPlugin: EnterLeaveEventPlugin, |
14694 | | ChangeEventPlugin: ChangeEventPlugin, |
14695 | | SelectEventPlugin: SelectEventPlugin, |
14696 | | BeforeInputEventPlugin: BeforeInputEventPlugin |
14697 | | }); |
14698 | | |
14699 | | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); |
14700 | | |
14701 | | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); |
14702 | | |
14703 | | ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); |
14704 | | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); |
14705 | | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); |
14706 | | |
14707 | | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { |
14708 | | return new ReactDOMEmptyComponent(instantiate); |
14709 | | }); |
14710 | | |
14711 | | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); |
14712 | | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); |
14713 | | |
14714 | | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); |
14715 | | } |
14716 | | |
14717 | | module.exports = { |
14718 | | inject: inject |
14719 | | }; |
14720 | | |
14721 | | /***/ }), |
14722 | | /* 375 */ |
14723 | | /***/ (function(module, exports) { |
14724 | | |
14725 | | /** |
14726 | | * Copyright (c) 2013-present, Facebook, Inc. |
14727 | | * |
14728 | | * This source code is licensed under the MIT license found in the |
14729 | | * LICENSE file in the root directory of this source tree. |
14730 | | * |
14731 | | */ |
14732 | | |
14733 | | 'use strict'; |
14734 | | |
14735 | | var ARIADOMPropertyConfig = { |
14736 | | Properties: { |
14737 | | // Global States and Properties |
14738 | | 'aria-current': 0, // state |
14739 | | 'aria-details': 0, |
14740 | | 'aria-disabled': 0, // state |
14741 | | 'aria-hidden': 0, // state |
14742 | | 'aria-invalid': 0, // state |
14743 | | 'aria-keyshortcuts': 0, |
14744 | | 'aria-label': 0, |
14745 | | 'aria-roledescription': 0, |
14746 | | // Widget Attributes |
14747 | | 'aria-autocomplete': 0, |
14748 | | 'aria-checked': 0, |
14749 | | 'aria-expanded': 0, |
14750 | | 'aria-haspopup': 0, |
14751 | | 'aria-level': 0, |
14752 | | 'aria-modal': 0, |
14753 | | 'aria-multiline': 0, |
14754 | | 'aria-multiselectable': 0, |
14755 | | 'aria-orientation': 0, |
14756 | | 'aria-placeholder': 0, |
14757 | | 'aria-pressed': 0, |
14758 | | 'aria-readonly': 0, |
14759 | | 'aria-required': 0, |
14760 | | 'aria-selected': 0, |
14761 | | 'aria-sort': 0, |
14762 | | 'aria-valuemax': 0, |
14763 | | 'aria-valuemin': 0, |
14764 | | 'aria-valuenow': 0, |
14765 | | 'aria-valuetext': 0, |
14766 | | // Live Region Attributes |
14767 | | 'aria-atomic': 0, |
14768 | | 'aria-busy': 0, |
14769 | | 'aria-live': 0, |
14770 | | 'aria-relevant': 0, |
14771 | | // Drag-and-Drop Attributes |
14772 | | 'aria-dropeffect': 0, |
14773 | | 'aria-grabbed': 0, |
14774 | | // Relationship Attributes |
14775 | | 'aria-activedescendant': 0, |
14776 | | 'aria-colcount': 0, |
14777 | | 'aria-colindex': 0, |
14778 | | 'aria-colspan': 0, |
14779 | | 'aria-controls': 0, |
14780 | | 'aria-describedby': 0, |
14781 | | 'aria-errormessage': 0, |
14782 | | 'aria-flowto': 0, |
14783 | | 'aria-labelledby': 0, |
14784 | | 'aria-owns': 0, |
14785 | | 'aria-posinset': 0, |
14786 | | 'aria-rowcount': 0, |
14787 | | 'aria-rowindex': 0, |
14788 | | 'aria-rowspan': 0, |
14789 | | 'aria-setsize': 0 |
14790 | | }, |
14791 | | DOMAttributeNames: {}, |
14792 | | DOMPropertyNames: {} |
14793 | | }; |
14794 | | |
14795 | | module.exports = ARIADOMPropertyConfig; |
14796 | | |
14797 | | /***/ }), |
14798 | | /* 376 */ |
14799 | | /***/ (function(module, exports, __webpack_require__) { |
14800 | | |
14801 | | /** |
14802 | | * Copyright (c) 2013-present, Facebook, Inc. |
14803 | | * |
14804 | | * This source code is licensed under the MIT license found in the |
14805 | | * LICENSE file in the root directory of this source tree. |
14806 | | * |
14807 | | */ |
14808 | | |
14809 | | 'use strict'; |
14810 | | |
14811 | | var EventPropagators = __webpack_require__(377); |
14812 | | var ExecutionEnvironment = __webpack_require__(384); |
14813 | | var FallbackCompositionState = __webpack_require__(385); |
14814 | | var SyntheticCompositionEvent = __webpack_require__(388); |
14815 | | var SyntheticInputEvent = __webpack_require__(390); |
14816 | | |
14817 | | var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space |
14818 | | var START_KEYCODE = 229; |
14819 | | |
14820 | | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; |
14821 | | |
14822 | | var documentMode = null; |
14823 | | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { |
14824 | | documentMode = document.documentMode; |
14825 | | } |
14826 | | |
14827 | | // Webkit offers a very useful `textInput` event that can be used to |
14828 | | // directly represent `beforeInput`. The IE `textinput` event is not as |
14829 | | // useful, so we don't use it. |
14830 | | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); |
14831 | | |
14832 | | // In IE9+, we have access to composition events, but the data supplied |
14833 | | // by the native compositionend event may be incorrect. Japanese ideographic |
14834 | | // spaces, for instance (\u3000) are not recorded correctly. |
14835 | | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); |
14836 | | |
14837 | | /** |
14838 | | * Opera <= 12 includes TextEvent in window, but does not fire |
14839 | | * text input events. Rely on keypress instead. |
14840 | | */ |
14841 | | function isPresto() { |
14842 | | var opera = window.opera; |
14843 | | return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; |
14844 | | } |
14845 | | |
14846 | | var SPACEBAR_CODE = 32; |
14847 | | var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); |
14848 | | |
14849 | | // Events and their corresponding property names. |
14850 | | var eventTypes = { |
14851 | | beforeInput: { |
14852 | | phasedRegistrationNames: { |
14853 | | bubbled: 'onBeforeInput', |
14854 | | captured: 'onBeforeInputCapture' |
14855 | | }, |
14856 | | dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] |
14857 | | }, |
14858 | | compositionEnd: { |
14859 | | phasedRegistrationNames: { |
14860 | | bubbled: 'onCompositionEnd', |
14861 | | captured: 'onCompositionEndCapture' |
14862 | | }, |
14863 | | dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] |
14864 | | }, |
14865 | | compositionStart: { |
14866 | | phasedRegistrationNames: { |
14867 | | bubbled: 'onCompositionStart', |
14868 | | captured: 'onCompositionStartCapture' |
14869 | | }, |
14870 | | dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] |
14871 | | }, |
14872 | | compositionUpdate: { |
14873 | | phasedRegistrationNames: { |
14874 | | bubbled: 'onCompositionUpdate', |
14875 | | captured: 'onCompositionUpdateCapture' |
14876 | | }, |
14877 | | dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] |
14878 | | } |
14879 | | }; |
14880 | | |
14881 | | // Track whether we've ever handled a keypress on the space key. |
14882 | | var hasSpaceKeypress = false; |
14883 | | |
14884 | | /** |
14885 | | * Return whether a native keypress event is assumed to be a command. |
14886 | | * This is required because Firefox fires `keypress` events for key commands |
14887 | | * (cut, copy, select-all, etc.) even though no character is inserted. |
14888 | | */ |
14889 | | function isKeypressCommand(nativeEvent) { |
14890 | | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && |
14891 | | // ctrlKey && altKey is equivalent to AltGr, and is not a command. |
14892 | | !(nativeEvent.ctrlKey && nativeEvent.altKey); |
14893 | | } |
14894 | | |
14895 | | /** |
14896 | | * Translate native top level events into event types. |
14897 | | * |
14898 | | * @param {string} topLevelType |
14899 | | * @return {object} |
14900 | | */ |
14901 | | function getCompositionEventType(topLevelType) { |
14902 | | switch (topLevelType) { |
14903 | | case 'topCompositionStart': |
14904 | | return eventTypes.compositionStart; |
14905 | | case 'topCompositionEnd': |
14906 | | return eventTypes.compositionEnd; |
14907 | | case 'topCompositionUpdate': |
14908 | | return eventTypes.compositionUpdate; |
14909 | | } |
14910 | | } |
14911 | | |
14912 | | /** |
14913 | | * Does our fallback best-guess model think this event signifies that |
14914 | | * composition has begun? |
14915 | | * |
14916 | | * @param {string} topLevelType |
14917 | | * @param {object} nativeEvent |
14918 | | * @return {boolean} |
14919 | | */ |
14920 | | function isFallbackCompositionStart(topLevelType, nativeEvent) { |
14921 | | return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; |
14922 | | } |
14923 | | |
14924 | | /** |
14925 | | * Does our fallback mode think that this event is the end of composition? |
14926 | | * |
14927 | | * @param {string} topLevelType |
14928 | | * @param {object} nativeEvent |
14929 | | * @return {boolean} |
14930 | | */ |
14931 | | function isFallbackCompositionEnd(topLevelType, nativeEvent) { |
14932 | | switch (topLevelType) { |
14933 | | case 'topKeyUp': |
14934 | | // Command keys insert or clear IME input. |
14935 | | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; |
14936 | | case 'topKeyDown': |
14937 | | // Expect IME keyCode on each keydown. If we get any other |
14938 | | // code we must have exited earlier. |
14939 | | return nativeEvent.keyCode !== START_KEYCODE; |
14940 | | case 'topKeyPress': |
14941 | | case 'topMouseDown': |
14942 | | case 'topBlur': |
14943 | | // Events are not possible without cancelling IME. |
14944 | | return true; |
14945 | | default: |
14946 | | return false; |
14947 | | } |
14948 | | } |
14949 | | |
14950 | | /** |
14951 | | * Google Input Tools provides composition data via a CustomEvent, |
14952 | | * with the `data` property populated in the `detail` object. If this |
14953 | | * is available on the event object, use it. If not, this is a plain |
14954 | | * composition event and we have nothing special to extract. |
14955 | | * |
14956 | | * @param {object} nativeEvent |
14957 | | * @return {?string} |
14958 | | */ |
14959 | | function getDataFromCustomEvent(nativeEvent) { |
14960 | | var detail = nativeEvent.detail; |
14961 | | if (typeof detail === 'object' && 'data' in detail) { |
14962 | | return detail.data; |
14963 | | } |
14964 | | return null; |
14965 | | } |
14966 | | |
14967 | | // Track the current IME composition fallback object, if any. |
14968 | | var currentComposition = null; |
14969 | | |
14970 | | /** |
14971 | | * @return {?object} A SyntheticCompositionEvent. |
14972 | | */ |
14973 | | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
14974 | | var eventType; |
14975 | | var fallbackData; |
14976 | | |
14977 | | if (canUseCompositionEvent) { |
14978 | | eventType = getCompositionEventType(topLevelType); |
14979 | | } else if (!currentComposition) { |
14980 | | if (isFallbackCompositionStart(topLevelType, nativeEvent)) { |
14981 | | eventType = eventTypes.compositionStart; |
14982 | | } |
14983 | | } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { |
14984 | | eventType = eventTypes.compositionEnd; |
14985 | | } |
14986 | | |
14987 | | if (!eventType) { |
14988 | | return null; |
14989 | | } |
14990 | | |
14991 | | if (useFallbackCompositionData) { |
14992 | | // The current composition is stored statically and must not be |
14993 | | // overwritten while composition continues. |
14994 | | if (!currentComposition && eventType === eventTypes.compositionStart) { |
14995 | | currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); |
14996 | | } else if (eventType === eventTypes.compositionEnd) { |
14997 | | if (currentComposition) { |
14998 | | fallbackData = currentComposition.getData(); |
14999 | | } |
15000 | | } |
15001 | | } |
15002 | | |
15003 | | var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); |
15004 | | |
15005 | | if (fallbackData) { |
15006 | | // Inject data generated from fallback path into the synthetic event. |
15007 | | // This matches the property of native CompositionEventInterface. |
15008 | | event.data = fallbackData; |
15009 | | } else { |
15010 | | var customData = getDataFromCustomEvent(nativeEvent); |
15011 | | if (customData !== null) { |
15012 | | event.data = customData; |
15013 | | } |
15014 | | } |
15015 | | |
15016 | | EventPropagators.accumulateTwoPhaseDispatches(event); |
15017 | | return event; |
15018 | | } |
15019 | | |
15020 | | /** |
15021 | | * @param {string} topLevelType Record from `EventConstants`. |
15022 | | * @param {object} nativeEvent Native browser event. |
15023 | | * @return {?string} The string corresponding to this `beforeInput` event. |
15024 | | */ |
15025 | | function getNativeBeforeInputChars(topLevelType, nativeEvent) { |
15026 | | switch (topLevelType) { |
15027 | | case 'topCompositionEnd': |
15028 | | return getDataFromCustomEvent(nativeEvent); |
15029 | | case 'topKeyPress': |
15030 | | /** |
15031 | | * If native `textInput` events are available, our goal is to make |
15032 | | * use of them. However, there is a special case: the spacebar key. |
15033 | | * In Webkit, preventing default on a spacebar `textInput` event |
15034 | | * cancels character insertion, but it *also* causes the browser |
15035 | | * to fall back to its default spacebar behavior of scrolling the |
15036 | | * page. |
15037 | | * |
15038 | | * Tracking at: |
15039 | | * https://code.google.com/p/chromium/issues/detail?id=355103 |
15040 | | * |
15041 | | * To avoid this issue, use the keypress event as if no `textInput` |
15042 | | * event is available. |
15043 | | */ |
15044 | | var which = nativeEvent.which; |
15045 | | if (which !== SPACEBAR_CODE) { |
15046 | | return null; |
15047 | | } |
15048 | | |
15049 | | hasSpaceKeypress = true; |
15050 | | return SPACEBAR_CHAR; |
15051 | | |
15052 | | case 'topTextInput': |
15053 | | // Record the characters to be added to the DOM. |
15054 | | var chars = nativeEvent.data; |
15055 | | |
15056 | | // If it's a spacebar character, assume that we have already handled |
15057 | | // it at the keypress level and bail immediately. Android Chrome |
15058 | | // doesn't give us keycodes, so we need to blacklist it. |
15059 | | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { |
15060 | | return null; |
15061 | | } |
15062 | | |
15063 | | return chars; |
15064 | | |
15065 | | default: |
15066 | | // For other native event types, do nothing. |
15067 | | return null; |
15068 | | } |
15069 | | } |
15070 | | |
15071 | | /** |
15072 | | * For browsers that do not provide the `textInput` event, extract the |
15073 | | * appropriate string to use for SyntheticInputEvent. |
15074 | | * |
15075 | | * @param {string} topLevelType Record from `EventConstants`. |
15076 | | * @param {object} nativeEvent Native browser event. |
15077 | | * @return {?string} The fallback string for this `beforeInput` event. |
15078 | | */ |
15079 | | function getFallbackBeforeInputChars(topLevelType, nativeEvent) { |
15080 | | // If we are currently composing (IME) and using a fallback to do so, |
15081 | | // try to extract the composed characters from the fallback object. |
15082 | | // If composition event is available, we extract a string only at |
15083 | | // compositionevent, otherwise extract it at fallback events. |
15084 | | if (currentComposition) { |
15085 | | if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { |
15086 | | var chars = currentComposition.getData(); |
15087 | | FallbackCompositionState.release(currentComposition); |
15088 | | currentComposition = null; |
15089 | | return chars; |
15090 | | } |
15091 | | return null; |
15092 | | } |
15093 | | |
15094 | | switch (topLevelType) { |
15095 | | case 'topPaste': |
15096 | | // If a paste event occurs after a keypress, throw out the input |
15097 | | // chars. Paste events should not lead to BeforeInput events. |
15098 | | return null; |
15099 | | case 'topKeyPress': |
15100 | | /** |
15101 | | * As of v27, Firefox may fire keypress events even when no character |
15102 | | * will be inserted. A few possibilities: |
15103 | | * |
15104 | | * - `which` is `0`. Arrow keys, Esc key, etc. |
15105 | | * |
15106 | | * - `which` is the pressed key code, but no char is available. |
15107 | | * Ex: 'AltGr + d` in Polish. There is no modified character for |
15108 | | * this key combination and no character is inserted into the |
15109 | | * document, but FF fires the keypress for char code `100` anyway. |
15110 | | * No `input` event will occur. |
15111 | | * |
15112 | | * - `which` is the pressed key code, but a command combination is |
15113 | | * being used. Ex: `Cmd+C`. No character is inserted, and no |
15114 | | * `input` event will occur. |
15115 | | */ |
15116 | | if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { |
15117 | | return String.fromCharCode(nativeEvent.which); |
15118 | | } |
15119 | | return null; |
15120 | | case 'topCompositionEnd': |
15121 | | return useFallbackCompositionData ? null : nativeEvent.data; |
15122 | | default: |
15123 | | return null; |
15124 | | } |
15125 | | } |
15126 | | |
15127 | | /** |
15128 | | * Extract a SyntheticInputEvent for `beforeInput`, based on either native |
15129 | | * `textInput` or fallback behavior. |
15130 | | * |
15131 | | * @return {?object} A SyntheticInputEvent. |
15132 | | */ |
15133 | | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
15134 | | var chars; |
15135 | | |
15136 | | if (canUseTextInputEvent) { |
15137 | | chars = getNativeBeforeInputChars(topLevelType, nativeEvent); |
15138 | | } else { |
15139 | | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); |
15140 | | } |
15141 | | |
15142 | | // If no characters are being inserted, no BeforeInput event should |
15143 | | // be fired. |
15144 | | if (!chars) { |
15145 | | return null; |
15146 | | } |
15147 | | |
15148 | | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); |
15149 | | |
15150 | | event.data = chars; |
15151 | | EventPropagators.accumulateTwoPhaseDispatches(event); |
15152 | | return event; |
15153 | | } |
15154 | | |
15155 | | /** |
15156 | | * Create an `onBeforeInput` event to match |
15157 | | * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. |
15158 | | * |
15159 | | * This event plugin is based on the native `textInput` event |
15160 | | * available in Chrome, Safari, Opera, and IE. This event fires after |
15161 | | * `onKeyPress` and `onCompositionEnd`, but before `onInput`. |
15162 | | * |
15163 | | * `beforeInput` is spec'd but not implemented in any browsers, and |
15164 | | * the `input` event does not provide any useful information about what has |
15165 | | * actually been added, contrary to the spec. Thus, `textInput` is the best |
15166 | | * available event to identify the characters that have actually been inserted |
15167 | | * into the target node. |
15168 | | * |
15169 | | * This plugin is also responsible for emitting `composition` events, thus |
15170 | | * allowing us to share composition fallback code for both `beforeInput` and |
15171 | | * `composition` event types. |
15172 | | */ |
15173 | | var BeforeInputEventPlugin = { |
15174 | | eventTypes: eventTypes, |
15175 | | |
15176 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
15177 | | return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; |
15178 | | } |
15179 | | }; |
15180 | | |
15181 | | module.exports = BeforeInputEventPlugin; |
15182 | | |
15183 | | /***/ }), |
15184 | | /* 377 */ |
15185 | | /***/ (function(module, exports, __webpack_require__) { |
15186 | | |
15187 | | /** |
15188 | | * Copyright (c) 2013-present, Facebook, Inc. |
15189 | | * |
15190 | | * This source code is licensed under the MIT license found in the |
15191 | | * LICENSE file in the root directory of this source tree. |
15192 | | * |
15193 | | */ |
15194 | | |
15195 | | 'use strict'; |
15196 | | |
15197 | | var EventPluginHub = __webpack_require__(378); |
15198 | | var EventPluginUtils = __webpack_require__(380); |
15199 | | |
15200 | | var accumulateInto = __webpack_require__(382); |
15201 | | var forEachAccumulated = __webpack_require__(383); |
15202 | | var warning = __webpack_require__(338); |
15203 | | |
15204 | | var getListener = EventPluginHub.getListener; |
15205 | | |
15206 | | /** |
15207 | | * Some event types have a notion of different registration names for different |
15208 | | * "phases" of propagation. This finds listeners by a given phase. |
15209 | | */ |
15210 | | function listenerAtPhase(inst, event, propagationPhase) { |
15211 | | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; |
15212 | | return getListener(inst, registrationName); |
15213 | | } |
15214 | | |
15215 | | /** |
15216 | | * Tags a `SyntheticEvent` with dispatched listeners. Creating this function |
15217 | | * here, allows us to not have to bind or create functions for each event. |
15218 | | * Mutating the event's members allows us to not have to create a wrapping |
15219 | | * "dispatch" object that pairs the event with the listener. |
15220 | | */ |
15221 | | function accumulateDirectionalDispatches(inst, phase, event) { |
15222 | | if (true) { |
15223 | | true ? warning(inst, 'Dispatching inst must not be null') : void 0; |
15224 | | } |
15225 | | var listener = listenerAtPhase(inst, event, phase); |
15226 | | if (listener) { |
15227 | | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); |
15228 | | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); |
15229 | | } |
15230 | | } |
15231 | | |
15232 | | /** |
15233 | | * Collect dispatches (must be entirely collected before dispatching - see unit |
15234 | | * tests). Lazily allocate the array to conserve memory. We must loop through |
15235 | | * each event and perform the traversal for each one. We cannot perform a |
15236 | | * single traversal for the entire collection of events because each event may |
15237 | | * have a different target. |
15238 | | */ |
15239 | | function accumulateTwoPhaseDispatchesSingle(event) { |
15240 | | if (event && event.dispatchConfig.phasedRegistrationNames) { |
15241 | | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); |
15242 | | } |
15243 | | } |
15244 | | |
15245 | | /** |
15246 | | * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. |
15247 | | */ |
15248 | | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { |
15249 | | if (event && event.dispatchConfig.phasedRegistrationNames) { |
15250 | | var targetInst = event._targetInst; |
15251 | | var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; |
15252 | | EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); |
15253 | | } |
15254 | | } |
15255 | | |
15256 | | /** |
15257 | | * Accumulates without regard to direction, does not look for phased |
15258 | | * registration names. Same as `accumulateDirectDispatchesSingle` but without |
15259 | | * requiring that the `dispatchMarker` be the same as the dispatched ID. |
15260 | | */ |
15261 | | function accumulateDispatches(inst, ignoredDirection, event) { |
15262 | | if (event && event.dispatchConfig.registrationName) { |
15263 | | var registrationName = event.dispatchConfig.registrationName; |
15264 | | var listener = getListener(inst, registrationName); |
15265 | | if (listener) { |
15266 | | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); |
15267 | | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); |
15268 | | } |
15269 | | } |
15270 | | } |
15271 | | |
15272 | | /** |
15273 | | * Accumulates dispatches on an `SyntheticEvent`, but only for the |
15274 | | * `dispatchMarker`. |
15275 | | * @param {SyntheticEvent} event |
15276 | | */ |
15277 | | function accumulateDirectDispatchesSingle(event) { |
15278 | | if (event && event.dispatchConfig.registrationName) { |
15279 | | accumulateDispatches(event._targetInst, null, event); |
15280 | | } |
15281 | | } |
15282 | | |
15283 | | function accumulateTwoPhaseDispatches(events) { |
15284 | | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); |
15285 | | } |
15286 | | |
15287 | | function accumulateTwoPhaseDispatchesSkipTarget(events) { |
15288 | | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); |
15289 | | } |
15290 | | |
15291 | | function accumulateEnterLeaveDispatches(leave, enter, from, to) { |
15292 | | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); |
15293 | | } |
15294 | | |
15295 | | function accumulateDirectDispatches(events) { |
15296 | | forEachAccumulated(events, accumulateDirectDispatchesSingle); |
15297 | | } |
15298 | | |
15299 | | /** |
15300 | | * A small set of propagation patterns, each of which will accept a small amount |
15301 | | * of information, and generate a set of "dispatch ready event objects" - which |
15302 | | * are sets of events that have already been annotated with a set of dispatched |
15303 | | * listener functions/ids. The API is designed this way to discourage these |
15304 | | * propagation strategies from actually executing the dispatches, since we |
15305 | | * always want to collect the entire set of dispatches before executing event a |
15306 | | * single one. |
15307 | | * |
15308 | | * @constructor EventPropagators |
15309 | | */ |
15310 | | var EventPropagators = { |
15311 | | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, |
15312 | | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, |
15313 | | accumulateDirectDispatches: accumulateDirectDispatches, |
15314 | | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches |
15315 | | }; |
15316 | | |
15317 | | module.exports = EventPropagators; |
15318 | | |
15319 | | /***/ }), |
15320 | | /* 378 */ |
15321 | | /***/ (function(module, exports, __webpack_require__) { |
15322 | | |
15323 | | /** |
15324 | | * Copyright (c) 2013-present, Facebook, Inc. |
15325 | | * |
15326 | | * This source code is licensed under the MIT license found in the |
15327 | | * LICENSE file in the root directory of this source tree. |
15328 | | * |
15329 | | */ |
15330 | | |
15331 | | 'use strict'; |
15332 | | |
15333 | | var _prodInvariant = __webpack_require__(371); |
15334 | | |
15335 | | var EventPluginRegistry = __webpack_require__(379); |
15336 | | var EventPluginUtils = __webpack_require__(380); |
15337 | | var ReactErrorUtils = __webpack_require__(381); |
15338 | | |
15339 | | var accumulateInto = __webpack_require__(382); |
15340 | | var forEachAccumulated = __webpack_require__(383); |
15341 | | var invariant = __webpack_require__(342); |
15342 | | |
15343 | | /** |
15344 | | * Internal store for event listeners |
15345 | | */ |
15346 | | var listenerBank = {}; |
15347 | | |
15348 | | /** |
15349 | | * Internal queue of events that have accumulated their dispatches and are |
15350 | | * waiting to have their dispatches executed. |
15351 | | */ |
15352 | | var eventQueue = null; |
15353 | | |
15354 | | /** |
15355 | | * Dispatches an event and releases it back into the pool, unless persistent. |
15356 | | * |
15357 | | * @param {?object} event Synthetic event to be dispatched. |
15358 | | * @param {boolean} simulated If the event is simulated (changes exn behavior) |
15359 | | * @private |
15360 | | */ |
15361 | | var executeDispatchesAndRelease = function (event, simulated) { |
15362 | | if (event) { |
15363 | | EventPluginUtils.executeDispatchesInOrder(event, simulated); |
15364 | | |
15365 | | if (!event.isPersistent()) { |
15366 | | event.constructor.release(event); |
15367 | | } |
15368 | | } |
15369 | | }; |
15370 | | var executeDispatchesAndReleaseSimulated = function (e) { |
15371 | | return executeDispatchesAndRelease(e, true); |
15372 | | }; |
15373 | | var executeDispatchesAndReleaseTopLevel = function (e) { |
15374 | | return executeDispatchesAndRelease(e, false); |
15375 | | }; |
15376 | | |
15377 | | var getDictionaryKey = function (inst) { |
15378 | | // Prevents V8 performance issue: |
15379 | | // https://github.com/facebook/react/pull/7232 |
15380 | | return '.' + inst._rootNodeID; |
15381 | | }; |
15382 | | |
15383 | | function isInteractive(tag) { |
15384 | | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; |
15385 | | } |
15386 | | |
15387 | | function shouldPreventMouseEvent(name, type, props) { |
15388 | | switch (name) { |
15389 | | case 'onClick': |
15390 | | case 'onClickCapture': |
15391 | | case 'onDoubleClick': |
15392 | | case 'onDoubleClickCapture': |
15393 | | case 'onMouseDown': |
15394 | | case 'onMouseDownCapture': |
15395 | | case 'onMouseMove': |
15396 | | case 'onMouseMoveCapture': |
15397 | | case 'onMouseUp': |
15398 | | case 'onMouseUpCapture': |
15399 | | return !!(props.disabled && isInteractive(type)); |
15400 | | default: |
15401 | | return false; |
15402 | | } |
15403 | | } |
15404 | | |
15405 | | /** |
15406 | | * This is a unified interface for event plugins to be installed and configured. |
15407 | | * |
15408 | | * Event plugins can implement the following properties: |
15409 | | * |
15410 | | * `extractEvents` {function(string, DOMEventTarget, string, object): *} |
15411 | | * Required. When a top-level event is fired, this method is expected to |
15412 | | * extract synthetic events that will in turn be queued and dispatched. |
15413 | | * |
15414 | | * `eventTypes` {object} |
15415 | | * Optional, plugins that fire events must publish a mapping of registration |
15416 | | * names that are used to register listeners. Values of this mapping must |
15417 | | * be objects that contain `registrationName` or `phasedRegistrationNames`. |
15418 | | * |
15419 | | * `executeDispatch` {function(object, function, string)} |
15420 | | * Optional, allows plugins to override how an event gets dispatched. By |
15421 | | * default, the listener is simply invoked. |
15422 | | * |
15423 | | * Each plugin that is injected into `EventsPluginHub` is immediately operable. |
15424 | | * |
15425 | | * @public |
15426 | | */ |
15427 | | var EventPluginHub = { |
15428 | | /** |
15429 | | * Methods for injecting dependencies. |
15430 | | */ |
15431 | | injection: { |
15432 | | /** |
15433 | | * @param {array} InjectedEventPluginOrder |
15434 | | * @public |
15435 | | */ |
15436 | | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, |
15437 | | |
15438 | | /** |
15439 | | * @param {object} injectedNamesToPlugins Map from names to plugin modules. |
15440 | | */ |
15441 | | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName |
15442 | | }, |
15443 | | |
15444 | | /** |
15445 | | * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. |
15446 | | * |
15447 | | * @param {object} inst The instance, which is the source of events. |
15448 | | * @param {string} registrationName Name of listener (e.g. `onClick`). |
15449 | | * @param {function} listener The callback to store. |
15450 | | */ |
15451 | | putListener: function (inst, registrationName, listener) { |
15452 | | !(typeof listener === 'function') ? true ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; |
15453 | | |
15454 | | var key = getDictionaryKey(inst); |
15455 | | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); |
15456 | | bankForRegistrationName[key] = listener; |
15457 | | |
15458 | | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; |
15459 | | if (PluginModule && PluginModule.didPutListener) { |
15460 | | PluginModule.didPutListener(inst, registrationName, listener); |
15461 | | } |
15462 | | }, |
15463 | | |
15464 | | /** |
15465 | | * @param {object} inst The instance, which is the source of events. |
15466 | | * @param {string} registrationName Name of listener (e.g. `onClick`). |
15467 | | * @return {?function} The stored callback. |
15468 | | */ |
15469 | | getListener: function (inst, registrationName) { |
15470 | | // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not |
15471 | | // live here; needs to be moved to a better place soon |
15472 | | var bankForRegistrationName = listenerBank[registrationName]; |
15473 | | if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { |
15474 | | return null; |
15475 | | } |
15476 | | var key = getDictionaryKey(inst); |
15477 | | return bankForRegistrationName && bankForRegistrationName[key]; |
15478 | | }, |
15479 | | |
15480 | | /** |
15481 | | * Deletes a listener from the registration bank. |
15482 | | * |
15483 | | * @param {object} inst The instance, which is the source of events. |
15484 | | * @param {string} registrationName Name of listener (e.g. `onClick`). |
15485 | | */ |
15486 | | deleteListener: function (inst, registrationName) { |
15487 | | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; |
15488 | | if (PluginModule && PluginModule.willDeleteListener) { |
15489 | | PluginModule.willDeleteListener(inst, registrationName); |
15490 | | } |
15491 | | |
15492 | | var bankForRegistrationName = listenerBank[registrationName]; |
15493 | | // TODO: This should never be null -- when is it? |
15494 | | if (bankForRegistrationName) { |
15495 | | var key = getDictionaryKey(inst); |
15496 | | delete bankForRegistrationName[key]; |
15497 | | } |
15498 | | }, |
15499 | | |
15500 | | /** |
15501 | | * Deletes all listeners for the DOM element with the supplied ID. |
15502 | | * |
15503 | | * @param {object} inst The instance, which is the source of events. |
15504 | | */ |
15505 | | deleteAllListeners: function (inst) { |
15506 | | var key = getDictionaryKey(inst); |
15507 | | for (var registrationName in listenerBank) { |
15508 | | if (!listenerBank.hasOwnProperty(registrationName)) { |
15509 | | continue; |
15510 | | } |
15511 | | |
15512 | | if (!listenerBank[registrationName][key]) { |
15513 | | continue; |
15514 | | } |
15515 | | |
15516 | | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; |
15517 | | if (PluginModule && PluginModule.willDeleteListener) { |
15518 | | PluginModule.willDeleteListener(inst, registrationName); |
15519 | | } |
15520 | | |
15521 | | delete listenerBank[registrationName][key]; |
15522 | | } |
15523 | | }, |
15524 | | |
15525 | | /** |
15526 | | * Allows registered plugins an opportunity to extract events from top-level |
15527 | | * native browser events. |
15528 | | * |
15529 | | * @return {*} An accumulation of synthetic events. |
15530 | | * @internal |
15531 | | */ |
15532 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
15533 | | var events; |
15534 | | var plugins = EventPluginRegistry.plugins; |
15535 | | for (var i = 0; i < plugins.length; i++) { |
15536 | | // Not every plugin in the ordering may be loaded at runtime. |
15537 | | var possiblePlugin = plugins[i]; |
15538 | | if (possiblePlugin) { |
15539 | | var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); |
15540 | | if (extractedEvents) { |
15541 | | events = accumulateInto(events, extractedEvents); |
15542 | | } |
15543 | | } |
15544 | | } |
15545 | | return events; |
15546 | | }, |
15547 | | |
15548 | | /** |
15549 | | * Enqueues a synthetic event that should be dispatched when |
15550 | | * `processEventQueue` is invoked. |
15551 | | * |
15552 | | * @param {*} events An accumulation of synthetic events. |
15553 | | * @internal |
15554 | | */ |
15555 | | enqueueEvents: function (events) { |
15556 | | if (events) { |
15557 | | eventQueue = accumulateInto(eventQueue, events); |
15558 | | } |
15559 | | }, |
15560 | | |
15561 | | /** |
15562 | | * Dispatches all synthetic events on the event queue. |
15563 | | * |
15564 | | * @internal |
15565 | | */ |
15566 | | processEventQueue: function (simulated) { |
15567 | | // Set `eventQueue` to null before processing it so that we can tell if more |
15568 | | // events get enqueued while processing. |
15569 | | var processingEventQueue = eventQueue; |
15570 | | eventQueue = null; |
15571 | | if (simulated) { |
15572 | | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); |
15573 | | } else { |
15574 | | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); |
15575 | | } |
15576 | | !!eventQueue ? true ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; |
15577 | | // This would be a good time to rethrow if any of the event handlers threw. |
15578 | | ReactErrorUtils.rethrowCaughtError(); |
15579 | | }, |
15580 | | |
15581 | | /** |
15582 | | * These are needed for tests only. Do not use! |
15583 | | */ |
15584 | | __purge: function () { |
15585 | | listenerBank = {}; |
15586 | | }, |
15587 | | |
15588 | | __getListenerBank: function () { |
15589 | | return listenerBank; |
15590 | | } |
15591 | | }; |
15592 | | |
15593 | | module.exports = EventPluginHub; |
15594 | | |
15595 | | /***/ }), |
15596 | | /* 379 */ |
15597 | | /***/ (function(module, exports, __webpack_require__) { |
15598 | | |
15599 | | /** |
15600 | | * Copyright (c) 2013-present, Facebook, Inc. |
15601 | | * |
15602 | | * This source code is licensed under the MIT license found in the |
15603 | | * LICENSE file in the root directory of this source tree. |
15604 | | * |
15605 | | * |
15606 | | */ |
15607 | | |
15608 | | 'use strict'; |
15609 | | |
15610 | | var _prodInvariant = __webpack_require__(371); |
15611 | | |
15612 | | var invariant = __webpack_require__(342); |
15613 | | |
15614 | | /** |
15615 | | * Injectable ordering of event plugins. |
15616 | | */ |
15617 | | var eventPluginOrder = null; |
15618 | | |
15619 | | /** |
15620 | | * Injectable mapping from names to event plugin modules. |
15621 | | */ |
15622 | | var namesToPlugins = {}; |
15623 | | |
15624 | | /** |
15625 | | * Recomputes the plugin list using the injected plugins and plugin ordering. |
15626 | | * |
15627 | | * @private |
15628 | | */ |
15629 | | function recomputePluginOrdering() { |
15630 | | if (!eventPluginOrder) { |
15631 | | // Wait until an `eventPluginOrder` is injected. |
15632 | | return; |
15633 | | } |
15634 | | for (var pluginName in namesToPlugins) { |
15635 | | var pluginModule = namesToPlugins[pluginName]; |
15636 | | var pluginIndex = eventPluginOrder.indexOf(pluginName); |
15637 | | !(pluginIndex > -1) ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; |
15638 | | if (EventPluginRegistry.plugins[pluginIndex]) { |
15639 | | continue; |
15640 | | } |
15641 | | !pluginModule.extractEvents ? true ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; |
15642 | | EventPluginRegistry.plugins[pluginIndex] = pluginModule; |
15643 | | var publishedEvents = pluginModule.eventTypes; |
15644 | | for (var eventName in publishedEvents) { |
15645 | | !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? true ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; |
15646 | | } |
15647 | | } |
15648 | | } |
15649 | | |
15650 | | /** |
15651 | | * Publishes an event so that it can be dispatched by the supplied plugin. |
15652 | | * |
15653 | | * @param {object} dispatchConfig Dispatch configuration for the event. |
15654 | | * @param {object} PluginModule Plugin publishing the event. |
15655 | | * @return {boolean} True if the event was successfully published. |
15656 | | * @private |
15657 | | */ |
15658 | | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { |
15659 | | !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; |
15660 | | EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; |
15661 | | |
15662 | | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; |
15663 | | if (phasedRegistrationNames) { |
15664 | | for (var phaseName in phasedRegistrationNames) { |
15665 | | if (phasedRegistrationNames.hasOwnProperty(phaseName)) { |
15666 | | var phasedRegistrationName = phasedRegistrationNames[phaseName]; |
15667 | | publishRegistrationName(phasedRegistrationName, pluginModule, eventName); |
15668 | | } |
15669 | | } |
15670 | | return true; |
15671 | | } else if (dispatchConfig.registrationName) { |
15672 | | publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); |
15673 | | return true; |
15674 | | } |
15675 | | return false; |
15676 | | } |
15677 | | |
15678 | | /** |
15679 | | * Publishes a registration name that is used to identify dispatched events and |
15680 | | * can be used with `EventPluginHub.putListener` to register listeners. |
15681 | | * |
15682 | | * @param {string} registrationName Registration name to add. |
15683 | | * @param {object} PluginModule Plugin publishing the event. |
15684 | | * @private |
15685 | | */ |
15686 | | function publishRegistrationName(registrationName, pluginModule, eventName) { |
15687 | | !!EventPluginRegistry.registrationNameModules[registrationName] ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; |
15688 | | EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; |
15689 | | EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; |
15690 | | |
15691 | | if (true) { |
15692 | | var lowerCasedName = registrationName.toLowerCase(); |
15693 | | EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; |
15694 | | |
15695 | | if (registrationName === 'onDoubleClick') { |
15696 | | EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; |
15697 | | } |
15698 | | } |
15699 | | } |
15700 | | |
15701 | | /** |
15702 | | * Registers plugins so that they can extract and dispatch events. |
15703 | | * |
15704 | | * @see {EventPluginHub} |
15705 | | */ |
15706 | | var EventPluginRegistry = { |
15707 | | /** |
15708 | | * Ordered list of injected plugins. |
15709 | | */ |
15710 | | plugins: [], |
15711 | | |
15712 | | /** |
15713 | | * Mapping from event name to dispatch config |
15714 | | */ |
15715 | | eventNameDispatchConfigs: {}, |
15716 | | |
15717 | | /** |
15718 | | * Mapping from registration name to plugin module |
15719 | | */ |
15720 | | registrationNameModules: {}, |
15721 | | |
15722 | | /** |
15723 | | * Mapping from registration name to event name |
15724 | | */ |
15725 | | registrationNameDependencies: {}, |
15726 | | |
15727 | | /** |
15728 | | * Mapping from lowercase registration names to the properly cased version, |
15729 | | * used to warn in the case of missing event handlers. Available |
15730 | | * only in __DEV__. |
15731 | | * @type {Object} |
15732 | | */ |
15733 | | possibleRegistrationNames: true ? {} : null, |
15734 | | // Trust the developer to only use possibleRegistrationNames in __DEV__ |
15735 | | |
15736 | | /** |
15737 | | * Injects an ordering of plugins (by plugin name). This allows the ordering |
15738 | | * to be decoupled from injection of the actual plugins so that ordering is |
15739 | | * always deterministic regardless of packaging, on-the-fly injection, etc. |
15740 | | * |
15741 | | * @param {array} InjectedEventPluginOrder |
15742 | | * @internal |
15743 | | * @see {EventPluginHub.injection.injectEventPluginOrder} |
15744 | | */ |
15745 | | injectEventPluginOrder: function (injectedEventPluginOrder) { |
15746 | | !!eventPluginOrder ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; |
15747 | | // Clone the ordering so it cannot be dynamically mutated. |
15748 | | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); |
15749 | | recomputePluginOrdering(); |
15750 | | }, |
15751 | | |
15752 | | /** |
15753 | | * Injects plugins to be used by `EventPluginHub`. The plugin names must be |
15754 | | * in the ordering injected by `injectEventPluginOrder`. |
15755 | | * |
15756 | | * Plugins can be injected as part of page initialization or on-the-fly. |
15757 | | * |
15758 | | * @param {object} injectedNamesToPlugins Map from names to plugin modules. |
15759 | | * @internal |
15760 | | * @see {EventPluginHub.injection.injectEventPluginsByName} |
15761 | | */ |
15762 | | injectEventPluginsByName: function (injectedNamesToPlugins) { |
15763 | | var isOrderingDirty = false; |
15764 | | for (var pluginName in injectedNamesToPlugins) { |
15765 | | if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { |
15766 | | continue; |
15767 | | } |
15768 | | var pluginModule = injectedNamesToPlugins[pluginName]; |
15769 | | if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { |
15770 | | !!namesToPlugins[pluginName] ? true ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; |
15771 | | namesToPlugins[pluginName] = pluginModule; |
15772 | | isOrderingDirty = true; |
15773 | | } |
15774 | | } |
15775 | | if (isOrderingDirty) { |
15776 | | recomputePluginOrdering(); |
15777 | | } |
15778 | | }, |
15779 | | |
15780 | | /** |
15781 | | * Looks up the plugin for the supplied event. |
15782 | | * |
15783 | | * @param {object} event A synthetic event. |
15784 | | * @return {?object} The plugin that created the supplied event. |
15785 | | * @internal |
15786 | | */ |
15787 | | getPluginModuleForEvent: function (event) { |
15788 | | var dispatchConfig = event.dispatchConfig; |
15789 | | if (dispatchConfig.registrationName) { |
15790 | | return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; |
15791 | | } |
15792 | | if (dispatchConfig.phasedRegistrationNames !== undefined) { |
15793 | | // pulling phasedRegistrationNames out of dispatchConfig helps Flow see |
15794 | | // that it is not undefined. |
15795 | | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; |
15796 | | |
15797 | | for (var phase in phasedRegistrationNames) { |
15798 | | if (!phasedRegistrationNames.hasOwnProperty(phase)) { |
15799 | | continue; |
15800 | | } |
15801 | | var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; |
15802 | | if (pluginModule) { |
15803 | | return pluginModule; |
15804 | | } |
15805 | | } |
15806 | | } |
15807 | | return null; |
15808 | | }, |
15809 | | |
15810 | | /** |
15811 | | * Exposed for unit testing. |
15812 | | * @private |
15813 | | */ |
15814 | | _resetEventPlugins: function () { |
15815 | | eventPluginOrder = null; |
15816 | | for (var pluginName in namesToPlugins) { |
15817 | | if (namesToPlugins.hasOwnProperty(pluginName)) { |
15818 | | delete namesToPlugins[pluginName]; |
15819 | | } |
15820 | | } |
15821 | | EventPluginRegistry.plugins.length = 0; |
15822 | | |
15823 | | var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; |
15824 | | for (var eventName in eventNameDispatchConfigs) { |
15825 | | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { |
15826 | | delete eventNameDispatchConfigs[eventName]; |
15827 | | } |
15828 | | } |
15829 | | |
15830 | | var registrationNameModules = EventPluginRegistry.registrationNameModules; |
15831 | | for (var registrationName in registrationNameModules) { |
15832 | | if (registrationNameModules.hasOwnProperty(registrationName)) { |
15833 | | delete registrationNameModules[registrationName]; |
15834 | | } |
15835 | | } |
15836 | | |
15837 | | if (true) { |
15838 | | var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; |
15839 | | for (var lowerCasedName in possibleRegistrationNames) { |
15840 | | if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { |
15841 | | delete possibleRegistrationNames[lowerCasedName]; |
15842 | | } |
15843 | | } |
15844 | | } |
15845 | | } |
15846 | | }; |
15847 | | |
15848 | | module.exports = EventPluginRegistry; |
15849 | | |
15850 | | /***/ }), |
15851 | | /* 380 */ |
15852 | | /***/ (function(module, exports, __webpack_require__) { |
15853 | | |
15854 | | /** |
15855 | | * Copyright (c) 2013-present, Facebook, Inc. |
15856 | | * |
15857 | | * This source code is licensed under the MIT license found in the |
15858 | | * LICENSE file in the root directory of this source tree. |
15859 | | * |
15860 | | */ |
15861 | | |
15862 | | 'use strict'; |
15863 | | |
15864 | | var _prodInvariant = __webpack_require__(371); |
15865 | | |
15866 | | var ReactErrorUtils = __webpack_require__(381); |
15867 | | |
15868 | | var invariant = __webpack_require__(342); |
15869 | | var warning = __webpack_require__(338); |
15870 | | |
15871 | | /** |
15872 | | * Injected dependencies: |
15873 | | */ |
15874 | | |
15875 | | /** |
15876 | | * - `ComponentTree`: [required] Module that can convert between React instances |
15877 | | * and actual node references. |
15878 | | */ |
15879 | | var ComponentTree; |
15880 | | var TreeTraversal; |
15881 | | var injection = { |
15882 | | injectComponentTree: function (Injected) { |
15883 | | ComponentTree = Injected; |
15884 | | if (true) { |
15885 | | true ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; |
15886 | | } |
15887 | | }, |
15888 | | injectTreeTraversal: function (Injected) { |
15889 | | TreeTraversal = Injected; |
15890 | | if (true) { |
15891 | | true ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; |
15892 | | } |
15893 | | } |
15894 | | }; |
15895 | | |
15896 | | function isEndish(topLevelType) { |
15897 | | return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; |
15898 | | } |
15899 | | |
15900 | | function isMoveish(topLevelType) { |
15901 | | return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; |
15902 | | } |
15903 | | function isStartish(topLevelType) { |
15904 | | return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; |
15905 | | } |
15906 | | |
15907 | | var validateEventDispatches; |
15908 | | if (true) { |
15909 | | validateEventDispatches = function (event) { |
15910 | | var dispatchListeners = event._dispatchListeners; |
15911 | | var dispatchInstances = event._dispatchInstances; |
15912 | | |
15913 | | var listenersIsArr = Array.isArray(dispatchListeners); |
15914 | | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; |
15915 | | |
15916 | | var instancesIsArr = Array.isArray(dispatchInstances); |
15917 | | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; |
15918 | | |
15919 | | true ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; |
15920 | | }; |
15921 | | } |
15922 | | |
15923 | | /** |
15924 | | * Dispatch the event to the listener. |
15925 | | * @param {SyntheticEvent} event SyntheticEvent to handle |
15926 | | * @param {boolean} simulated If the event is simulated (changes exn behavior) |
15927 | | * @param {function} listener Application-level callback |
15928 | | * @param {*} inst Internal component instance |
15929 | | */ |
15930 | | function executeDispatch(event, simulated, listener, inst) { |
15931 | | var type = event.type || 'unknown-event'; |
15932 | | event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); |
15933 | | if (simulated) { |
15934 | | ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); |
15935 | | } else { |
15936 | | ReactErrorUtils.invokeGuardedCallback(type, listener, event); |
15937 | | } |
15938 | | event.currentTarget = null; |
15939 | | } |
15940 | | |
15941 | | /** |
15942 | | * Standard/simple iteration through an event's collected dispatches. |
15943 | | */ |
15944 | | function executeDispatchesInOrder(event, simulated) { |
15945 | | var dispatchListeners = event._dispatchListeners; |
15946 | | var dispatchInstances = event._dispatchInstances; |
15947 | | if (true) { |
15948 | | validateEventDispatches(event); |
15949 | | } |
15950 | | if (Array.isArray(dispatchListeners)) { |
15951 | | for (var i = 0; i < dispatchListeners.length; i++) { |
15952 | | if (event.isPropagationStopped()) { |
15953 | | break; |
15954 | | } |
15955 | | // Listeners and Instances are two parallel arrays that are always in sync. |
15956 | | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); |
15957 | | } |
15958 | | } else if (dispatchListeners) { |
15959 | | executeDispatch(event, simulated, dispatchListeners, dispatchInstances); |
15960 | | } |
15961 | | event._dispatchListeners = null; |
15962 | | event._dispatchInstances = null; |
15963 | | } |
15964 | | |
15965 | | /** |
15966 | | * Standard/simple iteration through an event's collected dispatches, but stops |
15967 | | * at the first dispatch execution returning true, and returns that id. |
15968 | | * |
15969 | | * @return {?string} id of the first dispatch execution who's listener returns |
15970 | | * true, or null if no listener returned true. |
15971 | | */ |
15972 | | function executeDispatchesInOrderStopAtTrueImpl(event) { |
15973 | | var dispatchListeners = event._dispatchListeners; |
15974 | | var dispatchInstances = event._dispatchInstances; |
15975 | | if (true) { |
15976 | | validateEventDispatches(event); |
15977 | | } |
15978 | | if (Array.isArray(dispatchListeners)) { |
15979 | | for (var i = 0; i < dispatchListeners.length; i++) { |
15980 | | if (event.isPropagationStopped()) { |
15981 | | break; |
15982 | | } |
15983 | | // Listeners and Instances are two parallel arrays that are always in sync. |
15984 | | if (dispatchListeners[i](event, dispatchInstances[i])) { |
15985 | | return dispatchInstances[i]; |
15986 | | } |
15987 | | } |
15988 | | } else if (dispatchListeners) { |
15989 | | if (dispatchListeners(event, dispatchInstances)) { |
15990 | | return dispatchInstances; |
15991 | | } |
15992 | | } |
15993 | | return null; |
15994 | | } |
15995 | | |
15996 | | /** |
15997 | | * @see executeDispatchesInOrderStopAtTrueImpl |
15998 | | */ |
15999 | | function executeDispatchesInOrderStopAtTrue(event) { |
16000 | | var ret = executeDispatchesInOrderStopAtTrueImpl(event); |
16001 | | event._dispatchInstances = null; |
16002 | | event._dispatchListeners = null; |
16003 | | return ret; |
16004 | | } |
16005 | | |
16006 | | /** |
16007 | | * Execution of a "direct" dispatch - there must be at most one dispatch |
16008 | | * accumulated on the event or it is considered an error. It doesn't really make |
16009 | | * sense for an event with multiple dispatches (bubbled) to keep track of the |
16010 | | * return values at each dispatch execution, but it does tend to make sense when |
16011 | | * dealing with "direct" dispatches. |
16012 | | * |
16013 | | * @return {*} The return value of executing the single dispatch. |
16014 | | */ |
16015 | | function executeDirectDispatch(event) { |
16016 | | if (true) { |
16017 | | validateEventDispatches(event); |
16018 | | } |
16019 | | var dispatchListener = event._dispatchListeners; |
16020 | | var dispatchInstance = event._dispatchInstances; |
16021 | | !!Array.isArray(dispatchListener) ? true ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; |
16022 | | event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; |
16023 | | var res = dispatchListener ? dispatchListener(event) : null; |
16024 | | event.currentTarget = null; |
16025 | | event._dispatchListeners = null; |
16026 | | event._dispatchInstances = null; |
16027 | | return res; |
16028 | | } |
16029 | | |
16030 | | /** |
16031 | | * @param {SyntheticEvent} event |
16032 | | * @return {boolean} True iff number of dispatches accumulated is greater than 0. |
16033 | | */ |
16034 | | function hasDispatches(event) { |
16035 | | return !!event._dispatchListeners; |
16036 | | } |
16037 | | |
16038 | | /** |
16039 | | * General utilities that are useful in creating custom Event Plugins. |
16040 | | */ |
16041 | | var EventPluginUtils = { |
16042 | | isEndish: isEndish, |
16043 | | isMoveish: isMoveish, |
16044 | | isStartish: isStartish, |
16045 | | |
16046 | | executeDirectDispatch: executeDirectDispatch, |
16047 | | executeDispatchesInOrder: executeDispatchesInOrder, |
16048 | | executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, |
16049 | | hasDispatches: hasDispatches, |
16050 | | |
16051 | | getInstanceFromNode: function (node) { |
16052 | | return ComponentTree.getInstanceFromNode(node); |
16053 | | }, |
16054 | | getNodeFromInstance: function (node) { |
16055 | | return ComponentTree.getNodeFromInstance(node); |
16056 | | }, |
16057 | | isAncestor: function (a, b) { |
16058 | | return TreeTraversal.isAncestor(a, b); |
16059 | | }, |
16060 | | getLowestCommonAncestor: function (a, b) { |
16061 | | return TreeTraversal.getLowestCommonAncestor(a, b); |
16062 | | }, |
16063 | | getParentInstance: function (inst) { |
16064 | | return TreeTraversal.getParentInstance(inst); |
16065 | | }, |
16066 | | traverseTwoPhase: function (target, fn, arg) { |
16067 | | return TreeTraversal.traverseTwoPhase(target, fn, arg); |
16068 | | }, |
16069 | | traverseEnterLeave: function (from, to, fn, argFrom, argTo) { |
16070 | | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); |
16071 | | }, |
16072 | | |
16073 | | injection: injection |
16074 | | }; |
16075 | | |
16076 | | module.exports = EventPluginUtils; |
16077 | | |
16078 | | /***/ }), |
16079 | | /* 381 */ |
16080 | | /***/ (function(module, exports, __webpack_require__) { |
16081 | | |
16082 | | /** |
16083 | | * Copyright (c) 2013-present, Facebook, Inc. |
16084 | | * |
16085 | | * This source code is licensed under the MIT license found in the |
16086 | | * LICENSE file in the root directory of this source tree. |
16087 | | * |
16088 | | * |
16089 | | */ |
16090 | | |
16091 | | 'use strict'; |
16092 | | |
16093 | | var caughtError = null; |
16094 | | |
16095 | | /** |
16096 | | * Call a function while guarding against errors that happens within it. |
16097 | | * |
16098 | | * @param {String} name of the guard to use for logging or debugging |
16099 | | * @param {Function} func The function to invoke |
16100 | | * @param {*} a First argument |
16101 | | * @param {*} b Second argument |
16102 | | */ |
16103 | | function invokeGuardedCallback(name, func, a) { |
16104 | | try { |
16105 | | func(a); |
16106 | | } catch (x) { |
16107 | | if (caughtError === null) { |
16108 | | caughtError = x; |
16109 | | } |
16110 | | } |
16111 | | } |
16112 | | |
16113 | | var ReactErrorUtils = { |
16114 | | invokeGuardedCallback: invokeGuardedCallback, |
16115 | | |
16116 | | /** |
16117 | | * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event |
16118 | | * handler are sure to be rethrown by rethrowCaughtError. |
16119 | | */ |
16120 | | invokeGuardedCallbackWithCatch: invokeGuardedCallback, |
16121 | | |
16122 | | /** |
16123 | | * During execution of guarded functions we will capture the first error which |
16124 | | * we will rethrow to be handled by the top level error handler. |
16125 | | */ |
16126 | | rethrowCaughtError: function () { |
16127 | | if (caughtError) { |
16128 | | var error = caughtError; |
16129 | | caughtError = null; |
16130 | | throw error; |
16131 | | } |
16132 | | } |
16133 | | }; |
16134 | | |
16135 | | if (true) { |
16136 | | /** |
16137 | | * To help development we can get better devtools integration by simulating a |
16138 | | * real browser event. |
16139 | | */ |
16140 | | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { |
16141 | | var fakeNode = document.createElement('react'); |
16142 | | ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { |
16143 | | var boundFunc = function () { |
16144 | | func(a); |
16145 | | }; |
16146 | | var evtType = 'react-' + name; |
16147 | | fakeNode.addEventListener(evtType, boundFunc, false); |
16148 | | var evt = document.createEvent('Event'); |
16149 | | evt.initEvent(evtType, false, false); |
16150 | | fakeNode.dispatchEvent(evt); |
16151 | | fakeNode.removeEventListener(evtType, boundFunc, false); |
16152 | | }; |
16153 | | } |
16154 | | } |
16155 | | |
16156 | | module.exports = ReactErrorUtils; |
16157 | | |
16158 | | /***/ }), |
16159 | | /* 382 */ |
16160 | | /***/ (function(module, exports, __webpack_require__) { |
16161 | | |
16162 | | /** |
16163 | | * Copyright (c) 2014-present, Facebook, Inc. |
16164 | | * |
16165 | | * This source code is licensed under the MIT license found in the |
16166 | | * LICENSE file in the root directory of this source tree. |
16167 | | * |
16168 | | * |
16169 | | */ |
16170 | | |
16171 | | 'use strict'; |
16172 | | |
16173 | | var _prodInvariant = __webpack_require__(371); |
16174 | | |
16175 | | var invariant = __webpack_require__(342); |
16176 | | |
16177 | | /** |
16178 | | * Accumulates items that must not be null or undefined into the first one. This |
16179 | | * is used to conserve memory by avoiding array allocations, and thus sacrifices |
16180 | | * API cleanness. Since `current` can be null before being passed in and not |
16181 | | * null after this function, make sure to assign it back to `current`: |
16182 | | * |
16183 | | * `a = accumulateInto(a, b);` |
16184 | | * |
16185 | | * This API should be sparingly used. Try `accumulate` for something cleaner. |
16186 | | * |
16187 | | * @return {*|array<*>} An accumulation of items. |
16188 | | */ |
16189 | | |
16190 | | function accumulateInto(current, next) { |
16191 | | !(next != null) ? true ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; |
16192 | | |
16193 | | if (current == null) { |
16194 | | return next; |
16195 | | } |
16196 | | |
16197 | | // Both are not empty. Warning: Never call x.concat(y) when you are not |
16198 | | // certain that x is an Array (x could be a string with concat method). |
16199 | | if (Array.isArray(current)) { |
16200 | | if (Array.isArray(next)) { |
16201 | | current.push.apply(current, next); |
16202 | | return current; |
16203 | | } |
16204 | | current.push(next); |
16205 | | return current; |
16206 | | } |
16207 | | |
16208 | | if (Array.isArray(next)) { |
16209 | | // A bit too dangerous to mutate `next`. |
16210 | | return [current].concat(next); |
16211 | | } |
16212 | | |
16213 | | return [current, next]; |
16214 | | } |
16215 | | |
16216 | | module.exports = accumulateInto; |
16217 | | |
16218 | | /***/ }), |
16219 | | /* 383 */ |
16220 | | /***/ (function(module, exports) { |
16221 | | |
16222 | | /** |
16223 | | * Copyright (c) 2013-present, Facebook, Inc. |
16224 | | * |
16225 | | * This source code is licensed under the MIT license found in the |
16226 | | * LICENSE file in the root directory of this source tree. |
16227 | | * |
16228 | | * |
16229 | | */ |
16230 | | |
16231 | | 'use strict'; |
16232 | | |
16233 | | /** |
16234 | | * @param {array} arr an "accumulation" of items which is either an Array or |
16235 | | * a single item. Useful when paired with the `accumulate` module. This is a |
16236 | | * simple utility that allows us to reason about a collection of items, but |
16237 | | * handling the case when there is exactly one item (and we do not need to |
16238 | | * allocate an array). |
16239 | | */ |
16240 | | |
16241 | | function forEachAccumulated(arr, cb, scope) { |
16242 | | if (Array.isArray(arr)) { |
16243 | | arr.forEach(cb, scope); |
16244 | | } else if (arr) { |
16245 | | cb.call(scope, arr); |
16246 | | } |
16247 | | } |
16248 | | |
16249 | | module.exports = forEachAccumulated; |
16250 | | |
16251 | | /***/ }), |
16252 | | /* 384 */ |
16253 | | /***/ (function(module, exports) { |
16254 | | |
16255 | | /** |
16256 | | * Copyright (c) 2013-present, Facebook, Inc. |
16257 | | * |
16258 | | * This source code is licensed under the MIT license found in the |
16259 | | * LICENSE file in the root directory of this source tree. |
16260 | | * |
16261 | | */ |
16262 | | |
16263 | | 'use strict'; |
16264 | | |
16265 | | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); |
16266 | | |
16267 | | /** |
16268 | | * Simple, lightweight module assisting with the detection and context of |
16269 | | * Worker. Helps avoid circular dependencies and allows code to reason about |
16270 | | * whether or not they are in a Worker, even if they never include the main |
16271 | | * `ReactWorker` dependency. |
16272 | | */ |
16273 | | var ExecutionEnvironment = { |
16274 | | |
16275 | | canUseDOM: canUseDOM, |
16276 | | |
16277 | | canUseWorkers: typeof Worker !== 'undefined', |
16278 | | |
16279 | | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), |
16280 | | |
16281 | | canUseViewport: canUseDOM && !!window.screen, |
16282 | | |
16283 | | isInWorker: !canUseDOM // For now, this is true - might change in the future. |
16284 | | |
16285 | | }; |
16286 | | |
16287 | | module.exports = ExecutionEnvironment; |
16288 | | |
16289 | | /***/ }), |
16290 | | /* 385 */ |
16291 | | /***/ (function(module, exports, __webpack_require__) { |
16292 | | |
16293 | | /** |
16294 | | * Copyright (c) 2013-present, Facebook, Inc. |
16295 | | * |
16296 | | * This source code is licensed under the MIT license found in the |
16297 | | * LICENSE file in the root directory of this source tree. |
16298 | | * |
16299 | | */ |
16300 | | |
16301 | | 'use strict'; |
16302 | | |
16303 | | var _assign = __webpack_require__(334); |
16304 | | |
16305 | | var PooledClass = __webpack_require__(386); |
16306 | | |
16307 | | var getTextContentAccessor = __webpack_require__(387); |
16308 | | |
16309 | | /** |
16310 | | * This helper class stores information about text content of a target node, |
16311 | | * allowing comparison of content before and after a given event. |
16312 | | * |
16313 | | * Identify the node where selection currently begins, then observe |
16314 | | * both its text content and its current position in the DOM. Since the |
16315 | | * browser may natively replace the target node during composition, we can |
16316 | | * use its position to find its replacement. |
16317 | | * |
16318 | | * @param {DOMEventTarget} root |
16319 | | */ |
16320 | | function FallbackCompositionState(root) { |
16321 | | this._root = root; |
16322 | | this._startText = this.getText(); |
16323 | | this._fallbackText = null; |
16324 | | } |
16325 | | |
16326 | | _assign(FallbackCompositionState.prototype, { |
16327 | | destructor: function () { |
16328 | | this._root = null; |
16329 | | this._startText = null; |
16330 | | this._fallbackText = null; |
16331 | | }, |
16332 | | |
16333 | | /** |
16334 | | * Get current text of input. |
16335 | | * |
16336 | | * @return {string} |
16337 | | */ |
16338 | | getText: function () { |
16339 | | if ('value' in this._root) { |
16340 | | return this._root.value; |
16341 | | } |
16342 | | return this._root[getTextContentAccessor()]; |
16343 | | }, |
16344 | | |
16345 | | /** |
16346 | | * Determine the differing substring between the initially stored |
16347 | | * text content and the current content. |
16348 | | * |
16349 | | * @return {string} |
16350 | | */ |
16351 | | getData: function () { |
16352 | | if (this._fallbackText) { |
16353 | | return this._fallbackText; |
16354 | | } |
16355 | | |
16356 | | var start; |
16357 | | var startValue = this._startText; |
16358 | | var startLength = startValue.length; |
16359 | | var end; |
16360 | | var endValue = this.getText(); |
16361 | | var endLength = endValue.length; |
16362 | | |
16363 | | for (start = 0; start < startLength; start++) { |
16364 | | if (startValue[start] !== endValue[start]) { |
16365 | | break; |
16366 | | } |
16367 | | } |
16368 | | |
16369 | | var minEnd = startLength - start; |
16370 | | for (end = 1; end <= minEnd; end++) { |
16371 | | if (startValue[startLength - end] !== endValue[endLength - end]) { |
16372 | | break; |
16373 | | } |
16374 | | } |
16375 | | |
16376 | | var sliceTail = end > 1 ? 1 - end : undefined; |
16377 | | this._fallbackText = endValue.slice(start, sliceTail); |
16378 | | return this._fallbackText; |
16379 | | } |
16380 | | }); |
16381 | | |
16382 | | PooledClass.addPoolingTo(FallbackCompositionState); |
16383 | | |
16384 | | module.exports = FallbackCompositionState; |
16385 | | |
16386 | | /***/ }), |
16387 | | /* 386 */ |
16388 | | /***/ (function(module, exports, __webpack_require__) { |
16389 | | |
16390 | | /** |
16391 | | * Copyright (c) 2013-present, Facebook, Inc. |
16392 | | * |
16393 | | * This source code is licensed under the MIT license found in the |
16394 | | * LICENSE file in the root directory of this source tree. |
16395 | | * |
16396 | | * |
16397 | | */ |
16398 | | |
16399 | | 'use strict'; |
16400 | | |
16401 | | var _prodInvariant = __webpack_require__(371); |
16402 | | |
16403 | | var invariant = __webpack_require__(342); |
16404 | | |
16405 | | /** |
16406 | | * Static poolers. Several custom versions for each potential number of |
16407 | | * arguments. A completely generic pooler is easy to implement, but would |
16408 | | * require accessing the `arguments` object. In each of these, `this` refers to |
16409 | | * the Class itself, not an instance. If any others are needed, simply add them |
16410 | | * here, or in their own files. |
16411 | | */ |
16412 | | var oneArgumentPooler = function (copyFieldsFrom) { |
16413 | | var Klass = this; |
16414 | | if (Klass.instancePool.length) { |
16415 | | var instance = Klass.instancePool.pop(); |
16416 | | Klass.call(instance, copyFieldsFrom); |
16417 | | return instance; |
16418 | | } else { |
16419 | | return new Klass(copyFieldsFrom); |
16420 | | } |
16421 | | }; |
16422 | | |
16423 | | var twoArgumentPooler = function (a1, a2) { |
16424 | | var Klass = this; |
16425 | | if (Klass.instancePool.length) { |
16426 | | var instance = Klass.instancePool.pop(); |
16427 | | Klass.call(instance, a1, a2); |
16428 | | return instance; |
16429 | | } else { |
16430 | | return new Klass(a1, a2); |
16431 | | } |
16432 | | }; |
16433 | | |
16434 | | var threeArgumentPooler = function (a1, a2, a3) { |
16435 | | var Klass = this; |
16436 | | if (Klass.instancePool.length) { |
16437 | | var instance = Klass.instancePool.pop(); |
16438 | | Klass.call(instance, a1, a2, a3); |
16439 | | return instance; |
16440 | | } else { |
16441 | | return new Klass(a1, a2, a3); |
16442 | | } |
16443 | | }; |
16444 | | |
16445 | | var fourArgumentPooler = function (a1, a2, a3, a4) { |
16446 | | var Klass = this; |
16447 | | if (Klass.instancePool.length) { |
16448 | | var instance = Klass.instancePool.pop(); |
16449 | | Klass.call(instance, a1, a2, a3, a4); |
16450 | | return instance; |
16451 | | } else { |
16452 | | return new Klass(a1, a2, a3, a4); |
16453 | | } |
16454 | | }; |
16455 | | |
16456 | | var standardReleaser = function (instance) { |
16457 | | var Klass = this; |
16458 | | !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; |
16459 | | instance.destructor(); |
16460 | | if (Klass.instancePool.length < Klass.poolSize) { |
16461 | | Klass.instancePool.push(instance); |
16462 | | } |
16463 | | }; |
16464 | | |
16465 | | var DEFAULT_POOL_SIZE = 10; |
16466 | | var DEFAULT_POOLER = oneArgumentPooler; |
16467 | | |
16468 | | /** |
16469 | | * Augments `CopyConstructor` to be a poolable class, augmenting only the class |
16470 | | * itself (statically) not adding any prototypical fields. Any CopyConstructor |
16471 | | * you give this may have a `poolSize` property, and will look for a |
16472 | | * prototypical `destructor` on instances. |
16473 | | * |
16474 | | * @param {Function} CopyConstructor Constructor that can be used to reset. |
16475 | | * @param {Function} pooler Customizable pooler. |
16476 | | */ |
16477 | | var addPoolingTo = function (CopyConstructor, pooler) { |
16478 | | // Casting as any so that flow ignores the actual implementation and trusts |
16479 | | // it to match the type we declared |
16480 | | var NewKlass = CopyConstructor; |
16481 | | NewKlass.instancePool = []; |
16482 | | NewKlass.getPooled = pooler || DEFAULT_POOLER; |
16483 | | if (!NewKlass.poolSize) { |
16484 | | NewKlass.poolSize = DEFAULT_POOL_SIZE; |
16485 | | } |
16486 | | NewKlass.release = standardReleaser; |
16487 | | return NewKlass; |
16488 | | }; |
16489 | | |
16490 | | var PooledClass = { |
16491 | | addPoolingTo: addPoolingTo, |
16492 | | oneArgumentPooler: oneArgumentPooler, |
16493 | | twoArgumentPooler: twoArgumentPooler, |
16494 | | threeArgumentPooler: threeArgumentPooler, |
16495 | | fourArgumentPooler: fourArgumentPooler |
16496 | | }; |
16497 | | |
16498 | | module.exports = PooledClass; |
16499 | | |
16500 | | /***/ }), |
16501 | | /* 387 */ |
16502 | | /***/ (function(module, exports, __webpack_require__) { |
16503 | | |
16504 | | /** |
16505 | | * Copyright (c) 2013-present, Facebook, Inc. |
16506 | | * |
16507 | | * This source code is licensed under the MIT license found in the |
16508 | | * LICENSE file in the root directory of this source tree. |
16509 | | * |
16510 | | */ |
16511 | | |
16512 | | 'use strict'; |
16513 | | |
16514 | | var ExecutionEnvironment = __webpack_require__(384); |
16515 | | |
16516 | | var contentKey = null; |
16517 | | |
16518 | | /** |
16519 | | * Gets the key used to access text content on a DOM node. |
16520 | | * |
16521 | | * @return {?string} Key used to access text content. |
16522 | | * @internal |
16523 | | */ |
16524 | | function getTextContentAccessor() { |
16525 | | if (!contentKey && ExecutionEnvironment.canUseDOM) { |
16526 | | // Prefer textContent to innerText because many browsers support both but |
16527 | | // SVG <text> elements don't support innerText even when <div> does. |
16528 | | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; |
16529 | | } |
16530 | | return contentKey; |
16531 | | } |
16532 | | |
16533 | | module.exports = getTextContentAccessor; |
16534 | | |
16535 | | /***/ }), |
16536 | | /* 388 */ |
16537 | | /***/ (function(module, exports, __webpack_require__) { |
16538 | | |
16539 | | /** |
16540 | | * Copyright (c) 2013-present, Facebook, Inc. |
16541 | | * |
16542 | | * This source code is licensed under the MIT license found in the |
16543 | | * LICENSE file in the root directory of this source tree. |
16544 | | * |
16545 | | */ |
16546 | | |
16547 | | 'use strict'; |
16548 | | |
16549 | | var SyntheticEvent = __webpack_require__(389); |
16550 | | |
16551 | | /** |
16552 | | * @interface Event |
16553 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents |
16554 | | */ |
16555 | | var CompositionEventInterface = { |
16556 | | data: null |
16557 | | }; |
16558 | | |
16559 | | /** |
16560 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
16561 | | * @param {string} dispatchMarker Marker identifying the event target. |
16562 | | * @param {object} nativeEvent Native browser event. |
16563 | | * @extends {SyntheticUIEvent} |
16564 | | */ |
16565 | | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
16566 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
16567 | | } |
16568 | | |
16569 | | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); |
16570 | | |
16571 | | module.exports = SyntheticCompositionEvent; |
16572 | | |
16573 | | /***/ }), |
16574 | | /* 389 */ |
16575 | | /***/ (function(module, exports, __webpack_require__) { |
16576 | | |
16577 | | /** |
16578 | | * Copyright (c) 2013-present, Facebook, Inc. |
16579 | | * |
16580 | | * This source code is licensed under the MIT license found in the |
16581 | | * LICENSE file in the root directory of this source tree. |
16582 | | * |
16583 | | */ |
16584 | | |
16585 | | 'use strict'; |
16586 | | |
16587 | | var _assign = __webpack_require__(334); |
16588 | | |
16589 | | var PooledClass = __webpack_require__(386); |
16590 | | |
16591 | | var emptyFunction = __webpack_require__(339); |
16592 | | var warning = __webpack_require__(338); |
16593 | | |
16594 | | var didWarnForAddedNewProperty = false; |
16595 | | var isProxySupported = typeof Proxy === 'function'; |
16596 | | |
16597 | | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; |
16598 | | |
16599 | | /** |
16600 | | * @interface Event |
16601 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
16602 | | */ |
16603 | | var EventInterface = { |
16604 | | type: null, |
16605 | | target: null, |
16606 | | // currentTarget is set when dispatching; no use in copying it here |
16607 | | currentTarget: emptyFunction.thatReturnsNull, |
16608 | | eventPhase: null, |
16609 | | bubbles: null, |
16610 | | cancelable: null, |
16611 | | timeStamp: function (event) { |
16612 | | return event.timeStamp || Date.now(); |
16613 | | }, |
16614 | | defaultPrevented: null, |
16615 | | isTrusted: null |
16616 | | }; |
16617 | | |
16618 | | /** |
16619 | | * Synthetic events are dispatched by event plugins, typically in response to a |
16620 | | * top-level event delegation handler. |
16621 | | * |
16622 | | * These systems should generally use pooling to reduce the frequency of garbage |
16623 | | * collection. The system should check `isPersistent` to determine whether the |
16624 | | * event should be released into the pool after being dispatched. Users that |
16625 | | * need a persisted event should invoke `persist`. |
16626 | | * |
16627 | | * Synthetic events (and subclasses) implement the DOM Level 3 Events API by |
16628 | | * normalizing browser quirks. Subclasses do not necessarily have to implement a |
16629 | | * DOM interface; custom application-specific events can also subclass this. |
16630 | | * |
16631 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
16632 | | * @param {*} targetInst Marker identifying the event target. |
16633 | | * @param {object} nativeEvent Native browser event. |
16634 | | * @param {DOMEventTarget} nativeEventTarget Target node. |
16635 | | */ |
16636 | | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { |
16637 | | if (true) { |
16638 | | // these have a getter/setter for warnings |
16639 | | delete this.nativeEvent; |
16640 | | delete this.preventDefault; |
16641 | | delete this.stopPropagation; |
16642 | | } |
16643 | | |
16644 | | this.dispatchConfig = dispatchConfig; |
16645 | | this._targetInst = targetInst; |
16646 | | this.nativeEvent = nativeEvent; |
16647 | | |
16648 | | var Interface = this.constructor.Interface; |
16649 | | for (var propName in Interface) { |
16650 | | if (!Interface.hasOwnProperty(propName)) { |
16651 | | continue; |
16652 | | } |
16653 | | if (true) { |
16654 | | delete this[propName]; // this has a getter/setter for warnings |
16655 | | } |
16656 | | var normalize = Interface[propName]; |
16657 | | if (normalize) { |
16658 | | this[propName] = normalize(nativeEvent); |
16659 | | } else { |
16660 | | if (propName === 'target') { |
16661 | | this.target = nativeEventTarget; |
16662 | | } else { |
16663 | | this[propName] = nativeEvent[propName]; |
16664 | | } |
16665 | | } |
16666 | | } |
16667 | | |
16668 | | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; |
16669 | | if (defaultPrevented) { |
16670 | | this.isDefaultPrevented = emptyFunction.thatReturnsTrue; |
16671 | | } else { |
16672 | | this.isDefaultPrevented = emptyFunction.thatReturnsFalse; |
16673 | | } |
16674 | | this.isPropagationStopped = emptyFunction.thatReturnsFalse; |
16675 | | return this; |
16676 | | } |
16677 | | |
16678 | | _assign(SyntheticEvent.prototype, { |
16679 | | preventDefault: function () { |
16680 | | this.defaultPrevented = true; |
16681 | | var event = this.nativeEvent; |
16682 | | if (!event) { |
16683 | | return; |
16684 | | } |
16685 | | |
16686 | | if (event.preventDefault) { |
16687 | | event.preventDefault(); |
16688 | | // eslint-disable-next-line valid-typeof |
16689 | | } else if (typeof event.returnValue !== 'unknown') { |
16690 | | event.returnValue = false; |
16691 | | } |
16692 | | this.isDefaultPrevented = emptyFunction.thatReturnsTrue; |
16693 | | }, |
16694 | | |
16695 | | stopPropagation: function () { |
16696 | | var event = this.nativeEvent; |
16697 | | if (!event) { |
16698 | | return; |
16699 | | } |
16700 | | |
16701 | | if (event.stopPropagation) { |
16702 | | event.stopPropagation(); |
16703 | | // eslint-disable-next-line valid-typeof |
16704 | | } else if (typeof event.cancelBubble !== 'unknown') { |
16705 | | // The ChangeEventPlugin registers a "propertychange" event for |
16706 | | // IE. This event does not support bubbling or cancelling, and |
16707 | | // any references to cancelBubble throw "Member not found". A |
16708 | | // typeof check of "unknown" circumvents this issue (and is also |
16709 | | // IE specific). |
16710 | | event.cancelBubble = true; |
16711 | | } |
16712 | | |
16713 | | this.isPropagationStopped = emptyFunction.thatReturnsTrue; |
16714 | | }, |
16715 | | |
16716 | | /** |
16717 | | * We release all dispatched `SyntheticEvent`s after each event loop, adding |
16718 | | * them back into the pool. This allows a way to hold onto a reference that |
16719 | | * won't be added back into the pool. |
16720 | | */ |
16721 | | persist: function () { |
16722 | | this.isPersistent = emptyFunction.thatReturnsTrue; |
16723 | | }, |
16724 | | |
16725 | | /** |
16726 | | * Checks if this event should be released back into the pool. |
16727 | | * |
16728 | | * @return {boolean} True if this should not be released, false otherwise. |
16729 | | */ |
16730 | | isPersistent: emptyFunction.thatReturnsFalse, |
16731 | | |
16732 | | /** |
16733 | | * `PooledClass` looks for `destructor` on each instance it releases. |
16734 | | */ |
16735 | | destructor: function () { |
16736 | | var Interface = this.constructor.Interface; |
16737 | | for (var propName in Interface) { |
16738 | | if (true) { |
16739 | | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); |
16740 | | } else { |
16741 | | this[propName] = null; |
16742 | | } |
16743 | | } |
16744 | | for (var i = 0; i < shouldBeReleasedProperties.length; i++) { |
16745 | | this[shouldBeReleasedProperties[i]] = null; |
16746 | | } |
16747 | | if (true) { |
16748 | | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); |
16749 | | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); |
16750 | | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); |
16751 | | } |
16752 | | } |
16753 | | }); |
16754 | | |
16755 | | SyntheticEvent.Interface = EventInterface; |
16756 | | |
16757 | | /** |
16758 | | * Helper to reduce boilerplate when creating subclasses. |
16759 | | * |
16760 | | * @param {function} Class |
16761 | | * @param {?object} Interface |
16762 | | */ |
16763 | | SyntheticEvent.augmentClass = function (Class, Interface) { |
16764 | | var Super = this; |
16765 | | |
16766 | | var E = function () {}; |
16767 | | E.prototype = Super.prototype; |
16768 | | var prototype = new E(); |
16769 | | |
16770 | | _assign(prototype, Class.prototype); |
16771 | | Class.prototype = prototype; |
16772 | | Class.prototype.constructor = Class; |
16773 | | |
16774 | | Class.Interface = _assign({}, Super.Interface, Interface); |
16775 | | Class.augmentClass = Super.augmentClass; |
16776 | | |
16777 | | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); |
16778 | | }; |
16779 | | |
16780 | | /** Proxying after everything set on SyntheticEvent |
16781 | | * to resolve Proxy issue on some WebKit browsers |
16782 | | * in which some Event properties are set to undefined (GH#10010) |
16783 | | */ |
16784 | | if (true) { |
16785 | | if (isProxySupported) { |
16786 | | /*eslint-disable no-func-assign */ |
16787 | | SyntheticEvent = new Proxy(SyntheticEvent, { |
16788 | | construct: function (target, args) { |
16789 | | return this.apply(target, Object.create(target.prototype), args); |
16790 | | }, |
16791 | | apply: function (constructor, that, args) { |
16792 | | return new Proxy(constructor.apply(that, args), { |
16793 | | set: function (target, prop, value) { |
16794 | | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { |
16795 | | true ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; |
16796 | | didWarnForAddedNewProperty = true; |
16797 | | } |
16798 | | target[prop] = value; |
16799 | | return true; |
16800 | | } |
16801 | | }); |
16802 | | } |
16803 | | }); |
16804 | | /*eslint-enable no-func-assign */ |
16805 | | } |
16806 | | } |
16807 | | |
16808 | | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); |
16809 | | |
16810 | | module.exports = SyntheticEvent; |
16811 | | |
16812 | | /** |
16813 | | * Helper to nullify syntheticEvent instance properties when destructing |
16814 | | * |
16815 | | * @param {object} SyntheticEvent |
16816 | | * @param {String} propName |
16817 | | * @return {object} defineProperty object |
16818 | | */ |
16819 | | function getPooledWarningPropertyDefinition(propName, getVal) { |
16820 | | var isFunction = typeof getVal === 'function'; |
16821 | | return { |
16822 | | configurable: true, |
16823 | | set: set, |
16824 | | get: get |
16825 | | }; |
16826 | | |
16827 | | function set(val) { |
16828 | | var action = isFunction ? 'setting the method' : 'setting the property'; |
16829 | | warn(action, 'This is effectively a no-op'); |
16830 | | return val; |
16831 | | } |
16832 | | |
16833 | | function get() { |
16834 | | var action = isFunction ? 'accessing the method' : 'accessing the property'; |
16835 | | var result = isFunction ? 'This is a no-op function' : 'This is set to null'; |
16836 | | warn(action, result); |
16837 | | return getVal; |
16838 | | } |
16839 | | |
16840 | | function warn(action, result) { |
16841 | | var warningCondition = false; |
16842 | | true ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; |
16843 | | } |
16844 | | } |
16845 | | |
16846 | | /***/ }), |
16847 | | /* 390 */ |
16848 | | /***/ (function(module, exports, __webpack_require__) { |
16849 | | |
16850 | | /** |
16851 | | * Copyright (c) 2013-present, Facebook, Inc. |
16852 | | * |
16853 | | * This source code is licensed under the MIT license found in the |
16854 | | * LICENSE file in the root directory of this source tree. |
16855 | | * |
16856 | | */ |
16857 | | |
16858 | | 'use strict'; |
16859 | | |
16860 | | var SyntheticEvent = __webpack_require__(389); |
16861 | | |
16862 | | /** |
16863 | | * @interface Event |
16864 | | * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 |
16865 | | * /#events-inputevents |
16866 | | */ |
16867 | | var InputEventInterface = { |
16868 | | data: null |
16869 | | }; |
16870 | | |
16871 | | /** |
16872 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
16873 | | * @param {string} dispatchMarker Marker identifying the event target. |
16874 | | * @param {object} nativeEvent Native browser event. |
16875 | | * @extends {SyntheticUIEvent} |
16876 | | */ |
16877 | | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
16878 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
16879 | | } |
16880 | | |
16881 | | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); |
16882 | | |
16883 | | module.exports = SyntheticInputEvent; |
16884 | | |
16885 | | /***/ }), |
16886 | | /* 391 */ |
16887 | | /***/ (function(module, exports, __webpack_require__) { |
16888 | | |
16889 | | /** |
16890 | | * Copyright (c) 2013-present, Facebook, Inc. |
16891 | | * |
16892 | | * This source code is licensed under the MIT license found in the |
16893 | | * LICENSE file in the root directory of this source tree. |
16894 | | * |
16895 | | */ |
16896 | | |
16897 | | 'use strict'; |
16898 | | |
16899 | | var EventPluginHub = __webpack_require__(378); |
16900 | | var EventPropagators = __webpack_require__(377); |
16901 | | var ExecutionEnvironment = __webpack_require__(384); |
16902 | | var ReactDOMComponentTree = __webpack_require__(370); |
16903 | | var ReactUpdates = __webpack_require__(392); |
16904 | | var SyntheticEvent = __webpack_require__(389); |
16905 | | |
16906 | | var inputValueTracking = __webpack_require__(405); |
16907 | | var getEventTarget = __webpack_require__(406); |
16908 | | var isEventSupported = __webpack_require__(407); |
16909 | | var isTextInputElement = __webpack_require__(408); |
16910 | | |
16911 | | var eventTypes = { |
16912 | | change: { |
16913 | | phasedRegistrationNames: { |
16914 | | bubbled: 'onChange', |
16915 | | captured: 'onChangeCapture' |
16916 | | }, |
16917 | | dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] |
16918 | | } |
16919 | | }; |
16920 | | |
16921 | | function createAndAccumulateChangeEvent(inst, nativeEvent, target) { |
16922 | | var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target); |
16923 | | event.type = 'change'; |
16924 | | EventPropagators.accumulateTwoPhaseDispatches(event); |
16925 | | return event; |
16926 | | } |
16927 | | /** |
16928 | | * For IE shims |
16929 | | */ |
16930 | | var activeElement = null; |
16931 | | var activeElementInst = null; |
16932 | | |
16933 | | /** |
16934 | | * SECTION: handle `change` event |
16935 | | */ |
16936 | | function shouldUseChangeEvent(elem) { |
16937 | | var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); |
16938 | | return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; |
16939 | | } |
16940 | | |
16941 | | var doesChangeEventBubble = false; |
16942 | | if (ExecutionEnvironment.canUseDOM) { |
16943 | | // See `handleChange` comment below |
16944 | | doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); |
16945 | | } |
16946 | | |
16947 | | function manualDispatchChangeEvent(nativeEvent) { |
16948 | | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); |
16949 | | |
16950 | | // If change and propertychange bubbled, we'd just bind to it like all the |
16951 | | // other events and have it go through ReactBrowserEventEmitter. Since it |
16952 | | // doesn't, we manually listen for the events and so we have to enqueue and |
16953 | | // process the abstract event manually. |
16954 | | // |
16955 | | // Batching is necessary here in order to ensure that all event handlers run |
16956 | | // before the next rerender (including event handlers attached to ancestor |
16957 | | // elements instead of directly on the input). Without this, controlled |
16958 | | // components don't work properly in conjunction with event bubbling because |
16959 | | // the component is rerendered and the value reverted before all the event |
16960 | | // handlers can run. See https://github.com/facebook/react/issues/708. |
16961 | | ReactUpdates.batchedUpdates(runEventInBatch, event); |
16962 | | } |
16963 | | |
16964 | | function runEventInBatch(event) { |
16965 | | EventPluginHub.enqueueEvents(event); |
16966 | | EventPluginHub.processEventQueue(false); |
16967 | | } |
16968 | | |
16969 | | function startWatchingForChangeEventIE8(target, targetInst) { |
16970 | | activeElement = target; |
16971 | | activeElementInst = targetInst; |
16972 | | activeElement.attachEvent('onchange', manualDispatchChangeEvent); |
16973 | | } |
16974 | | |
16975 | | function stopWatchingForChangeEventIE8() { |
16976 | | if (!activeElement) { |
16977 | | return; |
16978 | | } |
16979 | | activeElement.detachEvent('onchange', manualDispatchChangeEvent); |
16980 | | activeElement = null; |
16981 | | activeElementInst = null; |
16982 | | } |
16983 | | |
16984 | | function getInstIfValueChanged(targetInst, nativeEvent) { |
16985 | | var updated = inputValueTracking.updateValueIfChanged(targetInst); |
16986 | | var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough; |
16987 | | |
16988 | | if (updated || simulated) { |
16989 | | return targetInst; |
16990 | | } |
16991 | | } |
16992 | | |
16993 | | function getTargetInstForChangeEvent(topLevelType, targetInst) { |
16994 | | if (topLevelType === 'topChange') { |
16995 | | return targetInst; |
16996 | | } |
16997 | | } |
16998 | | |
16999 | | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { |
17000 | | if (topLevelType === 'topFocus') { |
17001 | | // stopWatching() should be a noop here but we call it just in case we |
17002 | | // missed a blur event somehow. |
17003 | | stopWatchingForChangeEventIE8(); |
17004 | | startWatchingForChangeEventIE8(target, targetInst); |
17005 | | } else if (topLevelType === 'topBlur') { |
17006 | | stopWatchingForChangeEventIE8(); |
17007 | | } |
17008 | | } |
17009 | | |
17010 | | /** |
17011 | | * SECTION: handle `input` event |
17012 | | */ |
17013 | | var isInputEventSupported = false; |
17014 | | if (ExecutionEnvironment.canUseDOM) { |
17015 | | // IE9 claims to support the input event but fails to trigger it when |
17016 | | // deleting text, so we ignore its input events. |
17017 | | |
17018 | | isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9); |
17019 | | } |
17020 | | |
17021 | | /** |
17022 | | * (For IE <=9) Starts tracking propertychange events on the passed-in element |
17023 | | * and override the value property so that we can distinguish user events from |
17024 | | * value changes in JS. |
17025 | | */ |
17026 | | function startWatchingForValueChange(target, targetInst) { |
17027 | | activeElement = target; |
17028 | | activeElementInst = targetInst; |
17029 | | activeElement.attachEvent('onpropertychange', handlePropertyChange); |
17030 | | } |
17031 | | |
17032 | | /** |
17033 | | * (For IE <=9) Removes the event listeners from the currently-tracked element, |
17034 | | * if any exists. |
17035 | | */ |
17036 | | function stopWatchingForValueChange() { |
17037 | | if (!activeElement) { |
17038 | | return; |
17039 | | } |
17040 | | activeElement.detachEvent('onpropertychange', handlePropertyChange); |
17041 | | |
17042 | | activeElement = null; |
17043 | | activeElementInst = null; |
17044 | | } |
17045 | | |
17046 | | /** |
17047 | | * (For IE <=9) Handles a propertychange event, sending a `change` event if |
17048 | | * the value of the active element has changed. |
17049 | | */ |
17050 | | function handlePropertyChange(nativeEvent) { |
17051 | | if (nativeEvent.propertyName !== 'value') { |
17052 | | return; |
17053 | | } |
17054 | | if (getInstIfValueChanged(activeElementInst, nativeEvent)) { |
17055 | | manualDispatchChangeEvent(nativeEvent); |
17056 | | } |
17057 | | } |
17058 | | |
17059 | | function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { |
17060 | | if (topLevelType === 'topFocus') { |
17061 | | // In IE8, we can capture almost all .value changes by adding a |
17062 | | // propertychange handler and looking for events with propertyName |
17063 | | // equal to 'value' |
17064 | | // In IE9, propertychange fires for most input events but is buggy and |
17065 | | // doesn't fire when text is deleted, but conveniently, selectionchange |
17066 | | // appears to fire in all of the remaining cases so we catch those and |
17067 | | // forward the event if the value has changed |
17068 | | // In either case, we don't want to call the event handler if the value |
17069 | | // is changed from JS so we redefine a setter for `.value` that updates |
17070 | | // our activeElementValue variable, allowing us to ignore those changes |
17071 | | // |
17072 | | // stopWatching() should be a noop here but we call it just in case we |
17073 | | // missed a blur event somehow. |
17074 | | stopWatchingForValueChange(); |
17075 | | startWatchingForValueChange(target, targetInst); |
17076 | | } else if (topLevelType === 'topBlur') { |
17077 | | stopWatchingForValueChange(); |
17078 | | } |
17079 | | } |
17080 | | |
17081 | | // For IE8 and IE9. |
17082 | | function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) { |
17083 | | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { |
17084 | | // On the selectionchange event, the target is just document which isn't |
17085 | | // helpful for us so just check activeElement instead. |
17086 | | // |
17087 | | // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire |
17088 | | // propertychange on the first input event after setting `value` from a |
17089 | | // script and fires only keydown, keypress, keyup. Catching keyup usually |
17090 | | // gets it and catching keydown lets us fire an event for the first |
17091 | | // keystroke if user does a key repeat (it'll be a little delayed: right |
17092 | | // before the second keystroke). Other input methods (e.g., paste) seem to |
17093 | | // fire selectionchange normally. |
17094 | | return getInstIfValueChanged(activeElementInst, nativeEvent); |
17095 | | } |
17096 | | } |
17097 | | |
17098 | | /** |
17099 | | * SECTION: handle `click` event |
17100 | | */ |
17101 | | function shouldUseClickEvent(elem) { |
17102 | | // Use the `click` event to detect changes to checkbox and radio inputs. |
17103 | | // This approach works across all browsers, whereas `change` does not fire |
17104 | | // until `blur` in IE8. |
17105 | | var nodeName = elem.nodeName; |
17106 | | return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); |
17107 | | } |
17108 | | |
17109 | | function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) { |
17110 | | if (topLevelType === 'topClick') { |
17111 | | return getInstIfValueChanged(targetInst, nativeEvent); |
17112 | | } |
17113 | | } |
17114 | | |
17115 | | function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) { |
17116 | | if (topLevelType === 'topInput' || topLevelType === 'topChange') { |
17117 | | return getInstIfValueChanged(targetInst, nativeEvent); |
17118 | | } |
17119 | | } |
17120 | | |
17121 | | function handleControlledInputBlur(inst, node) { |
17122 | | // TODO: In IE, inst is occasionally null. Why? |
17123 | | if (inst == null) { |
17124 | | return; |
17125 | | } |
17126 | | |
17127 | | // Fiber and ReactDOM keep wrapper state in separate places |
17128 | | var state = inst._wrapperState || node._wrapperState; |
17129 | | |
17130 | | if (!state || !state.controlled || node.type !== 'number') { |
17131 | | return; |
17132 | | } |
17133 | | |
17134 | | // If controlled, assign the value attribute to the current value on blur |
17135 | | var value = '' + node.value; |
17136 | | if (node.getAttribute('value') !== value) { |
17137 | | node.setAttribute('value', value); |
17138 | | } |
17139 | | } |
17140 | | |
17141 | | /** |
17142 | | * This plugin creates an `onChange` event that normalizes change events |
17143 | | * across form elements. This event fires at a time when it's possible to |
17144 | | * change the element's value without seeing a flicker. |
17145 | | * |
17146 | | * Supported elements are: |
17147 | | * - input (see `isTextInputElement`) |
17148 | | * - textarea |
17149 | | * - select |
17150 | | */ |
17151 | | var ChangeEventPlugin = { |
17152 | | eventTypes: eventTypes, |
17153 | | |
17154 | | _allowSimulatedPassThrough: true, |
17155 | | _isInputEventSupported: isInputEventSupported, |
17156 | | |
17157 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
17158 | | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; |
17159 | | |
17160 | | var getTargetInstFunc, handleEventFunc; |
17161 | | if (shouldUseChangeEvent(targetNode)) { |
17162 | | if (doesChangeEventBubble) { |
17163 | | getTargetInstFunc = getTargetInstForChangeEvent; |
17164 | | } else { |
17165 | | handleEventFunc = handleEventsForChangeEventIE8; |
17166 | | } |
17167 | | } else if (isTextInputElement(targetNode)) { |
17168 | | if (isInputEventSupported) { |
17169 | | getTargetInstFunc = getTargetInstForInputOrChangeEvent; |
17170 | | } else { |
17171 | | getTargetInstFunc = getTargetInstForInputEventPolyfill; |
17172 | | handleEventFunc = handleEventsForInputEventPolyfill; |
17173 | | } |
17174 | | } else if (shouldUseClickEvent(targetNode)) { |
17175 | | getTargetInstFunc = getTargetInstForClickEvent; |
17176 | | } |
17177 | | |
17178 | | if (getTargetInstFunc) { |
17179 | | var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent); |
17180 | | if (inst) { |
17181 | | var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); |
17182 | | return event; |
17183 | | } |
17184 | | } |
17185 | | |
17186 | | if (handleEventFunc) { |
17187 | | handleEventFunc(topLevelType, targetNode, targetInst); |
17188 | | } |
17189 | | |
17190 | | // When blurring, set the value attribute for number inputs |
17191 | | if (topLevelType === 'topBlur') { |
17192 | | handleControlledInputBlur(targetInst, targetNode); |
17193 | | } |
17194 | | } |
17195 | | }; |
17196 | | |
17197 | | module.exports = ChangeEventPlugin; |
17198 | | |
17199 | | /***/ }), |
17200 | | /* 392 */ |
17201 | | /***/ (function(module, exports, __webpack_require__) { |
17202 | | |
17203 | | /** |
17204 | | * Copyright (c) 2013-present, Facebook, Inc. |
17205 | | * |
17206 | | * This source code is licensed under the MIT license found in the |
17207 | | * LICENSE file in the root directory of this source tree. |
17208 | | * |
17209 | | */ |
17210 | | |
17211 | | 'use strict'; |
17212 | | |
17213 | | var _prodInvariant = __webpack_require__(371), |
17214 | | _assign = __webpack_require__(334); |
17215 | | |
17216 | | var CallbackQueue = __webpack_require__(393); |
17217 | | var PooledClass = __webpack_require__(386); |
17218 | | var ReactFeatureFlags = __webpack_require__(394); |
17219 | | var ReactReconciler = __webpack_require__(395); |
17220 | | var Transaction = __webpack_require__(404); |
17221 | | |
17222 | | var invariant = __webpack_require__(342); |
17223 | | |
17224 | | var dirtyComponents = []; |
17225 | | var updateBatchNumber = 0; |
17226 | | var asapCallbackQueue = CallbackQueue.getPooled(); |
17227 | | var asapEnqueued = false; |
17228 | | |
17229 | | var batchingStrategy = null; |
17230 | | |
17231 | | function ensureInjected() { |
17232 | | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? true ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; |
17233 | | } |
17234 | | |
17235 | | var NESTED_UPDATES = { |
17236 | | initialize: function () { |
17237 | | this.dirtyComponentsLength = dirtyComponents.length; |
17238 | | }, |
17239 | | close: function () { |
17240 | | if (this.dirtyComponentsLength !== dirtyComponents.length) { |
17241 | | // Additional updates were enqueued by componentDidUpdate handlers or |
17242 | | // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run |
17243 | | // these new updates so that if A's componentDidUpdate calls setState on |
17244 | | // B, B will update before the callback A's updater provided when calling |
17245 | | // setState. |
17246 | | dirtyComponents.splice(0, this.dirtyComponentsLength); |
17247 | | flushBatchedUpdates(); |
17248 | | } else { |
17249 | | dirtyComponents.length = 0; |
17250 | | } |
17251 | | } |
17252 | | }; |
17253 | | |
17254 | | var UPDATE_QUEUEING = { |
17255 | | initialize: function () { |
17256 | | this.callbackQueue.reset(); |
17257 | | }, |
17258 | | close: function () { |
17259 | | this.callbackQueue.notifyAll(); |
17260 | | } |
17261 | | }; |
17262 | | |
17263 | | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; |
17264 | | |
17265 | | function ReactUpdatesFlushTransaction() { |
17266 | | this.reinitializeTransaction(); |
17267 | | this.dirtyComponentsLength = null; |
17268 | | this.callbackQueue = CallbackQueue.getPooled(); |
17269 | | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( |
17270 | | /* useCreateElement */true); |
17271 | | } |
17272 | | |
17273 | | _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { |
17274 | | getTransactionWrappers: function () { |
17275 | | return TRANSACTION_WRAPPERS; |
17276 | | }, |
17277 | | |
17278 | | destructor: function () { |
17279 | | this.dirtyComponentsLength = null; |
17280 | | CallbackQueue.release(this.callbackQueue); |
17281 | | this.callbackQueue = null; |
17282 | | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); |
17283 | | this.reconcileTransaction = null; |
17284 | | }, |
17285 | | |
17286 | | perform: function (method, scope, a) { |
17287 | | // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` |
17288 | | // with this transaction's wrappers around it. |
17289 | | return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); |
17290 | | } |
17291 | | }); |
17292 | | |
17293 | | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); |
17294 | | |
17295 | | function batchedUpdates(callback, a, b, c, d, e) { |
17296 | | ensureInjected(); |
17297 | | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); |
17298 | | } |
17299 | | |
17300 | | /** |
17301 | | * Array comparator for ReactComponents by mount ordering. |
17302 | | * |
17303 | | * @param {ReactComponent} c1 first component you're comparing |
17304 | | * @param {ReactComponent} c2 second component you're comparing |
17305 | | * @return {number} Return value usable by Array.prototype.sort(). |
17306 | | */ |
17307 | | function mountOrderComparator(c1, c2) { |
17308 | | return c1._mountOrder - c2._mountOrder; |
17309 | | } |
17310 | | |
17311 | | function runBatchedUpdates(transaction) { |
17312 | | var len = transaction.dirtyComponentsLength; |
17313 | | !(len === dirtyComponents.length) ? true ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; |
17314 | | |
17315 | | // Since reconciling a component higher in the owner hierarchy usually (not |
17316 | | // always -- see shouldComponentUpdate()) will reconcile children, reconcile |
17317 | | // them before their children by sorting the array. |
17318 | | dirtyComponents.sort(mountOrderComparator); |
17319 | | |
17320 | | // Any updates enqueued while reconciling must be performed after this entire |
17321 | | // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and |
17322 | | // C, B could update twice in a single batch if C's render enqueues an update |
17323 | | // to B (since B would have already updated, we should skip it, and the only |
17324 | | // way we can know to do so is by checking the batch counter). |
17325 | | updateBatchNumber++; |
17326 | | |
17327 | | for (var i = 0; i < len; i++) { |
17328 | | // If a component is unmounted before pending changes apply, it will still |
17329 | | // be here, but we assume that it has cleared its _pendingCallbacks and |
17330 | | // that performUpdateIfNecessary is a noop. |
17331 | | var component = dirtyComponents[i]; |
17332 | | |
17333 | | // If performUpdateIfNecessary happens to enqueue any new updates, we |
17334 | | // shouldn't execute the callbacks until the next render happens, so |
17335 | | // stash the callbacks first |
17336 | | var callbacks = component._pendingCallbacks; |
17337 | | component._pendingCallbacks = null; |
17338 | | |
17339 | | var markerName; |
17340 | | if (ReactFeatureFlags.logTopLevelRenders) { |
17341 | | var namedComponent = component; |
17342 | | // Duck type TopLevelWrapper. This is probably always true. |
17343 | | if (component._currentElement.type.isReactTopLevelWrapper) { |
17344 | | namedComponent = component._renderedComponent; |
17345 | | } |
17346 | | markerName = 'React update: ' + namedComponent.getName(); |
17347 | | console.time(markerName); |
17348 | | } |
17349 | | |
17350 | | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); |
17351 | | |
17352 | | if (markerName) { |
17353 | | console.timeEnd(markerName); |
17354 | | } |
17355 | | |
17356 | | if (callbacks) { |
17357 | | for (var j = 0; j < callbacks.length; j++) { |
17358 | | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); |
17359 | | } |
17360 | | } |
17361 | | } |
17362 | | } |
17363 | | |
17364 | | var flushBatchedUpdates = function () { |
17365 | | // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents |
17366 | | // array and perform any updates enqueued by mount-ready handlers (i.e., |
17367 | | // componentDidUpdate) but we need to check here too in order to catch |
17368 | | // updates enqueued by setState callbacks and asap calls. |
17369 | | while (dirtyComponents.length || asapEnqueued) { |
17370 | | if (dirtyComponents.length) { |
17371 | | var transaction = ReactUpdatesFlushTransaction.getPooled(); |
17372 | | transaction.perform(runBatchedUpdates, null, transaction); |
17373 | | ReactUpdatesFlushTransaction.release(transaction); |
17374 | | } |
17375 | | |
17376 | | if (asapEnqueued) { |
17377 | | asapEnqueued = false; |
17378 | | var queue = asapCallbackQueue; |
17379 | | asapCallbackQueue = CallbackQueue.getPooled(); |
17380 | | queue.notifyAll(); |
17381 | | CallbackQueue.release(queue); |
17382 | | } |
17383 | | } |
17384 | | }; |
17385 | | |
17386 | | /** |
17387 | | * Mark a component as needing a rerender, adding an optional callback to a |
17388 | | * list of functions which will be executed once the rerender occurs. |
17389 | | */ |
17390 | | function enqueueUpdate(component) { |
17391 | | ensureInjected(); |
17392 | | |
17393 | | // Various parts of our code (such as ReactCompositeComponent's |
17394 | | // _renderValidatedComponent) assume that calls to render aren't nested; |
17395 | | // verify that that's the case. (This is called by each top-level update |
17396 | | // function, like setState, forceUpdate, etc.; creation and |
17397 | | // destruction of top-level components is guarded in ReactMount.) |
17398 | | |
17399 | | if (!batchingStrategy.isBatchingUpdates) { |
17400 | | batchingStrategy.batchedUpdates(enqueueUpdate, component); |
17401 | | return; |
17402 | | } |
17403 | | |
17404 | | dirtyComponents.push(component); |
17405 | | if (component._updateBatchNumber == null) { |
17406 | | component._updateBatchNumber = updateBatchNumber + 1; |
17407 | | } |
17408 | | } |
17409 | | |
17410 | | /** |
17411 | | * Enqueue a callback to be run at the end of the current batching cycle. Throws |
17412 | | * if no updates are currently being performed. |
17413 | | */ |
17414 | | function asap(callback, context) { |
17415 | | invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.'); |
17416 | | asapCallbackQueue.enqueue(callback, context); |
17417 | | asapEnqueued = true; |
17418 | | } |
17419 | | |
17420 | | var ReactUpdatesInjection = { |
17421 | | injectReconcileTransaction: function (ReconcileTransaction) { |
17422 | | !ReconcileTransaction ? true ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; |
17423 | | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; |
17424 | | }, |
17425 | | |
17426 | | injectBatchingStrategy: function (_batchingStrategy) { |
17427 | | !_batchingStrategy ? true ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; |
17428 | | !(typeof _batchingStrategy.batchedUpdates === 'function') ? true ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; |
17429 | | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? true ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; |
17430 | | batchingStrategy = _batchingStrategy; |
17431 | | } |
17432 | | }; |
17433 | | |
17434 | | var ReactUpdates = { |
17435 | | /** |
17436 | | * React references `ReactReconcileTransaction` using this property in order |
17437 | | * to allow dependency injection. |
17438 | | * |
17439 | | * @internal |
17440 | | */ |
17441 | | ReactReconcileTransaction: null, |
17442 | | |
17443 | | batchedUpdates: batchedUpdates, |
17444 | | enqueueUpdate: enqueueUpdate, |
17445 | | flushBatchedUpdates: flushBatchedUpdates, |
17446 | | injection: ReactUpdatesInjection, |
17447 | | asap: asap |
17448 | | }; |
17449 | | |
17450 | | module.exports = ReactUpdates; |
17451 | | |
17452 | | /***/ }), |
17453 | | /* 393 */ |
17454 | | /***/ (function(module, exports, __webpack_require__) { |
17455 | | |
17456 | | /** |
17457 | | * Copyright (c) 2013-present, Facebook, Inc. |
17458 | | * |
17459 | | * This source code is licensed under the MIT license found in the |
17460 | | * LICENSE file in the root directory of this source tree. |
17461 | | * |
17462 | | * |
17463 | | */ |
17464 | | |
17465 | | 'use strict'; |
17466 | | |
17467 | | var _prodInvariant = __webpack_require__(371); |
17468 | | |
17469 | | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } |
17470 | | |
17471 | | var PooledClass = __webpack_require__(386); |
17472 | | |
17473 | | var invariant = __webpack_require__(342); |
17474 | | |
17475 | | /** |
17476 | | * A specialized pseudo-event module to help keep track of components waiting to |
17477 | | * be notified when their DOM representations are available for use. |
17478 | | * |
17479 | | * This implements `PooledClass`, so you should never need to instantiate this. |
17480 | | * Instead, use `CallbackQueue.getPooled()`. |
17481 | | * |
17482 | | * @class ReactMountReady |
17483 | | * @implements PooledClass |
17484 | | * @internal |
17485 | | */ |
17486 | | |
17487 | | var CallbackQueue = function () { |
17488 | | function CallbackQueue(arg) { |
17489 | | _classCallCheck(this, CallbackQueue); |
17490 | | |
17491 | | this._callbacks = null; |
17492 | | this._contexts = null; |
17493 | | this._arg = arg; |
17494 | | } |
17495 | | |
17496 | | /** |
17497 | | * Enqueues a callback to be invoked when `notifyAll` is invoked. |
17498 | | * |
17499 | | * @param {function} callback Invoked when `notifyAll` is invoked. |
17500 | | * @param {?object} context Context to call `callback` with. |
17501 | | * @internal |
17502 | | */ |
17503 | | |
17504 | | |
17505 | | CallbackQueue.prototype.enqueue = function enqueue(callback, context) { |
17506 | | this._callbacks = this._callbacks || []; |
17507 | | this._callbacks.push(callback); |
17508 | | this._contexts = this._contexts || []; |
17509 | | this._contexts.push(context); |
17510 | | }; |
17511 | | |
17512 | | /** |
17513 | | * Invokes all enqueued callbacks and clears the queue. This is invoked after |
17514 | | * the DOM representation of a component has been created or updated. |
17515 | | * |
17516 | | * @internal |
17517 | | */ |
17518 | | |
17519 | | |
17520 | | CallbackQueue.prototype.notifyAll = function notifyAll() { |
17521 | | var callbacks = this._callbacks; |
17522 | | var contexts = this._contexts; |
17523 | | var arg = this._arg; |
17524 | | if (callbacks && contexts) { |
17525 | | !(callbacks.length === contexts.length) ? true ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; |
17526 | | this._callbacks = null; |
17527 | | this._contexts = null; |
17528 | | for (var i = 0; i < callbacks.length; i++) { |
17529 | | callbacks[i].call(contexts[i], arg); |
17530 | | } |
17531 | | callbacks.length = 0; |
17532 | | contexts.length = 0; |
17533 | | } |
17534 | | }; |
17535 | | |
17536 | | CallbackQueue.prototype.checkpoint = function checkpoint() { |
17537 | | return this._callbacks ? this._callbacks.length : 0; |
17538 | | }; |
17539 | | |
17540 | | CallbackQueue.prototype.rollback = function rollback(len) { |
17541 | | if (this._callbacks && this._contexts) { |
17542 | | this._callbacks.length = len; |
17543 | | this._contexts.length = len; |
17544 | | } |
17545 | | }; |
17546 | | |
17547 | | /** |
17548 | | * Resets the internal queue. |
17549 | | * |
17550 | | * @internal |
17551 | | */ |
17552 | | |
17553 | | |
17554 | | CallbackQueue.prototype.reset = function reset() { |
17555 | | this._callbacks = null; |
17556 | | this._contexts = null; |
17557 | | }; |
17558 | | |
17559 | | /** |
17560 | | * `PooledClass` looks for this. |
17561 | | */ |
17562 | | |
17563 | | |
17564 | | CallbackQueue.prototype.destructor = function destructor() { |
17565 | | this.reset(); |
17566 | | }; |
17567 | | |
17568 | | return CallbackQueue; |
17569 | | }(); |
17570 | | |
17571 | | module.exports = PooledClass.addPoolingTo(CallbackQueue); |
17572 | | |
17573 | | /***/ }), |
17574 | | /* 394 */ |
17575 | | /***/ (function(module, exports) { |
17576 | | |
17577 | | /** |
17578 | | * Copyright (c) 2013-present, Facebook, Inc. |
17579 | | * |
17580 | | * This source code is licensed under the MIT license found in the |
17581 | | * LICENSE file in the root directory of this source tree. |
17582 | | * |
17583 | | * |
17584 | | */ |
17585 | | |
17586 | | 'use strict'; |
17587 | | |
17588 | | var ReactFeatureFlags = { |
17589 | | // When true, call console.time() before and .timeEnd() after each top-level |
17590 | | // render (both initial renders and updates). Useful when looking at prod-mode |
17591 | | // timeline profiles in Chrome, for example. |
17592 | | logTopLevelRenders: false |
17593 | | }; |
17594 | | |
17595 | | module.exports = ReactFeatureFlags; |
17596 | | |
17597 | | /***/ }), |
17598 | | /* 395 */ |
17599 | | /***/ (function(module, exports, __webpack_require__) { |
17600 | | |
17601 | | /** |
17602 | | * Copyright (c) 2013-present, Facebook, Inc. |
17603 | | * |
17604 | | * This source code is licensed under the MIT license found in the |
17605 | | * LICENSE file in the root directory of this source tree. |
17606 | | * |
17607 | | */ |
17608 | | |
17609 | | 'use strict'; |
17610 | | |
17611 | | var ReactRef = __webpack_require__(396); |
17612 | | var ReactInstrumentation = __webpack_require__(398); |
17613 | | |
17614 | | var warning = __webpack_require__(338); |
17615 | | |
17616 | | /** |
17617 | | * Helper to call ReactRef.attachRefs with this composite component, split out |
17618 | | * to avoid allocations in the transaction mount-ready queue. |
17619 | | */ |
17620 | | function attachRefs() { |
17621 | | ReactRef.attachRefs(this, this._currentElement); |
17622 | | } |
17623 | | |
17624 | | var ReactReconciler = { |
17625 | | /** |
17626 | | * Initializes the component, renders markup, and registers event listeners. |
17627 | | * |
17628 | | * @param {ReactComponent} internalInstance |
17629 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
17630 | | * @param {?object} the containing host component instance |
17631 | | * @param {?object} info about the host container |
17632 | | * @return {?string} Rendered markup to be inserted into the DOM. |
17633 | | * @final |
17634 | | * @internal |
17635 | | */ |
17636 | | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots |
17637 | | { |
17638 | | if (true) { |
17639 | | if (internalInstance._debugID !== 0) { |
17640 | | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); |
17641 | | } |
17642 | | } |
17643 | | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); |
17644 | | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { |
17645 | | transaction.getReactMountReady().enqueue(attachRefs, internalInstance); |
17646 | | } |
17647 | | if (true) { |
17648 | | if (internalInstance._debugID !== 0) { |
17649 | | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); |
17650 | | } |
17651 | | } |
17652 | | return markup; |
17653 | | }, |
17654 | | |
17655 | | /** |
17656 | | * Returns a value that can be passed to |
17657 | | * ReactComponentEnvironment.replaceNodeWithMarkup. |
17658 | | */ |
17659 | | getHostNode: function (internalInstance) { |
17660 | | return internalInstance.getHostNode(); |
17661 | | }, |
17662 | | |
17663 | | /** |
17664 | | * Releases any resources allocated by `mountComponent`. |
17665 | | * |
17666 | | * @final |
17667 | | * @internal |
17668 | | */ |
17669 | | unmountComponent: function (internalInstance, safely) { |
17670 | | if (true) { |
17671 | | if (internalInstance._debugID !== 0) { |
17672 | | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); |
17673 | | } |
17674 | | } |
17675 | | ReactRef.detachRefs(internalInstance, internalInstance._currentElement); |
17676 | | internalInstance.unmountComponent(safely); |
17677 | | if (true) { |
17678 | | if (internalInstance._debugID !== 0) { |
17679 | | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); |
17680 | | } |
17681 | | } |
17682 | | }, |
17683 | | |
17684 | | /** |
17685 | | * Update a component using a new element. |
17686 | | * |
17687 | | * @param {ReactComponent} internalInstance |
17688 | | * @param {ReactElement} nextElement |
17689 | | * @param {ReactReconcileTransaction} transaction |
17690 | | * @param {object} context |
17691 | | * @internal |
17692 | | */ |
17693 | | receiveComponent: function (internalInstance, nextElement, transaction, context) { |
17694 | | var prevElement = internalInstance._currentElement; |
17695 | | |
17696 | | if (nextElement === prevElement && context === internalInstance._context) { |
17697 | | // Since elements are immutable after the owner is rendered, |
17698 | | // we can do a cheap identity compare here to determine if this is a |
17699 | | // superfluous reconcile. It's possible for state to be mutable but such |
17700 | | // change should trigger an update of the owner which would recreate |
17701 | | // the element. We explicitly check for the existence of an owner since |
17702 | | // it's possible for an element created outside a composite to be |
17703 | | // deeply mutated and reused. |
17704 | | |
17705 | | // TODO: Bailing out early is just a perf optimization right? |
17706 | | // TODO: Removing the return statement should affect correctness? |
17707 | | return; |
17708 | | } |
17709 | | |
17710 | | if (true) { |
17711 | | if (internalInstance._debugID !== 0) { |
17712 | | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); |
17713 | | } |
17714 | | } |
17715 | | |
17716 | | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); |
17717 | | |
17718 | | if (refsChanged) { |
17719 | | ReactRef.detachRefs(internalInstance, prevElement); |
17720 | | } |
17721 | | |
17722 | | internalInstance.receiveComponent(nextElement, transaction, context); |
17723 | | |
17724 | | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { |
17725 | | transaction.getReactMountReady().enqueue(attachRefs, internalInstance); |
17726 | | } |
17727 | | |
17728 | | if (true) { |
17729 | | if (internalInstance._debugID !== 0) { |
17730 | | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); |
17731 | | } |
17732 | | } |
17733 | | }, |
17734 | | |
17735 | | /** |
17736 | | * Flush any dirty changes in a component. |
17737 | | * |
17738 | | * @param {ReactComponent} internalInstance |
17739 | | * @param {ReactReconcileTransaction} transaction |
17740 | | * @internal |
17741 | | */ |
17742 | | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { |
17743 | | if (internalInstance._updateBatchNumber !== updateBatchNumber) { |
17744 | | // The component's enqueued batch number should always be the current |
17745 | | // batch or the following one. |
17746 | | true ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; |
17747 | | return; |
17748 | | } |
17749 | | if (true) { |
17750 | | if (internalInstance._debugID !== 0) { |
17751 | | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); |
17752 | | } |
17753 | | } |
17754 | | internalInstance.performUpdateIfNecessary(transaction); |
17755 | | if (true) { |
17756 | | if (internalInstance._debugID !== 0) { |
17757 | | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); |
17758 | | } |
17759 | | } |
17760 | | } |
17761 | | }; |
17762 | | |
17763 | | module.exports = ReactReconciler; |
17764 | | |
17765 | | /***/ }), |
17766 | | /* 396 */ |
17767 | | /***/ (function(module, exports, __webpack_require__) { |
17768 | | |
17769 | | /** |
17770 | | * Copyright (c) 2013-present, Facebook, Inc. |
17771 | | * |
17772 | | * This source code is licensed under the MIT license found in the |
17773 | | * LICENSE file in the root directory of this source tree. |
17774 | | * |
17775 | | * |
17776 | | */ |
17777 | | |
17778 | | 'use strict'; |
17779 | | |
17780 | | var ReactOwner = __webpack_require__(397); |
17781 | | |
17782 | | var ReactRef = {}; |
17783 | | |
17784 | | function attachRef(ref, component, owner) { |
17785 | | if (typeof ref === 'function') { |
17786 | | ref(component.getPublicInstance()); |
17787 | | } else { |
17788 | | // Legacy ref |
17789 | | ReactOwner.addComponentAsRefTo(component, ref, owner); |
17790 | | } |
17791 | | } |
17792 | | |
17793 | | function detachRef(ref, component, owner) { |
17794 | | if (typeof ref === 'function') { |
17795 | | ref(null); |
17796 | | } else { |
17797 | | // Legacy ref |
17798 | | ReactOwner.removeComponentAsRefFrom(component, ref, owner); |
17799 | | } |
17800 | | } |
17801 | | |
17802 | | ReactRef.attachRefs = function (instance, element) { |
17803 | | if (element === null || typeof element !== 'object') { |
17804 | | return; |
17805 | | } |
17806 | | var ref = element.ref; |
17807 | | if (ref != null) { |
17808 | | attachRef(ref, instance, element._owner); |
17809 | | } |
17810 | | }; |
17811 | | |
17812 | | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { |
17813 | | // If either the owner or a `ref` has changed, make sure the newest owner |
17814 | | // has stored a reference to `this`, and the previous owner (if different) |
17815 | | // has forgotten the reference to `this`. We use the element instead |
17816 | | // of the public this.props because the post processing cannot determine |
17817 | | // a ref. The ref conceptually lives on the element. |
17818 | | |
17819 | | // TODO: Should this even be possible? The owner cannot change because |
17820 | | // it's forbidden by shouldUpdateReactComponent. The ref can change |
17821 | | // if you swap the keys of but not the refs. Reconsider where this check |
17822 | | // is made. It probably belongs where the key checking and |
17823 | | // instantiateReactComponent is done. |
17824 | | |
17825 | | var prevRef = null; |
17826 | | var prevOwner = null; |
17827 | | if (prevElement !== null && typeof prevElement === 'object') { |
17828 | | prevRef = prevElement.ref; |
17829 | | prevOwner = prevElement._owner; |
17830 | | } |
17831 | | |
17832 | | var nextRef = null; |
17833 | | var nextOwner = null; |
17834 | | if (nextElement !== null && typeof nextElement === 'object') { |
17835 | | nextRef = nextElement.ref; |
17836 | | nextOwner = nextElement._owner; |
17837 | | } |
17838 | | |
17839 | | return prevRef !== nextRef || |
17840 | | // If owner changes but we have an unchanged function ref, don't update refs |
17841 | | typeof nextRef === 'string' && nextOwner !== prevOwner; |
17842 | | }; |
17843 | | |
17844 | | ReactRef.detachRefs = function (instance, element) { |
17845 | | if (element === null || typeof element !== 'object') { |
17846 | | return; |
17847 | | } |
17848 | | var ref = element.ref; |
17849 | | if (ref != null) { |
17850 | | detachRef(ref, instance, element._owner); |
17851 | | } |
17852 | | }; |
17853 | | |
17854 | | module.exports = ReactRef; |
17855 | | |
17856 | | /***/ }), |
17857 | | /* 397 */ |
17858 | | /***/ (function(module, exports, __webpack_require__) { |
17859 | | |
17860 | | /** |
17861 | | * Copyright (c) 2013-present, Facebook, Inc. |
17862 | | * |
17863 | | * This source code is licensed under the MIT license found in the |
17864 | | * LICENSE file in the root directory of this source tree. |
17865 | | * |
17866 | | * |
17867 | | */ |
17868 | | |
17869 | | 'use strict'; |
17870 | | |
17871 | | var _prodInvariant = __webpack_require__(371); |
17872 | | |
17873 | | var invariant = __webpack_require__(342); |
17874 | | |
17875 | | /** |
17876 | | * @param {?object} object |
17877 | | * @return {boolean} True if `object` is a valid owner. |
17878 | | * @final |
17879 | | */ |
17880 | | function isValidOwner(object) { |
17881 | | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); |
17882 | | } |
17883 | | |
17884 | | /** |
17885 | | * ReactOwners are capable of storing references to owned components. |
17886 | | * |
17887 | | * All components are capable of //being// referenced by owner components, but |
17888 | | * only ReactOwner components are capable of //referencing// owned components. |
17889 | | * The named reference is known as a "ref". |
17890 | | * |
17891 | | * Refs are available when mounted and updated during reconciliation. |
17892 | | * |
17893 | | * var MyComponent = React.createClass({ |
17894 | | * render: function() { |
17895 | | * return ( |
17896 | | * <div onClick={this.handleClick}> |
17897 | | * <CustomComponent ref="custom" /> |
17898 | | * </div> |
17899 | | * ); |
17900 | | * }, |
17901 | | * handleClick: function() { |
17902 | | * this.refs.custom.handleClick(); |
17903 | | * }, |
17904 | | * componentDidMount: function() { |
17905 | | * this.refs.custom.initialize(); |
17906 | | * } |
17907 | | * }); |
17908 | | * |
17909 | | * Refs should rarely be used. When refs are used, they should only be done to |
17910 | | * control data that is not handled by React's data flow. |
17911 | | * |
17912 | | * @class ReactOwner |
17913 | | */ |
17914 | | var ReactOwner = { |
17915 | | /** |
17916 | | * Adds a component by ref to an owner component. |
17917 | | * |
17918 | | * @param {ReactComponent} component Component to reference. |
17919 | | * @param {string} ref Name by which to refer to the component. |
17920 | | * @param {ReactOwner} owner Component on which to record the ref. |
17921 | | * @final |
17922 | | * @internal |
17923 | | */ |
17924 | | addComponentAsRefTo: function (component, ref, owner) { |
17925 | | !isValidOwner(owner) ? true ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; |
17926 | | owner.attachRef(ref, component); |
17927 | | }, |
17928 | | |
17929 | | /** |
17930 | | * Removes a component by ref from an owner component. |
17931 | | * |
17932 | | * @param {ReactComponent} component Component to dereference. |
17933 | | * @param {string} ref Name of the ref to remove. |
17934 | | * @param {ReactOwner} owner Component on which the ref is recorded. |
17935 | | * @final |
17936 | | * @internal |
17937 | | */ |
17938 | | removeComponentAsRefFrom: function (component, ref, owner) { |
17939 | | !isValidOwner(owner) ? true ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; |
17940 | | var ownerPublicInstance = owner.getPublicInstance(); |
17941 | | // Check that `component`'s owner is still alive and that `component` is still the current ref |
17942 | | // because we do not want to detach the ref if another component stole it. |
17943 | | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { |
17944 | | owner.detachRef(ref); |
17945 | | } |
17946 | | } |
17947 | | }; |
17948 | | |
17949 | | module.exports = ReactOwner; |
17950 | | |
17951 | | /***/ }), |
17952 | | /* 398 */ |
17953 | | /***/ (function(module, exports, __webpack_require__) { |
17954 | | |
17955 | | /** |
17956 | | * Copyright (c) 2016-present, Facebook, Inc. |
17957 | | * |
17958 | | * This source code is licensed under the MIT license found in the |
17959 | | * LICENSE file in the root directory of this source tree. |
17960 | | * |
17961 | | * |
17962 | | */ |
17963 | | |
17964 | | 'use strict'; |
17965 | | |
17966 | | // Trust the developer to only use ReactInstrumentation with a __DEV__ check |
17967 | | |
17968 | | var debugTool = null; |
17969 | | |
17970 | | if (true) { |
17971 | | var ReactDebugTool = __webpack_require__(399); |
17972 | | debugTool = ReactDebugTool; |
17973 | | } |
17974 | | |
17975 | | module.exports = { debugTool: debugTool }; |
17976 | | |
17977 | | /***/ }), |
17978 | | /* 399 */ |
17979 | | /***/ (function(module, exports, __webpack_require__) { |
17980 | | |
17981 | | /** |
17982 | | * Copyright (c) 2016-present, Facebook, Inc. |
17983 | | * |
17984 | | * This source code is licensed under the MIT license found in the |
17985 | | * LICENSE file in the root directory of this source tree. |
17986 | | * |
17987 | | * |
17988 | | */ |
17989 | | |
17990 | | 'use strict'; |
17991 | | |
17992 | | var ReactInvalidSetStateWarningHook = __webpack_require__(400); |
17993 | | var ReactHostOperationHistoryHook = __webpack_require__(401); |
17994 | | var ReactComponentTreeHook = __webpack_require__(354); |
17995 | | var ExecutionEnvironment = __webpack_require__(384); |
17996 | | |
17997 | | var performanceNow = __webpack_require__(402); |
17998 | | var warning = __webpack_require__(338); |
17999 | | |
18000 | | var hooks = []; |
18001 | | var didHookThrowForEvent = {}; |
18002 | | |
18003 | | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { |
18004 | | try { |
18005 | | fn.call(context, arg1, arg2, arg3, arg4, arg5); |
18006 | | } catch (e) { |
18007 | | true ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; |
18008 | | didHookThrowForEvent[event] = true; |
18009 | | } |
18010 | | } |
18011 | | |
18012 | | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { |
18013 | | for (var i = 0; i < hooks.length; i++) { |
18014 | | var hook = hooks[i]; |
18015 | | var fn = hook[event]; |
18016 | | if (fn) { |
18017 | | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); |
18018 | | } |
18019 | | } |
18020 | | } |
18021 | | |
18022 | | var isProfiling = false; |
18023 | | var flushHistory = []; |
18024 | | var lifeCycleTimerStack = []; |
18025 | | var currentFlushNesting = 0; |
18026 | | var currentFlushMeasurements = []; |
18027 | | var currentFlushStartTime = 0; |
18028 | | var currentTimerDebugID = null; |
18029 | | var currentTimerStartTime = 0; |
18030 | | var currentTimerNestedFlushDuration = 0; |
18031 | | var currentTimerType = null; |
18032 | | |
18033 | | var lifeCycleTimerHasWarned = false; |
18034 | | |
18035 | | function clearHistory() { |
18036 | | ReactComponentTreeHook.purgeUnmountedComponents(); |
18037 | | ReactHostOperationHistoryHook.clearHistory(); |
18038 | | } |
18039 | | |
18040 | | function getTreeSnapshot(registeredIDs) { |
18041 | | return registeredIDs.reduce(function (tree, id) { |
18042 | | var ownerID = ReactComponentTreeHook.getOwnerID(id); |
18043 | | var parentID = ReactComponentTreeHook.getParentID(id); |
18044 | | tree[id] = { |
18045 | | displayName: ReactComponentTreeHook.getDisplayName(id), |
18046 | | text: ReactComponentTreeHook.getText(id), |
18047 | | updateCount: ReactComponentTreeHook.getUpdateCount(id), |
18048 | | childIDs: ReactComponentTreeHook.getChildIDs(id), |
18049 | | // Text nodes don't have owners but this is close enough. |
18050 | | ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, |
18051 | | parentID: parentID |
18052 | | }; |
18053 | | return tree; |
18054 | | }, {}); |
18055 | | } |
18056 | | |
18057 | | function resetMeasurements() { |
18058 | | var previousStartTime = currentFlushStartTime; |
18059 | | var previousMeasurements = currentFlushMeasurements; |
18060 | | var previousOperations = ReactHostOperationHistoryHook.getHistory(); |
18061 | | |
18062 | | if (currentFlushNesting === 0) { |
18063 | | currentFlushStartTime = 0; |
18064 | | currentFlushMeasurements = []; |
18065 | | clearHistory(); |
18066 | | return; |
18067 | | } |
18068 | | |
18069 | | if (previousMeasurements.length || previousOperations.length) { |
18070 | | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); |
18071 | | flushHistory.push({ |
18072 | | duration: performanceNow() - previousStartTime, |
18073 | | measurements: previousMeasurements || [], |
18074 | | operations: previousOperations || [], |
18075 | | treeSnapshot: getTreeSnapshot(registeredIDs) |
18076 | | }); |
18077 | | } |
18078 | | |
18079 | | clearHistory(); |
18080 | | currentFlushStartTime = performanceNow(); |
18081 | | currentFlushMeasurements = []; |
18082 | | } |
18083 | | |
18084 | | function checkDebugID(debugID) { |
18085 | | var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; |
18086 | | |
18087 | | if (allowRoot && debugID === 0) { |
18088 | | return; |
18089 | | } |
18090 | | if (!debugID) { |
18091 | | true ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; |
18092 | | } |
18093 | | } |
18094 | | |
18095 | | function beginLifeCycleTimer(debugID, timerType) { |
18096 | | if (currentFlushNesting === 0) { |
18097 | | return; |
18098 | | } |
18099 | | if (currentTimerType && !lifeCycleTimerHasWarned) { |
18100 | | true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; |
18101 | | lifeCycleTimerHasWarned = true; |
18102 | | } |
18103 | | currentTimerStartTime = performanceNow(); |
18104 | | currentTimerNestedFlushDuration = 0; |
18105 | | currentTimerDebugID = debugID; |
18106 | | currentTimerType = timerType; |
18107 | | } |
18108 | | |
18109 | | function endLifeCycleTimer(debugID, timerType) { |
18110 | | if (currentFlushNesting === 0) { |
18111 | | return; |
18112 | | } |
18113 | | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { |
18114 | | true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; |
18115 | | lifeCycleTimerHasWarned = true; |
18116 | | } |
18117 | | if (isProfiling) { |
18118 | | currentFlushMeasurements.push({ |
18119 | | timerType: timerType, |
18120 | | instanceID: debugID, |
18121 | | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration |
18122 | | }); |
18123 | | } |
18124 | | currentTimerStartTime = 0; |
18125 | | currentTimerNestedFlushDuration = 0; |
18126 | | currentTimerDebugID = null; |
18127 | | currentTimerType = null; |
18128 | | } |
18129 | | |
18130 | | function pauseCurrentLifeCycleTimer() { |
18131 | | var currentTimer = { |
18132 | | startTime: currentTimerStartTime, |
18133 | | nestedFlushStartTime: performanceNow(), |
18134 | | debugID: currentTimerDebugID, |
18135 | | timerType: currentTimerType |
18136 | | }; |
18137 | | lifeCycleTimerStack.push(currentTimer); |
18138 | | currentTimerStartTime = 0; |
18139 | | currentTimerNestedFlushDuration = 0; |
18140 | | currentTimerDebugID = null; |
18141 | | currentTimerType = null; |
18142 | | } |
18143 | | |
18144 | | function resumeCurrentLifeCycleTimer() { |
18145 | | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), |
18146 | | startTime = _lifeCycleTimerStack$.startTime, |
18147 | | nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, |
18148 | | debugID = _lifeCycleTimerStack$.debugID, |
18149 | | timerType = _lifeCycleTimerStack$.timerType; |
18150 | | |
18151 | | var nestedFlushDuration = performanceNow() - nestedFlushStartTime; |
18152 | | currentTimerStartTime = startTime; |
18153 | | currentTimerNestedFlushDuration += nestedFlushDuration; |
18154 | | currentTimerDebugID = debugID; |
18155 | | currentTimerType = timerType; |
18156 | | } |
18157 | | |
18158 | | var lastMarkTimeStamp = 0; |
18159 | | var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; |
18160 | | |
18161 | | function shouldMark(debugID) { |
18162 | | if (!isProfiling || !canUsePerformanceMeasure) { |
18163 | | return false; |
18164 | | } |
18165 | | var element = ReactComponentTreeHook.getElement(debugID); |
18166 | | if (element == null || typeof element !== 'object') { |
18167 | | return false; |
18168 | | } |
18169 | | var isHostElement = typeof element.type === 'string'; |
18170 | | if (isHostElement) { |
18171 | | return false; |
18172 | | } |
18173 | | return true; |
18174 | | } |
18175 | | |
18176 | | function markBegin(debugID, markType) { |
18177 | | if (!shouldMark(debugID)) { |
18178 | | return; |
18179 | | } |
18180 | | |
18181 | | var markName = debugID + '::' + markType; |
18182 | | lastMarkTimeStamp = performanceNow(); |
18183 | | performance.mark(markName); |
18184 | | } |
18185 | | |
18186 | | function markEnd(debugID, markType) { |
18187 | | if (!shouldMark(debugID)) { |
18188 | | return; |
18189 | | } |
18190 | | |
18191 | | var markName = debugID + '::' + markType; |
18192 | | var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; |
18193 | | |
18194 | | // Chrome has an issue of dropping markers recorded too fast: |
18195 | | // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 |
18196 | | // To work around this, we will not report very small measurements. |
18197 | | // I determined the magic number by tweaking it back and forth. |
18198 | | // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. |
18199 | | // When the bug is fixed, we can `measure()` unconditionally if we want to. |
18200 | | var timeStamp = performanceNow(); |
18201 | | if (timeStamp - lastMarkTimeStamp > 0.1) { |
18202 | | var measurementName = displayName + ' [' + markType + ']'; |
18203 | | performance.measure(measurementName, markName); |
18204 | | } |
18205 | | |
18206 | | performance.clearMarks(markName); |
18207 | | if (measurementName) { |
18208 | | performance.clearMeasures(measurementName); |
18209 | | } |
18210 | | } |
18211 | | |
18212 | | var ReactDebugTool = { |
18213 | | addHook: function (hook) { |
18214 | | hooks.push(hook); |
18215 | | }, |
18216 | | removeHook: function (hook) { |
18217 | | for (var i = 0; i < hooks.length; i++) { |
18218 | | if (hooks[i] === hook) { |
18219 | | hooks.splice(i, 1); |
18220 | | i--; |
18221 | | } |
18222 | | } |
18223 | | }, |
18224 | | isProfiling: function () { |
18225 | | return isProfiling; |
18226 | | }, |
18227 | | beginProfiling: function () { |
18228 | | if (isProfiling) { |
18229 | | return; |
18230 | | } |
18231 | | |
18232 | | isProfiling = true; |
18233 | | flushHistory.length = 0; |
18234 | | resetMeasurements(); |
18235 | | ReactDebugTool.addHook(ReactHostOperationHistoryHook); |
18236 | | }, |
18237 | | endProfiling: function () { |
18238 | | if (!isProfiling) { |
18239 | | return; |
18240 | | } |
18241 | | |
18242 | | isProfiling = false; |
18243 | | resetMeasurements(); |
18244 | | ReactDebugTool.removeHook(ReactHostOperationHistoryHook); |
18245 | | }, |
18246 | | getFlushHistory: function () { |
18247 | | return flushHistory; |
18248 | | }, |
18249 | | onBeginFlush: function () { |
18250 | | currentFlushNesting++; |
18251 | | resetMeasurements(); |
18252 | | pauseCurrentLifeCycleTimer(); |
18253 | | emitEvent('onBeginFlush'); |
18254 | | }, |
18255 | | onEndFlush: function () { |
18256 | | resetMeasurements(); |
18257 | | currentFlushNesting--; |
18258 | | resumeCurrentLifeCycleTimer(); |
18259 | | emitEvent('onEndFlush'); |
18260 | | }, |
18261 | | onBeginLifeCycleTimer: function (debugID, timerType) { |
18262 | | checkDebugID(debugID); |
18263 | | emitEvent('onBeginLifeCycleTimer', debugID, timerType); |
18264 | | markBegin(debugID, timerType); |
18265 | | beginLifeCycleTimer(debugID, timerType); |
18266 | | }, |
18267 | | onEndLifeCycleTimer: function (debugID, timerType) { |
18268 | | checkDebugID(debugID); |
18269 | | endLifeCycleTimer(debugID, timerType); |
18270 | | markEnd(debugID, timerType); |
18271 | | emitEvent('onEndLifeCycleTimer', debugID, timerType); |
18272 | | }, |
18273 | | onBeginProcessingChildContext: function () { |
18274 | | emitEvent('onBeginProcessingChildContext'); |
18275 | | }, |
18276 | | onEndProcessingChildContext: function () { |
18277 | | emitEvent('onEndProcessingChildContext'); |
18278 | | }, |
18279 | | onHostOperation: function (operation) { |
18280 | | checkDebugID(operation.instanceID); |
18281 | | emitEvent('onHostOperation', operation); |
18282 | | }, |
18283 | | onSetState: function () { |
18284 | | emitEvent('onSetState'); |
18285 | | }, |
18286 | | onSetChildren: function (debugID, childDebugIDs) { |
18287 | | checkDebugID(debugID); |
18288 | | childDebugIDs.forEach(checkDebugID); |
18289 | | emitEvent('onSetChildren', debugID, childDebugIDs); |
18290 | | }, |
18291 | | onBeforeMountComponent: function (debugID, element, parentDebugID) { |
18292 | | checkDebugID(debugID); |
18293 | | checkDebugID(parentDebugID, true); |
18294 | | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); |
18295 | | markBegin(debugID, 'mount'); |
18296 | | }, |
18297 | | onMountComponent: function (debugID) { |
18298 | | checkDebugID(debugID); |
18299 | | markEnd(debugID, 'mount'); |
18300 | | emitEvent('onMountComponent', debugID); |
18301 | | }, |
18302 | | onBeforeUpdateComponent: function (debugID, element) { |
18303 | | checkDebugID(debugID); |
18304 | | emitEvent('onBeforeUpdateComponent', debugID, element); |
18305 | | markBegin(debugID, 'update'); |
18306 | | }, |
18307 | | onUpdateComponent: function (debugID) { |
18308 | | checkDebugID(debugID); |
18309 | | markEnd(debugID, 'update'); |
18310 | | emitEvent('onUpdateComponent', debugID); |
18311 | | }, |
18312 | | onBeforeUnmountComponent: function (debugID) { |
18313 | | checkDebugID(debugID); |
18314 | | emitEvent('onBeforeUnmountComponent', debugID); |
18315 | | markBegin(debugID, 'unmount'); |
18316 | | }, |
18317 | | onUnmountComponent: function (debugID) { |
18318 | | checkDebugID(debugID); |
18319 | | markEnd(debugID, 'unmount'); |
18320 | | emitEvent('onUnmountComponent', debugID); |
18321 | | }, |
18322 | | onTestEvent: function () { |
18323 | | emitEvent('onTestEvent'); |
18324 | | } |
18325 | | }; |
18326 | | |
18327 | | // TODO remove these when RN/www gets updated |
18328 | | ReactDebugTool.addDevtool = ReactDebugTool.addHook; |
18329 | | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; |
18330 | | |
18331 | | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); |
18332 | | ReactDebugTool.addHook(ReactComponentTreeHook); |
18333 | | var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; |
18334 | | if (/[?&]react_perf\b/.test(url)) { |
18335 | | ReactDebugTool.beginProfiling(); |
18336 | | } |
18337 | | |
18338 | | module.exports = ReactDebugTool; |
18339 | | |
18340 | | /***/ }), |
18341 | | /* 400 */ |
18342 | | /***/ (function(module, exports, __webpack_require__) { |
18343 | | |
18344 | | /** |
18345 | | * Copyright (c) 2016-present, Facebook, Inc. |
18346 | | * |
18347 | | * This source code is licensed under the MIT license found in the |
18348 | | * LICENSE file in the root directory of this source tree. |
18349 | | * |
18350 | | * |
18351 | | */ |
18352 | | |
18353 | | 'use strict'; |
18354 | | |
18355 | | var warning = __webpack_require__(338); |
18356 | | |
18357 | | if (true) { |
18358 | | var processingChildContext = false; |
18359 | | |
18360 | | var warnInvalidSetState = function () { |
18361 | | true ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; |
18362 | | }; |
18363 | | } |
18364 | | |
18365 | | var ReactInvalidSetStateWarningHook = { |
18366 | | onBeginProcessingChildContext: function () { |
18367 | | processingChildContext = true; |
18368 | | }, |
18369 | | onEndProcessingChildContext: function () { |
18370 | | processingChildContext = false; |
18371 | | }, |
18372 | | onSetState: function () { |
18373 | | warnInvalidSetState(); |
18374 | | } |
18375 | | }; |
18376 | | |
18377 | | module.exports = ReactInvalidSetStateWarningHook; |
18378 | | |
18379 | | /***/ }), |
18380 | | /* 401 */ |
18381 | | /***/ (function(module, exports) { |
18382 | | |
18383 | | /** |
18384 | | * Copyright (c) 2016-present, Facebook, Inc. |
18385 | | * |
18386 | | * This source code is licensed under the MIT license found in the |
18387 | | * LICENSE file in the root directory of this source tree. |
18388 | | * |
18389 | | * |
18390 | | */ |
18391 | | |
18392 | | 'use strict'; |
18393 | | |
18394 | | var history = []; |
18395 | | |
18396 | | var ReactHostOperationHistoryHook = { |
18397 | | onHostOperation: function (operation) { |
18398 | | history.push(operation); |
18399 | | }, |
18400 | | clearHistory: function () { |
18401 | | if (ReactHostOperationHistoryHook._preventClearing) { |
18402 | | // Should only be used for tests. |
18403 | | return; |
18404 | | } |
18405 | | |
18406 | | history = []; |
18407 | | }, |
18408 | | getHistory: function () { |
18409 | | return history; |
18410 | | } |
18411 | | }; |
18412 | | |
18413 | | module.exports = ReactHostOperationHistoryHook; |
18414 | | |
18415 | | /***/ }), |
18416 | | /* 402 */ |
18417 | | /***/ (function(module, exports, __webpack_require__) { |
18418 | | |
18419 | | 'use strict'; |
18420 | | |
18421 | | /** |
18422 | | * Copyright (c) 2013-present, Facebook, Inc. |
18423 | | * |
18424 | | * This source code is licensed under the MIT license found in the |
18425 | | * LICENSE file in the root directory of this source tree. |
18426 | | * |
18427 | | * @typechecks |
18428 | | */ |
18429 | | |
18430 | | var performance = __webpack_require__(403); |
18431 | | |
18432 | | var performanceNow; |
18433 | | |
18434 | | /** |
18435 | | * Detect if we can use `window.performance.now()` and gracefully fallback to |
18436 | | * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now |
18437 | | * because of Facebook's testing infrastructure. |
18438 | | */ |
18439 | | if (performance.now) { |
18440 | | performanceNow = function performanceNow() { |
18441 | | return performance.now(); |
18442 | | }; |
18443 | | } else { |
18444 | | performanceNow = function performanceNow() { |
18445 | | return Date.now(); |
18446 | | }; |
18447 | | } |
18448 | | |
18449 | | module.exports = performanceNow; |
18450 | | |
18451 | | /***/ }), |
18452 | | /* 403 */ |
18453 | | /***/ (function(module, exports, __webpack_require__) { |
18454 | | |
18455 | | /** |
18456 | | * Copyright (c) 2013-present, Facebook, Inc. |
18457 | | * |
18458 | | * This source code is licensed under the MIT license found in the |
18459 | | * LICENSE file in the root directory of this source tree. |
18460 | | * |
18461 | | * @typechecks |
18462 | | */ |
18463 | | |
18464 | | 'use strict'; |
18465 | | |
18466 | | var ExecutionEnvironment = __webpack_require__(384); |
18467 | | |
18468 | | var performance; |
18469 | | |
18470 | | if (ExecutionEnvironment.canUseDOM) { |
18471 | | performance = window.performance || window.msPerformance || window.webkitPerformance; |
18472 | | } |
18473 | | |
18474 | | module.exports = performance || {}; |
18475 | | |
18476 | | /***/ }), |
18477 | | /* 404 */ |
18478 | | /***/ (function(module, exports, __webpack_require__) { |
18479 | | |
18480 | | /** |
18481 | | * Copyright (c) 2013-present, Facebook, Inc. |
18482 | | * |
18483 | | * This source code is licensed under the MIT license found in the |
18484 | | * LICENSE file in the root directory of this source tree. |
18485 | | * |
18486 | | * |
18487 | | */ |
18488 | | |
18489 | | 'use strict'; |
18490 | | |
18491 | | var _prodInvariant = __webpack_require__(371); |
18492 | | |
18493 | | var invariant = __webpack_require__(342); |
18494 | | |
18495 | | var OBSERVED_ERROR = {}; |
18496 | | |
18497 | | /** |
18498 | | * `Transaction` creates a black box that is able to wrap any method such that |
18499 | | * certain invariants are maintained before and after the method is invoked |
18500 | | * (Even if an exception is thrown while invoking the wrapped method). Whoever |
18501 | | * instantiates a transaction can provide enforcers of the invariants at |
18502 | | * creation time. The `Transaction` class itself will supply one additional |
18503 | | * automatic invariant for you - the invariant that any transaction instance |
18504 | | * should not be run while it is already being run. You would typically create a |
18505 | | * single instance of a `Transaction` for reuse multiple times, that potentially |
18506 | | * is used to wrap several different methods. Wrappers are extremely simple - |
18507 | | * they only require implementing two methods. |
18508 | | * |
18509 | | * <pre> |
18510 | | * wrappers (injected at creation time) |
18511 | | * + + |
18512 | | * | | |
18513 | | * +-----------------|--------|--------------+ |
18514 | | * | v | | |
18515 | | * | +---------------+ | | |
18516 | | * | +--| wrapper1 |---|----+ | |
18517 | | * | | +---------------+ v | | |
18518 | | * | | +-------------+ | | |
18519 | | * | | +----| wrapper2 |--------+ | |
18520 | | * | | | +-------------+ | | | |
18521 | | * | | | | | | |
18522 | | * | v v v v | wrapper |
18523 | | * | +---+ +---+ +---------+ +---+ +---+ | invariants |
18524 | | * perform(anyMethod) | | | | | | | | | | | | maintained |
18525 | | * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> |
18526 | | * | | | | | | | | | | | | |
18527 | | * | | | | | | | | | | | | |
18528 | | * | | | | | | | | | | | | |
18529 | | * | +---+ +---+ +---------+ +---+ +---+ | |
18530 | | * | initialize close | |
18531 | | * +-----------------------------------------+ |
18532 | | * </pre> |
18533 | | * |
18534 | | * Use cases: |
18535 | | * - Preserving the input selection ranges before/after reconciliation. |
18536 | | * Restoring selection even in the event of an unexpected error. |
18537 | | * - Deactivating events while rearranging the DOM, preventing blurs/focuses, |
18538 | | * while guaranteeing that afterwards, the event system is reactivated. |
18539 | | * - Flushing a queue of collected DOM mutations to the main UI thread after a |
18540 | | * reconciliation takes place in a worker thread. |
18541 | | * - Invoking any collected `componentDidUpdate` callbacks after rendering new |
18542 | | * content. |
18543 | | * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue |
18544 | | * to preserve the `scrollTop` (an automatic scroll aware DOM). |
18545 | | * - (Future use case): Layout calculations before and after DOM updates. |
18546 | | * |
18547 | | * Transactional plugin API: |
18548 | | * - A module that has an `initialize` method that returns any precomputation. |
18549 | | * - and a `close` method that accepts the precomputation. `close` is invoked |
18550 | | * when the wrapped process is completed, or has failed. |
18551 | | * |
18552 | | * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules |
18553 | | * that implement `initialize` and `close`. |
18554 | | * @return {Transaction} Single transaction for reuse in thread. |
18555 | | * |
18556 | | * @class Transaction |
18557 | | */ |
18558 | | var TransactionImpl = { |
18559 | | /** |
18560 | | * Sets up this instance so that it is prepared for collecting metrics. Does |
18561 | | * so such that this setup method may be used on an instance that is already |
18562 | | * initialized, in a way that does not consume additional memory upon reuse. |
18563 | | * That can be useful if you decide to make your subclass of this mixin a |
18564 | | * "PooledClass". |
18565 | | */ |
18566 | | reinitializeTransaction: function () { |
18567 | | this.transactionWrappers = this.getTransactionWrappers(); |
18568 | | if (this.wrapperInitData) { |
18569 | | this.wrapperInitData.length = 0; |
18570 | | } else { |
18571 | | this.wrapperInitData = []; |
18572 | | } |
18573 | | this._isInTransaction = false; |
18574 | | }, |
18575 | | |
18576 | | _isInTransaction: false, |
18577 | | |
18578 | | /** |
18579 | | * @abstract |
18580 | | * @return {Array<TransactionWrapper>} Array of transaction wrappers. |
18581 | | */ |
18582 | | getTransactionWrappers: null, |
18583 | | |
18584 | | isInTransaction: function () { |
18585 | | return !!this._isInTransaction; |
18586 | | }, |
18587 | | |
18588 | | /* eslint-disable space-before-function-paren */ |
18589 | | |
18590 | | /** |
18591 | | * Executes the function within a safety window. Use this for the top level |
18592 | | * methods that result in large amounts of computation/mutations that would |
18593 | | * need to be safety checked. The optional arguments helps prevent the need |
18594 | | * to bind in many cases. |
18595 | | * |
18596 | | * @param {function} method Member of scope to call. |
18597 | | * @param {Object} scope Scope to invoke from. |
18598 | | * @param {Object?=} a Argument to pass to the method. |
18599 | | * @param {Object?=} b Argument to pass to the method. |
18600 | | * @param {Object?=} c Argument to pass to the method. |
18601 | | * @param {Object?=} d Argument to pass to the method. |
18602 | | * @param {Object?=} e Argument to pass to the method. |
18603 | | * @param {Object?=} f Argument to pass to the method. |
18604 | | * |
18605 | | * @return {*} Return value from `method`. |
18606 | | */ |
18607 | | perform: function (method, scope, a, b, c, d, e, f) { |
18608 | | /* eslint-enable space-before-function-paren */ |
18609 | | !!this.isInTransaction() ? true ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; |
18610 | | var errorThrown; |
18611 | | var ret; |
18612 | | try { |
18613 | | this._isInTransaction = true; |
18614 | | // Catching errors makes debugging more difficult, so we start with |
18615 | | // errorThrown set to true before setting it to false after calling |
18616 | | // close -- if it's still set to true in the finally block, it means |
18617 | | // one of these calls threw. |
18618 | | errorThrown = true; |
18619 | | this.initializeAll(0); |
18620 | | ret = method.call(scope, a, b, c, d, e, f); |
18621 | | errorThrown = false; |
18622 | | } finally { |
18623 | | try { |
18624 | | if (errorThrown) { |
18625 | | // If `method` throws, prefer to show that stack trace over any thrown |
18626 | | // by invoking `closeAll`. |
18627 | | try { |
18628 | | this.closeAll(0); |
18629 | | } catch (err) {} |
18630 | | } else { |
18631 | | // Since `method` didn't throw, we don't want to silence the exception |
18632 | | // here. |
18633 | | this.closeAll(0); |
18634 | | } |
18635 | | } finally { |
18636 | | this._isInTransaction = false; |
18637 | | } |
18638 | | } |
18639 | | return ret; |
18640 | | }, |
18641 | | |
18642 | | initializeAll: function (startIndex) { |
18643 | | var transactionWrappers = this.transactionWrappers; |
18644 | | for (var i = startIndex; i < transactionWrappers.length; i++) { |
18645 | | var wrapper = transactionWrappers[i]; |
18646 | | try { |
18647 | | // Catching errors makes debugging more difficult, so we start with the |
18648 | | // OBSERVED_ERROR state before overwriting it with the real return value |
18649 | | // of initialize -- if it's still set to OBSERVED_ERROR in the finally |
18650 | | // block, it means wrapper.initialize threw. |
18651 | | this.wrapperInitData[i] = OBSERVED_ERROR; |
18652 | | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; |
18653 | | } finally { |
18654 | | if (this.wrapperInitData[i] === OBSERVED_ERROR) { |
18655 | | // The initializer for wrapper i threw an error; initialize the |
18656 | | // remaining wrappers but silence any exceptions from them to ensure |
18657 | | // that the first error is the one to bubble up. |
18658 | | try { |
18659 | | this.initializeAll(i + 1); |
18660 | | } catch (err) {} |
18661 | | } |
18662 | | } |
18663 | | } |
18664 | | }, |
18665 | | |
18666 | | /** |
18667 | | * Invokes each of `this.transactionWrappers.close[i]` functions, passing into |
18668 | | * them the respective return values of `this.transactionWrappers.init[i]` |
18669 | | * (`close`rs that correspond to initializers that failed will not be |
18670 | | * invoked). |
18671 | | */ |
18672 | | closeAll: function (startIndex) { |
18673 | | !this.isInTransaction() ? true ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; |
18674 | | var transactionWrappers = this.transactionWrappers; |
18675 | | for (var i = startIndex; i < transactionWrappers.length; i++) { |
18676 | | var wrapper = transactionWrappers[i]; |
18677 | | var initData = this.wrapperInitData[i]; |
18678 | | var errorThrown; |
18679 | | try { |
18680 | | // Catching errors makes debugging more difficult, so we start with |
18681 | | // errorThrown set to true before setting it to false after calling |
18682 | | // close -- if it's still set to true in the finally block, it means |
18683 | | // wrapper.close threw. |
18684 | | errorThrown = true; |
18685 | | if (initData !== OBSERVED_ERROR && wrapper.close) { |
18686 | | wrapper.close.call(this, initData); |
18687 | | } |
18688 | | errorThrown = false; |
18689 | | } finally { |
18690 | | if (errorThrown) { |
18691 | | // The closer for wrapper i threw an error; close the remaining |
18692 | | // wrappers but silence any exceptions from them to ensure that the |
18693 | | // first error is the one to bubble up. |
18694 | | try { |
18695 | | this.closeAll(i + 1); |
18696 | | } catch (e) {} |
18697 | | } |
18698 | | } |
18699 | | } |
18700 | | this.wrapperInitData.length = 0; |
18701 | | } |
18702 | | }; |
18703 | | |
18704 | | module.exports = TransactionImpl; |
18705 | | |
18706 | | /***/ }), |
18707 | | /* 405 */ |
18708 | | /***/ (function(module, exports, __webpack_require__) { |
18709 | | |
18710 | | /** |
18711 | | * Copyright (c) 2013-present, Facebook, Inc. |
18712 | | * |
18713 | | * This source code is licensed under the MIT license found in the |
18714 | | * LICENSE file in the root directory of this source tree. |
18715 | | * |
18716 | | */ |
18717 | | |
18718 | | 'use strict'; |
18719 | | |
18720 | | var ReactDOMComponentTree = __webpack_require__(370); |
18721 | | |
18722 | | function isCheckable(elem) { |
18723 | | var type = elem.type; |
18724 | | var nodeName = elem.nodeName; |
18725 | | return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); |
18726 | | } |
18727 | | |
18728 | | function getTracker(inst) { |
18729 | | return inst._wrapperState.valueTracker; |
18730 | | } |
18731 | | |
18732 | | function attachTracker(inst, tracker) { |
18733 | | inst._wrapperState.valueTracker = tracker; |
18734 | | } |
18735 | | |
18736 | | function detachTracker(inst) { |
18737 | | inst._wrapperState.valueTracker = null; |
18738 | | } |
18739 | | |
18740 | | function getValueFromNode(node) { |
18741 | | var value; |
18742 | | if (node) { |
18743 | | value = isCheckable(node) ? '' + node.checked : node.value; |
18744 | | } |
18745 | | return value; |
18746 | | } |
18747 | | |
18748 | | var inputValueTracking = { |
18749 | | // exposed for testing |
18750 | | _getTrackerFromNode: function (node) { |
18751 | | return getTracker(ReactDOMComponentTree.getInstanceFromNode(node)); |
18752 | | }, |
18753 | | |
18754 | | |
18755 | | track: function (inst) { |
18756 | | if (getTracker(inst)) { |
18757 | | return; |
18758 | | } |
18759 | | |
18760 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
18761 | | var valueField = isCheckable(node) ? 'checked' : 'value'; |
18762 | | var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); |
18763 | | |
18764 | | var currentValue = '' + node[valueField]; |
18765 | | |
18766 | | // if someone has already defined a value or Safari, then bail |
18767 | | // and don't track value will cause over reporting of changes, |
18768 | | // but it's better then a hard failure |
18769 | | // (needed for certain tests that spyOn input values and Safari) |
18770 | | if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { |
18771 | | return; |
18772 | | } |
18773 | | |
18774 | | Object.defineProperty(node, valueField, { |
18775 | | enumerable: descriptor.enumerable, |
18776 | | configurable: true, |
18777 | | get: function () { |
18778 | | return descriptor.get.call(this); |
18779 | | }, |
18780 | | set: function (value) { |
18781 | | currentValue = '' + value; |
18782 | | descriptor.set.call(this, value); |
18783 | | } |
18784 | | }); |
18785 | | |
18786 | | attachTracker(inst, { |
18787 | | getValue: function () { |
18788 | | return currentValue; |
18789 | | }, |
18790 | | setValue: function (value) { |
18791 | | currentValue = '' + value; |
18792 | | }, |
18793 | | stopTracking: function () { |
18794 | | detachTracker(inst); |
18795 | | delete node[valueField]; |
18796 | | } |
18797 | | }); |
18798 | | }, |
18799 | | |
18800 | | updateValueIfChanged: function (inst) { |
18801 | | if (!inst) { |
18802 | | return false; |
18803 | | } |
18804 | | var tracker = getTracker(inst); |
18805 | | |
18806 | | if (!tracker) { |
18807 | | inputValueTracking.track(inst); |
18808 | | return true; |
18809 | | } |
18810 | | |
18811 | | var lastValue = tracker.getValue(); |
18812 | | var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst)); |
18813 | | |
18814 | | if (nextValue !== lastValue) { |
18815 | | tracker.setValue(nextValue); |
18816 | | return true; |
18817 | | } |
18818 | | |
18819 | | return false; |
18820 | | }, |
18821 | | stopTracking: function (inst) { |
18822 | | var tracker = getTracker(inst); |
18823 | | if (tracker) { |
18824 | | tracker.stopTracking(); |
18825 | | } |
18826 | | } |
18827 | | }; |
18828 | | |
18829 | | module.exports = inputValueTracking; |
18830 | | |
18831 | | /***/ }), |
18832 | | /* 406 */ |
18833 | | /***/ (function(module, exports) { |
18834 | | |
18835 | | /** |
18836 | | * Copyright (c) 2013-present, Facebook, Inc. |
18837 | | * |
18838 | | * This source code is licensed under the MIT license found in the |
18839 | | * LICENSE file in the root directory of this source tree. |
18840 | | * |
18841 | | */ |
18842 | | |
18843 | | 'use strict'; |
18844 | | |
18845 | | /** |
18846 | | * Gets the target node from a native browser event by accounting for |
18847 | | * inconsistencies in browser DOM APIs. |
18848 | | * |
18849 | | * @param {object} nativeEvent Native browser event. |
18850 | | * @return {DOMEventTarget} Target node. |
18851 | | */ |
18852 | | |
18853 | | function getEventTarget(nativeEvent) { |
18854 | | var target = nativeEvent.target || nativeEvent.srcElement || window; |
18855 | | |
18856 | | // Normalize SVG <use> element events #4963 |
18857 | | if (target.correspondingUseElement) { |
18858 | | target = target.correspondingUseElement; |
18859 | | } |
18860 | | |
18861 | | // Safari may fire events on text nodes (Node.TEXT_NODE is 3). |
18862 | | // @see http://www.quirksmode.org/js/events_properties.html |
18863 | | return target.nodeType === 3 ? target.parentNode : target; |
18864 | | } |
18865 | | |
18866 | | module.exports = getEventTarget; |
18867 | | |
18868 | | /***/ }), |
18869 | | /* 407 */ |
18870 | | /***/ (function(module, exports, __webpack_require__) { |
18871 | | |
18872 | | /** |
18873 | | * Copyright (c) 2013-present, Facebook, Inc. |
18874 | | * |
18875 | | * This source code is licensed under the MIT license found in the |
18876 | | * LICENSE file in the root directory of this source tree. |
18877 | | * |
18878 | | */ |
18879 | | |
18880 | | 'use strict'; |
18881 | | |
18882 | | var ExecutionEnvironment = __webpack_require__(384); |
18883 | | |
18884 | | var useHasFeature; |
18885 | | if (ExecutionEnvironment.canUseDOM) { |
18886 | | useHasFeature = document.implementation && document.implementation.hasFeature && |
18887 | | // always returns true in newer browsers as per the standard. |
18888 | | // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature |
18889 | | document.implementation.hasFeature('', '') !== true; |
18890 | | } |
18891 | | |
18892 | | /** |
| 9 | "use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,u,s=n(t),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var l in r)i.call(r,l)&&(s[l]=r[l]);if(o){u=o(r);for(var f=0;f<u.length;f++)a.call(r,u[f])&&(s[u[f]]=r[u[f]])}}return s}},function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=c,this.updater=n||s}function o(t,e,n){this.props=t,this.context=e,this.refs=c,this.updater=n||s}function i(){}var a=n(336),u=n(334),s=n(337),c=(n(340),n(341));n(342),n(343);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?a("85"):void 0,this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};i.prototype=r.prototype,o.prototype=new i,o.prototype.constructor=o,u(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,t.exports={Component:r,PureComponent:o}},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=n},function(t,e,n){"use strict";function r(t,e){}var o=(n(338),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){r(t,"forceUpdate")},enqueueReplaceState:function(t,e){r(t,"replaceState")},enqueueSetState:function(t,e){r(t,"setState")}});t.exports=o},function(t,e,n){"use strict";var r=n(339),o=r;t.exports=o},function(t,e){"use strict";function n(t){return function(){return t}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";var r=!1;t.exports=r},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,s){if(o(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(t){};t.exports=r},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return(""+t).replace(b,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);g(t,i,r),o.release(r)}function u(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,u=t.context,s=a.call(u,e,t.count++);Array.isArray(s)?c(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(e,a,o,i);g(t,s,c),u.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function f(t,e,n){return null}function p(t,e){return g(t,f,null)}function d(t){var e=[];return c(t,e,null,m.thatReturnsArgument),e}var h=n(345),v=n(346),m=n(339),g=n(349),y=h.twoArgumentPooler,_=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,_);var x={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:p,toArray:d};t.exports=x},function(t,e,n){"use strict";var r=n(336),o=(n(342),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,f=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=s,n},p={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};t.exports=p},function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=n(334),a=n(347),u=(n(338),n(340),Object.prototype.hasOwnProperty),s=n(348),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){var u={$$typeof:s,type:t,key:e,ref:n,props:a,_owner:i};return u};l.createElement=function(t,e,n){var i,s={},f=null,p=null,d=null,h=null;if(null!=e){r(e)&&(p=e.ref),o(e)&&(f=""+e.key),d=void 0===e.__self?null:e.__self,h=void 0===e.__source?null:e.__source;for(i in e)u.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var v=arguments.length-2;if(1===v)s.children=n;else if(v>1){for(var m=Array(v),g=0;g<v;g++)m[g]=arguments[g+2];s.children=m}if(t&&t.defaultProps){var y=t.defaultProps;for(i in y)void 0===s[i]&&(s[i]=y[i])}return l(t,f,p,d,h,a.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){var n=l(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},l.cloneElement=function(t,e,n){var s,f=i({},t.props),p=t.key,d=t.ref,h=t._self,v=t._source,m=t._owner;if(null!=e){r(e)&&(d=e.ref,m=a.current),o(e)&&(p=""+e.key);var g;t.type&&t.type.defaultProps&&(g=t.type.defaultProps);for(s in e)u.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==g?f[s]=g[s]:f[s]=e[s])}var y=arguments.length-2;if(1===y)f.children=n;else if(y>1){for(var _=Array(y),b=0;b<y;b++)_[b]=arguments[b+2];f.children=_}return l(t.type,p,d,h,v,m,f)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},t.exports=l},function(t,e){"use strict";var n={current:null};t.exports=n},function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=n},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t=null),null===t||"string"===p||"number"===p||"object"===p&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var d,h,v=0,m=""===e?l:e+f;if(Array.isArray(t))for(var g=0;g<t.length;g++)d=t[g],h=m+r(d,g),v+=o(d,h,n,i);else{var y=s(t);if(y){var _,b=y.call(t);if(y!==t.entries)for(var x=0;!(_=b.next()).done;)d=_.value,h=m+r(d,x++),v+=o(d,h,n,i);else for(;!(_=b.next()).done;){var E=_.value;E&&(d=E[1],h=m+c.escape(E[0])+f+r(d,0),v+=o(d,h,n,i))}}else if("object"===p){var w="",C=String(t);a("31","[object Object]"===C?"object with keys {"+Object.keys(t).join(", ")+"}":C,w)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=n(336),u=(n(347),n(348)),s=n(350),c=(n(342),n(351)),l=(n(338),"."),f=":";t.exports=i},function(t,e){"use strict";function n(t){var e=t&&(r&&t[r]||t[o]);if("function"==typeof e)return e}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";t.exports=n},function(t,e){"use strict";function n(t){var e=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+t).replace(e,function(t){return n[t]});return"$"+r}function r(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1);return(""+r).replace(e,function(t){return n[t]})}var o={escape:n,unescape:r};t.exports=o},function(t,e,n){"use strict";var r=n(346),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},function(t,e,n){"use strict";var r=n(346),o=r.isValidElement,i=n(354);t.exports=i(o)},function(t,e,n){"use strict";var r=n(355);t.exports=function(t){var e=!1;return r(t,e)}},function(t,e,n){"use strict";function r(){return null}var o=n(334),i=n(356),a=n(357),u=function(){};t.exports=function(t,e){function n(t){var e=t&&(k&&t[k]||t[M]);if("function"==typeof e)return e}function s(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function c(t){this.message=t,this.stack=""}function l(t){function n(n,r,o,a,u,s,l){if(a=a||N,s=s||o,l!==i){if(e){var f=new Error("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");throw f.name="Invariant Violation",f}}return null==r[o]?n?new c(null===r[o]?"The "+u+" `"+s+"` is marked as required "+("in `"+a+"`, but its value is `null`."):"The "+u+" `"+s+"` is marked as required in "+("`"+a+"`, but its value is `undefined`.")):null:t(r,o,a,u,s)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function f(t){function e(e,n,r,o,i,a){var u=e[n],s=C(u);if(s!==t){var l=S(u);return new c("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+t+"`."))}return null}return l(e)}function p(){return l(r)}function d(t){function e(e,n,r,o,a){if("function"!=typeof t)return new c("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u)){var s=C(u);return new c("Invalid "+o+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<u.length;l++){var f=t(u,l,r,o,a+"["+l+"]",i);if(f instanceof Error)return f}return null}return l(e)}function h(){function e(e,n,r,o,i){var a=e[n];if(!t(a)){var u=C(a);return new c("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return l(e)}function v(t){function e(e,n,r,o,i){if(!(e[n]instanceof t)){var a=t.name||N,u=T(e[n]);return new c("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return l(e)}function m(t){function e(e,n,r,o,i){for(var a=e[n],u=0;u<t.length;u++)if(s(a,t[u]))return null;var l=JSON.stringify(t);return new c("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return Array.isArray(t)?l(e):r}function g(t){function e(e,n,r,o,a){if("function"!=typeof t)return new c("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],s=C(u);if("object"!==s)return new c("Invalid "+o+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."));for(var l in u)if(u.hasOwnProperty(l)){var f=t(u,l,r,o,a+"."+l,i);if(f instanceof Error)return f}return null}return l(e)}function y(t){function e(e,n,r,o,a){for(var u=0;u<t.length;u++){var s=t[u];if(null==s(e,n,r,o,a,i))return null}return new c("Invalid "+o+" `"+a+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(t))return r;for(var n=0;n<t.length;n++){var o=t[n];if("function"!=typeof o)return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(o)+" at index "+n+"."),r}return l(e)}function _(){function t(t,e,n,r,o){return E(t[e])?null:new c("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return l(t)}function b(t){function e(e,n,r,o,a){var u=e[n],s=C(u);if("object"!==s)return new c("Invalid "+o+" `"+a+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in t){var f=t[l];if(f){var p=f(u,l,r,o,a+"."+l,i);if(p)return p}}return null}return l(e)}function x(t){function e(e,n,r,a,u){var s=e[n],l=C(s);if("object"!==l)return new c("Invalid "+a+" `"+u+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `object`."));var f=o({},e[n],t);for(var p in f){var d=t[p];if(!d)return new c("Invalid "+a+" `"+u+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(e[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var h=d(s,p,r,a,u+"."+p,i);if(h)return h}return null}return l(e)}function E(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(E);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var o,i=r.call(e);if(r!==e.entries){for(;!(o=i.next()).done;)if(!E(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!E(a[1]))return!1}return!0;default:return!1}}function w(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function C(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":w(e,t)?"symbol":e}function S(t){if("undefined"==typeof t||null===t)return""+t;var e=C(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function P(t){var e=S(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function T(t){return t.constructor&&t.constructor.name?t.constructor.name:N}var k="function"==typeof Symbol&&Symbol.iterator,M="@@iterator",N="<<anonymous>>",O={array:f("array"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(),arrayOf:d,element:h(),instanceOf:v,node:_(),objectOf:g,oneOf:m,oneOfType:y,shape:b,exact:x};return c.prototype=Error.prototype,O.checkPropTypes=a,O.PropTypes=O,O}},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r,o){}t.exports=r},function(t,e){"use strict";t.exports="15.6.2"},function(t,e,n){"use strict";var r=n(335),o=r.Component,i=n(346),a=i.isValidElement,u=n(337),s=n(360);t.exports=s(o,a,u)},function(t,e,n){"use strict";function r(t){return t}function o(t,e,n){function o(t,e){var n=y.hasOwnProperty(e)?y[e]:null;w.hasOwnProperty(e)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function i(t,n){if(n){s("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(c)&&b.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==c){var u=n[a],l=r.hasOwnProperty(a);if(o(l,a),b.hasOwnProperty(a))b[a](t,u);else{var f=y.hasOwnProperty(a),h="function"==typeof u,v=h&&!f&&!l&&n.autobind!==!1;if(v)i.push(a,u),r[a]=u;else if(l){var m=y[a];s(f&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?r[a]=p(r[a],u):"DEFINE_MANY"===m&&(r[a]=d(r[a],u))}else r[a]=u}}}else;}function l(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in b;s(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in t;if(i){var a=_.hasOwnProperty(n)?_[n]:null;return s("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(t[n]=p(t[n],r))}t[n]=r}}}function f(t,e){s(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(s(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function p(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return f(o,n),f(o,r),o}}function d(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function h(t,e){var n=e.bind(t);return n}function v(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=h(t,o)}}function m(t){var e=r(function(t,r,o){this.__reactAutoBindPairs.length&&v(this),this.props=t,this.context=r,this.refs=u,this.updater=o||n,this.state=null;var i=this.getInitialState?this.getInitialState():null;s("object"==typeof i&&!Array.isArray(i),"%s.getInitialState(): must return an object or null",e.displayName||"ReactCompositeComponent"),this.state=i});e.prototype=new C,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],g.forEach(i.bind(null,e)),i(e,x),i(e,t),i(e,E),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),s(e.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var o in y)e.prototype[o]||(e.prototype[o]=null);return e}var g=[],y={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},b={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=a({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=a({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=p(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=a({},t.propTypes,e)},statics:function(t,e){l(t,e)},autobind:function(){}},x={componentDidMount:function(){this.__isMounted=!0}},E={componentWillUnmount:function(){this.__isMounted=!1}},w={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e)},isMounted:function(){return!!this.__isMounted}},C=function(){};return a(C.prototype,t.prototype,w),m}var i,a=n(334),u=n(341),s=n(342),c="mixins";i={},t.exports=o},function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o("143"),t}var o=n(336),i=n(346);n(342);t.exports=r},function(t,e,n){"use strict";t.exports=n(363)},function(t,e,n){"use strict";var r=n(364),o=n(368),i=n(492),a=n(389),u=n(386),s=n(497),c=n(498),l=n(499),f=n(500);n(338);o.inject();var p={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?r.getNodeFromInstance(t):null}},Mount:i,Reconciler:a});t.exports=p},function(t,e,n){"use strict";function r(t,e){return 1===t.nodeType&&t.getAttribute(h)===String(e)||8===t.nodeType&&t.nodeValue===" react-text: "+e+" "||8===t.nodeType&&t.nodeValue===" react-empty: "+e+" "}function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[m]=n}function a(t){var e=t._hostNode;e&&(delete e[m],t._hostNode=null)}function u(t,e){if(!(t._flags&v.hasCachedChildNodes)){var n=t._renderedChildren,a=e.firstChild;t:for(var u in n)if(n.hasOwnProperty(u)){var s=n[u],c=o(s)._domID;if(0!==c){for(;null!==a;a=a.nextSibling)if(r(a,c)){i(s,a);continue t}f("32",c)}}t._flags|=v.hasCachedChildNodes}}function s(t){if(t[m])return t[m];for(var e=[];!t[m];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,r;t&&(r=t[m]);t=e.pop())n=r,e.length&&u(r,t);return n}function c(t){var e=s(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode?f("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:f("34"),t=t._hostParent;for(;e.length;t=e.pop())u(t,t._hostNode);return t._hostNode}var f=n(365),p=n(366),d=n(367),h=(n(342),p.ID_ATTRIBUTE_NAME),v=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),g={getClosestInstanceFromNode:s,getInstanceFromNode:c,getNodeFromInstance:l,precacheChildNodes:u,precacheNode:i,uncacheNode:a};t.exports=g},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=n},function(t,e,n){"use strict";function r(t,e){return(t&e)===e}var o=n(365),i=(n(342),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(t){var e=i,n=t.Properties||{},a=t.DOMAttributeNamespaces||{},s=t.DOMAttributeNames||{},c=t.DOMPropertyNames||{},l=t.DOMMutationMethods||{};t.isCustomAttribute&&u._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var f in n){u.properties.hasOwnProperty(f)?o("48",f):void 0;var p=f.toLowerCase(),d=n[f],h={attributeName:p,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:r(d,e.MUST_USE_PROPERTY),hasBooleanValue:r(d,e.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o("50",f),s.hasOwnProperty(f)){var v=s[f];h.attributeName=v}a.hasOwnProperty(f)&&(h.attributeNamespace=a[f]),c.hasOwnProperty(f)&&(h.propertyName=c[f]),l.hasOwnProperty(f)&&(h.mutationMethod=l[f]),u.properties[f]=h}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<u._isCustomAttributeFunctions.length;e++){var n=u._isCustomAttributeFunctions[e];if(n(t))return!0}return!1},injection:i};t.exports=u},function(t,e){"use strict";var n={hasCachedChildNodes:1};t.exports=n},function(t,e,n){"use strict";function r(){w||(w=!0,y.EventEmitter.injectReactEventListener(g),y.EventPluginHub.injectEventPluginOrder(u),y.EventPluginUtils.injectComponentTree(p),y.EventPluginUtils.injectTreeTraversal(h),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:x,BeforeInputEventPlugin:i}),y.HostComponent.injectGenericComponentClass(f),y.HostComponent.injectTextComponentClass(v),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(c),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(t){return new d(t)}),y.Updates.injectReconcileTransaction(_),y.Updates.injectBatchingStrategy(m),y.Component.injectEnvironment(l))}var o=n(369),i=n(370),a=n(385),u=n(398),s=n(399),c=n(404),l=n(405),f=n(418),p=n(364),d=n(463),h=n(464),v=n(465),m=n(466),g=n(467),y=n(470),_=n(471),b=n(479),x=n(480),E=n(481),w=!1;t.exports={inject:r}},function(t,e){"use strict";var n={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=n},function(t,e,n){"use strict";function r(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}function o(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function i(t){switch(t){case"topCompositionStart":return P.compositionStart;case"topCompositionEnd":return P.compositionEnd;case"topCompositionUpdate":return P.compositionUpdate}}function a(t,e){return"topKeyDown"===t&&e.keyCode===_}function u(t,e){switch(t){case"topKeyUp":return y.indexOf(e.keyCode)!==-1;case"topKeyDown":return e.keyCode!==_;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function s(t){var e=t.detail;return"object"==typeof e&&"data"in e?e.data:null}function c(t,e,n,r){var o,c;if(b?o=i(t):k?u(t,n)&&(o=P.compositionEnd):a(t,n)&&(o=P.compositionStart),!o)return null;w&&(k||o!==P.compositionStart?o===P.compositionEnd&&k&&(c=k.getData()):k=v.getPooled(r));var l=m.getPooled(o,e,n,r);if(c)l.data=c;else{var f=s(n);null!==f&&(l.data=f)}return d.accumulateTwoPhaseDispatches(l),l}function l(t,e){switch(t){case"topCompositionEnd":return s(e);case"topKeyPress":var n=e.which;return n!==C?null:(T=!0,S);case"topTextInput":var r=e.data;return r===S&&T?null:r;default:return null}}function f(t,e){if(k){if("topCompositionEnd"===t||!b&&u(t,e)){var n=k.getData();return v.release(k),k=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!o(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return w?null:e.data;default:return null}}function p(t,e,n,r){var o;if(o=E?l(t,n):f(t,n),!o)return null;var i=g.getPooled(P.beforeInput,e,n,r);return i.data=o,d.accumulateTwoPhaseDispatches(i),i}var d=n(371),h=n(378),v=n(379),m=n(382),g=n(384),y=[9,13,27,32],_=229,b=h.canUseDOM&&"CompositionEvent"in window,x=null;h.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var E=h.canUseDOM&&"TextEvent"in window&&!x&&!r(),w=h.canUseDOM&&(!b||x&&x>8&&x<=11),C=32,S=String.fromCharCode(C),P={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},T=!1,k=null,M={eventTypes:P,extractEvents:function(t,e,n,r){return[c(t,e,n,r),p(t,e,n,r)]}};t.exports=M},function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return g(t,r)}function o(t,e,n){var o=r(t,n,e);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(t._targetInst,o,t)}function a(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?h.getParentInstance(e):null;h.traverseTwoPhase(n,o,t)}}function u(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(t,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&u(t._targetInst,null,t)}function c(t){m(t,i)}function l(t){m(t,a)}function f(t,e,n,r){h.traverseEnterLeave(n,r,u,t,e)}function p(t){m(t,s)}var d=n(372),h=n(374),v=n(376),m=n(377),g=(n(338), |
| 10 | d.getListener),y={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:p,accumulateEnterLeaveDispatches:f};t.exports=y},function(t,e,n){"use strict";function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(e));default:return!1}}var i=n(365),a=n(373),u=n(374),s=n(375),c=n(376),l=n(377),f=(n(342),{}),p=null,d=function(t,e){t&&(u.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},h=function(t){return d(t,!0)},v=function(t){return d(t,!1)},m=function(t){return"."+t._rootNodeID},g={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?i("94",e,typeof n):void 0;var r=m(t),o=f[e]||(f[e]={});o[r]=n;var u=a.registrationNameModules[e];u&&u.didPutListener&&u.didPutListener(t,e,n)},getListener:function(t,e){var n=f[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var r=m(t);return n&&n[r]},deleteListener:function(t,e){var n=a.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var r=f[e];if(r){var o=m(t);delete r[o]}},deleteAllListeners:function(t){var e=m(t);for(var n in f)if(f.hasOwnProperty(n)&&f[n][e]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(t,n),delete f[n][e]}},extractEvents:function(t,e,n,r){for(var o,i=a.plugins,u=0;u<i.length;u++){var s=i[u];if(s){var l=s.extractEvents(t,e,n,r);l&&(o=c(o,l))}}return o},enqueueEvents:function(t){t&&(p=c(p,t))},processEventQueue:function(t){var e=p;p=null,t?l(e,h):l(e,v),p?i("95"):void 0,s.rethrowCaughtError()},__purge:function(){f={}},__getListenerBank:function(){return f}};t.exports=g},function(t,e,n){"use strict";function r(){if(u)for(var t in s){var e=s[t],n=u.indexOf(t);if(n>-1?void 0:a("96",t),!c.plugins[n]){e.extractEvents?void 0:a("97",t),c.plugins[n]=e;var r=e.eventTypes;for(var i in r)o(r[i],e,i)?void 0:a("98",i,t)}}}function o(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){c.registrationNameModules[t]?a("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(365),u=(n(342),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){u?a("101"):void 0,u=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?a("102",n):void 0,s[n]=o,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){u=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=c},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var o=t.type||"unknown-event";t.currentTarget=g.getNodeFromInstance(r),e?v.invokeGuardedCallbackWithCatch(o,n,t):v.invokeGuardedCallback(o,n,t),t.currentTarget=null}function u(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!t.isPropagationStopped();o++)a(t,e,n[o],r[o]);else n&&a(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null}function s(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e)){for(var r=0;r<e.length&&!t.isPropagationStopped();r++)if(e[r](t,n[r]))return n[r]}else if(e&&e(t,n))return n;return null}function c(t){var e=s(t);return t._dispatchInstances=null,t._dispatchListeners=null,e}function l(t){var e=t._dispatchListeners,n=t._dispatchInstances;Array.isArray(e)?h("103"):void 0,t.currentTarget=e?g.getNodeFromInstance(n):null;var r=e?e(t):null;return t.currentTarget=null,t._dispatchListeners=null,t._dispatchInstances=null,r}function f(t){return!!t._dispatchListeners}var p,d,h=n(365),v=n(375),m=(n(342),n(338),{injectComponentTree:function(t){p=t},injectTreeTraversal:function(t){d=t}}),g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:f,getInstanceFromNode:function(t){return p.getInstanceFromNode(t)},getNodeFromInstance:function(t){return p.getNodeFromInstance(t)},isAncestor:function(t,e){return d.isAncestor(t,e)},getLowestCommonAncestor:function(t,e){return d.getLowestCommonAncestor(t,e)},getParentInstance:function(t){return d.getParentInstance(t)},traverseTwoPhase:function(t,e,n){return d.traverseTwoPhase(t,e,n)},traverseEnterLeave:function(t,e,n,r,o){return d.traverseEnterLeave(t,e,n,r,o)},injection:m};t.exports=g},function(t,e,n){"use strict";function r(t,e,n){try{e(n)}catch(t){null===o&&(o=t)}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var t=o;throw o=null,t}}};t.exports=i},function(t,e,n){"use strict";function r(t,e){return null==e?o("30"):void 0,null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var o=n(365);n(342);t.exports=r},function(t,e){"use strict";function n(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=n},function(t,e){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var o=n(334),i=n(380),a=n(381);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(t=0;t<r&&n[t]===o[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===o[i-e];e++);var u=e>1?1-e:void 0;return this._fallbackText=o.slice(t,u),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(365),o=(n(342),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,f=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=s,n},p={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};t.exports=p},function(t,e,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(378),i=null;t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(383),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(334),i=n(380),a=n(339),u=(n(338),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(t,e){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,t.prototype),t.prototype=a,t.prototype.constructor=t,t.Interface=o({},n.Interface,e),t.augmentClass=n.augmentClass,i.addPoolingTo(t,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(383),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n){var r=P.getPooled(O.change,t,e,n);return r.type="change",E.accumulateTwoPhaseDispatches(r),r}function o(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function i(t){var e=r(A,t,k(t));S.batchedUpdates(a,e)}function a(t){x.enqueueEvents(t),x.processEventQueue(!1)}function u(t,e){I=t,A=e,I.attachEvent("onchange",i)}function s(){I&&(I.detachEvent("onchange",i),I=null,A=null)}function c(t,e){var n=T.updateValueIfChanged(t),r=e.simulated===!0&&F._allowSimulatedPassThrough;if(n||r)return t}function l(t,e){if("topChange"===t)return e}function f(t,e,n){"topFocus"===t?(s(),u(e,n)):"topBlur"===t&&s()}function p(t,e){I=t,A=e,I.attachEvent("onpropertychange",h)}function d(){I&&(I.detachEvent("onpropertychange",h),I=null,A=null)}function h(t){"value"===t.propertyName&&c(A,t)&&i(t)}function v(t,e,n){"topFocus"===t?(d(),p(e,n)):"topBlur"===t&&d()}function m(t,e,n){if("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)return c(A,n)}function g(t){var e=t.nodeName;return e&&"input"===e.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function y(t,e,n){if("topClick"===t)return c(e,n)}function _(t,e,n){if("topInput"===t||"topChange"===t)return c(e,n)}function b(t,e){if(null!=t){var n=t._wrapperState||e._wrapperState;if(n&&n.controlled&&"number"===e.type){var r=""+e.value;e.getAttribute("value")!==r&&e.setAttribute("value",r)}}}var x=n(372),E=n(371),w=n(378),C=n(364),S=n(386),P=n(383),T=n(394),k=n(395),M=n(396),N=n(397),O={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},I=null,A=null,R=!1;w.canUseDOM&&(R=M("change")&&(!document.documentMode||document.documentMode>8));var D=!1;w.canUseDOM&&(D=M("input")&&(!document.documentMode||document.documentMode>9));var F={eventTypes:O,_allowSimulatedPassThrough:!0,_isInputEventSupported:D,extractEvents:function(t,e,n,i){var a,u,s=e?C.getNodeFromInstance(e):window;if(o(s)?R?a=l:u=f:N(s)?D?a=_:(a=m,u=v):g(s)&&(a=y),a){var c=a(t,e,n);if(c){var p=r(c,n,i);return p}}u&&u(t,s,e),"topBlur"===t&&b(e,s)}};t.exports=F},function(t,e,n){"use strict";function r(){k.ReactReconcileTransaction&&E?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=k.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,o,i,a){return r(),E.batchedUpdates(t,e,n,o,i,a)}function a(t,e){return t._mountOrder-e._mountOrder}function u(t){var e=t.dirtyComponentsLength;e!==y.length?l("124",e,y.length):void 0,y.sort(a),_++;for(var n=0;n<e;n++){var r=y[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(h.logTopLevelRenders){var u=r;r._currentElement.type.isReactTopLevelWrapper&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(v.performUpdateIfNecessary(r,t.reconcileTransaction,_),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)t.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(t){return r(),E.isBatchingUpdates?(y.push(t),void(null==t._updateBatchNumber&&(t._updateBatchNumber=_+1))):void E.batchedUpdates(s,t)}function c(t,e){g(E.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."),b.enqueue(t,e),x=!0}var l=n(365),f=n(334),p=n(387),d=n(380),h=n(388),v=n(389),m=n(393),g=n(342),y=[],_=0,b=p.getPooled(),x=!1,E=null,w={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),P()):y.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},S=[w,C];f(o.prototype,m,{getTransactionWrappers:function(){return S},destructor:function(){this.dirtyComponentsLength=null,p.release(this.callbackQueue),this.callbackQueue=null,k.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return m.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),d.addPoolingTo(o);var P=function(){for(;y.length||x;){if(y.length){var t=o.getPooled();t.perform(u,null,t),o.release(t)}if(x){x=!1;var e=b;b=p.getPooled(),e.notifyAll(),p.release(e)}}},T={injectReconcileTransaction:function(t){t?void 0:l("126"),k.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){t?void 0:l("127"),"function"!=typeof t.batchedUpdates?l("128"):void 0,"boolean"!=typeof t.isBatchingUpdates?l("129"):void 0,E=t}},k={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:P,injection:T,asap:c};t.exports=k},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(365),i=n(380),a=(n(342),function(){function t(e){r(this,t),this._callbacks=null,this._contexts=null,this._arg=e}return t.prototype.enqueue=function(t,e){this._callbacks=this._callbacks||[],this._callbacks.push(t),this._contexts=this._contexts||[],this._contexts.push(e)},t.prototype.notifyAll=function(){var t=this._callbacks,e=this._contexts,n=this._arg;if(t&&e){t.length!==e.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var r=0;r<t.length;r++)t[r].call(e[r],n);t.length=0,e.length=0}},t.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},t.prototype.rollback=function(t){this._callbacks&&this._contexts&&(this._callbacks.length=t,this._contexts.length=t)},t.prototype.reset=function(){this._callbacks=null,this._contexts=null},t.prototype.destructor=function(){this.reset()},t}());t.exports=i.addPoolingTo(a)},function(t,e){"use strict";var n={logTopLevelRenders:!1};t.exports=n},function(t,e,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(390),i=(n(392),n(338),{mountComponent:function(t,e,n,o,i,a){var u=t.mountComponent(e,n,o,i,a);return t._currentElement&&null!=t._currentElement.ref&&e.getReactMountReady().enqueue(r,t),u},getHostNode:function(t){return t.getHostNode()},unmountComponent:function(t,e){o.detachRefs(t,t._currentElement),t.unmountComponent(e)},receiveComponent:function(t,e,n,i){var a=t._currentElement;if(e!==a||i!==t._context){var u=o.shouldUpdateRefs(a,e);u&&o.detachRefs(t,a),t.receiveComponent(e,n,i),u&&t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(r,t)}},performUpdateIfNecessary:function(t,e,n){t._updateBatchNumber===n&&t.performUpdateIfNecessary(e)}});t.exports=i},function(t,e,n){"use strict";function r(t,e,n){"function"==typeof t?t(e.getPublicInstance()):i.addComponentAsRefTo(e,t,n)}function o(t,e,n){"function"==typeof t?t(null):i.removeComponentAsRefFrom(e,t,n)}var i=n(391),a={};a.attachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&r(n,t,e._owner)}},a.shouldUpdateRefs=function(t,e){var n=null,r=null;null!==t&&"object"==typeof t&&(n=t.ref,r=t._owner);var o=null,i=null;return null!==e&&"object"==typeof e&&(o=e.ref,i=e._owner),n!==o||"string"==typeof o&&i!==r},a.detachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&o(n,t,e._owner)}},t.exports=a},function(t,e,n){"use strict";function r(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)}var o=n(365),i=(n(342),{addComponentAsRefTo:function(t,e,n){r(n)?void 0:o("119"),n.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,n){r(n)?void 0:o("120");var i=n.getPublicInstance();i&&i.refs[e]===t.getPublicInstance()&&n.detachRef(e)}});t.exports=i},function(t,e,n){"use strict";var r=null;t.exports={debugTool:r}},function(t,e,n){"use strict";var r=n(365),o=(n(342),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,o,i,a,u,s){this.isInTransaction()?r("27"):void 0;var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=t.call(e,n,o,i,a,u,s),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(t){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var r=e[n];try{this.wrapperInitData[n]=o,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o)try{this.initializeAll(n+1)}catch(t){}}}},closeAll:function(t){this.isInTransaction()?void 0:r("28");for(var e=this.transactionWrappers,n=t;n<e.length;n++){var i,a=e[n],u=this.wrapperInitData[n];try{i=!0,u!==o&&a.close&&a.close.call(this,u),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(t){}}}this.wrapperInitData.length=0}};t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.type,n=t.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===e||"radio"===e)}function o(t){return t._wrapperState.valueTracker}function i(t,e){t._wrapperState.valueTracker=e}function a(t){t._wrapperState.valueTracker=null}function u(t){var e;return t&&(e=r(t)?""+t.checked:t.value),e}var s=n(364),c={_getTrackerFromNode:function(t){return o(s.getInstanceFromNode(t))},track:function(t){if(!o(t)){var e=s.getNodeFromInstance(t),n=r(e)?"checked":"value",u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];e.hasOwnProperty(n)||"function"!=typeof u.get||"function"!=typeof u.set||(Object.defineProperty(e,n,{enumerable:u.enumerable,configurable:!0,get:function(){return u.get.call(this)},set:function(t){c=""+t,u.set.call(this,t)}}),i(t,{getValue:function(){return c},setValue:function(t){c=""+t},stopTracking:function(){a(t),delete e[n]}}))}},updateValueIfChanged:function(t){if(!t)return!1;var e=o(t);if(!e)return c.track(t),!0;var n=e.getValue(),r=u(s.getNodeFromInstance(t));return r!==n&&(e.setValue(r),!0)},stopTracking:function(t){var e=o(t);e&&e.stopTracking()}};t.exports=c},function(t,e){"use strict";function n(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=n},function(t,e,n){"use strict";/** |
18906 | | function isEventSupported(eventNameSuffix, capture) { |
18907 | | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { |
18908 | | return false; |
18909 | | } |
18910 | | |
18911 | | var eventName = 'on' + eventNameSuffix; |
18912 | | var isSupported = eventName in document; |
18913 | | |
18914 | | if (!isSupported) { |
18915 | | var element = document.createElement('div'); |
18916 | | element.setAttribute(eventName, 'return;'); |
18917 | | isSupported = typeof element[eventName] === 'function'; |
18918 | | } |
18919 | | |
18920 | | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { |
18921 | | // This is the only way to test support for the `wheel` event in IE9+. |
18922 | | isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); |
18923 | | } |
18924 | | |
18925 | | return isSupported; |
18926 | | } |
18927 | | |
18928 | | module.exports = isEventSupported; |
18929 | | |
18930 | | /***/ }), |
18931 | | /* 408 */ |
18932 | | /***/ (function(module, exports) { |
18933 | | |
18934 | | /** |
18935 | | * Copyright (c) 2013-present, Facebook, Inc. |
18936 | | * |
18937 | | * This source code is licensed under the MIT license found in the |
18938 | | * LICENSE file in the root directory of this source tree. |
18939 | | * |
18940 | | * |
18941 | | */ |
18942 | | |
18943 | | 'use strict'; |
18944 | | |
18945 | | /** |
18946 | | * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary |
18947 | | */ |
18948 | | |
18949 | | var supportedInputTypes = { |
18950 | | color: true, |
18951 | | date: true, |
18952 | | datetime: true, |
18953 | | 'datetime-local': true, |
18954 | | email: true, |
18955 | | month: true, |
18956 | | number: true, |
18957 | | password: true, |
18958 | | range: true, |
18959 | | search: true, |
18960 | | tel: true, |
18961 | | text: true, |
18962 | | time: true, |
18963 | | url: true, |
18964 | | week: true |
18965 | | }; |
18966 | | |
18967 | | function isTextInputElement(elem) { |
18968 | | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); |
18969 | | |
18970 | | if (nodeName === 'input') { |
18971 | | return !!supportedInputTypes[elem.type]; |
18972 | | } |
18973 | | |
18974 | | if (nodeName === 'textarea') { |
18975 | | return true; |
18976 | | } |
18977 | | |
18978 | | return false; |
18979 | | } |
18980 | | |
18981 | | module.exports = isTextInputElement; |
18982 | | |
18983 | | /***/ }), |
18984 | | /* 409 */ |
18985 | | /***/ (function(module, exports) { |
18986 | | |
18987 | | /** |
18988 | | * Copyright (c) 2013-present, Facebook, Inc. |
18989 | | * |
18990 | | * This source code is licensed under the MIT license found in the |
18991 | | * LICENSE file in the root directory of this source tree. |
18992 | | * |
18993 | | */ |
18994 | | |
18995 | | 'use strict'; |
18996 | | |
18997 | | /** |
18998 | | * Module that is injectable into `EventPluginHub`, that specifies a |
18999 | | * deterministic ordering of `EventPlugin`s. A convenient way to reason about |
19000 | | * plugins, without having to package every one of them. This is better than |
19001 | | * having plugins be ordered in the same order that they are injected because |
19002 | | * that ordering would be influenced by the packaging order. |
19003 | | * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that |
19004 | | * preventing default on events is convenient in `SimpleEventPlugin` handlers. |
19005 | | */ |
19006 | | |
19007 | | var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; |
19008 | | |
19009 | | module.exports = DefaultEventPluginOrder; |
19010 | | |
19011 | | /***/ }), |
19012 | | /* 410 */ |
19013 | | /***/ (function(module, exports, __webpack_require__) { |
19014 | | |
19015 | | /** |
19016 | | * Copyright (c) 2013-present, Facebook, Inc. |
19017 | | * |
19018 | | * This source code is licensed under the MIT license found in the |
19019 | | * LICENSE file in the root directory of this source tree. |
19020 | | * |
19021 | | */ |
19022 | | |
19023 | | 'use strict'; |
19024 | | |
19025 | | var EventPropagators = __webpack_require__(377); |
19026 | | var ReactDOMComponentTree = __webpack_require__(370); |
19027 | | var SyntheticMouseEvent = __webpack_require__(411); |
19028 | | |
19029 | | var eventTypes = { |
19030 | | mouseEnter: { |
19031 | | registrationName: 'onMouseEnter', |
19032 | | dependencies: ['topMouseOut', 'topMouseOver'] |
19033 | | }, |
19034 | | mouseLeave: { |
19035 | | registrationName: 'onMouseLeave', |
19036 | | dependencies: ['topMouseOut', 'topMouseOver'] |
19037 | | } |
19038 | | }; |
19039 | | |
19040 | | var EnterLeaveEventPlugin = { |
19041 | | eventTypes: eventTypes, |
19042 | | |
19043 | | /** |
19044 | | * For almost every interaction we care about, there will be both a top-level |
19045 | | * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that |
19046 | | * we do not extract duplicate events. However, moving the mouse into the |
19047 | | * browser from outside will not fire a `mouseout` event. In this case, we use |
19048 | | * the `mouseover` top-level event. |
19049 | | */ |
19050 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
19051 | | if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { |
19052 | | return null; |
19053 | | } |
19054 | | if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { |
19055 | | // Must not be a mouse in or mouse out - ignoring. |
19056 | | return null; |
19057 | | } |
19058 | | |
19059 | | var win; |
19060 | | if (nativeEventTarget.window === nativeEventTarget) { |
19061 | | // `nativeEventTarget` is probably a window object. |
19062 | | win = nativeEventTarget; |
19063 | | } else { |
19064 | | // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. |
19065 | | var doc = nativeEventTarget.ownerDocument; |
19066 | | if (doc) { |
19067 | | win = doc.defaultView || doc.parentWindow; |
19068 | | } else { |
19069 | | win = window; |
19070 | | } |
19071 | | } |
19072 | | |
19073 | | var from; |
19074 | | var to; |
19075 | | if (topLevelType === 'topMouseOut') { |
19076 | | from = targetInst; |
19077 | | var related = nativeEvent.relatedTarget || nativeEvent.toElement; |
19078 | | to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; |
19079 | | } else { |
19080 | | // Moving to a node from outside the window. |
19081 | | from = null; |
19082 | | to = targetInst; |
19083 | | } |
19084 | | |
19085 | | if (from === to) { |
19086 | | // Nothing pertains to our managed components. |
19087 | | return null; |
19088 | | } |
19089 | | |
19090 | | var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); |
19091 | | var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); |
19092 | | |
19093 | | var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); |
19094 | | leave.type = 'mouseleave'; |
19095 | | leave.target = fromNode; |
19096 | | leave.relatedTarget = toNode; |
19097 | | |
19098 | | var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); |
19099 | | enter.type = 'mouseenter'; |
19100 | | enter.target = toNode; |
19101 | | enter.relatedTarget = fromNode; |
19102 | | |
19103 | | EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); |
19104 | | |
19105 | | return [leave, enter]; |
19106 | | } |
19107 | | }; |
19108 | | |
19109 | | module.exports = EnterLeaveEventPlugin; |
19110 | | |
19111 | | /***/ }), |
19112 | | /* 411 */ |
19113 | | /***/ (function(module, exports, __webpack_require__) { |
19114 | | |
19115 | | /** |
19116 | | * Copyright (c) 2013-present, Facebook, Inc. |
19117 | | * |
19118 | | * This source code is licensed under the MIT license found in the |
19119 | | * LICENSE file in the root directory of this source tree. |
19120 | | * |
19121 | | */ |
19122 | | |
19123 | | 'use strict'; |
19124 | | |
19125 | | var SyntheticUIEvent = __webpack_require__(412); |
19126 | | var ViewportMetrics = __webpack_require__(413); |
19127 | | |
19128 | | var getEventModifierState = __webpack_require__(414); |
19129 | | |
19130 | | /** |
19131 | | * @interface MouseEvent |
19132 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
19133 | | */ |
19134 | | var MouseEventInterface = { |
19135 | | screenX: null, |
19136 | | screenY: null, |
19137 | | clientX: null, |
19138 | | clientY: null, |
19139 | | ctrlKey: null, |
19140 | | shiftKey: null, |
19141 | | altKey: null, |
19142 | | metaKey: null, |
19143 | | getModifierState: getEventModifierState, |
19144 | | button: function (event) { |
19145 | | // Webkit, Firefox, IE9+ |
19146 | | // which: 1 2 3 |
19147 | | // button: 0 1 2 (standard) |
19148 | | var button = event.button; |
19149 | | if ('which' in event) { |
19150 | | return button; |
19151 | | } |
19152 | | // IE<9 |
19153 | | // which: undefined |
19154 | | // button: 0 0 0 |
19155 | | // button: 1 4 2 (onmouseup) |
19156 | | return button === 2 ? 2 : button === 4 ? 1 : 0; |
19157 | | }, |
19158 | | buttons: null, |
19159 | | relatedTarget: function (event) { |
19160 | | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); |
19161 | | }, |
19162 | | // "Proprietary" Interface. |
19163 | | pageX: function (event) { |
19164 | | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; |
19165 | | }, |
19166 | | pageY: function (event) { |
19167 | | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; |
19168 | | } |
19169 | | }; |
19170 | | |
19171 | | /** |
19172 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
19173 | | * @param {string} dispatchMarker Marker identifying the event target. |
19174 | | * @param {object} nativeEvent Native browser event. |
19175 | | * @extends {SyntheticUIEvent} |
19176 | | */ |
19177 | | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
19178 | | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
19179 | | } |
19180 | | |
19181 | | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); |
19182 | | |
19183 | | module.exports = SyntheticMouseEvent; |
19184 | | |
19185 | | /***/ }), |
19186 | | /* 412 */ |
19187 | | /***/ (function(module, exports, __webpack_require__) { |
19188 | | |
19189 | | /** |
19190 | | * Copyright (c) 2013-present, Facebook, Inc. |
19191 | | * |
19192 | | * This source code is licensed under the MIT license found in the |
19193 | | * LICENSE file in the root directory of this source tree. |
19194 | | * |
19195 | | */ |
19196 | | |
19197 | | 'use strict'; |
19198 | | |
19199 | | var SyntheticEvent = __webpack_require__(389); |
19200 | | |
19201 | | var getEventTarget = __webpack_require__(406); |
19202 | | |
19203 | | /** |
19204 | | * @interface UIEvent |
19205 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
19206 | | */ |
19207 | | var UIEventInterface = { |
19208 | | view: function (event) { |
19209 | | if (event.view) { |
19210 | | return event.view; |
19211 | | } |
19212 | | |
19213 | | var target = getEventTarget(event); |
19214 | | if (target.window === target) { |
19215 | | // target is a window object |
19216 | | return target; |
19217 | | } |
19218 | | |
19219 | | var doc = target.ownerDocument; |
19220 | | // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. |
19221 | | if (doc) { |
19222 | | return doc.defaultView || doc.parentWindow; |
19223 | | } else { |
19224 | | return window; |
19225 | | } |
19226 | | }, |
19227 | | detail: function (event) { |
19228 | | return event.detail || 0; |
19229 | | } |
19230 | | }; |
19231 | | |
19232 | | /** |
19233 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
19234 | | * @param {string} dispatchMarker Marker identifying the event target. |
19235 | | * @param {object} nativeEvent Native browser event. |
19236 | | * @extends {SyntheticEvent} |
19237 | | */ |
19238 | | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
19239 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
19240 | | } |
19241 | | |
19242 | | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); |
19243 | | |
19244 | | module.exports = SyntheticUIEvent; |
19245 | | |
19246 | | /***/ }), |
19247 | | /* 413 */ |
19248 | | /***/ (function(module, exports) { |
19249 | | |
19250 | | /** |
19251 | | * Copyright (c) 2013-present, Facebook, Inc. |
19252 | | * |
19253 | | * This source code is licensed under the MIT license found in the |
19254 | | * LICENSE file in the root directory of this source tree. |
19255 | | * |
19256 | | */ |
19257 | | |
19258 | | 'use strict'; |
19259 | | |
19260 | | var ViewportMetrics = { |
19261 | | currentScrollLeft: 0, |
19262 | | |
19263 | | currentScrollTop: 0, |
19264 | | |
19265 | | refreshScrollValues: function (scrollPosition) { |
19266 | | ViewportMetrics.currentScrollLeft = scrollPosition.x; |
19267 | | ViewportMetrics.currentScrollTop = scrollPosition.y; |
19268 | | } |
19269 | | }; |
19270 | | |
19271 | | module.exports = ViewportMetrics; |
19272 | | |
19273 | | /***/ }), |
19274 | | /* 414 */ |
19275 | | /***/ (function(module, exports) { |
19276 | | |
19277 | | /** |
19278 | | * Copyright (c) 2013-present, Facebook, Inc. |
19279 | | * |
19280 | | * This source code is licensed under the MIT license found in the |
19281 | | * LICENSE file in the root directory of this source tree. |
19282 | | * |
19283 | | */ |
19284 | | |
19285 | | 'use strict'; |
19286 | | |
19287 | | /** |
19288 | | * Translation from modifier key to the associated property in the event. |
19289 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers |
19290 | | */ |
19291 | | |
19292 | | var modifierKeyToProp = { |
19293 | | Alt: 'altKey', |
19294 | | Control: 'ctrlKey', |
19295 | | Meta: 'metaKey', |
19296 | | Shift: 'shiftKey' |
19297 | | }; |
19298 | | |
19299 | | // IE8 does not implement getModifierState so we simply map it to the only |
19300 | | // modifier keys exposed by the event itself, does not support Lock-keys. |
19301 | | // Currently, all major browsers except Chrome seems to support Lock-keys. |
19302 | | function modifierStateGetter(keyArg) { |
19303 | | var syntheticEvent = this; |
19304 | | var nativeEvent = syntheticEvent.nativeEvent; |
19305 | | if (nativeEvent.getModifierState) { |
19306 | | return nativeEvent.getModifierState(keyArg); |
19307 | | } |
19308 | | var keyProp = modifierKeyToProp[keyArg]; |
19309 | | return keyProp ? !!nativeEvent[keyProp] : false; |
19310 | | } |
19311 | | |
19312 | | function getEventModifierState(nativeEvent) { |
19313 | | return modifierStateGetter; |
19314 | | } |
19315 | | |
19316 | | module.exports = getEventModifierState; |
19317 | | |
19318 | | /***/ }), |
19319 | | /* 415 */ |
19320 | | /***/ (function(module, exports, __webpack_require__) { |
19321 | | |
19322 | | /** |
19323 | | * Copyright (c) 2013-present, Facebook, Inc. |
19324 | | * |
19325 | | * This source code is licensed under the MIT license found in the |
19326 | | * LICENSE file in the root directory of this source tree. |
19327 | | * |
19328 | | */ |
19329 | | |
19330 | | 'use strict'; |
19331 | | |
19332 | | var DOMProperty = __webpack_require__(372); |
19333 | | |
19334 | | var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; |
19335 | | var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; |
19336 | | var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; |
19337 | | var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; |
19338 | | var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; |
19339 | | |
19340 | | var HTMLDOMPropertyConfig = { |
19341 | | isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), |
19342 | | Properties: { |
19343 | | /** |
19344 | | * Standard Properties |
19345 | | */ |
19346 | | accept: 0, |
19347 | | acceptCharset: 0, |
19348 | | accessKey: 0, |
19349 | | action: 0, |
19350 | | allowFullScreen: HAS_BOOLEAN_VALUE, |
19351 | | allowTransparency: 0, |
19352 | | alt: 0, |
19353 | | // specifies target context for links with `preload` type |
19354 | | as: 0, |
19355 | | async: HAS_BOOLEAN_VALUE, |
19356 | | autoComplete: 0, |
19357 | | // autoFocus is polyfilled/normalized by AutoFocusUtils |
19358 | | // autoFocus: HAS_BOOLEAN_VALUE, |
19359 | | autoPlay: HAS_BOOLEAN_VALUE, |
19360 | | capture: HAS_BOOLEAN_VALUE, |
19361 | | cellPadding: 0, |
19362 | | cellSpacing: 0, |
19363 | | charSet: 0, |
19364 | | challenge: 0, |
19365 | | checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, |
19366 | | cite: 0, |
19367 | | classID: 0, |
19368 | | className: 0, |
19369 | | cols: HAS_POSITIVE_NUMERIC_VALUE, |
19370 | | colSpan: 0, |
19371 | | content: 0, |
19372 | | contentEditable: 0, |
19373 | | contextMenu: 0, |
19374 | | controls: HAS_BOOLEAN_VALUE, |
19375 | | controlsList: 0, |
19376 | | coords: 0, |
19377 | | crossOrigin: 0, |
19378 | | data: 0, // For `<object />` acts as `src`. |
19379 | | dateTime: 0, |
19380 | | 'default': HAS_BOOLEAN_VALUE, |
19381 | | defer: HAS_BOOLEAN_VALUE, |
19382 | | dir: 0, |
19383 | | disabled: HAS_BOOLEAN_VALUE, |
19384 | | download: HAS_OVERLOADED_BOOLEAN_VALUE, |
19385 | | draggable: 0, |
19386 | | encType: 0, |
19387 | | form: 0, |
19388 | | formAction: 0, |
19389 | | formEncType: 0, |
19390 | | formMethod: 0, |
19391 | | formNoValidate: HAS_BOOLEAN_VALUE, |
19392 | | formTarget: 0, |
19393 | | frameBorder: 0, |
19394 | | headers: 0, |
19395 | | height: 0, |
19396 | | hidden: HAS_BOOLEAN_VALUE, |
19397 | | high: 0, |
19398 | | href: 0, |
19399 | | hrefLang: 0, |
19400 | | htmlFor: 0, |
19401 | | httpEquiv: 0, |
19402 | | icon: 0, |
19403 | | id: 0, |
19404 | | inputMode: 0, |
19405 | | integrity: 0, |
19406 | | is: 0, |
19407 | | keyParams: 0, |
19408 | | keyType: 0, |
19409 | | kind: 0, |
19410 | | label: 0, |
19411 | | lang: 0, |
19412 | | list: 0, |
19413 | | loop: HAS_BOOLEAN_VALUE, |
19414 | | low: 0, |
19415 | | manifest: 0, |
19416 | | marginHeight: 0, |
19417 | | marginWidth: 0, |
19418 | | max: 0, |
19419 | | maxLength: 0, |
19420 | | media: 0, |
19421 | | mediaGroup: 0, |
19422 | | method: 0, |
19423 | | min: 0, |
19424 | | minLength: 0, |
19425 | | // Caution; `option.selected` is not updated if `select.multiple` is |
19426 | | // disabled with `removeAttribute`. |
19427 | | multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, |
19428 | | muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, |
19429 | | name: 0, |
19430 | | nonce: 0, |
19431 | | noValidate: HAS_BOOLEAN_VALUE, |
19432 | | open: HAS_BOOLEAN_VALUE, |
19433 | | optimum: 0, |
19434 | | pattern: 0, |
19435 | | placeholder: 0, |
19436 | | playsInline: HAS_BOOLEAN_VALUE, |
19437 | | poster: 0, |
19438 | | preload: 0, |
19439 | | profile: 0, |
19440 | | radioGroup: 0, |
19441 | | readOnly: HAS_BOOLEAN_VALUE, |
19442 | | referrerPolicy: 0, |
19443 | | rel: 0, |
19444 | | required: HAS_BOOLEAN_VALUE, |
19445 | | reversed: HAS_BOOLEAN_VALUE, |
19446 | | role: 0, |
19447 | | rows: HAS_POSITIVE_NUMERIC_VALUE, |
19448 | | rowSpan: HAS_NUMERIC_VALUE, |
19449 | | sandbox: 0, |
19450 | | scope: 0, |
19451 | | scoped: HAS_BOOLEAN_VALUE, |
19452 | | scrolling: 0, |
19453 | | seamless: HAS_BOOLEAN_VALUE, |
19454 | | selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, |
19455 | | shape: 0, |
19456 | | size: HAS_POSITIVE_NUMERIC_VALUE, |
19457 | | sizes: 0, |
19458 | | span: HAS_POSITIVE_NUMERIC_VALUE, |
19459 | | spellCheck: 0, |
19460 | | src: 0, |
19461 | | srcDoc: 0, |
19462 | | srcLang: 0, |
19463 | | srcSet: 0, |
19464 | | start: HAS_NUMERIC_VALUE, |
19465 | | step: 0, |
19466 | | style: 0, |
19467 | | summary: 0, |
19468 | | tabIndex: 0, |
19469 | | target: 0, |
19470 | | title: 0, |
19471 | | // Setting .type throws on non-<input> tags |
19472 | | type: 0, |
19473 | | useMap: 0, |
19474 | | value: 0, |
19475 | | width: 0, |
19476 | | wmode: 0, |
19477 | | wrap: 0, |
19478 | | |
19479 | | /** |
19480 | | * RDFa Properties |
19481 | | */ |
19482 | | about: 0, |
19483 | | datatype: 0, |
19484 | | inlist: 0, |
19485 | | prefix: 0, |
19486 | | // property is also supported for OpenGraph in meta tags. |
19487 | | property: 0, |
19488 | | resource: 0, |
19489 | | 'typeof': 0, |
19490 | | vocab: 0, |
19491 | | |
19492 | | /** |
19493 | | * Non-standard Properties |
19494 | | */ |
19495 | | // autoCapitalize and autoCorrect are supported in Mobile Safari for |
19496 | | // keyboard hints. |
19497 | | autoCapitalize: 0, |
19498 | | autoCorrect: 0, |
19499 | | // autoSave allows WebKit/Blink to persist values of input fields on page reloads |
19500 | | autoSave: 0, |
19501 | | // color is for Safari mask-icon link |
19502 | | color: 0, |
19503 | | // itemProp, itemScope, itemType are for |
19504 | | // Microdata support. See http://schema.org/docs/gs.html |
19505 | | itemProp: 0, |
19506 | | itemScope: HAS_BOOLEAN_VALUE, |
19507 | | itemType: 0, |
19508 | | // itemID and itemRef are for Microdata support as well but |
19509 | | // only specified in the WHATWG spec document. See |
19510 | | // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api |
19511 | | itemID: 0, |
19512 | | itemRef: 0, |
19513 | | // results show looking glass icon and recent searches on input |
19514 | | // search fields in WebKit/Blink |
19515 | | results: 0, |
19516 | | // IE-only attribute that specifies security restrictions on an iframe |
19517 | | // as an alternative to the sandbox attribute on IE<10 |
19518 | | security: 0, |
19519 | | // IE-only attribute that controls focus behavior |
19520 | | unselectable: 0 |
19521 | | }, |
19522 | | DOMAttributeNames: { |
19523 | | acceptCharset: 'accept-charset', |
19524 | | className: 'class', |
19525 | | htmlFor: 'for', |
19526 | | httpEquiv: 'http-equiv' |
19527 | | }, |
19528 | | DOMPropertyNames: {}, |
19529 | | DOMMutationMethods: { |
19530 | | value: function (node, value) { |
19531 | | if (value == null) { |
19532 | | return node.removeAttribute('value'); |
19533 | | } |
19534 | | |
19535 | | // Number inputs get special treatment due to some edge cases in |
19536 | | // Chrome. Let everything else assign the value attribute as normal. |
19537 | | // https://github.com/facebook/react/issues/7253#issuecomment-236074326 |
19538 | | if (node.type !== 'number' || node.hasAttribute('value') === false) { |
19539 | | node.setAttribute('value', '' + value); |
19540 | | } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { |
19541 | | // Don't assign an attribute if validation reports bad |
19542 | | // input. Chrome will clear the value. Additionally, don't |
19543 | | // operate on inputs that have focus, otherwise Chrome might |
19544 | | // strip off trailing decimal places and cause the user's |
19545 | | // cursor position to jump to the beginning of the input. |
19546 | | // |
19547 | | // In ReactDOMInput, we have an onBlur event that will trigger |
19548 | | // this function again when focus is lost. |
19549 | | node.setAttribute('value', '' + value); |
19550 | | } |
19551 | | } |
19552 | | } |
19553 | | }; |
19554 | | |
19555 | | module.exports = HTMLDOMPropertyConfig; |
19556 | | |
19557 | | /***/ }), |
19558 | | /* 416 */ |
19559 | | /***/ (function(module, exports, __webpack_require__) { |
19560 | | |
19561 | | /** |
19562 | | * Copyright (c) 2013-present, Facebook, Inc. |
19563 | | * |
19564 | | * This source code is licensed under the MIT license found in the |
19565 | | * LICENSE file in the root directory of this source tree. |
19566 | | * |
19567 | | */ |
19568 | | |
19569 | | 'use strict'; |
19570 | | |
19571 | | var DOMChildrenOperations = __webpack_require__(417); |
19572 | | var ReactDOMIDOperations = __webpack_require__(428); |
19573 | | |
19574 | | /** |
19575 | | * Abstracts away all functionality of the reconciler that requires knowledge of |
19576 | | * the browser context. TODO: These callers should be refactored to avoid the |
19577 | | * need for this injection. |
19578 | | */ |
19579 | | var ReactComponentBrowserEnvironment = { |
19580 | | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, |
19581 | | |
19582 | | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup |
19583 | | }; |
19584 | | |
19585 | | module.exports = ReactComponentBrowserEnvironment; |
19586 | | |
19587 | | /***/ }), |
19588 | | /* 417 */ |
19589 | | /***/ (function(module, exports, __webpack_require__) { |
19590 | | |
19591 | | /** |
19592 | | * Copyright (c) 2013-present, Facebook, Inc. |
19593 | | * |
19594 | | * This source code is licensed under the MIT license found in the |
19595 | | * LICENSE file in the root directory of this source tree. |
19596 | | * |
19597 | | */ |
19598 | | |
19599 | | 'use strict'; |
19600 | | |
19601 | | var DOMLazyTree = __webpack_require__(418); |
19602 | | var Danger = __webpack_require__(424); |
19603 | | var ReactDOMComponentTree = __webpack_require__(370); |
19604 | | var ReactInstrumentation = __webpack_require__(398); |
19605 | | |
19606 | | var createMicrosoftUnsafeLocalFunction = __webpack_require__(421); |
19607 | | var setInnerHTML = __webpack_require__(420); |
19608 | | var setTextContent = __webpack_require__(422); |
19609 | | |
19610 | | function getNodeAfter(parentNode, node) { |
19611 | | // Special case for text components, which return [open, close] comments |
19612 | | // from getHostNode. |
19613 | | if (Array.isArray(node)) { |
19614 | | node = node[1]; |
19615 | | } |
19616 | | return node ? node.nextSibling : parentNode.firstChild; |
19617 | | } |
19618 | | |
19619 | | /** |
19620 | | * Inserts `childNode` as a child of `parentNode` at the `index`. |
19621 | | * |
19622 | | * @param {DOMElement} parentNode Parent node in which to insert. |
19623 | | * @param {DOMElement} childNode Child node to insert. |
19624 | | * @param {number} index Index at which to insert the child. |
19625 | | * @internal |
19626 | | */ |
19627 | | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { |
19628 | | // We rely exclusively on `insertBefore(node, null)` instead of also using |
19629 | | // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so |
19630 | | // we are careful to use `null`.) |
19631 | | parentNode.insertBefore(childNode, referenceNode); |
19632 | | }); |
19633 | | |
19634 | | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { |
19635 | | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); |
19636 | | } |
19637 | | |
19638 | | function moveChild(parentNode, childNode, referenceNode) { |
19639 | | if (Array.isArray(childNode)) { |
19640 | | moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); |
19641 | | } else { |
19642 | | insertChildAt(parentNode, childNode, referenceNode); |
19643 | | } |
19644 | | } |
19645 | | |
19646 | | function removeChild(parentNode, childNode) { |
19647 | | if (Array.isArray(childNode)) { |
19648 | | var closingComment = childNode[1]; |
19649 | | childNode = childNode[0]; |
19650 | | removeDelimitedText(parentNode, childNode, closingComment); |
19651 | | parentNode.removeChild(closingComment); |
19652 | | } |
19653 | | parentNode.removeChild(childNode); |
19654 | | } |
19655 | | |
19656 | | function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { |
19657 | | var node = openingComment; |
19658 | | while (true) { |
19659 | | var nextNode = node.nextSibling; |
19660 | | insertChildAt(parentNode, node, referenceNode); |
19661 | | if (node === closingComment) { |
19662 | | break; |
19663 | | } |
19664 | | node = nextNode; |
19665 | | } |
19666 | | } |
19667 | | |
19668 | | function removeDelimitedText(parentNode, startNode, closingComment) { |
19669 | | while (true) { |
19670 | | var node = startNode.nextSibling; |
19671 | | if (node === closingComment) { |
19672 | | // The closing comment is removed by ReactMultiChild. |
19673 | | break; |
19674 | | } else { |
19675 | | parentNode.removeChild(node); |
19676 | | } |
19677 | | } |
19678 | | } |
19679 | | |
19680 | | function replaceDelimitedText(openingComment, closingComment, stringText) { |
19681 | | var parentNode = openingComment.parentNode; |
19682 | | var nodeAfterComment = openingComment.nextSibling; |
19683 | | if (nodeAfterComment === closingComment) { |
19684 | | // There are no text nodes between the opening and closing comments; insert |
19685 | | // a new one if stringText isn't empty. |
19686 | | if (stringText) { |
19687 | | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); |
19688 | | } |
19689 | | } else { |
19690 | | if (stringText) { |
19691 | | // Set the text content of the first node after the opening comment, and |
19692 | | // remove all following nodes up until the closing comment. |
19693 | | setTextContent(nodeAfterComment, stringText); |
19694 | | removeDelimitedText(parentNode, nodeAfterComment, closingComment); |
19695 | | } else { |
19696 | | removeDelimitedText(parentNode, openingComment, closingComment); |
19697 | | } |
19698 | | } |
19699 | | |
19700 | | if (true) { |
19701 | | ReactInstrumentation.debugTool.onHostOperation({ |
19702 | | instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, |
19703 | | type: 'replace text', |
19704 | | payload: stringText |
19705 | | }); |
19706 | | } |
19707 | | } |
19708 | | |
19709 | | var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; |
19710 | | if (true) { |
19711 | | dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { |
19712 | | Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); |
19713 | | if (prevInstance._debugID !== 0) { |
19714 | | ReactInstrumentation.debugTool.onHostOperation({ |
19715 | | instanceID: prevInstance._debugID, |
19716 | | type: 'replace with', |
19717 | | payload: markup.toString() |
19718 | | }); |
19719 | | } else { |
19720 | | var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); |
19721 | | if (nextInstance._debugID !== 0) { |
19722 | | ReactInstrumentation.debugTool.onHostOperation({ |
19723 | | instanceID: nextInstance._debugID, |
19724 | | type: 'mount', |
19725 | | payload: markup.toString() |
19726 | | }); |
19727 | | } |
19728 | | } |
19729 | | }; |
19730 | | } |
19731 | | |
19732 | | /** |
19733 | | * Operations for updating with DOM children. |
19734 | | */ |
19735 | | var DOMChildrenOperations = { |
19736 | | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, |
19737 | | |
19738 | | replaceDelimitedText: replaceDelimitedText, |
19739 | | |
19740 | | /** |
19741 | | * Updates a component's children by processing a series of updates. The |
19742 | | * update configurations are each expected to have a `parentNode` property. |
19743 | | * |
19744 | | * @param {array<object>} updates List of update configurations. |
19745 | | * @internal |
19746 | | */ |
19747 | | processUpdates: function (parentNode, updates) { |
19748 | | if (true) { |
19749 | | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; |
19750 | | } |
19751 | | |
19752 | | for (var k = 0; k < updates.length; k++) { |
19753 | | var update = updates[k]; |
19754 | | switch (update.type) { |
19755 | | case 'INSERT_MARKUP': |
19756 | | insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); |
19757 | | if (true) { |
19758 | | ReactInstrumentation.debugTool.onHostOperation({ |
19759 | | instanceID: parentNodeDebugID, |
19760 | | type: 'insert child', |
19761 | | payload: { |
19762 | | toIndex: update.toIndex, |
19763 | | content: update.content.toString() |
19764 | | } |
19765 | | }); |
19766 | | } |
19767 | | break; |
19768 | | case 'MOVE_EXISTING': |
19769 | | moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); |
19770 | | if (true) { |
19771 | | ReactInstrumentation.debugTool.onHostOperation({ |
19772 | | instanceID: parentNodeDebugID, |
19773 | | type: 'move child', |
19774 | | payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } |
19775 | | }); |
19776 | | } |
19777 | | break; |
19778 | | case 'SET_MARKUP': |
19779 | | setInnerHTML(parentNode, update.content); |
19780 | | if (true) { |
19781 | | ReactInstrumentation.debugTool.onHostOperation({ |
19782 | | instanceID: parentNodeDebugID, |
19783 | | type: 'replace children', |
19784 | | payload: update.content.toString() |
19785 | | }); |
19786 | | } |
19787 | | break; |
19788 | | case 'TEXT_CONTENT': |
19789 | | setTextContent(parentNode, update.content); |
19790 | | if (true) { |
19791 | | ReactInstrumentation.debugTool.onHostOperation({ |
19792 | | instanceID: parentNodeDebugID, |
19793 | | type: 'replace text', |
19794 | | payload: update.content.toString() |
19795 | | }); |
19796 | | } |
19797 | | break; |
19798 | | case 'REMOVE_NODE': |
19799 | | removeChild(parentNode, update.fromNode); |
19800 | | if (true) { |
19801 | | ReactInstrumentation.debugTool.onHostOperation({ |
19802 | | instanceID: parentNodeDebugID, |
19803 | | type: 'remove child', |
19804 | | payload: { fromIndex: update.fromIndex } |
19805 | | }); |
19806 | | } |
19807 | | break; |
19808 | | } |
19809 | | } |
19810 | | } |
19811 | | }; |
19812 | | |
19813 | | module.exports = DOMChildrenOperations; |
19814 | | |
19815 | | /***/ }), |
19816 | | /* 418 */ |
19817 | | /***/ (function(module, exports, __webpack_require__) { |
19818 | | |
19819 | | /** |
19820 | | * Copyright (c) 2015-present, Facebook, Inc. |
19821 | | * |
19822 | | * This source code is licensed under the MIT license found in the |
19823 | | * LICENSE file in the root directory of this source tree. |
19824 | | * |
19825 | | */ |
19826 | | |
19827 | | 'use strict'; |
19828 | | |
19829 | | var DOMNamespaces = __webpack_require__(419); |
19830 | | var setInnerHTML = __webpack_require__(420); |
19831 | | |
19832 | | var createMicrosoftUnsafeLocalFunction = __webpack_require__(421); |
19833 | | var setTextContent = __webpack_require__(422); |
19834 | | |
19835 | | var ELEMENT_NODE_TYPE = 1; |
19836 | | var DOCUMENT_FRAGMENT_NODE_TYPE = 11; |
19837 | | |
19838 | | /** |
19839 | | * In IE (8-11) and Edge, appending nodes with no children is dramatically |
19840 | | * faster than appending a full subtree, so we essentially queue up the |
19841 | | * .appendChild calls here and apply them so each node is added to its parent |
19842 | | * before any children are added. |
19843 | | * |
19844 | | * In other browsers, doing so is slower or neutral compared to the other order |
19845 | | * (in Firefox, twice as slow) so we only do this inversion in IE. |
19846 | | * |
19847 | | * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. |
19848 | | */ |
19849 | | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); |
19850 | | |
19851 | | function insertTreeChildren(tree) { |
19852 | | if (!enableLazy) { |
19853 | | return; |
19854 | | } |
19855 | | var node = tree.node; |
19856 | | var children = tree.children; |
19857 | | if (children.length) { |
19858 | | for (var i = 0; i < children.length; i++) { |
19859 | | insertTreeBefore(node, children[i], null); |
19860 | | } |
19861 | | } else if (tree.html != null) { |
19862 | | setInnerHTML(node, tree.html); |
19863 | | } else if (tree.text != null) { |
19864 | | setTextContent(node, tree.text); |
19865 | | } |
19866 | | } |
19867 | | |
19868 | | var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { |
19869 | | // DocumentFragments aren't actually part of the DOM after insertion so |
19870 | | // appending children won't update the DOM. We need to ensure the fragment |
19871 | | // is properly populated first, breaking out of our lazy approach for just |
19872 | | // this level. Also, some <object> plugins (like Flash Player) will read |
19873 | | // <param> nodes immediately upon insertion into the DOM, so <object> |
19874 | | // must also be populated prior to insertion into the DOM. |
19875 | | if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { |
19876 | | insertTreeChildren(tree); |
19877 | | parentNode.insertBefore(tree.node, referenceNode); |
19878 | | } else { |
19879 | | parentNode.insertBefore(tree.node, referenceNode); |
19880 | | insertTreeChildren(tree); |
19881 | | } |
19882 | | }); |
19883 | | |
19884 | | function replaceChildWithTree(oldNode, newTree) { |
19885 | | oldNode.parentNode.replaceChild(newTree.node, oldNode); |
19886 | | insertTreeChildren(newTree); |
19887 | | } |
19888 | | |
19889 | | function queueChild(parentTree, childTree) { |
19890 | | if (enableLazy) { |
19891 | | parentTree.children.push(childTree); |
19892 | | } else { |
19893 | | parentTree.node.appendChild(childTree.node); |
19894 | | } |
19895 | | } |
19896 | | |
19897 | | function queueHTML(tree, html) { |
19898 | | if (enableLazy) { |
19899 | | tree.html = html; |
19900 | | } else { |
19901 | | setInnerHTML(tree.node, html); |
19902 | | } |
19903 | | } |
19904 | | |
19905 | | function queueText(tree, text) { |
19906 | | if (enableLazy) { |
19907 | | tree.text = text; |
19908 | | } else { |
19909 | | setTextContent(tree.node, text); |
19910 | | } |
19911 | | } |
19912 | | |
19913 | | function toString() { |
19914 | | return this.node.nodeName; |
19915 | | } |
19916 | | |
19917 | | function DOMLazyTree(node) { |
19918 | | return { |
19919 | | node: node, |
19920 | | children: [], |
19921 | | html: null, |
19922 | | text: null, |
19923 | | toString: toString |
19924 | | }; |
19925 | | } |
19926 | | |
19927 | | DOMLazyTree.insertTreeBefore = insertTreeBefore; |
19928 | | DOMLazyTree.replaceChildWithTree = replaceChildWithTree; |
19929 | | DOMLazyTree.queueChild = queueChild; |
19930 | | DOMLazyTree.queueHTML = queueHTML; |
19931 | | DOMLazyTree.queueText = queueText; |
19932 | | |
19933 | | module.exports = DOMLazyTree; |
19934 | | |
19935 | | /***/ }), |
19936 | | /* 419 */ |
19937 | | /***/ (function(module, exports) { |
19938 | | |
19939 | | /** |
19940 | | * Copyright (c) 2013-present, Facebook, Inc. |
19941 | | * |
19942 | | * This source code is licensed under the MIT license found in the |
19943 | | * LICENSE file in the root directory of this source tree. |
19944 | | * |
19945 | | */ |
19946 | | |
19947 | | 'use strict'; |
19948 | | |
19949 | | var DOMNamespaces = { |
19950 | | html: 'http://www.w3.org/1999/xhtml', |
19951 | | mathml: 'http://www.w3.org/1998/Math/MathML', |
19952 | | svg: 'http://www.w3.org/2000/svg' |
19953 | | }; |
19954 | | |
19955 | | module.exports = DOMNamespaces; |
19956 | | |
19957 | | /***/ }), |
19958 | | /* 420 */ |
19959 | | /***/ (function(module, exports, __webpack_require__) { |
19960 | | |
19961 | | /** |
19962 | | * Copyright (c) 2013-present, Facebook, Inc. |
19963 | | * |
19964 | | * This source code is licensed under the MIT license found in the |
19965 | | * LICENSE file in the root directory of this source tree. |
19966 | | * |
19967 | | */ |
19968 | | |
19969 | | 'use strict'; |
19970 | | |
19971 | | var ExecutionEnvironment = __webpack_require__(384); |
19972 | | var DOMNamespaces = __webpack_require__(419); |
19973 | | |
19974 | | var WHITESPACE_TEST = /^[ \r\n\t\f]/; |
19975 | | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; |
19976 | | |
19977 | | var createMicrosoftUnsafeLocalFunction = __webpack_require__(421); |
19978 | | |
19979 | | // SVG temp container for IE lacking innerHTML |
19980 | | var reusableSVGContainer; |
19981 | | |
19982 | | /** |
19983 | | * Set the innerHTML property of a node, ensuring that whitespace is preserved |
19984 | | * even in IE8. |
19985 | | * |
19986 | | * @param {DOMElement} node |
19987 | | * @param {string} html |
19988 | | * @internal |
19989 | | */ |
19990 | | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { |
19991 | | // IE does not have innerHTML for SVG nodes, so instead we inject the |
19992 | | // new markup in a temp node and then move the child nodes across into |
19993 | | // the target node |
19994 | | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { |
19995 | | reusableSVGContainer = reusableSVGContainer || document.createElement('div'); |
19996 | | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; |
19997 | | var svgNode = reusableSVGContainer.firstChild; |
19998 | | while (svgNode.firstChild) { |
19999 | | node.appendChild(svgNode.firstChild); |
20000 | | } |
20001 | | } else { |
20002 | | node.innerHTML = html; |
20003 | | } |
20004 | | }); |
20005 | | |
20006 | | if (ExecutionEnvironment.canUseDOM) { |
20007 | | // IE8: When updating a just created node with innerHTML only leading |
20008 | | // whitespace is removed. When updating an existing node with innerHTML |
20009 | | // whitespace in root TextNodes is also collapsed. |
20010 | | // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html |
20011 | | |
20012 | | // Feature detection; only IE8 is known to behave improperly like this. |
20013 | | var testElement = document.createElement('div'); |
20014 | | testElement.innerHTML = ' '; |
20015 | | if (testElement.innerHTML === '') { |
20016 | | setInnerHTML = function (node, html) { |
20017 | | // Magic theory: IE8 supposedly differentiates between added and updated |
20018 | | // nodes when processing innerHTML, innerHTML on updated nodes suffers |
20019 | | // from worse whitespace behavior. Re-adding a node like this triggers |
20020 | | // the initial and more favorable whitespace behavior. |
20021 | | // TODO: What to do on a detached node? |
20022 | | if (node.parentNode) { |
20023 | | node.parentNode.replaceChild(node, node); |
20024 | | } |
20025 | | |
20026 | | // We also implement a workaround for non-visible tags disappearing into |
20027 | | // thin air on IE8, this only happens if there is no visible text |
20028 | | // in-front of the non-visible tags. Piggyback on the whitespace fix |
20029 | | // and simply check if any non-visible tags appear in the source. |
20030 | | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { |
20031 | | // Recover leading whitespace by temporarily prepending any character. |
20032 | | // \uFEFF has the potential advantage of being zero-width/invisible. |
20033 | | // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode |
20034 | | // in hopes that this is preserved even if "\uFEFF" is transformed to |
20035 | | // the actual Unicode character (by Babel, for example). |
20036 | | // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 |
20037 | | node.innerHTML = String.fromCharCode(0xfeff) + html; |
20038 | | |
20039 | | // deleteData leaves an empty `TextNode` which offsets the index of all |
20040 | | // children. Definitely want to avoid this. |
20041 | | var textNode = node.firstChild; |
20042 | | if (textNode.data.length === 1) { |
20043 | | node.removeChild(textNode); |
20044 | | } else { |
20045 | | textNode.deleteData(0, 1); |
20046 | | } |
20047 | | } else { |
20048 | | node.innerHTML = html; |
20049 | | } |
20050 | | }; |
20051 | | } |
20052 | | testElement = null; |
20053 | | } |
20054 | | |
20055 | | module.exports = setInnerHTML; |
20056 | | |
20057 | | /***/ }), |
20058 | | /* 421 */ |
20059 | | /***/ (function(module, exports) { |
20060 | | |
20061 | | /** |
20062 | | * Copyright (c) 2013-present, Facebook, Inc. |
20063 | | * |
20064 | | * This source code is licensed under the MIT license found in the |
20065 | | * LICENSE file in the root directory of this source tree. |
20066 | | * |
20067 | | */ |
20068 | | |
20069 | | /* globals MSApp */ |
20070 | | |
20071 | | 'use strict'; |
20072 | | |
20073 | | /** |
20074 | | * Create a function which has 'unsafe' privileges (required by windows8 apps) |
20075 | | */ |
20076 | | |
20077 | | var createMicrosoftUnsafeLocalFunction = function (func) { |
20078 | | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { |
20079 | | return function (arg0, arg1, arg2, arg3) { |
20080 | | MSApp.execUnsafeLocalFunction(function () { |
20081 | | return func(arg0, arg1, arg2, arg3); |
20082 | | }); |
20083 | | }; |
20084 | | } else { |
20085 | | return func; |
20086 | | } |
20087 | | }; |
20088 | | |
20089 | | module.exports = createMicrosoftUnsafeLocalFunction; |
20090 | | |
20091 | | /***/ }), |
20092 | | /* 422 */ |
20093 | | /***/ (function(module, exports, __webpack_require__) { |
20094 | | |
20095 | | /** |
20096 | | * Copyright (c) 2013-present, Facebook, Inc. |
20097 | | * |
20098 | | * This source code is licensed under the MIT license found in the |
20099 | | * LICENSE file in the root directory of this source tree. |
20100 | | * |
20101 | | */ |
20102 | | |
20103 | | 'use strict'; |
20104 | | |
20105 | | var ExecutionEnvironment = __webpack_require__(384); |
20106 | | var escapeTextContentForBrowser = __webpack_require__(423); |
20107 | | var setInnerHTML = __webpack_require__(420); |
20108 | | |
20109 | | /** |
20110 | | * Set the textContent property of a node, ensuring that whitespace is preserved |
20111 | | * even in IE8. innerText is a poor substitute for textContent and, among many |
20112 | | * issues, inserts <br> instead of the literal newline chars. innerHTML behaves |
20113 | | * as it should. |
20114 | | * |
20115 | | * @param {DOMElement} node |
20116 | | * @param {string} text |
20117 | | * @internal |
20118 | | */ |
20119 | | var setTextContent = function (node, text) { |
20120 | | if (text) { |
20121 | | var firstChild = node.firstChild; |
20122 | | |
20123 | | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { |
20124 | | firstChild.nodeValue = text; |
20125 | | return; |
20126 | | } |
20127 | | } |
20128 | | node.textContent = text; |
20129 | | }; |
20130 | | |
20131 | | if (ExecutionEnvironment.canUseDOM) { |
20132 | | if (!('textContent' in document.documentElement)) { |
20133 | | setTextContent = function (node, text) { |
20134 | | if (node.nodeType === 3) { |
20135 | | node.nodeValue = text; |
20136 | | return; |
20137 | | } |
20138 | | setInnerHTML(node, escapeTextContentForBrowser(text)); |
20139 | | }; |
20140 | | } |
20141 | | } |
20142 | | |
20143 | | module.exports = setTextContent; |
20144 | | |
20145 | | /***/ }), |
20146 | | /* 423 */ |
20147 | | /***/ (function(module, exports) { |
20148 | | |
20149 | | /** |
20150 | | * Copyright (c) 2016-present, Facebook, Inc. |
20151 | | * |
20152 | | * This source code is licensed under the MIT license found in the |
20153 | | * LICENSE file in the root directory of this source tree. |
20154 | | * |
20155 | | * Based on the escape-html library, which is used under the MIT License below: |
20156 | | * |
20157 | | * Copyright (c) 2012-2013 TJ Holowaychuk |
20158 | | * Copyright (c) 2015 Andreas Lubbe |
20159 | | * Copyright (c) 2015 Tiancheng "Timothy" Gu |
20160 | | * |
20161 | | * Permission is hereby granted, free of charge, to any person obtaining |
20162 | | * a copy of this software and associated documentation files (the |
20163 | | * 'Software'), to deal in the Software without restriction, including |
20164 | | * without limitation the rights to use, copy, modify, merge, publish, |
20165 | | * distribute, sublicense, and/or sell copies of the Software, and to |
20166 | | * permit persons to whom the Software is furnished to do so, subject to |
20167 | | * the following conditions: |
20168 | | * |
20169 | | * The above copyright notice and this permission notice shall be |
20170 | | * included in all copies or substantial portions of the Software. |
20171 | | * |
20172 | | * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
20173 | | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
20174 | | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
20175 | | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
20176 | | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
20177 | | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
20178 | | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
20179 | | * |
20180 | | */ |
20181 | | |
20182 | | 'use strict'; |
20183 | | |
20184 | | // code copied and modified from escape-html |
20185 | | /** |
20186 | | * Module variables. |
20187 | | * @private |
20188 | | */ |
20189 | | |
20190 | | var matchHtmlRegExp = /["'&<>]/; |
20191 | | |
20192 | | /** |
20193 | | * Escape special characters in the given string of html. |
20194 | | * |
20195 | | * @param {string} string The string to escape for inserting into HTML |
20196 | | * @return {string} |
20197 | | * @public |
20198 | | */ |
20199 | | |
20200 | | function escapeHtml(string) { |
20201 | | var str = '' + string; |
20202 | | var match = matchHtmlRegExp.exec(str); |
20203 | | |
20204 | | if (!match) { |
20205 | | return str; |
20206 | | } |
20207 | | |
20208 | | var escape; |
20209 | | var html = ''; |
20210 | | var index = 0; |
20211 | | var lastIndex = 0; |
20212 | | |
20213 | | for (index = match.index; index < str.length; index++) { |
20214 | | switch (str.charCodeAt(index)) { |
20215 | | case 34: |
20216 | | // " |
20217 | | escape = '"'; |
20218 | | break; |
20219 | | case 38: |
20220 | | // & |
20221 | | escape = '&'; |
20222 | | break; |
20223 | | case 39: |
20224 | | // ' |
20225 | | escape = '''; // modified from escape-html; used to be ''' |
20226 | | break; |
20227 | | case 60: |
20228 | | // < |
20229 | | escape = '<'; |
20230 | | break; |
20231 | | case 62: |
20232 | | // > |
20233 | | escape = '>'; |
20234 | | break; |
20235 | | default: |
20236 | | continue; |
20237 | | } |
20238 | | |
20239 | | if (lastIndex !== index) { |
20240 | | html += str.substring(lastIndex, index); |
20241 | | } |
20242 | | |
20243 | | lastIndex = index + 1; |
20244 | | html += escape; |
20245 | | } |
20246 | | |
20247 | | return lastIndex !== index ? html + str.substring(lastIndex, index) : html; |
20248 | | } |
20249 | | // end code copied and modified from escape-html |
20250 | | |
20251 | | /** |
20252 | | * Escapes text to prevent scripting attacks. |
20253 | | * |
20254 | | * @param {*} text Text value to escape. |
20255 | | * @return {string} An escaped string. |
20256 | | */ |
20257 | | function escapeTextContentForBrowser(text) { |
20258 | | if (typeof text === 'boolean' || typeof text === 'number') { |
20259 | | // this shortcircuit helps perf for types that we know will never have |
20260 | | // special characters, especially given that this function is used often |
20261 | | // for numeric dom ids. |
20262 | | return '' + text; |
20263 | | } |
20264 | | return escapeHtml(text); |
20265 | | } |
20266 | | |
20267 | | module.exports = escapeTextContentForBrowser; |
20268 | | |
20269 | | /***/ }), |
20270 | | /* 424 */ |
20271 | | /***/ (function(module, exports, __webpack_require__) { |
20272 | | |
20273 | | /** |
20274 | | * Copyright (c) 2013-present, Facebook, Inc. |
20275 | | * |
20276 | | * This source code is licensed under the MIT license found in the |
20277 | | * LICENSE file in the root directory of this source tree. |
20278 | | * |
20279 | | */ |
20280 | | |
20281 | | 'use strict'; |
20282 | | |
20283 | | var _prodInvariant = __webpack_require__(371); |
20284 | | |
20285 | | var DOMLazyTree = __webpack_require__(418); |
20286 | | var ExecutionEnvironment = __webpack_require__(384); |
20287 | | |
20288 | | var createNodesFromMarkup = __webpack_require__(425); |
20289 | | var emptyFunction = __webpack_require__(339); |
20290 | | var invariant = __webpack_require__(342); |
20291 | | |
20292 | | var Danger = { |
20293 | | /** |
20294 | | * Replaces a node with a string of markup at its current position within its |
20295 | | * parent. The markup must render into a single root node. |
20296 | | * |
20297 | | * @param {DOMElement} oldChild Child node to replace. |
20298 | | * @param {string} markup Markup to render in place of the child node. |
20299 | | * @internal |
20300 | | */ |
20301 | | dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { |
20302 | | !ExecutionEnvironment.canUseDOM ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; |
20303 | | !markup ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; |
20304 | | !(oldChild.nodeName !== 'HTML') ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; |
20305 | | |
20306 | | if (typeof markup === 'string') { |
20307 | | var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; |
20308 | | oldChild.parentNode.replaceChild(newChild, oldChild); |
20309 | | } else { |
20310 | | DOMLazyTree.replaceChildWithTree(oldChild, markup); |
20311 | | } |
20312 | | } |
20313 | | }; |
20314 | | |
20315 | | module.exports = Danger; |
20316 | | |
20317 | | /***/ }), |
20318 | | /* 425 */ |
20319 | | /***/ (function(module, exports, __webpack_require__) { |
20320 | | |
20321 | | 'use strict'; |
20322 | | |
20323 | | /** |
20324 | | * Copyright (c) 2013-present, Facebook, Inc. |
20325 | | * |
20326 | | * This source code is licensed under the MIT license found in the |
20327 | | * LICENSE file in the root directory of this source tree. |
20328 | | * |
20329 | | * @typechecks |
20330 | | */ |
20331 | | |
20332 | | /*eslint-disable fb-www/unsafe-html*/ |
20333 | | |
20334 | | var ExecutionEnvironment = __webpack_require__(384); |
20335 | | |
20336 | | var createArrayFromMixed = __webpack_require__(426); |
20337 | | var getMarkupWrap = __webpack_require__(427); |
20338 | | var invariant = __webpack_require__(342); |
20339 | | |
20340 | | /** |
20341 | | * Dummy container used to render all markup. |
20342 | | */ |
20343 | | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; |
20344 | | |
20345 | | /** |
20346 | | * Pattern used by `getNodeName`. |
20347 | | */ |
20348 | | var nodeNamePattern = /^\s*<(\w+)/; |
20349 | | |
20350 | | /** |
20351 | | * Extracts the `nodeName` of the first element in a string of markup. |
20352 | | * |
20353 | | * @param {string} markup String of markup. |
20354 | | * @return {?string} Node name of the supplied markup. |
20355 | | */ |
20356 | | function getNodeName(markup) { |
20357 | | var nodeNameMatch = markup.match(nodeNamePattern); |
20358 | | return nodeNameMatch && nodeNameMatch[1].toLowerCase(); |
20359 | | } |
20360 | | |
20361 | | /** |
20362 | | * Creates an array containing the nodes rendered from the supplied markup. The |
20363 | | * optionally supplied `handleScript` function will be invoked once for each |
20364 | | * <script> element that is rendered. If no `handleScript` function is supplied, |
20365 | | * an exception is thrown if any <script> elements are rendered. |
20366 | | * |
20367 | | * @param {string} markup A string of valid HTML markup. |
20368 | | * @param {?function} handleScript Invoked once for each rendered <script>. |
20369 | | * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. |
20370 | | */ |
20371 | | function createNodesFromMarkup(markup, handleScript) { |
20372 | | var node = dummyNode; |
20373 | | !!!dummyNode ? true ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; |
20374 | | var nodeName = getNodeName(markup); |
20375 | | |
20376 | | var wrap = nodeName && getMarkupWrap(nodeName); |
20377 | | if (wrap) { |
20378 | | node.innerHTML = wrap[1] + markup + wrap[2]; |
20379 | | |
20380 | | var wrapDepth = wrap[0]; |
20381 | | while (wrapDepth--) { |
20382 | | node = node.lastChild; |
20383 | | } |
20384 | | } else { |
20385 | | node.innerHTML = markup; |
20386 | | } |
20387 | | |
20388 | | var scripts = node.getElementsByTagName('script'); |
20389 | | if (scripts.length) { |
20390 | | !handleScript ? true ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; |
20391 | | createArrayFromMixed(scripts).forEach(handleScript); |
20392 | | } |
20393 | | |
20394 | | var nodes = Array.from(node.childNodes); |
20395 | | while (node.lastChild) { |
20396 | | node.removeChild(node.lastChild); |
20397 | | } |
20398 | | return nodes; |
20399 | | } |
20400 | | |
20401 | | module.exports = createNodesFromMarkup; |
20402 | | |
20403 | | /***/ }), |
20404 | | /* 426 */ |
20405 | | /***/ (function(module, exports, __webpack_require__) { |
20406 | | |
20407 | | 'use strict'; |
20408 | | |
20409 | | /** |
20410 | | * Copyright (c) 2013-present, Facebook, Inc. |
20411 | | * |
20412 | | * This source code is licensed under the MIT license found in the |
20413 | | * LICENSE file in the root directory of this source tree. |
20414 | | * |
20415 | | * @typechecks |
20416 | | */ |
20417 | | |
20418 | | var invariant = __webpack_require__(342); |
20419 | | |
20420 | | /** |
20421 | | * Convert array-like objects to arrays. |
20422 | | * |
20423 | | * This API assumes the caller knows the contents of the data type. For less |
20424 | | * well defined inputs use createArrayFromMixed. |
20425 | | * |
20426 | | * @param {object|function|filelist} obj |
20427 | | * @return {array} |
20428 | | */ |
20429 | | function toArray(obj) { |
20430 | | var length = obj.length; |
20431 | | |
20432 | | // Some browsers builtin objects can report typeof 'function' (e.g. NodeList |
20433 | | // in old versions of Safari). |
20434 | | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; |
20435 | | |
20436 | | !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; |
20437 | | |
20438 | | !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; |
20439 | | |
20440 | | !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; |
20441 | | |
20442 | | // Old IE doesn't give collections access to hasOwnProperty. Assume inputs |
20443 | | // without method will throw during the slice call and skip straight to the |
20444 | | // fallback. |
20445 | | if (obj.hasOwnProperty) { |
20446 | | try { |
20447 | | return Array.prototype.slice.call(obj); |
20448 | | } catch (e) { |
20449 | | // IE < 9 does not support Array#slice on collections objects |
20450 | | } |
20451 | | } |
20452 | | |
20453 | | // Fall back to copying key by key. This assumes all keys have a value, |
20454 | | // so will not preserve sparsely populated inputs. |
20455 | | var ret = Array(length); |
20456 | | for (var ii = 0; ii < length; ii++) { |
20457 | | ret[ii] = obj[ii]; |
20458 | | } |
20459 | | return ret; |
20460 | | } |
20461 | | |
20462 | | /** |
20463 | | * Perform a heuristic test to determine if an object is "array-like". |
20464 | | * |
20465 | | * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" |
20466 | | * Joshu replied: "Mu." |
20467 | | * |
20468 | | * This function determines if its argument has "array nature": it returns |
20469 | | * true if the argument is an actual array, an `arguments' object, or an |
20470 | | * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). |
20471 | | * |
20472 | | * It will return false for other array-like objects like Filelist. |
20473 | | * |
20474 | | * @param {*} obj |
20475 | | * @return {boolean} |
20476 | | */ |
20477 | | function hasArrayNature(obj) { |
20478 | | return ( |
20479 | | // not null/false |
20480 | | !!obj && ( |
20481 | | // arrays are objects, NodeLists are functions in Safari |
20482 | | typeof obj == 'object' || typeof obj == 'function') && |
20483 | | // quacks like an array |
20484 | | 'length' in obj && |
20485 | | // not window |
20486 | | !('setInterval' in obj) && |
20487 | | // no DOM node should be considered an array-like |
20488 | | // a 'select' element has 'length' and 'item' properties on IE8 |
20489 | | typeof obj.nodeType != 'number' && ( |
20490 | | // a real array |
20491 | | Array.isArray(obj) || |
20492 | | // arguments |
20493 | | 'callee' in obj || |
20494 | | // HTMLCollection/NodeList |
20495 | | 'item' in obj) |
20496 | | ); |
20497 | | } |
20498 | | |
20499 | | /** |
20500 | | * Ensure that the argument is an array by wrapping it in an array if it is not. |
20501 | | * Creates a copy of the argument if it is already an array. |
20502 | | * |
20503 | | * This is mostly useful idiomatically: |
20504 | | * |
20505 | | * var createArrayFromMixed = require('createArrayFromMixed'); |
20506 | | * |
20507 | | * function takesOneOrMoreThings(things) { |
20508 | | * things = createArrayFromMixed(things); |
20509 | | * ... |
20510 | | * } |
20511 | | * |
20512 | | * This allows you to treat `things' as an array, but accept scalars in the API. |
20513 | | * |
20514 | | * If you need to convert an array-like object, like `arguments`, into an array |
20515 | | * use toArray instead. |
20516 | | * |
20517 | | * @param {*} obj |
20518 | | * @return {array} |
20519 | | */ |
20520 | | function createArrayFromMixed(obj) { |
20521 | | if (!hasArrayNature(obj)) { |
20522 | | return [obj]; |
20523 | | } else if (Array.isArray(obj)) { |
20524 | | return obj.slice(); |
20525 | | } else { |
20526 | | return toArray(obj); |
20527 | | } |
20528 | | } |
20529 | | |
20530 | | module.exports = createArrayFromMixed; |
20531 | | |
20532 | | /***/ }), |
20533 | | /* 427 */ |
20534 | | /***/ (function(module, exports, __webpack_require__) { |
20535 | | |
20536 | | 'use strict'; |
20537 | | |
20538 | | /** |
20539 | | * Copyright (c) 2013-present, Facebook, Inc. |
20540 | | * |
20541 | | * This source code is licensed under the MIT license found in the |
20542 | | * LICENSE file in the root directory of this source tree. |
20543 | | * |
20544 | | */ |
20545 | | |
20546 | | /*eslint-disable fb-www/unsafe-html */ |
20547 | | |
20548 | | var ExecutionEnvironment = __webpack_require__(384); |
20549 | | |
20550 | | var invariant = __webpack_require__(342); |
20551 | | |
20552 | | /** |
20553 | | * Dummy container used to detect which wraps are necessary. |
20554 | | */ |
20555 | | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; |
20556 | | |
20557 | | /** |
20558 | | * Some browsers cannot use `innerHTML` to render certain elements standalone, |
20559 | | * so we wrap them, render the wrapped nodes, then extract the desired node. |
20560 | | * |
20561 | | * In IE8, certain elements cannot render alone, so wrap all elements ('*'). |
20562 | | */ |
20563 | | |
20564 | | var shouldWrap = {}; |
20565 | | |
20566 | | var selectWrap = [1, '<select multiple="true">', '</select>']; |
20567 | | var tableWrap = [1, '<table>', '</table>']; |
20568 | | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; |
20569 | | |
20570 | | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; |
20571 | | |
20572 | | var markupWrap = { |
20573 | | '*': [1, '?<div>', '</div>'], |
20574 | | |
20575 | | 'area': [1, '<map>', '</map>'], |
20576 | | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], |
20577 | | 'legend': [1, '<fieldset>', '</fieldset>'], |
20578 | | 'param': [1, '<object>', '</object>'], |
20579 | | 'tr': [2, '<table><tbody>', '</tbody></table>'], |
20580 | | |
20581 | | 'optgroup': selectWrap, |
20582 | | 'option': selectWrap, |
20583 | | |
20584 | | 'caption': tableWrap, |
20585 | | 'colgroup': tableWrap, |
20586 | | 'tbody': tableWrap, |
20587 | | 'tfoot': tableWrap, |
20588 | | 'thead': tableWrap, |
20589 | | |
20590 | | 'td': trWrap, |
20591 | | 'th': trWrap |
20592 | | }; |
20593 | | |
20594 | | // Initialize the SVG elements since we know they'll always need to be wrapped |
20595 | | // consistently. If they are created inside a <div> they will be initialized in |
20596 | | // the wrong namespace (and will not display). |
20597 | | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; |
20598 | | svgElements.forEach(function (nodeName) { |
20599 | | markupWrap[nodeName] = svgWrap; |
20600 | | shouldWrap[nodeName] = true; |
20601 | | }); |
20602 | | |
20603 | | /** |
20604 | | * Gets the markup wrap configuration for the supplied `nodeName`. |
20605 | | * |
20606 | | * NOTE: This lazily detects which wraps are necessary for the current browser. |
20607 | | * |
20608 | | * @param {string} nodeName Lowercase `nodeName`. |
20609 | | * @return {?array} Markup wrap configuration, if applicable. |
20610 | | */ |
20611 | | function getMarkupWrap(nodeName) { |
20612 | | !!!dummyNode ? true ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; |
20613 | | if (!markupWrap.hasOwnProperty(nodeName)) { |
20614 | | nodeName = '*'; |
20615 | | } |
20616 | | if (!shouldWrap.hasOwnProperty(nodeName)) { |
20617 | | if (nodeName === '*') { |
20618 | | dummyNode.innerHTML = '<link />'; |
20619 | | } else { |
20620 | | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; |
20621 | | } |
20622 | | shouldWrap[nodeName] = !dummyNode.firstChild; |
20623 | | } |
20624 | | return shouldWrap[nodeName] ? markupWrap[nodeName] : null; |
20625 | | } |
20626 | | |
20627 | | module.exports = getMarkupWrap; |
20628 | | |
20629 | | /***/ }), |
20630 | | /* 428 */ |
20631 | | /***/ (function(module, exports, __webpack_require__) { |
20632 | | |
20633 | | /** |
20634 | | * Copyright (c) 2013-present, Facebook, Inc. |
20635 | | * |
20636 | | * This source code is licensed under the MIT license found in the |
20637 | | * LICENSE file in the root directory of this source tree. |
20638 | | * |
20639 | | */ |
20640 | | |
20641 | | 'use strict'; |
20642 | | |
20643 | | var DOMChildrenOperations = __webpack_require__(417); |
20644 | | var ReactDOMComponentTree = __webpack_require__(370); |
20645 | | |
20646 | | /** |
20647 | | * Operations used to process updates to DOM nodes. |
20648 | | */ |
20649 | | var ReactDOMIDOperations = { |
20650 | | /** |
20651 | | * Updates a component's children by processing a series of updates. |
20652 | | * |
20653 | | * @param {array<object>} updates List of update configurations. |
20654 | | * @internal |
20655 | | */ |
20656 | | dangerouslyProcessChildrenUpdates: function (parentInst, updates) { |
20657 | | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); |
20658 | | DOMChildrenOperations.processUpdates(node, updates); |
20659 | | } |
20660 | | }; |
20661 | | |
20662 | | module.exports = ReactDOMIDOperations; |
20663 | | |
20664 | | /***/ }), |
20665 | | /* 429 */ |
20666 | | /***/ (function(module, exports, __webpack_require__) { |
20667 | | |
20668 | | /** |
20669 | | * Copyright (c) 2013-present, Facebook, Inc. |
20670 | | * |
20671 | | * This source code is licensed under the MIT license found in the |
20672 | | * LICENSE file in the root directory of this source tree. |
20673 | | * |
20674 | | */ |
20675 | | |
20676 | | /* global hasOwnProperty:true */ |
20677 | | |
20678 | | 'use strict'; |
20679 | | |
20680 | | var _prodInvariant = __webpack_require__(371), |
20681 | | _assign = __webpack_require__(334); |
20682 | | |
20683 | | var AutoFocusUtils = __webpack_require__(430); |
20684 | | var CSSPropertyOperations = __webpack_require__(432); |
20685 | | var DOMLazyTree = __webpack_require__(418); |
20686 | | var DOMNamespaces = __webpack_require__(419); |
20687 | | var DOMProperty = __webpack_require__(372); |
20688 | | var DOMPropertyOperations = __webpack_require__(440); |
20689 | | var EventPluginHub = __webpack_require__(378); |
20690 | | var EventPluginRegistry = __webpack_require__(379); |
20691 | | var ReactBrowserEventEmitter = __webpack_require__(442); |
20692 | | var ReactDOMComponentFlags = __webpack_require__(373); |
20693 | | var ReactDOMComponentTree = __webpack_require__(370); |
20694 | | var ReactDOMInput = __webpack_require__(445); |
20695 | | var ReactDOMOption = __webpack_require__(448); |
20696 | | var ReactDOMSelect = __webpack_require__(449); |
20697 | | var ReactDOMTextarea = __webpack_require__(450); |
20698 | | var ReactInstrumentation = __webpack_require__(398); |
20699 | | var ReactMultiChild = __webpack_require__(451); |
20700 | | var ReactServerRenderingTransaction = __webpack_require__(470); |
20701 | | |
20702 | | var emptyFunction = __webpack_require__(339); |
20703 | | var escapeTextContentForBrowser = __webpack_require__(423); |
20704 | | var invariant = __webpack_require__(342); |
20705 | | var isEventSupported = __webpack_require__(407); |
20706 | | var shallowEqual = __webpack_require__(460); |
20707 | | var inputValueTracking = __webpack_require__(405); |
20708 | | var validateDOMNesting = __webpack_require__(473); |
20709 | | var warning = __webpack_require__(338); |
20710 | | |
20711 | | var Flags = ReactDOMComponentFlags; |
20712 | | var deleteListener = EventPluginHub.deleteListener; |
20713 | | var getNode = ReactDOMComponentTree.getNodeFromInstance; |
20714 | | var listenTo = ReactBrowserEventEmitter.listenTo; |
20715 | | var registrationNameModules = EventPluginRegistry.registrationNameModules; |
20716 | | |
20717 | | // For quickly matching children type, to test if can be treated as content. |
20718 | | var CONTENT_TYPES = { string: true, number: true }; |
20719 | | |
20720 | | var STYLE = 'style'; |
20721 | | var HTML = '__html'; |
20722 | | var RESERVED_PROPS = { |
20723 | | children: null, |
20724 | | dangerouslySetInnerHTML: null, |
20725 | | suppressContentEditableWarning: null |
20726 | | }; |
20727 | | |
20728 | | // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). |
20729 | | var DOC_FRAGMENT_TYPE = 11; |
20730 | | |
20731 | | function getDeclarationErrorAddendum(internalInstance) { |
20732 | | if (internalInstance) { |
20733 | | var owner = internalInstance._currentElement._owner || null; |
20734 | | if (owner) { |
20735 | | var name = owner.getName(); |
20736 | | if (name) { |
20737 | | return ' This DOM node was rendered by `' + name + '`.'; |
20738 | | } |
20739 | | } |
20740 | | } |
20741 | | return ''; |
20742 | | } |
20743 | | |
20744 | | function friendlyStringify(obj) { |
20745 | | if (typeof obj === 'object') { |
20746 | | if (Array.isArray(obj)) { |
20747 | | return '[' + obj.map(friendlyStringify).join(', ') + ']'; |
20748 | | } else { |
20749 | | var pairs = []; |
20750 | | for (var key in obj) { |
20751 | | if (Object.prototype.hasOwnProperty.call(obj, key)) { |
20752 | | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); |
20753 | | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); |
20754 | | } |
20755 | | } |
20756 | | return '{' + pairs.join(', ') + '}'; |
20757 | | } |
20758 | | } else if (typeof obj === 'string') { |
20759 | | return JSON.stringify(obj); |
20760 | | } else if (typeof obj === 'function') { |
20761 | | return '[function object]'; |
20762 | | } |
20763 | | // Differs from JSON.stringify in that undefined because undefined and that |
20764 | | // inf and nan don't become null |
20765 | | return String(obj); |
20766 | | } |
20767 | | |
20768 | | var styleMutationWarning = {}; |
20769 | | |
20770 | | function checkAndWarnForMutatedStyle(style1, style2, component) { |
20771 | | if (style1 == null || style2 == null) { |
20772 | | return; |
20773 | | } |
20774 | | if (shallowEqual(style1, style2)) { |
20775 | | return; |
20776 | | } |
20777 | | |
20778 | | var componentName = component._tag; |
20779 | | var owner = component._currentElement._owner; |
20780 | | var ownerName; |
20781 | | if (owner) { |
20782 | | ownerName = owner.getName(); |
20783 | | } |
20784 | | |
20785 | | var hash = ownerName + '|' + componentName; |
20786 | | |
20787 | | if (styleMutationWarning.hasOwnProperty(hash)) { |
20788 | | return; |
20789 | | } |
20790 | | |
20791 | | styleMutationWarning[hash] = true; |
20792 | | |
20793 | | true ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; |
20794 | | } |
20795 | | |
20796 | | /** |
20797 | | * @param {object} component |
20798 | | * @param {?object} props |
20799 | | */ |
20800 | | function assertValidProps(component, props) { |
20801 | | if (!props) { |
20802 | | return; |
20803 | | } |
20804 | | // Note the use of `==` which checks for null or undefined. |
20805 | | if (voidElementTags[component._tag]) { |
20806 | | !(props.children == null && props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; |
20807 | | } |
20808 | | if (props.dangerouslySetInnerHTML != null) { |
20809 | | !(props.children == null) ? true ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; |
20810 | | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? true ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; |
20811 | | } |
20812 | | if (true) { |
20813 | | true ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; |
20814 | | true ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; |
20815 | | true ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; |
20816 | | } |
20817 | | !(props.style == null || typeof props.style === 'object') ? true ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; |
20818 | | } |
20819 | | |
20820 | | function enqueuePutListener(inst, registrationName, listener, transaction) { |
20821 | | if (transaction instanceof ReactServerRenderingTransaction) { |
20822 | | return; |
20823 | | } |
20824 | | if (true) { |
20825 | | // IE8 has no API for event capturing and the `onScroll` event doesn't |
20826 | | // bubble. |
20827 | | true ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0; |
20828 | | } |
20829 | | var containerInfo = inst._hostContainerInfo; |
20830 | | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; |
20831 | | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; |
20832 | | listenTo(registrationName, doc); |
20833 | | transaction.getReactMountReady().enqueue(putListener, { |
20834 | | inst: inst, |
20835 | | registrationName: registrationName, |
20836 | | listener: listener |
20837 | | }); |
20838 | | } |
20839 | | |
20840 | | function putListener() { |
20841 | | var listenerToPut = this; |
20842 | | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); |
20843 | | } |
20844 | | |
20845 | | function inputPostMount() { |
20846 | | var inst = this; |
20847 | | ReactDOMInput.postMountWrapper(inst); |
20848 | | } |
20849 | | |
20850 | | function textareaPostMount() { |
20851 | | var inst = this; |
20852 | | ReactDOMTextarea.postMountWrapper(inst); |
20853 | | } |
20854 | | |
20855 | | function optionPostMount() { |
20856 | | var inst = this; |
20857 | | ReactDOMOption.postMountWrapper(inst); |
20858 | | } |
20859 | | |
20860 | | var setAndValidateContentChildDev = emptyFunction; |
20861 | | if (true) { |
20862 | | setAndValidateContentChildDev = function (content) { |
20863 | | var hasExistingContent = this._contentDebugID != null; |
20864 | | var debugID = this._debugID; |
20865 | | // This ID represents the inlined child that has no backing instance: |
20866 | | var contentDebugID = -debugID; |
20867 | | |
20868 | | if (content == null) { |
20869 | | if (hasExistingContent) { |
20870 | | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); |
20871 | | } |
20872 | | this._contentDebugID = null; |
20873 | | return; |
20874 | | } |
20875 | | |
20876 | | validateDOMNesting(null, String(content), this, this._ancestorInfo); |
20877 | | this._contentDebugID = contentDebugID; |
20878 | | if (hasExistingContent) { |
20879 | | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); |
20880 | | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); |
20881 | | } else { |
20882 | | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); |
20883 | | ReactInstrumentation.debugTool.onMountComponent(contentDebugID); |
20884 | | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); |
20885 | | } |
20886 | | }; |
20887 | | } |
20888 | | |
20889 | | // There are so many media events, it makes sense to just |
20890 | | // maintain a list rather than create a `trapBubbledEvent` for each |
20891 | | var mediaEvents = { |
20892 | | topAbort: 'abort', |
20893 | | topCanPlay: 'canplay', |
20894 | | topCanPlayThrough: 'canplaythrough', |
20895 | | topDurationChange: 'durationchange', |
20896 | | topEmptied: 'emptied', |
20897 | | topEncrypted: 'encrypted', |
20898 | | topEnded: 'ended', |
20899 | | topError: 'error', |
20900 | | topLoadedData: 'loadeddata', |
20901 | | topLoadedMetadata: 'loadedmetadata', |
20902 | | topLoadStart: 'loadstart', |
20903 | | topPause: 'pause', |
20904 | | topPlay: 'play', |
20905 | | topPlaying: 'playing', |
20906 | | topProgress: 'progress', |
20907 | | topRateChange: 'ratechange', |
20908 | | topSeeked: 'seeked', |
20909 | | topSeeking: 'seeking', |
20910 | | topStalled: 'stalled', |
20911 | | topSuspend: 'suspend', |
20912 | | topTimeUpdate: 'timeupdate', |
20913 | | topVolumeChange: 'volumechange', |
20914 | | topWaiting: 'waiting' |
20915 | | }; |
20916 | | |
20917 | | function trackInputValue() { |
20918 | | inputValueTracking.track(this); |
20919 | | } |
20920 | | |
20921 | | function trapBubbledEventsLocal() { |
20922 | | var inst = this; |
20923 | | // If a component renders to null or if another component fatals and causes |
20924 | | // the state of the tree to be corrupted, `node` here can be null. |
20925 | | !inst._rootNodeID ? true ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; |
20926 | | var node = getNode(inst); |
20927 | | !node ? true ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; |
20928 | | |
20929 | | switch (inst._tag) { |
20930 | | case 'iframe': |
20931 | | case 'object': |
20932 | | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; |
20933 | | break; |
20934 | | case 'video': |
20935 | | case 'audio': |
20936 | | inst._wrapperState.listeners = []; |
20937 | | // Create listener for each media event |
20938 | | for (var event in mediaEvents) { |
20939 | | if (mediaEvents.hasOwnProperty(event)) { |
20940 | | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); |
20941 | | } |
20942 | | } |
20943 | | break; |
20944 | | case 'source': |
20945 | | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; |
20946 | | break; |
20947 | | case 'img': |
20948 | | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; |
20949 | | break; |
20950 | | case 'form': |
20951 | | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; |
20952 | | break; |
20953 | | case 'input': |
20954 | | case 'select': |
20955 | | case 'textarea': |
20956 | | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; |
20957 | | break; |
20958 | | } |
20959 | | } |
20960 | | |
20961 | | function postUpdateSelectWrapper() { |
20962 | | ReactDOMSelect.postUpdateWrapper(this); |
20963 | | } |
20964 | | |
20965 | | // For HTML, certain tags should omit their close tag. We keep a whitelist for |
20966 | | // those special-case tags. |
20967 | | |
20968 | | var omittedCloseTags = { |
20969 | | area: true, |
20970 | | base: true, |
20971 | | br: true, |
20972 | | col: true, |
20973 | | embed: true, |
20974 | | hr: true, |
20975 | | img: true, |
20976 | | input: true, |
20977 | | keygen: true, |
20978 | | link: true, |
20979 | | meta: true, |
20980 | | param: true, |
20981 | | source: true, |
20982 | | track: true, |
20983 | | wbr: true |
20984 | | // NOTE: menuitem's close tag should be omitted, but that causes problems. |
20985 | | }; |
20986 | | |
20987 | | var newlineEatingTags = { |
20988 | | listing: true, |
20989 | | pre: true, |
20990 | | textarea: true |
20991 | | }; |
20992 | | |
20993 | | // For HTML, certain tags cannot have children. This has the same purpose as |
20994 | | // `omittedCloseTags` except that `menuitem` should still have its closing tag. |
20995 | | |
20996 | | var voidElementTags = _assign({ |
20997 | | menuitem: true |
20998 | | }, omittedCloseTags); |
20999 | | |
21000 | | // We accept any tag to be rendered but since this gets injected into arbitrary |
21001 | | // HTML, we want to make sure that it's a safe tag. |
21002 | | // http://www.w3.org/TR/REC-xml/#NT-Name |
21003 | | |
21004 | | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset |
21005 | | var validatedTagCache = {}; |
21006 | | var hasOwnProperty = {}.hasOwnProperty; |
21007 | | |
21008 | | function validateDangerousTag(tag) { |
21009 | | if (!hasOwnProperty.call(validatedTagCache, tag)) { |
21010 | | !VALID_TAG_REGEX.test(tag) ? true ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; |
21011 | | validatedTagCache[tag] = true; |
21012 | | } |
21013 | | } |
21014 | | |
21015 | | function isCustomComponent(tagName, props) { |
21016 | | return tagName.indexOf('-') >= 0 || props.is != null; |
21017 | | } |
21018 | | |
21019 | | var globalIdCounter = 1; |
21020 | | |
21021 | | /** |
21022 | | * Creates a new React class that is idempotent and capable of containing other |
21023 | | * React components. It accepts event listeners and DOM properties that are |
21024 | | * valid according to `DOMProperty`. |
21025 | | * |
21026 | | * - Event listeners: `onClick`, `onMouseDown`, etc. |
21027 | | * - DOM properties: `className`, `name`, `title`, etc. |
21028 | | * |
21029 | | * The `style` property functions differently from the DOM API. It accepts an |
21030 | | * object mapping of style properties to values. |
21031 | | * |
21032 | | * @constructor ReactDOMComponent |
21033 | | * @extends ReactMultiChild |
21034 | | */ |
21035 | | function ReactDOMComponent(element) { |
21036 | | var tag = element.type; |
21037 | | validateDangerousTag(tag); |
21038 | | this._currentElement = element; |
21039 | | this._tag = tag.toLowerCase(); |
21040 | | this._namespaceURI = null; |
21041 | | this._renderedChildren = null; |
21042 | | this._previousStyle = null; |
21043 | | this._previousStyleCopy = null; |
21044 | | this._hostNode = null; |
21045 | | this._hostParent = null; |
21046 | | this._rootNodeID = 0; |
21047 | | this._domID = 0; |
21048 | | this._hostContainerInfo = null; |
21049 | | this._wrapperState = null; |
21050 | | this._topLevelWrapper = null; |
21051 | | this._flags = 0; |
21052 | | if (true) { |
21053 | | this._ancestorInfo = null; |
21054 | | setAndValidateContentChildDev.call(this, null); |
21055 | | } |
21056 | | } |
21057 | | |
21058 | | ReactDOMComponent.displayName = 'ReactDOMComponent'; |
21059 | | |
21060 | | ReactDOMComponent.Mixin = { |
21061 | | /** |
21062 | | * Generates root tag markup then recurses. This method has side effects and |
21063 | | * is not idempotent. |
21064 | | * |
21065 | | * @internal |
21066 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
21067 | | * @param {?ReactDOMComponent} the parent component instance |
21068 | | * @param {?object} info about the host container |
21069 | | * @param {object} context |
21070 | | * @return {string} The computed markup. |
21071 | | */ |
21072 | | mountComponent: function (transaction, hostParent, hostContainerInfo, context) { |
21073 | | this._rootNodeID = globalIdCounter++; |
21074 | | this._domID = hostContainerInfo._idCounter++; |
21075 | | this._hostParent = hostParent; |
21076 | | this._hostContainerInfo = hostContainerInfo; |
21077 | | |
21078 | | var props = this._currentElement.props; |
21079 | | |
21080 | | switch (this._tag) { |
21081 | | case 'audio': |
21082 | | case 'form': |
21083 | | case 'iframe': |
21084 | | case 'img': |
21085 | | case 'link': |
21086 | | case 'object': |
21087 | | case 'source': |
21088 | | case 'video': |
21089 | | this._wrapperState = { |
21090 | | listeners: null |
21091 | | }; |
21092 | | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); |
21093 | | break; |
21094 | | case 'input': |
21095 | | ReactDOMInput.mountWrapper(this, props, hostParent); |
21096 | | props = ReactDOMInput.getHostProps(this, props); |
21097 | | transaction.getReactMountReady().enqueue(trackInputValue, this); |
21098 | | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); |
21099 | | break; |
21100 | | case 'option': |
21101 | | ReactDOMOption.mountWrapper(this, props, hostParent); |
21102 | | props = ReactDOMOption.getHostProps(this, props); |
21103 | | break; |
21104 | | case 'select': |
21105 | | ReactDOMSelect.mountWrapper(this, props, hostParent); |
21106 | | props = ReactDOMSelect.getHostProps(this, props); |
21107 | | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); |
21108 | | break; |
21109 | | case 'textarea': |
21110 | | ReactDOMTextarea.mountWrapper(this, props, hostParent); |
21111 | | props = ReactDOMTextarea.getHostProps(this, props); |
21112 | | transaction.getReactMountReady().enqueue(trackInputValue, this); |
21113 | | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); |
21114 | | break; |
21115 | | } |
21116 | | |
21117 | | assertValidProps(this, props); |
21118 | | |
21119 | | // We create tags in the namespace of their parent container, except HTML |
21120 | | // tags get no namespace. |
21121 | | var namespaceURI; |
21122 | | var parentTag; |
21123 | | if (hostParent != null) { |
21124 | | namespaceURI = hostParent._namespaceURI; |
21125 | | parentTag = hostParent._tag; |
21126 | | } else if (hostContainerInfo._tag) { |
21127 | | namespaceURI = hostContainerInfo._namespaceURI; |
21128 | | parentTag = hostContainerInfo._tag; |
21129 | | } |
21130 | | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { |
21131 | | namespaceURI = DOMNamespaces.html; |
21132 | | } |
21133 | | if (namespaceURI === DOMNamespaces.html) { |
21134 | | if (this._tag === 'svg') { |
21135 | | namespaceURI = DOMNamespaces.svg; |
21136 | | } else if (this._tag === 'math') { |
21137 | | namespaceURI = DOMNamespaces.mathml; |
21138 | | } |
21139 | | } |
21140 | | this._namespaceURI = namespaceURI; |
21141 | | |
21142 | | if (true) { |
21143 | | var parentInfo; |
21144 | | if (hostParent != null) { |
21145 | | parentInfo = hostParent._ancestorInfo; |
21146 | | } else if (hostContainerInfo._tag) { |
21147 | | parentInfo = hostContainerInfo._ancestorInfo; |
21148 | | } |
21149 | | if (parentInfo) { |
21150 | | // parentInfo should always be present except for the top-level |
21151 | | // component when server rendering |
21152 | | validateDOMNesting(this._tag, null, this, parentInfo); |
21153 | | } |
21154 | | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); |
21155 | | } |
21156 | | |
21157 | | var mountImage; |
21158 | | if (transaction.useCreateElement) { |
21159 | | var ownerDocument = hostContainerInfo._ownerDocument; |
21160 | | var el; |
21161 | | if (namespaceURI === DOMNamespaces.html) { |
21162 | | if (this._tag === 'script') { |
21163 | | // Create the script via .innerHTML so its "parser-inserted" flag is |
21164 | | // set to true and it does not execute |
21165 | | var div = ownerDocument.createElement('div'); |
21166 | | var type = this._currentElement.type; |
21167 | | div.innerHTML = '<' + type + '></' + type + '>'; |
21168 | | el = div.removeChild(div.firstChild); |
21169 | | } else if (props.is) { |
21170 | | el = ownerDocument.createElement(this._currentElement.type, props.is); |
21171 | | } else { |
21172 | | // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. |
21173 | | // See discussion in https://github.com/facebook/react/pull/6896 |
21174 | | // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 |
21175 | | el = ownerDocument.createElement(this._currentElement.type); |
21176 | | } |
21177 | | } else { |
21178 | | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); |
21179 | | } |
21180 | | ReactDOMComponentTree.precacheNode(this, el); |
21181 | | this._flags |= Flags.hasCachedChildNodes; |
21182 | | if (!this._hostParent) { |
21183 | | DOMPropertyOperations.setAttributeForRoot(el); |
21184 | | } |
21185 | | this._updateDOMProperties(null, props, transaction); |
21186 | | var lazyTree = DOMLazyTree(el); |
21187 | | this._createInitialChildren(transaction, props, context, lazyTree); |
21188 | | mountImage = lazyTree; |
21189 | | } else { |
21190 | | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); |
21191 | | var tagContent = this._createContentMarkup(transaction, props, context); |
21192 | | if (!tagContent && omittedCloseTags[this._tag]) { |
21193 | | mountImage = tagOpen + '/>'; |
21194 | | } else { |
21195 | | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; |
21196 | | } |
21197 | | } |
21198 | | |
21199 | | switch (this._tag) { |
21200 | | case 'input': |
21201 | | transaction.getReactMountReady().enqueue(inputPostMount, this); |
21202 | | if (props.autoFocus) { |
21203 | | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); |
21204 | | } |
21205 | | break; |
21206 | | case 'textarea': |
21207 | | transaction.getReactMountReady().enqueue(textareaPostMount, this); |
21208 | | if (props.autoFocus) { |
21209 | | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); |
21210 | | } |
21211 | | break; |
21212 | | case 'select': |
21213 | | if (props.autoFocus) { |
21214 | | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); |
21215 | | } |
21216 | | break; |
21217 | | case 'button': |
21218 | | if (props.autoFocus) { |
21219 | | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); |
21220 | | } |
21221 | | break; |
21222 | | case 'option': |
21223 | | transaction.getReactMountReady().enqueue(optionPostMount, this); |
21224 | | break; |
21225 | | } |
21226 | | |
21227 | | return mountImage; |
21228 | | }, |
21229 | | |
21230 | | /** |
21231 | | * Creates markup for the open tag and all attributes. |
21232 | | * |
21233 | | * This method has side effects because events get registered. |
21234 | | * |
21235 | | * Iterating over object properties is faster than iterating over arrays. |
21236 | | * @see http://jsperf.com/obj-vs-arr-iteration |
21237 | | * |
21238 | | * @private |
21239 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
21240 | | * @param {object} props |
21241 | | * @return {string} Markup of opening tag. |
21242 | | */ |
21243 | | _createOpenTagMarkupAndPutListeners: function (transaction, props) { |
21244 | | var ret = '<' + this._currentElement.type; |
21245 | | |
21246 | | for (var propKey in props) { |
21247 | | if (!props.hasOwnProperty(propKey)) { |
21248 | | continue; |
21249 | | } |
21250 | | var propValue = props[propKey]; |
21251 | | if (propValue == null) { |
21252 | | continue; |
21253 | | } |
21254 | | if (registrationNameModules.hasOwnProperty(propKey)) { |
21255 | | if (propValue) { |
21256 | | enqueuePutListener(this, propKey, propValue, transaction); |
21257 | | } |
21258 | | } else { |
21259 | | if (propKey === STYLE) { |
21260 | | if (propValue) { |
21261 | | if (true) { |
21262 | | // See `_updateDOMProperties`. style block |
21263 | | this._previousStyle = propValue; |
21264 | | } |
21265 | | propValue = this._previousStyleCopy = _assign({}, props.style); |
21266 | | } |
21267 | | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); |
21268 | | } |
21269 | | var markup = null; |
21270 | | if (this._tag != null && isCustomComponent(this._tag, props)) { |
21271 | | if (!RESERVED_PROPS.hasOwnProperty(propKey)) { |
21272 | | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); |
21273 | | } |
21274 | | } else { |
21275 | | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); |
21276 | | } |
21277 | | if (markup) { |
21278 | | ret += ' ' + markup; |
21279 | | } |
21280 | | } |
21281 | | } |
21282 | | |
21283 | | // For static pages, no need to put React ID and checksum. Saves lots of |
21284 | | // bytes. |
21285 | | if (transaction.renderToStaticMarkup) { |
21286 | | return ret; |
21287 | | } |
21288 | | |
21289 | | if (!this._hostParent) { |
21290 | | ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); |
21291 | | } |
21292 | | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); |
21293 | | return ret; |
21294 | | }, |
21295 | | |
21296 | | /** |
21297 | | * Creates markup for the content between the tags. |
21298 | | * |
21299 | | * @private |
21300 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
21301 | | * @param {object} props |
21302 | | * @param {object} context |
21303 | | * @return {string} Content markup. |
21304 | | */ |
21305 | | _createContentMarkup: function (transaction, props, context) { |
21306 | | var ret = ''; |
21307 | | |
21308 | | // Intentional use of != to avoid catching zero/false. |
21309 | | var innerHTML = props.dangerouslySetInnerHTML; |
21310 | | if (innerHTML != null) { |
21311 | | if (innerHTML.__html != null) { |
21312 | | ret = innerHTML.__html; |
21313 | | } |
21314 | | } else { |
21315 | | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; |
21316 | | var childrenToUse = contentToUse != null ? null : props.children; |
21317 | | if (contentToUse != null) { |
21318 | | // TODO: Validate that text is allowed as a child of this node |
21319 | | ret = escapeTextContentForBrowser(contentToUse); |
21320 | | if (true) { |
21321 | | setAndValidateContentChildDev.call(this, contentToUse); |
21322 | | } |
21323 | | } else if (childrenToUse != null) { |
21324 | | var mountImages = this.mountChildren(childrenToUse, transaction, context); |
21325 | | ret = mountImages.join(''); |
21326 | | } |
21327 | | } |
21328 | | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { |
21329 | | // text/html ignores the first character in these tags if it's a newline |
21330 | | // Prefer to break application/xml over text/html (for now) by adding |
21331 | | // a newline specifically to get eaten by the parser. (Alternately for |
21332 | | // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first |
21333 | | // \r is normalized out by HTMLTextAreaElement#value.) |
21334 | | // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> |
21335 | | // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> |
21336 | | // See: <http://www.w3.org/TR/html5/syntax.html#newlines> |
21337 | | // See: Parsing of "textarea" "listing" and "pre" elements |
21338 | | // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> |
21339 | | return '\n' + ret; |
21340 | | } else { |
21341 | | return ret; |
21342 | | } |
21343 | | }, |
21344 | | |
21345 | | _createInitialChildren: function (transaction, props, context, lazyTree) { |
21346 | | // Intentional use of != to avoid catching zero/false. |
21347 | | var innerHTML = props.dangerouslySetInnerHTML; |
21348 | | if (innerHTML != null) { |
21349 | | if (innerHTML.__html != null) { |
21350 | | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); |
21351 | | } |
21352 | | } else { |
21353 | | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; |
21354 | | var childrenToUse = contentToUse != null ? null : props.children; |
21355 | | // TODO: Validate that text is allowed as a child of this node |
21356 | | if (contentToUse != null) { |
21357 | | // Avoid setting textContent when the text is empty. In IE11 setting |
21358 | | // textContent on a text area will cause the placeholder to not |
21359 | | // show within the textarea until it has been focused and blurred again. |
21360 | | // https://github.com/facebook/react/issues/6731#issuecomment-254874553 |
21361 | | if (contentToUse !== '') { |
21362 | | if (true) { |
21363 | | setAndValidateContentChildDev.call(this, contentToUse); |
21364 | | } |
21365 | | DOMLazyTree.queueText(lazyTree, contentToUse); |
21366 | | } |
21367 | | } else if (childrenToUse != null) { |
21368 | | var mountImages = this.mountChildren(childrenToUse, transaction, context); |
21369 | | for (var i = 0; i < mountImages.length; i++) { |
21370 | | DOMLazyTree.queueChild(lazyTree, mountImages[i]); |
21371 | | } |
21372 | | } |
21373 | | } |
21374 | | }, |
21375 | | |
21376 | | /** |
21377 | | * Receives a next element and updates the component. |
21378 | | * |
21379 | | * @internal |
21380 | | * @param {ReactElement} nextElement |
21381 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
21382 | | * @param {object} context |
21383 | | */ |
21384 | | receiveComponent: function (nextElement, transaction, context) { |
21385 | | var prevElement = this._currentElement; |
21386 | | this._currentElement = nextElement; |
21387 | | this.updateComponent(transaction, prevElement, nextElement, context); |
21388 | | }, |
21389 | | |
21390 | | /** |
21391 | | * Updates a DOM component after it has already been allocated and |
21392 | | * attached to the DOM. Reconciles the root DOM node, then recurses. |
21393 | | * |
21394 | | * @param {ReactReconcileTransaction} transaction |
21395 | | * @param {ReactElement} prevElement |
21396 | | * @param {ReactElement} nextElement |
21397 | | * @internal |
21398 | | * @overridable |
21399 | | */ |
21400 | | updateComponent: function (transaction, prevElement, nextElement, context) { |
21401 | | var lastProps = prevElement.props; |
21402 | | var nextProps = this._currentElement.props; |
21403 | | |
21404 | | switch (this._tag) { |
21405 | | case 'input': |
21406 | | lastProps = ReactDOMInput.getHostProps(this, lastProps); |
21407 | | nextProps = ReactDOMInput.getHostProps(this, nextProps); |
21408 | | break; |
21409 | | case 'option': |
21410 | | lastProps = ReactDOMOption.getHostProps(this, lastProps); |
21411 | | nextProps = ReactDOMOption.getHostProps(this, nextProps); |
21412 | | break; |
21413 | | case 'select': |
21414 | | lastProps = ReactDOMSelect.getHostProps(this, lastProps); |
21415 | | nextProps = ReactDOMSelect.getHostProps(this, nextProps); |
21416 | | break; |
21417 | | case 'textarea': |
21418 | | lastProps = ReactDOMTextarea.getHostProps(this, lastProps); |
21419 | | nextProps = ReactDOMTextarea.getHostProps(this, nextProps); |
21420 | | break; |
21421 | | } |
21422 | | |
21423 | | assertValidProps(this, nextProps); |
21424 | | this._updateDOMProperties(lastProps, nextProps, transaction); |
21425 | | this._updateDOMChildren(lastProps, nextProps, transaction, context); |
21426 | | |
21427 | | switch (this._tag) { |
21428 | | case 'input': |
21429 | | // Update the wrapper around inputs *after* updating props. This has to |
21430 | | // happen after `_updateDOMProperties`. Otherwise HTML5 input validations |
21431 | | // raise warnings and prevent the new value from being assigned. |
21432 | | ReactDOMInput.updateWrapper(this); |
21433 | | |
21434 | | // We also check that we haven't missed a value update, such as a |
21435 | | // Radio group shifting the checked value to another named radio input. |
21436 | | inputValueTracking.updateValueIfChanged(this); |
21437 | | break; |
21438 | | case 'textarea': |
21439 | | ReactDOMTextarea.updateWrapper(this); |
21440 | | break; |
21441 | | case 'select': |
21442 | | // <select> value update needs to occur after <option> children |
21443 | | // reconciliation |
21444 | | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); |
21445 | | break; |
21446 | | } |
21447 | | }, |
21448 | | |
21449 | | /** |
21450 | | * Reconciles the properties by detecting differences in property values and |
21451 | | * updating the DOM as necessary. This function is probably the single most |
21452 | | * critical path for performance optimization. |
21453 | | * |
21454 | | * TODO: Benchmark whether checking for changed values in memory actually |
21455 | | * improves performance (especially statically positioned elements). |
21456 | | * TODO: Benchmark the effects of putting this at the top since 99% of props |
21457 | | * do not change for a given reconciliation. |
21458 | | * TODO: Benchmark areas that can be improved with caching. |
21459 | | * |
21460 | | * @private |
21461 | | * @param {object} lastProps |
21462 | | * @param {object} nextProps |
21463 | | * @param {?DOMElement} node |
21464 | | */ |
21465 | | _updateDOMProperties: function (lastProps, nextProps, transaction) { |
21466 | | var propKey; |
21467 | | var styleName; |
21468 | | var styleUpdates; |
21469 | | for (propKey in lastProps) { |
21470 | | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { |
21471 | | continue; |
21472 | | } |
21473 | | if (propKey === STYLE) { |
21474 | | var lastStyle = this._previousStyleCopy; |
21475 | | for (styleName in lastStyle) { |
21476 | | if (lastStyle.hasOwnProperty(styleName)) { |
21477 | | styleUpdates = styleUpdates || {}; |
21478 | | styleUpdates[styleName] = ''; |
21479 | | } |
21480 | | } |
21481 | | this._previousStyleCopy = null; |
21482 | | } else if (registrationNameModules.hasOwnProperty(propKey)) { |
21483 | | if (lastProps[propKey]) { |
21484 | | // Only call deleteListener if there was a listener previously or |
21485 | | // else willDeleteListener gets called when there wasn't actually a |
21486 | | // listener (e.g., onClick={null}) |
21487 | | deleteListener(this, propKey); |
21488 | | } |
21489 | | } else if (isCustomComponent(this._tag, lastProps)) { |
21490 | | if (!RESERVED_PROPS.hasOwnProperty(propKey)) { |
21491 | | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); |
21492 | | } |
21493 | | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { |
21494 | | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); |
21495 | | } |
21496 | | } |
21497 | | for (propKey in nextProps) { |
21498 | | var nextProp = nextProps[propKey]; |
21499 | | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; |
21500 | | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { |
21501 | | continue; |
21502 | | } |
21503 | | if (propKey === STYLE) { |
21504 | | if (nextProp) { |
21505 | | if (true) { |
21506 | | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); |
21507 | | this._previousStyle = nextProp; |
21508 | | } |
21509 | | nextProp = this._previousStyleCopy = _assign({}, nextProp); |
21510 | | } else { |
21511 | | this._previousStyleCopy = null; |
21512 | | } |
21513 | | if (lastProp) { |
21514 | | // Unset styles on `lastProp` but not on `nextProp`. |
21515 | | for (styleName in lastProp) { |
21516 | | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { |
21517 | | styleUpdates = styleUpdates || {}; |
21518 | | styleUpdates[styleName] = ''; |
21519 | | } |
21520 | | } |
21521 | | // Update styles that changed since `lastProp`. |
21522 | | for (styleName in nextProp) { |
21523 | | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { |
21524 | | styleUpdates = styleUpdates || {}; |
21525 | | styleUpdates[styleName] = nextProp[styleName]; |
21526 | | } |
21527 | | } |
21528 | | } else { |
21529 | | // Relies on `updateStylesByID` not mutating `styleUpdates`. |
21530 | | styleUpdates = nextProp; |
21531 | | } |
21532 | | } else if (registrationNameModules.hasOwnProperty(propKey)) { |
21533 | | if (nextProp) { |
21534 | | enqueuePutListener(this, propKey, nextProp, transaction); |
21535 | | } else if (lastProp) { |
21536 | | deleteListener(this, propKey); |
21537 | | } |
21538 | | } else if (isCustomComponent(this._tag, nextProps)) { |
21539 | | if (!RESERVED_PROPS.hasOwnProperty(propKey)) { |
21540 | | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); |
21541 | | } |
21542 | | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { |
21543 | | var node = getNode(this); |
21544 | | // If we're updating to null or undefined, we should remove the property |
21545 | | // from the DOM node instead of inadvertently setting to a string. This |
21546 | | // brings us in line with the same behavior we have on initial render. |
21547 | | if (nextProp != null) { |
21548 | | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); |
21549 | | } else { |
21550 | | DOMPropertyOperations.deleteValueForProperty(node, propKey); |
21551 | | } |
21552 | | } |
21553 | | } |
21554 | | if (styleUpdates) { |
21555 | | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); |
21556 | | } |
21557 | | }, |
21558 | | |
21559 | | /** |
21560 | | * Reconciles the children with the various properties that affect the |
21561 | | * children content. |
21562 | | * |
21563 | | * @param {object} lastProps |
21564 | | * @param {object} nextProps |
21565 | | * @param {ReactReconcileTransaction} transaction |
21566 | | * @param {object} context |
21567 | | */ |
21568 | | _updateDOMChildren: function (lastProps, nextProps, transaction, context) { |
21569 | | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; |
21570 | | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; |
21571 | | |
21572 | | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; |
21573 | | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; |
21574 | | |
21575 | | // Note the use of `!=` which checks for null or undefined. |
21576 | | var lastChildren = lastContent != null ? null : lastProps.children; |
21577 | | var nextChildren = nextContent != null ? null : nextProps.children; |
21578 | | |
21579 | | // If we're switching from children to content/html or vice versa, remove |
21580 | | // the old content |
21581 | | var lastHasContentOrHtml = lastContent != null || lastHtml != null; |
21582 | | var nextHasContentOrHtml = nextContent != null || nextHtml != null; |
21583 | | if (lastChildren != null && nextChildren == null) { |
21584 | | this.updateChildren(null, transaction, context); |
21585 | | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { |
21586 | | this.updateTextContent(''); |
21587 | | if (true) { |
21588 | | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); |
21589 | | } |
21590 | | } |
21591 | | |
21592 | | if (nextContent != null) { |
21593 | | if (lastContent !== nextContent) { |
21594 | | this.updateTextContent('' + nextContent); |
21595 | | if (true) { |
21596 | | setAndValidateContentChildDev.call(this, nextContent); |
21597 | | } |
21598 | | } |
21599 | | } else if (nextHtml != null) { |
21600 | | if (lastHtml !== nextHtml) { |
21601 | | this.updateMarkup('' + nextHtml); |
21602 | | } |
21603 | | if (true) { |
21604 | | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); |
21605 | | } |
21606 | | } else if (nextChildren != null) { |
21607 | | if (true) { |
21608 | | setAndValidateContentChildDev.call(this, null); |
21609 | | } |
21610 | | |
21611 | | this.updateChildren(nextChildren, transaction, context); |
21612 | | } |
21613 | | }, |
21614 | | |
21615 | | getHostNode: function () { |
21616 | | return getNode(this); |
21617 | | }, |
21618 | | |
21619 | | /** |
21620 | | * Destroys all event registrations for this instance. Does not remove from |
21621 | | * the DOM. That must be done by the parent. |
21622 | | * |
21623 | | * @internal |
21624 | | */ |
21625 | | unmountComponent: function (safely) { |
21626 | | switch (this._tag) { |
21627 | | case 'audio': |
21628 | | case 'form': |
21629 | | case 'iframe': |
21630 | | case 'img': |
21631 | | case 'link': |
21632 | | case 'object': |
21633 | | case 'source': |
21634 | | case 'video': |
21635 | | var listeners = this._wrapperState.listeners; |
21636 | | if (listeners) { |
21637 | | for (var i = 0; i < listeners.length; i++) { |
21638 | | listeners[i].remove(); |
21639 | | } |
21640 | | } |
21641 | | break; |
21642 | | case 'input': |
21643 | | case 'textarea': |
21644 | | inputValueTracking.stopTracking(this); |
21645 | | break; |
21646 | | case 'html': |
21647 | | case 'head': |
21648 | | case 'body': |
21649 | | /** |
21650 | | * Components like <html> <head> and <body> can't be removed or added |
21651 | | * easily in a cross-browser way, however it's valuable to be able to |
21652 | | * take advantage of React's reconciliation for styling and <title> |
21653 | | * management. So we just document it and throw in dangerous cases. |
21654 | | */ |
21655 | | true ? true ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; |
21656 | | break; |
21657 | | } |
21658 | | |
21659 | | this.unmountChildren(safely); |
21660 | | ReactDOMComponentTree.uncacheNode(this); |
21661 | | EventPluginHub.deleteAllListeners(this); |
21662 | | this._rootNodeID = 0; |
21663 | | this._domID = 0; |
21664 | | this._wrapperState = null; |
21665 | | |
21666 | | if (true) { |
21667 | | setAndValidateContentChildDev.call(this, null); |
21668 | | } |
21669 | | }, |
21670 | | |
21671 | | getPublicInstance: function () { |
21672 | | return getNode(this); |
21673 | | } |
21674 | | }; |
21675 | | |
21676 | | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); |
21677 | | |
21678 | | module.exports = ReactDOMComponent; |
21679 | | |
21680 | | /***/ }), |
21681 | | /* 430 */ |
21682 | | /***/ (function(module, exports, __webpack_require__) { |
21683 | | |
21684 | | /** |
21685 | | * Copyright (c) 2013-present, Facebook, Inc. |
21686 | | * |
21687 | | * This source code is licensed under the MIT license found in the |
21688 | | * LICENSE file in the root directory of this source tree. |
21689 | | * |
21690 | | */ |
21691 | | |
21692 | | 'use strict'; |
21693 | | |
21694 | | var ReactDOMComponentTree = __webpack_require__(370); |
21695 | | |
21696 | | var focusNode = __webpack_require__(431); |
21697 | | |
21698 | | var AutoFocusUtils = { |
21699 | | focusDOMComponent: function () { |
21700 | | focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); |
21701 | | } |
21702 | | }; |
21703 | | |
21704 | | module.exports = AutoFocusUtils; |
21705 | | |
21706 | | /***/ }), |
21707 | | /* 431 */ |
21708 | | /***/ (function(module, exports) { |
21709 | | |
21710 | | /** |
21711 | | * Copyright (c) 2013-present, Facebook, Inc. |
21712 | | * |
21713 | | * This source code is licensed under the MIT license found in the |
21714 | | * LICENSE file in the root directory of this source tree. |
21715 | | * |
21716 | | */ |
21717 | | |
21718 | | 'use strict'; |
21719 | | |
21720 | | /** |
21721 | | * @param {DOMElement} node input/textarea to focus |
21722 | | */ |
21723 | | |
21724 | | function focusNode(node) { |
21725 | | // IE8 can throw "Can't move focus to the control because it is invisible, |
21726 | | // not enabled, or of a type that does not accept the focus." for all kinds of |
21727 | | // reasons that are too expensive and fragile to test. |
21728 | | try { |
21729 | | node.focus(); |
21730 | | } catch (e) {} |
21731 | | } |
21732 | | |
21733 | | module.exports = focusNode; |
21734 | | |
21735 | | /***/ }), |
21736 | | /* 432 */ |
21737 | | /***/ (function(module, exports, __webpack_require__) { |
21738 | | |
21739 | | /** |
21740 | | * Copyright (c) 2013-present, Facebook, Inc. |
21741 | | * |
21742 | | * This source code is licensed under the MIT license found in the |
21743 | | * LICENSE file in the root directory of this source tree. |
21744 | | * |
21745 | | */ |
21746 | | |
21747 | | 'use strict'; |
21748 | | |
21749 | | var CSSProperty = __webpack_require__(433); |
21750 | | var ExecutionEnvironment = __webpack_require__(384); |
21751 | | var ReactInstrumentation = __webpack_require__(398); |
21752 | | |
21753 | | var camelizeStyleName = __webpack_require__(434); |
21754 | | var dangerousStyleValue = __webpack_require__(436); |
21755 | | var hyphenateStyleName = __webpack_require__(437); |
21756 | | var memoizeStringOnly = __webpack_require__(439); |
21757 | | var warning = __webpack_require__(338); |
21758 | | |
21759 | | var processStyleName = memoizeStringOnly(function (styleName) { |
21760 | | return hyphenateStyleName(styleName); |
21761 | | }); |
21762 | | |
21763 | | var hasShorthandPropertyBug = false; |
21764 | | var styleFloatAccessor = 'cssFloat'; |
21765 | | if (ExecutionEnvironment.canUseDOM) { |
21766 | | var tempStyle = document.createElement('div').style; |
21767 | | try { |
21768 | | // IE8 throws "Invalid argument." if resetting shorthand style properties. |
21769 | | tempStyle.font = ''; |
21770 | | } catch (e) { |
21771 | | hasShorthandPropertyBug = true; |
21772 | | } |
21773 | | // IE8 only supports accessing cssFloat (standard) as styleFloat |
21774 | | if (document.documentElement.style.cssFloat === undefined) { |
21775 | | styleFloatAccessor = 'styleFloat'; |
21776 | | } |
21777 | | } |
21778 | | |
21779 | | if (true) { |
21780 | | // 'msTransform' is correct, but the other prefixes should be capitalized |
21781 | | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; |
21782 | | |
21783 | | // style values shouldn't contain a semicolon |
21784 | | var badStyleValueWithSemicolonPattern = /;\s*$/; |
21785 | | |
21786 | | var warnedStyleNames = {}; |
21787 | | var warnedStyleValues = {}; |
21788 | | var warnedForNaNValue = false; |
21789 | | |
21790 | | var warnHyphenatedStyleName = function (name, owner) { |
21791 | | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { |
21792 | | return; |
21793 | | } |
21794 | | |
21795 | | warnedStyleNames[name] = true; |
21796 | | true ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; |
21797 | | }; |
21798 | | |
21799 | | var warnBadVendoredStyleName = function (name, owner) { |
21800 | | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { |
21801 | | return; |
21802 | | } |
21803 | | |
21804 | | warnedStyleNames[name] = true; |
21805 | | true ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; |
21806 | | }; |
21807 | | |
21808 | | var warnStyleValueWithSemicolon = function (name, value, owner) { |
21809 | | if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { |
21810 | | return; |
21811 | | } |
21812 | | |
21813 | | warnedStyleValues[value] = true; |
21814 | | true ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; |
21815 | | }; |
21816 | | |
21817 | | var warnStyleValueIsNaN = function (name, value, owner) { |
21818 | | if (warnedForNaNValue) { |
21819 | | return; |
21820 | | } |
21821 | | |
21822 | | warnedForNaNValue = true; |
21823 | | true ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; |
21824 | | }; |
21825 | | |
21826 | | var checkRenderMessage = function (owner) { |
21827 | | if (owner) { |
21828 | | var name = owner.getName(); |
21829 | | if (name) { |
21830 | | return ' Check the render method of `' + name + '`.'; |
21831 | | } |
21832 | | } |
21833 | | return ''; |
21834 | | }; |
21835 | | |
21836 | | /** |
21837 | | * @param {string} name |
21838 | | * @param {*} value |
21839 | | * @param {ReactDOMComponent} component |
21840 | | */ |
21841 | | var warnValidStyle = function (name, value, component) { |
21842 | | var owner; |
21843 | | if (component) { |
21844 | | owner = component._currentElement._owner; |
21845 | | } |
21846 | | if (name.indexOf('-') > -1) { |
21847 | | warnHyphenatedStyleName(name, owner); |
21848 | | } else if (badVendoredStyleNamePattern.test(name)) { |
21849 | | warnBadVendoredStyleName(name, owner); |
21850 | | } else if (badStyleValueWithSemicolonPattern.test(value)) { |
21851 | | warnStyleValueWithSemicolon(name, value, owner); |
21852 | | } |
21853 | | |
21854 | | if (typeof value === 'number' && isNaN(value)) { |
21855 | | warnStyleValueIsNaN(name, value, owner); |
21856 | | } |
21857 | | }; |
21858 | | } |
21859 | | |
21860 | | /** |
21861 | | * Operations for dealing with CSS properties. |
21862 | | */ |
21863 | | var CSSPropertyOperations = { |
21864 | | /** |
21865 | | * Serializes a mapping of style properties for use as inline styles: |
21866 | | * |
21867 | | * > createMarkupForStyles({width: '200px', height: 0}) |
21868 | | * "width:200px;height:0;" |
21869 | | * |
21870 | | * Undefined values are ignored so that declarative programming is easier. |
21871 | | * The result should be HTML-escaped before insertion into the DOM. |
21872 | | * |
21873 | | * @param {object} styles |
21874 | | * @param {ReactDOMComponent} component |
21875 | | * @return {?string} |
21876 | | */ |
21877 | | createMarkupForStyles: function (styles, component) { |
21878 | | var serialized = ''; |
21879 | | for (var styleName in styles) { |
21880 | | if (!styles.hasOwnProperty(styleName)) { |
21881 | | continue; |
21882 | | } |
21883 | | var isCustomProperty = styleName.indexOf('--') === 0; |
21884 | | var styleValue = styles[styleName]; |
21885 | | if (true) { |
21886 | | if (!isCustomProperty) { |
21887 | | warnValidStyle(styleName, styleValue, component); |
21888 | | } |
21889 | | } |
21890 | | if (styleValue != null) { |
21891 | | serialized += processStyleName(styleName) + ':'; |
21892 | | serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';'; |
21893 | | } |
21894 | | } |
21895 | | return serialized || null; |
21896 | | }, |
21897 | | |
21898 | | /** |
21899 | | * Sets the value for multiple styles on a node. If a value is specified as |
21900 | | * '' (empty string), the corresponding style property will be unset. |
21901 | | * |
21902 | | * @param {DOMElement} node |
21903 | | * @param {object} styles |
21904 | | * @param {ReactDOMComponent} component |
21905 | | */ |
21906 | | setValueForStyles: function (node, styles, component) { |
21907 | | if (true) { |
21908 | | ReactInstrumentation.debugTool.onHostOperation({ |
21909 | | instanceID: component._debugID, |
21910 | | type: 'update styles', |
21911 | | payload: styles |
21912 | | }); |
21913 | | } |
21914 | | |
21915 | | var style = node.style; |
21916 | | for (var styleName in styles) { |
21917 | | if (!styles.hasOwnProperty(styleName)) { |
21918 | | continue; |
21919 | | } |
21920 | | var isCustomProperty = styleName.indexOf('--') === 0; |
21921 | | if (true) { |
21922 | | if (!isCustomProperty) { |
21923 | | warnValidStyle(styleName, styles[styleName], component); |
21924 | | } |
21925 | | } |
21926 | | var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty); |
21927 | | if (styleName === 'float' || styleName === 'cssFloat') { |
21928 | | styleName = styleFloatAccessor; |
21929 | | } |
21930 | | if (isCustomProperty) { |
21931 | | style.setProperty(styleName, styleValue); |
21932 | | } else if (styleValue) { |
21933 | | style[styleName] = styleValue; |
21934 | | } else { |
21935 | | var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; |
21936 | | if (expansion) { |
21937 | | // Shorthand property that IE8 won't like unsetting, so unset each |
21938 | | // component to placate it |
21939 | | for (var individualStyleName in expansion) { |
21940 | | style[individualStyleName] = ''; |
21941 | | } |
21942 | | } else { |
21943 | | style[styleName] = ''; |
21944 | | } |
21945 | | } |
21946 | | } |
21947 | | } |
21948 | | }; |
21949 | | |
21950 | | module.exports = CSSPropertyOperations; |
21951 | | |
21952 | | /***/ }), |
21953 | | /* 433 */ |
21954 | | /***/ (function(module, exports) { |
21955 | | |
21956 | | /** |
21957 | | * Copyright (c) 2013-present, Facebook, Inc. |
21958 | | * |
21959 | | * This source code is licensed under the MIT license found in the |
21960 | | * LICENSE file in the root directory of this source tree. |
21961 | | * |
21962 | | */ |
21963 | | |
21964 | | 'use strict'; |
21965 | | |
21966 | | /** |
21967 | | * CSS properties which accept numbers but are not in units of "px". |
21968 | | */ |
21969 | | |
21970 | | var isUnitlessNumber = { |
21971 | | animationIterationCount: true, |
21972 | | borderImageOutset: true, |
21973 | | borderImageSlice: true, |
21974 | | borderImageWidth: true, |
21975 | | boxFlex: true, |
21976 | | boxFlexGroup: true, |
21977 | | boxOrdinalGroup: true, |
21978 | | columnCount: true, |
21979 | | columns: true, |
21980 | | flex: true, |
21981 | | flexGrow: true, |
21982 | | flexPositive: true, |
21983 | | flexShrink: true, |
21984 | | flexNegative: true, |
21985 | | flexOrder: true, |
21986 | | gridRow: true, |
21987 | | gridRowEnd: true, |
21988 | | gridRowSpan: true, |
21989 | | gridRowStart: true, |
21990 | | gridColumn: true, |
21991 | | gridColumnEnd: true, |
21992 | | gridColumnSpan: true, |
21993 | | gridColumnStart: true, |
21994 | | fontWeight: true, |
21995 | | lineClamp: true, |
21996 | | lineHeight: true, |
21997 | | opacity: true, |
21998 | | order: true, |
21999 | | orphans: true, |
22000 | | tabSize: true, |
22001 | | widows: true, |
22002 | | zIndex: true, |
22003 | | zoom: true, |
22004 | | |
22005 | | // SVG-related properties |
22006 | | fillOpacity: true, |
22007 | | floodOpacity: true, |
22008 | | stopOpacity: true, |
22009 | | strokeDasharray: true, |
22010 | | strokeDashoffset: true, |
22011 | | strokeMiterlimit: true, |
22012 | | strokeOpacity: true, |
22013 | | strokeWidth: true |
22014 | | }; |
22015 | | |
22016 | | /** |
22017 | | * @param {string} prefix vendor-specific prefix, eg: Webkit |
22018 | | * @param {string} key style name, eg: transitionDuration |
22019 | | * @return {string} style name prefixed with `prefix`, properly camelCased, eg: |
22020 | | * WebkitTransitionDuration |
22021 | | */ |
22022 | | function prefixKey(prefix, key) { |
22023 | | return prefix + key.charAt(0).toUpperCase() + key.substring(1); |
22024 | | } |
22025 | | |
22026 | | /** |
22027 | | * Support style names that may come passed in prefixed by adding permutations |
22028 | | * of vendor prefixes. |
22029 | | */ |
22030 | | var prefixes = ['Webkit', 'ms', 'Moz', 'O']; |
22031 | | |
22032 | | // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an |
22033 | | // infinite loop, because it iterates over the newly added props too. |
22034 | | Object.keys(isUnitlessNumber).forEach(function (prop) { |
22035 | | prefixes.forEach(function (prefix) { |
22036 | | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; |
22037 | | }); |
22038 | | }); |
22039 | | |
22040 | | /** |
22041 | | * Most style properties can be unset by doing .style[prop] = '' but IE8 |
22042 | | * doesn't like doing that with shorthand properties so for the properties that |
22043 | | * IE8 breaks on, which are listed here, we instead unset each of the |
22044 | | * individual properties. See http://bugs.jquery.com/ticket/12385. |
22045 | | * The 4-value 'clock' properties like margin, padding, border-width seem to |
22046 | | * behave without any problems. Curiously, list-style works too without any |
22047 | | * special prodding. |
22048 | | */ |
22049 | | var shorthandPropertyExpansions = { |
22050 | | background: { |
22051 | | backgroundAttachment: true, |
22052 | | backgroundColor: true, |
22053 | | backgroundImage: true, |
22054 | | backgroundPositionX: true, |
22055 | | backgroundPositionY: true, |
22056 | | backgroundRepeat: true |
22057 | | }, |
22058 | | backgroundPosition: { |
22059 | | backgroundPositionX: true, |
22060 | | backgroundPositionY: true |
22061 | | }, |
22062 | | border: { |
22063 | | borderWidth: true, |
22064 | | borderStyle: true, |
22065 | | borderColor: true |
22066 | | }, |
22067 | | borderBottom: { |
22068 | | borderBottomWidth: true, |
22069 | | borderBottomStyle: true, |
22070 | | borderBottomColor: true |
22071 | | }, |
22072 | | borderLeft: { |
22073 | | borderLeftWidth: true, |
22074 | | borderLeftStyle: true, |
22075 | | borderLeftColor: true |
22076 | | }, |
22077 | | borderRight: { |
22078 | | borderRightWidth: true, |
22079 | | borderRightStyle: true, |
22080 | | borderRightColor: true |
22081 | | }, |
22082 | | borderTop: { |
22083 | | borderTopWidth: true, |
22084 | | borderTopStyle: true, |
22085 | | borderTopColor: true |
22086 | | }, |
22087 | | font: { |
22088 | | fontStyle: true, |
22089 | | fontVariant: true, |
22090 | | fontWeight: true, |
22091 | | fontSize: true, |
22092 | | lineHeight: true, |
22093 | | fontFamily: true |
22094 | | }, |
22095 | | outline: { |
22096 | | outlineWidth: true, |
22097 | | outlineStyle: true, |
22098 | | outlineColor: true |
22099 | | } |
22100 | | }; |
22101 | | |
22102 | | var CSSProperty = { |
22103 | | isUnitlessNumber: isUnitlessNumber, |
22104 | | shorthandPropertyExpansions: shorthandPropertyExpansions |
22105 | | }; |
22106 | | |
22107 | | module.exports = CSSProperty; |
22108 | | |
22109 | | /***/ }), |
22110 | | /* 434 */ |
22111 | | /***/ (function(module, exports, __webpack_require__) { |
22112 | | |
22113 | | /** |
22114 | | * Copyright (c) 2013-present, Facebook, Inc. |
22115 | | * |
22116 | | * This source code is licensed under the MIT license found in the |
22117 | | * LICENSE file in the root directory of this source tree. |
22118 | | * |
22119 | | * @typechecks |
22120 | | */ |
22121 | | |
22122 | | 'use strict'; |
22123 | | |
22124 | | var camelize = __webpack_require__(435); |
22125 | | |
22126 | | var msPattern = /^-ms-/; |
22127 | | |
22128 | | /** |
22129 | | * Camelcases a hyphenated CSS property name, for example: |
22130 | | * |
22131 | | * > camelizeStyleName('background-color') |
22132 | | * < "backgroundColor" |
22133 | | * > camelizeStyleName('-moz-transition') |
22134 | | * < "MozTransition" |
22135 | | * > camelizeStyleName('-ms-transition') |
22136 | | * < "msTransition" |
22137 | | * |
22138 | | * As Andi Smith suggests |
22139 | | * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix |
22140 | | * is converted to lowercase `ms`. |
22141 | | * |
22142 | | * @param {string} string |
22143 | | * @return {string} |
22144 | | */ |
22145 | | function camelizeStyleName(string) { |
22146 | | return camelize(string.replace(msPattern, 'ms-')); |
22147 | | } |
22148 | | |
22149 | | module.exports = camelizeStyleName; |
22150 | | |
22151 | | /***/ }), |
22152 | | /* 435 */ |
22153 | | /***/ (function(module, exports) { |
22154 | | |
22155 | | "use strict"; |
22156 | | |
22157 | | /** |
22158 | | * Copyright (c) 2013-present, Facebook, Inc. |
22159 | | * |
22160 | | * This source code is licensed under the MIT license found in the |
22161 | | * LICENSE file in the root directory of this source tree. |
22162 | | * |
22163 | | * @typechecks |
22164 | | */ |
22165 | | |
22166 | | var _hyphenPattern = /-(.)/g; |
22167 | | |
22168 | | /** |
22169 | | * Camelcases a hyphenated string, for example: |
22170 | | * |
22171 | | * > camelize('background-color') |
22172 | | * < "backgroundColor" |
22173 | | * |
22174 | | * @param {string} string |
22175 | | * @return {string} |
22176 | | */ |
22177 | | function camelize(string) { |
22178 | | return string.replace(_hyphenPattern, function (_, character) { |
22179 | | return character.toUpperCase(); |
22180 | | }); |
22181 | | } |
22182 | | |
22183 | | module.exports = camelize; |
22184 | | |
22185 | | /***/ }), |
22186 | | /* 436 */ |
22187 | | /***/ (function(module, exports, __webpack_require__) { |
22188 | | |
22189 | | /** |
22190 | | * Copyright (c) 2013-present, Facebook, Inc. |
22191 | | * |
22192 | | * This source code is licensed under the MIT license found in the |
22193 | | * LICENSE file in the root directory of this source tree. |
22194 | | * |
22195 | | */ |
22196 | | |
22197 | | 'use strict'; |
22198 | | |
22199 | | var CSSProperty = __webpack_require__(433); |
22200 | | var warning = __webpack_require__(338); |
22201 | | |
22202 | | var isUnitlessNumber = CSSProperty.isUnitlessNumber; |
22203 | | var styleWarnings = {}; |
22204 | | |
22205 | | /** |
22206 | | * Convert a value into the proper css writable value. The style name `name` |
22207 | | * should be logical (no hyphens), as specified |
22208 | | * in `CSSProperty.isUnitlessNumber`. |
22209 | | * |
22210 | | * @param {string} name CSS property name such as `topMargin`. |
22211 | | * @param {*} value CSS property value such as `10px`. |
22212 | | * @param {ReactDOMComponent} component |
22213 | | * @return {string} Normalized style value with dimensions applied. |
22214 | | */ |
22215 | | function dangerousStyleValue(name, value, component, isCustomProperty) { |
22216 | | // Note that we've removed escapeTextForBrowser() calls here since the |
22217 | | // whole string will be escaped when the attribute is injected into |
22218 | | // the markup. If you provide unsafe user data here they can inject |
22219 | | // arbitrary CSS which may be problematic (I couldn't repro this): |
22220 | | // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet |
22221 | | // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ |
22222 | | // This is not an XSS hole but instead a potential CSS injection issue |
22223 | | // which has lead to a greater discussion about how we're going to |
22224 | | // trust URLs moving forward. See #2115901 |
22225 | | |
22226 | | var isEmpty = value == null || typeof value === 'boolean' || value === ''; |
22227 | | if (isEmpty) { |
22228 | | return ''; |
22229 | | } |
22230 | | |
22231 | | var isNonNumeric = isNaN(value); |
22232 | | if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { |
22233 | | return '' + value; // cast to string |
22234 | | } |
22235 | | |
22236 | | if (typeof value === 'string') { |
22237 | | if (true) { |
22238 | | // Allow '0' to pass through without warning. 0 is already special and |
22239 | | // doesn't require units, so we don't need to warn about it. |
22240 | | if (component && value !== '0') { |
22241 | | var owner = component._currentElement._owner; |
22242 | | var ownerName = owner ? owner.getName() : null; |
22243 | | if (ownerName && !styleWarnings[ownerName]) { |
22244 | | styleWarnings[ownerName] = {}; |
22245 | | } |
22246 | | var warned = false; |
22247 | | if (ownerName) { |
22248 | | var warnings = styleWarnings[ownerName]; |
22249 | | warned = warnings[name]; |
22250 | | if (!warned) { |
22251 | | warnings[name] = true; |
22252 | | } |
22253 | | } |
22254 | | if (!warned) { |
22255 | | true ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; |
22256 | | } |
22257 | | } |
22258 | | } |
22259 | | value = value.trim(); |
22260 | | } |
22261 | | return value + 'px'; |
22262 | | } |
22263 | | |
22264 | | module.exports = dangerousStyleValue; |
22265 | | |
22266 | | /***/ }), |
22267 | | /* 437 */ |
22268 | | /***/ (function(module, exports, __webpack_require__) { |
22269 | | |
22270 | | /** |
22271 | | * Copyright (c) 2013-present, Facebook, Inc. |
22272 | | * |
22273 | | * This source code is licensed under the MIT license found in the |
22274 | | * LICENSE file in the root directory of this source tree. |
22275 | | * |
22276 | | * @typechecks |
22277 | | */ |
22278 | | |
22279 | | 'use strict'; |
22280 | | |
22281 | | var hyphenate = __webpack_require__(438); |
22282 | | |
22283 | | var msPattern = /^ms-/; |
22284 | | |
22285 | | /** |
22286 | | * Hyphenates a camelcased CSS property name, for example: |
22287 | | * |
22288 | | * > hyphenateStyleName('backgroundColor') |
22289 | | * < "background-color" |
22290 | | * > hyphenateStyleName('MozTransition') |
22291 | | * < "-moz-transition" |
22292 | | * > hyphenateStyleName('msTransition') |
22293 | | * < "-ms-transition" |
22294 | | * |
22295 | | * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix |
22296 | | * is converted to `-ms-`. |
22297 | | * |
22298 | | * @param {string} string |
22299 | | * @return {string} |
22300 | | */ |
22301 | | function hyphenateStyleName(string) { |
22302 | | return hyphenate(string).replace(msPattern, '-ms-'); |
22303 | | } |
22304 | | |
22305 | | module.exports = hyphenateStyleName; |
22306 | | |
22307 | | /***/ }), |
22308 | | /* 438 */ |
22309 | | /***/ (function(module, exports) { |
22310 | | |
22311 | | 'use strict'; |
22312 | | |
22313 | | /** |
22314 | | * Copyright (c) 2013-present, Facebook, Inc. |
22315 | | * |
22316 | | * This source code is licensed under the MIT license found in the |
22317 | | * LICENSE file in the root directory of this source tree. |
22318 | | * |
22319 | | * @typechecks |
22320 | | */ |
22321 | | |
22322 | | var _uppercasePattern = /([A-Z])/g; |
22323 | | |
22324 | | /** |
22325 | | * Hyphenates a camelcased string, for example: |
22326 | | * |
22327 | | * > hyphenate('backgroundColor') |
22328 | | * < "background-color" |
22329 | | * |
22330 | | * For CSS style names, use `hyphenateStyleName` instead which works properly |
22331 | | * with all vendor prefixes, including `ms`. |
22332 | | * |
22333 | | * @param {string} string |
22334 | | * @return {string} |
22335 | | */ |
22336 | | function hyphenate(string) { |
22337 | | return string.replace(_uppercasePattern, '-$1').toLowerCase(); |
22338 | | } |
22339 | | |
22340 | | module.exports = hyphenate; |
22341 | | |
22342 | | /***/ }), |
22343 | | /* 439 */ |
22344 | | /***/ (function(module, exports) { |
22345 | | |
22346 | | /** |
22347 | | * Copyright (c) 2013-present, Facebook, Inc. |
22348 | | * |
22349 | | * This source code is licensed under the MIT license found in the |
22350 | | * LICENSE file in the root directory of this source tree. |
22351 | | * |
22352 | | * |
22353 | | * @typechecks static-only |
22354 | | */ |
22355 | | |
22356 | | 'use strict'; |
22357 | | |
22358 | | /** |
22359 | | * Memoizes the return value of a function that accepts one string argument. |
22360 | | */ |
22361 | | |
22362 | | function memoizeStringOnly(callback) { |
22363 | | var cache = {}; |
22364 | | return function (string) { |
22365 | | if (!cache.hasOwnProperty(string)) { |
22366 | | cache[string] = callback.call(this, string); |
22367 | | } |
22368 | | return cache[string]; |
22369 | | }; |
22370 | | } |
22371 | | |
22372 | | module.exports = memoizeStringOnly; |
22373 | | |
22374 | | /***/ }), |
22375 | | /* 440 */ |
22376 | | /***/ (function(module, exports, __webpack_require__) { |
22377 | | |
22378 | | /** |
22379 | | * Copyright (c) 2013-present, Facebook, Inc. |
22380 | | * |
22381 | | * This source code is licensed under the MIT license found in the |
22382 | | * LICENSE file in the root directory of this source tree. |
22383 | | * |
22384 | | */ |
22385 | | |
22386 | | 'use strict'; |
22387 | | |
22388 | | var DOMProperty = __webpack_require__(372); |
22389 | | var ReactDOMComponentTree = __webpack_require__(370); |
22390 | | var ReactInstrumentation = __webpack_require__(398); |
22391 | | |
22392 | | var quoteAttributeValueForBrowser = __webpack_require__(441); |
22393 | | var warning = __webpack_require__(338); |
22394 | | |
22395 | | var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); |
22396 | | var illegalAttributeNameCache = {}; |
22397 | | var validatedAttributeNameCache = {}; |
22398 | | |
22399 | | function isAttributeNameSafe(attributeName) { |
22400 | | if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { |
22401 | | return true; |
22402 | | } |
22403 | | if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { |
22404 | | return false; |
22405 | | } |
22406 | | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { |
22407 | | validatedAttributeNameCache[attributeName] = true; |
22408 | | return true; |
22409 | | } |
22410 | | illegalAttributeNameCache[attributeName] = true; |
22411 | | true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; |
22412 | | return false; |
22413 | | } |
22414 | | |
22415 | | function shouldIgnoreValue(propertyInfo, value) { |
22416 | | return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; |
22417 | | } |
22418 | | |
22419 | | /** |
22420 | | * Operations for dealing with DOM properties. |
22421 | | */ |
22422 | | var DOMPropertyOperations = { |
22423 | | /** |
22424 | | * Creates markup for the ID property. |
22425 | | * |
22426 | | * @param {string} id Unescaped ID. |
22427 | | * @return {string} Markup string. |
22428 | | */ |
22429 | | createMarkupForID: function (id) { |
22430 | | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); |
22431 | | }, |
22432 | | |
22433 | | setAttributeForID: function (node, id) { |
22434 | | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); |
22435 | | }, |
22436 | | |
22437 | | createMarkupForRoot: function () { |
22438 | | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; |
22439 | | }, |
22440 | | |
22441 | | setAttributeForRoot: function (node) { |
22442 | | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); |
22443 | | }, |
22444 | | |
22445 | | /** |
22446 | | * Creates markup for a property. |
22447 | | * |
22448 | | * @param {string} name |
22449 | | * @param {*} value |
22450 | | * @return {?string} Markup string, or null if the property was invalid. |
22451 | | */ |
22452 | | createMarkupForProperty: function (name, value) { |
22453 | | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; |
22454 | | if (propertyInfo) { |
22455 | | if (shouldIgnoreValue(propertyInfo, value)) { |
22456 | | return ''; |
22457 | | } |
22458 | | var attributeName = propertyInfo.attributeName; |
22459 | | if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { |
22460 | | return attributeName + '=""'; |
22461 | | } |
22462 | | return attributeName + '=' + quoteAttributeValueForBrowser(value); |
22463 | | } else if (DOMProperty.isCustomAttribute(name)) { |
22464 | | if (value == null) { |
22465 | | return ''; |
22466 | | } |
22467 | | return name + '=' + quoteAttributeValueForBrowser(value); |
22468 | | } |
22469 | | return null; |
22470 | | }, |
22471 | | |
22472 | | /** |
22473 | | * Creates markup for a custom property. |
22474 | | * |
22475 | | * @param {string} name |
22476 | | * @param {*} value |
22477 | | * @return {string} Markup string, or empty string if the property was invalid. |
22478 | | */ |
22479 | | createMarkupForCustomAttribute: function (name, value) { |
22480 | | if (!isAttributeNameSafe(name) || value == null) { |
22481 | | return ''; |
22482 | | } |
22483 | | return name + '=' + quoteAttributeValueForBrowser(value); |
22484 | | }, |
22485 | | |
22486 | | /** |
22487 | | * Sets the value for a property on a node. |
22488 | | * |
22489 | | * @param {DOMElement} node |
22490 | | * @param {string} name |
22491 | | * @param {*} value |
22492 | | */ |
22493 | | setValueForProperty: function (node, name, value) { |
22494 | | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; |
22495 | | if (propertyInfo) { |
22496 | | var mutationMethod = propertyInfo.mutationMethod; |
22497 | | if (mutationMethod) { |
22498 | | mutationMethod(node, value); |
22499 | | } else if (shouldIgnoreValue(propertyInfo, value)) { |
22500 | | this.deleteValueForProperty(node, name); |
22501 | | return; |
22502 | | } else if (propertyInfo.mustUseProperty) { |
22503 | | // Contrary to `setAttribute`, object properties are properly |
22504 | | // `toString`ed by IE8/9. |
22505 | | node[propertyInfo.propertyName] = value; |
22506 | | } else { |
22507 | | var attributeName = propertyInfo.attributeName; |
22508 | | var namespace = propertyInfo.attributeNamespace; |
22509 | | // `setAttribute` with objects becomes only `[object]` in IE8/9, |
22510 | | // ('' + value) makes it output the correct toString()-value. |
22511 | | if (namespace) { |
22512 | | node.setAttributeNS(namespace, attributeName, '' + value); |
22513 | | } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { |
22514 | | node.setAttribute(attributeName, ''); |
22515 | | } else { |
22516 | | node.setAttribute(attributeName, '' + value); |
22517 | | } |
22518 | | } |
22519 | | } else if (DOMProperty.isCustomAttribute(name)) { |
22520 | | DOMPropertyOperations.setValueForAttribute(node, name, value); |
22521 | | return; |
22522 | | } |
22523 | | |
22524 | | if (true) { |
22525 | | var payload = {}; |
22526 | | payload[name] = value; |
22527 | | ReactInstrumentation.debugTool.onHostOperation({ |
22528 | | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, |
22529 | | type: 'update attribute', |
22530 | | payload: payload |
22531 | | }); |
22532 | | } |
22533 | | }, |
22534 | | |
22535 | | setValueForAttribute: function (node, name, value) { |
22536 | | if (!isAttributeNameSafe(name)) { |
22537 | | return; |
22538 | | } |
22539 | | if (value == null) { |
22540 | | node.removeAttribute(name); |
22541 | | } else { |
22542 | | node.setAttribute(name, '' + value); |
22543 | | } |
22544 | | |
22545 | | if (true) { |
22546 | | var payload = {}; |
22547 | | payload[name] = value; |
22548 | | ReactInstrumentation.debugTool.onHostOperation({ |
22549 | | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, |
22550 | | type: 'update attribute', |
22551 | | payload: payload |
22552 | | }); |
22553 | | } |
22554 | | }, |
22555 | | |
22556 | | /** |
22557 | | * Deletes an attributes from a node. |
22558 | | * |
22559 | | * @param {DOMElement} node |
22560 | | * @param {string} name |
22561 | | */ |
22562 | | deleteValueForAttribute: function (node, name) { |
22563 | | node.removeAttribute(name); |
22564 | | if (true) { |
22565 | | ReactInstrumentation.debugTool.onHostOperation({ |
22566 | | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, |
22567 | | type: 'remove attribute', |
22568 | | payload: name |
22569 | | }); |
22570 | | } |
22571 | | }, |
22572 | | |
22573 | | /** |
22574 | | * Deletes the value for a property on a node. |
22575 | | * |
22576 | | * @param {DOMElement} node |
22577 | | * @param {string} name |
22578 | | */ |
22579 | | deleteValueForProperty: function (node, name) { |
22580 | | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; |
22581 | | if (propertyInfo) { |
22582 | | var mutationMethod = propertyInfo.mutationMethod; |
22583 | | if (mutationMethod) { |
22584 | | mutationMethod(node, undefined); |
22585 | | } else if (propertyInfo.mustUseProperty) { |
22586 | | var propName = propertyInfo.propertyName; |
22587 | | if (propertyInfo.hasBooleanValue) { |
22588 | | node[propName] = false; |
22589 | | } else { |
22590 | | node[propName] = ''; |
22591 | | } |
22592 | | } else { |
22593 | | node.removeAttribute(propertyInfo.attributeName); |
22594 | | } |
22595 | | } else if (DOMProperty.isCustomAttribute(name)) { |
22596 | | node.removeAttribute(name); |
22597 | | } |
22598 | | |
22599 | | if (true) { |
22600 | | ReactInstrumentation.debugTool.onHostOperation({ |
22601 | | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, |
22602 | | type: 'remove attribute', |
22603 | | payload: name |
22604 | | }); |
22605 | | } |
22606 | | } |
22607 | | }; |
22608 | | |
22609 | | module.exports = DOMPropertyOperations; |
22610 | | |
22611 | | /***/ }), |
22612 | | /* 441 */ |
22613 | | /***/ (function(module, exports, __webpack_require__) { |
22614 | | |
22615 | | /** |
22616 | | * Copyright (c) 2013-present, Facebook, Inc. |
22617 | | * |
22618 | | * This source code is licensed under the MIT license found in the |
22619 | | * LICENSE file in the root directory of this source tree. |
22620 | | * |
22621 | | */ |
22622 | | |
22623 | | 'use strict'; |
22624 | | |
22625 | | var escapeTextContentForBrowser = __webpack_require__(423); |
22626 | | |
22627 | | /** |
22628 | | * Escapes attribute value to prevent scripting attacks. |
22629 | | * |
22630 | | * @param {*} value Value to escape. |
22631 | | * @return {string} An escaped string. |
22632 | | */ |
22633 | | function quoteAttributeValueForBrowser(value) { |
22634 | | return '"' + escapeTextContentForBrowser(value) + '"'; |
22635 | | } |
22636 | | |
22637 | | module.exports = quoteAttributeValueForBrowser; |
22638 | | |
22639 | | /***/ }), |
22640 | | /* 442 */ |
22641 | | /***/ (function(module, exports, __webpack_require__) { |
22642 | | |
22643 | | /** |
22644 | | * Copyright (c) 2013-present, Facebook, Inc. |
22645 | | * |
22646 | | * This source code is licensed under the MIT license found in the |
22647 | | * LICENSE file in the root directory of this source tree. |
22648 | | * |
22649 | | */ |
22650 | | |
22651 | | 'use strict'; |
22652 | | |
22653 | | var _assign = __webpack_require__(334); |
22654 | | |
22655 | | var EventPluginRegistry = __webpack_require__(379); |
22656 | | var ReactEventEmitterMixin = __webpack_require__(443); |
22657 | | var ViewportMetrics = __webpack_require__(413); |
22658 | | |
22659 | | var getVendorPrefixedEventName = __webpack_require__(444); |
22660 | | var isEventSupported = __webpack_require__(407); |
22661 | | |
22662 | | /** |
22663 | | * Summary of `ReactBrowserEventEmitter` event handling: |
22664 | | * |
22665 | | * - Top-level delegation is used to trap most native browser events. This |
22666 | | * may only occur in the main thread and is the responsibility of |
22667 | | * ReactEventListener, which is injected and can therefore support pluggable |
22668 | | * event sources. This is the only work that occurs in the main thread. |
22669 | | * |
22670 | | * - We normalize and de-duplicate events to account for browser quirks. This |
22671 | | * may be done in the worker thread. |
22672 | | * |
22673 | | * - Forward these native events (with the associated top-level type used to |
22674 | | * trap it) to `EventPluginHub`, which in turn will ask plugins if they want |
22675 | | * to extract any synthetic events. |
22676 | | * |
22677 | | * - The `EventPluginHub` will then process each event by annotating them with |
22678 | | * "dispatches", a sequence of listeners and IDs that care about that event. |
22679 | | * |
22680 | | * - The `EventPluginHub` then dispatches the events. |
22681 | | * |
22682 | | * Overview of React and the event system: |
22683 | | * |
22684 | | * +------------+ . |
22685 | | * | DOM | . |
22686 | | * +------------+ . |
22687 | | * | . |
22688 | | * v . |
22689 | | * +------------+ . |
22690 | | * | ReactEvent | . |
22691 | | * | Listener | . |
22692 | | * +------------+ . +-----------+ |
22693 | | * | . +--------+|SimpleEvent| |
22694 | | * | . | |Plugin | |
22695 | | * +-----|------+ . v +-----------+ |
22696 | | * | | | . +--------------+ +------------+ |
22697 | | * | +-----------.--->|EventPluginHub| | Event | |
22698 | | * | | . | | +-----------+ | Propagators| |
22699 | | * | ReactEvent | . | | |TapEvent | |------------| |
22700 | | * | Emitter | . | |<---+|Plugin | |other plugin| |
22701 | | * | | . | | +-----------+ | utilities | |
22702 | | * | +-----------.--->| | +------------+ |
22703 | | * | | | . +--------------+ |
22704 | | * +-----|------+ . ^ +-----------+ |
22705 | | * | . | |Enter/Leave| |
22706 | | * + . +-------+|Plugin | |
22707 | | * +-------------+ . +-----------+ |
22708 | | * | application | . |
22709 | | * |-------------| . |
22710 | | * | | . |
22711 | | * | | . |
22712 | | * +-------------+ . |
22713 | | * . |
22714 | | * React Core . General Purpose Event Plugin System |
22715 | | */ |
22716 | | |
22717 | | var hasEventPageXY; |
22718 | | var alreadyListeningTo = {}; |
22719 | | var isMonitoringScrollValue = false; |
22720 | | var reactTopListenersCounter = 0; |
22721 | | |
22722 | | // For events like 'submit' which don't consistently bubble (which we trap at a |
22723 | | // lower node than `document`), binding at `document` would cause duplicate |
22724 | | // events so we don't include them here |
22725 | | var topEventMapping = { |
22726 | | topAbort: 'abort', |
22727 | | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', |
22728 | | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', |
22729 | | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', |
22730 | | topBlur: 'blur', |
22731 | | topCanPlay: 'canplay', |
22732 | | topCanPlayThrough: 'canplaythrough', |
22733 | | topChange: 'change', |
22734 | | topClick: 'click', |
22735 | | topCompositionEnd: 'compositionend', |
22736 | | topCompositionStart: 'compositionstart', |
22737 | | topCompositionUpdate: 'compositionupdate', |
22738 | | topContextMenu: 'contextmenu', |
22739 | | topCopy: 'copy', |
22740 | | topCut: 'cut', |
22741 | | topDoubleClick: 'dblclick', |
22742 | | topDrag: 'drag', |
22743 | | topDragEnd: 'dragend', |
22744 | | topDragEnter: 'dragenter', |
22745 | | topDragExit: 'dragexit', |
22746 | | topDragLeave: 'dragleave', |
22747 | | topDragOver: 'dragover', |
22748 | | topDragStart: 'dragstart', |
22749 | | topDrop: 'drop', |
22750 | | topDurationChange: 'durationchange', |
22751 | | topEmptied: 'emptied', |
22752 | | topEncrypted: 'encrypted', |
22753 | | topEnded: 'ended', |
22754 | | topError: 'error', |
22755 | | topFocus: 'focus', |
22756 | | topInput: 'input', |
22757 | | topKeyDown: 'keydown', |
22758 | | topKeyPress: 'keypress', |
22759 | | topKeyUp: 'keyup', |
22760 | | topLoadedData: 'loadeddata', |
22761 | | topLoadedMetadata: 'loadedmetadata', |
22762 | | topLoadStart: 'loadstart', |
22763 | | topMouseDown: 'mousedown', |
22764 | | topMouseMove: 'mousemove', |
22765 | | topMouseOut: 'mouseout', |
22766 | | topMouseOver: 'mouseover', |
22767 | | topMouseUp: 'mouseup', |
22768 | | topPaste: 'paste', |
22769 | | topPause: 'pause', |
22770 | | topPlay: 'play', |
22771 | | topPlaying: 'playing', |
22772 | | topProgress: 'progress', |
22773 | | topRateChange: 'ratechange', |
22774 | | topScroll: 'scroll', |
22775 | | topSeeked: 'seeked', |
22776 | | topSeeking: 'seeking', |
22777 | | topSelectionChange: 'selectionchange', |
22778 | | topStalled: 'stalled', |
22779 | | topSuspend: 'suspend', |
22780 | | topTextInput: 'textInput', |
22781 | | topTimeUpdate: 'timeupdate', |
22782 | | topTouchCancel: 'touchcancel', |
22783 | | topTouchEnd: 'touchend', |
22784 | | topTouchMove: 'touchmove', |
22785 | | topTouchStart: 'touchstart', |
22786 | | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', |
22787 | | topVolumeChange: 'volumechange', |
22788 | | topWaiting: 'waiting', |
22789 | | topWheel: 'wheel' |
22790 | | }; |
22791 | | |
22792 | | /** |
22793 | | * To ensure no conflicts with other potential React instances on the page |
22794 | | */ |
22795 | | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); |
22796 | | |
22797 | | function getListeningForDocument(mountAt) { |
22798 | | // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` |
22799 | | // directly. |
22800 | | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { |
22801 | | mountAt[topListenersIDKey] = reactTopListenersCounter++; |
22802 | | alreadyListeningTo[mountAt[topListenersIDKey]] = {}; |
22803 | | } |
22804 | | return alreadyListeningTo[mountAt[topListenersIDKey]]; |
22805 | | } |
22806 | | |
22807 | | /** |
22808 | | * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For |
22809 | | * example: |
22810 | | * |
22811 | | * EventPluginHub.putListener('myID', 'onClick', myFunction); |
22812 | | * |
22813 | | * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. |
22814 | | * |
22815 | | * @internal |
22816 | | */ |
22817 | | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { |
22818 | | /** |
22819 | | * Injectable event backend |
22820 | | */ |
22821 | | ReactEventListener: null, |
22822 | | |
22823 | | injection: { |
22824 | | /** |
22825 | | * @param {object} ReactEventListener |
22826 | | */ |
22827 | | injectReactEventListener: function (ReactEventListener) { |
22828 | | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); |
22829 | | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; |
22830 | | } |
22831 | | }, |
22832 | | |
22833 | | /** |
22834 | | * Sets whether or not any created callbacks should be enabled. |
22835 | | * |
22836 | | * @param {boolean} enabled True if callbacks should be enabled. |
22837 | | */ |
22838 | | setEnabled: function (enabled) { |
22839 | | if (ReactBrowserEventEmitter.ReactEventListener) { |
22840 | | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); |
22841 | | } |
22842 | | }, |
22843 | | |
22844 | | /** |
22845 | | * @return {boolean} True if callbacks are enabled. |
22846 | | */ |
22847 | | isEnabled: function () { |
22848 | | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); |
22849 | | }, |
22850 | | |
22851 | | /** |
22852 | | * We listen for bubbled touch events on the document object. |
22853 | | * |
22854 | | * Firefox v8.01 (and possibly others) exhibited strange behavior when |
22855 | | * mounting `onmousemove` events at some node that was not the document |
22856 | | * element. The symptoms were that if your mouse is not moving over something |
22857 | | * contained within that mount point (for example on the background) the |
22858 | | * top-level listeners for `onmousemove` won't be called. However, if you |
22859 | | * register the `mousemove` on the document object, then it will of course |
22860 | | * catch all `mousemove`s. This along with iOS quirks, justifies restricting |
22861 | | * top-level listeners to the document object only, at least for these |
22862 | | * movement types of events and possibly all events. |
22863 | | * |
22864 | | * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html |
22865 | | * |
22866 | | * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but |
22867 | | * they bubble to document. |
22868 | | * |
22869 | | * @param {string} registrationName Name of listener (e.g. `onClick`). |
22870 | | * @param {object} contentDocumentHandle Document which owns the container |
22871 | | */ |
22872 | | listenTo: function (registrationName, contentDocumentHandle) { |
22873 | | var mountAt = contentDocumentHandle; |
22874 | | var isListening = getListeningForDocument(mountAt); |
22875 | | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; |
22876 | | |
22877 | | for (var i = 0; i < dependencies.length; i++) { |
22878 | | var dependency = dependencies[i]; |
22879 | | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { |
22880 | | if (dependency === 'topWheel') { |
22881 | | if (isEventSupported('wheel')) { |
22882 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); |
22883 | | } else if (isEventSupported('mousewheel')) { |
22884 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); |
22885 | | } else { |
22886 | | // Firefox needs to capture a different mouse scroll event. |
22887 | | // @see http://www.quirksmode.org/dom/events/tests/scroll.html |
22888 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); |
22889 | | } |
22890 | | } else if (dependency === 'topScroll') { |
22891 | | if (isEventSupported('scroll', true)) { |
22892 | | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); |
22893 | | } else { |
22894 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); |
22895 | | } |
22896 | | } else if (dependency === 'topFocus' || dependency === 'topBlur') { |
22897 | | if (isEventSupported('focus', true)) { |
22898 | | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); |
22899 | | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); |
22900 | | } else if (isEventSupported('focusin')) { |
22901 | | // IE has `focusin` and `focusout` events which bubble. |
22902 | | // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html |
22903 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); |
22904 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); |
22905 | | } |
22906 | | |
22907 | | // to make sure blur and focus event listeners are only attached once |
22908 | | isListening.topBlur = true; |
22909 | | isListening.topFocus = true; |
22910 | | } else if (topEventMapping.hasOwnProperty(dependency)) { |
22911 | | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); |
22912 | | } |
22913 | | |
22914 | | isListening[dependency] = true; |
22915 | | } |
22916 | | } |
22917 | | }, |
22918 | | |
22919 | | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { |
22920 | | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); |
22921 | | }, |
22922 | | |
22923 | | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { |
22924 | | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); |
22925 | | }, |
22926 | | |
22927 | | /** |
22928 | | * Protect against document.createEvent() returning null |
22929 | | * Some popup blocker extensions appear to do this: |
22930 | | * https://github.com/facebook/react/issues/6887 |
22931 | | */ |
22932 | | supportsEventPageXY: function () { |
22933 | | if (!document.createEvent) { |
22934 | | return false; |
22935 | | } |
22936 | | var ev = document.createEvent('MouseEvent'); |
22937 | | return ev != null && 'pageX' in ev; |
22938 | | }, |
22939 | | |
22940 | | /** |
22941 | | * Listens to window scroll and resize events. We cache scroll values so that |
22942 | | * application code can access them without triggering reflows. |
22943 | | * |
22944 | | * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when |
22945 | | * pageX/pageY isn't supported (legacy browsers). |
22946 | | * |
22947 | | * NOTE: Scroll events do not bubble. |
22948 | | * |
22949 | | * @see http://www.quirksmode.org/dom/events/scroll.html |
22950 | | */ |
22951 | | ensureScrollValueMonitoring: function () { |
22952 | | if (hasEventPageXY === undefined) { |
22953 | | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); |
22954 | | } |
22955 | | if (!hasEventPageXY && !isMonitoringScrollValue) { |
22956 | | var refresh = ViewportMetrics.refreshScrollValues; |
22957 | | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); |
22958 | | isMonitoringScrollValue = true; |
22959 | | } |
22960 | | } |
22961 | | }); |
22962 | | |
22963 | | module.exports = ReactBrowserEventEmitter; |
22964 | | |
22965 | | /***/ }), |
22966 | | /* 443 */ |
22967 | | /***/ (function(module, exports, __webpack_require__) { |
22968 | | |
22969 | | /** |
22970 | | * Copyright (c) 2013-present, Facebook, Inc. |
22971 | | * |
22972 | | * This source code is licensed under the MIT license found in the |
22973 | | * LICENSE file in the root directory of this source tree. |
22974 | | * |
22975 | | */ |
22976 | | |
22977 | | 'use strict'; |
22978 | | |
22979 | | var EventPluginHub = __webpack_require__(378); |
22980 | | |
22981 | | function runEventQueueInBatch(events) { |
22982 | | EventPluginHub.enqueueEvents(events); |
22983 | | EventPluginHub.processEventQueue(false); |
22984 | | } |
22985 | | |
22986 | | var ReactEventEmitterMixin = { |
22987 | | /** |
22988 | | * Streams a fired top-level event to `EventPluginHub` where plugins have the |
22989 | | * opportunity to create `ReactEvent`s to be dispatched. |
22990 | | */ |
22991 | | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
22992 | | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); |
22993 | | runEventQueueInBatch(events); |
22994 | | } |
22995 | | }; |
22996 | | |
22997 | | module.exports = ReactEventEmitterMixin; |
22998 | | |
22999 | | /***/ }), |
23000 | | /* 444 */ |
23001 | | /***/ (function(module, exports, __webpack_require__) { |
23002 | | |
23003 | | /** |
23004 | | * Copyright (c) 2013-present, Facebook, Inc. |
23005 | | * |
23006 | | * This source code is licensed under the MIT license found in the |
23007 | | * LICENSE file in the root directory of this source tree. |
23008 | | * |
23009 | | */ |
23010 | | |
23011 | | 'use strict'; |
23012 | | |
23013 | | var ExecutionEnvironment = __webpack_require__(384); |
23014 | | |
23015 | | /** |
23016 | | * Generate a mapping of standard vendor prefixes using the defined style property and event name. |
23017 | | * |
23018 | | * @param {string} styleProp |
23019 | | * @param {string} eventName |
23020 | | * @returns {object} |
23021 | | */ |
23022 | | function makePrefixMap(styleProp, eventName) { |
23023 | | var prefixes = {}; |
23024 | | |
23025 | | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); |
23026 | | prefixes['Webkit' + styleProp] = 'webkit' + eventName; |
23027 | | prefixes['Moz' + styleProp] = 'moz' + eventName; |
23028 | | prefixes['ms' + styleProp] = 'MS' + eventName; |
23029 | | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); |
23030 | | |
23031 | | return prefixes; |
23032 | | } |
23033 | | |
23034 | | /** |
23035 | | * A list of event names to a configurable list of vendor prefixes. |
23036 | | */ |
23037 | | var vendorPrefixes = { |
23038 | | animationend: makePrefixMap('Animation', 'AnimationEnd'), |
23039 | | animationiteration: makePrefixMap('Animation', 'AnimationIteration'), |
23040 | | animationstart: makePrefixMap('Animation', 'AnimationStart'), |
23041 | | transitionend: makePrefixMap('Transition', 'TransitionEnd') |
23042 | | }; |
23043 | | |
23044 | | /** |
23045 | | * Event names that have already been detected and prefixed (if applicable). |
23046 | | */ |
23047 | | var prefixedEventNames = {}; |
23048 | | |
23049 | | /** |
23050 | | * Element to check for prefixes on. |
23051 | | */ |
23052 | | var style = {}; |
23053 | | |
23054 | | /** |
23055 | | * Bootstrap if a DOM exists. |
23056 | | */ |
23057 | | if (ExecutionEnvironment.canUseDOM) { |
23058 | | style = document.createElement('div').style; |
23059 | | |
23060 | | // On some platforms, in particular some releases of Android 4.x, |
23061 | | // the un-prefixed "animation" and "transition" properties are defined on the |
23062 | | // style object but the events that fire will still be prefixed, so we need |
23063 | | // to check if the un-prefixed events are usable, and if not remove them from the map. |
23064 | | if (!('AnimationEvent' in window)) { |
23065 | | delete vendorPrefixes.animationend.animation; |
23066 | | delete vendorPrefixes.animationiteration.animation; |
23067 | | delete vendorPrefixes.animationstart.animation; |
23068 | | } |
23069 | | |
23070 | | // Same as above |
23071 | | if (!('TransitionEvent' in window)) { |
23072 | | delete vendorPrefixes.transitionend.transition; |
23073 | | } |
23074 | | } |
23075 | | |
23076 | | /** |
23077 | | * Attempts to determine the correct vendor prefixed event name. |
23078 | | * |
23079 | | * @param {string} eventName |
23080 | | * @returns {string} |
23081 | | */ |
23082 | | function getVendorPrefixedEventName(eventName) { |
23083 | | if (prefixedEventNames[eventName]) { |
23084 | | return prefixedEventNames[eventName]; |
23085 | | } else if (!vendorPrefixes[eventName]) { |
23086 | | return eventName; |
23087 | | } |
23088 | | |
23089 | | var prefixMap = vendorPrefixes[eventName]; |
23090 | | |
23091 | | for (var styleProp in prefixMap) { |
23092 | | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { |
23093 | | return prefixedEventNames[eventName] = prefixMap[styleProp]; |
23094 | | } |
23095 | | } |
23096 | | |
23097 | | return ''; |
23098 | | } |
23099 | | |
23100 | | module.exports = getVendorPrefixedEventName; |
23101 | | |
23102 | | /***/ }), |
23103 | | /* 445 */ |
23104 | | /***/ (function(module, exports, __webpack_require__) { |
23105 | | |
23106 | | /** |
23107 | | * Copyright (c) 2013-present, Facebook, Inc. |
23108 | | * |
23109 | | * This source code is licensed under the MIT license found in the |
23110 | | * LICENSE file in the root directory of this source tree. |
23111 | | * |
23112 | | */ |
23113 | | |
23114 | | 'use strict'; |
23115 | | |
23116 | | var _prodInvariant = __webpack_require__(371), |
23117 | | _assign = __webpack_require__(334); |
23118 | | |
23119 | | var DOMPropertyOperations = __webpack_require__(440); |
23120 | | var LinkedValueUtils = __webpack_require__(446); |
23121 | | var ReactDOMComponentTree = __webpack_require__(370); |
23122 | | var ReactUpdates = __webpack_require__(392); |
23123 | | |
23124 | | var invariant = __webpack_require__(342); |
23125 | | var warning = __webpack_require__(338); |
23126 | | |
23127 | | var didWarnValueLink = false; |
23128 | | var didWarnCheckedLink = false; |
23129 | | var didWarnValueDefaultValue = false; |
23130 | | var didWarnCheckedDefaultChecked = false; |
23131 | | var didWarnControlledToUncontrolled = false; |
23132 | | var didWarnUncontrolledToControlled = false; |
23133 | | |
23134 | | function forceUpdateIfMounted() { |
23135 | | if (this._rootNodeID) { |
23136 | | // DOM component is still mounted; update |
23137 | | ReactDOMInput.updateWrapper(this); |
23138 | | } |
23139 | | } |
23140 | | |
23141 | | function isControlled(props) { |
23142 | | var usesChecked = props.type === 'checkbox' || props.type === 'radio'; |
23143 | | return usesChecked ? props.checked != null : props.value != null; |
23144 | | } |
23145 | | |
23146 | | /** |
23147 | | * Implements an <input> host component that allows setting these optional |
23148 | | * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. |
23149 | | * |
23150 | | * If `checked` or `value` are not supplied (or null/undefined), user actions |
23151 | | * that affect the checked state or value will trigger updates to the element. |
23152 | | * |
23153 | | * If they are supplied (and not null/undefined), the rendered element will not |
23154 | | * trigger updates to the element. Instead, the props must change in order for |
23155 | | * the rendered element to be updated. |
23156 | | * |
23157 | | * The rendered element will be initialized as unchecked (or `defaultChecked`) |
23158 | | * with an empty value (or `defaultValue`). |
23159 | | * |
23160 | | * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html |
23161 | | */ |
23162 | | var ReactDOMInput = { |
23163 | | getHostProps: function (inst, props) { |
23164 | | var value = LinkedValueUtils.getValue(props); |
23165 | | var checked = LinkedValueUtils.getChecked(props); |
23166 | | |
23167 | | var hostProps = _assign({ |
23168 | | // Make sure we set .type before any other properties (setting .value |
23169 | | // before .type means .value is lost in IE11 and below) |
23170 | | type: undefined, |
23171 | | // Make sure we set .step before .value (setting .value before .step |
23172 | | // means .value is rounded on mount, based upon step precision) |
23173 | | step: undefined, |
23174 | | // Make sure we set .min & .max before .value (to ensure proper order |
23175 | | // in corner cases such as min or max deriving from value, e.g. Issue #7170) |
23176 | | min: undefined, |
23177 | | max: undefined |
23178 | | }, props, { |
23179 | | defaultChecked: undefined, |
23180 | | defaultValue: undefined, |
23181 | | value: value != null ? value : inst._wrapperState.initialValue, |
23182 | | checked: checked != null ? checked : inst._wrapperState.initialChecked, |
23183 | | onChange: inst._wrapperState.onChange |
23184 | | }); |
23185 | | |
23186 | | return hostProps; |
23187 | | }, |
23188 | | |
23189 | | mountWrapper: function (inst, props) { |
23190 | | if (true) { |
23191 | | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); |
23192 | | |
23193 | | var owner = inst._currentElement._owner; |
23194 | | |
23195 | | if (props.valueLink !== undefined && !didWarnValueLink) { |
23196 | | true ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; |
23197 | | didWarnValueLink = true; |
23198 | | } |
23199 | | if (props.checkedLink !== undefined && !didWarnCheckedLink) { |
23200 | | true ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; |
23201 | | didWarnCheckedLink = true; |
23202 | | } |
23203 | | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { |
23204 | | true ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; |
23205 | | didWarnCheckedDefaultChecked = true; |
23206 | | } |
23207 | | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { |
23208 | | true ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; |
23209 | | didWarnValueDefaultValue = true; |
23210 | | } |
23211 | | } |
23212 | | |
23213 | | var defaultValue = props.defaultValue; |
23214 | | inst._wrapperState = { |
23215 | | initialChecked: props.checked != null ? props.checked : props.defaultChecked, |
23216 | | initialValue: props.value != null ? props.value : defaultValue, |
23217 | | listeners: null, |
23218 | | onChange: _handleChange.bind(inst), |
23219 | | controlled: isControlled(props) |
23220 | | }; |
23221 | | }, |
23222 | | |
23223 | | updateWrapper: function (inst) { |
23224 | | var props = inst._currentElement.props; |
23225 | | |
23226 | | if (true) { |
23227 | | var controlled = isControlled(props); |
23228 | | var owner = inst._currentElement._owner; |
23229 | | |
23230 | | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { |
23231 | | true ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; |
23232 | | didWarnUncontrolledToControlled = true; |
23233 | | } |
23234 | | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { |
23235 | | true ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; |
23236 | | didWarnControlledToUncontrolled = true; |
23237 | | } |
23238 | | } |
23239 | | |
23240 | | // TODO: Shouldn't this be getChecked(props)? |
23241 | | var checked = props.checked; |
23242 | | if (checked != null) { |
23243 | | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); |
23244 | | } |
23245 | | |
23246 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
23247 | | var value = LinkedValueUtils.getValue(props); |
23248 | | if (value != null) { |
23249 | | if (value === 0 && node.value === '') { |
23250 | | node.value = '0'; |
23251 | | // Note: IE9 reports a number inputs as 'text', so check props instead. |
23252 | | } else if (props.type === 'number') { |
23253 | | // Simulate `input.valueAsNumber`. IE9 does not support it |
23254 | | var valueAsNumber = parseFloat(node.value, 10) || 0; |
23255 | | |
23256 | | if ( |
23257 | | // eslint-disable-next-line |
23258 | | value != valueAsNumber || |
23259 | | // eslint-disable-next-line |
23260 | | value == valueAsNumber && node.value != value) { |
23261 | | // Cast `value` to a string to ensure the value is set correctly. While |
23262 | | // browsers typically do this as necessary, jsdom doesn't. |
23263 | | node.value = '' + value; |
23264 | | } |
23265 | | } else if (node.value !== '' + value) { |
23266 | | // Cast `value` to a string to ensure the value is set correctly. While |
23267 | | // browsers typically do this as necessary, jsdom doesn't. |
23268 | | node.value = '' + value; |
23269 | | } |
23270 | | } else { |
23271 | | if (props.value == null && props.defaultValue != null) { |
23272 | | // In Chrome, assigning defaultValue to certain input types triggers input validation. |
23273 | | // For number inputs, the display value loses trailing decimal points. For email inputs, |
23274 | | // Chrome raises "The specified value <x> is not a valid email address". |
23275 | | // |
23276 | | // Here we check to see if the defaultValue has actually changed, avoiding these problems |
23277 | | // when the user is inputting text |
23278 | | // |
23279 | | // https://github.com/facebook/react/issues/7253 |
23280 | | if (node.defaultValue !== '' + props.defaultValue) { |
23281 | | node.defaultValue = '' + props.defaultValue; |
23282 | | } |
23283 | | } |
23284 | | if (props.checked == null && props.defaultChecked != null) { |
23285 | | node.defaultChecked = !!props.defaultChecked; |
23286 | | } |
23287 | | } |
23288 | | }, |
23289 | | |
23290 | | postMountWrapper: function (inst) { |
23291 | | var props = inst._currentElement.props; |
23292 | | |
23293 | | // This is in postMount because we need access to the DOM node, which is not |
23294 | | // available until after the component has mounted. |
23295 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
23296 | | |
23297 | | // Detach value from defaultValue. We won't do anything if we're working on |
23298 | | // submit or reset inputs as those values & defaultValues are linked. They |
23299 | | // are not resetable nodes so this operation doesn't matter and actually |
23300 | | // removes browser-default values (eg "Submit Query") when no value is |
23301 | | // provided. |
23302 | | |
23303 | | switch (props.type) { |
23304 | | case 'submit': |
23305 | | case 'reset': |
23306 | | break; |
23307 | | case 'color': |
23308 | | case 'date': |
23309 | | case 'datetime': |
23310 | | case 'datetime-local': |
23311 | | case 'month': |
23312 | | case 'time': |
23313 | | case 'week': |
23314 | | // This fixes the no-show issue on iOS Safari and Android Chrome: |
23315 | | // https://github.com/facebook/react/issues/7233 |
23316 | | node.value = ''; |
23317 | | node.value = node.defaultValue; |
23318 | | break; |
23319 | | default: |
23320 | | node.value = node.value; |
23321 | | break; |
23322 | | } |
23323 | | |
23324 | | // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug |
23325 | | // this is needed to work around a chrome bug where setting defaultChecked |
23326 | | // will sometimes influence the value of checked (even after detachment). |
23327 | | // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 |
23328 | | // We need to temporarily unset name to avoid disrupting radio button groups. |
23329 | | var name = node.name; |
23330 | | if (name !== '') { |
23331 | | node.name = ''; |
23332 | | } |
23333 | | node.defaultChecked = !node.defaultChecked; |
23334 | | node.defaultChecked = !node.defaultChecked; |
23335 | | if (name !== '') { |
23336 | | node.name = name; |
23337 | | } |
23338 | | } |
23339 | | }; |
23340 | | |
23341 | | function _handleChange(event) { |
23342 | | var props = this._currentElement.props; |
23343 | | |
23344 | | var returnValue = LinkedValueUtils.executeOnChange(props, event); |
23345 | | |
23346 | | // Here we use asap to wait until all updates have propagated, which |
23347 | | // is important when using controlled components within layers: |
23348 | | // https://github.com/facebook/react/issues/1698 |
23349 | | ReactUpdates.asap(forceUpdateIfMounted, this); |
23350 | | |
23351 | | var name = props.name; |
23352 | | if (props.type === 'radio' && name != null) { |
23353 | | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); |
23354 | | var queryRoot = rootNode; |
23355 | | |
23356 | | while (queryRoot.parentNode) { |
23357 | | queryRoot = queryRoot.parentNode; |
23358 | | } |
23359 | | |
23360 | | // If `rootNode.form` was non-null, then we could try `form.elements`, |
23361 | | // but that sometimes behaves strangely in IE8. We could also try using |
23362 | | // `form.getElementsByName`, but that will only return direct children |
23363 | | // and won't include inputs that use the HTML5 `form=` attribute. Since |
23364 | | // the input might not even be in a form, let's just use the global |
23365 | | // `querySelectorAll` to ensure we don't miss anything. |
23366 | | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); |
23367 | | |
23368 | | for (var i = 0; i < group.length; i++) { |
23369 | | var otherNode = group[i]; |
23370 | | if (otherNode === rootNode || otherNode.form !== rootNode.form) { |
23371 | | continue; |
23372 | | } |
23373 | | // This will throw if radio buttons rendered by different copies of React |
23374 | | // and the same name are rendered into the same form (same as #1939). |
23375 | | // That's probably okay; we don't support it just as we don't support |
23376 | | // mixing React radio buttons with non-React ones. |
23377 | | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); |
23378 | | !otherInstance ? true ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; |
23379 | | // If this is a controlled radio button group, forcing the input that |
23380 | | // was previously checked to update will cause it to be come re-checked |
23381 | | // as appropriate. |
23382 | | ReactUpdates.asap(forceUpdateIfMounted, otherInstance); |
23383 | | } |
23384 | | } |
23385 | | |
23386 | | return returnValue; |
23387 | | } |
23388 | | |
23389 | | module.exports = ReactDOMInput; |
23390 | | |
23391 | | /***/ }), |
23392 | | /* 446 */ |
23393 | | /***/ (function(module, exports, __webpack_require__) { |
23394 | | |
23395 | | /** |
23396 | | * Copyright (c) 2013-present, Facebook, Inc. |
23397 | | * |
23398 | | * This source code is licensed under the MIT license found in the |
23399 | | * LICENSE file in the root directory of this source tree. |
23400 | | * |
23401 | | */ |
23402 | | |
23403 | | 'use strict'; |
23404 | | |
23405 | | var _prodInvariant = __webpack_require__(371); |
23406 | | |
23407 | | var ReactPropTypesSecret = __webpack_require__(447); |
23408 | | var propTypesFactory = __webpack_require__(360); |
23409 | | |
23410 | | var React = __webpack_require__(333); |
23411 | | var PropTypes = propTypesFactory(React.isValidElement); |
23412 | | |
23413 | | var invariant = __webpack_require__(342); |
23414 | | var warning = __webpack_require__(338); |
23415 | | |
23416 | | var hasReadOnlyValue = { |
23417 | | button: true, |
23418 | | checkbox: true, |
23419 | | image: true, |
23420 | | hidden: true, |
23421 | | radio: true, |
23422 | | reset: true, |
23423 | | submit: true |
23424 | | }; |
23425 | | |
23426 | | function _assertSingleLink(inputProps) { |
23427 | | !(inputProps.checkedLink == null || inputProps.valueLink == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0; |
23428 | | } |
23429 | | function _assertValueLink(inputProps) { |
23430 | | _assertSingleLink(inputProps); |
23431 | | !(inputProps.value == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0; |
23432 | | } |
23433 | | |
23434 | | function _assertCheckedLink(inputProps) { |
23435 | | _assertSingleLink(inputProps); |
23436 | | !(inputProps.checked == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0; |
23437 | | } |
23438 | | |
23439 | | var propTypes = { |
23440 | | value: function (props, propName, componentName) { |
23441 | | if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { |
23442 | | return null; |
23443 | | } |
23444 | | return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); |
23445 | | }, |
23446 | | checked: function (props, propName, componentName) { |
23447 | | if (!props[propName] || props.onChange || props.readOnly || props.disabled) { |
23448 | | return null; |
23449 | | } |
23450 | | return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); |
23451 | | }, |
23452 | | onChange: PropTypes.func |
23453 | | }; |
23454 | | |
23455 | | var loggedTypeFailures = {}; |
23456 | | function getDeclarationErrorAddendum(owner) { |
23457 | | if (owner) { |
23458 | | var name = owner.getName(); |
23459 | | if (name) { |
23460 | | return ' Check the render method of `' + name + '`.'; |
23461 | | } |
23462 | | } |
23463 | | return ''; |
23464 | | } |
23465 | | |
23466 | | /** |
23467 | | * Provide a linked `value` attribute for controlled forms. You should not use |
23468 | | * this outside of the ReactDOM controlled form components. |
23469 | | */ |
23470 | | var LinkedValueUtils = { |
23471 | | checkPropTypes: function (tagName, props, owner) { |
23472 | | for (var propName in propTypes) { |
23473 | | if (propTypes.hasOwnProperty(propName)) { |
23474 | | var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); |
23475 | | } |
23476 | | if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
23477 | | // Only monitor this failure once because there tends to be a lot of the |
23478 | | // same error. |
23479 | | loggedTypeFailures[error.message] = true; |
23480 | | |
23481 | | var addendum = getDeclarationErrorAddendum(owner); |
23482 | | true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; |
23483 | | } |
23484 | | } |
23485 | | }, |
23486 | | |
23487 | | /** |
23488 | | * @param {object} inputProps Props for form component |
23489 | | * @return {*} current value of the input either from value prop or link. |
23490 | | */ |
23491 | | getValue: function (inputProps) { |
23492 | | if (inputProps.valueLink) { |
23493 | | _assertValueLink(inputProps); |
23494 | | return inputProps.valueLink.value; |
23495 | | } |
23496 | | return inputProps.value; |
23497 | | }, |
23498 | | |
23499 | | /** |
23500 | | * @param {object} inputProps Props for form component |
23501 | | * @return {*} current checked status of the input either from checked prop |
23502 | | * or link. |
23503 | | */ |
23504 | | getChecked: function (inputProps) { |
23505 | | if (inputProps.checkedLink) { |
23506 | | _assertCheckedLink(inputProps); |
23507 | | return inputProps.checkedLink.value; |
23508 | | } |
23509 | | return inputProps.checked; |
23510 | | }, |
23511 | | |
23512 | | /** |
23513 | | * @param {object} inputProps Props for form component |
23514 | | * @param {SyntheticEvent} event change event to handle |
23515 | | */ |
23516 | | executeOnChange: function (inputProps, event) { |
23517 | | if (inputProps.valueLink) { |
23518 | | _assertValueLink(inputProps); |
23519 | | return inputProps.valueLink.requestChange(event.target.value); |
23520 | | } else if (inputProps.checkedLink) { |
23521 | | _assertCheckedLink(inputProps); |
23522 | | return inputProps.checkedLink.requestChange(event.target.checked); |
23523 | | } else if (inputProps.onChange) { |
23524 | | return inputProps.onChange.call(undefined, event); |
23525 | | } |
23526 | | } |
23527 | | }; |
23528 | | |
23529 | | module.exports = LinkedValueUtils; |
23530 | | |
23531 | | /***/ }), |
23532 | | /* 447 */ |
23533 | | /***/ (function(module, exports) { |
23534 | | |
23535 | | /** |
23536 | | * Copyright (c) 2013-present, Facebook, Inc. |
23537 | | * |
23538 | | * This source code is licensed under the MIT license found in the |
23539 | | * LICENSE file in the root directory of this source tree. |
23540 | | * |
23541 | | * |
23542 | | */ |
23543 | | |
23544 | | 'use strict'; |
23545 | | |
23546 | | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
23547 | | |
23548 | | module.exports = ReactPropTypesSecret; |
23549 | | |
23550 | | /***/ }), |
23551 | | /* 448 */ |
23552 | | /***/ (function(module, exports, __webpack_require__) { |
23553 | | |
23554 | | /** |
23555 | | * Copyright (c) 2013-present, Facebook, Inc. |
23556 | | * |
23557 | | * This source code is licensed under the MIT license found in the |
23558 | | * LICENSE file in the root directory of this source tree. |
23559 | | * |
23560 | | */ |
23561 | | |
23562 | | 'use strict'; |
23563 | | |
23564 | | var _assign = __webpack_require__(334); |
23565 | | |
23566 | | var React = __webpack_require__(333); |
23567 | | var ReactDOMComponentTree = __webpack_require__(370); |
23568 | | var ReactDOMSelect = __webpack_require__(449); |
23569 | | |
23570 | | var warning = __webpack_require__(338); |
23571 | | var didWarnInvalidOptionChildren = false; |
23572 | | |
23573 | | function flattenChildren(children) { |
23574 | | var content = ''; |
23575 | | |
23576 | | // Flatten children and warn if they aren't strings or numbers; |
23577 | | // invalid types are ignored. |
23578 | | React.Children.forEach(children, function (child) { |
23579 | | if (child == null) { |
23580 | | return; |
23581 | | } |
23582 | | if (typeof child === 'string' || typeof child === 'number') { |
23583 | | content += child; |
23584 | | } else if (!didWarnInvalidOptionChildren) { |
23585 | | didWarnInvalidOptionChildren = true; |
23586 | | true ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; |
23587 | | } |
23588 | | }); |
23589 | | |
23590 | | return content; |
23591 | | } |
23592 | | |
23593 | | /** |
23594 | | * Implements an <option> host component that warns when `selected` is set. |
23595 | | */ |
23596 | | var ReactDOMOption = { |
23597 | | mountWrapper: function (inst, props, hostParent) { |
23598 | | // TODO (yungsters): Remove support for `selected` in <option>. |
23599 | | if (true) { |
23600 | | true ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; |
23601 | | } |
23602 | | |
23603 | | // Look up whether this option is 'selected' |
23604 | | var selectValue = null; |
23605 | | if (hostParent != null) { |
23606 | | var selectParent = hostParent; |
23607 | | |
23608 | | if (selectParent._tag === 'optgroup') { |
23609 | | selectParent = selectParent._hostParent; |
23610 | | } |
23611 | | |
23612 | | if (selectParent != null && selectParent._tag === 'select') { |
23613 | | selectValue = ReactDOMSelect.getSelectValueContext(selectParent); |
23614 | | } |
23615 | | } |
23616 | | |
23617 | | // If the value is null (e.g., no specified value or after initial mount) |
23618 | | // or missing (e.g., for <datalist>), we don't change props.selected |
23619 | | var selected = null; |
23620 | | if (selectValue != null) { |
23621 | | var value; |
23622 | | if (props.value != null) { |
23623 | | value = props.value + ''; |
23624 | | } else { |
23625 | | value = flattenChildren(props.children); |
23626 | | } |
23627 | | selected = false; |
23628 | | if (Array.isArray(selectValue)) { |
23629 | | // multiple |
23630 | | for (var i = 0; i < selectValue.length; i++) { |
23631 | | if ('' + selectValue[i] === value) { |
23632 | | selected = true; |
23633 | | break; |
23634 | | } |
23635 | | } |
23636 | | } else { |
23637 | | selected = '' + selectValue === value; |
23638 | | } |
23639 | | } |
23640 | | |
23641 | | inst._wrapperState = { selected: selected }; |
23642 | | }, |
23643 | | |
23644 | | postMountWrapper: function (inst) { |
23645 | | // value="" should make a value attribute (#6219) |
23646 | | var props = inst._currentElement.props; |
23647 | | if (props.value != null) { |
23648 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
23649 | | node.setAttribute('value', props.value); |
23650 | | } |
23651 | | }, |
23652 | | |
23653 | | getHostProps: function (inst, props) { |
23654 | | var hostProps = _assign({ selected: undefined, children: undefined }, props); |
23655 | | |
23656 | | // Read state only from initial mount because <select> updates value |
23657 | | // manually; we need the initial state only for server rendering |
23658 | | if (inst._wrapperState.selected != null) { |
23659 | | hostProps.selected = inst._wrapperState.selected; |
23660 | | } |
23661 | | |
23662 | | var content = flattenChildren(props.children); |
23663 | | |
23664 | | if (content) { |
23665 | | hostProps.children = content; |
23666 | | } |
23667 | | |
23668 | | return hostProps; |
23669 | | } |
23670 | | }; |
23671 | | |
23672 | | module.exports = ReactDOMOption; |
23673 | | |
23674 | | /***/ }), |
23675 | | /* 449 */ |
23676 | | /***/ (function(module, exports, __webpack_require__) { |
23677 | | |
23678 | | /** |
23679 | | * Copyright (c) 2013-present, Facebook, Inc. |
23680 | | * |
23681 | | * This source code is licensed under the MIT license found in the |
23682 | | * LICENSE file in the root directory of this source tree. |
23683 | | * |
23684 | | */ |
23685 | | |
23686 | | 'use strict'; |
23687 | | |
23688 | | var _assign = __webpack_require__(334); |
23689 | | |
23690 | | var LinkedValueUtils = __webpack_require__(446); |
23691 | | var ReactDOMComponentTree = __webpack_require__(370); |
23692 | | var ReactUpdates = __webpack_require__(392); |
23693 | | |
23694 | | var warning = __webpack_require__(338); |
23695 | | |
23696 | | var didWarnValueLink = false; |
23697 | | var didWarnValueDefaultValue = false; |
23698 | | |
23699 | | function updateOptionsIfPendingUpdateAndMounted() { |
23700 | | if (this._rootNodeID && this._wrapperState.pendingUpdate) { |
23701 | | this._wrapperState.pendingUpdate = false; |
23702 | | |
23703 | | var props = this._currentElement.props; |
23704 | | var value = LinkedValueUtils.getValue(props); |
23705 | | |
23706 | | if (value != null) { |
23707 | | updateOptions(this, Boolean(props.multiple), value); |
23708 | | } |
23709 | | } |
23710 | | } |
23711 | | |
23712 | | function getDeclarationErrorAddendum(owner) { |
23713 | | if (owner) { |
23714 | | var name = owner.getName(); |
23715 | | if (name) { |
23716 | | return ' Check the render method of `' + name + '`.'; |
23717 | | } |
23718 | | } |
23719 | | return ''; |
23720 | | } |
23721 | | |
23722 | | var valuePropNames = ['value', 'defaultValue']; |
23723 | | |
23724 | | /** |
23725 | | * Validation function for `value` and `defaultValue`. |
23726 | | * @private |
23727 | | */ |
23728 | | function checkSelectPropTypes(inst, props) { |
23729 | | var owner = inst._currentElement._owner; |
23730 | | LinkedValueUtils.checkPropTypes('select', props, owner); |
23731 | | |
23732 | | if (props.valueLink !== undefined && !didWarnValueLink) { |
23733 | | true ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; |
23734 | | didWarnValueLink = true; |
23735 | | } |
23736 | | |
23737 | | for (var i = 0; i < valuePropNames.length; i++) { |
23738 | | var propName = valuePropNames[i]; |
23739 | | if (props[propName] == null) { |
23740 | | continue; |
23741 | | } |
23742 | | var isArray = Array.isArray(props[propName]); |
23743 | | if (props.multiple && !isArray) { |
23744 | | true ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; |
23745 | | } else if (!props.multiple && isArray) { |
23746 | | true ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; |
23747 | | } |
23748 | | } |
23749 | | } |
23750 | | |
23751 | | /** |
23752 | | * @param {ReactDOMComponent} inst |
23753 | | * @param {boolean} multiple |
23754 | | * @param {*} propValue A stringable (with `multiple`, a list of stringables). |
23755 | | * @private |
23756 | | */ |
23757 | | function updateOptions(inst, multiple, propValue) { |
23758 | | var selectedValue, i; |
23759 | | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; |
23760 | | |
23761 | | if (multiple) { |
23762 | | selectedValue = {}; |
23763 | | for (i = 0; i < propValue.length; i++) { |
23764 | | selectedValue['' + propValue[i]] = true; |
23765 | | } |
23766 | | for (i = 0; i < options.length; i++) { |
23767 | | var selected = selectedValue.hasOwnProperty(options[i].value); |
23768 | | if (options[i].selected !== selected) { |
23769 | | options[i].selected = selected; |
23770 | | } |
23771 | | } |
23772 | | } else { |
23773 | | // Do not set `select.value` as exact behavior isn't consistent across all |
23774 | | // browsers for all cases. |
23775 | | selectedValue = '' + propValue; |
23776 | | for (i = 0; i < options.length; i++) { |
23777 | | if (options[i].value === selectedValue) { |
23778 | | options[i].selected = true; |
23779 | | return; |
23780 | | } |
23781 | | } |
23782 | | if (options.length) { |
23783 | | options[0].selected = true; |
23784 | | } |
23785 | | } |
23786 | | } |
23787 | | |
23788 | | /** |
23789 | | * Implements a <select> host component that allows optionally setting the |
23790 | | * props `value` and `defaultValue`. If `multiple` is false, the prop must be a |
23791 | | * stringable. If `multiple` is true, the prop must be an array of stringables. |
23792 | | * |
23793 | | * If `value` is not supplied (or null/undefined), user actions that change the |
23794 | | * selected option will trigger updates to the rendered options. |
23795 | | * |
23796 | | * If it is supplied (and not null/undefined), the rendered options will not |
23797 | | * update in response to user actions. Instead, the `value` prop must change in |
23798 | | * order for the rendered options to update. |
23799 | | * |
23800 | | * If `defaultValue` is provided, any options with the supplied values will be |
23801 | | * selected. |
23802 | | */ |
23803 | | var ReactDOMSelect = { |
23804 | | getHostProps: function (inst, props) { |
23805 | | return _assign({}, props, { |
23806 | | onChange: inst._wrapperState.onChange, |
23807 | | value: undefined |
23808 | | }); |
23809 | | }, |
23810 | | |
23811 | | mountWrapper: function (inst, props) { |
23812 | | if (true) { |
23813 | | checkSelectPropTypes(inst, props); |
23814 | | } |
23815 | | |
23816 | | var value = LinkedValueUtils.getValue(props); |
23817 | | inst._wrapperState = { |
23818 | | pendingUpdate: false, |
23819 | | initialValue: value != null ? value : props.defaultValue, |
23820 | | listeners: null, |
23821 | | onChange: _handleChange.bind(inst), |
23822 | | wasMultiple: Boolean(props.multiple) |
23823 | | }; |
23824 | | |
23825 | | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { |
23826 | | true ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; |
23827 | | didWarnValueDefaultValue = true; |
23828 | | } |
23829 | | }, |
23830 | | |
23831 | | getSelectValueContext: function (inst) { |
23832 | | // ReactDOMOption looks at this initial value so the initial generated |
23833 | | // markup has correct `selected` attributes |
23834 | | return inst._wrapperState.initialValue; |
23835 | | }, |
23836 | | |
23837 | | postUpdateWrapper: function (inst) { |
23838 | | var props = inst._currentElement.props; |
23839 | | |
23840 | | // After the initial mount, we control selected-ness manually so don't pass |
23841 | | // this value down |
23842 | | inst._wrapperState.initialValue = undefined; |
23843 | | |
23844 | | var wasMultiple = inst._wrapperState.wasMultiple; |
23845 | | inst._wrapperState.wasMultiple = Boolean(props.multiple); |
23846 | | |
23847 | | var value = LinkedValueUtils.getValue(props); |
23848 | | if (value != null) { |
23849 | | inst._wrapperState.pendingUpdate = false; |
23850 | | updateOptions(inst, Boolean(props.multiple), value); |
23851 | | } else if (wasMultiple !== Boolean(props.multiple)) { |
23852 | | // For simplicity, reapply `defaultValue` if `multiple` is toggled. |
23853 | | if (props.defaultValue != null) { |
23854 | | updateOptions(inst, Boolean(props.multiple), props.defaultValue); |
23855 | | } else { |
23856 | | // Revert the select back to its default unselected state. |
23857 | | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); |
23858 | | } |
23859 | | } |
23860 | | } |
23861 | | }; |
23862 | | |
23863 | | function _handleChange(event) { |
23864 | | var props = this._currentElement.props; |
23865 | | var returnValue = LinkedValueUtils.executeOnChange(props, event); |
23866 | | |
23867 | | if (this._rootNodeID) { |
23868 | | this._wrapperState.pendingUpdate = true; |
23869 | | } |
23870 | | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); |
23871 | | return returnValue; |
23872 | | } |
23873 | | |
23874 | | module.exports = ReactDOMSelect; |
23875 | | |
23876 | | /***/ }), |
23877 | | /* 450 */ |
23878 | | /***/ (function(module, exports, __webpack_require__) { |
23879 | | |
23880 | | /** |
23881 | | * Copyright (c) 2013-present, Facebook, Inc. |
23882 | | * |
23883 | | * This source code is licensed under the MIT license found in the |
23884 | | * LICENSE file in the root directory of this source tree. |
23885 | | * |
23886 | | */ |
23887 | | |
23888 | | 'use strict'; |
23889 | | |
23890 | | var _prodInvariant = __webpack_require__(371), |
23891 | | _assign = __webpack_require__(334); |
23892 | | |
23893 | | var LinkedValueUtils = __webpack_require__(446); |
23894 | | var ReactDOMComponentTree = __webpack_require__(370); |
23895 | | var ReactUpdates = __webpack_require__(392); |
23896 | | |
23897 | | var invariant = __webpack_require__(342); |
23898 | | var warning = __webpack_require__(338); |
23899 | | |
23900 | | var didWarnValueLink = false; |
23901 | | var didWarnValDefaultVal = false; |
23902 | | |
23903 | | function forceUpdateIfMounted() { |
23904 | | if (this._rootNodeID) { |
23905 | | // DOM component is still mounted; update |
23906 | | ReactDOMTextarea.updateWrapper(this); |
23907 | | } |
23908 | | } |
23909 | | |
23910 | | /** |
23911 | | * Implements a <textarea> host component that allows setting `value`, and |
23912 | | * `defaultValue`. This differs from the traditional DOM API because value is |
23913 | | * usually set as PCDATA children. |
23914 | | * |
23915 | | * If `value` is not supplied (or null/undefined), user actions that affect the |
23916 | | * value will trigger updates to the element. |
23917 | | * |
23918 | | * If `value` is supplied (and not null/undefined), the rendered element will |
23919 | | * not trigger updates to the element. Instead, the `value` prop must change in |
23920 | | * order for the rendered element to be updated. |
23921 | | * |
23922 | | * The rendered element will be initialized with an empty value, the prop |
23923 | | * `defaultValue` if specified, or the children content (deprecated). |
23924 | | */ |
23925 | | var ReactDOMTextarea = { |
23926 | | getHostProps: function (inst, props) { |
23927 | | !(props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; |
23928 | | |
23929 | | // Always set children to the same thing. In IE9, the selection range will |
23930 | | // get reset if `textContent` is mutated. We could add a check in setTextContent |
23931 | | // to only set the value if/when the value differs from the node value (which would |
23932 | | // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. |
23933 | | // The value can be a boolean or object so that's why it's forced to be a string. |
23934 | | var hostProps = _assign({}, props, { |
23935 | | value: undefined, |
23936 | | defaultValue: undefined, |
23937 | | children: '' + inst._wrapperState.initialValue, |
23938 | | onChange: inst._wrapperState.onChange |
23939 | | }); |
23940 | | |
23941 | | return hostProps; |
23942 | | }, |
23943 | | |
23944 | | mountWrapper: function (inst, props) { |
23945 | | if (true) { |
23946 | | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); |
23947 | | if (props.valueLink !== undefined && !didWarnValueLink) { |
23948 | | true ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; |
23949 | | didWarnValueLink = true; |
23950 | | } |
23951 | | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { |
23952 | | true ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; |
23953 | | didWarnValDefaultVal = true; |
23954 | | } |
23955 | | } |
23956 | | |
23957 | | var value = LinkedValueUtils.getValue(props); |
23958 | | var initialValue = value; |
23959 | | |
23960 | | // Only bother fetching default value if we're going to use it |
23961 | | if (value == null) { |
23962 | | var defaultValue = props.defaultValue; |
23963 | | // TODO (yungsters): Remove support for children content in <textarea>. |
23964 | | var children = props.children; |
23965 | | if (children != null) { |
23966 | | if (true) { |
23967 | | true ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; |
23968 | | } |
23969 | | !(defaultValue == null) ? true ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; |
23970 | | if (Array.isArray(children)) { |
23971 | | !(children.length <= 1) ? true ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; |
23972 | | children = children[0]; |
23973 | | } |
23974 | | |
23975 | | defaultValue = '' + children; |
23976 | | } |
23977 | | if (defaultValue == null) { |
23978 | | defaultValue = ''; |
23979 | | } |
23980 | | initialValue = defaultValue; |
23981 | | } |
23982 | | |
23983 | | inst._wrapperState = { |
23984 | | initialValue: '' + initialValue, |
23985 | | listeners: null, |
23986 | | onChange: _handleChange.bind(inst) |
23987 | | }; |
23988 | | }, |
23989 | | |
23990 | | updateWrapper: function (inst) { |
23991 | | var props = inst._currentElement.props; |
23992 | | |
23993 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
23994 | | var value = LinkedValueUtils.getValue(props); |
23995 | | if (value != null) { |
23996 | | // Cast `value` to a string to ensure the value is set correctly. While |
23997 | | // browsers typically do this as necessary, jsdom doesn't. |
23998 | | var newValue = '' + value; |
23999 | | |
24000 | | // To avoid side effects (such as losing text selection), only set value if changed |
24001 | | if (newValue !== node.value) { |
24002 | | node.value = newValue; |
24003 | | } |
24004 | | if (props.defaultValue == null) { |
24005 | | node.defaultValue = newValue; |
24006 | | } |
24007 | | } |
24008 | | if (props.defaultValue != null) { |
24009 | | node.defaultValue = props.defaultValue; |
24010 | | } |
24011 | | }, |
24012 | | |
24013 | | postMountWrapper: function (inst) { |
24014 | | // This is in postMount because we need access to the DOM node, which is not |
24015 | | // available until after the component has mounted. |
24016 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
24017 | | var textContent = node.textContent; |
24018 | | |
24019 | | // Only set node.value if textContent is equal to the expected |
24020 | | // initial value. In IE10/IE11 there is a bug where the placeholder attribute |
24021 | | // will populate textContent as well. |
24022 | | // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ |
24023 | | if (textContent === inst._wrapperState.initialValue) { |
24024 | | node.value = textContent; |
24025 | | } |
24026 | | } |
24027 | | }; |
24028 | | |
24029 | | function _handleChange(event) { |
24030 | | var props = this._currentElement.props; |
24031 | | var returnValue = LinkedValueUtils.executeOnChange(props, event); |
24032 | | ReactUpdates.asap(forceUpdateIfMounted, this); |
24033 | | return returnValue; |
24034 | | } |
24035 | | |
24036 | | module.exports = ReactDOMTextarea; |
24037 | | |
24038 | | /***/ }), |
24039 | | /* 451 */ |
24040 | | /***/ (function(module, exports, __webpack_require__) { |
24041 | | |
24042 | | /** |
24043 | | * Copyright (c) 2013-present, Facebook, Inc. |
24044 | | * |
24045 | | * This source code is licensed under the MIT license found in the |
24046 | | * LICENSE file in the root directory of this source tree. |
24047 | | * |
24048 | | */ |
24049 | | |
24050 | | 'use strict'; |
24051 | | |
24052 | | var _prodInvariant = __webpack_require__(371); |
24053 | | |
24054 | | var ReactComponentEnvironment = __webpack_require__(452); |
24055 | | var ReactInstanceMap = __webpack_require__(453); |
24056 | | var ReactInstrumentation = __webpack_require__(398); |
24057 | | |
24058 | | var ReactCurrentOwner = __webpack_require__(347); |
24059 | | var ReactReconciler = __webpack_require__(395); |
24060 | | var ReactChildReconciler = __webpack_require__(454); |
24061 | | |
24062 | | var emptyFunction = __webpack_require__(339); |
24063 | | var flattenChildren = __webpack_require__(469); |
24064 | | var invariant = __webpack_require__(342); |
24065 | | |
24066 | | /** |
24067 | | * Make an update for markup to be rendered and inserted at a supplied index. |
24068 | | * |
24069 | | * @param {string} markup Markup that renders into an element. |
24070 | | * @param {number} toIndex Destination index. |
24071 | | * @private |
24072 | | */ |
24073 | | function makeInsertMarkup(markup, afterNode, toIndex) { |
24074 | | // NOTE: Null values reduce hidden classes. |
24075 | | return { |
24076 | | type: 'INSERT_MARKUP', |
24077 | | content: markup, |
24078 | | fromIndex: null, |
24079 | | fromNode: null, |
24080 | | toIndex: toIndex, |
24081 | | afterNode: afterNode |
24082 | | }; |
24083 | | } |
24084 | | |
24085 | | /** |
24086 | | * Make an update for moving an existing element to another index. |
24087 | | * |
24088 | | * @param {number} fromIndex Source index of the existing element. |
24089 | | * @param {number} toIndex Destination index of the element. |
24090 | | * @private |
24091 | | */ |
24092 | | function makeMove(child, afterNode, toIndex) { |
24093 | | // NOTE: Null values reduce hidden classes. |
24094 | | return { |
24095 | | type: 'MOVE_EXISTING', |
24096 | | content: null, |
24097 | | fromIndex: child._mountIndex, |
24098 | | fromNode: ReactReconciler.getHostNode(child), |
24099 | | toIndex: toIndex, |
24100 | | afterNode: afterNode |
24101 | | }; |
24102 | | } |
24103 | | |
24104 | | /** |
24105 | | * Make an update for removing an element at an index. |
24106 | | * |
24107 | | * @param {number} fromIndex Index of the element to remove. |
24108 | | * @private |
24109 | | */ |
24110 | | function makeRemove(child, node) { |
24111 | | // NOTE: Null values reduce hidden classes. |
24112 | | return { |
24113 | | type: 'REMOVE_NODE', |
24114 | | content: null, |
24115 | | fromIndex: child._mountIndex, |
24116 | | fromNode: node, |
24117 | | toIndex: null, |
24118 | | afterNode: null |
24119 | | }; |
24120 | | } |
24121 | | |
24122 | | /** |
24123 | | * Make an update for setting the markup of a node. |
24124 | | * |
24125 | | * @param {string} markup Markup that renders into an element. |
24126 | | * @private |
24127 | | */ |
24128 | | function makeSetMarkup(markup) { |
24129 | | // NOTE: Null values reduce hidden classes. |
24130 | | return { |
24131 | | type: 'SET_MARKUP', |
24132 | | content: markup, |
24133 | | fromIndex: null, |
24134 | | fromNode: null, |
24135 | | toIndex: null, |
24136 | | afterNode: null |
24137 | | }; |
24138 | | } |
24139 | | |
24140 | | /** |
24141 | | * Make an update for setting the text content. |
24142 | | * |
24143 | | * @param {string} textContent Text content to set. |
24144 | | * @private |
24145 | | */ |
24146 | | function makeTextContent(textContent) { |
24147 | | // NOTE: Null values reduce hidden classes. |
24148 | | return { |
24149 | | type: 'TEXT_CONTENT', |
24150 | | content: textContent, |
24151 | | fromIndex: null, |
24152 | | fromNode: null, |
24153 | | toIndex: null, |
24154 | | afterNode: null |
24155 | | }; |
24156 | | } |
24157 | | |
24158 | | /** |
24159 | | * Push an update, if any, onto the queue. Creates a new queue if none is |
24160 | | * passed and always returns the queue. Mutative. |
24161 | | */ |
24162 | | function enqueue(queue, update) { |
24163 | | if (update) { |
24164 | | queue = queue || []; |
24165 | | queue.push(update); |
24166 | | } |
24167 | | return queue; |
24168 | | } |
24169 | | |
24170 | | /** |
24171 | | * Processes any enqueued updates. |
24172 | | * |
24173 | | * @private |
24174 | | */ |
24175 | | function processQueue(inst, updateQueue) { |
24176 | | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); |
24177 | | } |
24178 | | |
24179 | | var setChildrenForInstrumentation = emptyFunction; |
24180 | | if (true) { |
24181 | | var getDebugID = function (inst) { |
24182 | | if (!inst._debugID) { |
24183 | | // Check for ART-like instances. TODO: This is silly/gross. |
24184 | | var internal; |
24185 | | if (internal = ReactInstanceMap.get(inst)) { |
24186 | | inst = internal; |
24187 | | } |
24188 | | } |
24189 | | return inst._debugID; |
24190 | | }; |
24191 | | setChildrenForInstrumentation = function (children) { |
24192 | | var debugID = getDebugID(this); |
24193 | | // TODO: React Native empty components are also multichild. |
24194 | | // This means they still get into this method but don't have _debugID. |
24195 | | if (debugID !== 0) { |
24196 | | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { |
24197 | | return children[key]._debugID; |
24198 | | }) : []); |
24199 | | } |
24200 | | }; |
24201 | | } |
24202 | | |
24203 | | /** |
24204 | | * ReactMultiChild are capable of reconciling multiple children. |
24205 | | * |
24206 | | * @class ReactMultiChild |
24207 | | * @internal |
24208 | | */ |
24209 | | var ReactMultiChild = { |
24210 | | /** |
24211 | | * Provides common functionality for components that must reconcile multiple |
24212 | | * children. This is used by `ReactDOMComponent` to mount, update, and |
24213 | | * unmount child components. |
24214 | | * |
24215 | | * @lends {ReactMultiChild.prototype} |
24216 | | */ |
24217 | | Mixin: { |
24218 | | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { |
24219 | | if (true) { |
24220 | | var selfDebugID = getDebugID(this); |
24221 | | if (this._currentElement) { |
24222 | | try { |
24223 | | ReactCurrentOwner.current = this._currentElement._owner; |
24224 | | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); |
24225 | | } finally { |
24226 | | ReactCurrentOwner.current = null; |
24227 | | } |
24228 | | } |
24229 | | } |
24230 | | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); |
24231 | | }, |
24232 | | |
24233 | | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { |
24234 | | var nextChildren; |
24235 | | var selfDebugID = 0; |
24236 | | if (true) { |
24237 | | selfDebugID = getDebugID(this); |
24238 | | if (this._currentElement) { |
24239 | | try { |
24240 | | ReactCurrentOwner.current = this._currentElement._owner; |
24241 | | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); |
24242 | | } finally { |
24243 | | ReactCurrentOwner.current = null; |
24244 | | } |
24245 | | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); |
24246 | | return nextChildren; |
24247 | | } |
24248 | | } |
24249 | | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); |
24250 | | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); |
24251 | | return nextChildren; |
24252 | | }, |
24253 | | |
24254 | | /** |
24255 | | * Generates a "mount image" for each of the supplied children. In the case |
24256 | | * of `ReactDOMComponent`, a mount image is a string of markup. |
24257 | | * |
24258 | | * @param {?object} nestedChildren Nested child maps. |
24259 | | * @return {array} An array of mounted representations. |
24260 | | * @internal |
24261 | | */ |
24262 | | mountChildren: function (nestedChildren, transaction, context) { |
24263 | | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); |
24264 | | this._renderedChildren = children; |
24265 | | |
24266 | | var mountImages = []; |
24267 | | var index = 0; |
24268 | | for (var name in children) { |
24269 | | if (children.hasOwnProperty(name)) { |
24270 | | var child = children[name]; |
24271 | | var selfDebugID = 0; |
24272 | | if (true) { |
24273 | | selfDebugID = getDebugID(this); |
24274 | | } |
24275 | | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); |
24276 | | child._mountIndex = index++; |
24277 | | mountImages.push(mountImage); |
24278 | | } |
24279 | | } |
24280 | | |
24281 | | if (true) { |
24282 | | setChildrenForInstrumentation.call(this, children); |
24283 | | } |
24284 | | |
24285 | | return mountImages; |
24286 | | }, |
24287 | | |
24288 | | /** |
24289 | | * Replaces any rendered children with a text content string. |
24290 | | * |
24291 | | * @param {string} nextContent String of content. |
24292 | | * @internal |
24293 | | */ |
24294 | | updateTextContent: function (nextContent) { |
24295 | | var prevChildren = this._renderedChildren; |
24296 | | // Remove any rendered children. |
24297 | | ReactChildReconciler.unmountChildren(prevChildren, false); |
24298 | | for (var name in prevChildren) { |
24299 | | if (prevChildren.hasOwnProperty(name)) { |
24300 | | true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; |
24301 | | } |
24302 | | } |
24303 | | // Set new text content. |
24304 | | var updates = [makeTextContent(nextContent)]; |
24305 | | processQueue(this, updates); |
24306 | | }, |
24307 | | |
24308 | | /** |
24309 | | * Replaces any rendered children with a markup string. |
24310 | | * |
24311 | | * @param {string} nextMarkup String of markup. |
24312 | | * @internal |
24313 | | */ |
24314 | | updateMarkup: function (nextMarkup) { |
24315 | | var prevChildren = this._renderedChildren; |
24316 | | // Remove any rendered children. |
24317 | | ReactChildReconciler.unmountChildren(prevChildren, false); |
24318 | | for (var name in prevChildren) { |
24319 | | if (prevChildren.hasOwnProperty(name)) { |
24320 | | true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; |
24321 | | } |
24322 | | } |
24323 | | var updates = [makeSetMarkup(nextMarkup)]; |
24324 | | processQueue(this, updates); |
24325 | | }, |
24326 | | |
24327 | | /** |
24328 | | * Updates the rendered children with new children. |
24329 | | * |
24330 | | * @param {?object} nextNestedChildrenElements Nested child element maps. |
24331 | | * @param {ReactReconcileTransaction} transaction |
24332 | | * @internal |
24333 | | */ |
24334 | | updateChildren: function (nextNestedChildrenElements, transaction, context) { |
24335 | | // Hook used by React ART |
24336 | | this._updateChildren(nextNestedChildrenElements, transaction, context); |
24337 | | }, |
24338 | | |
24339 | | /** |
24340 | | * @param {?object} nextNestedChildrenElements Nested child element maps. |
24341 | | * @param {ReactReconcileTransaction} transaction |
24342 | | * @final |
24343 | | * @protected |
24344 | | */ |
24345 | | _updateChildren: function (nextNestedChildrenElements, transaction, context) { |
24346 | | var prevChildren = this._renderedChildren; |
24347 | | var removedNodes = {}; |
24348 | | var mountImages = []; |
24349 | | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); |
24350 | | if (!nextChildren && !prevChildren) { |
24351 | | return; |
24352 | | } |
24353 | | var updates = null; |
24354 | | var name; |
24355 | | // `nextIndex` will increment for each child in `nextChildren`, but |
24356 | | // `lastIndex` will be the last index visited in `prevChildren`. |
24357 | | var nextIndex = 0; |
24358 | | var lastIndex = 0; |
24359 | | // `nextMountIndex` will increment for each newly mounted child. |
24360 | | var nextMountIndex = 0; |
24361 | | var lastPlacedNode = null; |
24362 | | for (name in nextChildren) { |
24363 | | if (!nextChildren.hasOwnProperty(name)) { |
24364 | | continue; |
24365 | | } |
24366 | | var prevChild = prevChildren && prevChildren[name]; |
24367 | | var nextChild = nextChildren[name]; |
24368 | | if (prevChild === nextChild) { |
24369 | | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); |
24370 | | lastIndex = Math.max(prevChild._mountIndex, lastIndex); |
24371 | | prevChild._mountIndex = nextIndex; |
24372 | | } else { |
24373 | | if (prevChild) { |
24374 | | // Update `lastIndex` before `_mountIndex` gets unset by unmounting. |
24375 | | lastIndex = Math.max(prevChild._mountIndex, lastIndex); |
24376 | | // The `removedNodes` loop below will actually remove the child. |
24377 | | } |
24378 | | // The child must be instantiated before it's mounted. |
24379 | | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); |
24380 | | nextMountIndex++; |
24381 | | } |
24382 | | nextIndex++; |
24383 | | lastPlacedNode = ReactReconciler.getHostNode(nextChild); |
24384 | | } |
24385 | | // Remove children that are no longer present. |
24386 | | for (name in removedNodes) { |
24387 | | if (removedNodes.hasOwnProperty(name)) { |
24388 | | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); |
24389 | | } |
24390 | | } |
24391 | | if (updates) { |
24392 | | processQueue(this, updates); |
24393 | | } |
24394 | | this._renderedChildren = nextChildren; |
24395 | | |
24396 | | if (true) { |
24397 | | setChildrenForInstrumentation.call(this, nextChildren); |
24398 | | } |
24399 | | }, |
24400 | | |
24401 | | /** |
24402 | | * Unmounts all rendered children. This should be used to clean up children |
24403 | | * when this component is unmounted. It does not actually perform any |
24404 | | * backend operations. |
24405 | | * |
24406 | | * @internal |
24407 | | */ |
24408 | | unmountChildren: function (safely) { |
24409 | | var renderedChildren = this._renderedChildren; |
24410 | | ReactChildReconciler.unmountChildren(renderedChildren, safely); |
24411 | | this._renderedChildren = null; |
24412 | | }, |
24413 | | |
24414 | | /** |
24415 | | * Moves a child component to the supplied index. |
24416 | | * |
24417 | | * @param {ReactComponent} child Component to move. |
24418 | | * @param {number} toIndex Destination index of the element. |
24419 | | * @param {number} lastIndex Last index visited of the siblings of `child`. |
24420 | | * @protected |
24421 | | */ |
24422 | | moveChild: function (child, afterNode, toIndex, lastIndex) { |
24423 | | // If the index of `child` is less than `lastIndex`, then it needs to |
24424 | | // be moved. Otherwise, we do not need to move it because a child will be |
24425 | | // inserted or moved before `child`. |
24426 | | if (child._mountIndex < lastIndex) { |
24427 | | return makeMove(child, afterNode, toIndex); |
24428 | | } |
24429 | | }, |
24430 | | |
24431 | | /** |
24432 | | * Creates a child component. |
24433 | | * |
24434 | | * @param {ReactComponent} child Component to create. |
24435 | | * @param {string} mountImage Markup to insert. |
24436 | | * @protected |
24437 | | */ |
24438 | | createChild: function (child, afterNode, mountImage) { |
24439 | | return makeInsertMarkup(mountImage, afterNode, child._mountIndex); |
24440 | | }, |
24441 | | |
24442 | | /** |
24443 | | * Removes a child component. |
24444 | | * |
24445 | | * @param {ReactComponent} child Child to remove. |
24446 | | * @protected |
24447 | | */ |
24448 | | removeChild: function (child, node) { |
24449 | | return makeRemove(child, node); |
24450 | | }, |
24451 | | |
24452 | | /** |
24453 | | * Mounts a child with the supplied name. |
24454 | | * |
24455 | | * NOTE: This is part of `updateChildren` and is here for readability. |
24456 | | * |
24457 | | * @param {ReactComponent} child Component to mount. |
24458 | | * @param {string} name Name of the child. |
24459 | | * @param {number} index Index at which to insert the child. |
24460 | | * @param {ReactReconcileTransaction} transaction |
24461 | | * @private |
24462 | | */ |
24463 | | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { |
24464 | | child._mountIndex = index; |
24465 | | return this.createChild(child, afterNode, mountImage); |
24466 | | }, |
24467 | | |
24468 | | /** |
24469 | | * Unmounts a rendered child. |
24470 | | * |
24471 | | * NOTE: This is part of `updateChildren` and is here for readability. |
24472 | | * |
24473 | | * @param {ReactComponent} child Component to unmount. |
24474 | | * @private |
24475 | | */ |
24476 | | _unmountChild: function (child, node) { |
24477 | | var update = this.removeChild(child, node); |
24478 | | child._mountIndex = null; |
24479 | | return update; |
24480 | | } |
24481 | | } |
24482 | | }; |
24483 | | |
24484 | | module.exports = ReactMultiChild; |
24485 | | |
24486 | | /***/ }), |
24487 | | /* 452 */ |
24488 | | /***/ (function(module, exports, __webpack_require__) { |
24489 | | |
24490 | | /** |
24491 | | * Copyright (c) 2014-present, Facebook, Inc. |
24492 | | * |
24493 | | * This source code is licensed under the MIT license found in the |
24494 | | * LICENSE file in the root directory of this source tree. |
24495 | | * |
24496 | | * |
24497 | | */ |
24498 | | |
24499 | | 'use strict'; |
24500 | | |
24501 | | var _prodInvariant = __webpack_require__(371); |
24502 | | |
24503 | | var invariant = __webpack_require__(342); |
24504 | | |
24505 | | var injected = false; |
24506 | | |
24507 | | var ReactComponentEnvironment = { |
24508 | | /** |
24509 | | * Optionally injectable hook for swapping out mount images in the middle of |
24510 | | * the tree. |
24511 | | */ |
24512 | | replaceNodeWithMarkup: null, |
24513 | | |
24514 | | /** |
24515 | | * Optionally injectable hook for processing a queue of child updates. Will |
24516 | | * later move into MultiChildComponents. |
24517 | | */ |
24518 | | processChildrenUpdates: null, |
24519 | | |
24520 | | injection: { |
24521 | | injectEnvironment: function (environment) { |
24522 | | !!injected ? true ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; |
24523 | | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; |
24524 | | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; |
24525 | | injected = true; |
24526 | | } |
24527 | | } |
24528 | | }; |
24529 | | |
24530 | | module.exports = ReactComponentEnvironment; |
24531 | | |
24532 | | /***/ }), |
24533 | | /* 453 */ |
24534 | | /***/ (function(module, exports) { |
24535 | | |
24536 | | /** |
24537 | | * Copyright (c) 2013-present, Facebook, Inc. |
24538 | | * |
24539 | | * This source code is licensed under the MIT license found in the |
24540 | | * LICENSE file in the root directory of this source tree. |
24541 | | * |
24542 | | */ |
24543 | | |
24544 | | 'use strict'; |
24545 | | |
24546 | | /** |
24547 | | * `ReactInstanceMap` maintains a mapping from a public facing stateful |
24548 | | * instance (key) and the internal representation (value). This allows public |
24549 | | * methods to accept the user facing instance as an argument and map them back |
24550 | | * to internal methods. |
24551 | | */ |
24552 | | |
24553 | | // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); |
24554 | | |
24555 | | var ReactInstanceMap = { |
24556 | | /** |
24557 | | * This API should be called `delete` but we'd have to make sure to always |
24558 | | * transform these to strings for IE support. When this transform is fully |
24559 | | * supported we can rename it. |
24560 | | */ |
24561 | | remove: function (key) { |
24562 | | key._reactInternalInstance = undefined; |
24563 | | }, |
24564 | | |
24565 | | get: function (key) { |
24566 | | return key._reactInternalInstance; |
24567 | | }, |
24568 | | |
24569 | | has: function (key) { |
24570 | | return key._reactInternalInstance !== undefined; |
24571 | | }, |
24572 | | |
24573 | | set: function (key, value) { |
24574 | | key._reactInternalInstance = value; |
24575 | | } |
24576 | | }; |
24577 | | |
24578 | | module.exports = ReactInstanceMap; |
24579 | | |
24580 | | /***/ }), |
24581 | | /* 454 */ |
24582 | | /***/ (function(module, exports, __webpack_require__) { |
24583 | | |
24584 | | /* WEBPACK VAR INJECTION */(function(process) {/** |
24585 | | * Copyright (c) 2014-present, Facebook, Inc. |
24586 | | * |
24587 | | * This source code is licensed under the MIT license found in the |
24588 | | * LICENSE file in the root directory of this source tree. |
24589 | | * |
24590 | | */ |
24591 | | |
24592 | | 'use strict'; |
24593 | | |
24594 | | var ReactReconciler = __webpack_require__(395); |
24595 | | |
24596 | | var instantiateReactComponent = __webpack_require__(455); |
24597 | | var KeyEscapeUtils = __webpack_require__(465); |
24598 | | var shouldUpdateReactComponent = __webpack_require__(461); |
24599 | | var traverseAllChildren = __webpack_require__(466); |
24600 | | var warning = __webpack_require__(338); |
24601 | | |
24602 | | var ReactComponentTreeHook; |
24603 | | |
24604 | | if (typeof process !== 'undefined' && ({"NODE_ENV":"development"}) && ("development") === 'test') { |
24605 | | // Temporary hack. |
24606 | | // Inline requires don't work well with Jest: |
24607 | | // https://github.com/facebook/react/issues/7240 |
24608 | | // Remove the inline requires when we don't need them anymore: |
24609 | | // https://github.com/facebook/react/pull/7178 |
24610 | | ReactComponentTreeHook = __webpack_require__(354); |
24611 | | } |
24612 | | |
24613 | | function instantiateChild(childInstances, child, name, selfDebugID) { |
24614 | | // We found a component instance. |
24615 | | var keyUnique = childInstances[name] === undefined; |
24616 | | if (true) { |
24617 | | if (!ReactComponentTreeHook) { |
24618 | | ReactComponentTreeHook = __webpack_require__(354); |
24619 | | } |
24620 | | if (!keyUnique) { |
24621 | | true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; |
24622 | | } |
24623 | | } |
24624 | | if (child != null && keyUnique) { |
24625 | | childInstances[name] = instantiateReactComponent(child, true); |
24626 | | } |
24627 | | } |
24628 | | |
24629 | | /** |
24630 | | * ReactChildReconciler provides helpers for initializing or updating a set of |
24631 | | * children. Its output is suitable for passing it onto ReactMultiChild which |
24632 | | * does diffed reordering and insertion. |
24633 | | */ |
24634 | | var ReactChildReconciler = { |
24635 | | /** |
24636 | | * Generates a "mount image" for each of the supplied children. In the case |
24637 | | * of `ReactDOMComponent`, a mount image is a string of markup. |
24638 | | * |
24639 | | * @param {?object} nestedChildNodes Nested child maps. |
24640 | | * @return {?object} A set of child instances. |
24641 | | * @internal |
24642 | | */ |
24643 | | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots |
24644 | | { |
24645 | | if (nestedChildNodes == null) { |
24646 | | return null; |
24647 | | } |
24648 | | var childInstances = {}; |
24649 | | |
24650 | | if (true) { |
24651 | | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { |
24652 | | return instantiateChild(childInsts, child, name, selfDebugID); |
24653 | | }, childInstances); |
24654 | | } else { |
24655 | | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); |
24656 | | } |
24657 | | return childInstances; |
24658 | | }, |
24659 | | |
24660 | | /** |
24661 | | * Updates the rendered children and returns a new set of children. |
24662 | | * |
24663 | | * @param {?object} prevChildren Previously initialized set of children. |
24664 | | * @param {?object} nextChildren Flat child element maps. |
24665 | | * @param {ReactReconcileTransaction} transaction |
24666 | | * @param {object} context |
24667 | | * @return {?object} A new set of child instances. |
24668 | | * @internal |
24669 | | */ |
24670 | | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots |
24671 | | { |
24672 | | // We currently don't have a way to track moves here but if we use iterators |
24673 | | // instead of for..in we can zip the iterators and check if an item has |
24674 | | // moved. |
24675 | | // TODO: If nothing has changed, return the prevChildren object so that we |
24676 | | // can quickly bailout if nothing has changed. |
24677 | | if (!nextChildren && !prevChildren) { |
24678 | | return; |
24679 | | } |
24680 | | var name; |
24681 | | var prevChild; |
24682 | | for (name in nextChildren) { |
24683 | | if (!nextChildren.hasOwnProperty(name)) { |
24684 | | continue; |
24685 | | } |
24686 | | prevChild = prevChildren && prevChildren[name]; |
24687 | | var prevElement = prevChild && prevChild._currentElement; |
24688 | | var nextElement = nextChildren[name]; |
24689 | | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { |
24690 | | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); |
24691 | | nextChildren[name] = prevChild; |
24692 | | } else { |
24693 | | if (prevChild) { |
24694 | | removedNodes[name] = ReactReconciler.getHostNode(prevChild); |
24695 | | ReactReconciler.unmountComponent(prevChild, false); |
24696 | | } |
24697 | | // The child must be instantiated before it's mounted. |
24698 | | var nextChildInstance = instantiateReactComponent(nextElement, true); |
24699 | | nextChildren[name] = nextChildInstance; |
24700 | | // Creating mount image now ensures refs are resolved in right order |
24701 | | // (see https://github.com/facebook/react/pull/7101 for explanation). |
24702 | | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); |
24703 | | mountImages.push(nextChildMountImage); |
24704 | | } |
24705 | | } |
24706 | | // Unmount children that are no longer present. |
24707 | | for (name in prevChildren) { |
24708 | | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { |
24709 | | prevChild = prevChildren[name]; |
24710 | | removedNodes[name] = ReactReconciler.getHostNode(prevChild); |
24711 | | ReactReconciler.unmountComponent(prevChild, false); |
24712 | | } |
24713 | | } |
24714 | | }, |
24715 | | |
24716 | | /** |
24717 | | * Unmounts all rendered children. This should be used to clean up children |
24718 | | * when this component is unmounted. |
24719 | | * |
24720 | | * @param {?object} renderedChildren Previously initialized set of children. |
24721 | | * @internal |
24722 | | */ |
24723 | | unmountChildren: function (renderedChildren, safely) { |
24724 | | for (var name in renderedChildren) { |
24725 | | if (renderedChildren.hasOwnProperty(name)) { |
24726 | | var renderedChild = renderedChildren[name]; |
24727 | | ReactReconciler.unmountComponent(renderedChild, safely); |
24728 | | } |
24729 | | } |
24730 | | } |
24731 | | }; |
24732 | | |
24733 | | module.exports = ReactChildReconciler; |
24734 | | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(356))) |
24735 | | |
24736 | | /***/ }), |
24737 | | /* 455 */ |
24738 | | /***/ (function(module, exports, __webpack_require__) { |
24739 | | |
24740 | | /** |
24741 | | * Copyright (c) 2013-present, Facebook, Inc. |
24742 | | * |
24743 | | * This source code is licensed under the MIT license found in the |
24744 | | * LICENSE file in the root directory of this source tree. |
24745 | | * |
24746 | | */ |
24747 | | |
24748 | | 'use strict'; |
24749 | | |
24750 | | var _prodInvariant = __webpack_require__(371), |
24751 | | _assign = __webpack_require__(334); |
24752 | | |
24753 | | var ReactCompositeComponent = __webpack_require__(456); |
24754 | | var ReactEmptyComponent = __webpack_require__(462); |
24755 | | var ReactHostComponent = __webpack_require__(463); |
24756 | | |
24757 | | var getNextDebugID = __webpack_require__(464); |
24758 | | var invariant = __webpack_require__(342); |
24759 | | var warning = __webpack_require__(338); |
24760 | | |
24761 | | // To avoid a cyclic dependency, we create the final class in this module |
24762 | | var ReactCompositeComponentWrapper = function (element) { |
24763 | | this.construct(element); |
24764 | | }; |
24765 | | |
24766 | | function getDeclarationErrorAddendum(owner) { |
24767 | | if (owner) { |
24768 | | var name = owner.getName(); |
24769 | | if (name) { |
24770 | | return ' Check the render method of `' + name + '`.'; |
24771 | | } |
24772 | | } |
24773 | | return ''; |
24774 | | } |
24775 | | |
24776 | | /** |
24777 | | * Check if the type reference is a known internal type. I.e. not a user |
24778 | | * provided composite type. |
24779 | | * |
24780 | | * @param {function} type |
24781 | | * @return {boolean} Returns true if this is a valid internal type. |
24782 | | */ |
24783 | | function isInternalComponentType(type) { |
24784 | | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; |
24785 | | } |
24786 | | |
24787 | | /** |
24788 | | * Given a ReactNode, create an instance that will actually be mounted. |
24789 | | * |
24790 | | * @param {ReactNode} node |
24791 | | * @param {boolean} shouldHaveDebugID |
24792 | | * @return {object} A new instance of the element's constructor. |
24793 | | * @protected |
24794 | | */ |
24795 | | function instantiateReactComponent(node, shouldHaveDebugID) { |
24796 | | var instance; |
24797 | | |
24798 | | if (node === null || node === false) { |
24799 | | instance = ReactEmptyComponent.create(instantiateReactComponent); |
24800 | | } else if (typeof node === 'object') { |
24801 | | var element = node; |
24802 | | var type = element.type; |
24803 | | if (typeof type !== 'function' && typeof type !== 'string') { |
24804 | | var info = ''; |
24805 | | if (true) { |
24806 | | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { |
24807 | | info += ' You likely forgot to export your component from the file ' + "it's defined in."; |
24808 | | } |
24809 | | } |
24810 | | info += getDeclarationErrorAddendum(element._owner); |
24811 | | true ? true ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; |
24812 | | } |
24813 | | |
24814 | | // Special case string values |
24815 | | if (typeof element.type === 'string') { |
24816 | | instance = ReactHostComponent.createInternalComponent(element); |
24817 | | } else if (isInternalComponentType(element.type)) { |
24818 | | // This is temporarily available for custom components that are not string |
24819 | | // representations. I.e. ART. Once those are updated to use the string |
24820 | | // representation, we can drop this code path. |
24821 | | instance = new element.type(element); |
24822 | | |
24823 | | // We renamed this. Allow the old name for compat. :( |
24824 | | if (!instance.getHostNode) { |
24825 | | instance.getHostNode = instance.getNativeNode; |
24826 | | } |
24827 | | } else { |
24828 | | instance = new ReactCompositeComponentWrapper(element); |
24829 | | } |
24830 | | } else if (typeof node === 'string' || typeof node === 'number') { |
24831 | | instance = ReactHostComponent.createInstanceForText(node); |
24832 | | } else { |
24833 | | true ? true ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0; |
24834 | | } |
24835 | | |
24836 | | if (true) { |
24837 | | true ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0; |
24838 | | } |
24839 | | |
24840 | | // These two fields are used by the DOM and ART diffing algorithms |
24841 | | // respectively. Instead of using expandos on components, we should be |
24842 | | // storing the state needed by the diffing algorithms elsewhere. |
24843 | | instance._mountIndex = 0; |
24844 | | instance._mountImage = null; |
24845 | | |
24846 | | if (true) { |
24847 | | instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; |
24848 | | } |
24849 | | |
24850 | | // Internal instances should fully constructed at this point, so they should |
24851 | | // not get any new fields added to them at this point. |
24852 | | if (true) { |
24853 | | if (Object.preventExtensions) { |
24854 | | Object.preventExtensions(instance); |
24855 | | } |
24856 | | } |
24857 | | |
24858 | | return instance; |
24859 | | } |
24860 | | |
24861 | | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { |
24862 | | _instantiateReactComponent: instantiateReactComponent |
24863 | | }); |
24864 | | |
24865 | | module.exports = instantiateReactComponent; |
24866 | | |
24867 | | /***/ }), |
24868 | | /* 456 */ |
24869 | | /***/ (function(module, exports, __webpack_require__) { |
24870 | | |
24871 | | /** |
24872 | | * Copyright (c) 2013-present, Facebook, Inc. |
24873 | | * |
24874 | | * This source code is licensed under the MIT license found in the |
24875 | | * LICENSE file in the root directory of this source tree. |
24876 | | * |
24877 | | */ |
24878 | | |
24879 | | 'use strict'; |
24880 | | |
24881 | | var _prodInvariant = __webpack_require__(371), |
24882 | | _assign = __webpack_require__(334); |
24883 | | |
24884 | | var React = __webpack_require__(333); |
24885 | | var ReactComponentEnvironment = __webpack_require__(452); |
24886 | | var ReactCurrentOwner = __webpack_require__(347); |
24887 | | var ReactErrorUtils = __webpack_require__(381); |
24888 | | var ReactInstanceMap = __webpack_require__(453); |
24889 | | var ReactInstrumentation = __webpack_require__(398); |
24890 | | var ReactNodeTypes = __webpack_require__(457); |
24891 | | var ReactReconciler = __webpack_require__(395); |
24892 | | |
24893 | | if (true) { |
24894 | | var checkReactTypeSpec = __webpack_require__(458); |
24895 | | } |
24896 | | |
24897 | | var emptyObject = __webpack_require__(341); |
24898 | | var invariant = __webpack_require__(342); |
24899 | | var shallowEqual = __webpack_require__(460); |
24900 | | var shouldUpdateReactComponent = __webpack_require__(461); |
24901 | | var warning = __webpack_require__(338); |
24902 | | |
24903 | | var CompositeTypes = { |
24904 | | ImpureClass: 0, |
24905 | | PureClass: 1, |
24906 | | StatelessFunctional: 2 |
24907 | | }; |
24908 | | |
24909 | | function StatelessComponent(Component) {} |
24910 | | StatelessComponent.prototype.render = function () { |
24911 | | var Component = ReactInstanceMap.get(this)._currentElement.type; |
24912 | | var element = Component(this.props, this.context, this.updater); |
24913 | | warnIfInvalidElement(Component, element); |
24914 | | return element; |
24915 | | }; |
24916 | | |
24917 | | function warnIfInvalidElement(Component, element) { |
24918 | | if (true) { |
24919 | | true ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; |
24920 | | true ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; |
24921 | | } |
24922 | | } |
24923 | | |
24924 | | function shouldConstruct(Component) { |
24925 | | return !!(Component.prototype && Component.prototype.isReactComponent); |
24926 | | } |
24927 | | |
24928 | | function isPureComponent(Component) { |
24929 | | return !!(Component.prototype && Component.prototype.isPureReactComponent); |
24930 | | } |
24931 | | |
24932 | | // Separated into a function to contain deoptimizations caused by try/finally. |
24933 | | function measureLifeCyclePerf(fn, debugID, timerType) { |
24934 | | if (debugID === 0) { |
24935 | | // Top-level wrappers (see ReactMount) and empty components (see |
24936 | | // ReactDOMEmptyComponent) are invisible to hooks and devtools. |
24937 | | // Both are implementation details that should go away in the future. |
24938 | | return fn(); |
24939 | | } |
24940 | | |
24941 | | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); |
24942 | | try { |
24943 | | return fn(); |
24944 | | } finally { |
24945 | | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); |
24946 | | } |
24947 | | } |
24948 | | |
24949 | | /** |
24950 | | * ------------------ The Life-Cycle of a Composite Component ------------------ |
24951 | | * |
24952 | | * - constructor: Initialization of state. The instance is now retained. |
24953 | | * - componentWillMount |
24954 | | * - render |
24955 | | * - [children's constructors] |
24956 | | * - [children's componentWillMount and render] |
24957 | | * - [children's componentDidMount] |
24958 | | * - componentDidMount |
24959 | | * |
24960 | | * Update Phases: |
24961 | | * - componentWillReceiveProps (only called if parent updated) |
24962 | | * - shouldComponentUpdate |
24963 | | * - componentWillUpdate |
24964 | | * - render |
24965 | | * - [children's constructors or receive props phases] |
24966 | | * - componentDidUpdate |
24967 | | * |
24968 | | * - componentWillUnmount |
24969 | | * - [children's componentWillUnmount] |
24970 | | * - [children destroyed] |
24971 | | * - (destroyed): The instance is now blank, released by React and ready for GC. |
24972 | | * |
24973 | | * ----------------------------------------------------------------------------- |
24974 | | */ |
24975 | | |
24976 | | /** |
24977 | | * An incrementing ID assigned to each component when it is mounted. This is |
24978 | | * used to enforce the order in which `ReactUpdates` updates dirty components. |
24979 | | * |
24980 | | * @private |
24981 | | */ |
24982 | | var nextMountID = 1; |
24983 | | |
24984 | | /** |
24985 | | * @lends {ReactCompositeComponent.prototype} |
24986 | | */ |
24987 | | var ReactCompositeComponent = { |
24988 | | /** |
24989 | | * Base constructor for all composite component. |
24990 | | * |
24991 | | * @param {ReactElement} element |
24992 | | * @final |
24993 | | * @internal |
24994 | | */ |
24995 | | construct: function (element) { |
24996 | | this._currentElement = element; |
24997 | | this._rootNodeID = 0; |
24998 | | this._compositeType = null; |
24999 | | this._instance = null; |
25000 | | this._hostParent = null; |
25001 | | this._hostContainerInfo = null; |
25002 | | |
25003 | | // See ReactUpdateQueue |
25004 | | this._updateBatchNumber = null; |
25005 | | this._pendingElement = null; |
25006 | | this._pendingStateQueue = null; |
25007 | | this._pendingReplaceState = false; |
25008 | | this._pendingForceUpdate = false; |
25009 | | |
25010 | | this._renderedNodeType = null; |
25011 | | this._renderedComponent = null; |
25012 | | this._context = null; |
25013 | | this._mountOrder = 0; |
25014 | | this._topLevelWrapper = null; |
25015 | | |
25016 | | // See ReactUpdates and ReactUpdateQueue. |
25017 | | this._pendingCallbacks = null; |
25018 | | |
25019 | | // ComponentWillUnmount shall only be called once |
25020 | | this._calledComponentWillUnmount = false; |
25021 | | |
25022 | | if (true) { |
25023 | | this._warnedAboutRefsInRender = false; |
25024 | | } |
25025 | | }, |
25026 | | |
25027 | | /** |
25028 | | * Initializes the component, renders markup, and registers event listeners. |
25029 | | * |
25030 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
25031 | | * @param {?object} hostParent |
25032 | | * @param {?object} hostContainerInfo |
25033 | | * @param {?object} context |
25034 | | * @return {?string} Rendered markup to be inserted into the DOM. |
25035 | | * @final |
25036 | | * @internal |
25037 | | */ |
25038 | | mountComponent: function (transaction, hostParent, hostContainerInfo, context) { |
25039 | | var _this = this; |
25040 | | |
25041 | | this._context = context; |
25042 | | this._mountOrder = nextMountID++; |
25043 | | this._hostParent = hostParent; |
25044 | | this._hostContainerInfo = hostContainerInfo; |
25045 | | |
25046 | | var publicProps = this._currentElement.props; |
25047 | | var publicContext = this._processContext(context); |
25048 | | |
25049 | | var Component = this._currentElement.type; |
25050 | | |
25051 | | var updateQueue = transaction.getUpdateQueue(); |
25052 | | |
25053 | | // Initialize the public class |
25054 | | var doConstruct = shouldConstruct(Component); |
25055 | | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); |
25056 | | var renderedElement; |
25057 | | |
25058 | | // Support functional components |
25059 | | if (!doConstruct && (inst == null || inst.render == null)) { |
25060 | | renderedElement = inst; |
25061 | | warnIfInvalidElement(Component, renderedElement); |
25062 | | !(inst === null || inst === false || React.isValidElement(inst)) ? true ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; |
25063 | | inst = new StatelessComponent(Component); |
25064 | | this._compositeType = CompositeTypes.StatelessFunctional; |
25065 | | } else { |
25066 | | if (isPureComponent(Component)) { |
25067 | | this._compositeType = CompositeTypes.PureClass; |
25068 | | } else { |
25069 | | this._compositeType = CompositeTypes.ImpureClass; |
25070 | | } |
25071 | | } |
25072 | | |
25073 | | if (true) { |
25074 | | // This will throw later in _renderValidatedComponent, but add an early |
25075 | | // warning now to help debugging |
25076 | | if (inst.render == null) { |
25077 | | true ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; |
25078 | | } |
25079 | | |
25080 | | var propsMutated = inst.props !== publicProps; |
25081 | | var componentName = Component.displayName || Component.name || 'Component'; |
25082 | | |
25083 | | true ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0; |
25084 | | } |
25085 | | |
25086 | | // These should be set up in the constructor, but as a convenience for |
25087 | | // simpler class abstractions, we set them up after the fact. |
25088 | | inst.props = publicProps; |
25089 | | inst.context = publicContext; |
25090 | | inst.refs = emptyObject; |
25091 | | inst.updater = updateQueue; |
25092 | | |
25093 | | this._instance = inst; |
25094 | | |
25095 | | // Store a reference from the instance back to the internal representation |
25096 | | ReactInstanceMap.set(inst, this); |
25097 | | |
25098 | | if (true) { |
25099 | | // Since plain JS classes are defined without any special initialization |
25100 | | // logic, we can not catch common errors early. Therefore, we have to |
25101 | | // catch them here, at initialization time, instead. |
25102 | | true ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; |
25103 | | true ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; |
25104 | | true ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; |
25105 | | true ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; |
25106 | | true ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; |
25107 | | true ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; |
25108 | | true ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; |
25109 | | } |
25110 | | |
25111 | | var initialState = inst.state; |
25112 | | if (initialState === undefined) { |
25113 | | inst.state = initialState = null; |
25114 | | } |
25115 | | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? true ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; |
25116 | | |
25117 | | this._pendingStateQueue = null; |
25118 | | this._pendingReplaceState = false; |
25119 | | this._pendingForceUpdate = false; |
25120 | | |
25121 | | var markup; |
25122 | | if (inst.unstable_handleError) { |
25123 | | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); |
25124 | | } else { |
25125 | | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); |
25126 | | } |
25127 | | |
25128 | | if (inst.componentDidMount) { |
25129 | | if (true) { |
25130 | | transaction.getReactMountReady().enqueue(function () { |
25131 | | measureLifeCyclePerf(function () { |
25132 | | return inst.componentDidMount(); |
25133 | | }, _this._debugID, 'componentDidMount'); |
25134 | | }); |
25135 | | } else { |
25136 | | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); |
25137 | | } |
25138 | | } |
25139 | | |
25140 | | return markup; |
25141 | | }, |
25142 | | |
25143 | | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { |
25144 | | if (("development") !== 'production' && !doConstruct) { |
25145 | | ReactCurrentOwner.current = this; |
25146 | | try { |
25147 | | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); |
25148 | | } finally { |
25149 | | ReactCurrentOwner.current = null; |
25150 | | } |
25151 | | } else { |
25152 | | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); |
25153 | | } |
25154 | | }, |
25155 | | |
25156 | | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { |
25157 | | var Component = this._currentElement.type; |
25158 | | |
25159 | | if (doConstruct) { |
25160 | | if (true) { |
25161 | | return measureLifeCyclePerf(function () { |
25162 | | return new Component(publicProps, publicContext, updateQueue); |
25163 | | }, this._debugID, 'ctor'); |
25164 | | } else { |
25165 | | return new Component(publicProps, publicContext, updateQueue); |
25166 | | } |
25167 | | } |
25168 | | |
25169 | | // This can still be an instance in case of factory components |
25170 | | // but we'll count this as time spent rendering as the more common case. |
25171 | | if (true) { |
25172 | | return measureLifeCyclePerf(function () { |
25173 | | return Component(publicProps, publicContext, updateQueue); |
25174 | | }, this._debugID, 'render'); |
25175 | | } else { |
25176 | | return Component(publicProps, publicContext, updateQueue); |
25177 | | } |
25178 | | }, |
25179 | | |
25180 | | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { |
25181 | | var markup; |
25182 | | var checkpoint = transaction.checkpoint(); |
25183 | | try { |
25184 | | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); |
25185 | | } catch (e) { |
25186 | | // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint |
25187 | | transaction.rollback(checkpoint); |
25188 | | this._instance.unstable_handleError(e); |
25189 | | if (this._pendingStateQueue) { |
25190 | | this._instance.state = this._processPendingState(this._instance.props, this._instance.context); |
25191 | | } |
25192 | | checkpoint = transaction.checkpoint(); |
25193 | | |
25194 | | this._renderedComponent.unmountComponent(true); |
25195 | | transaction.rollback(checkpoint); |
25196 | | |
25197 | | // Try again - we've informed the component about the error, so they can render an error message this time. |
25198 | | // If this throws again, the error will bubble up (and can be caught by a higher error boundary). |
25199 | | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); |
25200 | | } |
25201 | | return markup; |
25202 | | }, |
25203 | | |
25204 | | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { |
25205 | | var inst = this._instance; |
25206 | | |
25207 | | var debugID = 0; |
25208 | | if (true) { |
25209 | | debugID = this._debugID; |
25210 | | } |
25211 | | |
25212 | | if (inst.componentWillMount) { |
25213 | | if (true) { |
25214 | | measureLifeCyclePerf(function () { |
25215 | | return inst.componentWillMount(); |
25216 | | }, debugID, 'componentWillMount'); |
25217 | | } else { |
25218 | | inst.componentWillMount(); |
25219 | | } |
25220 | | // When mounting, calls to `setState` by `componentWillMount` will set |
25221 | | // `this._pendingStateQueue` without triggering a re-render. |
25222 | | if (this._pendingStateQueue) { |
25223 | | inst.state = this._processPendingState(inst.props, inst.context); |
25224 | | } |
25225 | | } |
25226 | | |
25227 | | // If not a stateless component, we now render |
25228 | | if (renderedElement === undefined) { |
25229 | | renderedElement = this._renderValidatedComponent(); |
25230 | | } |
25231 | | |
25232 | | var nodeType = ReactNodeTypes.getType(renderedElement); |
25233 | | this._renderedNodeType = nodeType; |
25234 | | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ |
25235 | | ); |
25236 | | this._renderedComponent = child; |
25237 | | |
25238 | | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); |
25239 | | |
25240 | | if (true) { |
25241 | | if (debugID !== 0) { |
25242 | | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; |
25243 | | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); |
25244 | | } |
25245 | | } |
25246 | | |
25247 | | return markup; |
25248 | | }, |
25249 | | |
25250 | | getHostNode: function () { |
25251 | | return ReactReconciler.getHostNode(this._renderedComponent); |
25252 | | }, |
25253 | | |
25254 | | /** |
25255 | | * Releases any resources allocated by `mountComponent`. |
25256 | | * |
25257 | | * @final |
25258 | | * @internal |
25259 | | */ |
25260 | | unmountComponent: function (safely) { |
25261 | | if (!this._renderedComponent) { |
25262 | | return; |
25263 | | } |
25264 | | |
25265 | | var inst = this._instance; |
25266 | | |
25267 | | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { |
25268 | | inst._calledComponentWillUnmount = true; |
25269 | | |
25270 | | if (safely) { |
25271 | | var name = this.getName() + '.componentWillUnmount()'; |
25272 | | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); |
25273 | | } else { |
25274 | | if (true) { |
25275 | | measureLifeCyclePerf(function () { |
25276 | | return inst.componentWillUnmount(); |
25277 | | }, this._debugID, 'componentWillUnmount'); |
25278 | | } else { |
25279 | | inst.componentWillUnmount(); |
25280 | | } |
25281 | | } |
25282 | | } |
25283 | | |
25284 | | if (this._renderedComponent) { |
25285 | | ReactReconciler.unmountComponent(this._renderedComponent, safely); |
25286 | | this._renderedNodeType = null; |
25287 | | this._renderedComponent = null; |
25288 | | this._instance = null; |
25289 | | } |
25290 | | |
25291 | | // Reset pending fields |
25292 | | // Even if this component is scheduled for another update in ReactUpdates, |
25293 | | // it would still be ignored because these fields are reset. |
25294 | | this._pendingStateQueue = null; |
25295 | | this._pendingReplaceState = false; |
25296 | | this._pendingForceUpdate = false; |
25297 | | this._pendingCallbacks = null; |
25298 | | this._pendingElement = null; |
25299 | | |
25300 | | // These fields do not really need to be reset since this object is no |
25301 | | // longer accessible. |
25302 | | this._context = null; |
25303 | | this._rootNodeID = 0; |
25304 | | this._topLevelWrapper = null; |
25305 | | |
25306 | | // Delete the reference from the instance to this internal representation |
25307 | | // which allow the internals to be properly cleaned up even if the user |
25308 | | // leaks a reference to the public instance. |
25309 | | ReactInstanceMap.remove(inst); |
25310 | | |
25311 | | // Some existing components rely on inst.props even after they've been |
25312 | | // destroyed (in event handlers). |
25313 | | // TODO: inst.props = null; |
25314 | | // TODO: inst.state = null; |
25315 | | // TODO: inst.context = null; |
25316 | | }, |
25317 | | |
25318 | | /** |
25319 | | * Filters the context object to only contain keys specified in |
25320 | | * `contextTypes` |
25321 | | * |
25322 | | * @param {object} context |
25323 | | * @return {?object} |
25324 | | * @private |
25325 | | */ |
25326 | | _maskContext: function (context) { |
25327 | | var Component = this._currentElement.type; |
25328 | | var contextTypes = Component.contextTypes; |
25329 | | if (!contextTypes) { |
25330 | | return emptyObject; |
25331 | | } |
25332 | | var maskedContext = {}; |
25333 | | for (var contextName in contextTypes) { |
25334 | | maskedContext[contextName] = context[contextName]; |
25335 | | } |
25336 | | return maskedContext; |
25337 | | }, |
25338 | | |
25339 | | /** |
25340 | | * Filters the context object to only contain keys specified in |
25341 | | * `contextTypes`, and asserts that they are valid. |
25342 | | * |
25343 | | * @param {object} context |
25344 | | * @return {?object} |
25345 | | * @private |
25346 | | */ |
25347 | | _processContext: function (context) { |
25348 | | var maskedContext = this._maskContext(context); |
25349 | | if (true) { |
25350 | | var Component = this._currentElement.type; |
25351 | | if (Component.contextTypes) { |
25352 | | this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); |
25353 | | } |
25354 | | } |
25355 | | return maskedContext; |
25356 | | }, |
25357 | | |
25358 | | /** |
25359 | | * @param {object} currentContext |
25360 | | * @return {object} |
25361 | | * @private |
25362 | | */ |
25363 | | _processChildContext: function (currentContext) { |
25364 | | var Component = this._currentElement.type; |
25365 | | var inst = this._instance; |
25366 | | var childContext; |
25367 | | |
25368 | | if (inst.getChildContext) { |
25369 | | if (true) { |
25370 | | ReactInstrumentation.debugTool.onBeginProcessingChildContext(); |
25371 | | try { |
25372 | | childContext = inst.getChildContext(); |
25373 | | } finally { |
25374 | | ReactInstrumentation.debugTool.onEndProcessingChildContext(); |
25375 | | } |
25376 | | } else { |
25377 | | childContext = inst.getChildContext(); |
25378 | | } |
25379 | | } |
25380 | | |
25381 | | if (childContext) { |
25382 | | !(typeof Component.childContextTypes === 'object') ? true ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; |
25383 | | if (true) { |
25384 | | this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); |
25385 | | } |
25386 | | for (var name in childContext) { |
25387 | | !(name in Component.childContextTypes) ? true ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; |
25388 | | } |
25389 | | return _assign({}, currentContext, childContext); |
25390 | | } |
25391 | | return currentContext; |
25392 | | }, |
25393 | | |
25394 | | /** |
25395 | | * Assert that the context types are valid |
25396 | | * |
25397 | | * @param {object} typeSpecs Map of context field to a ReactPropType |
25398 | | * @param {object} values Runtime values that need to be type-checked |
25399 | | * @param {string} location e.g. "prop", "context", "child context" |
25400 | | * @private |
25401 | | */ |
25402 | | _checkContextTypes: function (typeSpecs, values, location) { |
25403 | | if (true) { |
25404 | | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); |
25405 | | } |
25406 | | }, |
25407 | | |
25408 | | receiveComponent: function (nextElement, transaction, nextContext) { |
25409 | | var prevElement = this._currentElement; |
25410 | | var prevContext = this._context; |
25411 | | |
25412 | | this._pendingElement = null; |
25413 | | |
25414 | | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); |
25415 | | }, |
25416 | | |
25417 | | /** |
25418 | | * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` |
25419 | | * is set, update the component. |
25420 | | * |
25421 | | * @param {ReactReconcileTransaction} transaction |
25422 | | * @internal |
25423 | | */ |
25424 | | performUpdateIfNecessary: function (transaction) { |
25425 | | if (this._pendingElement != null) { |
25426 | | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); |
25427 | | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { |
25428 | | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); |
25429 | | } else { |
25430 | | this._updateBatchNumber = null; |
25431 | | } |
25432 | | }, |
25433 | | |
25434 | | /** |
25435 | | * Perform an update to a mounted component. The componentWillReceiveProps and |
25436 | | * shouldComponentUpdate methods are called, then (assuming the update isn't |
25437 | | * skipped) the remaining update lifecycle methods are called and the DOM |
25438 | | * representation is updated. |
25439 | | * |
25440 | | * By default, this implements React's rendering and reconciliation algorithm. |
25441 | | * Sophisticated clients may wish to override this. |
25442 | | * |
25443 | | * @param {ReactReconcileTransaction} transaction |
25444 | | * @param {ReactElement} prevParentElement |
25445 | | * @param {ReactElement} nextParentElement |
25446 | | * @internal |
25447 | | * @overridable |
25448 | | */ |
25449 | | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { |
25450 | | var inst = this._instance; |
25451 | | !(inst != null) ? true ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; |
25452 | | |
25453 | | var willReceive = false; |
25454 | | var nextContext; |
25455 | | |
25456 | | // Determine if the context has changed or not |
25457 | | if (this._context === nextUnmaskedContext) { |
25458 | | nextContext = inst.context; |
25459 | | } else { |
25460 | | nextContext = this._processContext(nextUnmaskedContext); |
25461 | | willReceive = true; |
25462 | | } |
25463 | | |
25464 | | var prevProps = prevParentElement.props; |
25465 | | var nextProps = nextParentElement.props; |
25466 | | |
25467 | | // Not a simple state update but a props update |
25468 | | if (prevParentElement !== nextParentElement) { |
25469 | | willReceive = true; |
25470 | | } |
25471 | | |
25472 | | // An update here will schedule an update but immediately set |
25473 | | // _pendingStateQueue which will ensure that any state updates gets |
25474 | | // immediately reconciled instead of waiting for the next batch. |
25475 | | if (willReceive && inst.componentWillReceiveProps) { |
25476 | | if (true) { |
25477 | | measureLifeCyclePerf(function () { |
25478 | | return inst.componentWillReceiveProps(nextProps, nextContext); |
25479 | | }, this._debugID, 'componentWillReceiveProps'); |
25480 | | } else { |
25481 | | inst.componentWillReceiveProps(nextProps, nextContext); |
25482 | | } |
25483 | | } |
25484 | | |
25485 | | var nextState = this._processPendingState(nextProps, nextContext); |
25486 | | var shouldUpdate = true; |
25487 | | |
25488 | | if (!this._pendingForceUpdate) { |
25489 | | if (inst.shouldComponentUpdate) { |
25490 | | if (true) { |
25491 | | shouldUpdate = measureLifeCyclePerf(function () { |
25492 | | return inst.shouldComponentUpdate(nextProps, nextState, nextContext); |
25493 | | }, this._debugID, 'shouldComponentUpdate'); |
25494 | | } else { |
25495 | | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); |
25496 | | } |
25497 | | } else { |
25498 | | if (this._compositeType === CompositeTypes.PureClass) { |
25499 | | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); |
25500 | | } |
25501 | | } |
25502 | | } |
25503 | | |
25504 | | if (true) { |
25505 | | true ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; |
25506 | | } |
25507 | | |
25508 | | this._updateBatchNumber = null; |
25509 | | if (shouldUpdate) { |
25510 | | this._pendingForceUpdate = false; |
25511 | | // Will set `this.props`, `this.state` and `this.context`. |
25512 | | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); |
25513 | | } else { |
25514 | | // If it's determined that a component should not update, we still want |
25515 | | // to set props and state but we shortcut the rest of the update. |
25516 | | this._currentElement = nextParentElement; |
25517 | | this._context = nextUnmaskedContext; |
25518 | | inst.props = nextProps; |
25519 | | inst.state = nextState; |
25520 | | inst.context = nextContext; |
25521 | | } |
25522 | | }, |
25523 | | |
25524 | | _processPendingState: function (props, context) { |
25525 | | var inst = this._instance; |
25526 | | var queue = this._pendingStateQueue; |
25527 | | var replace = this._pendingReplaceState; |
25528 | | this._pendingReplaceState = false; |
25529 | | this._pendingStateQueue = null; |
25530 | | |
25531 | | if (!queue) { |
25532 | | return inst.state; |
25533 | | } |
25534 | | |
25535 | | if (replace && queue.length === 1) { |
25536 | | return queue[0]; |
25537 | | } |
25538 | | |
25539 | | var nextState = _assign({}, replace ? queue[0] : inst.state); |
25540 | | for (var i = replace ? 1 : 0; i < queue.length; i++) { |
25541 | | var partial = queue[i]; |
25542 | | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); |
25543 | | } |
25544 | | |
25545 | | return nextState; |
25546 | | }, |
25547 | | |
25548 | | /** |
25549 | | * Merges new props and state, notifies delegate methods of update and |
25550 | | * performs update. |
25551 | | * |
25552 | | * @param {ReactElement} nextElement Next element |
25553 | | * @param {object} nextProps Next public object to set as properties. |
25554 | | * @param {?object} nextState Next object to set as state. |
25555 | | * @param {?object} nextContext Next public object to set as context. |
25556 | | * @param {ReactReconcileTransaction} transaction |
25557 | | * @param {?object} unmaskedContext |
25558 | | * @private |
25559 | | */ |
25560 | | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { |
25561 | | var _this2 = this; |
25562 | | |
25563 | | var inst = this._instance; |
25564 | | |
25565 | | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); |
25566 | | var prevProps; |
25567 | | var prevState; |
25568 | | var prevContext; |
25569 | | if (hasComponentDidUpdate) { |
25570 | | prevProps = inst.props; |
25571 | | prevState = inst.state; |
25572 | | prevContext = inst.context; |
25573 | | } |
25574 | | |
25575 | | if (inst.componentWillUpdate) { |
25576 | | if (true) { |
25577 | | measureLifeCyclePerf(function () { |
25578 | | return inst.componentWillUpdate(nextProps, nextState, nextContext); |
25579 | | }, this._debugID, 'componentWillUpdate'); |
25580 | | } else { |
25581 | | inst.componentWillUpdate(nextProps, nextState, nextContext); |
25582 | | } |
25583 | | } |
25584 | | |
25585 | | this._currentElement = nextElement; |
25586 | | this._context = unmaskedContext; |
25587 | | inst.props = nextProps; |
25588 | | inst.state = nextState; |
25589 | | inst.context = nextContext; |
25590 | | |
25591 | | this._updateRenderedComponent(transaction, unmaskedContext); |
25592 | | |
25593 | | if (hasComponentDidUpdate) { |
25594 | | if (true) { |
25595 | | transaction.getReactMountReady().enqueue(function () { |
25596 | | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); |
25597 | | }); |
25598 | | } else { |
25599 | | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); |
25600 | | } |
25601 | | } |
25602 | | }, |
25603 | | |
25604 | | /** |
25605 | | * Call the component's `render` method and update the DOM accordingly. |
25606 | | * |
25607 | | * @param {ReactReconcileTransaction} transaction |
25608 | | * @internal |
25609 | | */ |
25610 | | _updateRenderedComponent: function (transaction, context) { |
25611 | | var prevComponentInstance = this._renderedComponent; |
25612 | | var prevRenderedElement = prevComponentInstance._currentElement; |
25613 | | var nextRenderedElement = this._renderValidatedComponent(); |
25614 | | |
25615 | | var debugID = 0; |
25616 | | if (true) { |
25617 | | debugID = this._debugID; |
25618 | | } |
25619 | | |
25620 | | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { |
25621 | | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); |
25622 | | } else { |
25623 | | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); |
25624 | | ReactReconciler.unmountComponent(prevComponentInstance, false); |
25625 | | |
25626 | | var nodeType = ReactNodeTypes.getType(nextRenderedElement); |
25627 | | this._renderedNodeType = nodeType; |
25628 | | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ |
25629 | | ); |
25630 | | this._renderedComponent = child; |
25631 | | |
25632 | | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); |
25633 | | |
25634 | | if (true) { |
25635 | | if (debugID !== 0) { |
25636 | | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; |
25637 | | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); |
25638 | | } |
25639 | | } |
25640 | | |
25641 | | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); |
25642 | | } |
25643 | | }, |
25644 | | |
25645 | | /** |
25646 | | * Overridden in shallow rendering. |
25647 | | * |
25648 | | * @protected |
25649 | | */ |
25650 | | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { |
25651 | | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); |
25652 | | }, |
25653 | | |
25654 | | /** |
25655 | | * @protected |
25656 | | */ |
25657 | | _renderValidatedComponentWithoutOwnerOrContext: function () { |
25658 | | var inst = this._instance; |
25659 | | var renderedElement; |
25660 | | |
25661 | | if (true) { |
25662 | | renderedElement = measureLifeCyclePerf(function () { |
25663 | | return inst.render(); |
25664 | | }, this._debugID, 'render'); |
25665 | | } else { |
25666 | | renderedElement = inst.render(); |
25667 | | } |
25668 | | |
25669 | | if (true) { |
25670 | | // We allow auto-mocks to proceed as if they're returning null. |
25671 | | if (renderedElement === undefined && inst.render._isMockFunction) { |
25672 | | // This is probably bad practice. Consider warning here and |
25673 | | // deprecating this convenience. |
25674 | | renderedElement = null; |
25675 | | } |
25676 | | } |
25677 | | |
25678 | | return renderedElement; |
25679 | | }, |
25680 | | |
25681 | | /** |
25682 | | * @private |
25683 | | */ |
25684 | | _renderValidatedComponent: function () { |
25685 | | var renderedElement; |
25686 | | if (true) { |
25687 | | ReactCurrentOwner.current = this; |
25688 | | try { |
25689 | | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); |
25690 | | } finally { |
25691 | | ReactCurrentOwner.current = null; |
25692 | | } |
25693 | | } else { |
25694 | | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); |
25695 | | } |
25696 | | !( |
25697 | | // TODO: An `isValidNode` function would probably be more appropriate |
25698 | | renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? true ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; |
25699 | | |
25700 | | return renderedElement; |
25701 | | }, |
25702 | | |
25703 | | /** |
25704 | | * Lazily allocates the refs object and stores `component` as `ref`. |
25705 | | * |
25706 | | * @param {string} ref Reference name. |
25707 | | * @param {component} component Component to store as `ref`. |
25708 | | * @final |
25709 | | * @private |
25710 | | */ |
25711 | | attachRef: function (ref, component) { |
25712 | | var inst = this.getPublicInstance(); |
25713 | | !(inst != null) ? true ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; |
25714 | | var publicComponentInstance = component.getPublicInstance(); |
25715 | | if (true) { |
25716 | | var componentName = component && component.getName ? component.getName() : 'a component'; |
25717 | | true ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; |
25718 | | } |
25719 | | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; |
25720 | | refs[ref] = publicComponentInstance; |
25721 | | }, |
25722 | | |
25723 | | /** |
25724 | | * Detaches a reference name. |
25725 | | * |
25726 | | * @param {string} ref Name to dereference. |
25727 | | * @final |
25728 | | * @private |
25729 | | */ |
25730 | | detachRef: function (ref) { |
25731 | | var refs = this.getPublicInstance().refs; |
25732 | | delete refs[ref]; |
25733 | | }, |
25734 | | |
25735 | | /** |
25736 | | * Get a text description of the component that can be used to identify it |
25737 | | * in error messages. |
25738 | | * @return {string} The name or null. |
25739 | | * @internal |
25740 | | */ |
25741 | | getName: function () { |
25742 | | var type = this._currentElement.type; |
25743 | | var constructor = this._instance && this._instance.constructor; |
25744 | | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; |
25745 | | }, |
25746 | | |
25747 | | /** |
25748 | | * Get the publicly accessible representation of this component - i.e. what |
25749 | | * is exposed by refs and returned by render. Can be null for stateless |
25750 | | * components. |
25751 | | * |
25752 | | * @return {ReactComponent} the public component instance. |
25753 | | * @internal |
25754 | | */ |
25755 | | getPublicInstance: function () { |
25756 | | var inst = this._instance; |
25757 | | if (this._compositeType === CompositeTypes.StatelessFunctional) { |
25758 | | return null; |
25759 | | } |
25760 | | return inst; |
25761 | | }, |
25762 | | |
25763 | | // Stub |
25764 | | _instantiateReactComponent: null |
25765 | | }; |
25766 | | |
25767 | | module.exports = ReactCompositeComponent; |
25768 | | |
25769 | | /***/ }), |
25770 | | /* 457 */ |
25771 | | /***/ (function(module, exports, __webpack_require__) { |
25772 | | |
25773 | | /** |
25774 | | * Copyright (c) 2013-present, Facebook, Inc. |
25775 | | * |
25776 | | * This source code is licensed under the MIT license found in the |
25777 | | * LICENSE file in the root directory of this source tree. |
25778 | | * |
25779 | | * |
25780 | | */ |
25781 | | |
25782 | | 'use strict'; |
25783 | | |
25784 | | var _prodInvariant = __webpack_require__(371); |
25785 | | |
25786 | | var React = __webpack_require__(333); |
25787 | | |
25788 | | var invariant = __webpack_require__(342); |
25789 | | |
25790 | | var ReactNodeTypes = { |
25791 | | HOST: 0, |
25792 | | COMPOSITE: 1, |
25793 | | EMPTY: 2, |
25794 | | |
25795 | | getType: function (node) { |
25796 | | if (node === null || node === false) { |
25797 | | return ReactNodeTypes.EMPTY; |
25798 | | } else if (React.isValidElement(node)) { |
25799 | | if (typeof node.type === 'function') { |
25800 | | return ReactNodeTypes.COMPOSITE; |
25801 | | } else { |
25802 | | return ReactNodeTypes.HOST; |
25803 | | } |
25804 | | } |
25805 | | true ? true ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0; |
25806 | | } |
25807 | | }; |
25808 | | |
25809 | | module.exports = ReactNodeTypes; |
25810 | | |
25811 | | /***/ }), |
25812 | | /* 458 */ |
25813 | | /***/ (function(module, exports, __webpack_require__) { |
25814 | | |
25815 | | /* WEBPACK VAR INJECTION */(function(process) {/** |
25816 | | * Copyright (c) 2013-present, Facebook, Inc. |
25817 | | * |
25818 | | * This source code is licensed under the MIT license found in the |
25819 | | * LICENSE file in the root directory of this source tree. |
25820 | | * |
25821 | | */ |
25822 | | |
25823 | | 'use strict'; |
25824 | | |
25825 | | var _prodInvariant = __webpack_require__(371); |
25826 | | |
25827 | | var ReactPropTypeLocationNames = __webpack_require__(459); |
25828 | | var ReactPropTypesSecret = __webpack_require__(447); |
25829 | | |
25830 | | var invariant = __webpack_require__(342); |
25831 | | var warning = __webpack_require__(338); |
25832 | | |
25833 | | var ReactComponentTreeHook; |
25834 | | |
25835 | | if (typeof process !== 'undefined' && ({"NODE_ENV":"development"}) && ("development") === 'test') { |
25836 | | // Temporary hack. |
25837 | | // Inline requires don't work well with Jest: |
25838 | | // https://github.com/facebook/react/issues/7240 |
25839 | | // Remove the inline requires when we don't need them anymore: |
25840 | | // https://github.com/facebook/react/pull/7178 |
25841 | | ReactComponentTreeHook = __webpack_require__(354); |
25842 | | } |
25843 | | |
25844 | | var loggedTypeFailures = {}; |
25845 | | |
25846 | | /** |
25847 | | * Assert that the values match with the type specs. |
25848 | | * Error messages are memorized and will only be shown once. |
25849 | | * |
25850 | | * @param {object} typeSpecs Map of name to a ReactPropType |
25851 | | * @param {object} values Runtime values that need to be type-checked |
25852 | | * @param {string} location e.g. "prop", "context", "child context" |
25853 | | * @param {string} componentName Name of the component for error messages. |
25854 | | * @param {?object} element The React element that is being type-checked |
25855 | | * @param {?number} debugID The React component instance that is being type-checked |
25856 | | * @private |
25857 | | */ |
25858 | | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { |
25859 | | for (var typeSpecName in typeSpecs) { |
25860 | | if (typeSpecs.hasOwnProperty(typeSpecName)) { |
25861 | | var error; |
25862 | | // Prop type validation may throw. In case they do, we don't want to |
25863 | | // fail the render phase where it didn't fail before. So we log it. |
25864 | | // After these have been cleaned up, we'll let them throw. |
25865 | | try { |
25866 | | // This is intentionally an invariant that gets caught. It's the same |
25867 | | // behavior as without this statement except with a better message. |
25868 | | !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; |
25869 | | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
25870 | | } catch (ex) { |
25871 | | error = ex; |
25872 | | } |
25873 | | true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; |
25874 | | if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
25875 | | // Only monitor this failure once because there tends to be a lot of the |
25876 | | // same error. |
25877 | | loggedTypeFailures[error.message] = true; |
25878 | | |
25879 | | var componentStackInfo = ''; |
25880 | | |
25881 | | if (true) { |
25882 | | if (!ReactComponentTreeHook) { |
25883 | | ReactComponentTreeHook = __webpack_require__(354); |
25884 | | } |
25885 | | if (debugID !== null) { |
25886 | | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); |
25887 | | } else if (element !== null) { |
25888 | | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); |
25889 | | } |
25890 | | } |
25891 | | |
25892 | | true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; |
25893 | | } |
25894 | | } |
25895 | | } |
25896 | | } |
25897 | | |
25898 | | module.exports = checkReactTypeSpec; |
25899 | | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(356))) |
25900 | | |
25901 | | /***/ }), |
25902 | | /* 459 */ |
25903 | | /***/ (function(module, exports, __webpack_require__) { |
25904 | | |
25905 | | /** |
25906 | | * Copyright (c) 2013-present, Facebook, Inc. |
25907 | | * |
25908 | | * This source code is licensed under the MIT license found in the |
25909 | | * LICENSE file in the root directory of this source tree. |
25910 | | * |
25911 | | * |
25912 | | */ |
25913 | | |
25914 | | 'use strict'; |
25915 | | |
25916 | | var ReactPropTypeLocationNames = {}; |
25917 | | |
25918 | | if (true) { |
25919 | | ReactPropTypeLocationNames = { |
25920 | | prop: 'prop', |
25921 | | context: 'context', |
25922 | | childContext: 'child context' |
25923 | | }; |
25924 | | } |
25925 | | |
25926 | | module.exports = ReactPropTypeLocationNames; |
25927 | | |
25928 | | /***/ }), |
25929 | | /* 460 */ |
25930 | | /***/ (function(module, exports) { |
25931 | | |
25932 | | /** |
25933 | | * Copyright (c) 2013-present, Facebook, Inc. |
25934 | | * |
25935 | | * This source code is licensed under the MIT license found in the |
25936 | | * LICENSE file in the root directory of this source tree. |
25937 | | * |
25938 | | * @typechecks |
25939 | | * |
25940 | | */ |
25941 | | |
25942 | | /*eslint-disable no-self-compare */ |
25943 | | |
25944 | | 'use strict'; |
25945 | | |
25946 | | var hasOwnProperty = Object.prototype.hasOwnProperty; |
25947 | | |
25948 | | /** |
25949 | | * inlined Object.is polyfill to avoid requiring consumers ship their own |
25950 | | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
25951 | | */ |
25952 | | function is(x, y) { |
25953 | | // SameValue algorithm |
25954 | | if (x === y) { |
25955 | | // Steps 1-5, 7-10 |
25956 | | // Steps 6.b-6.e: +0 != -0 |
25957 | | // Added the nonzero y check to make Flow happy, but it is redundant |
25958 | | return x !== 0 || y !== 0 || 1 / x === 1 / y; |
25959 | | } else { |
25960 | | // Step 6.a: NaN == NaN |
25961 | | return x !== x && y !== y; |
25962 | | } |
25963 | | } |
25964 | | |
25965 | | /** |
25966 | | * Performs equality by iterating through keys on an object and returning false |
25967 | | * when any key has values which are not strictly equal between the arguments. |
25968 | | * Returns true when the values of all keys are strictly equal. |
25969 | | */ |
25970 | | function shallowEqual(objA, objB) { |
25971 | | if (is(objA, objB)) { |
25972 | | return true; |
25973 | | } |
25974 | | |
25975 | | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { |
25976 | | return false; |
25977 | | } |
25978 | | |
25979 | | var keysA = Object.keys(objA); |
25980 | | var keysB = Object.keys(objB); |
25981 | | |
25982 | | if (keysA.length !== keysB.length) { |
25983 | | return false; |
25984 | | } |
25985 | | |
25986 | | // Test for A's keys different from B. |
25987 | | for (var i = 0; i < keysA.length; i++) { |
25988 | | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { |
25989 | | return false; |
25990 | | } |
25991 | | } |
25992 | | |
25993 | | return true; |
25994 | | } |
25995 | | |
25996 | | module.exports = shallowEqual; |
25997 | | |
25998 | | /***/ }), |
25999 | | /* 461 */ |
26000 | | /***/ (function(module, exports) { |
26001 | | |
26002 | | /** |
26003 | | * Copyright (c) 2013-present, Facebook, Inc. |
26004 | | * |
26005 | | * This source code is licensed under the MIT license found in the |
26006 | | * LICENSE file in the root directory of this source tree. |
26007 | | * |
26008 | | */ |
26009 | | |
26010 | | 'use strict'; |
26011 | | |
26012 | | /** |
26013 | | * Given a `prevElement` and `nextElement`, determines if the existing |
26014 | | * instance should be updated as opposed to being destroyed or replaced by a new |
26015 | | * instance. Both arguments are elements. This ensures that this logic can |
26016 | | * operate on stateless trees without any backing instance. |
26017 | | * |
26018 | | * @param {?object} prevElement |
26019 | | * @param {?object} nextElement |
26020 | | * @return {boolean} True if the existing instance should be updated. |
26021 | | * @protected |
26022 | | */ |
26023 | | |
26024 | | function shouldUpdateReactComponent(prevElement, nextElement) { |
26025 | | var prevEmpty = prevElement === null || prevElement === false; |
26026 | | var nextEmpty = nextElement === null || nextElement === false; |
26027 | | if (prevEmpty || nextEmpty) { |
26028 | | return prevEmpty === nextEmpty; |
26029 | | } |
26030 | | |
26031 | | var prevType = typeof prevElement; |
26032 | | var nextType = typeof nextElement; |
26033 | | if (prevType === 'string' || prevType === 'number') { |
26034 | | return nextType === 'string' || nextType === 'number'; |
26035 | | } else { |
26036 | | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; |
26037 | | } |
26038 | | } |
26039 | | |
26040 | | module.exports = shouldUpdateReactComponent; |
26041 | | |
26042 | | /***/ }), |
26043 | | /* 462 */ |
26044 | | /***/ (function(module, exports) { |
26045 | | |
26046 | | /** |
26047 | | * Copyright (c) 2014-present, Facebook, Inc. |
26048 | | * |
26049 | | * This source code is licensed under the MIT license found in the |
26050 | | * LICENSE file in the root directory of this source tree. |
26051 | | * |
26052 | | */ |
26053 | | |
26054 | | 'use strict'; |
26055 | | |
26056 | | var emptyComponentFactory; |
26057 | | |
26058 | | var ReactEmptyComponentInjection = { |
26059 | | injectEmptyComponentFactory: function (factory) { |
26060 | | emptyComponentFactory = factory; |
26061 | | } |
26062 | | }; |
26063 | | |
26064 | | var ReactEmptyComponent = { |
26065 | | create: function (instantiate) { |
26066 | | return emptyComponentFactory(instantiate); |
26067 | | } |
26068 | | }; |
26069 | | |
26070 | | ReactEmptyComponent.injection = ReactEmptyComponentInjection; |
26071 | | |
26072 | | module.exports = ReactEmptyComponent; |
26073 | | |
26074 | | /***/ }), |
26075 | | /* 463 */ |
26076 | | /***/ (function(module, exports, __webpack_require__) { |
26077 | | |
26078 | | /** |
26079 | | * Copyright (c) 2014-present, Facebook, Inc. |
26080 | | * |
26081 | | * This source code is licensed under the MIT license found in the |
26082 | | * LICENSE file in the root directory of this source tree. |
26083 | | * |
26084 | | */ |
26085 | | |
26086 | | 'use strict'; |
26087 | | |
26088 | | var _prodInvariant = __webpack_require__(371); |
26089 | | |
26090 | | var invariant = __webpack_require__(342); |
26091 | | |
26092 | | var genericComponentClass = null; |
26093 | | var textComponentClass = null; |
26094 | | |
26095 | | var ReactHostComponentInjection = { |
26096 | | // This accepts a class that receives the tag string. This is a catch all |
26097 | | // that can render any kind of tag. |
26098 | | injectGenericComponentClass: function (componentClass) { |
26099 | | genericComponentClass = componentClass; |
26100 | | }, |
26101 | | // This accepts a text component class that takes the text string to be |
26102 | | // rendered as props. |
26103 | | injectTextComponentClass: function (componentClass) { |
26104 | | textComponentClass = componentClass; |
26105 | | } |
26106 | | }; |
26107 | | |
26108 | | /** |
26109 | | * Get a host internal component class for a specific tag. |
26110 | | * |
26111 | | * @param {ReactElement} element The element to create. |
26112 | | * @return {function} The internal class constructor function. |
26113 | | */ |
26114 | | function createInternalComponent(element) { |
26115 | | !genericComponentClass ? true ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0; |
26116 | | return new genericComponentClass(element); |
26117 | | } |
26118 | | |
26119 | | /** |
26120 | | * @param {ReactText} text |
26121 | | * @return {ReactComponent} |
26122 | | */ |
26123 | | function createInstanceForText(text) { |
26124 | | return new textComponentClass(text); |
26125 | | } |
26126 | | |
26127 | | /** |
26128 | | * @param {ReactComponent} component |
26129 | | * @return {boolean} |
26130 | | */ |
26131 | | function isTextComponent(component) { |
26132 | | return component instanceof textComponentClass; |
26133 | | } |
26134 | | |
26135 | | var ReactHostComponent = { |
26136 | | createInternalComponent: createInternalComponent, |
26137 | | createInstanceForText: createInstanceForText, |
26138 | | isTextComponent: isTextComponent, |
26139 | | injection: ReactHostComponentInjection |
26140 | | }; |
26141 | | |
26142 | | module.exports = ReactHostComponent; |
26143 | | |
26144 | | /***/ }), |
26145 | | /* 464 */ |
26146 | | /***/ (function(module, exports) { |
26147 | | |
26148 | | /** |
26149 | | * Copyright (c) 2013-present, Facebook, Inc. |
26150 | | * |
26151 | | * This source code is licensed under the MIT license found in the |
26152 | | * LICENSE file in the root directory of this source tree. |
26153 | | * |
26154 | | * |
26155 | | */ |
26156 | | |
26157 | | 'use strict'; |
26158 | | |
26159 | | var nextDebugID = 1; |
26160 | | |
26161 | | function getNextDebugID() { |
26162 | | return nextDebugID++; |
26163 | | } |
26164 | | |
26165 | | module.exports = getNextDebugID; |
26166 | | |
26167 | | /***/ }), |
26168 | | /* 465 */ |
26169 | | /***/ (function(module, exports) { |
26170 | | |
26171 | | /** |
26172 | | * Copyright (c) 2013-present, Facebook, Inc. |
26173 | | * |
26174 | | * This source code is licensed under the MIT license found in the |
26175 | | * LICENSE file in the root directory of this source tree. |
26176 | | * |
26177 | | * |
26178 | | */ |
26179 | | |
26180 | | 'use strict'; |
26181 | | |
26182 | | /** |
26183 | | * Escape and wrap key so it is safe to use as a reactid |
26184 | | * |
26185 | | * @param {string} key to be escaped. |
26186 | | * @return {string} the escaped key. |
26187 | | */ |
26188 | | |
26189 | | function escape(key) { |
26190 | | var escapeRegex = /[=:]/g; |
26191 | | var escaperLookup = { |
26192 | | '=': '=0', |
26193 | | ':': '=2' |
26194 | | }; |
26195 | | var escapedString = ('' + key).replace(escapeRegex, function (match) { |
26196 | | return escaperLookup[match]; |
26197 | | }); |
26198 | | |
26199 | | return '$' + escapedString; |
26200 | | } |
26201 | | |
26202 | | /** |
26203 | | * Unescape and unwrap key for human-readable display |
26204 | | * |
26205 | | * @param {string} key to unescape. |
26206 | | * @return {string} the unescaped key. |
26207 | | */ |
26208 | | function unescape(key) { |
26209 | | var unescapeRegex = /(=0|=2)/g; |
26210 | | var unescaperLookup = { |
26211 | | '=0': '=', |
26212 | | '=2': ':' |
26213 | | }; |
26214 | | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); |
26215 | | |
26216 | | return ('' + keySubstring).replace(unescapeRegex, function (match) { |
26217 | | return unescaperLookup[match]; |
26218 | | }); |
26219 | | } |
26220 | | |
26221 | | var KeyEscapeUtils = { |
26222 | | escape: escape, |
26223 | | unescape: unescape |
26224 | | }; |
26225 | | |
26226 | | module.exports = KeyEscapeUtils; |
26227 | | |
26228 | | /***/ }), |
26229 | | /* 466 */ |
26230 | | /***/ (function(module, exports, __webpack_require__) { |
26231 | | |
26232 | | /** |
26233 | | * Copyright (c) 2013-present, Facebook, Inc. |
26234 | | * |
26235 | | * This source code is licensed under the MIT license found in the |
26236 | | * LICENSE file in the root directory of this source tree. |
26237 | | * |
26238 | | */ |
26239 | | |
26240 | | 'use strict'; |
26241 | | |
26242 | | var _prodInvariant = __webpack_require__(371); |
26243 | | |
26244 | | var ReactCurrentOwner = __webpack_require__(347); |
26245 | | var REACT_ELEMENT_TYPE = __webpack_require__(467); |
26246 | | |
26247 | | var getIteratorFn = __webpack_require__(468); |
26248 | | var invariant = __webpack_require__(342); |
26249 | | var KeyEscapeUtils = __webpack_require__(465); |
26250 | | var warning = __webpack_require__(338); |
26251 | | |
26252 | | var SEPARATOR = '.'; |
26253 | | var SUBSEPARATOR = ':'; |
26254 | | |
26255 | | /** |
26256 | | * This is inlined from ReactElement since this file is shared between |
26257 | | * isomorphic and renderers. We could extract this to a |
26258 | | * |
26259 | | */ |
26260 | | |
26261 | | /** |
26262 | | * TODO: Test that a single child and an array with one item have the same key |
26263 | | * pattern. |
26264 | | */ |
26265 | | |
26266 | | var didWarnAboutMaps = false; |
26267 | | |
26268 | | /** |
26269 | | * Generate a key string that identifies a component within a set. |
26270 | | * |
26271 | | * @param {*} component A component that could contain a manual key. |
26272 | | * @param {number} index Index that is used if a manual key is not provided. |
26273 | | * @return {string} |
26274 | | */ |
26275 | | function getComponentKey(component, index) { |
26276 | | // Do some typechecking here since we call this blindly. We want to ensure |
26277 | | // that we don't block potential future ES APIs. |
26278 | | if (component && typeof component === 'object' && component.key != null) { |
26279 | | // Explicit key |
26280 | | return KeyEscapeUtils.escape(component.key); |
26281 | | } |
26282 | | // Implicit key determined by the index in the set |
26283 | | return index.toString(36); |
26284 | | } |
26285 | | |
26286 | | /** |
26287 | | * @param {?*} children Children tree container. |
26288 | | * @param {!string} nameSoFar Name of the key path so far. |
26289 | | * @param {!function} callback Callback to invoke with each child found. |
26290 | | * @param {?*} traverseContext Used to pass information throughout the traversal |
26291 | | * process. |
26292 | | * @return {!number} The number of children in this subtree. |
26293 | | */ |
26294 | | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { |
26295 | | var type = typeof children; |
26296 | | |
26297 | | if (type === 'undefined' || type === 'boolean') { |
26298 | | // All of the above are perceived as null. |
26299 | | children = null; |
26300 | | } |
26301 | | |
26302 | | if (children === null || type === 'string' || type === 'number' || |
26303 | | // The following is inlined from ReactElement. This means we can optimize |
26304 | | // some checks. React Fiber also inlines this logic for similar purposes. |
26305 | | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { |
26306 | | callback(traverseContext, children, |
26307 | | // If it's the only child, treat the name as if it was wrapped in an array |
26308 | | // so that it's consistent if the number of children grows. |
26309 | | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); |
26310 | | return 1; |
26311 | | } |
26312 | | |
26313 | | var child; |
26314 | | var nextName; |
26315 | | var subtreeCount = 0; // Count of children found in the current subtree. |
26316 | | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; |
26317 | | |
26318 | | if (Array.isArray(children)) { |
26319 | | for (var i = 0; i < children.length; i++) { |
26320 | | child = children[i]; |
26321 | | nextName = nextNamePrefix + getComponentKey(child, i); |
26322 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
26323 | | } |
26324 | | } else { |
26325 | | var iteratorFn = getIteratorFn(children); |
26326 | | if (iteratorFn) { |
26327 | | var iterator = iteratorFn.call(children); |
26328 | | var step; |
26329 | | if (iteratorFn !== children.entries) { |
26330 | | var ii = 0; |
26331 | | while (!(step = iterator.next()).done) { |
26332 | | child = step.value; |
26333 | | nextName = nextNamePrefix + getComponentKey(child, ii++); |
26334 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
26335 | | } |
26336 | | } else { |
26337 | | if (true) { |
26338 | | var mapsAsChildrenAddendum = ''; |
26339 | | if (ReactCurrentOwner.current) { |
26340 | | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); |
26341 | | if (mapsAsChildrenOwnerName) { |
26342 | | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; |
26343 | | } |
26344 | | } |
26345 | | true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; |
26346 | | didWarnAboutMaps = true; |
26347 | | } |
26348 | | // Iterator will provide entry [k,v] tuples rather than values. |
26349 | | while (!(step = iterator.next()).done) { |
26350 | | var entry = step.value; |
26351 | | if (entry) { |
26352 | | child = entry[1]; |
26353 | | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); |
26354 | | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); |
26355 | | } |
26356 | | } |
26357 | | } |
26358 | | } else if (type === 'object') { |
26359 | | var addendum = ''; |
26360 | | if (true) { |
26361 | | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; |
26362 | | if (children._isReactElement) { |
26363 | | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; |
26364 | | } |
26365 | | if (ReactCurrentOwner.current) { |
26366 | | var name = ReactCurrentOwner.current.getName(); |
26367 | | if (name) { |
26368 | | addendum += ' Check the render method of `' + name + '`.'; |
26369 | | } |
26370 | | } |
26371 | | } |
26372 | | var childrenString = String(children); |
26373 | | true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; |
26374 | | } |
26375 | | } |
26376 | | |
26377 | | return subtreeCount; |
26378 | | } |
26379 | | |
26380 | | /** |
26381 | | * Traverses children that are typically specified as `props.children`, but |
26382 | | * might also be specified through attributes: |
26383 | | * |
26384 | | * - `traverseAllChildren(this.props.children, ...)` |
26385 | | * - `traverseAllChildren(this.props.leftPanelChildren, ...)` |
26386 | | * |
26387 | | * The `traverseContext` is an optional argument that is passed through the |
26388 | | * entire traversal. It can be used to store accumulations or anything else that |
26389 | | * the callback might find relevant. |
26390 | | * |
26391 | | * @param {?*} children Children tree object. |
26392 | | * @param {!function} callback To invoke upon traversing each child. |
26393 | | * @param {?*} traverseContext Context for traversal. |
26394 | | * @return {!number} The number of children in this subtree. |
26395 | | */ |
26396 | | function traverseAllChildren(children, callback, traverseContext) { |
26397 | | if (children == null) { |
26398 | | return 0; |
26399 | | } |
26400 | | |
26401 | | return traverseAllChildrenImpl(children, '', callback, traverseContext); |
26402 | | } |
26403 | | |
26404 | | module.exports = traverseAllChildren; |
26405 | | |
26406 | | /***/ }), |
26407 | | /* 467 */ |
26408 | | /***/ (function(module, exports) { |
26409 | | |
26410 | | /** |
26411 | | * Copyright (c) 2014-present, Facebook, Inc. |
26412 | | * |
26413 | | * This source code is licensed under the MIT license found in the |
26414 | | * LICENSE file in the root directory of this source tree. |
26415 | | * |
26416 | | * |
26417 | | */ |
26418 | | |
26419 | | 'use strict'; |
26420 | | |
26421 | | // The Symbol used to tag the ReactElement type. If there is no native Symbol |
26422 | | // nor polyfill, then a plain number is used for performance. |
26423 | | |
26424 | | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; |
26425 | | |
26426 | | module.exports = REACT_ELEMENT_TYPE; |
26427 | | |
26428 | | /***/ }), |
26429 | | /* 468 */ |
26430 | | /***/ (function(module, exports) { |
26431 | | |
26432 | | /** |
26433 | | * Copyright (c) 2013-present, Facebook, Inc. |
26434 | | * |
26435 | | * This source code is licensed under the MIT license found in the |
26436 | | * LICENSE file in the root directory of this source tree. |
26437 | | * |
26438 | | * |
26439 | | */ |
26440 | | |
26441 | | 'use strict'; |
26442 | | |
26443 | | /* global Symbol */ |
26444 | | |
26445 | | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
26446 | | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
26447 | | |
26448 | | /** |
26449 | | * Returns the iterator method function contained on the iterable object. |
26450 | | * |
26451 | | * Be sure to invoke the function with the iterable as context: |
26452 | | * |
26453 | | * var iteratorFn = getIteratorFn(myIterable); |
26454 | | * if (iteratorFn) { |
26455 | | * var iterator = iteratorFn.call(myIterable); |
26456 | | * ... |
26457 | | * } |
26458 | | * |
26459 | | * @param {?object} maybeIterable |
26460 | | * @return {?function} |
26461 | | */ |
26462 | | function getIteratorFn(maybeIterable) { |
26463 | | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
26464 | | if (typeof iteratorFn === 'function') { |
26465 | | return iteratorFn; |
26466 | | } |
26467 | | } |
26468 | | |
26469 | | module.exports = getIteratorFn; |
26470 | | |
26471 | | /***/ }), |
26472 | | /* 469 */ |
26473 | | /***/ (function(module, exports, __webpack_require__) { |
26474 | | |
26475 | | /* WEBPACK VAR INJECTION */(function(process) {/** |
26476 | | * Copyright (c) 2013-present, Facebook, Inc. |
26477 | | * |
26478 | | * This source code is licensed under the MIT license found in the |
26479 | | * LICENSE file in the root directory of this source tree. |
26480 | | * |
26481 | | * |
26482 | | */ |
26483 | | |
26484 | | 'use strict'; |
26485 | | |
26486 | | var KeyEscapeUtils = __webpack_require__(465); |
26487 | | var traverseAllChildren = __webpack_require__(466); |
26488 | | var warning = __webpack_require__(338); |
26489 | | |
26490 | | var ReactComponentTreeHook; |
26491 | | |
26492 | | if (typeof process !== 'undefined' && ({"NODE_ENV":"development"}) && ("development") === 'test') { |
26493 | | // Temporary hack. |
26494 | | // Inline requires don't work well with Jest: |
26495 | | // https://github.com/facebook/react/issues/7240 |
26496 | | // Remove the inline requires when we don't need them anymore: |
26497 | | // https://github.com/facebook/react/pull/7178 |
26498 | | ReactComponentTreeHook = __webpack_require__(354); |
26499 | | } |
26500 | | |
26501 | | /** |
26502 | | * @param {function} traverseContext Context passed through traversal. |
26503 | | * @param {?ReactComponent} child React child component. |
26504 | | * @param {!string} name String name of key path to child. |
26505 | | * @param {number=} selfDebugID Optional debugID of the current internal instance. |
26506 | | */ |
26507 | | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { |
26508 | | // We found a component instance. |
26509 | | if (traverseContext && typeof traverseContext === 'object') { |
26510 | | var result = traverseContext; |
26511 | | var keyUnique = result[name] === undefined; |
26512 | | if (true) { |
26513 | | if (!ReactComponentTreeHook) { |
26514 | | ReactComponentTreeHook = __webpack_require__(354); |
26515 | | } |
26516 | | if (!keyUnique) { |
26517 | | true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; |
26518 | | } |
26519 | | } |
26520 | | if (keyUnique && child != null) { |
26521 | | result[name] = child; |
26522 | | } |
26523 | | } |
26524 | | } |
26525 | | |
26526 | | /** |
26527 | | * Flattens children that are typically specified as `props.children`. Any null |
26528 | | * children will not be included in the resulting object. |
26529 | | * @return {!object} flattened children keyed by name. |
26530 | | */ |
26531 | | function flattenChildren(children, selfDebugID) { |
26532 | | if (children == null) { |
26533 | | return children; |
26534 | | } |
26535 | | var result = {}; |
26536 | | |
26537 | | if (true) { |
26538 | | traverseAllChildren(children, function (traverseContext, child, name) { |
26539 | | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); |
26540 | | }, result); |
26541 | | } else { |
26542 | | traverseAllChildren(children, flattenSingleChildIntoContext, result); |
26543 | | } |
26544 | | return result; |
26545 | | } |
26546 | | |
26547 | | module.exports = flattenChildren; |
26548 | | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(356))) |
26549 | | |
26550 | | /***/ }), |
26551 | | /* 470 */ |
26552 | | /***/ (function(module, exports, __webpack_require__) { |
26553 | | |
26554 | | /** |
26555 | | * Copyright (c) 2014-present, Facebook, Inc. |
26556 | | * |
26557 | | * This source code is licensed under the MIT license found in the |
26558 | | * LICENSE file in the root directory of this source tree. |
26559 | | * |
26560 | | */ |
26561 | | |
26562 | | 'use strict'; |
26563 | | |
26564 | | var _assign = __webpack_require__(334); |
26565 | | |
26566 | | var PooledClass = __webpack_require__(386); |
26567 | | var Transaction = __webpack_require__(404); |
26568 | | var ReactInstrumentation = __webpack_require__(398); |
26569 | | var ReactServerUpdateQueue = __webpack_require__(471); |
26570 | | |
26571 | | /** |
26572 | | * Executed within the scope of the `Transaction` instance. Consider these as |
26573 | | * being member methods, but with an implied ordering while being isolated from |
26574 | | * each other. |
26575 | | */ |
26576 | | var TRANSACTION_WRAPPERS = []; |
26577 | | |
26578 | | if (true) { |
26579 | | TRANSACTION_WRAPPERS.push({ |
26580 | | initialize: ReactInstrumentation.debugTool.onBeginFlush, |
26581 | | close: ReactInstrumentation.debugTool.onEndFlush |
26582 | | }); |
26583 | | } |
26584 | | |
26585 | | var noopCallbackQueue = { |
26586 | | enqueue: function () {} |
26587 | | }; |
26588 | | |
26589 | | /** |
26590 | | * @class ReactServerRenderingTransaction |
26591 | | * @param {boolean} renderToStaticMarkup |
26592 | | */ |
26593 | | function ReactServerRenderingTransaction(renderToStaticMarkup) { |
26594 | | this.reinitializeTransaction(); |
26595 | | this.renderToStaticMarkup = renderToStaticMarkup; |
26596 | | this.useCreateElement = false; |
26597 | | this.updateQueue = new ReactServerUpdateQueue(this); |
26598 | | } |
26599 | | |
26600 | | var Mixin = { |
26601 | | /** |
26602 | | * @see Transaction |
26603 | | * @abstract |
26604 | | * @final |
26605 | | * @return {array} Empty list of operation wrap procedures. |
26606 | | */ |
26607 | | getTransactionWrappers: function () { |
26608 | | return TRANSACTION_WRAPPERS; |
26609 | | }, |
26610 | | |
26611 | | /** |
26612 | | * @return {object} The queue to collect `onDOMReady` callbacks with. |
26613 | | */ |
26614 | | getReactMountReady: function () { |
26615 | | return noopCallbackQueue; |
26616 | | }, |
26617 | | |
26618 | | /** |
26619 | | * @return {object} The queue to collect React async events. |
26620 | | */ |
26621 | | getUpdateQueue: function () { |
26622 | | return this.updateQueue; |
26623 | | }, |
26624 | | |
26625 | | /** |
26626 | | * `PooledClass` looks for this, and will invoke this before allowing this |
26627 | | * instance to be reused. |
26628 | | */ |
26629 | | destructor: function () {}, |
26630 | | |
26631 | | checkpoint: function () {}, |
26632 | | |
26633 | | rollback: function () {} |
26634 | | }; |
26635 | | |
26636 | | _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); |
26637 | | |
26638 | | PooledClass.addPoolingTo(ReactServerRenderingTransaction); |
26639 | | |
26640 | | module.exports = ReactServerRenderingTransaction; |
26641 | | |
26642 | | /***/ }), |
26643 | | /* 471 */ |
26644 | | /***/ (function(module, exports, __webpack_require__) { |
26645 | | |
26646 | | /** |
26647 | | * Copyright (c) 2015-present, Facebook, Inc. |
26648 | | * |
26649 | | * This source code is licensed under the MIT license found in the |
26650 | | * LICENSE file in the root directory of this source tree. |
26651 | | * |
26652 | | * |
26653 | | */ |
26654 | | |
26655 | | 'use strict'; |
26656 | | |
26657 | | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } |
26658 | | |
26659 | | var ReactUpdateQueue = __webpack_require__(472); |
26660 | | |
26661 | | var warning = __webpack_require__(338); |
26662 | | |
26663 | | function warnNoop(publicInstance, callerName) { |
26664 | | if (true) { |
26665 | | var constructor = publicInstance.constructor; |
26666 | | true ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; |
26667 | | } |
26668 | | } |
26669 | | |
26670 | | /** |
26671 | | * This is the update queue used for server rendering. |
26672 | | * It delegates to ReactUpdateQueue while server rendering is in progress and |
26673 | | * switches to ReactNoopUpdateQueue after the transaction has completed. |
26674 | | * @class ReactServerUpdateQueue |
26675 | | * @param {Transaction} transaction |
26676 | | */ |
26677 | | |
26678 | | var ReactServerUpdateQueue = function () { |
26679 | | function ReactServerUpdateQueue(transaction) { |
26680 | | _classCallCheck(this, ReactServerUpdateQueue); |
26681 | | |
26682 | | this.transaction = transaction; |
26683 | | } |
26684 | | |
26685 | | /** |
26686 | | * Checks whether or not this composite component is mounted. |
26687 | | * @param {ReactClass} publicInstance The instance we want to test. |
26688 | | * @return {boolean} True if mounted, false otherwise. |
26689 | | * @protected |
26690 | | * @final |
26691 | | */ |
26692 | | |
26693 | | |
26694 | | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { |
26695 | | return false; |
26696 | | }; |
26697 | | |
26698 | | /** |
26699 | | * Enqueue a callback that will be executed after all the pending updates |
26700 | | * have processed. |
26701 | | * |
26702 | | * @param {ReactClass} publicInstance The instance to use as `this` context. |
26703 | | * @param {?function} callback Called after state is updated. |
26704 | | * @internal |
26705 | | */ |
26706 | | |
26707 | | |
26708 | | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { |
26709 | | if (this.transaction.isInTransaction()) { |
26710 | | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); |
26711 | | } |
26712 | | }; |
26713 | | |
26714 | | /** |
26715 | | * Forces an update. This should only be invoked when it is known with |
26716 | | * certainty that we are **not** in a DOM transaction. |
26717 | | * |
26718 | | * You may want to call this when you know that some deeper aspect of the |
26719 | | * component's state has changed but `setState` was not called. |
26720 | | * |
26721 | | * This will not invoke `shouldComponentUpdate`, but it will invoke |
26722 | | * `componentWillUpdate` and `componentDidUpdate`. |
26723 | | * |
26724 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26725 | | * @internal |
26726 | | */ |
26727 | | |
26728 | | |
26729 | | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { |
26730 | | if (this.transaction.isInTransaction()) { |
26731 | | ReactUpdateQueue.enqueueForceUpdate(publicInstance); |
26732 | | } else { |
26733 | | warnNoop(publicInstance, 'forceUpdate'); |
26734 | | } |
26735 | | }; |
26736 | | |
26737 | | /** |
26738 | | * Replaces all of the state. Always use this or `setState` to mutate state. |
26739 | | * You should treat `this.state` as immutable. |
26740 | | * |
26741 | | * There is no guarantee that `this.state` will be immediately updated, so |
26742 | | * accessing `this.state` after calling this method may return the old value. |
26743 | | * |
26744 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26745 | | * @param {object|function} completeState Next state. |
26746 | | * @internal |
26747 | | */ |
26748 | | |
26749 | | |
26750 | | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { |
26751 | | if (this.transaction.isInTransaction()) { |
26752 | | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); |
26753 | | } else { |
26754 | | warnNoop(publicInstance, 'replaceState'); |
26755 | | } |
26756 | | }; |
26757 | | |
26758 | | /** |
26759 | | * Sets a subset of the state. This only exists because _pendingState is |
26760 | | * internal. This provides a merging strategy that is not available to deep |
26761 | | * properties which is confusing. TODO: Expose pendingState or don't use it |
26762 | | * during the merge. |
26763 | | * |
26764 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26765 | | * @param {object|function} partialState Next partial state to be merged with state. |
26766 | | * @internal |
26767 | | */ |
26768 | | |
26769 | | |
26770 | | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { |
26771 | | if (this.transaction.isInTransaction()) { |
26772 | | ReactUpdateQueue.enqueueSetState(publicInstance, partialState); |
26773 | | } else { |
26774 | | warnNoop(publicInstance, 'setState'); |
26775 | | } |
26776 | | }; |
26777 | | |
26778 | | return ReactServerUpdateQueue; |
26779 | | }(); |
26780 | | |
26781 | | module.exports = ReactServerUpdateQueue; |
26782 | | |
26783 | | /***/ }), |
26784 | | /* 472 */ |
26785 | | /***/ (function(module, exports, __webpack_require__) { |
26786 | | |
26787 | | /** |
26788 | | * Copyright (c) 2015-present, Facebook, Inc. |
26789 | | * |
26790 | | * This source code is licensed under the MIT license found in the |
26791 | | * LICENSE file in the root directory of this source tree. |
26792 | | * |
26793 | | */ |
26794 | | |
26795 | | 'use strict'; |
26796 | | |
26797 | | var _prodInvariant = __webpack_require__(371); |
26798 | | |
26799 | | var ReactCurrentOwner = __webpack_require__(347); |
26800 | | var ReactInstanceMap = __webpack_require__(453); |
26801 | | var ReactInstrumentation = __webpack_require__(398); |
26802 | | var ReactUpdates = __webpack_require__(392); |
26803 | | |
26804 | | var invariant = __webpack_require__(342); |
26805 | | var warning = __webpack_require__(338); |
26806 | | |
26807 | | function enqueueUpdate(internalInstance) { |
26808 | | ReactUpdates.enqueueUpdate(internalInstance); |
26809 | | } |
26810 | | |
26811 | | function formatUnexpectedArgument(arg) { |
26812 | | var type = typeof arg; |
26813 | | if (type !== 'object') { |
26814 | | return type; |
26815 | | } |
26816 | | var displayName = arg.constructor && arg.constructor.name || type; |
26817 | | var keys = Object.keys(arg); |
26818 | | if (keys.length > 0 && keys.length < 20) { |
26819 | | return displayName + ' (keys: ' + keys.join(', ') + ')'; |
26820 | | } |
26821 | | return displayName; |
26822 | | } |
26823 | | |
26824 | | function getInternalInstanceReadyForUpdate(publicInstance, callerName) { |
26825 | | var internalInstance = ReactInstanceMap.get(publicInstance); |
26826 | | if (!internalInstance) { |
26827 | | if (true) { |
26828 | | var ctor = publicInstance.constructor; |
26829 | | // Only warn when we have a callerName. Otherwise we should be silent. |
26830 | | // We're probably calling from enqueueCallback. We don't want to warn |
26831 | | // there because we already warned for the corresponding lifecycle method. |
26832 | | true ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0; |
26833 | | } |
26834 | | return null; |
26835 | | } |
26836 | | |
26837 | | if (true) { |
26838 | | true ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; |
26839 | | } |
26840 | | |
26841 | | return internalInstance; |
26842 | | } |
26843 | | |
26844 | | /** |
26845 | | * ReactUpdateQueue allows for state updates to be scheduled into a later |
26846 | | * reconciliation step. |
26847 | | */ |
26848 | | var ReactUpdateQueue = { |
26849 | | /** |
26850 | | * Checks whether or not this composite component is mounted. |
26851 | | * @param {ReactClass} publicInstance The instance we want to test. |
26852 | | * @return {boolean} True if mounted, false otherwise. |
26853 | | * @protected |
26854 | | * @final |
26855 | | */ |
26856 | | isMounted: function (publicInstance) { |
26857 | | if (true) { |
26858 | | var owner = ReactCurrentOwner.current; |
26859 | | if (owner !== null) { |
26860 | | true ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; |
26861 | | owner._warnedAboutRefsInRender = true; |
26862 | | } |
26863 | | } |
26864 | | var internalInstance = ReactInstanceMap.get(publicInstance); |
26865 | | if (internalInstance) { |
26866 | | // During componentWillMount and render this will still be null but after |
26867 | | // that will always render to something. At least for now. So we can use |
26868 | | // this hack. |
26869 | | return !!internalInstance._renderedComponent; |
26870 | | } else { |
26871 | | return false; |
26872 | | } |
26873 | | }, |
26874 | | |
26875 | | /** |
26876 | | * Enqueue a callback that will be executed after all the pending updates |
26877 | | * have processed. |
26878 | | * |
26879 | | * @param {ReactClass} publicInstance The instance to use as `this` context. |
26880 | | * @param {?function} callback Called after state is updated. |
26881 | | * @param {string} callerName Name of the calling function in the public API. |
26882 | | * @internal |
26883 | | */ |
26884 | | enqueueCallback: function (publicInstance, callback, callerName) { |
26885 | | ReactUpdateQueue.validateCallback(callback, callerName); |
26886 | | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); |
26887 | | |
26888 | | // Previously we would throw an error if we didn't have an internal |
26889 | | // instance. Since we want to make it a no-op instead, we mirror the same |
26890 | | // behavior we have in other enqueue* methods. |
26891 | | // We also need to ignore callbacks in componentWillMount. See |
26892 | | // enqueueUpdates. |
26893 | | if (!internalInstance) { |
26894 | | return null; |
26895 | | } |
26896 | | |
26897 | | if (internalInstance._pendingCallbacks) { |
26898 | | internalInstance._pendingCallbacks.push(callback); |
26899 | | } else { |
26900 | | internalInstance._pendingCallbacks = [callback]; |
26901 | | } |
26902 | | // TODO: The callback here is ignored when setState is called from |
26903 | | // componentWillMount. Either fix it or disallow doing so completely in |
26904 | | // favor of getInitialState. Alternatively, we can disallow |
26905 | | // componentWillMount during server-side rendering. |
26906 | | enqueueUpdate(internalInstance); |
26907 | | }, |
26908 | | |
26909 | | enqueueCallbackInternal: function (internalInstance, callback) { |
26910 | | if (internalInstance._pendingCallbacks) { |
26911 | | internalInstance._pendingCallbacks.push(callback); |
26912 | | } else { |
26913 | | internalInstance._pendingCallbacks = [callback]; |
26914 | | } |
26915 | | enqueueUpdate(internalInstance); |
26916 | | }, |
26917 | | |
26918 | | /** |
26919 | | * Forces an update. This should only be invoked when it is known with |
26920 | | * certainty that we are **not** in a DOM transaction. |
26921 | | * |
26922 | | * You may want to call this when you know that some deeper aspect of the |
26923 | | * component's state has changed but `setState` was not called. |
26924 | | * |
26925 | | * This will not invoke `shouldComponentUpdate`, but it will invoke |
26926 | | * `componentWillUpdate` and `componentDidUpdate`. |
26927 | | * |
26928 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26929 | | * @internal |
26930 | | */ |
26931 | | enqueueForceUpdate: function (publicInstance) { |
26932 | | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); |
26933 | | |
26934 | | if (!internalInstance) { |
26935 | | return; |
26936 | | } |
26937 | | |
26938 | | internalInstance._pendingForceUpdate = true; |
26939 | | |
26940 | | enqueueUpdate(internalInstance); |
26941 | | }, |
26942 | | |
26943 | | /** |
26944 | | * Replaces all of the state. Always use this or `setState` to mutate state. |
26945 | | * You should treat `this.state` as immutable. |
26946 | | * |
26947 | | * There is no guarantee that `this.state` will be immediately updated, so |
26948 | | * accessing `this.state` after calling this method may return the old value. |
26949 | | * |
26950 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26951 | | * @param {object} completeState Next state. |
26952 | | * @internal |
26953 | | */ |
26954 | | enqueueReplaceState: function (publicInstance, completeState, callback) { |
26955 | | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); |
26956 | | |
26957 | | if (!internalInstance) { |
26958 | | return; |
26959 | | } |
26960 | | |
26961 | | internalInstance._pendingStateQueue = [completeState]; |
26962 | | internalInstance._pendingReplaceState = true; |
26963 | | |
26964 | | // Future-proof 15.5 |
26965 | | if (callback !== undefined && callback !== null) { |
26966 | | ReactUpdateQueue.validateCallback(callback, 'replaceState'); |
26967 | | if (internalInstance._pendingCallbacks) { |
26968 | | internalInstance._pendingCallbacks.push(callback); |
26969 | | } else { |
26970 | | internalInstance._pendingCallbacks = [callback]; |
26971 | | } |
26972 | | } |
26973 | | |
26974 | | enqueueUpdate(internalInstance); |
26975 | | }, |
26976 | | |
26977 | | /** |
26978 | | * Sets a subset of the state. This only exists because _pendingState is |
26979 | | * internal. This provides a merging strategy that is not available to deep |
26980 | | * properties which is confusing. TODO: Expose pendingState or don't use it |
26981 | | * during the merge. |
26982 | | * |
26983 | | * @param {ReactClass} publicInstance The instance that should rerender. |
26984 | | * @param {object} partialState Next partial state to be merged with state. |
26985 | | * @internal |
26986 | | */ |
26987 | | enqueueSetState: function (publicInstance, partialState) { |
26988 | | if (true) { |
26989 | | ReactInstrumentation.debugTool.onSetState(); |
26990 | | true ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; |
26991 | | } |
26992 | | |
26993 | | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); |
26994 | | |
26995 | | if (!internalInstance) { |
26996 | | return; |
26997 | | } |
26998 | | |
26999 | | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); |
27000 | | queue.push(partialState); |
27001 | | |
27002 | | enqueueUpdate(internalInstance); |
27003 | | }, |
27004 | | |
27005 | | enqueueElementInternal: function (internalInstance, nextElement, nextContext) { |
27006 | | internalInstance._pendingElement = nextElement; |
27007 | | // TODO: introduce _pendingContext instead of setting it directly. |
27008 | | internalInstance._context = nextContext; |
27009 | | enqueueUpdate(internalInstance); |
27010 | | }, |
27011 | | |
27012 | | validateCallback: function (callback, callerName) { |
27013 | | !(!callback || typeof callback === 'function') ? true ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; |
27014 | | } |
27015 | | }; |
27016 | | |
27017 | | module.exports = ReactUpdateQueue; |
27018 | | |
27019 | | /***/ }), |
27020 | | /* 473 */ |
27021 | | /***/ (function(module, exports, __webpack_require__) { |
27022 | | |
27023 | | /** |
27024 | | * Copyright (c) 2015-present, Facebook, Inc. |
27025 | | * |
27026 | | * This source code is licensed under the MIT license found in the |
27027 | | * LICENSE file in the root directory of this source tree. |
27028 | | * |
27029 | | */ |
27030 | | |
27031 | | 'use strict'; |
27032 | | |
27033 | | var _assign = __webpack_require__(334); |
27034 | | |
27035 | | var emptyFunction = __webpack_require__(339); |
27036 | | var warning = __webpack_require__(338); |
27037 | | |
27038 | | var validateDOMNesting = emptyFunction; |
27039 | | |
27040 | | if (true) { |
27041 | | // This validation code was written based on the HTML5 parsing spec: |
27042 | | // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope |
27043 | | // |
27044 | | // Note: this does not catch all invalid nesting, nor does it try to (as it's |
27045 | | // not clear what practical benefit doing so provides); instead, we warn only |
27046 | | // for cases where the parser will give a parse tree differing from what React |
27047 | | // intended. For example, <b><div></div></b> is invalid but we don't warn |
27048 | | // because it still parses correctly; we do warn for other cases like nested |
27049 | | // <p> tags where the beginning of the second element implicitly closes the |
27050 | | // first, causing a confusing mess. |
27051 | | |
27052 | | // https://html.spec.whatwg.org/multipage/syntax.html#special |
27053 | | var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; |
27054 | | |
27055 | | // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope |
27056 | | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', |
27057 | | |
27058 | | // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point |
27059 | | // TODO: Distinguish by namespace here -- for <title>, including it here |
27060 | | // errs on the side of fewer warnings |
27061 | | 'foreignObject', 'desc', 'title']; |
27062 | | |
27063 | | // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope |
27064 | | var buttonScopeTags = inScopeTags.concat(['button']); |
27065 | | |
27066 | | // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags |
27067 | | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; |
27068 | | |
27069 | | var emptyAncestorInfo = { |
27070 | | current: null, |
27071 | | |
27072 | | formTag: null, |
27073 | | aTagInScope: null, |
27074 | | buttonTagInScope: null, |
27075 | | nobrTagInScope: null, |
27076 | | pTagInButtonScope: null, |
27077 | | |
27078 | | listItemTagAutoclosing: null, |
27079 | | dlItemTagAutoclosing: null |
27080 | | }; |
27081 | | |
27082 | | var updatedAncestorInfo = function (oldInfo, tag, instance) { |
27083 | | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); |
27084 | | var info = { tag: tag, instance: instance }; |
27085 | | |
27086 | | if (inScopeTags.indexOf(tag) !== -1) { |
27087 | | ancestorInfo.aTagInScope = null; |
27088 | | ancestorInfo.buttonTagInScope = null; |
27089 | | ancestorInfo.nobrTagInScope = null; |
27090 | | } |
27091 | | if (buttonScopeTags.indexOf(tag) !== -1) { |
27092 | | ancestorInfo.pTagInButtonScope = null; |
27093 | | } |
27094 | | |
27095 | | // See rules for 'li', 'dd', 'dt' start tags in |
27096 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody |
27097 | | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { |
27098 | | ancestorInfo.listItemTagAutoclosing = null; |
27099 | | ancestorInfo.dlItemTagAutoclosing = null; |
27100 | | } |
27101 | | |
27102 | | ancestorInfo.current = info; |
27103 | | |
27104 | | if (tag === 'form') { |
27105 | | ancestorInfo.formTag = info; |
27106 | | } |
27107 | | if (tag === 'a') { |
27108 | | ancestorInfo.aTagInScope = info; |
27109 | | } |
27110 | | if (tag === 'button') { |
27111 | | ancestorInfo.buttonTagInScope = info; |
27112 | | } |
27113 | | if (tag === 'nobr') { |
27114 | | ancestorInfo.nobrTagInScope = info; |
27115 | | } |
27116 | | if (tag === 'p') { |
27117 | | ancestorInfo.pTagInButtonScope = info; |
27118 | | } |
27119 | | if (tag === 'li') { |
27120 | | ancestorInfo.listItemTagAutoclosing = info; |
27121 | | } |
27122 | | if (tag === 'dd' || tag === 'dt') { |
27123 | | ancestorInfo.dlItemTagAutoclosing = info; |
27124 | | } |
27125 | | |
27126 | | return ancestorInfo; |
27127 | | }; |
27128 | | |
27129 | | /** |
27130 | | * Returns whether |
27131 | | */ |
27132 | | var isTagValidWithParent = function (tag, parentTag) { |
27133 | | // First, let's check if we're in an unusual parsing mode... |
27134 | | switch (parentTag) { |
27135 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect |
27136 | | case 'select': |
27137 | | return tag === 'option' || tag === 'optgroup' || tag === '#text'; |
27138 | | case 'optgroup': |
27139 | | return tag === 'option' || tag === '#text'; |
27140 | | // Strictly speaking, seeing an <option> doesn't mean we're in a <select> |
27141 | | // but |
27142 | | case 'option': |
27143 | | return tag === '#text'; |
27144 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd |
27145 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption |
27146 | | // No special behavior since these rules fall back to "in body" mode for |
27147 | | // all except special table nodes which cause bad parsing behavior anyway. |
27148 | | |
27149 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr |
27150 | | case 'tr': |
27151 | | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; |
27152 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody |
27153 | | case 'tbody': |
27154 | | case 'thead': |
27155 | | case 'tfoot': |
27156 | | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; |
27157 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup |
27158 | | case 'colgroup': |
27159 | | return tag === 'col' || tag === 'template'; |
27160 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable |
27161 | | case 'table': |
27162 | | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; |
27163 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead |
27164 | | case 'head': |
27165 | | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; |
27166 | | // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element |
27167 | | case 'html': |
27168 | | return tag === 'head' || tag === 'body'; |
27169 | | case '#document': |
27170 | | return tag === 'html'; |
27171 | | } |
27172 | | |
27173 | | // Probably in the "in body" parsing mode, so we outlaw only tag combos |
27174 | | // where the parsing rules cause implicit opens or closes to be added. |
27175 | | // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody |
27176 | | switch (tag) { |
27177 | | case 'h1': |
27178 | | case 'h2': |
27179 | | case 'h3': |
27180 | | case 'h4': |
27181 | | case 'h5': |
27182 | | case 'h6': |
27183 | | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; |
27184 | | |
27185 | | case 'rp': |
27186 | | case 'rt': |
27187 | | return impliedEndTags.indexOf(parentTag) === -1; |
27188 | | |
27189 | | case 'body': |
27190 | | case 'caption': |
27191 | | case 'col': |
27192 | | case 'colgroup': |
27193 | | case 'frame': |
27194 | | case 'head': |
27195 | | case 'html': |
27196 | | case 'tbody': |
27197 | | case 'td': |
27198 | | case 'tfoot': |
27199 | | case 'th': |
27200 | | case 'thead': |
27201 | | case 'tr': |
27202 | | // These tags are only valid with a few parents that have special child |
27203 | | // parsing rules -- if we're down here, then none of those matched and |
27204 | | // so we allow it only if we don't know what the parent is, as all other |
27205 | | // cases are invalid. |
27206 | | return parentTag == null; |
27207 | | } |
27208 | | |
27209 | | return true; |
27210 | | }; |
27211 | | |
27212 | | /** |
27213 | | * Returns whether |
27214 | | */ |
27215 | | var findInvalidAncestorForTag = function (tag, ancestorInfo) { |
27216 | | switch (tag) { |
27217 | | case 'address': |
27218 | | case 'article': |
27219 | | case 'aside': |
27220 | | case 'blockquote': |
27221 | | case 'center': |
27222 | | case 'details': |
27223 | | case 'dialog': |
27224 | | case 'dir': |
27225 | | case 'div': |
27226 | | case 'dl': |
27227 | | case 'fieldset': |
27228 | | case 'figcaption': |
27229 | | case 'figure': |
27230 | | case 'footer': |
27231 | | case 'header': |
27232 | | case 'hgroup': |
27233 | | case 'main': |
27234 | | case 'menu': |
27235 | | case 'nav': |
27236 | | case 'ol': |
27237 | | case 'p': |
27238 | | case 'section': |
27239 | | case 'summary': |
27240 | | case 'ul': |
27241 | | case 'pre': |
27242 | | case 'listing': |
27243 | | case 'table': |
27244 | | case 'hr': |
27245 | | case 'xmp': |
27246 | | case 'h1': |
27247 | | case 'h2': |
27248 | | case 'h3': |
27249 | | case 'h4': |
27250 | | case 'h5': |
27251 | | case 'h6': |
27252 | | return ancestorInfo.pTagInButtonScope; |
27253 | | |
27254 | | case 'form': |
27255 | | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; |
27256 | | |
27257 | | case 'li': |
27258 | | return ancestorInfo.listItemTagAutoclosing; |
27259 | | |
27260 | | case 'dd': |
27261 | | case 'dt': |
27262 | | return ancestorInfo.dlItemTagAutoclosing; |
27263 | | |
27264 | | case 'button': |
27265 | | return ancestorInfo.buttonTagInScope; |
27266 | | |
27267 | | case 'a': |
27268 | | // Spec says something about storing a list of markers, but it sounds |
27269 | | // equivalent to this check. |
27270 | | return ancestorInfo.aTagInScope; |
27271 | | |
27272 | | case 'nobr': |
27273 | | return ancestorInfo.nobrTagInScope; |
27274 | | } |
27275 | | |
27276 | | return null; |
27277 | | }; |
27278 | | |
27279 | | /** |
27280 | | * Given a ReactCompositeComponent instance, return a list of its recursive |
27281 | | * owners, starting at the root and ending with the instance itself. |
27282 | | */ |
27283 | | var findOwnerStack = function (instance) { |
27284 | | if (!instance) { |
27285 | | return []; |
27286 | | } |
27287 | | |
27288 | | var stack = []; |
27289 | | do { |
27290 | | stack.push(instance); |
27291 | | } while (instance = instance._currentElement._owner); |
27292 | | stack.reverse(); |
27293 | | return stack; |
27294 | | }; |
27295 | | |
27296 | | var didWarn = {}; |
27297 | | |
27298 | | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { |
27299 | | ancestorInfo = ancestorInfo || emptyAncestorInfo; |
27300 | | var parentInfo = ancestorInfo.current; |
27301 | | var parentTag = parentInfo && parentInfo.tag; |
27302 | | |
27303 | | if (childText != null) { |
27304 | | true ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0; |
27305 | | childTag = '#text'; |
27306 | | } |
27307 | | |
27308 | | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; |
27309 | | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); |
27310 | | var problematic = invalidParent || invalidAncestor; |
27311 | | |
27312 | | if (problematic) { |
27313 | | var ancestorTag = problematic.tag; |
27314 | | var ancestorInstance = problematic.instance; |
27315 | | |
27316 | | var childOwner = childInstance && childInstance._currentElement._owner; |
27317 | | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; |
27318 | | |
27319 | | var childOwners = findOwnerStack(childOwner); |
27320 | | var ancestorOwners = findOwnerStack(ancestorOwner); |
27321 | | |
27322 | | var minStackLen = Math.min(childOwners.length, ancestorOwners.length); |
27323 | | var i; |
27324 | | |
27325 | | var deepestCommon = -1; |
27326 | | for (i = 0; i < minStackLen; i++) { |
27327 | | if (childOwners[i] === ancestorOwners[i]) { |
27328 | | deepestCommon = i; |
27329 | | } else { |
27330 | | break; |
27331 | | } |
27332 | | } |
27333 | | |
27334 | | var UNKNOWN = '(unknown)'; |
27335 | | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { |
27336 | | return inst.getName() || UNKNOWN; |
27337 | | }); |
27338 | | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { |
27339 | | return inst.getName() || UNKNOWN; |
27340 | | }); |
27341 | | var ownerInfo = [].concat( |
27342 | | // If the parent and child instances have a common owner ancestor, start |
27343 | | // with that -- otherwise we just start with the parent's owners. |
27344 | | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, |
27345 | | // If we're warning about an invalid (non-parent) ancestry, add '...' |
27346 | | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); |
27347 | | |
27348 | | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; |
27349 | | if (didWarn[warnKey]) { |
27350 | | return; |
27351 | | } |
27352 | | didWarn[warnKey] = true; |
27353 | | |
27354 | | var tagDisplayName = childTag; |
27355 | | var whitespaceInfo = ''; |
27356 | | if (childTag === '#text') { |
27357 | | if (/\S/.test(childText)) { |
27358 | | tagDisplayName = 'Text nodes'; |
27359 | | } else { |
27360 | | tagDisplayName = 'Whitespace text nodes'; |
27361 | | whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; |
27362 | | } |
27363 | | } else { |
27364 | | tagDisplayName = '<' + childTag + '>'; |
27365 | | } |
27366 | | |
27367 | | if (invalidParent) { |
27368 | | var info = ''; |
27369 | | if (ancestorTag === 'table' && childTag === 'tr') { |
27370 | | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; |
27371 | | } |
27372 | | true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0; |
27373 | | } else { |
27374 | | true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; |
27375 | | } |
27376 | | } |
27377 | | }; |
27378 | | |
27379 | | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; |
27380 | | |
27381 | | // For testing |
27382 | | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { |
27383 | | ancestorInfo = ancestorInfo || emptyAncestorInfo; |
27384 | | var parentInfo = ancestorInfo.current; |
27385 | | var parentTag = parentInfo && parentInfo.tag; |
27386 | | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); |
27387 | | }; |
27388 | | } |
27389 | | |
27390 | | module.exports = validateDOMNesting; |
27391 | | |
27392 | | /***/ }), |
27393 | | /* 474 */ |
27394 | | /***/ (function(module, exports, __webpack_require__) { |
27395 | | |
27396 | | /** |
27397 | | * Copyright (c) 2014-present, Facebook, Inc. |
27398 | | * |
27399 | | * This source code is licensed under the MIT license found in the |
27400 | | * LICENSE file in the root directory of this source tree. |
27401 | | * |
27402 | | */ |
27403 | | |
27404 | | 'use strict'; |
27405 | | |
27406 | | var _assign = __webpack_require__(334); |
27407 | | |
27408 | | var DOMLazyTree = __webpack_require__(418); |
27409 | | var ReactDOMComponentTree = __webpack_require__(370); |
27410 | | |
27411 | | var ReactDOMEmptyComponent = function (instantiate) { |
27412 | | // ReactCompositeComponent uses this: |
27413 | | this._currentElement = null; |
27414 | | // ReactDOMComponentTree uses these: |
27415 | | this._hostNode = null; |
27416 | | this._hostParent = null; |
27417 | | this._hostContainerInfo = null; |
27418 | | this._domID = 0; |
27419 | | }; |
27420 | | _assign(ReactDOMEmptyComponent.prototype, { |
27421 | | mountComponent: function (transaction, hostParent, hostContainerInfo, context) { |
27422 | | var domID = hostContainerInfo._idCounter++; |
27423 | | this._domID = domID; |
27424 | | this._hostParent = hostParent; |
27425 | | this._hostContainerInfo = hostContainerInfo; |
27426 | | |
27427 | | var nodeValue = ' react-empty: ' + this._domID + ' '; |
27428 | | if (transaction.useCreateElement) { |
27429 | | var ownerDocument = hostContainerInfo._ownerDocument; |
27430 | | var node = ownerDocument.createComment(nodeValue); |
27431 | | ReactDOMComponentTree.precacheNode(this, node); |
27432 | | return DOMLazyTree(node); |
27433 | | } else { |
27434 | | if (transaction.renderToStaticMarkup) { |
27435 | | // Normally we'd insert a comment node, but since this is a situation |
27436 | | // where React won't take over (static pages), we can simply return |
27437 | | // nothing. |
27438 | | return ''; |
27439 | | } |
27440 | | return '<!--' + nodeValue + '-->'; |
27441 | | } |
27442 | | }, |
27443 | | receiveComponent: function () {}, |
27444 | | getHostNode: function () { |
27445 | | return ReactDOMComponentTree.getNodeFromInstance(this); |
27446 | | }, |
27447 | | unmountComponent: function () { |
27448 | | ReactDOMComponentTree.uncacheNode(this); |
27449 | | } |
27450 | | }); |
27451 | | |
27452 | | module.exports = ReactDOMEmptyComponent; |
27453 | | |
27454 | | /***/ }), |
27455 | | /* 475 */ |
27456 | | /***/ (function(module, exports, __webpack_require__) { |
27457 | | |
27458 | | /** |
27459 | | * Copyright (c) 2015-present, Facebook, Inc. |
27460 | | * |
27461 | | * This source code is licensed under the MIT license found in the |
27462 | | * LICENSE file in the root directory of this source tree. |
27463 | | * |
27464 | | */ |
27465 | | |
27466 | | 'use strict'; |
27467 | | |
27468 | | var _prodInvariant = __webpack_require__(371); |
27469 | | |
27470 | | var invariant = __webpack_require__(342); |
27471 | | |
27472 | | /** |
27473 | | * Return the lowest common ancestor of A and B, or null if they are in |
27474 | | * different trees. |
27475 | | */ |
27476 | | function getLowestCommonAncestor(instA, instB) { |
27477 | | !('_hostNode' in instA) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; |
27478 | | !('_hostNode' in instB) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; |
27479 | | |
27480 | | var depthA = 0; |
27481 | | for (var tempA = instA; tempA; tempA = tempA._hostParent) { |
27482 | | depthA++; |
27483 | | } |
27484 | | var depthB = 0; |
27485 | | for (var tempB = instB; tempB; tempB = tempB._hostParent) { |
27486 | | depthB++; |
27487 | | } |
27488 | | |
27489 | | // If A is deeper, crawl up. |
27490 | | while (depthA - depthB > 0) { |
27491 | | instA = instA._hostParent; |
27492 | | depthA--; |
27493 | | } |
27494 | | |
27495 | | // If B is deeper, crawl up. |
27496 | | while (depthB - depthA > 0) { |
27497 | | instB = instB._hostParent; |
27498 | | depthB--; |
27499 | | } |
27500 | | |
27501 | | // Walk in lockstep until we find a match. |
27502 | | var depth = depthA; |
27503 | | while (depth--) { |
27504 | | if (instA === instB) { |
27505 | | return instA; |
27506 | | } |
27507 | | instA = instA._hostParent; |
27508 | | instB = instB._hostParent; |
27509 | | } |
27510 | | return null; |
27511 | | } |
27512 | | |
27513 | | /** |
27514 | | * Return if A is an ancestor of B. |
27515 | | */ |
27516 | | function isAncestor(instA, instB) { |
27517 | | !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; |
27518 | | !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; |
27519 | | |
27520 | | while (instB) { |
27521 | | if (instB === instA) { |
27522 | | return true; |
27523 | | } |
27524 | | instB = instB._hostParent; |
27525 | | } |
27526 | | return false; |
27527 | | } |
27528 | | |
27529 | | /** |
27530 | | * Return the parent instance of the passed-in instance. |
27531 | | */ |
27532 | | function getParentInstance(inst) { |
27533 | | !('_hostNode' in inst) ? true ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; |
27534 | | |
27535 | | return inst._hostParent; |
27536 | | } |
27537 | | |
27538 | | /** |
27539 | | * Simulates the traversal of a two-phase, capture/bubble event dispatch. |
27540 | | */ |
27541 | | function traverseTwoPhase(inst, fn, arg) { |
27542 | | var path = []; |
27543 | | while (inst) { |
27544 | | path.push(inst); |
27545 | | inst = inst._hostParent; |
27546 | | } |
27547 | | var i; |
27548 | | for (i = path.length; i-- > 0;) { |
27549 | | fn(path[i], 'captured', arg); |
27550 | | } |
27551 | | for (i = 0; i < path.length; i++) { |
27552 | | fn(path[i], 'bubbled', arg); |
27553 | | } |
27554 | | } |
27555 | | |
27556 | | /** |
27557 | | * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that |
27558 | | * should would receive a `mouseEnter` or `mouseLeave` event. |
27559 | | * |
27560 | | * Does not invoke the callback on the nearest common ancestor because nothing |
27561 | | * "entered" or "left" that element. |
27562 | | */ |
27563 | | function traverseEnterLeave(from, to, fn, argFrom, argTo) { |
27564 | | var common = from && to ? getLowestCommonAncestor(from, to) : null; |
27565 | | var pathFrom = []; |
27566 | | while (from && from !== common) { |
27567 | | pathFrom.push(from); |
27568 | | from = from._hostParent; |
27569 | | } |
27570 | | var pathTo = []; |
27571 | | while (to && to !== common) { |
27572 | | pathTo.push(to); |
27573 | | to = to._hostParent; |
27574 | | } |
27575 | | var i; |
27576 | | for (i = 0; i < pathFrom.length; i++) { |
27577 | | fn(pathFrom[i], 'bubbled', argFrom); |
27578 | | } |
27579 | | for (i = pathTo.length; i-- > 0;) { |
27580 | | fn(pathTo[i], 'captured', argTo); |
27581 | | } |
27582 | | } |
27583 | | |
27584 | | module.exports = { |
27585 | | isAncestor: isAncestor, |
27586 | | getLowestCommonAncestor: getLowestCommonAncestor, |
27587 | | getParentInstance: getParentInstance, |
27588 | | traverseTwoPhase: traverseTwoPhase, |
27589 | | traverseEnterLeave: traverseEnterLeave |
27590 | | }; |
27591 | | |
27592 | | /***/ }), |
27593 | | /* 476 */ |
27594 | | /***/ (function(module, exports, __webpack_require__) { |
27595 | | |
27596 | | /** |
27597 | | * Copyright (c) 2013-present, Facebook, Inc. |
27598 | | * |
27599 | | * This source code is licensed under the MIT license found in the |
27600 | | * LICENSE file in the root directory of this source tree. |
27601 | | * |
27602 | | */ |
27603 | | |
27604 | | 'use strict'; |
27605 | | |
27606 | | var _prodInvariant = __webpack_require__(371), |
27607 | | _assign = __webpack_require__(334); |
27608 | | |
27609 | | var DOMChildrenOperations = __webpack_require__(417); |
27610 | | var DOMLazyTree = __webpack_require__(418); |
27611 | | var ReactDOMComponentTree = __webpack_require__(370); |
27612 | | |
27613 | | var escapeTextContentForBrowser = __webpack_require__(423); |
27614 | | var invariant = __webpack_require__(342); |
27615 | | var validateDOMNesting = __webpack_require__(473); |
27616 | | |
27617 | | /** |
27618 | | * Text nodes violate a couple assumptions that React makes about components: |
27619 | | * |
27620 | | * - When mounting text into the DOM, adjacent text nodes are merged. |
27621 | | * - Text nodes cannot be assigned a React root ID. |
27622 | | * |
27623 | | * This component is used to wrap strings between comment nodes so that they |
27624 | | * can undergo the same reconciliation that is applied to elements. |
27625 | | * |
27626 | | * TODO: Investigate representing React components in the DOM with text nodes. |
27627 | | * |
27628 | | * @class ReactDOMTextComponent |
27629 | | * @extends ReactComponent |
27630 | | * @internal |
27631 | | */ |
27632 | | var ReactDOMTextComponent = function (text) { |
27633 | | // TODO: This is really a ReactText (ReactNode), not a ReactElement |
27634 | | this._currentElement = text; |
27635 | | this._stringText = '' + text; |
27636 | | // ReactDOMComponentTree uses these: |
27637 | | this._hostNode = null; |
27638 | | this._hostParent = null; |
27639 | | |
27640 | | // Properties |
27641 | | this._domID = 0; |
27642 | | this._mountIndex = 0; |
27643 | | this._closingComment = null; |
27644 | | this._commentNodes = null; |
27645 | | }; |
27646 | | |
27647 | | _assign(ReactDOMTextComponent.prototype, { |
27648 | | /** |
27649 | | * Creates the markup for this text node. This node is not intended to have |
27650 | | * any features besides containing text content. |
27651 | | * |
27652 | | * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction |
27653 | | * @return {string} Markup for this text node. |
27654 | | * @internal |
27655 | | */ |
27656 | | mountComponent: function (transaction, hostParent, hostContainerInfo, context) { |
27657 | | if (true) { |
27658 | | var parentInfo; |
27659 | | if (hostParent != null) { |
27660 | | parentInfo = hostParent._ancestorInfo; |
27661 | | } else if (hostContainerInfo != null) { |
27662 | | parentInfo = hostContainerInfo._ancestorInfo; |
27663 | | } |
27664 | | if (parentInfo) { |
27665 | | // parentInfo should always be present except for the top-level |
27666 | | // component when server rendering |
27667 | | validateDOMNesting(null, this._stringText, this, parentInfo); |
27668 | | } |
27669 | | } |
27670 | | |
27671 | | var domID = hostContainerInfo._idCounter++; |
27672 | | var openingValue = ' react-text: ' + domID + ' '; |
27673 | | var closingValue = ' /react-text '; |
27674 | | this._domID = domID; |
27675 | | this._hostParent = hostParent; |
27676 | | if (transaction.useCreateElement) { |
27677 | | var ownerDocument = hostContainerInfo._ownerDocument; |
27678 | | var openingComment = ownerDocument.createComment(openingValue); |
27679 | | var closingComment = ownerDocument.createComment(closingValue); |
27680 | | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); |
27681 | | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); |
27682 | | if (this._stringText) { |
27683 | | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); |
27684 | | } |
27685 | | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); |
27686 | | ReactDOMComponentTree.precacheNode(this, openingComment); |
27687 | | this._closingComment = closingComment; |
27688 | | return lazyTree; |
27689 | | } else { |
27690 | | var escapedText = escapeTextContentForBrowser(this._stringText); |
27691 | | |
27692 | | if (transaction.renderToStaticMarkup) { |
27693 | | // Normally we'd wrap this between comment nodes for the reasons stated |
27694 | | // above, but since this is a situation where React won't take over |
27695 | | // (static pages), we can simply return the text as it is. |
27696 | | return escapedText; |
27697 | | } |
27698 | | |
27699 | | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; |
27700 | | } |
27701 | | }, |
27702 | | |
27703 | | /** |
27704 | | * Updates this component by updating the text content. |
27705 | | * |
27706 | | * @param {ReactText} nextText The next text content |
27707 | | * @param {ReactReconcileTransaction} transaction |
27708 | | * @internal |
27709 | | */ |
27710 | | receiveComponent: function (nextText, transaction) { |
27711 | | if (nextText !== this._currentElement) { |
27712 | | this._currentElement = nextText; |
27713 | | var nextStringText = '' + nextText; |
27714 | | if (nextStringText !== this._stringText) { |
27715 | | // TODO: Save this as pending props and use performUpdateIfNecessary |
27716 | | // and/or updateComponent to do the actual update for consistency with |
27717 | | // other component types? |
27718 | | this._stringText = nextStringText; |
27719 | | var commentNodes = this.getHostNode(); |
27720 | | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); |
27721 | | } |
27722 | | } |
27723 | | }, |
27724 | | |
27725 | | getHostNode: function () { |
27726 | | var hostNode = this._commentNodes; |
27727 | | if (hostNode) { |
27728 | | return hostNode; |
27729 | | } |
27730 | | if (!this._closingComment) { |
27731 | | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); |
27732 | | var node = openingComment.nextSibling; |
27733 | | while (true) { |
27734 | | !(node != null) ? true ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; |
27735 | | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { |
27736 | | this._closingComment = node; |
27737 | | break; |
27738 | | } |
27739 | | node = node.nextSibling; |
27740 | | } |
27741 | | } |
27742 | | hostNode = [this._hostNode, this._closingComment]; |
27743 | | this._commentNodes = hostNode; |
27744 | | return hostNode; |
27745 | | }, |
27746 | | |
27747 | | unmountComponent: function () { |
27748 | | this._closingComment = null; |
27749 | | this._commentNodes = null; |
27750 | | ReactDOMComponentTree.uncacheNode(this); |
27751 | | } |
27752 | | }); |
27753 | | |
27754 | | module.exports = ReactDOMTextComponent; |
27755 | | |
27756 | | /***/ }), |
27757 | | /* 477 */ |
27758 | | /***/ (function(module, exports, __webpack_require__) { |
27759 | | |
27760 | | /** |
27761 | | * Copyright (c) 2013-present, Facebook, Inc. |
27762 | | * |
27763 | | * This source code is licensed under the MIT license found in the |
27764 | | * LICENSE file in the root directory of this source tree. |
27765 | | * |
27766 | | */ |
27767 | | |
27768 | | 'use strict'; |
27769 | | |
27770 | | var _assign = __webpack_require__(334); |
27771 | | |
27772 | | var ReactUpdates = __webpack_require__(392); |
27773 | | var Transaction = __webpack_require__(404); |
27774 | | |
27775 | | var emptyFunction = __webpack_require__(339); |
27776 | | |
27777 | | var RESET_BATCHED_UPDATES = { |
27778 | | initialize: emptyFunction, |
27779 | | close: function () { |
27780 | | ReactDefaultBatchingStrategy.isBatchingUpdates = false; |
27781 | | } |
27782 | | }; |
27783 | | |
27784 | | var FLUSH_BATCHED_UPDATES = { |
27785 | | initialize: emptyFunction, |
27786 | | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) |
27787 | | }; |
27788 | | |
27789 | | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; |
27790 | | |
27791 | | function ReactDefaultBatchingStrategyTransaction() { |
27792 | | this.reinitializeTransaction(); |
27793 | | } |
27794 | | |
27795 | | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { |
27796 | | getTransactionWrappers: function () { |
27797 | | return TRANSACTION_WRAPPERS; |
27798 | | } |
27799 | | }); |
27800 | | |
27801 | | var transaction = new ReactDefaultBatchingStrategyTransaction(); |
27802 | | |
27803 | | var ReactDefaultBatchingStrategy = { |
27804 | | isBatchingUpdates: false, |
27805 | | |
27806 | | /** |
27807 | | * Call the provided function in a context within which calls to `setState` |
27808 | | * and friends are batched such that components aren't updated unnecessarily. |
27809 | | */ |
27810 | | batchedUpdates: function (callback, a, b, c, d, e) { |
27811 | | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; |
27812 | | |
27813 | | ReactDefaultBatchingStrategy.isBatchingUpdates = true; |
27814 | | |
27815 | | // The code is written this way to avoid extra allocations |
27816 | | if (alreadyBatchingUpdates) { |
27817 | | return callback(a, b, c, d, e); |
27818 | | } else { |
27819 | | return transaction.perform(callback, null, a, b, c, d, e); |
27820 | | } |
27821 | | } |
27822 | | }; |
27823 | | |
27824 | | module.exports = ReactDefaultBatchingStrategy; |
27825 | | |
27826 | | /***/ }), |
27827 | | /* 478 */ |
27828 | | /***/ (function(module, exports, __webpack_require__) { |
27829 | | |
27830 | | /** |
27831 | | * Copyright (c) 2013-present, Facebook, Inc. |
27832 | | * |
27833 | | * This source code is licensed under the MIT license found in the |
27834 | | * LICENSE file in the root directory of this source tree. |
27835 | | * |
27836 | | */ |
27837 | | |
27838 | | 'use strict'; |
27839 | | |
27840 | | var _assign = __webpack_require__(334); |
27841 | | |
27842 | | var EventListener = __webpack_require__(479); |
27843 | | var ExecutionEnvironment = __webpack_require__(384); |
27844 | | var PooledClass = __webpack_require__(386); |
27845 | | var ReactDOMComponentTree = __webpack_require__(370); |
27846 | | var ReactUpdates = __webpack_require__(392); |
27847 | | |
27848 | | var getEventTarget = __webpack_require__(406); |
27849 | | var getUnboundedScrollPosition = __webpack_require__(480); |
27850 | | |
27851 | | /** |
27852 | | * Find the deepest React component completely containing the root of the |
27853 | | * passed-in instance (for use when entire React trees are nested within each |
27854 | | * other). If React trees are not nested, returns null. |
27855 | | */ |
27856 | | function findParent(inst) { |
27857 | | // TODO: It may be a good idea to cache this to prevent unnecessary DOM |
27858 | | // traversal, but caching is difficult to do correctly without using a |
27859 | | // mutation observer to listen for all DOM changes. |
27860 | | while (inst._hostParent) { |
27861 | | inst = inst._hostParent; |
27862 | | } |
27863 | | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); |
27864 | | var container = rootNode.parentNode; |
27865 | | return ReactDOMComponentTree.getClosestInstanceFromNode(container); |
27866 | | } |
27867 | | |
27868 | | // Used to store ancestor hierarchy in top level callback |
27869 | | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { |
27870 | | this.topLevelType = topLevelType; |
27871 | | this.nativeEvent = nativeEvent; |
27872 | | this.ancestors = []; |
27873 | | } |
27874 | | _assign(TopLevelCallbackBookKeeping.prototype, { |
27875 | | destructor: function () { |
27876 | | this.topLevelType = null; |
27877 | | this.nativeEvent = null; |
27878 | | this.ancestors.length = 0; |
27879 | | } |
27880 | | }); |
27881 | | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); |
27882 | | |
27883 | | function handleTopLevelImpl(bookKeeping) { |
27884 | | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); |
27885 | | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); |
27886 | | |
27887 | | // Loop through the hierarchy, in case there's any nested components. |
27888 | | // It's important that we build the array of ancestors before calling any |
27889 | | // event handlers, because event handlers can modify the DOM, leading to |
27890 | | // inconsistencies with ReactMount's node cache. See #1105. |
27891 | | var ancestor = targetInst; |
27892 | | do { |
27893 | | bookKeeping.ancestors.push(ancestor); |
27894 | | ancestor = ancestor && findParent(ancestor); |
27895 | | } while (ancestor); |
27896 | | |
27897 | | for (var i = 0; i < bookKeeping.ancestors.length; i++) { |
27898 | | targetInst = bookKeeping.ancestors[i]; |
27899 | | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); |
27900 | | } |
27901 | | } |
27902 | | |
27903 | | function scrollValueMonitor(cb) { |
27904 | | var scrollPosition = getUnboundedScrollPosition(window); |
27905 | | cb(scrollPosition); |
27906 | | } |
27907 | | |
27908 | | var ReactEventListener = { |
27909 | | _enabled: true, |
27910 | | _handleTopLevel: null, |
27911 | | |
27912 | | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, |
27913 | | |
27914 | | setHandleTopLevel: function (handleTopLevel) { |
27915 | | ReactEventListener._handleTopLevel = handleTopLevel; |
27916 | | }, |
27917 | | |
27918 | | setEnabled: function (enabled) { |
27919 | | ReactEventListener._enabled = !!enabled; |
27920 | | }, |
27921 | | |
27922 | | isEnabled: function () { |
27923 | | return ReactEventListener._enabled; |
27924 | | }, |
27925 | | |
27926 | | /** |
27927 | | * Traps top-level events by using event bubbling. |
27928 | | * |
27929 | | * @param {string} topLevelType Record from `EventConstants`. |
27930 | | * @param {string} handlerBaseName Event name (e.g. "click"). |
27931 | | * @param {object} element Element on which to attach listener. |
27932 | | * @return {?object} An object with a remove function which will forcefully |
27933 | | * remove the listener. |
27934 | | * @internal |
27935 | | */ |
27936 | | trapBubbledEvent: function (topLevelType, handlerBaseName, element) { |
27937 | | if (!element) { |
27938 | | return null; |
27939 | | } |
27940 | | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); |
27941 | | }, |
27942 | | |
27943 | | /** |
27944 | | * Traps a top-level event by using event capturing. |
27945 | | * |
27946 | | * @param {string} topLevelType Record from `EventConstants`. |
27947 | | * @param {string} handlerBaseName Event name (e.g. "click"). |
27948 | | * @param {object} element Element on which to attach listener. |
27949 | | * @return {?object} An object with a remove function which will forcefully |
27950 | | * remove the listener. |
27951 | | * @internal |
27952 | | */ |
27953 | | trapCapturedEvent: function (topLevelType, handlerBaseName, element) { |
27954 | | if (!element) { |
27955 | | return null; |
27956 | | } |
27957 | | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); |
27958 | | }, |
27959 | | |
27960 | | monitorScrollValue: function (refresh) { |
27961 | | var callback = scrollValueMonitor.bind(null, refresh); |
27962 | | EventListener.listen(window, 'scroll', callback); |
27963 | | }, |
27964 | | |
27965 | | dispatchEvent: function (topLevelType, nativeEvent) { |
27966 | | if (!ReactEventListener._enabled) { |
27967 | | return; |
27968 | | } |
27969 | | |
27970 | | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); |
27971 | | try { |
27972 | | // Event queue being processed in the same cycle allows |
27973 | | // `preventDefault`. |
27974 | | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); |
27975 | | } finally { |
27976 | | TopLevelCallbackBookKeeping.release(bookKeeping); |
27977 | | } |
27978 | | } |
27979 | | }; |
27980 | | |
27981 | | module.exports = ReactEventListener; |
27982 | | |
27983 | | /***/ }), |
27984 | | /* 479 */ |
27985 | | /***/ (function(module, exports, __webpack_require__) { |
27986 | | |
27987 | | 'use strict'; |
27988 | | |
27989 | | /** |
27990 | | * Copyright (c) 2013-present, Facebook, Inc. |
27991 | | * |
27992 | | * This source code is licensed under the MIT license found in the |
27993 | | * LICENSE file in the root directory of this source tree. |
27994 | | * |
27995 | | * @typechecks |
27996 | | */ |
27997 | | |
27998 | | var emptyFunction = __webpack_require__(339); |
27999 | | |
28000 | | /** |
28001 | | * Upstream version of event listener. Does not take into account specific |
28002 | | * nature of platform. |
28003 | | */ |
28004 | | var EventListener = { |
28005 | | /** |
28006 | | * Listen to DOM events during the bubble phase. |
28007 | | * |
28008 | | * @param {DOMEventTarget} target DOM element to register listener on. |
28009 | | * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. |
28010 | | * @param {function} callback Callback function. |
28011 | | * @return {object} Object with a `remove` method. |
28012 | | */ |
28013 | | listen: function listen(target, eventType, callback) { |
28014 | | if (target.addEventListener) { |
28015 | | target.addEventListener(eventType, callback, false); |
28016 | | return { |
28017 | | remove: function remove() { |
28018 | | target.removeEventListener(eventType, callback, false); |
28019 | | } |
28020 | | }; |
28021 | | } else if (target.attachEvent) { |
28022 | | target.attachEvent('on' + eventType, callback); |
28023 | | return { |
28024 | | remove: function remove() { |
28025 | | target.detachEvent('on' + eventType, callback); |
28026 | | } |
28027 | | }; |
28028 | | } |
28029 | | }, |
28030 | | |
28031 | | /** |
28032 | | * Listen to DOM events during the capture phase. |
28033 | | * |
28034 | | * @param {DOMEventTarget} target DOM element to register listener on. |
28035 | | * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. |
28036 | | * @param {function} callback Callback function. |
28037 | | * @return {object} Object with a `remove` method. |
28038 | | */ |
28039 | | capture: function capture(target, eventType, callback) { |
28040 | | if (target.addEventListener) { |
28041 | | target.addEventListener(eventType, callback, true); |
28042 | | return { |
28043 | | remove: function remove() { |
28044 | | target.removeEventListener(eventType, callback, true); |
28045 | | } |
28046 | | }; |
28047 | | } else { |
28048 | | if (true) { |
28049 | | console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); |
28050 | | } |
28051 | | return { |
28052 | | remove: emptyFunction |
28053 | | }; |
28054 | | } |
28055 | | }, |
28056 | | |
28057 | | registerDefault: function registerDefault() {} |
28058 | | }; |
28059 | | |
28060 | | module.exports = EventListener; |
28061 | | |
28062 | | /***/ }), |
28063 | | /* 480 */ |
28064 | | /***/ (function(module, exports) { |
28065 | | |
28066 | | /** |
28067 | | * Copyright (c) 2013-present, Facebook, Inc. |
28068 | | * |
28069 | | * This source code is licensed under the MIT license found in the |
28070 | | * LICENSE file in the root directory of this source tree. |
28071 | | * |
28072 | | * @typechecks |
28073 | | */ |
28074 | | |
28075 | | 'use strict'; |
28076 | | |
28077 | | /** |
28078 | | * Gets the scroll position of the supplied element or window. |
28079 | | * |
28080 | | * The return values are unbounded, unlike `getScrollPosition`. This means they |
28081 | | * may be negative or exceed the element boundaries (which is possible using |
28082 | | * inertial scrolling). |
28083 | | * |
28084 | | * @param {DOMWindow|DOMElement} scrollable |
28085 | | * @return {object} Map with `x` and `y` keys. |
28086 | | */ |
28087 | | |
28088 | | function getUnboundedScrollPosition(scrollable) { |
28089 | | if (scrollable.Window && scrollable instanceof scrollable.Window) { |
28090 | | return { |
28091 | | x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, |
28092 | | y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop |
28093 | | }; |
28094 | | } |
28095 | | return { |
28096 | | x: scrollable.scrollLeft, |
28097 | | y: scrollable.scrollTop |
28098 | | }; |
28099 | | } |
28100 | | |
28101 | | module.exports = getUnboundedScrollPosition; |
28102 | | |
28103 | | /***/ }), |
28104 | | /* 481 */ |
28105 | | /***/ (function(module, exports, __webpack_require__) { |
28106 | | |
28107 | | /** |
28108 | | * Copyright (c) 2013-present, Facebook, Inc. |
28109 | | * |
28110 | | * This source code is licensed under the MIT license found in the |
28111 | | * LICENSE file in the root directory of this source tree. |
28112 | | * |
28113 | | */ |
28114 | | |
28115 | | 'use strict'; |
28116 | | |
28117 | | var DOMProperty = __webpack_require__(372); |
28118 | | var EventPluginHub = __webpack_require__(378); |
28119 | | var EventPluginUtils = __webpack_require__(380); |
28120 | | var ReactComponentEnvironment = __webpack_require__(452); |
28121 | | var ReactEmptyComponent = __webpack_require__(462); |
28122 | | var ReactBrowserEventEmitter = __webpack_require__(442); |
28123 | | var ReactHostComponent = __webpack_require__(463); |
28124 | | var ReactUpdates = __webpack_require__(392); |
28125 | | |
28126 | | var ReactInjection = { |
28127 | | Component: ReactComponentEnvironment.injection, |
28128 | | DOMProperty: DOMProperty.injection, |
28129 | | EmptyComponent: ReactEmptyComponent.injection, |
28130 | | EventPluginHub: EventPluginHub.injection, |
28131 | | EventPluginUtils: EventPluginUtils.injection, |
28132 | | EventEmitter: ReactBrowserEventEmitter.injection, |
28133 | | HostComponent: ReactHostComponent.injection, |
28134 | | Updates: ReactUpdates.injection |
28135 | | }; |
28136 | | |
28137 | | module.exports = ReactInjection; |
28138 | | |
28139 | | /***/ }), |
28140 | | /* 482 */ |
28141 | | /***/ (function(module, exports, __webpack_require__) { |
28142 | | |
28143 | | /** |
28144 | | * Copyright (c) 2013-present, Facebook, Inc. |
28145 | | * |
28146 | | * This source code is licensed under the MIT license found in the |
28147 | | * LICENSE file in the root directory of this source tree. |
28148 | | * |
28149 | | */ |
28150 | | |
28151 | | 'use strict'; |
28152 | | |
28153 | | var _assign = __webpack_require__(334); |
28154 | | |
28155 | | var CallbackQueue = __webpack_require__(393); |
28156 | | var PooledClass = __webpack_require__(386); |
28157 | | var ReactBrowserEventEmitter = __webpack_require__(442); |
28158 | | var ReactInputSelection = __webpack_require__(483); |
28159 | | var ReactInstrumentation = __webpack_require__(398); |
28160 | | var Transaction = __webpack_require__(404); |
28161 | | var ReactUpdateQueue = __webpack_require__(472); |
28162 | | |
28163 | | /** |
28164 | | * Ensures that, when possible, the selection range (currently selected text |
28165 | | * input) is not disturbed by performing the transaction. |
28166 | | */ |
28167 | | var SELECTION_RESTORATION = { |
28168 | | /** |
28169 | | * @return {Selection} Selection information. |
28170 | | */ |
28171 | | initialize: ReactInputSelection.getSelectionInformation, |
28172 | | /** |
28173 | | * @param {Selection} sel Selection information returned from `initialize`. |
28174 | | */ |
28175 | | close: ReactInputSelection.restoreSelection |
28176 | | }; |
28177 | | |
28178 | | /** |
28179 | | * Suppresses events (blur/focus) that could be inadvertently dispatched due to |
28180 | | * high level DOM manipulations (like temporarily removing a text input from the |
28181 | | * DOM). |
28182 | | */ |
28183 | | var EVENT_SUPPRESSION = { |
28184 | | /** |
28185 | | * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before |
28186 | | * the reconciliation. |
28187 | | */ |
28188 | | initialize: function () { |
28189 | | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); |
28190 | | ReactBrowserEventEmitter.setEnabled(false); |
28191 | | return currentlyEnabled; |
28192 | | }, |
28193 | | |
28194 | | /** |
28195 | | * @param {boolean} previouslyEnabled Enabled status of |
28196 | | * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` |
28197 | | * restores the previous value. |
28198 | | */ |
28199 | | close: function (previouslyEnabled) { |
28200 | | ReactBrowserEventEmitter.setEnabled(previouslyEnabled); |
28201 | | } |
28202 | | }; |
28203 | | |
28204 | | /** |
28205 | | * Provides a queue for collecting `componentDidMount` and |
28206 | | * `componentDidUpdate` callbacks during the transaction. |
28207 | | */ |
28208 | | var ON_DOM_READY_QUEUEING = { |
28209 | | /** |
28210 | | * Initializes the internal `onDOMReady` queue. |
28211 | | */ |
28212 | | initialize: function () { |
28213 | | this.reactMountReady.reset(); |
28214 | | }, |
28215 | | |
28216 | | /** |
28217 | | * After DOM is flushed, invoke all registered `onDOMReady` callbacks. |
28218 | | */ |
28219 | | close: function () { |
28220 | | this.reactMountReady.notifyAll(); |
28221 | | } |
28222 | | }; |
28223 | | |
28224 | | /** |
28225 | | * Executed within the scope of the `Transaction` instance. Consider these as |
28226 | | * being member methods, but with an implied ordering while being isolated from |
28227 | | * each other. |
28228 | | */ |
28229 | | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; |
28230 | | |
28231 | | if (true) { |
28232 | | TRANSACTION_WRAPPERS.push({ |
28233 | | initialize: ReactInstrumentation.debugTool.onBeginFlush, |
28234 | | close: ReactInstrumentation.debugTool.onEndFlush |
28235 | | }); |
28236 | | } |
28237 | | |
28238 | | /** |
28239 | | * Currently: |
28240 | | * - The order that these are listed in the transaction is critical: |
28241 | | * - Suppresses events. |
28242 | | * - Restores selection range. |
28243 | | * |
28244 | | * Future: |
28245 | | * - Restore document/overflow scroll positions that were unintentionally |
28246 | | * modified via DOM insertions above the top viewport boundary. |
28247 | | * - Implement/integrate with customized constraint based layout system and keep |
28248 | | * track of which dimensions must be remeasured. |
28249 | | * |
28250 | | * @class ReactReconcileTransaction |
28251 | | */ |
28252 | | function ReactReconcileTransaction(useCreateElement) { |
28253 | | this.reinitializeTransaction(); |
28254 | | // Only server-side rendering really needs this option (see |
28255 | | // `ReactServerRendering`), but server-side uses |
28256 | | // `ReactServerRenderingTransaction` instead. This option is here so that it's |
28257 | | // accessible and defaults to false when `ReactDOMComponent` and |
28258 | | // `ReactDOMTextComponent` checks it in `mountComponent`.` |
28259 | | this.renderToStaticMarkup = false; |
28260 | | this.reactMountReady = CallbackQueue.getPooled(null); |
28261 | | this.useCreateElement = useCreateElement; |
28262 | | } |
28263 | | |
28264 | | var Mixin = { |
28265 | | /** |
28266 | | * @see Transaction |
28267 | | * @abstract |
28268 | | * @final |
28269 | | * @return {array<object>} List of operation wrap procedures. |
28270 | | * TODO: convert to array<TransactionWrapper> |
28271 | | */ |
28272 | | getTransactionWrappers: function () { |
28273 | | return TRANSACTION_WRAPPERS; |
28274 | | }, |
28275 | | |
28276 | | /** |
28277 | | * @return {object} The queue to collect `onDOMReady` callbacks with. |
28278 | | */ |
28279 | | getReactMountReady: function () { |
28280 | | return this.reactMountReady; |
28281 | | }, |
28282 | | |
28283 | | /** |
28284 | | * @return {object} The queue to collect React async events. |
28285 | | */ |
28286 | | getUpdateQueue: function () { |
28287 | | return ReactUpdateQueue; |
28288 | | }, |
28289 | | |
28290 | | /** |
28291 | | * Save current transaction state -- if the return value from this method is |
28292 | | * passed to `rollback`, the transaction will be reset to that state. |
28293 | | */ |
28294 | | checkpoint: function () { |
28295 | | // reactMountReady is the our only stateful wrapper |
28296 | | return this.reactMountReady.checkpoint(); |
28297 | | }, |
28298 | | |
28299 | | rollback: function (checkpoint) { |
28300 | | this.reactMountReady.rollback(checkpoint); |
28301 | | }, |
28302 | | |
28303 | | /** |
28304 | | * `PooledClass` looks for this, and will invoke this before allowing this |
28305 | | * instance to be reused. |
28306 | | */ |
28307 | | destructor: function () { |
28308 | | CallbackQueue.release(this.reactMountReady); |
28309 | | this.reactMountReady = null; |
28310 | | } |
28311 | | }; |
28312 | | |
28313 | | _assign(ReactReconcileTransaction.prototype, Transaction, Mixin); |
28314 | | |
28315 | | PooledClass.addPoolingTo(ReactReconcileTransaction); |
28316 | | |
28317 | | module.exports = ReactReconcileTransaction; |
28318 | | |
28319 | | /***/ }), |
28320 | | /* 483 */ |
28321 | | /***/ (function(module, exports, __webpack_require__) { |
28322 | | |
28323 | | /** |
28324 | | * Copyright (c) 2013-present, Facebook, Inc. |
28325 | | * |
28326 | | * This source code is licensed under the MIT license found in the |
28327 | | * LICENSE file in the root directory of this source tree. |
28328 | | * |
28329 | | */ |
28330 | | |
28331 | | 'use strict'; |
28332 | | |
28333 | | var ReactDOMSelection = __webpack_require__(484); |
28334 | | |
28335 | | var containsNode = __webpack_require__(486); |
28336 | | var focusNode = __webpack_require__(431); |
28337 | | var getActiveElement = __webpack_require__(489); |
28338 | | |
28339 | | function isInDocument(node) { |
28340 | | return containsNode(document.documentElement, node); |
28341 | | } |
28342 | | |
28343 | | /** |
28344 | | * @ReactInputSelection: React input selection module. Based on Selection.js, |
28345 | | * but modified to be suitable for react and has a couple of bug fixes (doesn't |
28346 | | * assume buttons have range selections allowed). |
28347 | | * Input selection module for React. |
28348 | | */ |
28349 | | var ReactInputSelection = { |
28350 | | hasSelectionCapabilities: function (elem) { |
28351 | | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); |
28352 | | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); |
28353 | | }, |
28354 | | |
28355 | | getSelectionInformation: function () { |
28356 | | var focusedElem = getActiveElement(); |
28357 | | return { |
28358 | | focusedElem: focusedElem, |
28359 | | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null |
28360 | | }; |
28361 | | }, |
28362 | | |
28363 | | /** |
28364 | | * @restoreSelection: If any selection information was potentially lost, |
28365 | | * restore it. This is useful when performing operations that could remove dom |
28366 | | * nodes and place them back in, resulting in focus being lost. |
28367 | | */ |
28368 | | restoreSelection: function (priorSelectionInformation) { |
28369 | | var curFocusedElem = getActiveElement(); |
28370 | | var priorFocusedElem = priorSelectionInformation.focusedElem; |
28371 | | var priorSelectionRange = priorSelectionInformation.selectionRange; |
28372 | | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { |
28373 | | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { |
28374 | | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); |
28375 | | } |
28376 | | focusNode(priorFocusedElem); |
28377 | | } |
28378 | | }, |
28379 | | |
28380 | | /** |
28381 | | * @getSelection: Gets the selection bounds of a focused textarea, input or |
28382 | | * contentEditable node. |
28383 | | * -@input: Look up selection bounds of this input |
28384 | | * -@return {start: selectionStart, end: selectionEnd} |
28385 | | */ |
28386 | | getSelection: function (input) { |
28387 | | var selection; |
28388 | | |
28389 | | if ('selectionStart' in input) { |
28390 | | // Modern browser with input or textarea. |
28391 | | selection = { |
28392 | | start: input.selectionStart, |
28393 | | end: input.selectionEnd |
28394 | | }; |
28395 | | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { |
28396 | | // IE8 input. |
28397 | | var range = document.selection.createRange(); |
28398 | | // There can only be one selection per document in IE, so it must |
28399 | | // be in our element. |
28400 | | if (range.parentElement() === input) { |
28401 | | selection = { |
28402 | | start: -range.moveStart('character', -input.value.length), |
28403 | | end: -range.moveEnd('character', -input.value.length) |
28404 | | }; |
28405 | | } |
28406 | | } else { |
28407 | | // Content editable or old IE textarea. |
28408 | | selection = ReactDOMSelection.getOffsets(input); |
28409 | | } |
28410 | | |
28411 | | return selection || { start: 0, end: 0 }; |
28412 | | }, |
28413 | | |
28414 | | /** |
28415 | | * @setSelection: Sets the selection bounds of a textarea or input and focuses |
28416 | | * the input. |
28417 | | * -@input Set selection bounds of this input or textarea |
28418 | | * -@offsets Object of same form that is returned from get* |
28419 | | */ |
28420 | | setSelection: function (input, offsets) { |
28421 | | var start = offsets.start; |
28422 | | var end = offsets.end; |
28423 | | if (end === undefined) { |
28424 | | end = start; |
28425 | | } |
28426 | | |
28427 | | if ('selectionStart' in input) { |
28428 | | input.selectionStart = start; |
28429 | | input.selectionEnd = Math.min(end, input.value.length); |
28430 | | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { |
28431 | | var range = input.createTextRange(); |
28432 | | range.collapse(true); |
28433 | | range.moveStart('character', start); |
28434 | | range.moveEnd('character', end - start); |
28435 | | range.select(); |
28436 | | } else { |
28437 | | ReactDOMSelection.setOffsets(input, offsets); |
28438 | | } |
28439 | | } |
28440 | | }; |
28441 | | |
28442 | | module.exports = ReactInputSelection; |
28443 | | |
28444 | | /***/ }), |
28445 | | /* 484 */ |
28446 | | /***/ (function(module, exports, __webpack_require__) { |
28447 | | |
28448 | | /** |
28449 | | * Copyright (c) 2013-present, Facebook, Inc. |
28450 | | * |
28451 | | * This source code is licensed under the MIT license found in the |
28452 | | * LICENSE file in the root directory of this source tree. |
28453 | | * |
28454 | | */ |
28455 | | |
28456 | | 'use strict'; |
28457 | | |
28458 | | var ExecutionEnvironment = __webpack_require__(384); |
28459 | | |
28460 | | var getNodeForCharacterOffset = __webpack_require__(485); |
28461 | | var getTextContentAccessor = __webpack_require__(387); |
28462 | | |
28463 | | /** |
28464 | | * While `isCollapsed` is available on the Selection object and `collapsed` |
28465 | | * is available on the Range object, IE11 sometimes gets them wrong. |
28466 | | * If the anchor/focus nodes and offsets are the same, the range is collapsed. |
28467 | | */ |
28468 | | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { |
28469 | | return anchorNode === focusNode && anchorOffset === focusOffset; |
28470 | | } |
28471 | | |
28472 | | /** |
28473 | | * Get the appropriate anchor and focus node/offset pairs for IE. |
28474 | | * |
28475 | | * The catch here is that IE's selection API doesn't provide information |
28476 | | * about whether the selection is forward or backward, so we have to |
28477 | | * behave as though it's always forward. |
28478 | | * |
28479 | | * IE text differs from modern selection in that it behaves as though |
28480 | | * block elements end with a new line. This means character offsets will |
28481 | | * differ between the two APIs. |
28482 | | * |
28483 | | * @param {DOMElement} node |
28484 | | * @return {object} |
28485 | | */ |
28486 | | function getIEOffsets(node) { |
28487 | | var selection = document.selection; |
28488 | | var selectedRange = selection.createRange(); |
28489 | | var selectedLength = selectedRange.text.length; |
28490 | | |
28491 | | // Duplicate selection so we can move range without breaking user selection. |
28492 | | var fromStart = selectedRange.duplicate(); |
28493 | | fromStart.moveToElementText(node); |
28494 | | fromStart.setEndPoint('EndToStart', selectedRange); |
28495 | | |
28496 | | var startOffset = fromStart.text.length; |
28497 | | var endOffset = startOffset + selectedLength; |
28498 | | |
28499 | | return { |
28500 | | start: startOffset, |
28501 | | end: endOffset |
28502 | | }; |
28503 | | } |
28504 | | |
28505 | | /** |
28506 | | * @param {DOMElement} node |
28507 | | * @return {?object} |
28508 | | */ |
28509 | | function getModernOffsets(node) { |
28510 | | var selection = window.getSelection && window.getSelection(); |
28511 | | |
28512 | | if (!selection || selection.rangeCount === 0) { |
28513 | | return null; |
28514 | | } |
28515 | | |
28516 | | var anchorNode = selection.anchorNode; |
28517 | | var anchorOffset = selection.anchorOffset; |
28518 | | var focusNode = selection.focusNode; |
28519 | | var focusOffset = selection.focusOffset; |
28520 | | |
28521 | | var currentRange = selection.getRangeAt(0); |
28522 | | |
28523 | | // In Firefox, range.startContainer and range.endContainer can be "anonymous |
28524 | | // divs", e.g. the up/down buttons on an <input type="number">. Anonymous |
28525 | | // divs do not seem to expose properties, triggering a "Permission denied |
28526 | | // error" if any of its properties are accessed. The only seemingly possible |
28527 | | // way to avoid erroring is to access a property that typically works for |
28528 | | // non-anonymous divs and catch any error that may otherwise arise. See |
28529 | | // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 |
28530 | | try { |
28531 | | /* eslint-disable no-unused-expressions */ |
28532 | | currentRange.startContainer.nodeType; |
28533 | | currentRange.endContainer.nodeType; |
28534 | | /* eslint-enable no-unused-expressions */ |
28535 | | } catch (e) { |
28536 | | return null; |
28537 | | } |
28538 | | |
28539 | | // If the node and offset values are the same, the selection is collapsed. |
28540 | | // `Selection.isCollapsed` is available natively, but IE sometimes gets |
28541 | | // this value wrong. |
28542 | | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); |
28543 | | |
28544 | | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; |
28545 | | |
28546 | | var tempRange = currentRange.cloneRange(); |
28547 | | tempRange.selectNodeContents(node); |
28548 | | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); |
28549 | | |
28550 | | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); |
28551 | | |
28552 | | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; |
28553 | | var end = start + rangeLength; |
28554 | | |
28555 | | // Detect whether the selection is backward. |
28556 | | var detectionRange = document.createRange(); |
28557 | | detectionRange.setStart(anchorNode, anchorOffset); |
28558 | | detectionRange.setEnd(focusNode, focusOffset); |
28559 | | var isBackward = detectionRange.collapsed; |
28560 | | |
28561 | | return { |
28562 | | start: isBackward ? end : start, |
28563 | | end: isBackward ? start : end |
28564 | | }; |
28565 | | } |
28566 | | |
28567 | | /** |
28568 | | * @param {DOMElement|DOMTextNode} node |
28569 | | * @param {object} offsets |
28570 | | */ |
28571 | | function setIEOffsets(node, offsets) { |
28572 | | var range = document.selection.createRange().duplicate(); |
28573 | | var start, end; |
28574 | | |
28575 | | if (offsets.end === undefined) { |
28576 | | start = offsets.start; |
28577 | | end = start; |
28578 | | } else if (offsets.start > offsets.end) { |
28579 | | start = offsets.end; |
28580 | | end = offsets.start; |
28581 | | } else { |
28582 | | start = offsets.start; |
28583 | | end = offsets.end; |
28584 | | } |
28585 | | |
28586 | | range.moveToElementText(node); |
28587 | | range.moveStart('character', start); |
28588 | | range.setEndPoint('EndToStart', range); |
28589 | | range.moveEnd('character', end - start); |
28590 | | range.select(); |
28591 | | } |
28592 | | |
28593 | | /** |
28594 | | * In modern non-IE browsers, we can support both forward and backward |
28595 | | * selections. |
28596 | | * |
28597 | | * Note: IE10+ supports the Selection object, but it does not support |
28598 | | * the `extend` method, which means that even in modern IE, it's not possible |
28599 | | * to programmatically create a backward selection. Thus, for all IE |
28600 | | * versions, we use the old IE API to create our selections. |
28601 | | * |
28602 | | * @param {DOMElement|DOMTextNode} node |
28603 | | * @param {object} offsets |
28604 | | */ |
28605 | | function setModernOffsets(node, offsets) { |
28606 | | if (!window.getSelection) { |
28607 | | return; |
28608 | | } |
28609 | | |
28610 | | var selection = window.getSelection(); |
28611 | | var length = node[getTextContentAccessor()].length; |
28612 | | var start = Math.min(offsets.start, length); |
28613 | | var end = offsets.end === undefined ? start : Math.min(offsets.end, length); |
28614 | | |
28615 | | // IE 11 uses modern selection, but doesn't support the extend method. |
28616 | | // Flip backward selections, so we can set with a single range. |
28617 | | if (!selection.extend && start > end) { |
28618 | | var temp = end; |
28619 | | end = start; |
28620 | | start = temp; |
28621 | | } |
28622 | | |
28623 | | var startMarker = getNodeForCharacterOffset(node, start); |
28624 | | var endMarker = getNodeForCharacterOffset(node, end); |
28625 | | |
28626 | | if (startMarker && endMarker) { |
28627 | | var range = document.createRange(); |
28628 | | range.setStart(startMarker.node, startMarker.offset); |
28629 | | selection.removeAllRanges(); |
28630 | | |
28631 | | if (start > end) { |
28632 | | selection.addRange(range); |
28633 | | selection.extend(endMarker.node, endMarker.offset); |
28634 | | } else { |
28635 | | range.setEnd(endMarker.node, endMarker.offset); |
28636 | | selection.addRange(range); |
28637 | | } |
28638 | | } |
28639 | | } |
28640 | | |
28641 | | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); |
28642 | | |
28643 | | var ReactDOMSelection = { |
28644 | | /** |
28645 | | * @param {DOMElement} node |
28646 | | */ |
28647 | | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, |
28648 | | |
28649 | | /** |
28650 | | * @param {DOMElement|DOMTextNode} node |
28651 | | * @param {object} offsets |
28652 | | */ |
28653 | | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets |
28654 | | }; |
28655 | | |
28656 | | module.exports = ReactDOMSelection; |
28657 | | |
28658 | | /***/ }), |
28659 | | /* 485 */ |
28660 | | /***/ (function(module, exports) { |
28661 | | |
28662 | | /** |
28663 | | * Copyright (c) 2013-present, Facebook, Inc. |
28664 | | * |
28665 | | * This source code is licensed under the MIT license found in the |
28666 | | * LICENSE file in the root directory of this source tree. |
28667 | | * |
28668 | | */ |
28669 | | |
28670 | | 'use strict'; |
28671 | | |
28672 | | /** |
28673 | | * Given any node return the first leaf node without children. |
28674 | | * |
28675 | | * @param {DOMElement|DOMTextNode} node |
28676 | | * @return {DOMElement|DOMTextNode} |
28677 | | */ |
28678 | | |
28679 | | function getLeafNode(node) { |
28680 | | while (node && node.firstChild) { |
28681 | | node = node.firstChild; |
28682 | | } |
28683 | | return node; |
28684 | | } |
28685 | | |
28686 | | /** |
28687 | | * Get the next sibling within a container. This will walk up the |
28688 | | * DOM if a node's siblings have been exhausted. |
28689 | | * |
28690 | | * @param {DOMElement|DOMTextNode} node |
28691 | | * @return {?DOMElement|DOMTextNode} |
28692 | | */ |
28693 | | function getSiblingNode(node) { |
28694 | | while (node) { |
28695 | | if (node.nextSibling) { |
28696 | | return node.nextSibling; |
28697 | | } |
28698 | | node = node.parentNode; |
28699 | | } |
28700 | | } |
28701 | | |
28702 | | /** |
28703 | | * Get object describing the nodes which contain characters at offset. |
28704 | | * |
28705 | | * @param {DOMElement|DOMTextNode} root |
28706 | | * @param {number} offset |
28707 | | * @return {?object} |
28708 | | */ |
28709 | | function getNodeForCharacterOffset(root, offset) { |
28710 | | var node = getLeafNode(root); |
28711 | | var nodeStart = 0; |
28712 | | var nodeEnd = 0; |
28713 | | |
28714 | | while (node) { |
28715 | | if (node.nodeType === 3) { |
28716 | | nodeEnd = nodeStart + node.textContent.length; |
28717 | | |
28718 | | if (nodeStart <= offset && nodeEnd >= offset) { |
28719 | | return { |
28720 | | node: node, |
28721 | | offset: offset - nodeStart |
28722 | | }; |
28723 | | } |
28724 | | |
28725 | | nodeStart = nodeEnd; |
28726 | | } |
28727 | | |
28728 | | node = getLeafNode(getSiblingNode(node)); |
28729 | | } |
28730 | | } |
28731 | | |
28732 | | module.exports = getNodeForCharacterOffset; |
28733 | | |
28734 | | /***/ }), |
28735 | | /* 486 */ |
28736 | | /***/ (function(module, exports, __webpack_require__) { |
28737 | | |
28738 | | 'use strict'; |
28739 | | |
28740 | | /** |
28741 | | * Copyright (c) 2013-present, Facebook, Inc. |
28742 | | * |
28743 | | * This source code is licensed under the MIT license found in the |
28744 | | * LICENSE file in the root directory of this source tree. |
28745 | | * |
28746 | | * |
28747 | | */ |
28748 | | |
28749 | | var isTextNode = __webpack_require__(487); |
28750 | | |
28751 | | /*eslint-disable no-bitwise */ |
28752 | | |
28753 | | /** |
28754 | | * Checks if a given DOM node contains or is another DOM node. |
28755 | | */ |
28756 | | function containsNode(outerNode, innerNode) { |
28757 | | if (!outerNode || !innerNode) { |
28758 | | return false; |
28759 | | } else if (outerNode === innerNode) { |
28760 | | return true; |
28761 | | } else if (isTextNode(outerNode)) { |
28762 | | return false; |
28763 | | } else if (isTextNode(innerNode)) { |
28764 | | return containsNode(outerNode, innerNode.parentNode); |
28765 | | } else if ('contains' in outerNode) { |
28766 | | return outerNode.contains(innerNode); |
28767 | | } else if (outerNode.compareDocumentPosition) { |
28768 | | return !!(outerNode.compareDocumentPosition(innerNode) & 16); |
28769 | | } else { |
28770 | | return false; |
28771 | | } |
28772 | | } |
28773 | | |
28774 | | module.exports = containsNode; |
28775 | | |
28776 | | /***/ }), |
28777 | | /* 487 */ |
28778 | | /***/ (function(module, exports, __webpack_require__) { |
28779 | | |
28780 | | 'use strict'; |
28781 | | |
28782 | | /** |
28783 | | * Copyright (c) 2013-present, Facebook, Inc. |
28784 | | * |
28785 | | * This source code is licensed under the MIT license found in the |
28786 | | * LICENSE file in the root directory of this source tree. |
28787 | | * |
28788 | | * @typechecks |
28789 | | */ |
28790 | | |
28791 | | var isNode = __webpack_require__(488); |
28792 | | |
28793 | | /** |
28794 | | * @param {*} object The object to check. |
28795 | | * @return {boolean} Whether or not the object is a DOM text node. |
28796 | | */ |
28797 | | function isTextNode(object) { |
28798 | | return isNode(object) && object.nodeType == 3; |
28799 | | } |
28800 | | |
28801 | | module.exports = isTextNode; |
28802 | | |
28803 | | /***/ }), |
28804 | | /* 488 */ |
28805 | | /***/ (function(module, exports) { |
28806 | | |
28807 | | 'use strict'; |
28808 | | |
28809 | | /** |
28810 | | * Copyright (c) 2013-present, Facebook, Inc. |
28811 | | * |
28812 | | * This source code is licensed under the MIT license found in the |
28813 | | * LICENSE file in the root directory of this source tree. |
28814 | | * |
28815 | | * @typechecks |
28816 | | */ |
28817 | | |
28818 | | /** |
28819 | | * @param {*} object The object to check. |
28820 | | * @return {boolean} Whether or not the object is a DOM node. |
28821 | | */ |
28822 | | function isNode(object) { |
28823 | | var doc = object ? object.ownerDocument || object : document; |
28824 | | var defaultView = doc.defaultView || window; |
28825 | | return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); |
28826 | | } |
28827 | | |
28828 | | module.exports = isNode; |
28829 | | |
28830 | | /***/ }), |
28831 | | /* 489 */ |
28832 | | /***/ (function(module, exports) { |
28833 | | |
28834 | | 'use strict'; |
28835 | | |
28836 | | /** |
28837 | | * Copyright (c) 2013-present, Facebook, Inc. |
28838 | | * |
28839 | | * This source code is licensed under the MIT license found in the |
28840 | | * LICENSE file in the root directory of this source tree. |
28841 | | * |
28842 | | * @typechecks |
28843 | | */ |
28844 | | |
28845 | | /* eslint-disable fb-www/typeof-undefined */ |
28846 | | |
28847 | | /** |
28848 | | * Same as document.activeElement but wraps in a try-catch block. In IE it is |
28849 | | * not safe to call document.activeElement if there is nothing focused. |
28850 | | * |
28851 | | * The activeElement will be null only if the document or document body is not |
28852 | | * yet defined. |
28853 | | * |
28854 | | * @param {?DOMDocument} doc Defaults to current document. |
28855 | | * @return {?DOMElement} |
28856 | | */ |
28857 | | function getActiveElement(doc) /*?DOMElement*/{ |
28858 | | doc = doc || (typeof document !== 'undefined' ? document : undefined); |
28859 | | if (typeof doc === 'undefined') { |
28860 | | return null; |
28861 | | } |
28862 | | try { |
28863 | | return doc.activeElement || doc.body; |
28864 | | } catch (e) { |
28865 | | return doc.body; |
28866 | | } |
28867 | | } |
28868 | | |
28869 | | module.exports = getActiveElement; |
28870 | | |
28871 | | /***/ }), |
28872 | | /* 490 */ |
28873 | | /***/ (function(module, exports) { |
28874 | | |
28875 | | /** |
28876 | | * Copyright (c) 2013-present, Facebook, Inc. |
28877 | | * |
28878 | | * This source code is licensed under the MIT license found in the |
28879 | | * LICENSE file in the root directory of this source tree. |
28880 | | * |
28881 | | */ |
28882 | | |
28883 | | 'use strict'; |
28884 | | |
28885 | | var NS = { |
28886 | | xlink: 'http://www.w3.org/1999/xlink', |
28887 | | xml: 'http://www.w3.org/XML/1998/namespace' |
28888 | | }; |
28889 | | |
28890 | | // We use attributes for everything SVG so let's avoid some duplication and run |
28891 | | // code instead. |
28892 | | // The following are all specified in the HTML config already so we exclude here. |
28893 | | // - class (as className) |
28894 | | // - color |
28895 | | // - height |
28896 | | // - id |
28897 | | // - lang |
28898 | | // - max |
28899 | | // - media |
28900 | | // - method |
28901 | | // - min |
28902 | | // - name |
28903 | | // - style |
28904 | | // - target |
28905 | | // - type |
28906 | | // - width |
28907 | | var ATTRS = { |
28908 | | accentHeight: 'accent-height', |
28909 | | accumulate: 0, |
28910 | | additive: 0, |
28911 | | alignmentBaseline: 'alignment-baseline', |
28912 | | allowReorder: 'allowReorder', |
28913 | | alphabetic: 0, |
28914 | | amplitude: 0, |
28915 | | arabicForm: 'arabic-form', |
28916 | | ascent: 0, |
28917 | | attributeName: 'attributeName', |
28918 | | attributeType: 'attributeType', |
28919 | | autoReverse: 'autoReverse', |
28920 | | azimuth: 0, |
28921 | | baseFrequency: 'baseFrequency', |
28922 | | baseProfile: 'baseProfile', |
28923 | | baselineShift: 'baseline-shift', |
28924 | | bbox: 0, |
28925 | | begin: 0, |
28926 | | bias: 0, |
28927 | | by: 0, |
28928 | | calcMode: 'calcMode', |
28929 | | capHeight: 'cap-height', |
28930 | | clip: 0, |
28931 | | clipPath: 'clip-path', |
28932 | | clipRule: 'clip-rule', |
28933 | | clipPathUnits: 'clipPathUnits', |
28934 | | colorInterpolation: 'color-interpolation', |
28935 | | colorInterpolationFilters: 'color-interpolation-filters', |
28936 | | colorProfile: 'color-profile', |
28937 | | colorRendering: 'color-rendering', |
28938 | | contentScriptType: 'contentScriptType', |
28939 | | contentStyleType: 'contentStyleType', |
28940 | | cursor: 0, |
28941 | | cx: 0, |
28942 | | cy: 0, |
28943 | | d: 0, |
28944 | | decelerate: 0, |
28945 | | descent: 0, |
28946 | | diffuseConstant: 'diffuseConstant', |
28947 | | direction: 0, |
28948 | | display: 0, |
28949 | | divisor: 0, |
28950 | | dominantBaseline: 'dominant-baseline', |
28951 | | dur: 0, |
28952 | | dx: 0, |
28953 | | dy: 0, |
28954 | | edgeMode: 'edgeMode', |
28955 | | elevation: 0, |
28956 | | enableBackground: 'enable-background', |
28957 | | end: 0, |
28958 | | exponent: 0, |
28959 | | externalResourcesRequired: 'externalResourcesRequired', |
28960 | | fill: 0, |
28961 | | fillOpacity: 'fill-opacity', |
28962 | | fillRule: 'fill-rule', |
28963 | | filter: 0, |
28964 | | filterRes: 'filterRes', |
28965 | | filterUnits: 'filterUnits', |
28966 | | floodColor: 'flood-color', |
28967 | | floodOpacity: 'flood-opacity', |
28968 | | focusable: 0, |
28969 | | fontFamily: 'font-family', |
28970 | | fontSize: 'font-size', |
28971 | | fontSizeAdjust: 'font-size-adjust', |
28972 | | fontStretch: 'font-stretch', |
28973 | | fontStyle: 'font-style', |
28974 | | fontVariant: 'font-variant', |
28975 | | fontWeight: 'font-weight', |
28976 | | format: 0, |
28977 | | from: 0, |
28978 | | fx: 0, |
28979 | | fy: 0, |
28980 | | g1: 0, |
28981 | | g2: 0, |
28982 | | glyphName: 'glyph-name', |
28983 | | glyphOrientationHorizontal: 'glyph-orientation-horizontal', |
28984 | | glyphOrientationVertical: 'glyph-orientation-vertical', |
28985 | | glyphRef: 'glyphRef', |
28986 | | gradientTransform: 'gradientTransform', |
28987 | | gradientUnits: 'gradientUnits', |
28988 | | hanging: 0, |
28989 | | horizAdvX: 'horiz-adv-x', |
28990 | | horizOriginX: 'horiz-origin-x', |
28991 | | ideographic: 0, |
28992 | | imageRendering: 'image-rendering', |
28993 | | 'in': 0, |
28994 | | in2: 0, |
28995 | | intercept: 0, |
28996 | | k: 0, |
28997 | | k1: 0, |
28998 | | k2: 0, |
28999 | | k3: 0, |
29000 | | k4: 0, |
29001 | | kernelMatrix: 'kernelMatrix', |
29002 | | kernelUnitLength: 'kernelUnitLength', |
29003 | | kerning: 0, |
29004 | | keyPoints: 'keyPoints', |
29005 | | keySplines: 'keySplines', |
29006 | | keyTimes: 'keyTimes', |
29007 | | lengthAdjust: 'lengthAdjust', |
29008 | | letterSpacing: 'letter-spacing', |
29009 | | lightingColor: 'lighting-color', |
29010 | | limitingConeAngle: 'limitingConeAngle', |
29011 | | local: 0, |
29012 | | markerEnd: 'marker-end', |
29013 | | markerMid: 'marker-mid', |
29014 | | markerStart: 'marker-start', |
29015 | | markerHeight: 'markerHeight', |
29016 | | markerUnits: 'markerUnits', |
29017 | | markerWidth: 'markerWidth', |
29018 | | mask: 0, |
29019 | | maskContentUnits: 'maskContentUnits', |
29020 | | maskUnits: 'maskUnits', |
29021 | | mathematical: 0, |
29022 | | mode: 0, |
29023 | | numOctaves: 'numOctaves', |
29024 | | offset: 0, |
29025 | | opacity: 0, |
29026 | | operator: 0, |
29027 | | order: 0, |
29028 | | orient: 0, |
29029 | | orientation: 0, |
29030 | | origin: 0, |
29031 | | overflow: 0, |
29032 | | overlinePosition: 'overline-position', |
29033 | | overlineThickness: 'overline-thickness', |
29034 | | paintOrder: 'paint-order', |
29035 | | panose1: 'panose-1', |
29036 | | pathLength: 'pathLength', |
29037 | | patternContentUnits: 'patternContentUnits', |
29038 | | patternTransform: 'patternTransform', |
29039 | | patternUnits: 'patternUnits', |
29040 | | pointerEvents: 'pointer-events', |
29041 | | points: 0, |
29042 | | pointsAtX: 'pointsAtX', |
29043 | | pointsAtY: 'pointsAtY', |
29044 | | pointsAtZ: 'pointsAtZ', |
29045 | | preserveAlpha: 'preserveAlpha', |
29046 | | preserveAspectRatio: 'preserveAspectRatio', |
29047 | | primitiveUnits: 'primitiveUnits', |
29048 | | r: 0, |
29049 | | radius: 0, |
29050 | | refX: 'refX', |
29051 | | refY: 'refY', |
29052 | | renderingIntent: 'rendering-intent', |
29053 | | repeatCount: 'repeatCount', |
29054 | | repeatDur: 'repeatDur', |
29055 | | requiredExtensions: 'requiredExtensions', |
29056 | | requiredFeatures: 'requiredFeatures', |
29057 | | restart: 0, |
29058 | | result: 0, |
29059 | | rotate: 0, |
29060 | | rx: 0, |
29061 | | ry: 0, |
29062 | | scale: 0, |
29063 | | seed: 0, |
29064 | | shapeRendering: 'shape-rendering', |
29065 | | slope: 0, |
29066 | | spacing: 0, |
29067 | | specularConstant: 'specularConstant', |
29068 | | specularExponent: 'specularExponent', |
29069 | | speed: 0, |
29070 | | spreadMethod: 'spreadMethod', |
29071 | | startOffset: 'startOffset', |
29072 | | stdDeviation: 'stdDeviation', |
29073 | | stemh: 0, |
29074 | | stemv: 0, |
29075 | | stitchTiles: 'stitchTiles', |
29076 | | stopColor: 'stop-color', |
29077 | | stopOpacity: 'stop-opacity', |
29078 | | strikethroughPosition: 'strikethrough-position', |
29079 | | strikethroughThickness: 'strikethrough-thickness', |
29080 | | string: 0, |
29081 | | stroke: 0, |
29082 | | strokeDasharray: 'stroke-dasharray', |
29083 | | strokeDashoffset: 'stroke-dashoffset', |
29084 | | strokeLinecap: 'stroke-linecap', |
29085 | | strokeLinejoin: 'stroke-linejoin', |
29086 | | strokeMiterlimit: 'stroke-miterlimit', |
29087 | | strokeOpacity: 'stroke-opacity', |
29088 | | strokeWidth: 'stroke-width', |
29089 | | surfaceScale: 'surfaceScale', |
29090 | | systemLanguage: 'systemLanguage', |
29091 | | tableValues: 'tableValues', |
29092 | | targetX: 'targetX', |
29093 | | targetY: 'targetY', |
29094 | | textAnchor: 'text-anchor', |
29095 | | textDecoration: 'text-decoration', |
29096 | | textRendering: 'text-rendering', |
29097 | | textLength: 'textLength', |
29098 | | to: 0, |
29099 | | transform: 0, |
29100 | | u1: 0, |
29101 | | u2: 0, |
29102 | | underlinePosition: 'underline-position', |
29103 | | underlineThickness: 'underline-thickness', |
29104 | | unicode: 0, |
29105 | | unicodeBidi: 'unicode-bidi', |
29106 | | unicodeRange: 'unicode-range', |
29107 | | unitsPerEm: 'units-per-em', |
29108 | | vAlphabetic: 'v-alphabetic', |
29109 | | vHanging: 'v-hanging', |
29110 | | vIdeographic: 'v-ideographic', |
29111 | | vMathematical: 'v-mathematical', |
29112 | | values: 0, |
29113 | | vectorEffect: 'vector-effect', |
29114 | | version: 0, |
29115 | | vertAdvY: 'vert-adv-y', |
29116 | | vertOriginX: 'vert-origin-x', |
29117 | | vertOriginY: 'vert-origin-y', |
29118 | | viewBox: 'viewBox', |
29119 | | viewTarget: 'viewTarget', |
29120 | | visibility: 0, |
29121 | | widths: 0, |
29122 | | wordSpacing: 'word-spacing', |
29123 | | writingMode: 'writing-mode', |
29124 | | x: 0, |
29125 | | xHeight: 'x-height', |
29126 | | x1: 0, |
29127 | | x2: 0, |
29128 | | xChannelSelector: 'xChannelSelector', |
29129 | | xlinkActuate: 'xlink:actuate', |
29130 | | xlinkArcrole: 'xlink:arcrole', |
29131 | | xlinkHref: 'xlink:href', |
29132 | | xlinkRole: 'xlink:role', |
29133 | | xlinkShow: 'xlink:show', |
29134 | | xlinkTitle: 'xlink:title', |
29135 | | xlinkType: 'xlink:type', |
29136 | | xmlBase: 'xml:base', |
29137 | | xmlns: 0, |
29138 | | xmlnsXlink: 'xmlns:xlink', |
29139 | | xmlLang: 'xml:lang', |
29140 | | xmlSpace: 'xml:space', |
29141 | | y: 0, |
29142 | | y1: 0, |
29143 | | y2: 0, |
29144 | | yChannelSelector: 'yChannelSelector', |
29145 | | z: 0, |
29146 | | zoomAndPan: 'zoomAndPan' |
29147 | | }; |
29148 | | |
29149 | | var SVGDOMPropertyConfig = { |
29150 | | Properties: {}, |
29151 | | DOMAttributeNamespaces: { |
29152 | | xlinkActuate: NS.xlink, |
29153 | | xlinkArcrole: NS.xlink, |
29154 | | xlinkHref: NS.xlink, |
29155 | | xlinkRole: NS.xlink, |
29156 | | xlinkShow: NS.xlink, |
29157 | | xlinkTitle: NS.xlink, |
29158 | | xlinkType: NS.xlink, |
29159 | | xmlBase: NS.xml, |
29160 | | xmlLang: NS.xml, |
29161 | | xmlSpace: NS.xml |
29162 | | }, |
29163 | | DOMAttributeNames: {} |
29164 | | }; |
29165 | | |
29166 | | Object.keys(ATTRS).forEach(function (key) { |
29167 | | SVGDOMPropertyConfig.Properties[key] = 0; |
29168 | | if (ATTRS[key]) { |
29169 | | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; |
29170 | | } |
29171 | | }); |
29172 | | |
29173 | | module.exports = SVGDOMPropertyConfig; |
29174 | | |
29175 | | /***/ }), |
29176 | | /* 491 */ |
29177 | | /***/ (function(module, exports, __webpack_require__) { |
29178 | | |
29179 | | /** |
29180 | | * Copyright (c) 2013-present, Facebook, Inc. |
29181 | | * |
29182 | | * This source code is licensed under the MIT license found in the |
29183 | | * LICENSE file in the root directory of this source tree. |
29184 | | * |
29185 | | */ |
29186 | | |
29187 | | 'use strict'; |
29188 | | |
29189 | | var EventPropagators = __webpack_require__(377); |
29190 | | var ExecutionEnvironment = __webpack_require__(384); |
29191 | | var ReactDOMComponentTree = __webpack_require__(370); |
29192 | | var ReactInputSelection = __webpack_require__(483); |
29193 | | var SyntheticEvent = __webpack_require__(389); |
29194 | | |
29195 | | var getActiveElement = __webpack_require__(489); |
29196 | | var isTextInputElement = __webpack_require__(408); |
29197 | | var shallowEqual = __webpack_require__(460); |
29198 | | |
29199 | | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; |
29200 | | |
29201 | | var eventTypes = { |
29202 | | select: { |
29203 | | phasedRegistrationNames: { |
29204 | | bubbled: 'onSelect', |
29205 | | captured: 'onSelectCapture' |
29206 | | }, |
29207 | | dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] |
29208 | | } |
29209 | | }; |
29210 | | |
29211 | | var activeElement = null; |
29212 | | var activeElementInst = null; |
29213 | | var lastSelection = null; |
29214 | | var mouseDown = false; |
29215 | | |
29216 | | // Track whether a listener exists for this plugin. If none exist, we do |
29217 | | // not extract events. See #3639. |
29218 | | var hasListener = false; |
29219 | | |
29220 | | /** |
29221 | | * Get an object which is a unique representation of the current selection. |
29222 | | * |
29223 | | * The return value will not be consistent across nodes or browsers, but |
29224 | | * two identical selections on the same node will return identical objects. |
29225 | | * |
29226 | | * @param {DOMElement} node |
29227 | | * @return {object} |
29228 | | */ |
29229 | | function getSelection(node) { |
29230 | | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { |
29231 | | return { |
29232 | | start: node.selectionStart, |
29233 | | end: node.selectionEnd |
29234 | | }; |
29235 | | } else if (window.getSelection) { |
29236 | | var selection = window.getSelection(); |
29237 | | return { |
29238 | | anchorNode: selection.anchorNode, |
29239 | | anchorOffset: selection.anchorOffset, |
29240 | | focusNode: selection.focusNode, |
29241 | | focusOffset: selection.focusOffset |
29242 | | }; |
29243 | | } else if (document.selection) { |
29244 | | var range = document.selection.createRange(); |
29245 | | return { |
29246 | | parentElement: range.parentElement(), |
29247 | | text: range.text, |
29248 | | top: range.boundingTop, |
29249 | | left: range.boundingLeft |
29250 | | }; |
29251 | | } |
29252 | | } |
29253 | | |
29254 | | /** |
29255 | | * Poll selection to see whether it's changed. |
29256 | | * |
29257 | | * @param {object} nativeEvent |
29258 | | * @return {?SyntheticEvent} |
29259 | | */ |
29260 | | function constructSelectEvent(nativeEvent, nativeEventTarget) { |
29261 | | // Ensure we have the right element, and that the user is not dragging a |
29262 | | // selection (this matches native `select` event behavior). In HTML5, select |
29263 | | // fires only on input and textarea thus if there's no focused element we |
29264 | | // won't dispatch. |
29265 | | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { |
29266 | | return null; |
29267 | | } |
29268 | | |
29269 | | // Only fire when selection has actually changed. |
29270 | | var currentSelection = getSelection(activeElement); |
29271 | | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { |
29272 | | lastSelection = currentSelection; |
29273 | | |
29274 | | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); |
29275 | | |
29276 | | syntheticEvent.type = 'select'; |
29277 | | syntheticEvent.target = activeElement; |
29278 | | |
29279 | | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); |
29280 | | |
29281 | | return syntheticEvent; |
29282 | | } |
29283 | | |
29284 | | return null; |
29285 | | } |
29286 | | |
29287 | | /** |
29288 | | * This plugin creates an `onSelect` event that normalizes select events |
29289 | | * across form elements. |
29290 | | * |
29291 | | * Supported elements are: |
29292 | | * - input (see `isTextInputElement`) |
29293 | | * - textarea |
29294 | | * - contentEditable |
29295 | | * |
29296 | | * This differs from native browser implementations in the following ways: |
29297 | | * - Fires on contentEditable fields as well as inputs. |
29298 | | * - Fires for collapsed selection. |
29299 | | * - Fires after user input. |
29300 | | */ |
29301 | | var SelectEventPlugin = { |
29302 | | eventTypes: eventTypes, |
29303 | | |
29304 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
29305 | | if (!hasListener) { |
29306 | | return null; |
29307 | | } |
29308 | | |
29309 | | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; |
29310 | | |
29311 | | switch (topLevelType) { |
29312 | | // Track the input node that has focus. |
29313 | | case 'topFocus': |
29314 | | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { |
29315 | | activeElement = targetNode; |
29316 | | activeElementInst = targetInst; |
29317 | | lastSelection = null; |
29318 | | } |
29319 | | break; |
29320 | | case 'topBlur': |
29321 | | activeElement = null; |
29322 | | activeElementInst = null; |
29323 | | lastSelection = null; |
29324 | | break; |
29325 | | // Don't fire the event while the user is dragging. This matches the |
29326 | | // semantics of the native select event. |
29327 | | case 'topMouseDown': |
29328 | | mouseDown = true; |
29329 | | break; |
29330 | | case 'topContextMenu': |
29331 | | case 'topMouseUp': |
29332 | | mouseDown = false; |
29333 | | return constructSelectEvent(nativeEvent, nativeEventTarget); |
29334 | | // Chrome and IE fire non-standard event when selection is changed (and |
29335 | | // sometimes when it hasn't). IE's event fires out of order with respect |
29336 | | // to key and input events on deletion, so we discard it. |
29337 | | // |
29338 | | // Firefox doesn't support selectionchange, so check selection status |
29339 | | // after each key entry. The selection changes after keydown and before |
29340 | | // keyup, but we check on keydown as well in the case of holding down a |
29341 | | // key, when multiple keydown events are fired but only one keyup is. |
29342 | | // This is also our approach for IE handling, for the reason above. |
29343 | | case 'topSelectionChange': |
29344 | | if (skipSelectionChangeEvent) { |
29345 | | break; |
29346 | | } |
29347 | | // falls through |
29348 | | case 'topKeyDown': |
29349 | | case 'topKeyUp': |
29350 | | return constructSelectEvent(nativeEvent, nativeEventTarget); |
29351 | | } |
29352 | | |
29353 | | return null; |
29354 | | }, |
29355 | | |
29356 | | didPutListener: function (inst, registrationName, listener) { |
29357 | | if (registrationName === 'onSelect') { |
29358 | | hasListener = true; |
29359 | | } |
29360 | | } |
29361 | | }; |
29362 | | |
29363 | | module.exports = SelectEventPlugin; |
29364 | | |
29365 | | /***/ }), |
29366 | | /* 492 */ |
29367 | | /***/ (function(module, exports, __webpack_require__) { |
29368 | | |
29369 | | /** |
29370 | | * Copyright (c) 2013-present, Facebook, Inc. |
29371 | | * |
29372 | | * This source code is licensed under the MIT license found in the |
29373 | | * LICENSE file in the root directory of this source tree. |
29374 | | * |
29375 | | * |
29376 | | */ |
29377 | | |
29378 | | 'use strict'; |
29379 | | |
29380 | | var _prodInvariant = __webpack_require__(371); |
29381 | | |
29382 | | var EventListener = __webpack_require__(479); |
29383 | | var EventPropagators = __webpack_require__(377); |
29384 | | var ReactDOMComponentTree = __webpack_require__(370); |
29385 | | var SyntheticAnimationEvent = __webpack_require__(493); |
29386 | | var SyntheticClipboardEvent = __webpack_require__(494); |
29387 | | var SyntheticEvent = __webpack_require__(389); |
29388 | | var SyntheticFocusEvent = __webpack_require__(495); |
29389 | | var SyntheticKeyboardEvent = __webpack_require__(496); |
29390 | | var SyntheticMouseEvent = __webpack_require__(411); |
29391 | | var SyntheticDragEvent = __webpack_require__(499); |
29392 | | var SyntheticTouchEvent = __webpack_require__(500); |
29393 | | var SyntheticTransitionEvent = __webpack_require__(501); |
29394 | | var SyntheticUIEvent = __webpack_require__(412); |
29395 | | var SyntheticWheelEvent = __webpack_require__(502); |
29396 | | |
29397 | | var emptyFunction = __webpack_require__(339); |
29398 | | var getEventCharCode = __webpack_require__(497); |
29399 | | var invariant = __webpack_require__(342); |
29400 | | |
29401 | | /** |
29402 | | * Turns |
29403 | | * ['abort', ...] |
29404 | | * into |
29405 | | * eventTypes = { |
29406 | | * 'abort': { |
29407 | | * phasedRegistrationNames: { |
29408 | | * bubbled: 'onAbort', |
29409 | | * captured: 'onAbortCapture', |
29410 | | * }, |
29411 | | * dependencies: ['topAbort'], |
29412 | | * }, |
29413 | | * ... |
29414 | | * }; |
29415 | | * topLevelEventsToDispatchConfig = { |
29416 | | * 'topAbort': { sameConfig } |
29417 | | * }; |
29418 | | */ |
29419 | | var eventTypes = {}; |
29420 | | var topLevelEventsToDispatchConfig = {}; |
29421 | | ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { |
29422 | | var capitalizedEvent = event[0].toUpperCase() + event.slice(1); |
29423 | | var onEvent = 'on' + capitalizedEvent; |
29424 | | var topEvent = 'top' + capitalizedEvent; |
29425 | | |
29426 | | var type = { |
29427 | | phasedRegistrationNames: { |
29428 | | bubbled: onEvent, |
29429 | | captured: onEvent + 'Capture' |
29430 | | }, |
29431 | | dependencies: [topEvent] |
29432 | | }; |
29433 | | eventTypes[event] = type; |
29434 | | topLevelEventsToDispatchConfig[topEvent] = type; |
29435 | | }); |
29436 | | |
29437 | | var onClickListeners = {}; |
29438 | | |
29439 | | function getDictionaryKey(inst) { |
29440 | | // Prevents V8 performance issue: |
29441 | | // https://github.com/facebook/react/pull/7232 |
29442 | | return '.' + inst._rootNodeID; |
29443 | | } |
29444 | | |
29445 | | function isInteractive(tag) { |
29446 | | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; |
29447 | | } |
29448 | | |
29449 | | var SimpleEventPlugin = { |
29450 | | eventTypes: eventTypes, |
29451 | | |
29452 | | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
29453 | | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; |
29454 | | if (!dispatchConfig) { |
29455 | | return null; |
29456 | | } |
29457 | | var EventConstructor; |
29458 | | switch (topLevelType) { |
29459 | | case 'topAbort': |
29460 | | case 'topCanPlay': |
29461 | | case 'topCanPlayThrough': |
29462 | | case 'topDurationChange': |
29463 | | case 'topEmptied': |
29464 | | case 'topEncrypted': |
29465 | | case 'topEnded': |
29466 | | case 'topError': |
29467 | | case 'topInput': |
29468 | | case 'topInvalid': |
29469 | | case 'topLoad': |
29470 | | case 'topLoadedData': |
29471 | | case 'topLoadedMetadata': |
29472 | | case 'topLoadStart': |
29473 | | case 'topPause': |
29474 | | case 'topPlay': |
29475 | | case 'topPlaying': |
29476 | | case 'topProgress': |
29477 | | case 'topRateChange': |
29478 | | case 'topReset': |
29479 | | case 'topSeeked': |
29480 | | case 'topSeeking': |
29481 | | case 'topStalled': |
29482 | | case 'topSubmit': |
29483 | | case 'topSuspend': |
29484 | | case 'topTimeUpdate': |
29485 | | case 'topVolumeChange': |
29486 | | case 'topWaiting': |
29487 | | // HTML Events |
29488 | | // @see http://www.w3.org/TR/html5/index.html#events-0 |
29489 | | EventConstructor = SyntheticEvent; |
29490 | | break; |
29491 | | case 'topKeyPress': |
29492 | | // Firefox creates a keypress event for function keys too. This removes |
29493 | | // the unwanted keypress events. Enter is however both printable and |
29494 | | // non-printable. One would expect Tab to be as well (but it isn't). |
29495 | | if (getEventCharCode(nativeEvent) === 0) { |
29496 | | return null; |
29497 | | } |
29498 | | /* falls through */ |
29499 | | case 'topKeyDown': |
29500 | | case 'topKeyUp': |
29501 | | EventConstructor = SyntheticKeyboardEvent; |
29502 | | break; |
29503 | | case 'topBlur': |
29504 | | case 'topFocus': |
29505 | | EventConstructor = SyntheticFocusEvent; |
29506 | | break; |
29507 | | case 'topClick': |
29508 | | // Firefox creates a click event on right mouse clicks. This removes the |
29509 | | // unwanted click events. |
29510 | | if (nativeEvent.button === 2) { |
29511 | | return null; |
29512 | | } |
29513 | | /* falls through */ |
29514 | | case 'topDoubleClick': |
29515 | | case 'topMouseDown': |
29516 | | case 'topMouseMove': |
29517 | | case 'topMouseUp': |
29518 | | // TODO: Disabled elements should not respond to mouse events |
29519 | | /* falls through */ |
29520 | | case 'topMouseOut': |
29521 | | case 'topMouseOver': |
29522 | | case 'topContextMenu': |
29523 | | EventConstructor = SyntheticMouseEvent; |
29524 | | break; |
29525 | | case 'topDrag': |
29526 | | case 'topDragEnd': |
29527 | | case 'topDragEnter': |
29528 | | case 'topDragExit': |
29529 | | case 'topDragLeave': |
29530 | | case 'topDragOver': |
29531 | | case 'topDragStart': |
29532 | | case 'topDrop': |
29533 | | EventConstructor = SyntheticDragEvent; |
29534 | | break; |
29535 | | case 'topTouchCancel': |
29536 | | case 'topTouchEnd': |
29537 | | case 'topTouchMove': |
29538 | | case 'topTouchStart': |
29539 | | EventConstructor = SyntheticTouchEvent; |
29540 | | break; |
29541 | | case 'topAnimationEnd': |
29542 | | case 'topAnimationIteration': |
29543 | | case 'topAnimationStart': |
29544 | | EventConstructor = SyntheticAnimationEvent; |
29545 | | break; |
29546 | | case 'topTransitionEnd': |
29547 | | EventConstructor = SyntheticTransitionEvent; |
29548 | | break; |
29549 | | case 'topScroll': |
29550 | | EventConstructor = SyntheticUIEvent; |
29551 | | break; |
29552 | | case 'topWheel': |
29553 | | EventConstructor = SyntheticWheelEvent; |
29554 | | break; |
29555 | | case 'topCopy': |
29556 | | case 'topCut': |
29557 | | case 'topPaste': |
29558 | | EventConstructor = SyntheticClipboardEvent; |
29559 | | break; |
29560 | | } |
29561 | | !EventConstructor ? true ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; |
29562 | | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); |
29563 | | EventPropagators.accumulateTwoPhaseDispatches(event); |
29564 | | return event; |
29565 | | }, |
29566 | | |
29567 | | didPutListener: function (inst, registrationName, listener) { |
29568 | | // Mobile Safari does not fire properly bubble click events on |
29569 | | // non-interactive elements, which means delegated click listeners do not |
29570 | | // fire. The workaround for this bug involves attaching an empty click |
29571 | | // listener on the target node. |
29572 | | // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html |
29573 | | if (registrationName === 'onClick' && !isInteractive(inst._tag)) { |
29574 | | var key = getDictionaryKey(inst); |
29575 | | var node = ReactDOMComponentTree.getNodeFromInstance(inst); |
29576 | | if (!onClickListeners[key]) { |
29577 | | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); |
29578 | | } |
29579 | | } |
29580 | | }, |
29581 | | |
29582 | | willDeleteListener: function (inst, registrationName) { |
29583 | | if (registrationName === 'onClick' && !isInteractive(inst._tag)) { |
29584 | | var key = getDictionaryKey(inst); |
29585 | | onClickListeners[key].remove(); |
29586 | | delete onClickListeners[key]; |
29587 | | } |
29588 | | } |
29589 | | }; |
29590 | | |
29591 | | module.exports = SimpleEventPlugin; |
29592 | | |
29593 | | /***/ }), |
29594 | | /* 493 */ |
29595 | | /***/ (function(module, exports, __webpack_require__) { |
29596 | | |
29597 | | /** |
29598 | | * Copyright (c) 2013-present, Facebook, Inc. |
29599 | | * |
29600 | | * This source code is licensed under the MIT license found in the |
29601 | | * LICENSE file in the root directory of this source tree. |
29602 | | * |
29603 | | */ |
29604 | | |
29605 | | 'use strict'; |
29606 | | |
29607 | | var SyntheticEvent = __webpack_require__(389); |
29608 | | |
29609 | | /** |
29610 | | * @interface Event |
29611 | | * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface |
29612 | | * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent |
29613 | | */ |
29614 | | var AnimationEventInterface = { |
29615 | | animationName: null, |
29616 | | elapsedTime: null, |
29617 | | pseudoElement: null |
29618 | | }; |
29619 | | |
29620 | | /** |
29621 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
29622 | | * @param {string} dispatchMarker Marker identifying the event target. |
29623 | | * @param {object} nativeEvent Native browser event. |
29624 | | * @extends {SyntheticEvent} |
29625 | | */ |
29626 | | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
29627 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
29628 | | } |
29629 | | |
29630 | | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); |
29631 | | |
29632 | | module.exports = SyntheticAnimationEvent; |
29633 | | |
29634 | | /***/ }), |
29635 | | /* 494 */ |
29636 | | /***/ (function(module, exports, __webpack_require__) { |
29637 | | |
29638 | | /** |
29639 | | * Copyright (c) 2013-present, Facebook, Inc. |
29640 | | * |
29641 | | * This source code is licensed under the MIT license found in the |
29642 | | * LICENSE file in the root directory of this source tree. |
29643 | | * |
29644 | | */ |
29645 | | |
29646 | | 'use strict'; |
29647 | | |
29648 | | var SyntheticEvent = __webpack_require__(389); |
29649 | | |
29650 | | /** |
29651 | | * @interface Event |
29652 | | * @see http://www.w3.org/TR/clipboard-apis/ |
29653 | | */ |
29654 | | var ClipboardEventInterface = { |
29655 | | clipboardData: function (event) { |
29656 | | return 'clipboardData' in event ? event.clipboardData : window.clipboardData; |
29657 | | } |
29658 | | }; |
29659 | | |
29660 | | /** |
29661 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
29662 | | * @param {string} dispatchMarker Marker identifying the event target. |
29663 | | * @param {object} nativeEvent Native browser event. |
29664 | | * @extends {SyntheticUIEvent} |
29665 | | */ |
29666 | | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
29667 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
29668 | | } |
29669 | | |
29670 | | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); |
29671 | | |
29672 | | module.exports = SyntheticClipboardEvent; |
29673 | | |
29674 | | /***/ }), |
29675 | | /* 495 */ |
29676 | | /***/ (function(module, exports, __webpack_require__) { |
29677 | | |
29678 | | /** |
29679 | | * Copyright (c) 2013-present, Facebook, Inc. |
29680 | | * |
29681 | | * This source code is licensed under the MIT license found in the |
29682 | | * LICENSE file in the root directory of this source tree. |
29683 | | * |
29684 | | */ |
29685 | | |
29686 | | 'use strict'; |
29687 | | |
29688 | | var SyntheticUIEvent = __webpack_require__(412); |
29689 | | |
29690 | | /** |
29691 | | * @interface FocusEvent |
29692 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
29693 | | */ |
29694 | | var FocusEventInterface = { |
29695 | | relatedTarget: null |
29696 | | }; |
29697 | | |
29698 | | /** |
29699 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
29700 | | * @param {string} dispatchMarker Marker identifying the event target. |
29701 | | * @param {object} nativeEvent Native browser event. |
29702 | | * @extends {SyntheticUIEvent} |
29703 | | */ |
29704 | | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
29705 | | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
29706 | | } |
29707 | | |
29708 | | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); |
29709 | | |
29710 | | module.exports = SyntheticFocusEvent; |
29711 | | |
29712 | | /***/ }), |
29713 | | /* 496 */ |
29714 | | /***/ (function(module, exports, __webpack_require__) { |
29715 | | |
29716 | | /** |
29717 | | * Copyright (c) 2013-present, Facebook, Inc. |
29718 | | * |
29719 | | * This source code is licensed under the MIT license found in the |
29720 | | * LICENSE file in the root directory of this source tree. |
29721 | | * |
29722 | | */ |
29723 | | |
29724 | | 'use strict'; |
29725 | | |
29726 | | var SyntheticUIEvent = __webpack_require__(412); |
29727 | | |
29728 | | var getEventCharCode = __webpack_require__(497); |
29729 | | var getEventKey = __webpack_require__(498); |
29730 | | var getEventModifierState = __webpack_require__(414); |
29731 | | |
29732 | | /** |
29733 | | * @interface KeyboardEvent |
29734 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
29735 | | */ |
29736 | | var KeyboardEventInterface = { |
29737 | | key: getEventKey, |
29738 | | location: null, |
29739 | | ctrlKey: null, |
29740 | | shiftKey: null, |
29741 | | altKey: null, |
29742 | | metaKey: null, |
29743 | | repeat: null, |
29744 | | locale: null, |
29745 | | getModifierState: getEventModifierState, |
29746 | | // Legacy Interface |
29747 | | charCode: function (event) { |
29748 | | // `charCode` is the result of a KeyPress event and represents the value of |
29749 | | // the actual printable character. |
29750 | | |
29751 | | // KeyPress is deprecated, but its replacement is not yet final and not |
29752 | | // implemented in any major browser. Only KeyPress has charCode. |
29753 | | if (event.type === 'keypress') { |
29754 | | return getEventCharCode(event); |
29755 | | } |
29756 | | return 0; |
29757 | | }, |
29758 | | keyCode: function (event) { |
29759 | | // `keyCode` is the result of a KeyDown/Up event and represents the value of |
29760 | | // physical keyboard key. |
29761 | | |
29762 | | // The actual meaning of the value depends on the users' keyboard layout |
29763 | | // which cannot be detected. Assuming that it is a US keyboard layout |
29764 | | // provides a surprisingly accurate mapping for US and European users. |
29765 | | // Due to this, it is left to the user to implement at this time. |
29766 | | if (event.type === 'keydown' || event.type === 'keyup') { |
29767 | | return event.keyCode; |
29768 | | } |
29769 | | return 0; |
29770 | | }, |
29771 | | which: function (event) { |
29772 | | // `which` is an alias for either `keyCode` or `charCode` depending on the |
29773 | | // type of the event. |
29774 | | if (event.type === 'keypress') { |
29775 | | return getEventCharCode(event); |
29776 | | } |
29777 | | if (event.type === 'keydown' || event.type === 'keyup') { |
29778 | | return event.keyCode; |
29779 | | } |
29780 | | return 0; |
29781 | | } |
29782 | | }; |
29783 | | |
29784 | | /** |
29785 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
29786 | | * @param {string} dispatchMarker Marker identifying the event target. |
29787 | | * @param {object} nativeEvent Native browser event. |
29788 | | * @extends {SyntheticUIEvent} |
29789 | | */ |
29790 | | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
29791 | | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
29792 | | } |
29793 | | |
29794 | | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); |
29795 | | |
29796 | | module.exports = SyntheticKeyboardEvent; |
29797 | | |
29798 | | /***/ }), |
29799 | | /* 497 */ |
29800 | | /***/ (function(module, exports) { |
29801 | | |
29802 | | /** |
29803 | | * Copyright (c) 2013-present, Facebook, Inc. |
29804 | | * |
29805 | | * This source code is licensed under the MIT license found in the |
29806 | | * LICENSE file in the root directory of this source tree. |
29807 | | * |
29808 | | */ |
29809 | | |
29810 | | 'use strict'; |
29811 | | |
29812 | | /** |
29813 | | * `charCode` represents the actual "character code" and is safe to use with |
29814 | | * `String.fromCharCode`. As such, only keys that correspond to printable |
29815 | | * characters produce a valid `charCode`, the only exception to this is Enter. |
29816 | | * The Tab-key is considered non-printable and does not have a `charCode`, |
29817 | | * presumably because it does not produce a tab-character in browsers. |
29818 | | * |
29819 | | * @param {object} nativeEvent Native browser event. |
29820 | | * @return {number} Normalized `charCode` property. |
29821 | | */ |
29822 | | |
29823 | | function getEventCharCode(nativeEvent) { |
29824 | | var charCode; |
29825 | | var keyCode = nativeEvent.keyCode; |
29826 | | |
29827 | | if ('charCode' in nativeEvent) { |
29828 | | charCode = nativeEvent.charCode; |
29829 | | |
29830 | | // FF does not set `charCode` for the Enter-key, check against `keyCode`. |
29831 | | if (charCode === 0 && keyCode === 13) { |
29832 | | charCode = 13; |
29833 | | } |
29834 | | } else { |
29835 | | // IE8 does not implement `charCode`, but `keyCode` has the correct value. |
29836 | | charCode = keyCode; |
29837 | | } |
29838 | | |
29839 | | // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. |
29840 | | // Must not discard the (non-)printable Enter-key. |
29841 | | if (charCode >= 32 || charCode === 13) { |
29842 | | return charCode; |
29843 | | } |
29844 | | |
29845 | | return 0; |
29846 | | } |
29847 | | |
29848 | | module.exports = getEventCharCode; |
29849 | | |
29850 | | /***/ }), |
29851 | | /* 498 */ |
29852 | | /***/ (function(module, exports, __webpack_require__) { |
29853 | | |
29854 | | /** |
29855 | | * Copyright (c) 2013-present, Facebook, Inc. |
29856 | | * |
29857 | | * This source code is licensed under the MIT license found in the |
29858 | | * LICENSE file in the root directory of this source tree. |
29859 | | * |
29860 | | */ |
29861 | | |
29862 | | 'use strict'; |
29863 | | |
29864 | | var getEventCharCode = __webpack_require__(497); |
29865 | | |
29866 | | /** |
29867 | | * Normalization of deprecated HTML5 `key` values |
29868 | | * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names |
29869 | | */ |
29870 | | var normalizeKey = { |
29871 | | Esc: 'Escape', |
29872 | | Spacebar: ' ', |
29873 | | Left: 'ArrowLeft', |
29874 | | Up: 'ArrowUp', |
29875 | | Right: 'ArrowRight', |
29876 | | Down: 'ArrowDown', |
29877 | | Del: 'Delete', |
29878 | | Win: 'OS', |
29879 | | Menu: 'ContextMenu', |
29880 | | Apps: 'ContextMenu', |
29881 | | Scroll: 'ScrollLock', |
29882 | | MozPrintableKey: 'Unidentified' |
29883 | | }; |
29884 | | |
29885 | | /** |
29886 | | * Translation from legacy `keyCode` to HTML5 `key` |
29887 | | * Only special keys supported, all others depend on keyboard layout or browser |
29888 | | * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names |
29889 | | */ |
29890 | | var translateToKey = { |
29891 | | 8: 'Backspace', |
29892 | | 9: 'Tab', |
29893 | | 12: 'Clear', |
29894 | | 13: 'Enter', |
29895 | | 16: 'Shift', |
29896 | | 17: 'Control', |
29897 | | 18: 'Alt', |
29898 | | 19: 'Pause', |
29899 | | 20: 'CapsLock', |
29900 | | 27: 'Escape', |
29901 | | 32: ' ', |
29902 | | 33: 'PageUp', |
29903 | | 34: 'PageDown', |
29904 | | 35: 'End', |
29905 | | 36: 'Home', |
29906 | | 37: 'ArrowLeft', |
29907 | | 38: 'ArrowUp', |
29908 | | 39: 'ArrowRight', |
29909 | | 40: 'ArrowDown', |
29910 | | 45: 'Insert', |
29911 | | 46: 'Delete', |
29912 | | 112: 'F1', |
29913 | | 113: 'F2', |
29914 | | 114: 'F3', |
29915 | | 115: 'F4', |
29916 | | 116: 'F5', |
29917 | | 117: 'F6', |
29918 | | 118: 'F7', |
29919 | | 119: 'F8', |
29920 | | 120: 'F9', |
29921 | | 121: 'F10', |
29922 | | 122: 'F11', |
29923 | | 123: 'F12', |
29924 | | 144: 'NumLock', |
29925 | | 145: 'ScrollLock', |
29926 | | 224: 'Meta' |
29927 | | }; |
29928 | | |
29929 | | /** |
29930 | | * @param {object} nativeEvent Native browser event. |
29931 | | * @return {string} Normalized `key` property. |
29932 | | */ |
29933 | | function getEventKey(nativeEvent) { |
29934 | | if (nativeEvent.key) { |
29935 | | // Normalize inconsistent values reported by browsers due to |
29936 | | // implementations of a working draft specification. |
29937 | | |
29938 | | // FireFox implements `key` but returns `MozPrintableKey` for all |
29939 | | // printable characters (normalized to `Unidentified`), ignore it. |
29940 | | var key = normalizeKey[nativeEvent.key] || nativeEvent.key; |
29941 | | if (key !== 'Unidentified') { |
29942 | | return key; |
29943 | | } |
29944 | | } |
29945 | | |
29946 | | // Browser does not implement `key`, polyfill as much of it as we can. |
29947 | | if (nativeEvent.type === 'keypress') { |
29948 | | var charCode = getEventCharCode(nativeEvent); |
29949 | | |
29950 | | // The enter-key is technically both printable and non-printable and can |
29951 | | // thus be captured by `keypress`, no other non-printable key should. |
29952 | | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); |
29953 | | } |
29954 | | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { |
29955 | | // While user keyboard layout determines the actual meaning of each |
29956 | | // `keyCode` value, almost all function keys have a universal value. |
29957 | | return translateToKey[nativeEvent.keyCode] || 'Unidentified'; |
29958 | | } |
29959 | | return ''; |
29960 | | } |
29961 | | |
29962 | | module.exports = getEventKey; |
29963 | | |
29964 | | /***/ }), |
29965 | | /* 499 */ |
29966 | | /***/ (function(module, exports, __webpack_require__) { |
29967 | | |
29968 | | /** |
29969 | | * Copyright (c) 2013-present, Facebook, Inc. |
29970 | | * |
29971 | | * This source code is licensed under the MIT license found in the |
29972 | | * LICENSE file in the root directory of this source tree. |
29973 | | * |
29974 | | */ |
29975 | | |
29976 | | 'use strict'; |
29977 | | |
29978 | | var SyntheticMouseEvent = __webpack_require__(411); |
29979 | | |
29980 | | /** |
29981 | | * @interface DragEvent |
29982 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
29983 | | */ |
29984 | | var DragEventInterface = { |
29985 | | dataTransfer: null |
29986 | | }; |
29987 | | |
29988 | | /** |
29989 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
29990 | | * @param {string} dispatchMarker Marker identifying the event target. |
29991 | | * @param {object} nativeEvent Native browser event. |
29992 | | * @extends {SyntheticUIEvent} |
29993 | | */ |
29994 | | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
29995 | | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
29996 | | } |
29997 | | |
29998 | | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); |
29999 | | |
30000 | | module.exports = SyntheticDragEvent; |
30001 | | |
30002 | | /***/ }), |
30003 | | /* 500 */ |
30004 | | /***/ (function(module, exports, __webpack_require__) { |
30005 | | |
30006 | | /** |
30007 | | * Copyright (c) 2013-present, Facebook, Inc. |
30008 | | * |
30009 | | * This source code is licensed under the MIT license found in the |
30010 | | * LICENSE file in the root directory of this source tree. |
30011 | | * |
30012 | | */ |
30013 | | |
30014 | | 'use strict'; |
30015 | | |
30016 | | var SyntheticUIEvent = __webpack_require__(412); |
30017 | | |
30018 | | var getEventModifierState = __webpack_require__(414); |
30019 | | |
30020 | | /** |
30021 | | * @interface TouchEvent |
30022 | | * @see http://www.w3.org/TR/touch-events/ |
30023 | | */ |
30024 | | var TouchEventInterface = { |
30025 | | touches: null, |
30026 | | targetTouches: null, |
30027 | | changedTouches: null, |
30028 | | altKey: null, |
30029 | | metaKey: null, |
30030 | | ctrlKey: null, |
30031 | | shiftKey: null, |
30032 | | getModifierState: getEventModifierState |
30033 | | }; |
30034 | | |
30035 | | /** |
30036 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
30037 | | * @param {string} dispatchMarker Marker identifying the event target. |
30038 | | * @param {object} nativeEvent Native browser event. |
30039 | | * @extends {SyntheticUIEvent} |
30040 | | */ |
30041 | | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
30042 | | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
30043 | | } |
30044 | | |
30045 | | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); |
30046 | | |
30047 | | module.exports = SyntheticTouchEvent; |
30048 | | |
30049 | | /***/ }), |
30050 | | /* 501 */ |
30051 | | /***/ (function(module, exports, __webpack_require__) { |
30052 | | |
30053 | | /** |
30054 | | * Copyright (c) 2013-present, Facebook, Inc. |
30055 | | * |
30056 | | * This source code is licensed under the MIT license found in the |
30057 | | * LICENSE file in the root directory of this source tree. |
30058 | | * |
30059 | | */ |
30060 | | |
30061 | | 'use strict'; |
30062 | | |
30063 | | var SyntheticEvent = __webpack_require__(389); |
30064 | | |
30065 | | /** |
30066 | | * @interface Event |
30067 | | * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- |
30068 | | * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent |
30069 | | */ |
30070 | | var TransitionEventInterface = { |
30071 | | propertyName: null, |
30072 | | elapsedTime: null, |
30073 | | pseudoElement: null |
30074 | | }; |
30075 | | |
30076 | | /** |
30077 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
30078 | | * @param {string} dispatchMarker Marker identifying the event target. |
30079 | | * @param {object} nativeEvent Native browser event. |
30080 | | * @extends {SyntheticEvent} |
30081 | | */ |
30082 | | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
30083 | | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
30084 | | } |
30085 | | |
30086 | | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); |
30087 | | |
30088 | | module.exports = SyntheticTransitionEvent; |
30089 | | |
30090 | | /***/ }), |
30091 | | /* 502 */ |
30092 | | /***/ (function(module, exports, __webpack_require__) { |
30093 | | |
30094 | | /** |
30095 | | * Copyright (c) 2013-present, Facebook, Inc. |
30096 | | * |
30097 | | * This source code is licensed under the MIT license found in the |
30098 | | * LICENSE file in the root directory of this source tree. |
30099 | | * |
30100 | | */ |
30101 | | |
30102 | | 'use strict'; |
30103 | | |
30104 | | var SyntheticMouseEvent = __webpack_require__(411); |
30105 | | |
30106 | | /** |
30107 | | * @interface WheelEvent |
30108 | | * @see http://www.w3.org/TR/DOM-Level-3-Events/ |
30109 | | */ |
30110 | | var WheelEventInterface = { |
30111 | | deltaX: function (event) { |
30112 | | return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). |
30113 | | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; |
30114 | | }, |
30115 | | deltaY: function (event) { |
30116 | | return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). |
30117 | | 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). |
30118 | | 'wheelDelta' in event ? -event.wheelDelta : 0; |
30119 | | }, |
30120 | | deltaZ: null, |
30121 | | |
30122 | | // Browsers without "deltaMode" is reporting in raw wheel delta where one |
30123 | | // notch on the scroll is always +/- 120, roughly equivalent to pixels. |
30124 | | // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or |
30125 | | // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. |
30126 | | deltaMode: null |
30127 | | }; |
30128 | | |
30129 | | /** |
30130 | | * @param {object} dispatchConfig Configuration used to dispatch this event. |
30131 | | * @param {string} dispatchMarker Marker identifying the event target. |
30132 | | * @param {object} nativeEvent Native browser event. |
30133 | | * @extends {SyntheticMouseEvent} |
30134 | | */ |
30135 | | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { |
30136 | | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); |
30137 | | } |
30138 | | |
30139 | | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); |
30140 | | |
30141 | | module.exports = SyntheticWheelEvent; |
30142 | | |
30143 | | /***/ }), |
30144 | | /* 503 */ |
30145 | | /***/ (function(module, exports, __webpack_require__) { |
30146 | | |
30147 | | /** |
30148 | | * Copyright (c) 2013-present, Facebook, Inc. |
30149 | | * |
30150 | | * This source code is licensed under the MIT license found in the |
30151 | | * LICENSE file in the root directory of this source tree. |
30152 | | * |
30153 | | */ |
30154 | | |
30155 | | 'use strict'; |
30156 | | |
30157 | | var _prodInvariant = __webpack_require__(371); |
30158 | | |
30159 | | var DOMLazyTree = __webpack_require__(418); |
30160 | | var DOMProperty = __webpack_require__(372); |
30161 | | var React = __webpack_require__(333); |
30162 | | var ReactBrowserEventEmitter = __webpack_require__(442); |
30163 | | var ReactCurrentOwner = __webpack_require__(347); |
30164 | | var ReactDOMComponentTree = __webpack_require__(370); |
30165 | | var ReactDOMContainerInfo = __webpack_require__(504); |
30166 | | var ReactDOMFeatureFlags = __webpack_require__(505); |
30167 | | var ReactFeatureFlags = __webpack_require__(394); |
30168 | | var ReactInstanceMap = __webpack_require__(453); |
30169 | | var ReactInstrumentation = __webpack_require__(398); |
30170 | | var ReactMarkupChecksum = __webpack_require__(506); |
30171 | | var ReactReconciler = __webpack_require__(395); |
30172 | | var ReactUpdateQueue = __webpack_require__(472); |
30173 | | var ReactUpdates = __webpack_require__(392); |
30174 | | |
30175 | | var emptyObject = __webpack_require__(341); |
30176 | | var instantiateReactComponent = __webpack_require__(455); |
30177 | | var invariant = __webpack_require__(342); |
30178 | | var setInnerHTML = __webpack_require__(420); |
30179 | | var shouldUpdateReactComponent = __webpack_require__(461); |
30180 | | var warning = __webpack_require__(338); |
30181 | | |
30182 | | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; |
30183 | | var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; |
30184 | | |
30185 | | var ELEMENT_NODE_TYPE = 1; |
30186 | | var DOC_NODE_TYPE = 9; |
30187 | | var DOCUMENT_FRAGMENT_NODE_TYPE = 11; |
30188 | | |
30189 | | var instancesByReactRootID = {}; |
30190 | | |
30191 | | /** |
30192 | | * Finds the index of the first character |
30193 | | * that's not common between the two given strings. |
30194 | | * |
30195 | | * @return {number} the index of the character where the strings diverge |
30196 | | */ |
30197 | | function firstDifferenceIndex(string1, string2) { |
30198 | | var minLen = Math.min(string1.length, string2.length); |
30199 | | for (var i = 0; i < minLen; i++) { |
30200 | | if (string1.charAt(i) !== string2.charAt(i)) { |
30201 | | return i; |
30202 | | } |
30203 | | } |
30204 | | return string1.length === string2.length ? -1 : minLen; |
30205 | | } |
30206 | | |
30207 | | /** |
30208 | | * @param {DOMElement|DOMDocument} container DOM element that may contain |
30209 | | * a React component |
30210 | | * @return {?*} DOM element that may have the reactRoot ID, or null. |
30211 | | */ |
30212 | | function getReactRootElementInContainer(container) { |
30213 | | if (!container) { |
30214 | | return null; |
30215 | | } |
30216 | | |
30217 | | if (container.nodeType === DOC_NODE_TYPE) { |
30218 | | return container.documentElement; |
30219 | | } else { |
30220 | | return container.firstChild; |
30221 | | } |
30222 | | } |
30223 | | |
30224 | | function internalGetID(node) { |
30225 | | // If node is something like a window, document, or text node, none of |
30226 | | // which support attributes or a .getAttribute method, gracefully return |
30227 | | // the empty string, as if the attribute were missing. |
30228 | | return node.getAttribute && node.getAttribute(ATTR_NAME) || ''; |
30229 | | } |
30230 | | |
30231 | | /** |
30232 | | * Mounts this component and inserts it into the DOM. |
30233 | | * |
30234 | | * @param {ReactComponent} componentInstance The instance to mount. |
30235 | | * @param {DOMElement} container DOM element to mount into. |
30236 | | * @param {ReactReconcileTransaction} transaction |
30237 | | * @param {boolean} shouldReuseMarkup If true, do not insert markup |
30238 | | */ |
30239 | | function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { |
30240 | | var markerName; |
30241 | | if (ReactFeatureFlags.logTopLevelRenders) { |
30242 | | var wrappedElement = wrapperInstance._currentElement.props.child; |
30243 | | var type = wrappedElement.type; |
30244 | | markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); |
30245 | | console.time(markerName); |
30246 | | } |
30247 | | |
30248 | | var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */ |
30249 | | ); |
30250 | | |
30251 | | if (markerName) { |
30252 | | console.timeEnd(markerName); |
30253 | | } |
30254 | | |
30255 | | wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; |
30256 | | ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); |
30257 | | } |
30258 | | |
30259 | | /** |
30260 | | * Batched mount. |
30261 | | * |
30262 | | * @param {ReactComponent} componentInstance The instance to mount. |
30263 | | * @param {DOMElement} container DOM element to mount into. |
30264 | | * @param {boolean} shouldReuseMarkup If true, do not insert markup |
30265 | | */ |
30266 | | function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { |
30267 | | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( |
30268 | | /* useCreateElement */ |
30269 | | !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); |
30270 | | transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context); |
30271 | | ReactUpdates.ReactReconcileTransaction.release(transaction); |
30272 | | } |
30273 | | |
30274 | | /** |
30275 | | * Unmounts a component and removes it from the DOM. |
30276 | | * |
30277 | | * @param {ReactComponent} instance React component instance. |
30278 | | * @param {DOMElement} container DOM element to unmount from. |
30279 | | * @final |
30280 | | * @internal |
30281 | | * @see {ReactMount.unmountComponentAtNode} |
30282 | | */ |
30283 | | function unmountComponentFromNode(instance, container, safely) { |
30284 | | if (true) { |
30285 | | ReactInstrumentation.debugTool.onBeginFlush(); |
30286 | | } |
30287 | | ReactReconciler.unmountComponent(instance, safely); |
30288 | | if (true) { |
30289 | | ReactInstrumentation.debugTool.onEndFlush(); |
30290 | | } |
30291 | | |
30292 | | if (container.nodeType === DOC_NODE_TYPE) { |
30293 | | container = container.documentElement; |
30294 | | } |
30295 | | |
30296 | | // http://jsperf.com/emptying-a-node |
30297 | | while (container.lastChild) { |
30298 | | container.removeChild(container.lastChild); |
30299 | | } |
30300 | | } |
30301 | | |
30302 | | /** |
30303 | | * True if the supplied DOM node has a direct React-rendered child that is |
30304 | | * not a React root element. Useful for warning in `render`, |
30305 | | * `unmountComponentAtNode`, etc. |
30306 | | * |
30307 | | * @param {?DOMElement} node The candidate DOM node. |
30308 | | * @return {boolean} True if the DOM element contains a direct child that was |
30309 | | * rendered by React but is not a root element. |
30310 | | * @internal |
30311 | | */ |
30312 | | function hasNonRootReactChild(container) { |
30313 | | var rootEl = getReactRootElementInContainer(container); |
30314 | | if (rootEl) { |
30315 | | var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); |
30316 | | return !!(inst && inst._hostParent); |
30317 | | } |
30318 | | } |
30319 | | |
30320 | | /** |
30321 | | * True if the supplied DOM node is a React DOM element and |
30322 | | * it has been rendered by another copy of React. |
30323 | | * |
30324 | | * @param {?DOMElement} node The candidate DOM node. |
30325 | | * @return {boolean} True if the DOM has been rendered by another copy of React |
30326 | | * @internal |
30327 | | */ |
30328 | | function nodeIsRenderedByOtherInstance(container) { |
30329 | | var rootEl = getReactRootElementInContainer(container); |
30330 | | return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); |
30331 | | } |
30332 | | |
30333 | | /** |
30334 | | * True if the supplied DOM node is a valid node element. |
30335 | | * |
30336 | | * @param {?DOMElement} node The candidate DOM node. |
30337 | | * @return {boolean} True if the DOM is a valid DOM node. |
30338 | | * @internal |
30339 | | */ |
30340 | | function isValidContainer(node) { |
30341 | | return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)); |
30342 | | } |
30343 | | |
30344 | | /** |
30345 | | * True if the supplied DOM node is a valid React node element. |
30346 | | * |
30347 | | * @param {?DOMElement} node The candidate DOM node. |
30348 | | * @return {boolean} True if the DOM is a valid React DOM node. |
30349 | | * @internal |
30350 | | */ |
30351 | | function isReactNode(node) { |
30352 | | return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); |
30353 | | } |
30354 | | |
30355 | | function getHostRootInstanceInContainer(container) { |
30356 | | var rootEl = getReactRootElementInContainer(container); |
30357 | | var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); |
30358 | | return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; |
30359 | | } |
30360 | | |
30361 | | function getTopLevelWrapperInContainer(container) { |
30362 | | var root = getHostRootInstanceInContainer(container); |
30363 | | return root ? root._hostContainerInfo._topLevelWrapper : null; |
30364 | | } |
30365 | | |
30366 | | /** |
30367 | | * Temporary (?) hack so that we can store all top-level pending updates on |
30368 | | * composites instead of having to worry about different types of components |
30369 | | * here. |
30370 | | */ |
30371 | | var topLevelRootCounter = 1; |
30372 | | var TopLevelWrapper = function () { |
30373 | | this.rootID = topLevelRootCounter++; |
30374 | | }; |
30375 | | TopLevelWrapper.prototype.isReactComponent = {}; |
30376 | | if (true) { |
30377 | | TopLevelWrapper.displayName = 'TopLevelWrapper'; |
30378 | | } |
30379 | | TopLevelWrapper.prototype.render = function () { |
30380 | | return this.props.child; |
30381 | | }; |
30382 | | TopLevelWrapper.isReactTopLevelWrapper = true; |
30383 | | |
30384 | | /** |
30385 | | * Mounting is the process of initializing a React component by creating its |
30386 | | * representative DOM elements and inserting them into a supplied `container`. |
30387 | | * Any prior content inside `container` is destroyed in the process. |
30388 | | * |
30389 | | * ReactMount.render( |
30390 | | * component, |
30391 | | * document.getElementById('container') |
30392 | | * ); |
30393 | | * |
30394 | | * <div id="container"> <-- Supplied `container`. |
30395 | | * <div data-reactid=".3"> <-- Rendered reactRoot of React |
30396 | | * // ... component. |
30397 | | * </div> |
30398 | | * </div> |
30399 | | * |
30400 | | * Inside of `container`, the first element rendered is the "reactRoot". |
30401 | | */ |
30402 | | var ReactMount = { |
30403 | | TopLevelWrapper: TopLevelWrapper, |
30404 | | |
30405 | | /** |
30406 | | * Used by devtools. The keys are not important. |
30407 | | */ |
30408 | | _instancesByReactRootID: instancesByReactRootID, |
30409 | | |
30410 | | /** |
30411 | | * This is a hook provided to support rendering React components while |
30412 | | * ensuring that the apparent scroll position of its `container` does not |
30413 | | * change. |
30414 | | * |
30415 | | * @param {DOMElement} container The `container` being rendered into. |
30416 | | * @param {function} renderCallback This must be called once to do the render. |
30417 | | */ |
30418 | | scrollMonitor: function (container, renderCallback) { |
30419 | | renderCallback(); |
30420 | | }, |
30421 | | |
30422 | | /** |
30423 | | * Take a component that's already mounted into the DOM and replace its props |
30424 | | * @param {ReactComponent} prevComponent component instance already in the DOM |
30425 | | * @param {ReactElement} nextElement component instance to render |
30426 | | * @param {DOMElement} container container to render into |
30427 | | * @param {?function} callback function triggered on completion |
30428 | | */ |
30429 | | _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { |
30430 | | ReactMount.scrollMonitor(container, function () { |
30431 | | ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); |
30432 | | if (callback) { |
30433 | | ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); |
30434 | | } |
30435 | | }); |
30436 | | |
30437 | | return prevComponent; |
30438 | | }, |
30439 | | |
30440 | | /** |
30441 | | * Render a new component into the DOM. Hooked by hooks! |
30442 | | * |
30443 | | * @param {ReactElement} nextElement element to render |
30444 | | * @param {DOMElement} container container to render into |
30445 | | * @param {boolean} shouldReuseMarkup if we should skip the markup insertion |
30446 | | * @return {ReactComponent} nextComponent |
30447 | | */ |
30448 | | _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { |
30449 | | // Various parts of our code (such as ReactCompositeComponent's |
30450 | | // _renderValidatedComponent) assume that calls to render aren't nested; |
30451 | | // verify that that's the case. |
30452 | | true ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; |
30453 | | |
30454 | | !isValidContainer(container) ? true ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; |
30455 | | |
30456 | | ReactBrowserEventEmitter.ensureScrollValueMonitoring(); |
30457 | | var componentInstance = instantiateReactComponent(nextElement, false); |
30458 | | |
30459 | | // The initial render is synchronous but any updates that happen during |
30460 | | // rendering, in componentWillMount or componentDidMount, will be batched |
30461 | | // according to the current batching strategy. |
30462 | | |
30463 | | ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); |
30464 | | |
30465 | | var wrapperID = componentInstance._instance.rootID; |
30466 | | instancesByReactRootID[wrapperID] = componentInstance; |
30467 | | |
30468 | | return componentInstance; |
30469 | | }, |
30470 | | |
30471 | | /** |
30472 | | * Renders a React component into the DOM in the supplied `container`. |
30473 | | * |
30474 | | * If the React component was previously rendered into `container`, this will |
30475 | | * perform an update on it and only mutate the DOM as necessary to reflect the |
30476 | | * latest React component. |
30477 | | * |
30478 | | * @param {ReactComponent} parentComponent The conceptual parent of this render tree. |
30479 | | * @param {ReactElement} nextElement Component element to render. |
30480 | | * @param {DOMElement} container DOM element to render into. |
30481 | | * @param {?function} callback function triggered on completion |
30482 | | * @return {ReactComponent} Component instance rendered in `container`. |
30483 | | */ |
30484 | | renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { |
30485 | | !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? true ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0; |
30486 | | return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); |
30487 | | }, |
30488 | | |
30489 | | _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { |
30490 | | ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); |
30491 | | !React.isValidElement(nextElement) ? true ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : // Check if it quacks like an element |
30492 | | nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; |
30493 | | |
30494 | | true ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; |
30495 | | |
30496 | | var nextWrappedElement = React.createElement(TopLevelWrapper, { |
30497 | | child: nextElement |
30498 | | }); |
30499 | | |
30500 | | var nextContext; |
30501 | | if (parentComponent) { |
30502 | | var parentInst = ReactInstanceMap.get(parentComponent); |
30503 | | nextContext = parentInst._processChildContext(parentInst._context); |
30504 | | } else { |
30505 | | nextContext = emptyObject; |
30506 | | } |
30507 | | |
30508 | | var prevComponent = getTopLevelWrapperInContainer(container); |
30509 | | |
30510 | | if (prevComponent) { |
30511 | | var prevWrappedElement = prevComponent._currentElement; |
30512 | | var prevElement = prevWrappedElement.props.child; |
30513 | | if (shouldUpdateReactComponent(prevElement, nextElement)) { |
30514 | | var publicInst = prevComponent._renderedComponent.getPublicInstance(); |
30515 | | var updatedCallback = callback && function () { |
30516 | | callback.call(publicInst); |
30517 | | }; |
30518 | | ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback); |
30519 | | return publicInst; |
30520 | | } else { |
30521 | | ReactMount.unmountComponentAtNode(container); |
30522 | | } |
30523 | | } |
30524 | | |
30525 | | var reactRootElement = getReactRootElementInContainer(container); |
30526 | | var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); |
30527 | | var containerHasNonRootReactChild = hasNonRootReactChild(container); |
30528 | | |
30529 | | if (true) { |
30530 | | true ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0; |
30531 | | |
30532 | | if (!containerHasReactMarkup || reactRootElement.nextSibling) { |
30533 | | var rootElementSibling = reactRootElement; |
30534 | | while (rootElementSibling) { |
30535 | | if (internalGetID(rootElementSibling)) { |
30536 | | true ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0; |
30537 | | break; |
30538 | | } |
30539 | | rootElementSibling = rootElementSibling.nextSibling; |
30540 | | } |
30541 | | } |
30542 | | } |
30543 | | |
30544 | | var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; |
30545 | | var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); |
30546 | | if (callback) { |
30547 | | callback.call(component); |
30548 | | } |
30549 | | return component; |
30550 | | }, |
30551 | | |
30552 | | /** |
30553 | | * Renders a React component into the DOM in the supplied `container`. |
30554 | | * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render |
30555 | | * |
30556 | | * If the React component was previously rendered into `container`, this will |
30557 | | * perform an update on it and only mutate the DOM as necessary to reflect the |
30558 | | * latest React component. |
30559 | | * |
30560 | | * @param {ReactElement} nextElement Component element to render. |
30561 | | * @param {DOMElement} container DOM element to render into. |
30562 | | * @param {?function} callback function triggered on completion |
30563 | | * @return {ReactComponent} Component instance rendered in `container`. |
30564 | | */ |
30565 | | render: function (nextElement, container, callback) { |
30566 | | return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); |
30567 | | }, |
30568 | | |
30569 | | /** |
30570 | | * Unmounts and destroys the React component rendered in the `container`. |
30571 | | * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode |
30572 | | * |
30573 | | * @param {DOMElement} container DOM element containing a React component. |
30574 | | * @return {boolean} True if a component was found in and unmounted from |
30575 | | * `container` |
30576 | | */ |
30577 | | unmountComponentAtNode: function (container) { |
30578 | | // Various parts of our code (such as ReactCompositeComponent's |
30579 | | // _renderValidatedComponent) assume that calls to render aren't nested; |
30580 | | // verify that that's the case. (Strictly speaking, unmounting won't cause a |
30581 | | // render but we still don't expect to be in a render call here.) |
30582 | | true ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; |
30583 | | |
30584 | | !isValidContainer(container) ? true ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; |
30585 | | |
30586 | | if (true) { |
30587 | | true ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0; |
30588 | | } |
30589 | | |
30590 | | var prevComponent = getTopLevelWrapperInContainer(container); |
30591 | | if (!prevComponent) { |
30592 | | // Check if the node being unmounted was rendered by React, but isn't a |
30593 | | // root node. |
30594 | | var containerHasNonRootReactChild = hasNonRootReactChild(container); |
30595 | | |
30596 | | // Check if the container itself is a React root node. |
30597 | | var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); |
30598 | | |
30599 | | if (true) { |